text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
flag that you set durign these operations (I use a class together with a RAII-Lock for that, so I don't forget to reset it)
[ 0.37372782826423645, -0.08897092938423157, 0.3290018141269684, 0.20891720056533813, 0.1174105778336525, -0.2218383252620697, 0.30865588784217834, -0.04371607303619385, -0.32289302349090576, -0.8070140480995178, 0.06333347409963608, 0.6985771656036377, -0.1868210732936859, -0.56179088354110...
This is what I have written: ``` if ((lstProperty[i].PropertyIdentifier as string).CompareTo("Name") == 0) ``` Resharper put me an error (I am new with ReSharper... I am trying it) and it suggests me : ``` if (((string) lstProperty[i].PropertyIdentifier).CompareTo("Name") == 0) ``` Why is the second is NullExce...
[ -0.10061505436897278, 0.005727390758693218, 0.09650067985057831, -0.3240875005722046, -0.04605517163872719, -0.02521132305264473, 0.3779831826686859, -0.48026129603385925, 0.02560180239379406, -0.6553758382797241, -0.12066364288330078, 0.5676930546760559, -0.29787781834602356, 0.2195143997...
complain about this, and you also won't get a NullReferenceException if the PropertyIdentifier is null or not a string.
[ 0.48091375827789307, 0.15592792630195618, 0.1515863984823227, 0.32965314388275146, -0.19634750485420227, -0.46620112657546997, 0.3449952006340027, 0.21100091934204102, -0.3882315456867218, -0.4254562258720398, 0.0014849667204543948, 0.3857986330986023, -0.14825905859470367, 0.4265778064727...
I am trying to use WScript.Shell SendKeys method to emulate sending a key press from the Number Pad. I have an application that I am writing automated testing for using QTP. It is a Web Browser based application and the input is into a Java App within the web page. The input only accepts key presses from the Number Pa...
[ 0.4685521423816681, 0.07454642653465271, 0.43593016266822815, -0.2483769953250885, -0.36198359727859497, 0.021118393167853355, 0.2654187083244324, -0.26980942487716675, 0.11823803931474686, -0.574699342250824, 0.008465844206511974, 0.664229154586792, -0.2691337764263153, 0.0610978491604328...
Keys. Any help would be greatly appreciated. I am not sure if there are any undocumented ways of achieving this. I have read <http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx> but it doesn't go into great detail. I would choose PowerShell over WMI for the following reasons: 1. Writing a cmdlet is only add...
[ 0.04088804870843887, 0.03130370005965233, 0.4986201524734497, 0.3931140601634979, 0.048290643841028214, -0.36080846190452576, 0.14474518597126007, -0.1279919147491455, -0.2050076127052307, -0.7086412906646729, -0.08436113595962524, 0.7282969951629639, -0.37673863768577576, 0.04446281492710...
your application to be done more efficiently. 5. Discoverability. PowerShell, via Get-Command, Get-Member, and Get-Help, provides an extremely discoverable environment for admins to work in, resulting in a shorter learning curve to maintaining your application. Even if you go the WMI route, PowerShell does have suppor...
[ 0.2955492436885834, -0.03989645093679428, 0.4141749143600464, 0.4484981596469879, 0.27000558376312256, -0.47644713521003723, 0.21759024262428284, 0.06845857203006744, -0.24580040574073792, -1.0442801713943481, -0.22948862612247467, 0.7085587978363037, 0.18691346049308777, -0.00325726484879...
I'm pushing all the vendors I work with towards surfacing a PowerShell management API, as this makes the learning curve and context switching for managing applications much lower. On the development side, I have written (and am still working on) a series of PowerShell cmdlets for one open source product I work with and...
[ 0.2254558801651001, 0.2925208806991577, 0.05162259191274643, 0.11553709208965302, 0.16406172513961792, -0.11032679677009583, -0.15955881774425507, -0.09234187006950378, -0.09020047634840012, -0.731981098651886, -0.021554572507739067, 0.5578950643539429, -0.04543629288673401, -0.05131223052...
I think many developers know that uncomfortable feeling when users tell them that *"The application is slow (again)."* In a complex web application there can be **many possible reasons** for a degradation in (perceived) performance: slow database response, bandwidth issues, bad caching etc. There certainly are issues ...
[ 0.2243378907442093, 0.19284865260124207, 0.19100762903690338, 0.1810898780822754, 0.12934182584285736, -0.11685582250356674, 0.3420743942260742, 0.04348873719573021, -0.3766931891441345, -0.8537535071372986, -0.11146188527345657, 0.3903147876262665, -0.012914764694869518, 0.057611197233200...
of open database connections / database calls * ... The primary goal is to see at a glance (or after looking closer) what problem is causing the performance problems. I think the category of software you're looking for is ".net profiler" or ".net tracer". One such tool that you might consider is JetBrains' [dotTrace](...
[ 0.3320355713367462, 0.0457581952214241, 0.4566468894481659, 0.21548093855381012, 0.40625375509262085, -0.5478630065917969, -0.11399053782224655, -0.08357172459363937, -0.2737281620502472, -0.6902981400489807, 0.009098106063902378, 0.48918843269348145, -0.4902576804161072, -0.21834708750247...
My app has a DataGridView object and a List of type MousePos. MousePos is a custom class that holds mouse X,Y coordinates (of type "Point") and a running count of this position. I have a thread (System.Timers.Timer) that raises an event once every second, checks the mouse position, adds and/or updates the count of the ...
[ 0.25029414892196655, 0.03470468521118164, 0.7635344862937927, 0.1606440246105194, 0.14682801067829132, 0.15401233732700348, 0.1924416720867157, 0.058014195412397385, -0.23282338678836823, -0.816122829914093, 0.20977963507175446, 0.6076647043228149, -0.14265324175357819, -0.0050485404208302...
screen update. (like TaskManager does.) Unfortunately, calling the DataGridView.Refresh() method results in VS2005 stopping execution and noting that I've run into a cross-threading situation. If I'm understanding correctly, I have 3 threads now: * Primary UI thread * MousePos List thread (Timer) * DataGridView Refr...
[ 0.08036959916353226, -0.280854195356369, 1.004549264907837, -0.23914951086044312, -0.39737942814826965, -0.0539737194776535, 0.7318387627601624, -0.06099662557244301, -0.4236159026622772, -1.0121678113937378, 0.3615913987159729, 0.7224688529968262, -0.21680285036563873, 0.27554988861083984...
only thru the button (which gets handled on the primary thread.) --- So this question has turned into a two-parter: 1. Is setting DataGridView.DataSource to null and back to my List an acceptable way to refresh the datagrid? (It seems inefficient to me...) 2. How do I safely do this in a multi-threaded environment? ...
[ 0.12442761659622192, -0.04534224048256874, 0.6848911046981812, -0.32860472798347473, 0.06161670386791229, -0.06368613988161087, 0.48044589161872864, -0.5498180389404297, -0.10136780142784119, -0.7653487324714661, -0.07805246114730835, 0.6267136931419373, -0.258291095495224, -0.017476545646...
{ InitializeComponent(); mousePositionList.Add(new MousePos()); // ANSWER! Must have at least 1 entry before binding to DataSource dataGridView1.DataSource = mousePositionList; mouseCheck.Elapsed += new System.Timers.ElapsedEventHandler(mouseCheck_Elapsed); mouseCheck.Start(); ...
[ -0.35373640060424805, -0.11459022760391235, 0.8098761439323425, -0.36359140276908875, 0.3268752098083496, 0.2005467414855957, 0.3212243318557739, -0.7472990155220032, -0.2726205289363861, -0.3872230648994446, -0.38168802857398987, 0.5903616547584534, -0.3809998631477356, 0.0961393937468528...
Point mPnt = Control.MousePosition; MousePos mPos = mousePositionList.Find(ByPoint(mPnt)); if (mPos == null) { mousePositionList.Add(new MousePos(mPnt)); } else { mPos.Count++; } } public void refreshWindow_Elapsed(object source, EventArgs e) { //dataGridView1.DataSource = n...
[ -0.3352092504501343, -0.3273391127586365, 0.8170120716094971, -0.2740994691848755, 0.07119742035865784, 0.19525933265686035, 0.3147214949131012, -0.5654357075691223, -0.22485250234603882, -0.4593360126018524, -0.2550669014453888, 0.5073884725570679, -0.22794783115386963, 0.0677989050745964...
// Old way dataGridView1.Invalidate(); // <= ANSWER!! } private static Predicate<MousePos> ByPoint(Point pnt) { return delegate(MousePos mPos) { return (mPos.Pnt == pnt); }; } } public class MousePos { private Point position = new Point(); private int count...
[ -0.08169818669557571, -0.2532024085521698, 0.5076777935028076, 0.013813705183565617, 0.23224280774593353, 0.2251470685005188, 0.21373414993286133, -0.5377320051193237, -0.41180306673049927, -0.5367880463600159, -0.38613998889923096, 0.14558061957359314, -0.4407622218132019, 0.0719492435455...
position; } } public int X { get { return position.X; } set { position.X = value; } } public int Y { get { return position.Y; } set { position.Y = value; } } public int Count { get { return count; } set { count = value; } } public MousePos() { } public MousePos(Point mouse) { position = mouse; } } ...
[ -0.37546131014823914, -0.17033205926418304, 0.5454084873199463, -0.16465511918067932, 0.310507208108902, 0.2766040861606598, -0.033932365477085114, -0.3009577691555023, -0.019394321367144585, -0.491425484418869, -0.3795579969882965, 0.5699063539505005, -0.2485377937555313, -0.1495253145694...
C#" I had originally thought that **Refresh()** wasn't doing anything and that I needed to call the **Invalidate()** method, to tell Windows to repaint my control at it's leisure. (which is usually right away, but if you need a guarantee to repaint it *now*, then follow up with an immediate call to the Update() method...
[ 0.056603603065013885, 0.10501514375209808, 0.7405514717102051, 0.04240068793296814, 0.3871873915195465, -0.07153848558664322, 0.4050943851470947, -0.042750805616378784, -0.09547076374292374, -0.44965991377830505, -0.4271389842033386, 0.8165162801742554, -0.35355979204177856, 0.263487040996...
this was that if there was no data in the dataGridView, no amount of invalidating would refresh the control. I had to reassign the datasource. Then it worked fine after that. But only for the amount of rows (or items in my list) -- If new items were added, the dataGridView would be unaware that there were more rows to ...
[ -0.11126389354467392, 0.11750997602939606, 0.6471052169799805, 0.10284927487373352, -0.22944408655166626, 0.10160516202449799, 0.21846367418766022, -0.2499247044324875, -0.5110815167427063, -0.4696618616580963, 0.25984618067741394, 0.43772533535957336, -0.1340683400630951, 0.30432826280593...
This is why re-binding the datasource repeatedly was working before. Now to figure out how to update the number of rows to display in dataGridView without having to re-bind the datasource... fun, fun, fun! :-) --- After doing some digging, I think I have my answer to **part #2** of my question (aka. safe Multi-threa...
[ -0.0032145166769623756, 0.020778119564056396, 0.6642155647277832, -0.051128823310136795, -0.13744884729385376, -0.1811136156320572, 0.11563462018966675, -0.34214338660240173, -0.49821263551712036, -0.33536452054977417, -0.08307329565286636, 0.7794363498687744, -0.32495635747909546, 0.17186...
the method is like this: ``` private void refreshWindow2_Tick(object sender, EventArgs e) { dataGridView1.Invalidate(); } ```
[ 0.0225304514169693, -0.3369101285934448, 0.3886736035346985, -0.08884075284004211, -0.14831748604774475, -0.04903417080640793, 0.27954867482185364, -0.16611534357070923, -0.16566349565982819, -0.3684995472431183, 0.010036145336925983, 0.6026168465614319, -0.3626171052455902, 0.486424118280...
I'm using <http://urlrewriter.net/> to rewrite urls at my website. For example, I'm rewriting: > <http://www.example.com/schedule.aspx?state=ca> to > <http://www.example.com/california.aspx> What I'm trying to do (for SEO purposes) to to dynamically add the meta tag: ``` <meta name="robots" content="noindex,follow...
[ 0.4716333746910095, 0.1878347396850586, 0.59066241979599, -0.05656682327389717, 0.13501229882240295, -0.1307329535484314, 0.32782071828842163, -0.29060831665992737, -0.3641550540924072, -0.7332532405853271, 0.3037630021572113, 0.6414095759391785, -0.30428093671798706, -0.014484378509223461...
I know if the page has been rewritten? personally, I would 301 redirect from the un-rewritten one to the re-written one, and only use the single copy of the page. It is easier for users, and from an SEO perspective, you have 1 copy of the content.
[ 0.4199388027191162, 0.3639569580554962, 0.31452929973602295, -0.0536305196583271, -0.2672184705734253, -0.2607230246067047, 0.5915493369102478, -0.16792169213294983, -0.09290902316570282, -0.5662106871604919, -0.10906831175088882, 0.1824168860912323, -0.0571017861366272, -0.244906350970268...
I have an incoming soap message wich form is TStream (Delphi7), server that send this soap is in development mode and adds a html header to the message for debugging purposes. Now i need to cut out the html header part from it before i can pass it to soap converter. It starts from the beginning with 'pre' tag and ends ...
[ 0.37753546237945557, 0.10197658836841583, 0.5739572048187256, -0.2077099084854126, -0.49701279401779175, 0.12421531230211258, 0.37903162837028503, -0.1615394502878189, 0.03146222233772278, -1.1020593643188477, 0.19937068223953247, 0.3126278817653656, -0.01763729564845562, 0.129913747310638...
block in your document. ``` function DepreStream(Stm : tStream):tStream; var sTemp : String; oStrStm : tStringStream; i : integer; begin oStrStm := tStringStream.create(''); try Stm.Seek(0,soFromBeginning); oStrStm.copyfrom(Stm,Stm.Size); sTemp := oStrStm.DataString; if (Pos('<pre>',sTemp) > ...
[ -0.04548865929245949, -0.14304031431674957, 0.8124682903289795, 0.014329975470900536, 0.1589353084564209, -0.03398500010371208, 0.614226222038269, -0.423555850982666, -0.09878656268119812, -0.5926953554153442, -0.7335087060928345, 0.18234609067440033, -0.3165266215801239, 0.127808064222335...
Result.CopyFrom(oStrStm,oStrStm.Size); Result.Seek(0,soFromBeginning); finally oStrStm.free; end; end; ``` Another option I believe would be to use an xml transform to remove the unwanted tags, but I don't do much in the way of transforms so if anyone else wants that torch... **EDIT:** Corrected code so ...
[ 0.37077242136001587, -0.07609444111585617, 0.5795944333076477, 0.030680129304528236, -0.07837744802236557, -0.36958613991737366, 0.3075466454029083, -0.3810312747955322, 0.04138406366109848, -0.7173334360122681, -0.3363476097583771, 0.5947007536888123, -0.1695934236049652, -0.1261279433965...
There has been a flurry of updates released to Microsoft's Silverlight over the past couple of months (Silverlight 2 beta 2 runtime + dev tools, RC0 + dev tools which broke beta 2 apps), and recently Microsoft has released the RTM. I have been trying (unsuccessfully) to integrate Sharepoint 2007 and Silverlight. Many ...
[ 0.35571977496147156, -0.0298067107796669, 0.699221134185791, -0.04531151428818703, -0.3085743486881256, -0.3899868130683899, 0.20397137105464935, -0.3414147198200226, -0.25532713532447815, -0.5119907855987549, -0.21974843740463257, 0.7436883449554443, -0.14386484026908875, -0.0739396288990...
good start: [Silverlight Blueprint for SharePoint](http://www.codeplex.com/SL4SP)
[ 0.5402395129203796, -0.2446044534444809, 0.26267531514167786, 0.13340376317501068, 0.019724341109395027, -0.5636016130447388, 0.3348335325717926, 0.1170647069811821, -0.2620406150817871, -0.44514814019203186, 0.07037722319364548, 0.01605422981083393, 0.15029951930046082, -0.172220349311828...
On Linq to SQL's DataContext I am able to call SubmitChanges() to submit all changes. What I want is to somehow reject all changes in the datacontext and rollback all changes (preferable without going to the database). Is this possible? In .net 3.0 use the `db.GetChangeSet().Updates.Clear()` for updated, `db.GetChang...
[ -0.053603969514369965, 0.15723702311515808, 0.7690569758415222, 0.03686122968792915, -0.03994547203183174, -0.07932417839765549, -0.03845303878188133, -0.35396191477775574, -0.2035706341266632, -0.5463991165161133, -0.1122475117444992, 0.5234934091567993, -0.41651421785354614, -0.004176619...
I'm just getting back into C++ after a couple of years of doing a lot of C#, and recently Objective C. One thing I've done before is to roll my own iterator adapter for std::map that will deref to just the value part, rather than the key-value pair. This is quite a common and natural thing to do. C# provides this faci...
[ 0.06205505132675171, 0.20800182223320007, 0.3195064961910248, -0.40762969851493835, -0.06163276359438896, -0.0005401606904342771, -0.07545121014118195, 0.18168027698993683, -0.2395484298467636, -0.5551710724830627, 0.05207505077123642, 0.6868596076965332, 0.03275221586227417, 0.01335837319...
two there was some facility to do the same, but I haven't been able to find anything. I'm thinking of knocking something up using Boost's iterator adapters, but before I go down that route I thought I'd ask here if anyone knows of such a facility in Boost, or somewhere else ready made? I don't think there's anything o...
[ 0.006506625097244978, -0.30399689078330994, -0.023854801431298256, -0.3280896842479706, -0.31710562109947205, -0.07135101407766342, 0.041609134525060654, -0.5827361345291138, 0.05876617506146431, -0.8739680051803589, -0.02018757350742817, 0.7413088083267212, -0.517593264579773, -0.22965499...
boost::make_transform_iterator(a_map.end(), take_second<int, string>), ostream_iterator<string>(cout, "\n") ); } ```
[ -0.45220476388931274, -0.35497650504112244, 0.6411851644515991, -0.42536434531211853, 0.12184693664312363, 0.25718954205513, 0.10457176715135574, -0.37299346923828125, 0.10753747075796127, -0.43652668595314026, -0.6041200757026672, 0.9360374212265015, -0.2097281515598297, -0.21601645648479...
I would like to include a different file depending on the version of GCC. More precisely I want to write: ``` #if GCC_VERSION >= 4.2 # include <unordered_map> # define EXT std #elif GCC_VERSION >= 4 # include <tr1/unordered_map> # define EXT std #else # include <ext/hash_map> # define unordered_map __gnu_cxx::ha...
[ 0.11988480389118195, 0.26545676589012146, 0.4308150112628937, -0.38416528701782227, -0.15950767695903778, -0.23526214063167572, 0.003238426521420479, -0.004874346312135458, -0.31690242886543274, -0.8109095096588135, -0.03737880289554596, 0.6506574153900146, -0.40860795974731445, 0.22410090...
If gcc_version >= 4.0 # elif __GNUC_PREREQ(3,2) // If gcc_version >= 3.2 # else // Else # endif #else // If not gcc #endif ```
[ 0.11904831230640411, 0.2514742910861969, 0.7262241244316101, -0.27623865008354187, -0.165779247879982, -0.3456727862358093, 0.12552672624588013, -0.40310800075531006, -0.15641582012176514, -0.3900379240512848, -0.5006912350654602, 0.8885070085525513, -0.5466914176940918, 0.4067293703556061...
I have an array of values that is passed to my function from a different part of the program that I need to store for later processing. Since I don't know how many times my function will be called before it is time to process the data, I need a dynamic storage structure, so I chose a `std::vector`. I don't want to have...
[ 0.28657495975494385, -0.1487901657819748, 0.3952920734882355, -0.04319524019956589, -0.06657204777002335, 0.16363772749900818, -0.11313578486442566, -0.08639485388994217, -0.3282030522823334, -0.578682005405426, 0.24036361277103424, 0.5182862877845764, -0.31531068682670593, 0.2857470512390...
and array size, you can just say: ``` std::vector<ValueType> vec(a, a + n); ``` ...assuming `a` is your array and `n` is the number of elements it contains. Otherwise, `std::copy()` w/`resize()` will do the trick. I'd stay away from `memcpy()` unless you can be sure that the values are plain-old data (POD) types. ...
[ 0.10103332996368408, 0.029435185715556145, 0.23122121393680573, -0.14317652583122253, -0.12530303001403809, -0.09761122614145279, 0.05152406543493271, -0.3941514194011688, -0.391988068819046, -0.6337652206420898, -0.10087170451879501, 0.5098853707313538, -0.3558485507965088, 0.117648959159...
`begin()`, and (`ptr + n`) is equivalent to `end()`.
[ -0.24226824939250946, -0.02120967209339142, 0.2143499255180359, -0.5953004956245422, -0.07227008044719696, -0.028694352135062218, 0.1807730495929718, -0.33584064245224, -0.028059501200914383, -0.25964832305908203, -0.6586186289787292, 0.1926773488521576, -0.17330090701580048, 0.06100712716...
Say I'm mapping a simple object to a table that contains duplicate records and I want to allow duplicates in my code. I don't need to update/insert/delete on this table, only display the records. Is there a way that I can put a fake (generated) ID column in my mapping file to trick NHibernate into thinking the rows ar...
[ 0.2620534300804138, 0.26712727546691895, 0.07584959268569946, 0.343397855758667, -0.5209890604019165, 0.12097823619842529, 0.13772054016590118, -0.11007758229970932, -0.22395183145999908, -0.5335532426834106, 0.4751802682876587, 0.27195683121681213, -0.2999475598335266, 0.4183794856071472,...
assumption that you're going to want to save changes, hence the requirement for an ID of some kind. If you're allowed to modify the table, you could add an identity column (SQL Server naming - your database may differ) to autogenerate unique Ids - existing code should be unaffected. If you're allowed to add to the da...
[ 0.343390554189682, -0.18689638376235962, 0.22583477199077606, 0.09038156270980835, 0.3220226466655731, -0.09708155691623688, -0.22220346331596375, 0.023178700357675552, -0.2313847839832306, -0.6297208666801453, 0.08166638016700745, 0.7248095870018005, -0.5055414438247681, 0.013084359467029...
performance issues. The other alternative, which I've not tried, would be to map your class to a SQL query instead of a table. IIRC, NHibernate supports having named SQL queries in the mapping file, and you can use those as the "data source" instead of a table or view.
[ -0.12471235543489456, -0.2906089425086975, -0.09363572299480438, 0.39448297023773193, -0.11779159307479858, -0.1489563137292862, 0.10379499942064285, 0.04063410684466362, -0.031417232006788254, -0.869016170501709, -0.017367815598845482, 0.4384812116622925, -0.2763619124889374, 0.3632846176...
I'm using Emacs with [C# Mode](http://mfgames.com/linux/csharp-mode) and when I turn on the speedbar, no files show up by default. I can choose "show all files" on the speedbar mode, but then every .cs file shows up with a '[?]' next to the name. How do I properly configure speedbar so it shows up with .cs files by def...
[ 0.07142502069473267, 0.3120053708553314, 0.49472880363464355, -0.03263090178370476, -0.045965202152729034, -0.1470910608768463, 0.1564652919769287, 0.17162562906742096, -0.3268953263759613, -0.9126540422439575, -0.22350074350833893, 0.4824177920818329, -0.41131940484046936, 0.1434199959039...
line to your .emacs and you'll be ok: ``` (speedbar-add-supported-extension ".cs") (add-to-list 'speedbar-fetch-etags-parse-list '("\\.cs" . speedbar-parse-c-or-c++tag)) ``` This handles C# perfectly without a problem. Hope this helps.
[ -0.00920981913805008, -0.2029036581516266, 1.081346869468689, 0.1108076348900795, 0.3115261495113373, 0.061916597187519073, 0.5443204045295715, 0.2708217203617096, -0.2553357481956482, -0.6932332515716553, -0.48340970277786255, 0.5543137192726135, -0.23017728328704834, -0.09334123134613037...
One of the many quirks of Reporting Services we've run across is the complete and utter lack of a CheckBox control or even something remotely similar. We have a form that should appear automatically filled out based on information pulled from a database. We have several bit datatype fields. Printing out "True" or "Fal...
[ 0.42241793870925903, 0.08838939666748047, 0.2611577808856964, 0.4501611590385437, 0.038768477737903595, -0.2611628770828247, 0.2775382995605469, -0.0765766054391861, -0.14583897590637207, -0.22563129663467407, 0.3147357404232025, 0.28577131032943726, -0.28694289922714233, -0.04222637414932...
a CheckBox control. Even if it did, we'd need to have an alternative for the time being. The best we've found so far is: 1. use Wingdings 2. use images 3. use text boxes with borders and print a blank/space or a capital X All three approaches require `IIF` expression shenanigans. The Wingdings approach seemed to wor...
[ 0.2502751052379608, -0.10229400545358658, 0.330169141292572, 0.3008211851119995, -0.3366723656654358, -0.12016379088163376, -0.08282724767923355, -0.07369215041399002, -0.024896765127778053, -0.5176846981048584, -0.0797240138053894, 0.2651798725128174, -0.4907078146934509, -0.1931603997945...
so well when printed along side vector stuff like text. Unless handled carefully, they tend to stretch, pixelate, and do other unprofessional looking things. While these methods do work (some with limitations as mentioned above) none of them are particularly elegant. **Are we missing something obvious?** Not so obvio...
[ 0.31215888261795044, -0.08301364630460739, 0.22841492295265198, 0.37949812412261963, 0.14456845819950104, -0.39939165115356445, 0.08855412900447845, 0.23826897144317627, -0.4039703905582428, -0.34815043210983276, 0.18241985142230988, 0.42902326583862305, -0.22230981290340424, -0.0611043125...
field value (true or false). We haven't had any problems with blurring or scaling, unless we tried to increase the scale of the image beyond 100% obviously. Another option I've used is similar to the wingdings idea, but I just use a plain old "X". On our forms at least, it is not uncommon for someone to use an X in a ...
[ 0.33069396018981934, 0.1486711949110031, 0.20758198201656342, 0.31220731139183044, -0.17298132181167603, 0.030259903520345688, -0.08174894750118256, 0.20547668635845184, -0.22898422181606293, -0.41961678862571716, 0.18730033934116364, 0.31530672311782837, -0.07653891295194626, -0.167934089...
the same thing myself for a long time now.
[ 0.34419122338294983, 0.24392041563987732, 0.0817611813545227, -0.6024016737937927, 0.13362734019756317, 0.2914527356624603, 0.21976369619369507, 0.0484982505440712, -0.3886411488056183, -0.21406413614749908, 0.2606682777404785, 0.4013185203075409, -0.055316247045993805, 0.4791356921195984,...
I have a source XML file that is used to create C# files that are then compiled as part of a project. Currently I have a BeforeBuild target that runs my XML to C# converter. The problem is that by the time the BeforeBuild step is run the old files appear to have been stored by the build system so the new files ar...
[ 0.6437928080558777, 0.19512023031711578, 0.2739006280899048, -0.19335661828517914, -0.2603236734867096, -0.026000699028372765, 0.08347564935684204, -0.1525215357542038, -0.07681754976511002, -0.7728338837623596, 0.07324666529893875, 0.5724894404411316, -0.06450344622135162, 0.2734995782375...
the ItemGroup containing the .cs files you wish to compile is generated when the msbuild file is read, as opposed to when your compile target is executed. You have several options: 1. `<CreateItem>` see [CreateItem task](http://msdn.microsoft.com/en-us/library/s2y3e43x.aspx) 2. `<Output>` see [Output element](http://...
[ 0.235761359333992, -0.21608440577983856, 0.19381283223628998, 0.05220552161335945, -0.30744779109954834, -0.1857183873653412, 0.010846906341612339, -0.09476345032453537, -0.44027382135391235, -0.618061900138855, -0.34224429726600647, 0.2991776764392853, -0.33743637800216675, 0.008802170865...
I need some basic CMS functionality with rich text editing. On stack overflow there is a regular textarea edit control, with support for Markdown style syntax formatting. That would be beyond my users, so I want something like a rich edit control that you can type into on the web site. I know it is possible, as loads o...
[ 0.49099329113960266, 0.13426512479782104, 0.36858609318733215, 0.06608360260725021, 0.42952799797058105, -0.18252034485340118, 0.1516219973564148, 0.27730435132980347, -0.28708744049072266, -0.49382284283638, 0.1959955245256424, 0.5162032246589661, -0.3014337122440338, 0.13959094882011414,...
viewers. a few alternatives (tend to be lighter weight than a full TinyMCE install): * [FCKeditor](http://www.fckeditor.net/) * [Xinha](http://trac.xinha.org/)
[ 0.5670929551124573, -0.303697407245636, 0.5591992139816284, 0.36609354615211487, 0.01994054950773716, -0.28535589575767517, -0.37363579869270325, -0.0489896722137928, -0.2708282768726349, -0.30911800265312195, -0.12330834567546844, 0.4120478630065918, -0.18553510308265686, -0.1959345042705...
I want to record sound (voice) using PortAudio (PyAudio) and output the corresponding sound wave on the screen. Hopeless as I am, I am unable to extract the frequency information from the audio stream so that I can draw it in Hz/time form. --- Here's an example code snippet that records and plays recorded audio for f...
[ 0.33090123534202576, -0.0005775698809884489, 0.4032132029533386, 0.11855949461460114, 0.031171580776572227, 0.3723565340042114, 0.17869523167610168, -0.27983221411705017, 0.05544877424836159, -0.5486261248588562, -0.22284945845603943, 0.6394935846328735, 0.15816918015480042, 0.030055932700...
rate=44100, input=True, output=True) for i in range(0, 44100 / chunk * seconds): data = stream.read(chunk) stream.write(data, chunk) ``` I wish to extract the needed information from the above variable "data". (Or use some other high-level approach with PortAudio or another li...
[ 0.21851857006549835, -0.1449030190706253, 0.46664008498191833, -0.05059422552585602, -0.12168288230895996, 0.003670290345326066, 0.2676064670085907, -0.5188930034637451, 0.13751442730426788, -0.5482397675514221, -0.14569546282291412, 1.0996630191802979, 0.058678511530160904, 0.057316526770...
of the audio data. There is several packages that can calculate that for you. `scipy` and `numpy` is two of them. It is often named "Fast Fourier Transform" (FFT), but that is just the name of the algorithm. Here is an example of it's usage: <https://svn.enthought.com/enthought/browser/Chaco/trunk/examples/advanced/sp...
[ 0.198238804936409, -0.5571467876434326, 0.45880475640296936, 0.4338270425796509, -0.00020001559460069984, -0.23942270874977112, -0.195530965924263, -0.1281132996082306, -0.21629732847213745, -0.3764335811138153, -0.19844236969947815, 0.8498769402503967, -0.14395710825920105, 0.036452084779...
In the following code, both the INPUT and TEXTAREA elements render wider than they should. How can I limit them to 100% of the usable area within the div? ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xh...
[ -0.18408340215682983, -0.11829293519258499, 0.7312257289886475, -0.1492461860179901, -0.041591838002204895, 0.062426209449768066, -0.2567492425441742, -0.5379665493965149, -0.2184630036354065, -0.875752866268158, -0.37923744320869446, 0.27774691581726074, 0.07934506237506866, -0.0567821785...
</div> </body> </html> ``` Note: If I remove the DOCTYPE, it renders as expected, with the INPUT, TEXTAREA and inner DIV all the same width and not going outside the containing DIV. Update: Not withstanding the default borders on those elements, it still appears to render incorrectly in **IE7**. Inputs and textareas...
[ 0.02471698448061943, 0.02458016388118267, 0.7065691947937012, -0.17845208942890167, -0.09324079751968384, 0.20623692870140076, 0.23226535320281982, -0.2862128019332886, -0.06095987930893898, -1.0552492141723633, -0.13320378959178925, 0.3014675974845886, -0.19037626683712006, -0.12959885597...
FF2, Safari 3, IE6 and IE7. ``` <style> .mywidth{ width:100%; border:0; padding-left:0; padding-right:0; } </style> ``` However, don't forget that you will probably need a border, and perhaps the padding too, in order to make the fields appear to users as normal. If you set that border and padding yourself then y...
[ 0.29208865761756897, 0.009284758009016514, 0.5321213603019714, -0.1726117581129074, -0.10175949335098267, -0.007701014168560505, 0.08189816772937775, -0.24470794200897217, -0.38785427808761597, -0.7152119874954224, -0.18628740310668945, 0.3777864873409271, -0.23367975652217865, -0.24067084...
Is there an event that fires when a WCF service gets started or shut down? Hopefully, independent of whether it is self hosted or hosted in IIS? Sure, the constructor of your object (especially if you are using a Singleton style). Please pardon the shameless self promotion, but I've written two articles on how to get s...
[ 0.28834792971611023, -0.05267753824591637, 0.061650391668081284, -0.07421111315488815, -0.4068109393119812, -0.5145774483680725, 0.2516815960407257, -0.1287127137184143, -0.19629518687725067, -0.4486902952194214, -0.01046073343604803, 0.5035046339035034, -0.2553800940513611, 0.213206455111...
[Duplex WCF Services Hosted in IIS Using Net.Tcp](http://www.singingeels.com/Articles/Duplex_WCF_Services_Hosted_in_IIS_Using_NetTcp.aspx)
[ 0.07355765998363495, -0.42476728558540344, 0.5698119401931763, 0.014782926067709923, -0.35325202345848083, -0.12359318137168884, 0.6239736080169678, -0.30554741621017456, -0.2324550300836563, -0.07088861614465714, -0.21785856783390045, 0.4810287058353424, -0.4276054799556732, 0.35911017656...
SQL Server 2005. I'm adding Foreign Key constraints to the database of an application that allegedly didn't need them. Naturally, the data has become unreliable and there are orphaned entries in the foreign key field. Setup: Two tables, TableUser and TableOrder. TableUser has Primary Key 'UserID', and TableOrder h...
[ -0.4531465172767639, 0.1967952847480774, 0.40657421946525574, -0.07008740305900574, -0.3107262849807739, -0.1283242553472519, -0.07708054780960083, -0.3008750081062317, -0.10993102192878723, -0.5463627576828003, 0.27253156900405884, 0.5054969787597656, -0.3057331144809723, 0.06002630665898...
of query.
[ -0.188130721449852, 0.18105974793434143, 0.28616002202033997, 0.1929064840078354, -0.12752698361873627, 0.03242955729365349, -0.054363999515771866, -0.17373023927211761, -0.021407315507531166, -0.38837698101997375, -0.1514310985803604, 0.19161009788513184, -0.25988128781318665, 0.249077811...
I'm getting something pretty strange going on when trying to read some data using the MySql .net connector. Here's the code: ``` IDataReader reader = null; using (MySqlConnection connection = new MySqlConnection(this.ConnectionString)) { String getSearch = "select * from organization"; MySqlCommand cmd = new ...
[ 0.1324383169412613, 0.04988019913434982, 0.5519415140151978, -0.07655780762434006, 0.08174099773168564, -0.08382870256900787, 0.5373739004135132, -0.22799912095069885, -0.0972985103726387, -0.8377564549446106, -0.21742478013038635, 0.40774646401405334, -0.3765731453895569, 0.45936226844787...
the ExecuteReader and expand the results view in Visual Studio (hovering over reader and expanding), I can see the rows returned by the query. If I then let that close and expand the results view again, I get the message 'Enumeration yielded no results'. It seems as if the contents of the reader are getting reset as s...
[ 0.32808852195739746, -0.10865969955921173, 0.49565351009368896, -0.05666825547814369, -0.2137269526720047, 0.029454665258526802, 0.3249054551124573, -0.3520607650279999, -0.11837125569581985, -0.5722615122795105, 0.06117644160985947, 0.65199875831604, -0.3048616051673889, 0.083434253931045...
connector - tried on two different machines to rule out any local errors So far nothing's worked. If anyone could offer any ideas or suggestions they would be very much appreciated. from what I understand the SqlDataReader is intended to be used for a one-time enumeration of the data you've returned. Once you've c...
[ 0.34046676754951477, -0.3342877924442291, 0.2567858397960663, 0.30155372619628906, 0.00041234883246943355, 0.1422538459300995, -0.2687370479106903, -0.059429630637168884, -0.2762908935546875, -0.2696688771247864, 0.525456964969635, 0.47432586550712585, -0.38871219754219055, 0.0903430283069...
store the results of your original query into a System.Data.DataTable, where you can then re-read and manipulate the data however you like. Hope this helps! Adam
[ 0.41731399297714233, 0.16147573292255402, -0.26896175742149353, 0.4542640447616577, 0.38462334871292114, -0.0018607183592393994, 0.18463186919689178, -0.014427194371819496, -0.2801816165447235, -0.5323439240455627, -0.21868789196014404, 0.23576000332832336, -0.14332862198352814, 0.05957845...
I am writing a java program that needs a file open dialog. The file open dialog isn't difficult, I'm hoping to use a `JFileChooser`. My problem is that I would like to have a dual pane `JFrame` (consisting of 2 `JPanels`). The left panel would have a `JList`, and the right panel would have a file open dialog. When I ...
[ 0.38619711995124817, 0.19538427889347076, 0.17807838320732117, -0.12341804802417755, -0.3351057767868042, 0.003440550295636058, 0.1328348070383072, 0.028210336342453957, -0.28733670711517334, -0.8007092475891113, 0.06236235424876213, 0.4492778182029724, -0.43335476517677307, 0.061448618769...
the code that I've tried, at this point it's very simplified. I'm only trying to get the `JFileChooser` to be embedded in the `JPanel` at this point. ``` public class JFC extends JFrame{ public JFC() { setSize(800,600); JPanel panel= new JPanel(); JFileChooser chooser = new JFileChoos...
[ 0.3752175569534302, -0.28457000851631165, 0.7884300947189331, -0.2867444157600403, 0.0914221704006195, 0.10861443728208542, 0.19884926080703735, -0.5462042093276978, -0.2644656002521515, -0.6434550285339355, -0.406760036945343, 0.6175674200057983, -0.4572411775588989, -0.027672160416841507...
public static void main(String[] args) { JFC blah = new JFC(); } } ``` I have also tried calling `chooser.showOpenDialog` with `this` and `panel`, but to no avail. Also, I have tried adding the `JFileChooser` directly to the frame. Both of the attempts listed above still have the `JFileChooser` pop up...
[ 0.2879740595817566, -0.08514706045389175, 0.6276301741600037, -0.28048068284988403, -0.08714909851551056, -0.07287142425775528, 0.15772055089473724, -0.10409332811832428, -0.35819557309150696, -0.5818406343460083, -0.3490085303783417, 0.4258597493171692, -0.649020791053772, 0.0016743718879...
I am developing a page view counter to track the amount of views a page is having on our site and displaying it to the user. (I asked an intro question before: [Page View Counter like on StackOverFlow](https://stackoverflow.com/questions/246919/page-view-counter-like-on-stackoverflow)). Using the recommendations, I de...
[ 0.40145355463027954, -0.0870765969157219, 0.855044424533844, -0.07953866571187973, -0.015136468224227428, 0.021039851009845734, -0.06203237920999527, -0.24322710931301117, -0.3910045027732849, -0.6350865960121155, 0.08838775008916855, 0.4640454947948456, -0.09455792605876923, 0.06924720853...
the database via (Exception Policy) 3. Would it be slower to check if a certain record exist (PageID) and increment a counter or insert the record into the database and aggregate later when needed. We would just need to run an aggregation at the end of the week to see the total amount of pageviews a particular page got...
[ 0.34458470344543457, -0.10575549304485321, 0.42850014567375183, 0.31836017966270447, -0.12088058143854141, -0.30663153529167175, 0.31358322501182556, -0.29945990443229675, -0.37108564376831055, -0.5701560378074646, 0.04219243675470352, 0.4320887625217438, -0.42179930210113525, -0.065136216...
user. 2. With heavy load this would be preferable, that way your handler can return immediately after queuing the operation. For most loads, however, it is probably just as quick to run a simple T-SQL query to increment a counter. 3. Adding +1 to the value directly within your T-SQL query would probably be the best, "c...
[ 0.23983293771743774, 0.07947609573602676, 0.11885455995798111, -0.004936503246426582, -0.08721064776182175, -0.003631060943007469, 0.34421437978744507, -0.48769789934158325, -0.3030681610107422, -0.45343661308288574, -0.0021484189201146364, 0.45603832602500916, -0.321733295917511, -0.08703...
How do I send mail via PHP with attachment of HTML file? -> Content of HTML file (code) is in string in DB. Is there some easy way or free script to do this? I don't want to store the file localy, I need to read it out of DB and send it straightaway as attachment (not included in body). If you have a hard time getting ...
[ 0.45491620898246765, 0.11947111040353775, 0.21752414107322693, -0.07354312390089035, -0.6805208921432495, -0.14139722287654877, 0.38339316844940186, -0.09659558534622192, 0.026423882693052292, -0.6161894202232361, 0.25935909152030945, 0.18144547939300537, -0.2470122128725052, 0.10290808230...
In an interview for a SQL DBA position a while back, I mentioned I prefer the SQL 2005 Management Studio app vs. the old 2000 versions of Enterprise Manager / Query Analyzer. The DBA who was interviewing me said that they had experienced some sort of database corruption in their 2000 databases when making changes from ...
[ 0.01146446168422699, 0.31404930353164673, -0.011150451377034187, -0.0735732913017273, -0.042292963713407516, -0.25161027908325195, 0.18165424466133118, 0.13380885124206543, -0.398757666349411, -0.4909624755382538, 0.22398358583450317, 0.7739077210426331, -0.2556104362010956, 0.163035064935...
heard of anything like this? I didn't end up taking that position, so I can't follow up to get more info. It sounds like he was just was using that as an excuse for lack of experience with SQL 2005 Management Studio. DBAs hate change.
[ 0.44162750244140625, 0.3184039294719696, -0.16327491402626038, -0.02088438719511032, -0.09492769092321396, -0.7949010729789734, 0.3884342908859253, 0.32740649580955505, -0.10477671027183533, -0.18982380628585815, 0.2331007421016693, 0.4581785202026367, -0.4267251193523407, 0.37997373938560...
I need to create several applications that all share a Microsoft SQL Server database. These include ASP.NET web applications, WPF desktop applications, and probably the odd console app every now and then. I'd like to use the ADO.NET Entity Framework for data access, extend its objects for my business logic, and bind t...
[ 0.44325631856918335, 0.29517707228660583, 0.5199712514877319, 0.25761184096336365, 0.11414117366075516, -0.07766792923212051, 0.19162146747112274, 0.01785266026854515, -0.20990367233753204, -0.6577509641647339, 0.20782174170017242, 0.4441281855106354, -0.15520302951335907, 0.25160375237464...
asked follow-up questions... * [How do I use LINQ to Entities in Visual Basic?](https://stackoverflow.com/questions/260179/how-do-i-use-linq-to-entities-in-visual-basic) * [How do I extend ADO.NET Entity Framework objects with partial classes?](https://stackoverflow.com/questions/260233/how-do-i-extend-adonet-entity-...
[ 0.12276087701320648, 0.04552168771624565, 0.22329092025756836, 0.26957282423973083, -0.10932105779647827, 0.07357209175825119, 0.0036584215704351664, -0.368108332157135, -0.15492354333400726, -0.3123619556427002, -0.23583324253559113, 0.4993353486061096, -0.033228546380996704, -0.292280048...
I'm building an XML document with PHP's SimpleXML extension, and I'm adding a token to the file: ``` $doc->addChild('myToken'); ``` This generates (what I know as) a self-closing or single tag: ``` <myToken/> ``` However, the aging web-service I'm communicating with is tripping all over self-closing tags, so I ne...
[ -0.052427299320697784, 0.2415103316307068, 0.3624541461467743, 0.04639684781432152, -0.015607452020049095, 0.06486678868532181, 0.248264342546463, -0.1946263462305069, 0.008200505748391151, -0.46100524067878723, -0.00032599264523014426, 0.2891395688056946, 0.08688002079725266, 0.1060194447...
Need a function like: ``` function isGoogleURL(url) { ... } ``` that returns true iff URL belongs to Google. No false positives; no false negatives. Luckily there's [this](http://www.google.com/supported_domains) as a reference: > .google.com .google.ad .google.ae .google.com.af .google.com.ag .google.com.ai .goo...
[ 0.005546963308006525, 0.6338628530502319, 0.5681412816047668, 0.19989395141601562, -0.09709937125444412, 0.2631860673427582, 0.21095973253250122, -0.281124085187912, 0.051586758345365524, -0.5111821889877319, -0.3471682071685791, 0.6775656342506409, -0.4320497214794159, 0.07963818311691284...
.google.is .google.it .google.je .google.com.jm .google.jo .google.co.jp .google.co.ke .google.com.kh .google.ki .google.kg .google.co.kr .google.kz .google.la .google.li .google.lk .google.co.ls .google.lt .google.lu .google.lv .google.com.ly .google.co.ma .google.md .google.mn .google.ms .google.com.mt .google.mu .go...
[ 0.06857015937566757, 0.34460997581481934, 0.5200830101966858, 0.20179113745689392, -0.1242235079407692, 0.48469310998916626, 0.02304494008421898, -0.31781572103500366, -0.4064571261405945, -0.8381671905517578, 0.15904471278190613, 0.4137338101863861, -0.008103698492050171, 0.30993127822875...
Clarifications:** * I need this for a greasemonkey script I wrote that currently only works for google.com (and should work for all other TLDs as well). [Here](http://userscripts.org/scripts/show/6415) is the script (it modifies Google Reader to work on wide screens better). * It should work on URLs that belong to the...
[ 0.625105619430542, 0.4244988262653351, 0.5139667391777039, -0.008198786526918411, -0.11537828296422958, -0.015902405604720116, 0.26437628269195557, -0.06066862493753433, 0.13975556194782257, -0.5142914056777954, 0.05154794082045555, 0.4158470034599304, -0.3757365345954895, 0.19133913516998...
'.google.am', '.google.it.ao', '.google.com.ar', '.google.as', '.google.at', '.google.com.au', '.google.az', '.google.ba', '.google.com.bd' ]).join('\n'); function isGoogleUrl(url) { // get the 2nd level domain from the url var domain = /^https?:\/\/[^\///]*(google\.[^\/\\]+)\//...
[ -0.06894413381814957, -0.08679667860269547, 0.9103838801383972, -0.05850403010845184, 0.12418490648269653, -0.030957797542214394, 0.2608892023563385, -0.03260362148284912, -0.05471883714199066, -0.6842912435531616, -0.6590609550476074, 0.3238545060157776, -0.6508426666259766, 0.53112256526...
return re.test(GOOGLE_DOMAINS); } alert(isGoogleUrl('http://www.google.ba/the/page.html')); // true alert(isGoogleUrl('http://some_mal_site.com/http://www.google.ba/')); // false alert(isGoogleUrl('https://google.com.au/')); // true alert(isGoogleUrl('http://www.google.com.some_mal_site.com/')); // false alert(isGoogl...
[ 0.34581616520881653, 0.16630619764328003, 0.44661083817481995, -0.32974347472190857, 0.006929941475391388, 0.0971686840057373, 0.8282819390296936, -0.2575131058692932, -0.13036027550697327, -0.5868640542030334, -0.7421280145645142, 0.5944035649299622, -0.4853876531124115, 0.335400968790054...
In my Python app, I have an XML document that I'd like to transform using my XSL file. I'm currently using xml.etree to generate the XML document, but I haven't found anything within Python 2.5 that will allow me to natively transform my XML document. I've already found one library ([libxslt](http://xmlsoft.org/XSLT/)...
[ 0.20269960165023804, -0.08976410329341888, 0.3882337510585785, -0.10740049183368683, -0.10385719686746597, 0.009956903755664825, 0.25690481066703796, 0.0799427404999733, 0.05301465839147568, -0.973116934299469, -0.27271366119384766, 0.6595722436904907, -0.33152419328689575, -0.073311164975...
What exception should I throw if I encounter an illegal state - for instance, an initialization method that should only be called once being called a second time? I don't really see any built-in exception that makes sense. This seems like something that should be in the framework - am I not poking in the right spot? [I...
[ 0.1479911506175995, 0.09505480527877808, -0.09883791953325272, 0.0619635172188282, -0.2435159683227539, -0.024824993684887886, 0.45135498046875, 0.012134984135627747, -0.33631864190101624, -0.3986135423183441, 0.015212787315249443, 0.28090494871139526, -0.17629070580005646, 0.2692863643169...
We've been using [jbossmq](http://www.jboss.org/community/docs/DOC-10525) and [csil](http://csil.sourceforge.net). The implementation has been successful in production for 6 years, but I'm wondering if something better is available. One issue is jbossmq's thread per client model, and scheduled end of life. Another is ...
[ 0.3740035593509674, 0.07355347275733948, 0.5774949193000793, 0.02367907203733921, 0.02779543213546276, -0.4609789252281189, 0.3889494836330414, 0.19320468604564667, -0.5949345827102661, -0.5134457349777222, -0.002703605219721794, 0.2326115369796753, -0.25813424587249756, 0.2646266520023346...
As Scott Myers wrote, you can take advantage of a relaxation in C++'s type-system to declare clone() to return a pointer to the actual type being declared: ``` class Base { virtual Base* clone() const = 0; }; class Derived : public Base { virtual Derived* clone() const }; ``` The compiler detects that clone...
[ 0.30043649673461914, -0.21541307866573334, -0.19100724160671234, 0.03955188766121864, 0.2646932899951935, -0.05064394325017929, 0.006657726597040892, -0.2804639935493469, 0.010848534293472767, -0.33636149764060974, -0.13560444116592407, 0.5320875644683838, -0.3087422847747803, 0.4369389712...
Derived : public Base { virtual std::auto_ptr<Derived> clone() const; }; ``` Unfortunately, the relaxation of the conventions does not apply to templated smart pointers, and the compiler will not allow the override. So, it seems I am left with two options: 1. Have clone() return a "dumb" pointer, and document t...
[ 0.19117458164691925, -0.2905718684196472, 0.15799753367900848, 0.1233501136302948, 0.19306811690330505, -0.09268881380558014, 0.020721178501844406, -0.31486794352531433, 0.17335349321365356, -0.2777833640575409, -0.027556899935007095, 0.4616681933403015, -0.21492241322994232, 0.43339189887...
strong type safety too? It depends on your use case. If you ever think you will need to call `clone` on a derived object whose dynamic type you know (remember, the whole point of `clone` is to allow copying *without* knowing the dynamic type), then you should probably return a dumb pointer and load that into a smart po...
[ -0.008306172676384449, -0.1878339946269989, -0.04801499843597412, 0.05587347224354744, -0.0673450231552124, -0.5268841981887817, 0.3992370069026947, -0.18791963160037994, -0.07647930830717087, -0.1797713339328766, 0.0810961127281189, 0.7355262637138367, -0.37714725732803345, -0.06929608434...
If I have a button like the one in this image : **<http://www.freeimagehosting.net/image.php?4cd775814c.png>** how could I make the text display itself vertically ? As in ``` j B u t t o n 1 ``` I would like to know how to do the same thing for JLabel . I'm sure there has to be a better way than to create as man...
[ 0.3894769251346588, -0.07757134735584259, 0.4976130723953247, 0.08417843282222748, -0.39795616269111633, 0.05386968329548836, 0.22911711037158966, 0.10709569603204727, -0.19710424542427063, -0.774237334728241, 0.10214529931545258, 0.1490362286567688, -0.13325552642345428, 0.235285148024559...
like the tags are getting messed up . You can use HTML for JButton or JLabel. So ``` button = new JButton("<html>J<br>b<br>u<br>t<br>t<br>o<br>n<br>1</html>"); ``` should do the trick.
[ 0.3995100259780884, -0.1836535483598709, 0.46544426679611206, -0.08647648245096207, -0.12356974184513092, -0.29911279678344727, 0.2725032567977905, -0.11818105727434158, -0.40277668833732605, -0.5542009472846985, -0.15806227922439575, 0.5486765503883362, -0.4668954014778137, -0.17204453051...
How do you draw the following dynamic **3D** array with OpenGL **glDrawPixels()**? You can find the documentation here: <http://opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html> ``` float ***array3d; void InitScreenArray() { int i, j; int screenX = scene.camera.vres; int scree...
[ 0.30732813477516174, -0.27112388610839844, 0.8548862338066101, 0.030730780214071274, -0.14147354662418365, 0.23035696148872375, 0.13996519148349762, -0.5508809089660645, -0.315287709236145, -0.641271710395813, 0.031022686511278152, 0.6778552532196045, -0.1952662318944931, -0.18658383190631...
array3d[i][j] = (float *)malloc(sizeof(float) * /*Z_SIZE*/ 3); } } ``` I can use only the following header files: ``` #include <math.h> #include <stdlib.h> #include <windows.h> #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> ``` Uh ... Since you're allocating *each single pixel* with a separa...
[ 0.11314929276704788, 0.005010045133531094, 0.6822761297225952, -0.2285255789756775, -0.5910922884941101, 0.12596218287944794, 0.04701760411262512, -0.25190672278404236, -0.2216552048921585, -0.749962568283081, 0.10854234546422958, 0.6112024784088135, -0.5556262135505676, 0.1197094768285751...
approach would be to allocate the "3D array" (which is often referred to as a 2D array of pixels, where each pixel happens to consist of a red, green and blue component) with a single call to `malloc()`, like so (in C): ``` float *array3d; array3d = malloc(scene.camera.hres * scene.camera.vres * 3 * sizeof *array3d); ...
[ 0.12932178378105164, -0.21673840284347534, 0.4715751111507416, -0.026724228635430336, -0.05966717004776001, 0.3176265060901642, -0.3053341209888458, -0.47360149025917053, -0.05322819575667381, -0.3614722192287445, -0.3399428427219391, 0.3706923723220825, -0.6424096822738647, -0.03304292261...
In C#4.0 we're going to get dynamic types, or objects whose "static type is dynamic", according to Anders. This will allow any method invocation resolution to happen at runtime rather than compile time. But will there be facility to bind the dynamic object to some sort of contract (and thereby also get full intellisens...
[ -0.05033812299370766, -0.1180671975016594, 0.49249526858329773, -0.07833272218704224, 0.20722879469394684, -0.2965694069862366, 0.022799203172326088, -0.18520735204219818, -0.3044813573360443, -0.36056703329086304, -0.2779005169868469, 0.6966854333877563, -0.573448121547699, -0.15806853771...
even just ``` IFoo foo2 = foo as IFoo; ``` Can't find anything like that in the existing materials for C#4.0, but it seems like a logical extension of the dynamic paradigm. Anyone with more info? I'm not aware of anything really resembling duck typing, I'm afraid. I've [blogged about the idea](http://msmvps.com/blog...
[ 0.22081008553504944, -0.04291658475995064, 0.0859026238322258, -0.2737879157066345, -0.35106685757637024, -0.18944425880908966, 0.23428650200366974, 0.3642350435256958, -0.2250298410654068, -0.16511814296245575, 0.01313742808997631, 0.669547975063324, -0.4101496636867523, -0.04585298895835...
I used to be able to right click Folders in my project and click 'refresh' to refresh the files within them, I don't see the option to do this any more, how do I fix it? The same thing has happened at work and at home.. has it always been like this and have I gone insane? I still have the option. You might be able to g...
[ 0.07484153658151627, -0.20216672122478485, 0.4063278138637543, -0.0796251893043518, 0.05587809532880783, 0.10675269365310669, 0.41799071431159973, 0.012770366854965687, -0.570345401763916, -0.37881097197532654, 0.12549127638339996, 0.615594744682312, -0.05608494579792023, 0.257684737443923...
I have to simultaneously load data into a table and run queries on it. Because of data nature, I can trade integrity for performance. How can I minimize the overhead of transactions? Unfortunately, alternatives like MySQL cannot be used (due to non-technical reasons). Other than the general optimization practices that...
[ 0.042296044528484344, 0.08156245201826096, 0.03306844085454941, 0.040502071380615234, -0.05327736586332321, -0.374921590089798, 0.19368235766887665, -0.21315902471542358, -0.2042560577392578, -0.5380918383598328, -0.09594153612852097, 0.4213218092918396, -0.22779272496700287, -0.1074417009...
high water mark which does not create UNDO. The disadvantage is that existing free space is not used. 3. On the hardware side, [`RAID 0`](http://www.acnc.com/04_01_00.html) over a larger number of smaller disks will give you the best insert performance, but depending on your usage [`RAID 10`](http://www.acnc.com/04_01_...
[ 0.13531169295310974, 0.06836218386888504, 0.313457727432251, 0.0910608097910881, 0.013026319444179535, -0.27716442942619324, 0.08493039011955261, -0.28455424308776855, -0.24593348801136017, -0.37641066312789917, 0.07488249242305756, 0.7270546555519104, -0.08572152256965637, 0.0633433461189...
I want to make a transparent dialog. I capture the OnCtlColor message in a CDialog derived class...this is the code: ``` HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); if(bSetBkTransparent_) { pDC->SetBkMode(TRANSPARENT); ...
[ 0.2843398451805115, 0.06935592740774155, 1.0405302047729492, -0.20563016831874847, -0.12298308312892914, 0.04346737265586853, 0.17490842938423157, -0.43006274104118347, 0.15695104002952576, -0.6619174480438232, 0.12408087402582169, 0.42226889729499817, -0.45714136958122253, 0.1060237511992...
is not transparent. I already googled for this but I didn't find a solutions. Does anybody know how to make a real transparent group-box? By the way, I am working in Windows XP. And I don't want to fully draw the control to avoid having to change the code if the application is migrated to another OS. Thanks, Javier...
[ 0.14751391112804413, 0.06757049262523651, 0.5150672793388367, 0.19385184347629547, -0.17701420187950134, -0.4452779293060303, 0.10252691805362701, 0.25542736053466797, -0.2043718695640564, -0.5059784054756165, 0.345079243183136, 0.39593008160591125, -0.4600074887275696, -0.1755502969026565...
Windows XP theme to Windows classic and then the groupbox backgraund was transparent. The bad new is that in this case the frame line gets visible beneath the text...so if someone is following this approach I think maybe he/she would better follow the Adzm's advice. You have two options. You can not use Common Control...
[ 0.05087169632315636, -0.0926738902926445, 0.8734215497970581, 0.08678712695837021, -0.2225666046142578, -0.19124381244182587, 0.4876822829246521, -0.2904004454612732, -0.3001570701599121, -0.30026528239250183, -0.05935719981789589, 0.7585837244987488, -0.4598652720451355, 0.137770235538482...