text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
not truly cross platform. As an example look at cucumber. For some reason a test framework is dependent on a particular console configuration not available in windows. So to use it in Windows you have to change the font in your console and change the code page in your console. Otherwise the letter "a" disappears from ...
[ 0.42535126209259033, -0.15096955001354218, -0.04339882358908653, 0.16290926933288574, 0.12187370657920837, -0.045526936650276184, 0.32583463191986084, 0.3873506188392639, -0.09474368393421173, -0.8705183863639832, 0.20355316996574402, 0.32380127906799316, -0.2876909673213959, 0.24975445866...
time you bring up a windows issue. I say all this as some who has to use windows for his development platform at the moment. Hey, what's that smell? [late edit: Ruby is also about 3 times slower on windows. This will impact your willingness run your tests all the time and hurt your TDD feedback cycle]
[ 0.8980721235275269, 0.36075615882873535, -0.02406146191060543, 0.0871364027261734, -0.40728235244750977, -0.4124600291252136, 0.6579657196998596, 0.1989458203315735, 0.05160826817154884, -0.5378290414810181, 0.43004411458969116, 0.4668779671192169, 0.014762360602617264, 0.22846008837223053...
I spent about 4 hours yesterday trying to fix this issue in my code. I simplified the problem to the example below. The idea is to store a string in a `stringstream` ending with `std::ends`, then retrieve it later and compare it to the original string. ``` #include <sstream> #include <iostream> #include <string> int...
[ 0.09950622916221619, 0.21817387640476227, 0.4742933511734009, -0.34640005230903625, 0.02252337522804737, 0.22584916651248932, 0.420004278421402, -0.41796302795410156, 0.14404891431331635, -0.6082953214645386, -0.05120456591248512, 0.30831894278526306, -0.3795069754123688, 0.132312491536140...
std::cout << HELLO << "==" << hi << std::endl; } return 0; } ``` As you can probably guess, the above code when executed will not print anything out. Although, if printed out, or looked at in the debugger (VS2005), `HELLO` and `hi` look identical, their `.length()` in fact differs by 1. That's what I am gue...
[ 0.117891326546669, 0.1377418041229248, 0.5617425441741943, -0.22371040284633636, -0.26324722170829773, -0.09060848504304886, 0.3215409219264984, -0.1218993291258812, -0.05558612197637558, -0.653721034526825, -0.349897176027298, 0.2799466550350189, -0.32227373123168945, 0.45730096101760864,...
does not get trimmed with boost trim. However, if you use `strcmp` to compare `.c_str()` of the two strings, the comparison works correctly. The reason I used `std::ends` in the first place is because I've had issues in the past with `stringstream` retaining garbage data at the end of the stream. `std::ends` solved th...
[ 0.02780779078602791, 0.05089298263192177, 0.19577302038669586, 0.019156061112880707, -0.056929975748062134, -0.07565879076719284, 0.30928874015808105, 0.09739630669355392, -0.08860746771097183, -0.4445726275444031, -0.14249728620052338, 0.6125510334968567, -0.20097875595092773, 0.218164533...
zero is not whitespace. But it's also not printable, so you won't see it (unless your terminal displays it specially). Comparing using `strcmp` will interpret the content of a `std::string` as a C string when you pass `.c_str()`. It will say > Hmm, characters before the first `\0` (terminating null character) are *...
[ 0.2626345157623291, 0.14458104968070984, 0.3761780858039856, -0.2145632952451706, -0.037473659962415695, 0.009232896380126476, 0.3360796272754669, -0.26823103427886963, -0.058245256543159485, -0.39821431040763855, 0.12683996558189392, 0.4435875117778778, -0.2898278534412384, 0.212574139237...
the old one that contains "hello". What you did is just overwriting the first character. You want to do this: ``` std::stringstream s; s << "hello"; s.str(""); // reset the sequence s << "b"; assert(s.str() == "b"); // will succeed! ``` Also read this answer: [How to reuse an ostringstream](https://stackoverflow.com...
[ -0.31136202812194824, 0.03801651671528816, 0.7290439009666443, -0.08398162573575974, 0.4129466712474823, 0.0355987474322319, 0.5100754499435425, -0.5291017889976501, -0.3602026402950287, -0.43937113881111145, -0.3361976444721222, 0.6924501657485962, -0.2808329164981842, 0.0900937095284462,...
It seems that using Critical Sections quite a bit in Vista/Windows Server 2008 leads to the OS not fully regaining the memory. We found this problem with a Delphi application and it is clearly because of using the CS API. (see this [SO question](https://stackoverflow.com/questions/780073/is-the-memory-not-reclaimed-for...
[ -0.2595829665660858, 0.3333522081375122, 0.25227880477905273, 0.1814078986644745, -0.14957818388938904, -0.02280595898628235, 0.23834097385406494, -0.02749072015285492, -0.5119607448577881, -0.4314063787460327, -0.08380375802516937, 0.3216008245944977, -0.12087754905223846, -0.010552479885...
have indeed changed the way `InitializeCriticalSection` works on Vista, Windows Server 2008, and probably also Windows 7. They added a "feature" to retain some memory used for Debug information when you allocate a bunch of CS. The more you allocate, the more memory is retained. It might be asymptotic and eventually ...
[ 0.3257206678390503, -0.06415265053510666, 0.5316711068153381, 0.10054424405097961, -0.04152556136250496, -0.30310001969337463, 0.13351622223854065, 0.12815257906913757, -0.5652241110801697, -0.5365631580352783, -0.08087147027254105, 0.055712729692459106, -0.152310311794281, 0.1585697978734...
to actually wait. The disadvantages are that **your old applications can be incompatible**, you need to change your code and it is now platform dependent (you have to check for the version to determine which one to use). And also you lose the ability to debug if you need. **Test kit to freeze a Windows Server 2008:...
[ 0.3666791617870331, 0.04328453913331032, 0.3114203214645386, -0.008669356815516949, 0.1033124253153801, 0.16789743304252625, 0.3736060857772827, -0.3079899251461029, -0.30686742067337036, -0.33432456851005554, 0.10046418756246567, 0.26185181736946106, -0.3038574159145355, 0.114261761307716...
0; i < CS_MAX; ++i) InitializeCriticalSection(&csArray[i]); for (unsigned int i = 0; i < CS_MAX; ++i) EnterCriticalSection(&csArray[i]); for (unsigned int i = 0; i < CS_MAX; ++i) LeaveCriticalSection(&csArray[i]); for (unsigned int i = 0; i < CS_MAX; ++i) DeleteCriticalSection(&cs...
[ 0.41874733567237854, 0.008400103077292442, 0.3814655840396881, -0.3212779760360718, 0.13686658442020416, 0.22415757179260254, 0.5504282712936401, -0.08510420471429825, -0.2908896803855896, -0.37786486744880676, -0.41354164481163025, -0.004997728392481804, -0.5044257044792175, 0.30317148566...
file (needs the sleep.exe from server SDK) ``` @rem you may adapt the sleep delay depending on speed and # of CPUs @rem sleep 2 on a duo-core 4GB. sleep 1 on a 4CPU 8GB. @for /L %%i in (1,1,300) do @echo %%i & @start /min CSTest.exe & @sleep 1 @echo still alive? @pause @taskkill /im cstest.* /f ``` -...and se...
[ 0.2514760196208954, -0.29148584604263306, 0.4162980616092682, -0.14242036640644073, 0.14744925498962402, -0.03868024796247482, 0.5315544009208679, -0.49277225136756897, -0.29740357398986816, -0.8053314685821533, -0.23808428645133972, 0.4845682382583618, -0.07100627571344376, -0.07481283694...
I have the following piece of code in my DataModel.cs class: ``` public User ValidateUser(string Username, string Password) { DataContext db = new DataContext(); var query = from u in db.Users where (u.Username == Username && u.Password == Password) select u; if (query...
[ -0.14128950238227844, 0.302230566740036, 0.5757800340652466, -0.2740354537963867, -0.08221425861120224, -0.021584751084446907, 0.3017425537109375, -0.4064662456512451, 0.19405058026313782, -0.6171423196792603, -0.13201174139976501, 0.2748889625072479, -0.13260626792907715, 0.48781621456146...
{ return query.First(); } else { return new User { UserID = -1 };
[ -0.6617788076400757, -0.40415409207344055, 0.5329053997993469, -0.16690482199192047, 0.09227857738733292, 0.14831319451332092, 0.2306186556816101, -0.21969644725322723, 0.11817959696054459, -0.9843152165412903, -0.3292206823825836, 0.5325294137001038, -0.3225161135196686, 0.319411873817443...
} } ``` I have a login class calling this on my DataModel, checking to see if a user is valid. If the user is valid than I want to have a reference to that "logged-in" user in my login class (which is why ValidateUser returns a user object). Right now, if that user doesn't exist or the password is wrong, I simpl...
[ 0.18255943059921265, 0.40871813893318176, 0.0614069439470768, -0.08379685878753662, 0.2669179439544678, -0.3677661418914795, 0.29194608330726624, 0.25297459959983826, -0.06698063015937805, -0.5245339274406433, -0.06749965250492096, 0.5952242016792297, -0.38182079792022705, 0.41055741906166...
should I handle this case? If ValidateUser just returned a bool it wouldn't be a problem but because I also need a reference to that user I don't know how else to do it. IMO, this is bad practice, because it is implicit. If nothing is returned, the method should return null. This is self-explanatory. Or, if it needs t...
[ 0.017267940565943718, 0.12839119136333466, -0.018583081662654877, -0.04765823110938072, -0.36813002824783325, -0.20224066078662872, 0.48688963055610657, -0.2156555950641632, -0.07249902933835983, -0.43135830760002136, 0.2298721820116043, 0.43035760521888733, -0.4083120822906494, 0.27078968...
I've coded myself into a corner or I am overseeing something obvious here. I have a semi-fluid CSS layout that is designed like this: header - 100% width at all times, contains a x-repeated background image container - fluid (960px to 1200px, centered, contains two columns) footer - 100% width at all times, contains...
[ 0.4215775430202484, -0.010525420308113098, 0.5723508596420288, 0.1919933259487152, -0.12257998436689377, -0.011805490590631962, 0.1970193237066269, 0.0704062432050705, -0.1370241791009903, -0.8746622204780579, 0.10074793547391891, 0.2618331015110016, 0.07847125083208084, -0.071786232292652...
image breaks out of it. This is perfectly fine, I want the full image to be shown. However, I want the header and footer to scale to the widest element, in this case the image. This is not happening and is particularly troublesome when I resize the window to a width less than the image and then scroll to the right usin...
[ -0.039451997727155685, -0.17372886836528778, 0.6945198178291321, 0.04229845479130745, -0.0923127830028534, -0.0687638446688652, 0.27620068192481995, -0.08583100885152817, -0.24478353559970856, -0.6237713694572449, -0.07021515816450119, 0.35994115471839905, 0.12131068110466003, 0.2098177969...
viewport, not the content width. I can forcefully use min-width with a large value for the header and footer, but that leaves a horizontal scrollbar in normal resolutions. I could hide that scrollbar using overflow:hidden but that would chop of content and not display a scrollbar when the window is small. To make a l...
[ 0.1736583262681961, -0.0571453832089901, 0.9280909895896912, 0.07369104772806168, -0.09819773584604263, 0.029399214312434196, -0.17128878831863403, -0.28502944111824036, -0.2119244784116745, -0.7183672189712524, 0.16138550639152527, 0.8307409882545471, -0.13227973878383636, -0.099775940179...
a solution without javascript, but am thinking it is either not possible or I am overseeing something very obvious? 100% width sets the element's width to 100% of the width of the element it is contained in. In your case, it seems this is the window itself (or the body element). To make the header and footer divs (I'm ...
[ -0.020747749134898186, -0.25040939450263977, 0.6384525299072266, -0.035832230001688004, -0.09083906561136246, -0.06439919024705887, 0.1999751329421997, -0.48852595686912537, -0.09114023298025131, -0.9410955905914307, -0.03298678621649742, 0.5043389797210693, -0.011926930397748947, -0.36925...
to the correct width (don't assume it is scaling to fit the image). However, in many cases using a table for your layout can be much cleaner, and will handle the type of horizontal scaling you're looking for without needing to resort to css hacks.
[ 0.19517023861408234, -0.15835389494895935, 0.4683920443058014, 0.07647532224655151, -0.09676361829042435, -0.013790987432003021, 0.17151017487049103, -0.08855939656496048, -0.6890715956687927, -0.9357278943061829, -0.028344975784420967, 0.378887414932251, 0.011015818454325199, -0.138913318...
I have to port one RPM (made for Fedora) to Ubuntu as a deb package. In the RPM .spec file I'm using several variables (`$RPM_BUILD_ROOT, %{_libdir}, %{name}, %{version}`) to create a symlink: ``` %install ... (cd $RPM_BUILD_ROOT/%{_bindir}; ln -sf %{_libdir}/%{name}-%{version}/%{name} . ) ``` (Relative symlinks ar...
[ 0.3678343892097473, -0.05826167017221451, 0.4909585416316986, 0.02776016667485237, 0.028304005041718483, -0.1646772176027298, -0.12550140917301178, -0.08784403651952744, -0.15707790851593018, -0.47722163796424866, 0.09322697669267654, 0.7482119798660278, -0.3133728802204132, 0.070724397897...
want (automagic happens), # but I don't know details of your package #include /usr/share/cdbs/1/class/automake.mk DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//') install/$(DEB_ALL_PACKAGES):: dh_link -p$(...
[ 0.25125789642333984, 0.11142846941947937, 0.5062638521194458, -0.3458644151687622, 0.41790011525154114, -0.3174828886985779, 0.23099397122859955, -0.19494284689426422, -0.0531618669629097, -0.7772778868675232, -0.4031924903392792, 0.7476195693016052, -0.4509596824645996, -0.196606546640396...
I strip out the epoch and packaging version, if any, but this isn't always correct. Other CDBS classes might define `$${libdir}` and `$${bindir}`, but I haven't seen anything common. Note that `dh_link` will make relative links if possible, even when given absolute paths. If this is a problem, you might have to resor...
[ 0.2659568786621094, 0.1316022276878357, 0.27283450961112976, -0.17936885356903076, -0.032606340944767, -0.6792221665382385, 0.1058545783162117, 0.1902986764907837, -0.2756928503513336, -0.7010923027992249, -0.3022271692752838, 0.5414514541625977, -0.5515802502632141, 0.26073360443115234, ...
I am using a background thread to initialize an instrument over USB. The UI hangs when I try to open the device. I would expect the background thread to pause when calling Open on the device, but not the UI thread. I am testing this with no UI interaction from the background thread. I don't know how to debug the proble...
[ 0.1815338283777237, 0.03435519337654114, 0.6437740921974182, -0.004757568705826998, 0.06732692569494247, 0.0005562547594308853, 0.008900952525436878, -0.20057925581932068, 0.022755229845643044, -0.7297898530960083, 0.3032117187976837, 0.6902287006378174, -0.20851680636405945, 0.31921845674...
SOQuestion { public class MeterClass { private FancyVoltmeter meter; private Thread meterThread; public MeterClass() { // Create instance of ActiveX/COM object. meter = new FancyVoltmeter(); meterThread = new Thread(UpdateMeter);
[ -0.042156316339969635, -0.6002766489982605, 0.6111530065536499, -0.033115413039922714, 0.2331828773021698, 0.03833878040313721, 0.49163001775741577, -0.40691688656806946, 0.13979944586753845, -0.9041156768798828, -0.1969369351863861, 0.41186922788619995, -0.4565509855747223, -0.02069007977...
meterThread.Name = "Meter Thread"; meterThread.Priority = ThreadPriority.Normal; meterThread.IsBackground = true; meterThread.Start(); } private void UpdateMeter() { while(true) {
[ 0.044806357473134995, -0.5829647779464722, 0.6411171555519104, 0.048539649695158005, 0.18619805574417114, -0.0445685051381588, 0.6004452109336853, -0.3173343241214752, 0.24164360761642456, -0.3847598731517792, -0.07859527319669724, 0.7565163969993591, -0.3630622625350952, 0.254766732454299...
Thread.Sleep(1000); if(!meter.IsOpen()) { // Meter may be powered off here. // The call to Open takes about
[ 0.3071669340133667, -0.49600502848625183, 0.6747217178344727, 0.003700058441609144, 0.3938222825527191, -0.07980848103761673, 0.22250719368457794, -0.21774224936962128, -0.3589310646057129, -0.7673541903495789, -0.1412220448255539, 0.590156614780426, -0.14264582097530365, 0.181724369525909...
1 second. // UI hangs during the call??? meter.Open(); } // code to read meter goes here. }
[ 0.13875733315944672, -0.6524232625961304, 0.7131503224372864, 0.1676807403564453, -0.05447864904999733, -0.11642284691333771, 0.27186471223831177, -0.5649604201316833, 0.044722460210323334, -0.6536938548088074, -0.042928703129291534, 0.2679993510246277, -0.28090929985046387, -0.02376366220...
} } } ``` Edit: Perhaps unclear what I meant. By 'hang' I should say 'freezes momentarily'. Does meter require running in an STA? Is the call to Open() actually being marshalled back to the UI thread for this reason? You can verify this is true by looking at the callstack of the hung UI thread in the debugger.
[ 0.5107305645942688, -0.46381741762161255, 0.6075475811958313, 0.0260339193046093, 0.05753299966454506, -0.3751080334186554, 0.1782277226448059, -0.15329788625240326, -0.284438818693161, -0.18945340812206268, -0.08389724045991898, 0.34569278359413147, -0.2987383008003235, 0.0548453442752361...
I'm using a subversion repository and I want to know whenever somebody asks my repository for a checkout; like a 'svn co' or an 'svn up'. Is there a hook or some other method that I can use so that a script is run, or email sent, whenever somebody requests information from my svn server? How can I achieve this without ...
[ 0.6835504174232483, -0.2507961094379425, 0.08140388131141663, 0.04510992392897606, -0.29528871178627014, -0.39393749833106995, 0.20242728292942047, 0.29999905824661255, -0.20255553722381592, -0.22344227135181427, 0.0615217387676239, 0.3136638104915619, -0.29934993386268616, -0.135820567607...
Subversion](http://svnbook.red-bean.com/en/1.5/index.html) book: * start-commit * pre-commit * post-commit * pre-revprop-change * post-revprop-change * pre-lock * post-lock * pre-unlock * post-unlock There is no pre-checkout or pre-update hook like you describe.
[ 0.022181352600455284, -0.5679122805595398, 0.3876689374446869, -0.08371389657258987, -0.06968935579061508, -0.14499622583389282, 0.2543782591819763, -0.150821253657341, -0.3123904764652252, -0.1429722011089325, 0.12496460974216461, 0.09863562881946564, -0.6503947377204895, 0.02375900372862...
I have a list of options in a data object, and I want to make the equivalent of a radio button list to allow the user to select one and only one of them. Functionality similar to a databound combo box, but in radio button format. Silly me, I thought this would be built in, but no. How do you do it? Basically, after re...
[ 0.47445571422576904, -0.232318714261055, 0.11555057018995285, 0.014427497051656246, 0.08302689343690872, 0.18216107785701752, 0.018505392596125603, -0.1275678426027298, -0.17904554307460785, -0.4443386197090149, 0.15085652470588684, 0.37090545892715454, -0.23173439502716064, -0.07240126281...
an annoying color that I couldn't get rid of for the life of me, until I read [the MSDN example of the ListBox ControlTemplate](http://msdn.microsoft.com/en-us/library/ms754242.aspx), which shows the secret Border element that was kicking my background butt. So, the final answer here was this style: ``` <Style x:Key=...
[ -0.017615415155887604, 0.03476422652602196, 0.43527156114578247, -0.004258470144122839, 0.14253973960876465, -0.3538285195827484, 0.3305162191390991, -0.3047065734863281, 0.06147340312600136, -0.3876722753047943, -0.20931310951709747, 0.7877663969993591, -0.49064624309539795, 0.07649105042...
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBox"> <Border Name="Border" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"
[ -0.030845779925584793, -0.4228753447532654, 0.6340829730033875, 0.25045308470726013, 0.02542339824140072, -0.0665847510099411, -0.06335846334695816, -0.4166991114616394, -0.22576098144054413, -0.44406819343566895, -0.08614672720432281, -0.008307263255119324, -0.3328735828399658, 0.18917952...
CornerRadius="2"> <ScrollViewer Margin="0" Focusable="false"> <StackPanel Margin="2" IsItemsHost="True" /> </ScrollViewer> </Border>
[ -0.5388396382331848, -0.32910293340682983, 1.0708125829696655, 0.27165278792381287, 0.02564840577542782, -0.3926757276058197, -0.06897633522748947, -0.26011529564857483, -0.08377592265605927, -0.6362934708595276, -0.11332549154758453, 0.49871179461479187, 0.07327993959188461, -0.1357128769...
<ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="Border" Property="Background" Value="Transparent" />
[ 0.08881967514753342, -0.4395901560783386, 0.32580041885375977, 0.3048730492591858, 0.1101677268743515, -0.18363532423973083, 0.04101140424609184, -0.44642600417137146, -0.20413434505462646, -0.44463911652565, -0.13590508699417114, 0.31089144945144653, -0.3198990523815155, 0.063966281712055...
<Setter TargetName="Border" Property="BorderBrush" Value="Transparent" /> </Trigger> <Trigger Property="IsGrouping" Value="true">
[ -0.01933153346180916, -0.3130682110786438, 0.3628155589103699, -0.013186887837946415, 0.10250338912010193, -0.07327946275472641, 0.045963387936353683, -0.3561982214450836, -0.2972181439399719, -0.5838168859481812, -0.10635628551244736, 0.19921763241291046, -0.2649551033973694, -0.034842304...
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="ItemContainerStyle"> <Setter.Value>
[ 0.035863205790519714, -0.23380374908447266, 0.5875115990638733, 0.30187731981277466, -0.09478827565908432, 0.05253254249691963, 0.0019122138619422913, -0.7906835079193115, -0.15707343816757202, -0.2503105700016022, -0.220815509557724, 0.49356383085250854, -0.31122440099716187, 0.0655081644...
<Style TargetType="{x:Type ListBoxItem}" > <Setter Property="Margin" Value="2" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}">
[ 0.07204902917146683, -0.36575430631637573, 0.3595338463783264, -0.0077740768902003765, -0.1375463455915451, -0.09825167059898376, -0.16666902601718903, -0.5419026017189026, 0.18264473974704742, -0.5743324756622314, 0.09028594940900803, 0.37539806962013245, -0.14674565196037292, -0.05153542...
<Border Name="theBorder" Background="Transparent"> <RadioButton Focusable="False" IsHitTestVisible="False"
[ 0.15179826319217682, -0.01966916210949421, 0.6428110599517822, -0.03490845486521721, 0.3524904251098633, -0.4196733832359314, 0.5145770311355591, -0.30949971079826355, -0.14407172799110413, -0.40971383452415466, -0.42175790667533875, 0.5051321983337402, -0.21497206389904022, 0.177806362509...
IsChecked="{TemplateBinding IsSelected}"> <ContentPresenter /> </RadioButton> </Border>
[ 0.1769336462020874, -0.36211761832237244, 0.3428287208080292, -0.007427141070365906, 0.10230778157711029, -0.7794821262359619, 0.504432201385498, -0.2150665819644928, -0.1114165410399437, -0.6408897042274475, -0.3081284463405609, 0.23563094437122345, -0.37595707178115845, 0.184477403759956...
</ControlTemplate> </Setter.Value> </Setter> </Style> </Setter.Value> </Setter> </Style> ``` Which provides a ControlTemplate for, and styles, the ListBox and the Items. And it gets used like
[ 0.03170166164636612, -0.09242380410432816, 0.4038771986961365, 0.3921365737915039, -0.09995649755001068, -0.18719007074832916, -0.3656555414199829, -0.2607326805591583, -0.12317878752946854, -0.4275051951408386, -0.2895467281341553, 0.334433376789093, -0.5270103216171265, 0.025113316252827...
this: ``` <ListBox Grid.Column="1" Grid.Row="0" x:Name="TurnChargeBasedOnSelector" Background="Transparent" IsEnabled="{Binding Path=IsEditing}" Style="{StaticResource RadioButtonList}" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:MainForm}}, Path=DataContext.RampTurnsBas...
[ 0.17997653782367706, 0.09328775107860565, 0.6734568476676941, 0.0991891399025917, 0.3166419267654419, -0.32569557428359985, 0.33368614315986633, -0.510412871837616, -0.1756919026374817, -0.6107625365257263, -0.28029394149780273, 0.6318278312683105, 0.14060504734516144, 0.21982279419898987,...
In some Delphi 7 code I am maintaining, I've noticed a lot of instances of the following: ``` with ADOQuery1 do begin // .. fill out sql.text, etc try execSQL; except raise; end; end; ``` It seems to me that these try blocks could be removed, since they do nothing. However, I am wary of possible subt...
[ 0.10438330471515656, 0.39615389704704285, 0.266108900308609, -0.3430910110473633, -0.01813350059092045, -0.2753181755542755, 0.362496554851532, -0.42409417033195496, -0.024325964972376823, -0.39986369013786316, -0.29858720302581787, 0.5312953591346741, -0.3974187672138214, 0.02908017113804...
exception that the exception block just caught. raise is typically used to transfer control to the end of the block when no appropriate error handling is available. In the following we handle the custom exception, but any other exception should be handled elsewhere. ``` try someOperation; except on e: ECustomExcep...
[ 0.12905512750148773, 0.017987817525863647, 0.1726638376712799, -0.04909592121839523, -0.00980626605451107, -0.46299049258232117, 0.18819360435009003, -0.19982054829597473, -0.30164510011672974, -0.45731785893440247, -0.27958759665489197, 0.6098363995552063, -0.16358354687690735, -0.0304995...
as Rob // mentioned this can be omitted if you arent handling anything because // the compiler will simply jump you to the next block if there is no // else. LogUnexpectedException('some operation failed',e); raise; end; end; ``` Be careful that there is similar looking form wi...
[ 0.3743753135204315, 0.15078309178352356, -0.11307546496391296, -0.02095525525510311, 0.14071546494960785, -0.12324988096952438, 0.647153913974762, 0.07888638228178024, -0.350932240486145, -0.340564489364624, -0.38468408584594727, 0.4382595717906952, -0.29085758328437805, -0.289299786090850...
to positions with the competition. ``` with ADOQuery1 do begin // .. fill out sql.text, etc try execSQL; except // no handler so this just eats any "errors" end; ```
[ -0.03353612497448921, 0.21112103760242462, 0.4161207377910614, 0.02123197726905346, -0.19028930366039276, -0.020273251459002495, 0.04565024375915527, -0.19322875142097473, 0.23031233251094818, -0.5596708655357361, -0.14621683955192566, 0.5086323022842407, -0.3733031749725342, -0.1163472086...
How can I create an array of namespaces? And because it seems like a long shot, if this is impossible, is there something similar to a namespace that can be made into an array? The namespace, if it helps, contains these variables: ``` const int maxx=// depends on the particular namespace // I need an a...
[ 0.201304093003273, 0.026381539180874825, 0.3378943204879761, 0.18719914555549622, -0.09142497181892395, 0.18626180291175842, -0.03001326322555542, -0.3633222281932831, -0.29028570652008057, -0.3437531590461731, 0.16845567524433136, 0.47042158246040344, -0.16284576058387756, -0.022158363834...
class I made prgm sector[maxx][maxy]; // another array of prgms. int is my shorthand of saying "depends on // particular namespace", so is char. prgm programs[int]={prgm1(int,int,char),prgm2(int,int,char)... ``` So any help would be welcome. I am not sure what language you are talking about, but in many (most?) lang...
[ 0.15043576061725616, -0.14274978637695312, 0.35400816798210144, -0.047115277498960495, -0.096413753926754, 0.15091820061206818, 0.10709892958402634, -0.05354539677500725, -0.26032397150993347, -0.2726059854030609, 0.15748098492622375, 0.6521809101104736, -0.22885340452194214, 0.28424060344...
properties. But, as mentioned by others, you should really rethink your design. Finally, namespaces are usually not accessable via reflection because they just extend the class names of the contained classes (and other stuff). Or is there a (non-esoteric) language that exposes namespaces as entities via reflection? F...
[ 0.2804189920425415, 0.15607322752475739, 0.07576140016317368, 0.3624870777130127, -0.20961090922355652, -0.313553124666214, 0.32350918650627136, 0.018499648198485374, -0.3402320444583893, -0.6973673105239868, -0.27313724160194397, 0.2011362761259079, -0.16865625977516174, 0.364901214838027...
I may be doing something wrong, but I haven't been able to find a good way to build basic HTML/DOM structures, like lists, dynamically. Simple example would be building a table (table element, row, cells, with properly escaped text content) given input like json (objects). The problem I have is that most calls (like "...
[ -0.019053654745221138, 0.22957849502563477, 0.32997772097587585, -0.15115009248256683, -0.3319060504436493, -0.29970479011535645, 0.6861525177955627, -0.4000372290611267, -0.20206749439239502, -0.5495627522468567, -0.35296154022216797, 0.6290366053581238, -0.5561941862106323, 0.22177879512...
added, but it seems to be returning its own context. I know there is simple "appendText()" extension that helps with last part. But how about others? For what it's worth, right now I revert back to DOM, by something like ``` $("#divId")[0].appendChild(document.createElement("table")).... ``` but that's pretty ver...
[ 0.07019166648387909, 0.17362052202224731, 0.5566408038139343, -0.1559080332517624, -0.3770044445991516, -0.17861585319042206, 0.35417646169662476, 0.050606995820999146, -0.3113465905189514, -0.5986046195030212, -0.3357079327106476, 0.6281929612159729, -0.28851956129074097, 0.10118374973535...
can do this: ``` $("#divId").append("<table>").append("<tr>").append("<b>").text("some text"); ``` as either: ``` $("#divId").append("<table><tr><td><b>some test</b></td></tr></table>"); ``` or ``` $("<b></b>").text("some text").appendTo("<td></td>").appendTo("<tr></tr>").appendTo("<table></table>").appendTo("#d...
[ 0.08417673408985138, 0.05445549637079239, 0.43890565633773804, 0.07504206895828247, -0.2793394923210144, 0.23402228951454163, 0.2766404151916504, -0.6843079924583435, 0.3623558580875397, -0.7133704423904419, -0.35908499360084534, 0.7697254419326782, -0.3481854796409607, -0.1155585944652557...
Is this a simple process? I'm only writing a quick hacky UI for an internal tool. I don't want to spend an age on it. Here's a quick down and dirty app. Basically I created a Form with a button and a ListBox. On button click, the ListBox gets populated with the date of the next 20 days (had to use something just for ...
[ 0.5648784637451172, -0.1931839883327484, 0.5716775059700012, 0.020839421078562737, 0.2453775405883789, -0.1768808364868164, 0.15549881756305695, -0.22216796875, -0.1824970543384552, -0.68598872423172, 0.028980230912566185, 0.1326601356267929, -0.017801374197006226, 0.08880007266998291, -...
{ InitializeComponent(); this.listBox1.AllowDrop = true; } private void button1_Click(object sender, EventArgs e) { for (int i = 0; i <= 20; i++) {
[ 0.023025132715702057, -0.5856296420097351, 0.6775897145271301, -0.043360624462366104, 0.35645028948783875, 0.0009923913748934865, 0.427449494600296, -0.22659344971179962, -0.2352926880121231, -0.4543473720550537, -0.42487871646881104, 0.551500678062439, -0.4068646728992462, -0.015168276615...
this.listBox1.Items.Add(DateTime.Now.AddDays(i)); } } private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (this.listBox1.SelectedItem == null) return; this.listBox1.DoDragDrop(this.listBox1.SelectedItem, DragDropEffects.Move); } ...
[ 0.14097939431667328, -0.6652929782867432, 0.430154025554657, -0.05057738348841667, 0.22480112314224243, 0.09584159404039383, 0.251019150018692, -0.2578771710395813, -0.46615070104599, -0.43367043137550354, -0.4252743124961853, 0.465239942073822, -0.5659913420677185, 0.13999465107917786, ...
{ e.Effect = DragDropEffects.Move; } private void listBox1_DragDrop(object sender, DragEventArgs e) { Point point = listBox1.PointToClient(new Point(e.X, e.Y)); int index = this.listBox1.IndexFromPoint(point); if (index < 0) index = this.listBox1....
[ -0.11727043986320496, -0.545016348361969, 0.8755154013633728, -0.13622231781482697, -0.02169138565659523, 0.15800124406814575, 0.11629125475883484, -0.40044450759887695, -0.17362703382968903, -0.41771551966667175, -0.525443971157074, 0.3746676743030548, -0.7062545418739319, 0.1722514480352...
object data = e.Data.GetData(typeof(DateTime)); this.listBox1.Items.Remove(data); this.listBox1.Items.Insert(index, data); } ```
[ -0.0016436852747574449, -0.1568794548511505, 0.446891725063324, -0.1330886334180832, 0.2817872166633606, 0.010701853781938553, 0.18154028058052063, -0.1489267796278, -0.1536719799041748, -0.5101513862609863, -0.5425675511360168, 0.4214641749858856, -0.5710688233375549, 0.49713048338890076,...
I've taken the following steps so far: 1. Cloned a remote Git repo 2. Branched the master branch to an experimental 3. edited/tested/committed code in the experimental branch Now, I'm not ready to merge experimental into master. I do however want to push it back to the remote repo as that's the repository I share wit...
[ 0.6290446519851685, -0.11523869633674622, 0.13950464129447937, -0.26810014247894287, -0.2609517574310303, 0.17098313570022583, 0.08419536054134369, -0.12697650492191315, -0.30787020921707153, -0.5181461572647095, -0.007152904290705919, 0.32276225090026855, -0.1929529905319214, 0.3786140382...
git push origin experimental ``` Find a ref that matches `experimental` in the source repository (most likely, it would find `refs/heads/experimental`), and update the same ref (e.g. `refs/heads/experimental`) in origin repository with it. **If `experimental` did not exist remotely, it would be created**. This is...
[ 0.33324694633483887, -0.009311290457844734, 0.4032127261161804, -0.08799486607313156, -0.2970122694969177, -0.020379483699798584, -0.07490316033363342, -0.24299992620944977, 0.09596928209066391, -0.5596763491630554, -0.15449823439121246, 0.2879897654056549, -0.12956736981868744, 0.25905007...
in [git tip](http://reinh.com/blog/2008/04/18/git-push-just-the-tip.html), you can set up a "Branch’s Default Remote": > You can use git config to assign a default remote to a given branch. This default remote will be used to push that branch unless otherwise specified. > > > This is already done for you when you us...
[ 0.17967015504837036, -0.5170754790306091, 0.9668655395507812, -0.23090876638889313, 0.08017098158597946, -0.10825413465499878, -0.11844553053379059, -0.06758175790309906, -0.3920302391052246, -0.4172065556049347, -0.27963826060295105, 0.32709959149360657, -0.23276829719543457, 0.1768347024...
(or `push --set-upstream`) option: > For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands. That way, you don't have to do any git config. ``` git push -u origin experimental ```
[ 0.16832450032234192, -0.25909656286239624, 0.6019220352172852, 0.01520281471312046, 0.31571561098098755, 0.20672588050365448, -0.1713859587907791, -0.014174571260809898, -0.23015181720256805, -0.3548544645309448, -0.16158555448055267, 0.502167820930481, -0.1568775475025177, -0.068757377564...
I have been trying to us CALayers as "sprites" in an iPhone application I'm working on. From what I have been reading, that seems like the correct thing to do here. When I setup the layer inside a UIView class I am able to get the layer to show up on the screen: NSLog(@"GameView initWithCoder"); ``` NSString* imageP...
[ 0.110425665974617, -0.17745231091976166, 0.588534414768219, -0.03234191983938217, -0.10735753923654556, -0.003975041676312685, 0.23977403342723846, -0.26118749380111694, -0.050438836216926575, -0.8192994594573975, -0.2124774158000946, 0.6524163484573364, -0.1282174289226532, 0.228449493646...
componentsSeparatedByString:@"."]; imageName = [[fileNameParts objectAtIndex:0] retain]; NSString* ext = [fileNameParts objectAtIndex:1]; NSString* imagePath = [[NSBundle mainBundle] pathForResource:imageName ofType:ext]; image = [[UIImage alloc] initWithContentsOfFile:imagePath]; layer = [CALayer layer]; ...
[ 0.09624875336885452, -0.13062019646167755, 0.6006341576576233, 0.1614353209733963, 0.04181784763932228, 0.1552962362766266, 0.24544188380241394, -0.3978714644908905, -0.08491972833871841, -0.45138949155807495, -0.16383244097232819, 0.8126104474067688, -0.28757184743881226, 0.05989512801170...
they really don't seem to talk about how to initialize a CALayer other than in passing. I just need a gentle nudge in the correct direction. I have been getting a pretty good understanding about everything else I have learned when it comes to programming the iPhone. I'm just having some issues with Graphics, Layers an...
[ 0.2976249158382416, 0.22995923459529877, 0.37220409512519836, -0.000057307752285851166, 0.4050004780292511, 0.07061348855495453, -0.05665389820933342, 0.23265500366687775, 0.08608398586511612, -0.45062971115112305, -0.05666991323232651, 0.646059513092041, -0.030019672587513924, 0.161406964...
we explicitly take ownership of this layer ``` Also, don't forget to release the layer since you own it now: ``` // in your dealloc method [layer release]; ``` You should review the [Memory Management Programming Guide for Cocoa](http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html)...
[ 0.42356035113334656, 0.43175825476646423, 0.30295348167419434, -0.006561629939824343, 0.07917319238185883, -0.6505868434906006, -0.04425757750868797, -0.04466122016310692, -0.41632309556007385, -0.492024302482605, -0.4107822775840759, 0.4391867518424988, 0.16192637383937836, 0.004283518064...
I'm having a problem with an Emacs lisp package that I pulled down from the ubuntu distribution. The package is JDEE, and it complains of `Args out of range: "63", 0, 4` in the mini buffer and the `*Messages*` buffer whenever I open a file. This bug appears to have been reported last September but no action has been ta...
[ -0.05101162567734718, 0.4247581660747528, 0.26386672258377075, -0.3141660988330841, -0.07700172811746597, -0.1767074018716812, 0.45645225048065186, 0.49158942699432373, -0.13674506545066833, -0.5970960259437561, -0.1615527868270874, 0.35908958315849304, -0.3866153061389923, 0.3312318027019...
idea of where the problem is coming from. I've read section 18.1.1 of the Elisp manual on "Entering the debugger on error" but trying to load the file after playing with various combinations of values for `debug-on-error`, `debug-ignored-errors`, and `debug-on-signal` appears to have no effect. Has anybody got any sugg...
[ -0.05162405967712402, 0.317970335483551, 0.36632299423217773, -0.038636788725852966, 0.1944432556629181, 0.05520894378423691, 0.4460430443286896, -0.1429634988307953, -0.2543192207813263, -0.6775050759315491, -0.18183058500289917, 0.8618325591087341, -0.20573186874389648, 0.137760177254676...
the program. At that point, you can see which portion causes an error - and drill down that way. You can also try setting the variable `'stack-trace-on-error` to see if you can find the culprit (though `'debug-on-error` usually works for me, not sure why it doesn't for you). As a last resort (if `edebug-defun` doesn'...
[ 0.3592716157436371, -0.012210407294332981, -0.02462911605834961, 0.13399748504161835, 0.17928950488567352, -0.2462180256843567, 0.4391152262687683, -0.14877337217330933, -0.04938743636012077, -0.39754149317741394, -0.27810534834861755, 0.8949035406112671, -0.46550410985946655, 0.0134664205...
I run unsuccessfully ``` curl $Masi@host:~/folder curl: (6) Couldn't resolve host 'host:~' ``` I have SSH-keys to the host. I am trying to use curl similarly as scp. **How can you use curl to download private data fast?** curl is an HTTP client - you cannot use it as a SSH client. What's wrong with SCP?
[ -0.05499245226383209, -0.01991821452975273, 0.44075074791908264, 0.19372069835662842, -0.21644264459609985, -0.39334410429000854, 0.3616296052932739, 0.17901679873466492, -0.2111137956380844, -0.7625027894973755, -0.0408901609480381, 0.19449102878570557, -0.3807942569255829, 0.178985461592...
I want to use JavaScript to restrict input on a text box to currency number formatting. For example: ``` <input type="text" value="2,500.00" name="rate" /> ``` As given above, the text box should accept only numbers, commas and a period. But, after the period it should accept two digits after numbers. How do I ac...
[ 0.14082390069961548, 0.3754225969314575, 0.3994765877723694, -0.25222599506378174, 0.004176631569862366, 0.16474011540412903, -0.2574611008167267, -0.1847873330116272, -0.07771697640419006, -0.25197574496269226, -0.24067731201648712, 0.29082784056663513, -0.4937061071395874, 0.464158475399...
Below is a block of code that runs in a separate thread from my app's main thread. How do I get the UI to update after each button gets its thumbnail? Right now it doesn't update until the whole method finishes. The buttons are already added to a UIScrollView. (LotsGridButton is just a UIButton with some extra propert...
[ 0.14597803354263306, -0.04992726072669029, 1.101459264755249, -0.1349213719367981, -0.118669293820858, 0.14489898085594177, -0.03776475042104721, -0.4381576478481293, -0.28464069962501526, -0.891437292098999, 0.15627135336399078, 0.4023786783218384, -0.35039660334587097, 0.1345187723636627...
if (button.lot.thumbnail) continue; // load the thumbnail image from the server button.lot.thumbnail = [server imageWithPath:button.lot.thumbnailURL]; [button setImage:button.lot.thumbnail forState:UIControlStateNormal]; } [server release]; } ``` In place of `setImage:forState:`, take a...
[ -0.23401696979999542, -0.15560604631900787, 0.9308546781539917, -0.241798996925354, 0.14267325401306152, -0.03677154704928398, 0.2983928918838501, -0.23647865653038025, -0.19710713624954224, -0.6725860834121704, -0.47621291875839233, 0.710898756980896, -0.03863568976521492, 0.0840896219015...
I need to find the encoding of all files that are placed in a directory. Is there a way to find the encoding used? The [`file`](https://linux.die.net/man/1/file) command is not able to do this. The encoding that is of interest to me is [ISO 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1). If the encoding is any...
[ 0.26585453748703003, 0.3512161076068878, -0.10234958678483963, 0.10337820649147034, 0.12731629610061646, 0.10903942584991455, 0.15378046035766602, 0.05141220986843109, -0.0904635563492775, -0.9754965305328369, -0.24930091202259064, 0.3486277163028717, -0.22882215678691864, 0.21942868828773...
encoding. I found a [man-page](http://linux.die.net/man/1/file) for it, too :)
[ 0.31968954205513, 0.08437242358922958, -0.08400926738977432, 0.15496863424777985, 0.16301792860031128, 0.08912854641675949, -0.0676443949341774, -0.03832162544131279, -0.2527289092540741, -0.8761914372444153, -0.26772770285606384, 0.4980641007423401, -0.24055185914039612, -0.11301846802234...
How do I protect the dlls of my project in such a way that they cannot be referenced and used by other people? Thanks The short answer is that beyond the obvious things, there is not much you can do. The obvious things that you might want to consider (roughly in order of increasing difficulty and decreasing plausibil...
[ 0.6660187244415283, -0.01703334040939808, 0.1440368890762329, 0.2757206857204437, -0.17632359266281128, -0.28965622186660767, 0.444307804107666, 0.10219284892082214, -0.17053943872451782, -0.5794516801834106, -0.14856921136379242, 0.6174013018608093, -0.18627946078777313, 0.019735958427190...
(under a suitably obscure name, perhaps even generated at run time) only when running. * Hide all real functions behind a factory method that exchanges a secret (better, proof of knowledge of a secret) for a table of function pointers to the real methods. * Use anti-debugging techniques borrowed from the malware world ...
[ 0.49394553899765015, -0.0018316397909075022, 0.019066980108618736, 0.37334689497947693, -0.11574935913085938, -0.19202755391597748, 0.5153135657310486, 0.11092142015695572, -0.3118785619735718, -0.6262763738632202, -0.428835928440094, 0.5405444502830505, -0.1453865021467209, 0.072564944624...
yet a CLR Assembly, then there is a huge amount of runtime type information that you can't strip off without breaking its intended use. **EDIT:** Since you've retagged to imply that C# and .NET are the environment rather than a pure Win32 DLL written in C, then I really should revise the above to "You Can't, But..." ...
[ 0.46643275022506714, 0.1858729124069214, 0.4206274747848511, 0.01960444636642933, -0.00953544769436121, -0.5295082926750183, 0.00654854578897357, 0.044741109013557434, -0.19637620449066162, -0.28943511843681335, -0.2996770739555359, 0.7924671173095703, -0.312318354845047, 0.003669584169983...
at least one has chimed in. Because loading an Assembly requires so much effort from the framework, it is likely that there are permission bits that exert some control for honest providers and consumers of Assemblies. I have not seen any discussion of the real security provided by these methods and simply don't know h...
[ 0.9080511331558228, 0.041880086064338684, -0.19401730597019196, 0.1545419842004776, -0.008484318852424622, 0.11459357291460037, 0.17621704936027527, -0.09954816848039627, -0.42061907052993774, -0.25899189710617065, -0.14455905556678772, 0.42894020676612854, 0.050144731998443604, -0.1422641...
reuse, you may not be so happy.
[ 0.13690538704395294, 0.20069997012615204, -0.04151040315628052, 0.045376915484666824, -0.11279476433992386, 0.2598617970943451, 0.5011940598487854, 0.2764577269554138, -0.28557419776916504, -0.6799493432044983, 0.117149718105793, 0.5342254638671875, 0.04962502047419548, 0.280374139547348, ...
I'm implementing a client consuming a webservice. I want to reduce dependencies and decided to mock the webservice. I use [mockito](http://code.google.com/p/mockito/), it has the advantage vs. EasyMock to be able to mock classes, not just interfaces. But that's not the point. In my test, I've got this code: ``` //...
[ 0.054349515587091446, 0.3504355549812317, 0.9025034308433533, -0.23414914309978485, 0.08178700506687164, 0.5332656502723694, 0.35791388154029846, -0.39936840534210205, -0.13970105350017548, -0.6146191954612732, -0.44455647468566895, 0.5963344573974609, -0.4014049470424652, -0.0608040727674...
.getInstance(); LocationBean locationBean = geoLocationFetcher .extractGeoLocationFromXml(mDocument); // verify their behavior verify(mDocument).getRootElement(); verify(mRootElement).getChild("geoname"); verify(mGeonameElement).getChild("lat"); verify(mGeonameElement).getChild("lon"); verify(mLatElement).getText(...
[ 0.18318608403205872, 0.27682220935821533, 0.6580042243003845, 0.09589438140392303, -0.09180872142314911, 0.22913621366024017, 0.5462614893913269, -0.1895475685596466, -0.15948843955993652, -0.5580248236656189, -0.13466928899288177, 0.5673470497131348, -0.26979559659957886, 0.07226825505495...
be using the result. In your example code above you seem to be mocking mDocument but you really want to pass in an instance of mDocument that has been returned from a mocked instance of your webservice and assert that the locationBean returned from the geoLocationFetcher matches the value of A\_LOCATION\_BEAN.
[ 0.3062995672225952, 0.07936498522758484, 0.17749565839767456, 0.17660169303417206, 0.058325424790382385, -0.36302196979522705, 0.02611592784523964, 0.16736134886741638, -0.02086039073765278, -0.45070064067840576, -0.041479822248220444, 0.5651910305023193, -0.12568943202495575, 0.1171399280...
I get the following in including [MacPorts' Bash tab completion](https://stackoverflow.com/questions/764476/unable-to-make-a-tab-completion-file-for-macports-in-bash) to Zsh ``` /opt/local/etc/bash_completion:[:48: unrecognized condition: `2' [ -- cut -- ] /opt/local/etc/bash_completion:[:62: unrecognized condition: `...
[ -0.32662901282310486, 0.2400643527507782, 0.6117300391197205, -0.14141233265399933, 0.016560744494199753, -0.024676702916622162, 0.33554336428642273, -0.4218986928462982, -0.3437730669975281, -0.5772395133972168, -0.2550152838230133, 0.6474419236183167, -0.06543528288602829, 0.118177585303...
Anyone have any links or resource regarding writing a proper C++ FastCGI application? (on top of Apache using mod\_fastcgi or mod\_fcgid). The obvious one would be the [FastCGI Development Kit](http://www.fastcgi.com/drupal/node/5) (for C/C++).
[ 0.2140117585659027, -0.25941002368927, 0.11869746446609497, 0.2202364057302475, -0.1934407353401184, -0.4575069546699524, -0.08702462166547775, 0.3614814579486847, -0.3776068687438965, -0.43360635638237, -0.13216345012187958, 0.4178920090198517, -0.193635955452919, -0.3146348297595978, -...
I've searched the web and I can't seem to find anything that will work for me. I've seen plenty of discussion, and even some fairly extensible open-source tools, for code editors that provide line numbers and syntax highlighting. Here's my dilemma... I'm working on a "digital code review" project in C#.NET that allow...
[ 0.6183761954307556, 0.4190661311149597, 0.01670846901834011, 0.08651456981897354, 0.17615725100040436, -0.30250492691993713, 0.15584667026996613, -0.06700269132852554, -0.0708542987704277, -0.614391028881073, -0.2104284018278122, 0.7311983108520508, -0.03737833723425865, -0.144342496991157...
able to select a line (or multiple lines), to make line references. It seems to me that I need some fancy implementation of a ListBox control (not a drop-down list) that has some OwnerDraw capabilities to add line numbers and syntax highlighting. Unfortunately, I haven't had any luck putting it together myself, and I ...
[ -0.009625284001231194, -0.3125689923763275, 0.39398518204689026, 0.29943662881851196, -0.10113590955734253, 0.15712657570838928, -0.06910810619592667, 0.19183658063411713, -0.22040532529354095, -0.6862029433250427, -0.13154013454914093, 0.16894632577896118, -0.34503665566444397, 0.02685377...
I've created a new View-based Application in XCode. In the ViewController, the only code that I've modified looks like this: ``` - (void)viewDidLoad { [super viewDidLoad]; UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; newView.backgroundColor = [UIColor redColor]; [self.view addSubview:...
[ 0.2390846461057663, -0.08882542699575424, 0.7013765573501587, -0.18614526093006134, -0.24576738476753235, 0.2538321912288666, 0.33413365483283997, -0.5131030082702637, -0.09977259486913681, -0.7722793221473694, 0.11195108294487, 0.32102978229522705, -0.351313978433609, 0.2058672308921814, ...
material. I've already gone through all of Apple's stuff. Your code would animate as expected if you were setting properties on a CALayer (they animate by default). For UIViews to animate, you must change their properties within a block like the following: ``` [UIView beginAnimations:nil context:NULL]; [UIView setAnim...
[ 0.47685474157333374, -0.023257587105035782, 0.13242369890213013, 0.2446405589580536, -0.1273386925458908, -0.010814135894179344, -0.004085235297679901, -0.1461191177368164, -0.14691612124443054, -0.9640038013458252, -0.1927374303340912, 0.5204210877418518, -0.14254644513130188, 0.288971185...
How would I create an class that records the users interactions with the desktop. and it should convert it to a video format such as wmv file? If you want to calculate the offset of a time zone such as America/Vancouver from UTC you can do it as follows: ``` SELECT (unix_timestamp() - unix_timestamp(convert_tz(now()...
[ 0.5266297459602356, -0.2724309265613556, 0.8042735457420349, 0.37465089559555054, 0.1945095956325531, -0.06110720336437225, -0.1287945657968521, 0.04911576956510544, -0.237986221909523, -0.7349132299423218, 0.09986350685358047, 0.47622770071029663, -0.11314627528190613, 0.01035033725202083...
Is there a simple way to define a master template for my whole rails application? If not, what's the best way to reuse my templates so that I'm not copy and pasting the same template into a bunch of layout files? You can name it **application.html.erb** and Rails will use it for the whole app. More info at [rails guide...
[ 0.5336100459098816, -0.07855459302663803, 0.0840199664235115, 0.22146032750606537, 0.041974760591983795, -0.06018596515059471, 0.5451053380966187, -0.10112130641937256, -0.1725880354642868, -0.5113672614097595, 0.2804325222969055, 0.5953487157821655, -0.12054033577442169, 0.137157008051872...
What are the options for something that will let users make text bold/italic/underline/etc as they are writing in a textarea and work in all browsers? Give a look to [FKCEditor](http://www.fckeditor.net/), I always recommend it...
[ 0.06745588779449463, -0.2441597878932953, 0.38321346044540405, 0.10235913097858429, -0.12904177606105804, -0.3034617304801941, 0.04384613037109375, 0.16152530908584595, -0.13221508264541626, -0.3568853437900543, 0.39981698989868164, 0.1286788135766983, -0.2556686997413635, -0.2137128263711...
In one of my django views I query database using plain sql (not orm) and return results. ``` sql = "select * from foo_bar" cursor = connection.cursor() cursor.execute(sql) rows = cursor.fetchall() ``` I am getting the data fine, but not the column names. How can I get the field names of the result set that is retur...
[ 0.1162116676568985, 0.4607003927230835, 0.4159766733646393, -0.34052345156669617, -0.31783008575439453, -0.1844750940799713, 0.08373600244522095, -0.3394335210323334, -0.32996392250061035, -0.3422592282295227, 0.09745445102453232, 0.609235942363739, -0.4554688632488251, -0.0233571510761976...
I'm using ASP.NET user controls. I'm passing values to another user control via command arguments through a link button as follows: asp: ``` LinkButton ID="ZoomPhotoLinkButton" CommandArgument='<%#(Eval("conid"))%>' CommandName="PassItemId" runat="server">Zoom It</asp:LinkButton> ``` What I really want is to make ...
[ 0.23569507896900177, -0.019375214353203773, 0.7290223836898804, -0.19043536484241486, -0.16015438735485077, -0.08134981989860535, 0.09862453490495682, -0.16371020674705505, -0.29724350571632385, -0.6769477725028992, 0.08572879433631897, 0.3917880654335022, -0.4254555106163025, -0.039467301...
my "table code"): ``` [td] onclick="window.location='<%# FormatDetailPageUrl((object)Eval("conid"))%>'" style='cursor:pointer;text-align: center; border:0px;'[/td] ``` I'm trying to do something functionally equivalent in terms of the click on the table cell, except to invoke the appropriate CommandName and CommandA...
[ -0.10650794953107834, 0.2441747784614563, 0.578441858291626, -0.13936705887317657, -0.0807177796959877, -0.08808941394090652, 0.18554630875587463, -0.1343986690044403, -0.13717426359653473, -0.7132312059402466, -0.1797630488872528, 0.5807958245277405, -0.17565710842609406, -0.1270684450864...
Could I please get a explanation of why this code produces the result it does? And a way to fix it/work around it, if possible. I dont want div 'z' and 'q' to go over 'the blue div border' on the right. Or I would like div 'x' to be consitant with 'z' and 'q' and also go over the blue right border as well. ``` <di...
[ -0.28721657395362854, 0.1069217324256897, 0.43483760952949524, 0.07684548199176788, -0.07533859461545944, 0.1105908676981926, 0.06064534932374954, -0.27170529961586, 0.09595483541488647, -0.5782156586647034, -0.26324498653411865, 0.3532911539077759, -0.09764720499515533, -0.081451922655105...
<div style='margin: 0px; margin-bottom: 0px;width: 300px;border: red 1px solid;float: left;'>y</div> <div style='margin: 0px; margin-bottom: 0px;width: 300px;border: red 1px solid;float: right;'>x</div> </div> <div style='margin: 0px; margin-bottom: 5px;width: 100%;border: red 1px solid;/*float: le...
[ 0.026986638084053993, -0.1507846564054489, 0.7749241590499878, 0.07600715756416321, -0.18495959043502808, 0.22426621615886688, 0.2198171764612198, -0.3550715148448944, -0.09115491807460785, -0.6877477169036865, -0.15490274131298065, 0.3018788993358612, -0.13820627331733704, 0.0434139706194...
inner div to container.width -2. Also, try removing the *width: 100%;* from the div's.
[ -0.0702149048447609, -0.12855373322963715, 0.5329721570014954, -0.06605524569749832, 0.03216978907585144, 0.02186267077922821, -0.19203676283359528, -0.1500997096300125, 0.034111808985471725, -0.8470507264137268, -0.2667032480239868, 0.5201738476753235, 0.016743041574954987, 0.231795802712...
I am writing a C++ app on FastCGI using libfcgi++. When I do a POST or GET request, is there a library out there that would parse the different fields? For example for a GET /fastcgi.fcgi?var1=data1&var2=data2 would return something that's easier to access var1 and var2? Same for a multipart POST request. Looks lik...
[ 0.023894064128398895, -0.13115517795085907, 0.25652843713760376, -0.0034826251212507486, -0.1058594137430191, -0.07010215520858765, 0.19707642495632172, -0.052908942103385925, -0.17382916808128357, -0.6582561135292053, -0.03836594149470329, 0.35908108949661255, -0.4999430477619171, -0.1835...