text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
We have control over client machines and they all get a spec check (decent processor/2GB RAM) Any experiences with this would be much appreciated! As long as you respect the client's `Accept-Encoding` header properly (i.e. don't serve compressed files to clients that can't decompress them), you shouldn't have a proble...
[ 0.4603988230228424, 0.018281802535057068, 0.15506528317928314, 0.2939787209033966, 0.1223631352186203, -0.2830754518508911, 0.07720106095075607, -0.030336450785398483, -0.3989690840244293, -0.6951070427894592, -0.05460260063409805, 0.5940021872520447, -0.2840787172317505, -0.25671690702438...
I've got a student table and an enrollment table; a student could have multiple enrollment records that can be active or inactive. I want to get a select that has a single student record and an indicator as to whether that student has active enrollments. I thought about doing this in an inline UDF that uses the stude...
[ 0.3325711488723755, 0.1161731630563736, 0.278119832277298, 0.22071385383605957, 0.181015282869339, 0.06974933296442032, -0.4491007924079895, 0.07800029963254929, -0.3678402602672577, -0.6871823072433472, 0.051297467201948166, 0.24441677331924438, 0.009405084885656834, 0.25467753410339355, ...
Student_Name, Student_Email, (select count(*) from Enrollment e where e.student_id = s.student_id ) Number_Of_Enrollments from Student e ``` will get the number of enrollments, which should help.
[ 0.3211459517478943, 0.2696587145328522, 0.2854658365249634, 0.22679577767848969, 0.3161081373691559, -0.08544330298900604, -0.01987222582101822, 0.31723424792289734, -0.2896270155906677, -0.6472940444946289, -0.3316812515258789, 0.31058329343795776, 0.15949013829231262, 0.3263671100139618,...
I'm trying to help someone with their Debian server. They have Plesk. I made myself an user with Plesk and enabled SSH access. I *can* log on ... but only for one second. I see the MOTD, I see a Debian disclaimer, then I'm logged out again. "Connection closed". The only thing I could think to try is to change the sh...
[ 0.3251475691795349, 0.07803554832935333, 0.1417299211025238, -0.02091568149626255, -0.2370990514755249, -0.2985517382621765, 0.4611278772354126, 0.3643379509449005, -0.33009082078933716, -0.7110993266105652, 0.059244658797979355, 0.5264568328857422, -0.21872878074645996, 0.4151056408882141...
get when a user account has a 'nologin' shell selected on the Plesk config. I would do some things: * Connect using ssh with the verbose option activated (`ssh -v user@host`) so you can get more detail. * Check the /etc/passwd file, look for your user and check that, the final field on that line, is pointing to a vali...
[ 0.27838757634162903, -0.27833035588264465, 0.5258265137672424, 0.11588204652070999, 0.2158070057630539, -0.2646457552909851, 0.42259931564331055, 0.08934049308300018, -0.2253115326166153, -0.9603393077850342, -0.4090888798236847, 0.8640802502632141, 0.2353149801492691, 0.13742467761039734,...
check your logs (in `/var/log`; I think I would check `syslog`, `messages` and `user`), so maybe you can get any meaningful message.
[ 0.41167157888412476, 0.020645402371883392, 0.09534740447998047, 0.28282806277275085, 0.17284803092479706, -0.35644325613975525, 0.5115849375724792, 0.492031991481781, -0.2997303009033203, -0.6352949738502502, -0.15795983374118805, 0.4555984139442444, -0.0030378408264368773, -0.220797613263...
I have got a windows forms project in C#. There are 2 text boxes on my form. First text box for Name and second is for surname. Whenever user presses over TAB button **I want to check from Database if there is a name like my first textbox's.text**. If there is, then it will move to next control. If it is not then my p...
[ 0.2613714933395386, 0.08619191497564316, 0.33514514565467834, -0.038620464503765106, -0.17020612955093384, 0.014425789937376976, 0.06630294024944305, 0.03757389634847641, -0.07449094951152802, -0.7178100347518921, 0.14031323790550232, 0.23829497396945953, -0.13580439984798431, 0.3103216588...
the Plesk config. I would do some things: * Connect using ssh with the verbose option activated (`ssh -v user@host`) so you can get more detail. * Check the /etc/passwd file, look for your user and check that, the final field on that line, is pointing to a valid shell (something like `/bin/bash` instead of `/bin/nolog...
[ 0.17022424936294556, -0.07068195939064026, 0.30393511056900024, 0.1609172523021698, -0.0903308317065239, -0.2206643968820572, 0.1712152063846588, 0.20720650255680084, -0.33461764454841614, -0.8491275310516357, -0.20768871903419495, 0.6774466633796692, 0.0358814001083374, 0.0200044605880975...
`messages` and `user`), so maybe you can get any meaningful message.
[ 0.12232282757759094, -0.08105652034282684, 0.3407990038394928, 0.24547220766544342, -0.09284419566392899, -0.03288642689585686, 0.4109315574169159, 0.4316055178642273, -0.35245025157928467, -0.5254493951797485, -0.3310356140136719, 0.36059877276420593, -0.04481719806790352, 0.0697992742061...
I have a project which has a calling structure similar to this: * main project/application * my library code * someone else's library code * my library code Everything's written in C#, and I have access to 'someone else's library code'. Their code is not included in my project, because it's open source and not my co...
[ 0.5684506297111511, 0.36732563376426697, -0.0006903218454681337, 0.24370159208774567, 0.005329382140189409, -0.37931597232818604, 0.3189098536968231, 0.3154582977294922, -0.3367123603820801, -0.3598346710205078, -0.25618594884872437, 0.06291769444942474, -0.3008311092853546, 0.259985148906...
is, my debugging stack is stopping at my library code, and lists the SELC as 'external' and I can't debug into it. I've copied the pdb files as well as the debug version of the library into the debug directory of my application, and still no luck; I can't seem to debug into their code, and I can't step into it at all. ...
[ 0.4282967448234558, 0.25602269172668457, -0.049667246639728546, -0.21591340005397797, 0.2598811388015747, -0.03485818952322006, 0.16026198863983154, -0.01426878571510315, -0.34287595748901367, -0.48884424567222595, 0.08305910229682922, 0.4638489782810211, -0.10829591006040573, 0.4449583888...
another. I'd assume that functionality remains, because it's just so dang useful. Any suggestions? I've looked for this answer but not found it, so if this is a dupe, just let me know where to look. Do you have "Just My Code" turned on in Visual Studio's debugging options?
[ 0.7288953065872192, -0.048876382410526276, -0.08617310225963593, 0.4082106351852417, 0.02276614122092724, -0.2324446141719818, 0.23276878893375397, 0.2531973421573639, -0.1831565946340561, -0.37372440099716187, 0.035717397928237915, 0.4462754726409912, 0.024699028581380844, 0.0518568679690...
From a database backup I have records without unique Ids. Some records have unique IDs. Some records with duplicated IDs contains different DateCreated values. Some records with duplicated IDs contains the same DateCreated values. I'm trying to get a MSSql 2005 query will leave only unique ID values with the most re...
[ -0.1673908829689026, 0.25507688522338867, 0.30486801266670227, -0.02621915191411972, 0.05145518481731415, -0.011392321437597275, 0.21856170892715454, -0.011883798986673355, -0.4254915714263916, -0.47198614478111267, -0.02382533811032772, 0.5906647443771362, -0.21656037867069244, 0.13779063...
1/3/09 ``` Help ``` DELETE FROM myTable AS t1 WHERE EXISTS ( SELECT 1 FROM myTable AS t2 WHERE t1.ID=t2.ID AND t1.DateCreated<t2.DateCreated) ``` ie, delete any row where there is another row with the same id and a later creation date.
[ -0.323029488325119, 0.26546022295951843, 0.35998743772506714, -0.2633063495159149, 0.22724398970603943, 0.15234841406345367, 0.13082632422447205, 0.12580405175685883, 0.10614289343357086, -0.6173994541168213, -0.4433710277080536, 0.12492118030786514, -0.10489219427108765, 0.449597328901290...
If you plan to write a very computationally intensive parallel application, what guidelines would you use to design your objects (whether classes or structs, or anything else) to maximize your potential of getting the most out of the parallelism. I am thinking of an application that say interprets/compiles a tree-like...
[ 0.4197874665260315, 0.18636932969093323, -0.15328210592269897, 0.3815903067588806, 0.1103719174861908, 0.08239197731018066, -0.13828054070472717, 0.17972317337989807, -0.39780497550964355, -0.5872105360031128, 0.1407063603401184, 0.35606950521469116, -0.4346389174461365, 0.2058634012937545...
of [message passing](http://en.wikipedia.org/wiki/Message_passing) and **object isolation.** First step will be identify responsibilities, that is, identifying who is gonna handle what. Every who is rounded by a box. Second step will be defining the information flow between your boxes, that is, if A produces X... who...
[ 0.25027409195899963, -0.16595886647701263, 0.28000545501708984, 0.25054603815078735, -0.2575085461139679, 0.02288399636745453, 0.0017311396077275276, -0.28716015815734863, -0.34964805841445923, -0.6462538242340088, 0.1533036231994629, 0.2339657098054886, -0.384475439786911, -0.079945467412...
actions are indeed sequential in a graphical easy to see, easy to show way. Then just implement a [Pipe](http://www.stackframe.net/en/content/06-2008/data-types-pipe) structure to let you **pass messages between workers** so that every worker has a pipeline of work. On a final note: Once the original design is done, ...
[ 0.1782485842704773, -0.3469788432121277, 0.026776496320962906, 0.05442357808351517, -0.063111811876297, 0.29987698793411255, 0.30890971422195435, -0.2620369493961334, -0.5985439419746399, -0.6704011559486389, 0.10737955570220947, 0.24496951699256897, -0.3325279653072357, -0.287343919277191...
I want to draw a projectile of a cannon moving and explosive effects (just simple broken bits flying around). How should I approach this using Core Graphics (on iPhone)? I am using an NSTimer to call a render method and update the animated projectile or explosive effects and I have no problem drawing each individual p...
[ 0.2728685438632965, -0.0894242450594902, 0.2676803767681122, 0.3584960103034973, -0.21089376509189606, 0.09093532711267471, -0.0808207094669342, -0.08842965215444565, -0.10492344945669174, -0.5333887338638306, 0.25063666701316833, 0.5237541198730469, 0.025579165667295456, -0.03400711715221...
It seems that no matter what my project is, I get through 80% of the work fairly fast. Users and management get excited thinking things are way ahead of schedule, but the pesky 20% of work remaining seems to take 4 times as long as the previous 80%. When we have our regular check ins or stand ups on the project, I feel...
[ 0.7791287899017334, 0.19785885512828827, 0.30150601267814636, -0.3626153767108917, -0.034287191927433014, 0.19396226108074188, 0.8495304584503174, 0.26452964544296265, -0.24775710701942444, -0.6312987804412842, 0.1512833833694458, 0.31533709168434143, 0.42092451453208923, 0.034017462283372...
the best approach for convincing users that the last 20% of work really does take 80% of the time? It seems like more and more users and management believe IT is easy and magic happens at the snap of some fingers... In general, we do track tasks at what I believe to be a fairly low level. Not necessarily at a create l...
[ 0.31671109795570374, -0.04728592932224274, 0.1750420182943344, 0.14531807601451874, 0.2754422128200531, -0.07363255321979523, 0.5527327060699463, -0.13791067898273468, -0.1319219470024109, -0.5054536461830139, 0.13376113772392273, 0.737379789352417, 0.35531091690063477, -0.5635490417480469...
it comes down to the perception of the users and management. Even though they may know the estimate to completion, they still get wrapped up in the emotions and perceptions on what they are seeing and the estimate numbers take a back seat. This is what I'm trying to figure out how to contain or manage expectations to. ...
[ 0.46713337302207947, 0.0446191169321537, 0.20615987479686737, 0.0044567519798874855, -0.16965501010417938, -0.2631290555000305, 0.4590032994747162, -0.13337920606136322, -0.05280323699116707, -0.5520193576812744, 0.06161545217037201, 0.5446039438247681, 0.24035786092281342, 0.0379059202969...
methods](http://en.wikipedia.org/wiki/Scrum_(development)) have been very helpful for some types of software development since they constantly update the release date to a more accurate date. [(quick video about scrum)](http://www.youtube.com/watch?v=Q5k7a9YEoUI)
[ 0.3689115345478058, -0.03122555837035179, 0.18311212956905365, -0.22902174293994904, 0.20818792283535004, -0.06386573612689972, 0.26449811458587646, -0.2339434176683426, -0.6562628149986267, -0.16551396250724792, 0.16763071715831757, 0.06947011500597, 0.046656087040901184, 0.10273161530494...
In Sharepoint Solutions I can specify the DeploymentServerType for deployment to be either ApplicationServer or WebFrontEnd. Unfortunately, Documentation on this is rather limited. I just wonder: When would I use which option? What if my Solution includes both Timer Jobs (which should go on the App Server?) and Web Pa...
[ 0.37955620884895325, -0.05464888736605644, 0.36902573704719543, -0.09800714254379272, -0.05709778890013695, -0.07091168314218521, 0.1258191615343094, -0.38420408964157104, -0.5035311579704285, -0.7722654342651367, -0.24904821813106537, 0.5745168924331665, -0.16861441731452942, -0.096298903...
components then just leave the parameter out so it gets deployed to ALL servers. See the section "Solution Element" on the following blog article: <http://blogit.create.pt/blogs/andrevala/archive/2008/02/17/sharepoint-2007-deployment_3a00_-creating-solutions.aspx> > "DeploymentServerType - Indicates which type of se...
[ 0.31124603748321533, -0.1444900929927826, 0.6369197368621826, 0.0159906093031168, -0.11059681326150894, 0.1168067455291748, 0.07176465541124344, -0.5233131051063538, -0.3254817724227905, -0.6974769830703735, -0.30296891927719116, 0.42813384532928467, -0.2613997459411621, 0.2925654947757721...
administration page) then use the ApplicationServer parameter. Generally I find most solutions will be deployed to the WebFrontEnd.
[ -0.09770198166370392, -0.005289928987622261, 0.5976461172103882, 0.15198101103305817, 0.05453215911984444, -0.16917413473129272, 0.25728675723075867, -0.21297137439250946, -0.3038288354873657, -0.9003397822380066, -0.3228282928466797, 0.48626866936683655, -0.17041362822055817, 0.2375687509...
I'm going to deploy a django app on a shared hosting provider. I installed my own python in my home, it works fine. My promblem comes with the installation of PIL, i have no support for JPEG after the compile process. I know that the compiler dont find "libjpeg", so i tried to install it at my home, i download the tar...
[ 0.42126381397247314, 0.4248315393924713, 0.17233428359031677, -0.17910249531269073, -0.378518283367157, -0.17831431329250336, 0.41619542241096497, 0.34070542454719543, -0.24719716608524323, -0.6438505053520203, 0.025231262668967247, 0.5184154510498047, -0.5020202398300171, -0.0441919118165...
enviroment? How would I do this? Does the machine actually have libjpeg available on it? Look for /usr/lib/libjpeg.so, and /usr/include/jpeglib.h; they may possibly be in a different lib and include directory. If you can't find them you'll have to also download and compile libjpeg into your home (typically prefix ~/.l...
[ 0.2615966200828552, -0.17838448286056519, 0.36118388175964355, 0.010435770265758038, 0.2112043797969818, -0.2832410931587219, 0.3181699216365814, -0.1180625855922699, -0.14099165797233582, -0.8409073352813721, -0.13644813001155853, 0.7269617319107056, -0.4505811333656311, -0.16217033565044...
Does anyone know a way to export the VBA code from a number of Excel documents, so that the code can be added into a subversion repository? Without having to manually open each document and export the code. You'll find a tool for this here: <http://www.pretentiousname.com/excel_extractvba/index.html> It's a VBS scrip...
[ 0.507733166217804, 0.20741070806980133, 0.27824822068214417, -0.22697870433330536, -0.2776776850223541, -0.11077308654785156, 0.30874884128570557, -0.21118345856666565, -0.1255687028169632, -0.31050020456314087, -0.01909645088016987, 0.5885892510414124, -0.4757821261882782, 0.1684670448303...
Dim VBComp Dim Sfx Dim ExportFolder If Wscript.Arguments.Count <> 1 Then MsgBox "As the only argument, give the FULL path to an XLS file to extract all the VBA from it." Else Set xl = CreateObject("Excel.Application") Set fs = CreateObject("Scripting.FileSystemObject") ...
[ 0.43243473768234253, -0.37516725063323975, 0.7597397565841675, -0.33438244462013245, -0.18586315214633942, 0.031238853931427002, 0.28140130639076233, -0.6692839860916138, 0.04021397978067398, -0.18635302782058716, -0.18915396928787231, 0.6576148271560669, -0.6813381314277649, -0.1682190150...
ExportFolder = WBook.Path & "\" & fs.GetBaseName(WBook.Name) fs.CreateFolder(ExportFolder) For Each VBComp In WBook.VBProject.VBComponents Select Case VBComp.Type Case vbext_ct_ClassModule, vbext_ct_Document Sfx = ".cls" Case vbext_ct_MSF...
[ -0.2579677999019623, -0.12447424232959747, 0.6411802172660828, -0.2624249756336212, 0.03492069989442825, 0.05989982932806015, -0.008413990028202534, -0.19916178286075592, -0.24532516300678253, -0.4810056686401367, -0.27033907175064087, 0.38267362117767334, -0.4090592563152313, 0.1007820591...
Sfx = ".frm" Case vbext_ct_StdModule Sfx = ".bas" Case Else Sfx = ""
[ 0.26129668951034546, 0.1326025426387787, 0.33131852746009827, -0.43465104699134827, -0.18116459250450134, 0.13072146475315094, -0.188754141330719, -0.37874019145965576, -0.49935364723205566, -0.30948805809020996, -0.3003949522972107, 0.537151038646698, -0.6083869338035583, -0.1819369941949...
End Select If Sfx <> "" Then On Error Resume Next Err.Clear VBComp.Export ExportFolder & "\" & VBComp.Name & Sfx
[ -0.15360449254512787, -0.024469276890158653, 0.575256884098053, -0.49699026346206665, 0.23226553201675415, -0.02689446322619915, 0.31767135858535767, -0.01833247020840645, -0.20541870594024658, -0.25261953473091125, -0.37750428915023804, 0.5529693365097046, -0.4834660589694977, -0.10704625...
If Err.Number <> 0 Then MsgBox "Failed to export " & ExportFolder & "\" & VBComp.Name & Sfx End If On Error Goto 0 End If Next
[ -0.057118453085422516, 0.01663641817867756, 0.5127700567245483, -0.31322574615478516, 0.09932301193475723, 0.1439126431941986, 0.5185990929603577, -0.24499167501926422, -0.3279057443141937, -0.2089536488056183, -0.33149030804634094, 0.35008394718170166, -0.4077902138233185, 0.1132356226444...
xl.Quit End If End Sub ``` -Adam
[ 0.1846267133951187, 0.3294830620288849, -0.28616592288017273, -0.2521606981754303, -0.3097304701805115, -0.07887523621320724, 0.44356051087379456, -0.21084706485271454, 0.05898669734597206, -0.3058207631111145, -0.6329761147499084, 0.262500137090683, -0.4610801339149475, 0.278559148311615,...
At my work as developer I do a lot of XML writing and parsing using C#. I have read very little about XAML, XSLT and XML schemas at Wikipedia and I don't see if they would make my XML-driven coding easier. Should I study any of these technologies? Which of them? Any other? They are all different. * XAML is an example ...
[ 0.49835100769996643, 0.16111896932125092, 0.17976738512516022, 0.2895027995109558, -0.3399631679058075, -0.2717198133468628, -0.034673746675252914, -0.15335562825202942, -0.1546277552843094, -0.8262656331062317, -0.1329922080039978, 0.32647761702537537, -0.2934418320655823, 0.1522027552127...
it allows you to author valid xml documents, for example.
[ 0.21730609238147736, 0.027228057384490967, 0.1877753585577011, 0.39607325196266174, 0.14699691534042358, -0.6450487971305847, -0.1267050802707672, 0.08204755187034607, -0.06958434730768204, -0.41808152198791504, -0.39683401584625244, 0.25370386242866516, 0.12040532380342484, -0.02470185607...
Using Objective-C/Cocoa how do you calculate the width and height required to draw a string based on a particular font? In C#/.Net you can do it like this: ``` SizeF textSize = graphics.MeasureString(someString, someFont); ``` Is there something like that available in Objective-C/Cocoa? Here's a specific example bas...
[ 0.1383908987045288, 0.26555415987968445, 0.06897462904453278, -0.043162859976291656, -0.3694521486759186, 0.20806582272052765, 0.02772868424654007, -0.2754974067211151, -0.41308125853538513, -0.5242500901222229, -0.08608927577733994, 0.5074003338813782, -0.1457228809595108, -0.417701959609...
Apple doesn't embed much if any sample code in their Cocoa documentation, learning this stuff is kind of difficult.
[ 0.3694423735141754, 0.6261176466941833, -0.2502000033855438, 0.14832152426242828, 0.34485137462615967, -0.08710244297981262, 0.06447251886129379, 0.6100355982780457, -0.35399943590164185, -0.30428043007850647, 0.13330692052841187, 0.28230714797973633, -0.17495977878570557, -0.1912101507186...
I'm trying to write a shell and I'm at the point where I want to ignore `Ctrl``C`. I currently have my program ignoring SIGINT and printing a new line when the signal comes, but how can I prevent the `^C` from being printed? When pressing `Ctrl``C`, here is what I get: ``` myshell>^C myshell>^C myshell>^C ``` but ...
[ -0.13330644369125366, 0.10849873721599579, 0.7279137372970581, -0.39107745885849, 0.22991502285003662, 0.09000532329082489, 0.27011388540267944, -0.10835180431604385, 0.04562807455658913, -0.5236210227012634, -0.4253658354282379, 0.5207194685935974, -0.38675105571746826, 0.1271141022443771...
} } ``` It's the terminal that does echo that thing. You have to tell it to stop doing that. My manpage of `stty` says ``` * [-]ctlecho echo control characters in hat notation (`^c') ``` running `strace stty ctlecho` shows ``` ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ...
[ 0.023990491405129433, -0.0105449752882123, 0.2746601104736328, -0.055471401661634445, -0.21375268697738647, -0.11210022121667862, 0.4751281440258026, -0.32946592569351196, -0.032949019223451614, -0.33648279309272766, 0.1472829431295395, 0.5471158027648926, -0.4805815517902374, 0.2198083549...
them ``` #include <termios.h> #include <unistd.h> #include <stdio.h> void setup_term(void) { struct termios t; tcgetattr(0, &t); t.c_lflag &= ~ECHOCTL; tcsetattr(0, TCSANOW, &t); } int main() { setup_term(); getchar(); } ``` Alternatively, you can consider using `GNU readline` to read a lin...
[ 0.3569541871547699, -0.05927152931690216, 0.6914461255073547, -0.147760808467865, 0.23656846582889557, 0.009159759618341923, 0.3284905254840851, -0.08286916464567184, -0.28168490529060364, -0.7023991942405701, -0.46194320917129517, 0.8211171627044678, -0.3353588581085205, 0.312158107757568...
The box this query is running on is a dedicated server running in a datacenter. AMD Opteron 1354 Quad-Core 2.20GHz 2GB of RAM Windows Server 2008 x64 (Yes I know I only have 2GB of RAM, I'm upgrading to 8GB when the project goes live). So I went through and created 250,000 dummy rows in a table to really stress test ...
[ -0.07632815092802048, 0.2060031294822693, 0.3633407652378082, 0.15300680696964264, -0.22244656085968018, 0.11302150040864944, 0.1543266326189041, -0.33380308747291565, -0.3057118356227875, -0.12889693677425385, 0.11466077715158463, 0.32720819115638733, -0.33693307638168335, -0.032249148935...
of this answer to go from start to finish. Only indexes are Primary Keys. ``` Stories table -- [ID] [int] IDENTITY(1,1) NOT NULL, [UserID] [int] NOT NULL, [CategoryID] [int] NOT NULL, [VoteCount] [int] NOT NULL, [CommentCount] [int] NOT NULL, [Title] [nvarchar](96) NOT NULL, [Description] [nvarchar](1024) NOT NULL, [C...
[ 0.038912419229745865, 0.33627501130104065, 0.523315966129303, 0.3257736265659332, 0.035727985203266144, 0.2371637374162674, 0.45075857639312744, -0.32415875792503357, -0.4036131799221039, -0.3223910927772522, -0.4158644676208496, 0.4767720699310303, -0.21168483793735504, 0.3547413647174835...
this query. ``` SELECT TOP(10) * FROM Stories INNER JOIN Categories ON Categories.ID = Stories.CategoryID INNER JOIN Users ON Users.ID = Stories.UserID ORDER BY Stories.LastActivityAt ``` Query takes 52 seconds to run, CPU usage hovers at 2-3%, Membery is 1.1GB, 900MB free but the Disk usage seems out of control. It...
[ -0.171415776014328, 0.08485877513885498, 0.5231147408485413, 0.38212552666664124, 0.013543719425797462, 0.14491786062717438, 0.28688621520996094, -0.19191120564937592, -0.43694859743118286, -0.5192739963531494, -0.29344433546066284, 0.8166914582252502, 0.13859543204307556, -0.0948118939995...
Stories.LastActivityAt ``` All 3 of these queries are pretty much instant. Exec plan for first query. <http://i43.tinypic.com/xp6gi1.png> Exec plans for other 3 queries (in order). <http://i43.tinypic.com/30124bp.png> <http://i44.tinypic.com/13yjml1.png> <http://i43.tinypic.com/33ue7fb.png> Any help wo...
[ 0.2283724993467331, -0.22145208716392517, 0.5844083428382874, 0.3513644337654114, -0.28978362679481506, -0.011507416144013405, 0.029669150710105896, -0.05224011838436127, -0.2168227732181549, -0.5463869571685791, 0.20669640600681305, 0.6714177131652832, 0.07666406035423279, -0.042089585214...
for the time being I'll stick with that. Here's the code I used to test this. ``` DBDataContext db = new DBDataContext(); Console.ReadLine(); Stopwatch sw = Stopwatch.StartNew(); var stories = db.Stories.OrderBy(s => s.LastActivityAt).Take(10).ToList(); var storyIDs = stories.Select(c => c.ID); var categories = db.C...
[ 0.17623120546340942, -0.03938162699341774, 0.6937553882598877, -0.035178713500499725, -0.025450341403484344, 0.04122752696275711, 0.4832506477832794, -0.3911152184009552, -0.28555139899253845, -0.6335965991020203, -0.1063351184129715, 0.6057801842689514, -0.10434965044260025, 0.31063532829...
point. It is the volume of that data that is shuffled around for nothing, but this can be fixed in the query. Try putting the join, sort and top(10) in a view or in a nested query, and then join back against the story table to get the rest of the data just for the 10 rows that you need. Like this: ``` select * from ...
[ -0.11328797042369843, -0.1373676359653473, 0.47510865330696106, 0.2670300304889679, -0.009930196218192577, 0.1612549126148224, -0.03486796095967293, -0.3619433641433716, -0.41251108050346375, -0.5806764364242554, -0.06957194209098816, 0.377744197845459, -0.04885413125157356, 0.113888680934...
s.UserID ``` If you have an index on LastActivityAt, this should run very fast.
[ 0.3025991916656494, -0.022491594776511192, 0.40926292538642883, 0.0171191543340683, -0.0453522764146328, -0.6517648696899414, 0.09925471246242523, 0.14127683639526367, -0.22302664816379547, -0.8642212152481079, -0.07649162411689758, 0.435186505317688, -0.042789164930582047, 0.2063497900962...
I want to implement the following scenario... Table related to this question is as follows: ProfileID int (identity) FirstName varchar(100) LastName varchar(100) step 1. User visits profiles.aspx page. Here in a grid view, he can see other people profiles. (I know how to do this.) Step 2. User visits MyProfile.aspx...
[ 0.19283369183540344, -0.06744057685136795, 1.0051213502883911, -0.09753628820180893, 0.03294331580400467, 0.09097426384687424, 0.35417041182518005, -0.4125860333442688, 0.07341215759515762, -1.1047937870025635, 0.1532488763332367, 0.5750249028205872, -0.0699998289346695, -0.175079137086868...
to MyProfile.aspx page with ProfileID lets say 33. DetailsView is able to pull up his profile based on profileid and update button is enabled. (I dont know how how to do this.) Could some one please help me with step 2 and 3. I dont know how to setup sqldatasource and detailsview to accomplish this. Thank you in adv...
[ 0.24360443651676178, 0.11007793992757797, 0.5677297711372375, 0.06324231624603271, -0.075208380818367, -0.1590803563594818, 0.29927629232406616, -0.0919870063662529, 0.0956614688038826, -0.8593679070472717, 0.11646987497806549, 0.5724518895149231, -0.22044800221920013, -0.02705273032188415...
ISAPI or FastCGI is used. Look near the top of the output for Server API; it should be set to either ISAPI (which means ISAPI is being used) or CGI/FastCGI (which means FastCGI is being used, since we already ruled out CGI).
[ 0.08180670440196991, -0.45183631777763367, 0.542220413684845, 0.17213039100170135, -0.07993143796920776, -0.20537817478179932, -0.28299659490585327, 0.18199844658374786, -0.24220624566078186, -0.7676781415939331, -0.28794896602630615, 0.533499002456665, -0.6508426666259766, -0.306124955415...
In a Web Service context, I have the following class which inherit from the class Mammal. The Mammal class is defined in a proxy. I cannot change the definition of that class. Because I need to add some methods to the class Mammal on the client side, I inherited Mammal and created Giraffe. ``` namespace TestApplicatio...
[ 0.36525022983551025, -0.04382884129881859, -0.047958243638277054, 0.10133132338523865, 0.05492926388978958, 0.07017471641302109, 0.10623173415660858, -0.18153132498264313, -0.0072606271132826805, -0.5474591851234436, 0.1706119328737259, 0.514552652835846, -0.29087960720062256, 0.3563094139...
WebMethod which expect an object of type Mammal, I get the following exception telling me that Giraffe isn't expected. ``` Error: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: The type Giraffe was not expected. Use the XmlInclude or SoapIncl...
[ -0.043703485280275345, 0.02807401865720749, 0.33332470059394836, 0.002780706388875842, -0.13985750079154968, 0.11545497924089432, 0.33800050616264343, -0.5060704946517944, -0.005149723030626774, -0.6582090854644775, 0.1453031450510025, 0.7341880798339844, -0.45263418555259705, -0.157300055...
really add the XmlInclude... To add methods, you should be using partial classes. Try adding a second class file with (in the right namespace etc): ``` partial class Mammal { public void ExtraMethod() {...} } ``` The `partial` keyword tells the compiler to allow the class to be split over multiple files - ideal ...
[ 0.40468284487724304, -0.33023056387901306, -0.0658496543765068, 0.14617572724819183, -0.0974622368812561, -0.16328366100788116, 0.09040408581495285, -0.14593225717544556, -0.18146729469299316, -0.47504958510398865, -0.09763214737176895, 0.697332501411438, -0.47252973914146423, -0.308517128...
I was intrigued by [this answer](https://stackoverflow.com/questions/542929/highlighting-unmatched-brackets-in-vim/543881#543881) to my question about [getting vim to highlight unmatched brackets](https://stackoverflow.com/questions/542929/highlighting-unmatched-brackets-in-vim) in python code. Specifically, I'm talkin...
[ 0.2714696526527405, 0.1216031163930893, -0.022100776433944702, 0.06798720359802246, -0.33899304270744324, 0.030714932829141617, 0.31680166721343994, -0.026374386623501778, -0.15707255899906158, -0.5193536281585693, 0.25626641511917114, 0.7091993689537048, -0.2984565794467926, 0.03915612399...
syntax that isn't legal inside parentheses? Note: I'm not trolling for a better answer to my other question (there are plenty of good answers there already). I'm merely curious if this trick is even possible with python code. Any Python statement (import, if, for, while, def, class etc.) cannot be in the parentheses: ...
[ 0.026142345741391182, 0.14541447162628174, 0.21462997794151306, -0.11724977940320969, -0.09711199253797531, -0.3615373969078064, 0.47681450843811035, 0.12055131793022156, -0.16947326064109802, -0.20103208720684052, -0.3307725787162781, 0.9835959076881409, -0.4220634996891022, -0.3634577989...
In the bad old days of interactive console applications, Don Libes created a tool called [Expect](http://expect.nist.gov/), which enabled you to write Tcl scripts that interacted with these applications, much as a user would. Expect had two tremendous benefits: * It was possible to script interactions that otherwise w...
[ 0.33714503049850464, 0.06146451085805893, -0.06247539818286896, 0.20168505609035492, -0.07450342923402786, -0.365522563457489, 0.07909408956766129, 0.1446603685617447, 0.23159363865852356, -0.6807293891906738, 0.36506205797195435, 0.9032917618751526, -0.2736530303955078, -0.260699868202209...
question: is there any tool that provides the ability to interact with web pages and web forms programmatically, much as Expect provides the ability to interact with console applications programmatically? (The closest thing I am aware of is [Chickenfoot](http://groups.csail.mit.edu/uid/chickenfoot/).) You might be loo...
[ 0.22262203693389893, 0.2296060472726822, -0.027871787548065186, 0.2345961183309555, 0.13665737211704254, 0.12731115520000458, 0.009767651557922363, 0.17261411249637604, -0.32191288471221924, -0.6577526330947876, 0.09572862833738327, 0.010966773144900799, -0.1596737951040268, -0.02553422003...
Is there a way in python to url encode list without variables names? for example q=['with space1', 'with space2'] into qescaped=['with%20space1', 'with%20space2'] You can use [urllib.quote](http://docs.python.org/library/urllib.html#urllib.quote) together with [map](http://docs.python.org/library/functions.html#m...
[ 0.3603544235229492, -0.043325167149305344, 0.37145349383354187, -0.02723643369972706, -0.13227076828479767, 0.23415295779705048, -0.25914376974105835, -0.18636509776115417, -0.2020924687385559, -0.43004992604255676, -0.2776489853858948, 0.27325424551963806, -0.40307310223579407, 0.10085634...
I am working on a website with a simple normalized database. There is a table called Pages and a table called Views. Each time a Page is viewed, a unique record of that View is recorded in the Views table. When displaying a Page on the site, I use a simple MySQL COUNT() to total up the number of Views for display. D...
[ 0.503160834312439, 0.3077643811702728, 0.5955513715744019, 0.03546684607863426, -0.11024700105190277, 0.13148660957813263, -0.04957836866378784, 0.06239765137434006, -0.22821593284606934, -0.6567431688308716, 0.24914099276065826, 0.30405938625335693, 0.029315853491425514, 0.385774672031402...
views for each page? Or is there an efficient way to query for the top 10 most viewed pages? ``` SELECT p.pageid, count(*) as viewcount FROM pages p inner join views v on p.pageid = v.pageid group by p.pageid order by count(*) desc LIMIT 10 OFFSET 0; ``` I can't test this, but something along th...
[ -0.038631174713373184, 0.13899248838424683, 0.8345497250556946, 0.034317679703235626, -0.25340142846107483, 0.17959825694561005, -0.177093505859375, -0.35473987460136414, -0.3679533004760742, -0.6198583841323853, 0.07642186433076859, 0.758569598197937, -0.1562947928905487, 0.04138895869255...
Greetings everyone, going to need some help in clearing this exception. I get the following when debugging my compiled program in Microsoft Visual C++ 6.0: ``` Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WIND...
[ -0.3931794762611389, 0.5009927749633789, 0.703259289264679, -0.04727843403816223, -0.5114712715148926, 0.19144611060619354, 0.5747771263122559, -0.3672630488872528, -0.13958445191383362, -0.5828935503959656, -0.08567968755960464, 0.28213056921958923, -0.2769600450992584, 0.0007568002911284...
main components of my script: main.ccp ``` #include <iostream> #include "SA.h" using namespace std; // For the use of text generation in application int main() { SimAnneal Go; cout << "Quadratic Function" << endl << "Solving method: Simulated Annealing" << endl; cout << "\nSelect desired I...
[ -0.2998347282409668, 0.02142019383609295, 0.6146070957183838, -0.01697627454996109, 0.105535589158535, 0.2672193944454193, 0.1429896503686905, 0.13418470323085785, -0.04643464460968971, -0.728899359703064, -0.08452930301427841, 0.15603269636631012, -0.07113364338874817, 0.20995193719863892...
"> "; cin >> Go.N_max; cout << "\nSelect desired number of step Iterations:" << endl << "> "; cin >> Go.N_step; cout << "\nSelect desired Absolute Temperature:" << endl << "> "; cin >> Go.T_abs; Go.LoadCities(); Go.Initialize(); Go.SA(); system ("PAUSE"); ...
[ -0.1376025378704071, -0.4915316700935364, 0.6380982995033264, -0.22177685797214508, 0.12216843664646149, 0.24163959920406342, 0.6120933294296265, -0.43444332480430603, -0.23061813414096832, -0.7218329310417175, -0.2827772796154022, 0.04313383623957634, -0.0896158292889595, 0.17970256507396...
double S_order [15]; double S_trial [15]; int SwapNum1; int SwapNum2; double CityArray [15][15]; double E_initial; double E_current; double T; void Metropolis
[ 0.12003474682569504, -0.9477705955505371, 0.27740585803985596, 0.2983684539794922, -0.012193192727863789, 0.2582811713218689, 0.4074117839336395, 0.11474517732858658, -0.3048543334007263, -0.4607539176940918, -0.4446708858013153, 0.2874232232570648, -0.7293251156806946, 0.38102254271507263...
(double, int, int); void Next_State (double, int); double Schedule (double, int); double ObjFunction (double CityOrder []); void EquateArray (); void OrderInt (); void OrderTrial (); void OrderList (double array[]); void WriteResults (double, double, dou...
[ 0.06395839154720306, -0.23744088411331177, 0.32822829484939575, -0.2735831141471863, 0.3039937913417816, 0.3977721333503723, 0.7499757409095764, -0.15123429894447327, -0.1902574896812439, -0.5860788822174072, -0.5857442617416382, 0.3172590434551239, -0.4863896071910858, 0.15548169612884521...
int N_step; int N_max; double T_initial; double T_abs; void SA (); void Initialize (); void LoadCities (); }; double Random_Number_Generator(double nHigh, double nLow); #endif ``` SA.cpp ``` #include <math.h> #include <iostream> #include <fstream> ...
[ -0.07955334335565567, -0.35224801301956177, 0.2164178043603897, -0.2750360071659088, 0.4103451073169708, 0.4430398643016815, 0.28916382789611816, -0.5579491257667542, -0.3395792543888092, -0.5282638669013977, -0.3951779007911682, 0.44797468185424805, -0.3963806927204132, -0.133162081241607...
#include <cstdlib> #include "SA.h" using namespace std; void SimAnneal::SA() { T = T_initial; E_current = E_initial; for ( int N_temperatures = 1 ; N_temperatures <= N_max ; N_temperatures++ ) { Metropolis(T, N_step, N_temperatures); T = Schedule(T, N_tempe...
[ 0.0817570835351944, -0.49252402782440186, 0.405460000038147, -0.17572790384292603, 0.018674224615097046, 0.2254362851381302, 0.6610147356987, -0.27691832184791565, -0.3772638738155365, -0.7004106044769287, -0.5871289968490601, -0.5045374035835266, -0.5682488083839417, 0.3837907016277313, ...
<= T_abs) break; } cout << "\nResults:" << endl << "Distance> " << E_current << endl << "Temperature> " << T << endl; OrderList(S_order); } void SimAnneal::Metropolis(double T_current, int N_Steps, int N_temperatures) { for ( int i=1; i <= N_step; i++ ) Next...
[ 0.2568866014480591, -0.7556949853897095, 0.5892758965492249, -0.1428646594285965, 0.1226307600736618, 0.2687624990940094, 0.46139073371887207, -0.2731477916240692, -0.6161497235298157, -0.7231475710868835, -0.23629140853881836, -0.023051448166370392, -0.4531693458557129, 0.2734177410602569...
T_current, int i) { OrderTrial(); double EXP = 2.718281828; double E_t = ObjFunction(S_trial); double E_c = ObjFunction(S_order); double deltaE = E_t - E_c; if ( deltaE <= 0 ) {
[ 0.021934663876891136, -0.440077006816864, 0.45563608407974243, -0.38511303067207336, 0.35338276624679565, 0.4939912259578705, 0.49174001812934875, -0.47600889205932617, -0.1597084105014801, -0.32224026322364807, -0.2964496910572052, 0.4185301661491394, -0.5709437131881714, 0.41732296347618...
EquateArray(); E_current = E_t; } else { double R = Random_Number_Generator(1,0); double Ratio = 1-(float)i/(float)N_max; double ctrl_pram = pow(EXP, (-deltaE / T_current)); if (R < ctrl_pram*Ratio)
[ 0.03671398386359215, -0.48038914799690247, 0.5420548915863037, -0.19602259993553162, 0.45894473791122437, 0.315786212682724, 0.01356266625225544, -0.6606314778327942, -0.05016329139471054, -0.09117647260427475, -0.13292443752288818, 0.7236940860748291, -0.3461644947528839, 0.27446162700653...
{ EquateArray(); E_current = E_t; } else E_current = E_c; } } double SimAnneal::Schedule (double Temp, int i) {
[ 0.03510953485965729, -0.3511124849319458, 0.39942434430122375, 0.13397644460201263, 0.2411109358072281, 0.12630468606948853, 0.18752698600292206, 0.024525003507733345, -0.3089171051979065, -0.46678340435028076, -0.1579410880804062, 0.4764567017555237, -0.43908119201660156, 0.19682799279689...
double CoolingRate = 0.9999; return Temp *= CoolingRate; } double SimAnneal::ObjFunction (double CityOrder []) { int a, b; double distance = 0; for (int i = 0; i < 15 - 1; i++) { a = CityOrder [i]; b = CityOrder [i + 1]; distance += CityArray [a][b]; } retur...
[ 0.15691234171390533, -0.28942427039146423, 0.8896340131759644, -0.11672639846801758, -0.2579765319824219, 0.21406380832195282, 0.436331182718277, -0.4044983685016632, 0.08254960924386978, -0.41261905431747437, -0.30965787172317505, 0.28661245107650757, -0.17892839014530182, 0.0991703495383...
int a, b; double distance = 0; OrderInt(); for (int i = 0; i < 15 -1; i++) { a = S_order [i]; b = S_order [i + 1]; distance += CityArray [a][b]; } E_initial = distance; } void SimAnneal::EquateArray () { for (int i = 0; i < 15; i++) {
[ 0.04253552854061127, -0.3031739890575409, 0.6344607472419739, 0.0013825016794726253, 0.09063764661550522, 0.2245032787322998, 0.49475520849227905, -0.32364046573638916, -0.08941254764795303, -0.5557845830917358, -0.4266566038131714, 0.37936583161354065, -0.3613426089286804, 0.2701583504676...
S_order [i] = S_trial [i]; } } void SimAnneal::OrderInt () { for (int i = 0; i <15; i++) { S_order [i] = i; } } void SimAnneal::OrderTrial () { for (int i = 0; i < 15; i++) { S_trial [i] = S_order [i]; } SwapNum1 = (int)Random_Number_Generator(15, 0);
[ -0.03800772875547409, -0.44476765394210815, 0.5803190469741821, -0.29692015051841736, -0.014730885624885559, 0.4383558928966522, 0.257628470659256, -0.6921244263648987, -0.3652563989162445, -0.3827357292175293, -0.30796313285827637, 0.5280656218528748, -0.31069639325141907, -0.032298672944...
SwapNum2 = (int)Random_Number_Generator(15, 0); for (int n = 0; n <= 100000; n++) { SwapNum2 = (int)Random_Number_Generator(15, 0); if ( SwapNum1 != SwapNum2 ) break; } S_trial [SwapNum1] = S_order [SwapNum2]; S_trial [SwapNum2] = S_order [SwapN...
[ 0.10257552564144135, -0.38346007466316223, 0.08663704246282578, -0.29845404624938965, 0.2844601571559906, 0.06767531484365463, 0.21167849004268646, -0.6952165365219116, -0.44729599356651306, -0.08520663529634476, -0.700068473815918, 0.5401468276977539, -0.35108697414398193, -0.041709553450...
SimAnneal::OrderList (double array[]) { cout << "Array List : " << endl; for (int i = 0; i < 15; i++) { cout << " > " << array[i] << endl; } cout << "End of array" << endl; } void SimAnneal::LoadCities () { int x, y; for (y = 0; y < 15; y++)
[ -0.0847211480140686, -0.3013683259487152, 0.9552174806594849, -0.09648465365171432, -0.0829562172293663, 0.2943362891674042, 0.16866295039653778, -0.23471301794052124, -0.11709766834974289, -0.2882033586502075, -0.18266433477401733, 0.5816386938095093, -0.21583382785320282, -0.210293158888...
{ for (x = 0; x < 15; x++) { if (x == y) { CityArray[x][y] = 0.0; }
[ 0.2581980228424072, -0.33202603459358215, 0.6102824211120605, -0.10290557146072388, -0.12609650194644928, 0.015156102366745472, 0.32447874546051025, -0.3546217381954193, 0.01722806692123413, -0.2976277768611908, -0.39075595140457153, 0.35594630241394043, -0.35127171874046326, 0.13767714798...
else if (x != y) { CityArray[x][y] = Random_Number_Generator(7, 1); } } } for (y = 0; y < 15; y++) { for (x = 0; x < 15; x++)
[ 0.19646435976028442, -0.5239182710647583, 0.28430095314979553, -0.14922448992729187, -0.05154222995042801, 0.08455339819192886, 0.2426331639289856, -0.5034778714179993, -0.03834715858101845, -0.28355711698532104, -0.3329964876174927, 0.38447344303131104, -0.3325035572052002, -0.00546691380...
{ if (y > x) CityArray[y][x] = CityArray[x][y]; } } } double Random_Number_Generator(double nHigh, double nLow) { double fr = ((rand() % ((int)nHigh*1000 - (int)nLow*1000 + 1)) + nLow) / 1000; return fr; } ``` Any Assistance would be much appriciated. I'm al...
[ 0.24401621520519257, -0.12340224534273148, 0.5057477355003357, 0.1065874770283699, -0.16243310272693634, 0.22150476276874542, 0.4879840016365051, -0.4365728795528412, -0.1573961228132248, -0.45286014676094055, -0.00952755007892847, 0.5716952085494995, -0.19176365435123444, 0.19643002748489...
compile: 1) ``` cin >> Go.Write; ``` There's no such variable in the `SimAnneal` class. 2) ``` Go.SA(Go.Write) ``` Your `SA` method doesn't accept any parameters. Another thing is, why don't you run your project in debug mode directly in VC++ 6.0? The VS on the screenshots is clearly 200\*X\*. According to th...
[ -0.021105600520968437, 0.10530250519514084, 0.18995977938175201, 0.04413558170199394, -0.0007130595040507615, -0.06717728823423386, 0.459658682346344, -0.08442244678735733, -0.1449078768491745, -0.6571120619773865, -0.06967248767614365, 0.49868103861808777, -0.35807809233665466, 0.16454793...
Compare these two largely identical functions. In the first, the memory for `buff` is allocated using \_alloca. This works fine. In the second, calloc and free are used instead of \_alloca. This crashes. The weird thing is that I use the calloc/free technique in almost every other GMP wrapping function I have and the...
[ 0.12253399193286896, 0.2687820792198181, 0.14410363137722015, -0.11628691852092743, 0.03325092792510986, 0.20041105151176453, 0.11440154165029526, -0.2963176965713501, -0.37689903378486633, -0.574356734752655, -0.16218113899230957, 0.6917699575424194, -0.35929951071739197, 0.10899547487497...
buff = (char *) _alloca( mpz_sizeinbase( res, 10 ) + 2 ); LPSTR sNum1 = W2A( p1 ); LPSTR sNum2 = W2A( p2 ); mpz_set_str( n1, sNum1, 10 ); mpz_set_str( n2, sNum2, 10 ); if ( mpz_sgn( n2 ) != 0 ) { mpz_div( res, n1, n2 ); mpz_get_str(buff, 10, res); } else { strcpy( bu...
[ 0.0026021525263786316, -0.12342779338359833, 0.8155497908592224, -0.5201534032821655, 0.15839609503746033, 0.422779381275177, 0.1472807377576828, -0.5864068269729614, -0.6332123875617981, -0.17484278976917267, -0.5496711134910583, 0.7626796960830688, -0.2000759243965149, 0.0202160831540823...
} BSTR bResult = _com_util::ConvertStringToBSTR( buff ); return bResult; } ``` 2: == ``` #define Z(x) mpz_t (x); mpz_init( (x) ); #define BUFF_SIZE (1024 * 32) BSTR __stdcall IBIGDIV(BSTR p1, BSTR p2 ) { USES_CONVERSION; Z(n1); Z(n2); Z(res); char * buff = (char *) calloc( mpz_sizei...
[ -0.14442996680736542, 0.20302367210388184, 0.6346799731254578, -0.5067562460899353, 0.14229634404182434, 0.2198261320590973, 0.3336583375930786, -0.6212079524993896, -0.29843252897262573, -0.45963650941848755, -0.39579224586486816, 0.6807010769844055, -0.30953720211982727, 0.19906552135944...
mpz_set_str( n2, sNum2, 10 ); if ( mpz_sgn( n2 ) != 0 ) { mpz_div( res, n1, n2 ); mpz_get_str(buff, 10, res); } else { strcpy( buff, "-0" ); } BSTR bResult = _com_util::ConvertStringToBSTR( buff ); free( buff ); return bResult; } ``` Add logging and dump everything al...
[ 0.08483254164457321, 0.08133095502853394, 0.7087252736091614, -0.17019690573215485, 0.12095939368009567, 0.02853451482951641, 0.6907996535301208, -0.4871150851249695, -0.5591375231742859, -0.3181961476802826, -0.6454161405563354, 0.6799061894416809, -0.3551861047744751, 0.2552397847175598,...
trying to guess.
[ 0.2773333787918091, 0.37017887830734253, -0.1852288842201233, 0.17781111598014832, 0.011077015660703182, 0.0882626622915268, 0.09456907212734222, -0.08258926868438721, -0.13339658081531525, -0.3319731056690216, 0.163458913564682, 0.2675465941429138, -0.04144876077771187, 0.1312195062637329...
I have a Gtk::TreeView with a Gtk::TreeModel and a Gtk::TreeModelFilter. The Tree Model is like this: ``` category1 --> actual row of data category2 --> actual row of data ``` I want to filter on the contents of @search\_entry, but I want category1 to be displayed if a row under it is still visible, and category...
[ -0.24147911369800568, 0.0016444772481918335, 0.24346697330474854, -0.048835836350917816, -0.20165736973285675, 0.18394605815410614, -0.23774513602256775, -0.01911712810397148, -0.18123190104961395, -0.5580858588218689, -0.14806511998176575, 0.5208905935287476, -0.1831756830215454, -0.00798...
the model every time I call Gtk::TreeModelFilter#refilter.Therefore I'm saying: if the iter you just gave me is on the first level, get the path, step down one, convert to the same path on the filter's model and use whether the new path exists to test visibility. ``` @store = Gtk::TreeStore.new(Gdk::Pixbuf, String, S...
[ -0.08375536650419235, -0.4466620683670044, 0.4179675579071045, 0.004778190050274134, -0.24544985592365265, 0.04302754998207092, 0.16501733660697937, -0.38831156492233276, -0.24801740050315857, -0.8245380520820618, 0.03638983890414238, 0.6861919164657593, -0.44527575373649597, 0.04260953515...
iter_path.down! has_visible_children = @tree_filter.convert_child_path_to_path(iter_path) ? true : false end rescue => e puts "THIS ERROR: " + e.message end unless @search_entry.text == "" if [1,2].collect {|i| iter[i] =~ /#{@search_entry.text}/i }.any? true elsif iter[4] == true and h...
[ -0.16735558211803436, -0.12925580143928528, 0.667699933052063, 0.08282157778739929, 0.1302894949913025, 0.36908599734306335, 0.42102622985839844, -0.33954885601997375, -0.2926901578903198, -0.7598562240600586, -0.31356677412986755, 0.41689667105674744, -0.21506384015083313, -0.076221942901...
false ``` is causing a "THIS ERROR: stack level too deep" output for each iter. There's an infinite recursion going on here, but I don't see where it's happening or how I can avoid it. I'm sure I'm thinking about this the wrong way, but I've been hacking on this a couple days without a breakthrough. Add logging and...
[ 0.5792286396026611, 0.38597553968429565, -0.06506285071372986, 0.08892315626144409, 0.05040305107831955, -0.253136545419693, 0.46688196063041687, 0.1354082077741623, -0.10656347870826721, -0.4235316514968872, 0.24803192913532257, 0.507592499256134, -0.08669012039899826, 0.2109394669532776,...
There are a number of questions on this site related to [how to access](https://stackoverflow.com/questions/62995/access-global-resx-file-in-asp-net-view-page) RESX files in an ASP.NET MVC application, and [best practices](https://stackoverflow.com/questions/381070/asp-net-mvc-localization-best-practice) of using them....
[ -0.033197104930877686, 0.014523024670779705, 0.5896070599555969, 0.06225709244608879, 0.04413408786058426, 0.03493150323629379, 0.027235515415668488, -0.09367203712463379, -0.6366373896598816, -0.8339636325836182, -0.28649237751960754, 0.6695852279663086, 0.12624801695346832, 0.26297861337...
longer miscellaneous content. I would like to use a CMS for the longer items becuase I'm pretty sure I don't want to go sticking them into an RESX file. Are there any compelling reasons to use or not to use ASP.NET resources in a **new** application. I'm going to assume that any future MVC enhancements or RESX enhance...
[ 0.6182026863098145, 0.10866423696279526, 0.46723639965057373, 0.19009540975093842, 0.054242298007011414, -0.41502028703689575, -0.05559319630265236, 0.20372027158737183, -0.5449882745742798, -0.5195856690406799, -0.1676732897758484, 0.5733116269111633, -0.01207797508686781, 0.4048436582088...
for? Any lessons learned would be appreciated. There are couple of advantages to the RESX infrastructure: * you don't have to load the proper per-language resources. Once the locale of the thread is established, the CLr takes care of finding the appropriate assembly and loading the resources. * it is easy to hand of...
[ 0.4752790331840515, -0.03254231810569763, 0.17136241495609283, 0.1140250489115715, -0.024813570082187653, -0.023733334615826607, 0.4381401836872101, 0.20854713022708893, -0.2384304404258728, -0.679074764251709, -0.30045661330223083, 0.790382444858551, -0.18029342591762543, 0.12826861441135...
Take for example the Facebook translation model. Facebook has fairly simple way for people to provide and vote on translations of various resources. If these are stored in a database, it would be possible to use them after the proper editorial process without rebuilding and redeploying the application. With the RESX mo...
[ 0.18801192939281464, -0.011629241518676281, 0.16929128766059875, 0.3122811019420624, -0.06524762511253357, -0.006400898098945618, 0.354827880859375, 0.064949631690979, -0.13921107351779938, -0.6960417032241821, -0.3579595685005188, 0.5931766629219055, -0.012347360141575336, -0.117125317454...
the localizaed resources would be after the main application is already deployed. **EDIT:** I forgot to mention that these considerations are orthogonal to the ASP.NET framework choice (MVC or WebForms).
[ -0.02555045299232006, -0.240098237991333, 0.46667391061782837, 0.057519279420375824, 0.090435691177845, -0.18861807882785797, 0.17679165303707123, 0.15754011273384094, -0.2928410470485687, -0.8591225743293762, -0.45114320516586304, 0.4766782224178314, 0.09668996185064316, -0.00667845970019...
I am not sure if this is possible in mySQL. Here are my tables:- Categories table: * id * name * parent\_id (which points to Categories.id) I use the above table to map all the categories and sub-categories. Products table: * id * name * category\_id The category\_id in the Products table points to the sub-catego...
[ 0.5003527402877808, 0.21207328140735626, 0.1686592549085617, 0.11890289187431335, 0.07498262077569962, 0.2456056773662567, -0.4101247787475586, -0.07844369858503342, -0.03755998983979225, -0.7899529933929443, -0.08988277614116669, 0.2257624864578247, -0.1065264642238617, 0.5348473191261292...
their sub-categories.. n level) for a particular category. e.g.: ``` select * from categories,products where category.name = 'Toys' and .... ``` The above query should display the products from Educational also and all other sub categories and their subcategories. Is this possible using a mySQL query? If not what...
[ 0.2141333967447281, 0.17130650579929352, 0.4771261215209961, 0.044819287955760956, -0.10696431249380112, 0.20989185571670532, -0.11040541529655457, 0.03560503199696541, -0.17774133384227753, -0.5136310458183289, -0.171037957072258, 0.5015313625335693, 0.15163226425647736, 0.378204345703125...
i\_depth: int value of how deep the category is * nvc\_breadcrumb: complete path of the category in a breadcrumb type of format And then I added a trigger to the table that houses the category information to do the following (all three updates are in the same trigger)... ``` -- Reset all branches UPDATE t_org_branche...
[ -0.31698399782180786, -0.14901688694953918, 0.608929455280304, -0.010656068101525307, -0.04662363976240158, 0.18658192455768585, 0.3482869863510132, -0.2589867413043976, -0.2872486710548401, -0.3545784652233124, -0.2254580557346344, 0.5887545347213745, -0.17745161056518555, 0.2416840642690...
on a loop WHILE EXISTS (SELECT * FROM t_branches WHERE i_depth IS NULL) UPDATE tobA SET tobA.i_depth = tobB.i_depth + 1, tobA.nvc_breadcrumb = tobB.nvc_breadcrumb + Ltrim(tobA.guid_branch_parent_id) + '/' FROM t_org_branches AS tobA INNER JOIN t_org_branches AS tobB ON (t...
[ 0.12280446290969849, -0.5524483919143677, 0.20800697803497314, -0.09414219111204147, 0.3142092227935791, 0.06986042857170105, 0.545454204082489, -0.19378268718719482, -0.4809143543243408, -0.022620363160967827, -0.19170226156711578, -0.11208309978246689, -0.48878464102745056, 0.50634688138...
AND tobB.nvc_breadcrumb IS NOT NULL AND tobA.i_depth IS NULL ``` And then just do a join with your products table on the category ID and do a "LIKE '%/[CATEGORYID]/%' ". Keep in mind that this was done in MS SQL, but it should be easy enough to translate into a MySQL version. It might just be compatible...
[ 0.005024265963584185, 0.050536464899778366, 0.2347537875175476, -0.3657483160495758, -0.2427585870027542, -0.19255216419696808, 0.10057564824819565, -0.08156519383192062, -0.4121658504009247, -0.23619572818279266, -0.19286949932575226, 0.35169774293899536, -0.7465962171554565, 0.3336715400...