text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
just `GL_FRONT` or `GL_BACK`.
Here is my lighting setup (done once at beginning of renderer):
```
m_lightAmbient[] = { 0.2f, 0.2f, 0.2f, 1.0f };
m_lightSpecular[] = { 1.0f, 1.0f, 1.0f, 1.0f };
m_lightPosition[] = { 0.0f, 1200.0f, 0.0f, 1.0f };
glLightfv(GL_LIGHT0, GL_AMBIENT, m_lightAmbient);
glLightfv(GL_LIGHT0, GL_... | [
-0.11758551001548767,
-0.1733749359846115,
1.1327931880950928,
-0.2623293995857239,
-0.1539505124092102,
0.19996120035648346,
0.09287067502737045,
-0.3201935291290283,
-0.1899568736553192,
-0.8668882250785828,
-0.04256165400147438,
0.8804797530174255,
-0.2057649940252304,
-0.23847688734531... | |
it wasn't being drawn, `glMaterialfv` was blending with it.
Turns out the color changing was because a previous texture was on the texture stack, and even though it wasn't being drawn, glMaterialfv was blending with it. | [
0.05991614609956741,
-0.05012362077832222,
0.3308381140232086,
0.13063180446624756,
0.007703423500061035,
-0.11896046251058578,
0.06816879659891129,
0.22397933900356293,
-0.3891295790672302,
-0.8003747463226318,
-0.16966131329536438,
0.15228311717510223,
-0.16512039303779602,
0.38489499688... | |
I have seen the [GUID Collisons](https://stackoverflow.com/questions/184869/are-guid-collisions-possible)
discussions but just wanted your thoughts on whether there could be a GUID collision if both clients accessed the same web page that generates the GUID at exactly the same time (- probably down to the micro-second)... | [
0.05572095885872841,
-0.05074986442923546,
0.29054513573646545,
0.18732182681560516,
-0.0629751905798912,
-0.20030052959918976,
0.06932041794061661,
0.21439599990844727,
-0.19286741316318512,
-0.611697256565094,
0.3301440477371216,
0.7633218765258789,
-0.21999691426753998,
0.00802630838006... | |
I'd much rather code an app using pure C api such as OpenGL, rather that Cocoa Touch. So I'm wondering: is it feasible? Will I be able to maintain the same user experience that you get with Interface Builder?
None of the UI components have OpenGL equivalents. Is it possible? Yes. Is it *sensible*? No - you would be muc... | [
0.6964350342750549,
0.0227745920419693,
0.11993016302585602,
0.19117183983325958,
-0.21049021184444427,
0.2030346393585205,
0.0547313392162323,
0.018925851210951805,
-0.14635735750198364,
-0.7035667896270752,
0.04657740890979767,
0.7007360458374023,
-0.1574734002351761,
-0.0124100605025887... | |
My webapp is part of a larger EAR that is deployed into a websphere server. The server hosts number of other apps on the same virtual server. My webapp has some initialisation/health checks in a servletContextListener->contextInitialized method. I want to make the webapp unavailable if initialisation/health checks fail... | [
0.13461318612098694,
0.4226684868335724,
0.5737486481666565,
-0.029943907633423805,
-0.1192002072930336,
-0.004265882074832916,
0.5233557820320129,
-0.010863552801311016,
0.19255821406841278,
-0.8508288860321045,
0.039151839911937714,
0.8201219439506531,
-0.23450548946857452,
0.08451203256... | |
occur under the
> call stack of another component in the
> application. An example of this is a
> … ServletContextListener that
> throws an unhandled exception during a
> notification of servlet context
> initialization…. In this case,
> the Developer has no opportunity to
> handle the exception. The container
... | [
-0.21157929301261902,
0.02826143056154251,
0.20478855073451996,
-0.044658493250608444,
0.1557236611843109,
-0.3186485469341278,
0.5971599817276001,
-0.05289924889802933,
-0.21430033445358276,
-0.5595837831497192,
-0.5491968393325806,
0.28713175654411316,
-0.4088652431964874,
0.314179331064... | |
and WebLogic both disable the application, and the only other reasonable thing I can think of would be to ignore the exception. I can't see a container that did that being very popular—so you'd better test it in WebSphere yourself. | [
0.382729172706604,
0.2955654561519623,
0.16400694847106934,
0.12689149379730225,
0.03491070866584778,
-0.6412210464477539,
0.23002922534942627,
0.22376757860183716,
0.011269861832261086,
-0.41063857078552246,
0.15556147694587708,
0.6694239377975464,
-0.28856319189071655,
0.1772751957178115... | |
I need to reinforce the structure of a Microsoft Word document.
EG:
**Style Question here blah blah blah**
*Style Answer Here blah blahblah*
The enforcement here would be the "Answer" style cannot be placed unless there is a "Question" style above it.
To do this I would use a Macro, so ideally I would like to ... | [
0.28996115922927856,
0.2169354259967804,
0.28909704089164734,
0.027984514832496643,
-0.22121629118919373,
-0.4307311475276947,
0.27992478013038635,
0.04058762267231941,
-0.20944170653820038,
-0.6826207041740417,
-0.06250068545341492,
0.6553629040718079,
-0.056421902030706406,
-0.0656888112... | |
might work. | [
0.435496985912323,
0.0544966384768486,
0.189859539270401,
0.2040279060602188,
0.20886027812957764,
0.00056469562696293,
0.33174076676368713,
0.23645137250423431,
0.058743465691804886,
-0.10325828939676285,
0.2720963656902313,
-0.03968840837478638,
0.23320309817790985,
0.022221704944968224,... | |
I have the requirement to support different Master pages on my application (ASP.NET MVC).
What is the recommended way to:
1. Pass the master page name to the view from.
2. Store the master page (in session, or something) so it sticks during a user's visit.
Use a custom base controller and inherit from it instead:
```... | [
0.16300056874752045,
-0.06499741971492767,
0.8131610155105591,
-0.17295457422733307,
-0.12169390171766281,
-0.07027339190244675,
0.20134250819683075,
-0.3376995921134949,
-0.14560934901237488,
-0.603772759437561,
-0.12183396518230438,
0.5892578363418579,
-0.1992986649274826,
0.595472276210... | |
the global.asax Session\_Start:
```
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
//programming to figure out your session
Session("MasterPage")="MyMasterPage"
End Sub
``` | [
-0.2780521512031555,
-0.0941023975610733,
0.3489111363887787,
-0.04362286254763603,
0.04479816183447838,
-0.2613615095615387,
0.3617047369480133,
0.2663445770740509,
-0.29719653725624084,
-0.8042299151420593,
-0.21379001438617706,
0.4585014581680298,
-0.3544570803642273,
0.1436073184013366... | |
We are currently setting up the evaluation criteria for a trade study we will be conducting.
One of the criterion we selected is reliability (and/or robustness - are these the same?).
How do you assess that software is reliable without being able to afford much time evaluating it?
Edit: Along the lines of the respon... | [
0.3886319398880005,
0.23643659055233002,
0.11068493872880936,
0.43003740906715393,
-0.02702966146171093,
-0.09189300984144211,
0.14048965275287628,
-0.4743284285068512,
0.13864371180534363,
-0.37213990092277527,
-0.06425633281469345,
0.725695788860321,
0.28370726108551025,
-0.1465549468994... | |
are two different attributes of a sytem:
[Reliability](http://en.wikipedia.org/wiki/Reliability)
> The IEEE defines it as ". . . the
> ability of a system or component to
> perform its required functions under
> stated conditions for a specified
> period of time."
[Robustness](http://en.wikipedia.org/wiki/Robus... | [
0.24208597838878632,
0.05177877098321915,
0.04236147552728653,
0.2836551368236542,
-0.1278272420167923,
-0.1901511698961258,
0.33500635623931885,
-0.2972427010536194,
-0.165699765086174,
-0.22414036095142365,
-0.43714889883995056,
0.613287627696991,
0.02635386772453785,
-0.2236462235450744... | |
of 'patch' releases over time, even churn in the code base.
Does the product have automated test processes? Test coverage can be another indication of confidence.
Some projects using agile methods may not fit these criteria well - frequent releases and a lot of refactoring are expected
Check with current users of t... | [
0.7250288128852844,
0.35457319021224976,
0.023429330438375473,
0.23498204350471497,
0.2945445477962494,
-0.3481123149394989,
0.2349068522453308,
-0.016406172886490822,
-0.11295005679130554,
-0.18603388965129852,
-0.0927734449505806,
0.4665814936161041,
-0.07150890678167343,
-0.145996823906... | |
If I have a method with a parameter that's an interface, whats the fasts way to see if the interface's reference is of a specific generic type?
More specifically, if I have:
```
interface IVehicle{}
class Car<T> : IVehicle {}
CheckType(IVehicle param)
{
// How do I check that param is Car<int>?
}
```
I'm also... | [
0.23280513286590576,
0.25380390882492065,
0.20698899030685425,
0.2929127812385559,
-0.34138384461402893,
0.4851503372192383,
0.2826620042324066,
-0.7290500998497009,
-0.3109416961669922,
-0.4709406793117523,
0.12483009696006775,
0.35338571667671204,
-0.33449772000312805,
0.0380374938249588... | |
Car<int>;
if (car != null)
{
...
}
}
``` | [
0.008540485054254532,
0.27595260739326477,
0.20001384615898132,
-0.06485290825366974,
-0.021948978304862976,
0.4222809374332428,
0.12134301662445068,
-0.030281737446784973,
0.0732257142663002,
-0.21256054937839508,
-0.1707344800233841,
0.8572483062744141,
-0.20497380197048187,
0.4585624337... | |
Is there a way on the CVS command line to list all files associated with a tag?
About the closest you'll be able to get is with this:
cvs -q log -R -N -S -rTAGNAME
This works against local copy, it doesn't pull from the server.
EDIT:
As Ken mentioned, a slight variation will make it pull from the server, but in thi... | [
0.25410735607147217,
-0.12050315737724304,
0.5498676300048828,
-0.12746423482894897,
-0.04512816667556763,
-0.34802889823913574,
0.14216554164886475,
-0.2673083245754242,
-0.27030426263809204,
-0.3387472629547119,
-0.06111017242074013,
0.7702661156654358,
-0.4239749610424042,
-0.0389482304... | |
I have 4 different named instances of SQL Server 2005 on a single server (for testing purposes). There is no default instance on the server.
Because I will eventually need to allow communication to these instances across the firewall, I have set the ports of each instance statically listening on all IPs for the server... | [
-0.07471096515655518,
0.331196665763855,
0.6645631790161133,
-0.0890120193362236,
-0.18047015368938446,
-0.01071099005639553,
0.6533225774765015,
0.07232393324375153,
-0.2705453038215637,
-0.7243465185165405,
0.1251671314239502,
0.5005824565887451,
-0.4203852415084839,
0.5343090295791626,
... | |
connections.
One instance is set to the default port (1433), and it works fine.
The other instances, however, exhibit very strange behavior. When I connect to them using the Sql Server Management Studio within the network (so I'm not even crossing the firewall yet), the studio connects without complaining. However, a... | [
-0.18022578954696655,
0.2600259482860565,
0.5416023135185242,
0.28829145431518555,
0.09463391453027725,
-0.09991654753684998,
0.32440274953842163,
0.07351900637149811,
-0.5802386999130249,
-0.7511612176895142,
-0.17076994478702545,
0.4271303713321686,
-0.30806249380111694,
0.29340386390686... | |
established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click: <http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkI... | [
0.10361500084400177,
-0.07841768860816956,
0.583852231502533,
0.09923505038022995,
0.32925868034362793,
-0.0882243663072586,
0.024256836622953415,
-0.08459043502807617,
-0.22777818143367767,
-0.8263795375823975,
-0.099608413875103,
0.18463006615638733,
-0.20254762470722198,
0.4650900065898... | |
name of the
> instance after the name of the server;
> for example:
```
> sqlcmd -S
> tcp:NameOfTheServer\sqlexpress,1433
```
EDIT: removed source link, as it is now a dead link | [
-0.3216983377933502,
0.07878360897302628,
0.3379976451396942,
0.02710898034274578,
0.004297308623790741,
-0.10648820549249649,
0.30908164381980896,
0.32552045583724976,
-0.23520402610301971,
-0.5796661376953125,
-0.023469625040888786,
0.09749510884284973,
-0.4320330023765564,
0.76388609409... | |
I am using .net2.0 and IIS6.
When using .net Forms Authentication: How to limit access to resources like pdf files to authenticated users only; so in order to access a file say mysite.com/mydoc.pdf they would have to be authenticated first (go through the login page)
It seems that by default only the .aspx pages are... | [
0.1448320746421814,
0.12220259010791779,
0.36436641216278076,
0.4275115728378296,
-0.2129858285188675,
-0.31091487407684326,
0.3135923147201538,
-0.222823366522789,
-0.21977557241916656,
-0.5632103085517883,
-0.03870387747883797,
0.4298117160797119,
0.19354714453220367,
-0.0003821613790933... | |
will be useful when dealing with the production system.
You are more then welcome to post other answers
You have to configure IIS to process wildcard extensions. Thus .pdf & .html extensions will be authenticated. Here's how for IIS6:
<http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Exten... | [
0.14846689999103546,
-0.2403501272201538,
0.5992762446403503,
0.21461379528045654,
0.07998830825090408,
-0.4645371735095978,
0.3422123193740845,
-0.35622939467430115,
-0.2810344994068146,
-0.4939659833908081,
-0.20542612671852112,
0.3017837703227997,
0.06161116436123848,
-0.143215119838714... | |
I used web site deployment projects but I discovered that the aspnet\_merge.exe utility is not on my build server. This prevents me from being able to build. In order to get this utility I have to install the Windows SDK which comes as an ISO file and is over 1gb. I do not want to install this entire thing when I all I... | [
0.6675351858139038,
0.18877865374088287,
-0.14590264856815338,
-0.1496800184249878,
-0.07394067198038101,
-0.04145842418074608,
0.3514561951160431,
-0.18783056735992432,
-0.3158949315547943,
-0.9400113821029663,
0.05324816703796387,
0.3530110716819763,
-0.3521832823753357,
0.13593846559524... | |
prefer to have it include in some web tools installer.
Has anyone just copied this assembly to the FrameworkSDKDir and just made it work that way?
Related: [Using Visual Studio 2008 Web Deployment projects - getting an error finding aspnet\_merge.exe](https://stackoverflow.com/questions/28765/using-visual-studio-2008... | [
0.3111821413040161,
-0.17416073381900787,
0.1816955804824829,
0.01656811125576496,
-0.25602948665618896,
-0.1025383248925209,
0.3026852607727051,
-0.2979350686073303,
-0.22022588551044464,
-0.6900107264518738,
-0.08005937933921814,
0.7682632803916931,
-0.18880239129066467,
-0.1587581783533... | |
.NET 3.5 SP1 [here](http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en). | [
0.10541971772909164,
-0.1363857388496399,
0.2756045460700989,
0.13123169541358948,
-0.14584724605083466,
-0.33147865533828735,
0.2765830457210541,
0.11959034949541092,
-0.3138829171657562,
-0.8863085508346558,
-0.5624970197677612,
0.13354121148586273,
-0.24753768742084503,
0.31115809082984... | |
Anyone using MozyPro to backup SQL Server databases?
I'm concerned about the way it does the backup. It just copies data files the way they are. Not using the backup database command.
Is it safe?
MozyPro uses the Volume Shadow Service (VSS) to create backups for SQL Server. SQL Server 2005 has been engineered so that... | [
0.050397131592035294,
0.2343851774930954,
0.3524326980113983,
-0.1691625863313675,
-0.11999747157096863,
-0.32491835951805115,
0.42657631635665894,
-0.12035699933767319,
-0.29541197419166565,
0.04161820188164711,
0.11145031452178955,
0.7212975025177002,
-0.30716657638549805,
-0.11843729764... | |
using Volume Shadow
> Copy Service (VSS). This is
> accomplished by providing a VSS
> compliant writer (the SQL writer) so
> that a third-party backup application
> can use the VSS framework to back up
> database files. This paper describes
> the SQL writer component and its role
> in the VSS snapshot creation ... | [
0.39012768864631653,
-0.09541179239749908,
0.6125305891036987,
0.0840766578912735,
0.032135531306266785,
-0.04656060412526131,
0.08199431002140045,
-0.30804821848869324,
-0.3071410357952118,
-0.3217996060848236,
-0.4006728529930115,
0.7348207831382751,
-0.3792344629764557,
-0.0117071336135... | |
which describes how to restore SQL Server backups that were made using VSS.
That being said, if you don't trust this method, there is nothing stopping you from setting up a backup job and just having Mozy backup your \*.bak files. | [
0.24389959871768951,
0.1426488161087036,
0.10108738392591476,
0.25295913219451904,
0.3063903748989105,
-0.4618999660015106,
0.3916745185852051,
0.08258888870477676,
-0.2493400126695633,
-0.3402499258518219,
-0.006197954993695021,
0.787568986415863,
-0.3670673668384552,
0.05374685674905777,... | |
I am using winsock and C++ to set up a server application. The problem I'm having is that the call to `listen` results in a first chance exception. I guess normally these can be ignored (?) but I've found others having the same issue I am where it causes the application to hang every once in a while. Any help would be ... | [
0.42463698983192444,
0.22994756698608398,
0.3900711238384247,
-0.12543411552906036,
-0.00998142920434475,
-0.2570525109767914,
0.4323002099990845,
0.14953699707984924,
-0.0552544929087162,
-0.6806619763374329,
0.148602694272995,
0.6992208957672119,
-0.16791461408138275,
0.36231327056884766... | |
I'm working with is as follows. The exception occurs on the call to `listen` in the fifth line from the bottom.
```
m_accept_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (m_accept_fd == INVALID_SOCKET)
{
return false;
}
int optval = 1;
if (setsockopt (m_accept_fd, SOL_SOCKET, SO_REUSEADDR,
... | [
0.038658399134874344,
0.14191220700740814,
0.7470136284828186,
-0.6470708847045898,
0.11632954329252243,
-0.056371960788965225,
0.5258678793907166,
-0.3695080578327179,
0.20632676780223846,
-0.8004609942436218,
-0.27665117383003235,
0.72861647605896,
-0.33606377243995667,
0.297429591417312... | |
local_addr.sin_addr.s_addr = INADDR_ANY;
local_addr.sin_port = htons(m_port);
if (bind(m_accept_fd, (struct sockaddr *)&local_addr,
sizeof(struct sockaddr_in)) == SOCKET_ERROR)
{
closesocket(m_accept_fd);
return false;
}
if (listen (m_accept_fd, 5) == SOCKET_ERROR)
{
closesocket(m_a... | [
-0.504915177822113,
0.07275804877281189,
0.5749226808547974,
-0.2113252729177475,
0.23427361249923706,
-0.04885246232151985,
0.6079146862030029,
-0.06960973143577576,
-0.24828007817268372,
-0.8434250950813293,
-0.33213481307029724,
0.6395226716995239,
-0.2686012089252472,
0.526277303695678... | |
there's a few minutes delay between releasing a network port (socket) and when it can be reused. Also, depending on the OS version, there's only a few thousand in the range that windows will use. On the server, run this at a command prompt:
> netstat -an
and look at the results (pipe to a file is easiest: netstat -a... | [
0.3214869201183319,
-0.18828943371772766,
0.32010000944137573,
-0.0794842392206192,
0.19516803324222565,
0.1635429859161377,
0.23479844629764557,
-0.2189580500125885,
-0.45588383078575134,
-0.9920555353164673,
-0.004587654955685139,
0.5884059071540833,
-0.06659407168626785,
0.1673314422369... | |
You can also adjust the delay by using the registry entry above to recycle the ports more quickly.
If this is not the problem, then the problem is likely the number of pending connections that you have set in your Listen() method. | [
0.431193083524704,
-0.16532212495803833,
0.38643237948417664,
0.28798922896385193,
0.277671754360199,
-0.13202887773513794,
0.3990437686443329,
-0.1595505028963089,
-0.4263131320476532,
-0.7127171158790588,
0.13418085873126984,
0.8703340888023376,
-0.13654829561710358,
0.4336168169975281,
... | |
What program can I use to decompile a class file? Will I actually get Java code, or is it just JVM assembly code?
On Java performance questions on this site I often see responses from people who have "decompiled" the Java class file to see how the compiler optimizes certain things.
Update February 2016:
[www.javadeco... | [
0.09943529963493347,
0.036476828157901764,
-0.08139601349830627,
-0.1434771716594696,
-0.32994481921195984,
0.04163278266787529,
0.6079919338226318,
-0.1824469119310379,
-0.013876554556190968,
-0.7352052927017212,
-0.002256531035527587,
0.3187679648399353,
-0.23589518666267395,
0.091447994... | |
other tools.
And javadecompiler, as noted by [Salvador Valencia](https://stackoverflow.com/users/1377112/salvador-valencia) in [the comments](https://stackoverflow.com/questions/272535/how-do-i-decompile-java-class-files/272595#comment79458645_272595) (Sept 2017), offers a SaaS where you upload the `.class` file to th... | [
-0.19442643225193024,
0.31159767508506775,
0.3807374835014343,
-0.07340671867132187,
-0.11945460736751556,
0.0513012632727623,
0.40744009613990784,
-0.39591091871261597,
-0.14392460882663727,
-0.32459285855293274,
-0.35732513666152954,
0.3114622235298157,
-0.4393095076084137,
0.01626458577... | |
JAD: they can not display Java 5 sources.
[Java Decompiler](http://jd.benow.ca/) (Yet another Fast Java decompiler) has:
* Explicit support for decompiling and analyzing **Java 5+** “.class” files.
* A nice GUI:

It works with compilers from JDK 1.1.8 up to JDK 1.7.... | [
0.2761862576007843,
0.19591359794139862,
0.1481141746044159,
-0.05275052413344383,
-0.2997422516345978,
-0.25188755989074707,
0.6009571552276611,
-0.0026457624044269323,
-0.07481840997934341,
-0.7506211996078491,
0.1319476068019867,
0.5616860389709473,
-0.052302174270153046,
-0.04408548399... | |
How can I get Direct3D to work over a Remote Desktop connection? I am using Windows XP Professional.
3D acceleration does not work on Remote Desktop or in Virtual PC/Server.
Software-rendered OpenGL works on both Remote Desktop and Virtual PC/Server. | [
-0.014393338933587074,
0.10284339636564255,
0.6152828931808472,
0.19488723576068878,
-0.5840076208114624,
-0.09665843099355698,
0.04695906490087509,
0.3767969310283661,
0.074088454246521,
-0.8620423674583435,
0.0973631963133812,
0.7753291726112366,
-0.12251465022563934,
0.2521583139896393,... | |
How can I achieve a cool looking photo gallery page? I don't know Flash, but can learn, and thought about a random collage that 'pulls out' a photo that you hover over.
It's for a photographer, so no thumbnails, grids, etc.
If you're looking for a tool that's pretty flexible and will support itself later on as you can... | [
0.5277538895606995,
-0.1517285406589508,
0.11382614076137543,
0.18712608516216278,
0.004743081051856279,
-0.2485305815935135,
0.1692470908164978,
-0.018771929666399956,
-0.17574258148670197,
-0.7906490564346313,
0.05536961928009987,
0.31098657846450806,
0.1645018458366394,
-0.1415741145610... | |
stand-alone product which incorporates some of the features you've described [StudioCloud](http://studiocloud.com/OnlineGallery.html) has a nice one that has a monthly fee... | [
0.7932080626487732,
0.15884700417518616,
0.143043652176857,
0.08289998769760132,
0.035856571048498154,
-0.2092990279197693,
-0.12128646671772003,
0.00979347713291645,
-0.01242996845394373,
-0.24213330447673798,
-0.13071401417255402,
0.3472168445587158,
0.3424135446548462,
-0.02864390984177... | |
How can I read the status of the battery on my MacBookPro from my own application?
Googling has so far only revealed APIs for device drivers to handle power events - there's nothing about user-land processes accessing this information.
thanks.
You'll want to use IOKit for this, specifically the [IOPowerSources functi... | [
0.3812180459499359,
0.07218565046787262,
0.46664249897003174,
0.05908149853348732,
0.23019813001155853,
0.11330775916576385,
-0.140389546751976,
-0.3620736300945282,
0.059633519500494,
-0.40518897771835327,
-0.11677809804677963,
0.9573093056678772,
-0.2905236780643463,
-0.34287208318710327... | |
I'm especially interested in memory profiling, reducing the size of a compiled .swf, measuring network latency, etc. Also, I'm focussed entirely on AS3.
The latest [Flex Builder Professional](http://www.adobe.com/products/flex/features/flex_builder/) includes both memory and performance profilers built in:
***Powerful... | [
-0.02006891928613186,
0.3106069266796112,
0.3332614004611969,
-0.21447326242923737,
-0.4423123896121979,
0.07002296298742294,
0.19632093608379364,
-0.45951730012893677,
-0.07686035335063934,
-0.8306095004081726,
-0.04370378702878952,
0.8933415412902832,
0.07861847430467606,
-0.425446152687... | |
haven't heard of built-in tools to do anything like that -- would a [packet sniffer](http://www.wireshark.org/) suit your needs for that? | [
0.9424359202384949,
-0.16664652526378632,
-0.09079773724079132,
0.6689668893814087,
0.38650253415107727,
-0.6663411259651184,
-0.021147340536117554,
-0.1500515192747116,
-0.06424184888601303,
-0.1266019493341446,
0.22025059163570404,
0.2743757367134094,
-0.36622926592826843,
-0.34485000371... | |
We are developing a WPF application that uses the System.AddIn framework to host add-ins that display additional WPF content. Everything seems to be working fine, but overnight, the application threw the following NullReferenceException:
```
Message: Error : Object reference not set to an instance of an object.
Stack... | [
0.061021026223897934,
-0.15665790438652039,
0.7561846375465393,
0.21400530636310577,
0.10690639168024063,
-0.07193660736083984,
0.3289811909198761,
-0.5607271194458008,
-0.28059229254722595,
-0.8180718421936035,
-0.23972788453102112,
0.5148757100105286,
-0.3563115894794464,
-0.034628760069... | |
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at S... | [
-0.3235093653202057,
-0.12234053015708923,
0.54931640625,
0.1223401203751564,
-0.023465435951948166,
0.39031463861465454,
0.22681643068790436,
-0.5562743544578552,
-0.47466278076171875,
-0.6546501517295837,
-0.37195560336112976,
0.49676910042762756,
-0.09229091554880142,
0.0411127582192420... | |
TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.WeakE... | [
-0.06949087232351303,
0.01280375849455595,
0.438515841960907,
-0.07379868626594543,
0.336978018283844,
0.48338571190834045,
0.1543843299150467,
-0.24273908138275146,
-0.5611797571182251,
-0.8160126805305481,
-0.16875839233398438,
0.354869544506073,
-0.32518818974494934,
0.14523634314537048... | |
help!
It's going to sound dumb, but ...uh... "layout your cell before you exit heightForRowAtIndexPath" ;)
Seriously, though -- the OS only ever calls this if it's going to be needed (as in: it's about to create the cell & display it on screen), so laying it out & getting ready to display is not wasted effort.
Note, ... | [
-0.045717597007751465,
0.04810028150677681,
0.6581044793128967,
-0.23661291599273682,
0.247582346200943,
-0.08985797315835953,
0.5605534911155701,
-0.38527077436447144,
-0.19127874076366425,
-0.76717209815979,
-0.1414119303226471,
0.8465926647186279,
-0.271879643201828,
-0.2441765815019607... | |
[self prepLayoutForCellAtIndex:index];
}
return (heightTable[index]);
```
Heck, even if the data changes, you can either recalculate the table value in the method that changes the data, or clear to 0 so it gets recalculated the next time it's needed. | [
-0.11533218622207642,
0.0017941334517672658,
0.6165541410446167,
-0.16134600341320038,
0.056339286267757416,
-0.09329887479543686,
0.46550077199935913,
-0.3230176568031311,
-0.20204587280750275,
-0.3033001124858856,
0.015520250424742699,
0.9090985059738159,
-0.17826487123966217,
-0.1627215... | |
I'm doing some shennanigans with jQuery to put little plus/minus icons next to my expanders. Its similar to the windows file trees, or firebugs code expanders.
It works, but its not specific enough.
Hopefully this makes sense...
```
$('div.toggle').hide();//hide all divs that are part of the expand/collapse
$('ul.p... | [
-0.11026662588119507,
-0.3231688439846039,
0.9426172971725464,
-0.37545299530029297,
0.09361521154642105,
0.11560530960559845,
0.014898264780640602,
-0.4675089716911316,
-0.10726697742938995,
-0.6431675553321838,
-0.3198159337043762,
0.5427159070968628,
-0.24934399127960205,
0.163324937224... | |
</a>
<div class="toggle"><p>Content viewable when expanded!</p></div>
</li>
</ul>
```
There are loads of `$('img.expander')` tags on the page, but I need to be specific. I've tried the next() functionality ( like I've used to find the next div), but it says that its undefined. How can I locate my specific img.exp... | [
0.19372747838497162,
-0.04094831645488739,
0.7742527723312378,
-0.3957351744174957,
-0.23999634385108948,
-0.010233106091618538,
0.1733795702457428,
-0.6060649752616882,
-0.14721597731113434,
-0.3518155813217163,
-0.3618963062763214,
0.4152868390083313,
-0.6334432363510132,
0.2072504758834... | |
event.preventDefault();
$(this).next('div').slideToggle(200);
$(this).contents('img.expander').attr('src','img/content/info-close.gif');
//alert('on');
},function(event) { // same here
event.preventDefault(); | [
-0.1764950156211853,
-0.3691903054714203,
0.5459297895431519,
-0.36176931858062744,
0.2408347725868225,
-0.1025453507900238,
0.18343931436538696,
-0.15295937657356262,
-0.13629929721355438,
-0.4981958866119385,
-0.4218546748161316,
0.696614682674408,
-0.3573262095451355,
0.2579456865787506... | |
$(this).next('div').slideToggle(200);
$(this).contents('img.expander').attr('src','img/content/info-open.gif');
});
```
```
$(this).contents('img.expander')
```
This is what you want. It will select all of the nodes that are children of your list. In your case, all of your images are nest... | [
0.008802039548754692,
-0.14926084876060486,
0.7799087762832642,
-0.13364344835281372,
0.28681379556655884,
0.058790408074855804,
-0.1653420329093933,
-0.1647941917181015,
-0.264259397983551,
-0.8613920211791992,
-0.2425282746553421,
0.4064805209636688,
-0.6487371921539307,
0.12874920666217... | |
I have a class called `Ship` and a class called `Lifeboat`
Lifeboat inherits from Ship.
Ship contains a method called `Validate()` which is called before save and it has an abstract method called `FurtherValidate()` which it calls from Validate. The reason this is in place is so when you call validate on the base it ... | [
0.16761203110218048,
0.034743569791316986,
0.40315037965774536,
-0.015842003747820854,
0.1819179207086563,
-0.0990520492196083,
-0.19301559031009674,
-0.6167473793029785,
-0.1561804562807083,
-0.6584005951881409,
-0.1766846776008606,
0.3732839524745941,
0.14107660949230194,
0.4367905557155... | |
means anyone implementing `Ship` also needs to provide their own validation for their class and it's guaranteed to be called on the save as the base ship. `Validate()` is called which in turns calls the inherited validate.
How can we re work this so we still force inherited classes to implement `FurtherValidate()` but... | [
0.30423209071159363,
-0.20560379326343536,
0.30127331614494324,
0.13332942128181458,
0.3137521743774414,
-0.33914515376091003,
0.11847692728042603,
-0.26224181056022644,
-0.2897738516330719,
-0.32489198446273804,
-0.14128822088241577,
0.5075227618217468,
0.0895235612988472,
0.3049476742744... | |
it to only classes in the same assembly by using the `internal` modifier, but this would still allow the programmer writing the derived class to call FurtherValidate any time they wish. Using both protected and internal combines the two and really means that is restricted to derived classes or classes defined in the sa... | [
-0.09999117255210876,
-0.06163749843835831,
0.16518236696720123,
0.05043330043554306,
0.08367526531219482,
-0.33873024582862854,
0.40319040417671204,
-0.10813923180103302,
-0.02641458623111248,
-0.4185522496700287,
-0.09246422350406647,
0.7964582443237305,
-0.07519077509641647,
0.096123605... | |
achieve this using reflection to interrogate who your caller is, but I think the performance costs of doing this would be too high compared to the benefit. | [
0.47511598467826843,
0.2020527422428131,
0.22908025979995728,
0.18837817013263702,
0.23826579749584198,
-0.25556278228759766,
0.42303329706192017,
-0.2078300416469574,
0.37551096081733704,
-0.8822892904281616,
0.19980491697788239,
0.3785794675350189,
0.20805299282073975,
-0.438793778419494... | |
I am trying to add a png image resource in a specific Silverlight project folder. I would like to refer to this image with in my tag? I only seem to get this working when the xaml file containing the image tag is located in the same directory as the png file.
For example in the xap file the png file would be located ... | [
0.6261626482009888,
0.12718921899795532,
0.5744661092758179,
-0.13079959154129028,
-0.13699771463871002,
-0.14189913868904114,
0.000534496211912483,
-0.14614194631576538,
-0.23039864003658295,
-0.8374028205871582,
-0.009066139347851276,
0.6987956762313843,
-0.5581598281860352,
-0.030238499... | |
work from XAML,
>
> but not from code. It needs to be
> * pack://application:,,,/WpfApplication6;component/Images/happyface.png
> If you do this, Blend resolves well
>
> all the time! | [
0.31754934787750244,
-0.29903504252433777,
0.7816954255104065,
-0.3459645211696625,
0.32400259375572205,
-0.3580310344696045,
0.3893887996673584,
-0.5217478275299072,
-0.11109941452741623,
-0.7514732480049133,
-0.33962345123291016,
0.6734583973884583,
-0.48514795303344727,
-0.5108170509338... | |
I would like to print *only* the contents of a textarea element from a website page. In particular, I would like to ensure that nothing gets clipped by the boundary of the textarea as the contents will be quite large.
What is the best strategy for tackling this?
Make a print stylesheet where all of the elements *excep... | [
0.5254276990890503,
0.1561872959136963,
0.46792080998420715,
0.11417703330516815,
0.1321604996919632,
-0.4878876805305481,
0.33501479029655457,
-0.21290552616119385,
-0.1986115723848343,
-0.8938241004943848,
-0.38376709818840027,
0.4742222726345062,
-0.18549464643001556,
-0.054281570017337... | |
I've honestly [tried](https://stackoverflow.com/questions/35420/mysql-software-any-suggestions-to-oversee-my-mysql-replication-server) [this](https://stackoverflow.com/questions/8365/mysql-administrator-backups-compatibility-mode-what-exactly-is-this-doing) [left](https://stackoverflow.com/questions/30660/mysql-binary-... | [
0.4489348828792572,
0.2024834156036377,
0.5863920450210571,
-0.0048767682164907455,
0.08612558990716934,
0.047369249165058136,
0.26272958517074585,
-0.1040860190987587,
-0.5644491910934448,
-0.5387508273124695,
0.13943438231945038,
0.3134699761867523,
0.17602534592151642,
0.228774160146713... | |
real hour, your slave will fall behind.
If you can't find ways to improve the write performance on your slave (more memory, faster disks, remove unnecessary indexes), you've hit a limitation in your applications architecture. Eventually you will hit a point that you can't execute the changes in real time as fast as yo... | [
0.49206891655921936,
-0.3558388948440552,
0.34076687693595886,
0.23333337903022766,
0.09269236028194427,
0.0924578532576561,
0.13710907101631165,
0.20520484447479248,
-0.03980613872408867,
-0.8423218727111816,
0.031952980905771255,
0.6302101016044617,
-0.2800831198692322,
0.160307526588439... | |
find a way to make binlog replication execute statements in parallel you probably won't find a better way of doing it.
**Update (2017)**: MySQL now support [parallel slave worker threads](https://dev.mysql.com/doc/refman/5.7/en/replication-options-slave.html#sysvar_slave_parallel_workers). There are still many variabl... | [
0.2681615650653839,
-0.1522286832332611,
0.2566280663013458,
0.25980454683303833,
0.044516198337078094,
-0.12013080716133118,
0.4362822473049164,
-0.05891247093677521,
-0.51667320728302,
-0.8107913136482239,
0.11462541669607162,
0.35102948546409607,
-0.3585008382797241,
0.370045006275177,
... | |
I am writing an application which blocks on input from two `istreams`.
Reading from either `istream` is a synchronous (blocking) call, so, I decided to create two `Boost::thread`s to do the reading.
Either one of these threads can get to the "end" (based on some input received), and once the "end" is reached, both in... | [
-0.14088429510593414,
0.14291666448116302,
0.5272818207740784,
-0.09555505216121674,
-0.19097374379634857,
0.111850306391716,
0.2771439254283905,
-0.2760355472564697,
0.055937476456165314,
-0.5025584101676941,
0.013256922364234924,
0.33316150307655334,
-0.21116803586483002,
0.2938097119331... | |
itself decide it is time to return (condition variables or what not).
Is their a way to either:
* Send a signal a boost::thread, or
* Force an `istream` to "fail", or
* Kill a Boost::thread?
Note:
* One of the `istreams` is `cin`
* I am trying to restart the process, so I cannot close the input streams in a way tha... | [
0.13778331875801086,
-0.27544480562210083,
0.7246816754341125,
-0.1457257866859436,
0.1537819802761078,
-0.0318882130086422,
0.039420850574970245,
0.012193512171506882,
-0.055230822414159775,
-0.5088524222373962,
-0.061125971376895905,
0.32671138644218445,
-0.15454980731010437,
0.207907751... | |
need both threads to exit and cleanup properly :(
Thanks!
I don't think there is a way to do it cross platform, but pthread\_cancel should be what you are looking for. With a boost thread you can get the [native\_handle](http://www.boost.org/doc/libs/1_37_0/doc/html/thread/thread_management.html#thread.thread_manageme... | [
0.08202321827411652,
-0.1336892545223236,
0.24942341446876526,
0.07789783924818039,
0.010637948289513588,
-0.27419543266296387,
0.15988747775554657,
-0.15171901881694794,
-0.4185726046562195,
-0.6468519568443298,
-0.10462141036987305,
0.8067834973335266,
-0.4049765467643738,
-0.05118850618... | |
I have a NotifyIcon control that appears in the system tray. How can I find the location (x, y) of the icon on the screen?
Thanks
You can't. It isn't hard to get the window handle for the system tray, GetClassName() returns "ToolbarWindow32", the class name of the standard TOOLBAR common control. Beware that a 64-bit ... | [
0.3456176221370697,
-0.07525220513343811,
0.34868940711021423,
0.1281471699476242,
0.08930858224630356,
0.08211977779865265,
0.31968194246292114,
0.11008097231388092,
-0.26138705015182495,
-0.7140376567840576,
-0.020243605598807335,
0.754912257194519,
-0.37537166476249695,
0.10706122964620... | |
able to lock them. | [
-0.10043347626924515,
0.16064219176769257,
-0.057557813823223114,
0.6389148235321045,
-0.297717809677124,
-0.08777125924825668,
0.3388892412185669,
-0.3210442364215851,
-0.23375044763088226,
-0.39316216111183167,
-0.21142560243606567,
0.13411736488342285,
-0.14461372792720795,
-0.035232201... | |
What is the best way to get the application name (i.e MyApplication.exe) of the executing assembly from a referenced class library in C#?
I need to open the application's app.config to retrieve some appSettings variables for the referenced DLL.
If you want to get the current appdomain's config file, then all you need ... | [
0.24399374425411224,
0.07836556434631348,
0.4078370928764343,
0.07556965202093124,
0.25442901253700256,
0.00855807214975357,
0.24501356482505798,
-0.3502112329006195,
-0.12110748142004013,
-0.8003149628639221,
-0.09595806896686554,
0.7680263519287109,
-0.5122601985931396,
-0.03873131796717... | |
I am the tech intern for an online independent newspaper, and the writers on the staff are not tech-savvy. They don't quite understand how web pages work, and often they upload and include images straight from their digital cameras, or scanned from original media. These images become a burden when there are 10 images o... | [
0.8020089864730835,
0.2847979664802551,
0.3491441309452057,
0.20843210816383362,
0.008961754851043224,
-0.18191565573215485,
-0.22982335090637207,
0.2127014398574829,
0.04096545651555061,
-0.3809909224510193,
-0.06041094288229942,
0.3338162899017334,
0.3146131634712219,
-0.0329750478267669... | |
any method we attempt to employ may go way over their heads.
So, I wanted to know if it is outside of reason to attempt to resample and cache images that are included in the articles using a PHP function and the GD library in order to stream line the amount of data that has to be passed per article.
I think it's poss... | [
0.69230717420578,
0.2602715790271759,
0.27875661849975586,
0.43317312002182007,
-0.09806343913078308,
-0.27786460518836975,
0.2621120512485504,
-0.06483282148838043,
-0.043252747505903244,
-0.5867077112197876,
0.09449978172779083,
0.5475329160690308,
-0.141890287399292,
-0.0498831421136856... | |
image processing during the upload process. GD can take up quite a bit of resources, so processing each image on every request would not be a preferable solution. If you can't do it during the upload process, you should cache all the resampled images and use those if/when available. | [
0.1012500673532486,
-0.39699333906173706,
0.525822103023529,
0.39414453506469727,
-0.20512539148330688,
-0.12084711343050003,
0.03687793016433716,
-0.18633781373500824,
-0.3113548755645752,
-0.6490659117698669,
-0.2859930396080017,
0.6510239243507385,
-0.37633955478668213,
0.04597155749797... | |
I need to generate buttons initially based on quite a processor and disk intensive search. Each button will represent a selection and trigger a postback. My issue is that the postback does not trigger the command b\_Command. I guess because the original buttons have not been re-created. I cannot affort to execute the o... | [
0.05623263865709305,
0.15595653653144836,
0.335004061460495,
-0.21269944310188293,
-0.04693891480565071,
0.1900896579027176,
0.14053986966609955,
-0.36916035413742065,
-0.17160825431346893,
-0.6367804408073425,
-0.0022919781040400267,
0.6115226149559021,
-0.28994694352149963,
0.27429634332... | |
- if at all?
```
namespace CloudNavigation
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
// how can I re-generate the button and hook up the event here | [
0.08120239526033401,
-0.16244837641716003,
0.4091860055923462,
0.12264157086610794,
0.11465081572532654,
-0.06760562211275101,
0.3627305030822754,
-0.06039467081427574,
-0.13839730620384216,
-0.6332950592041016,
-0.25839728116989136,
0.40911489725112915,
-0.3703688681125641,
0.041716810315... | |
// without executing heavy search 1
}
else
{
// Execute heavy search 1 to generate buttons
Button b = new Button(); | [
-0.16930744051933289,
-0.328799307346344,
0.2819453179836273,
-0.4820733368396759,
-0.002552558435127139,
0.27050238847732544,
0.4164174497127533,
-0.541759729385376,
-0.3254787027835846,
-0.39271223545074463,
-0.4132474660873413,
0.4096274971961975,
-0.5355854034423828,
-0.188729673624038... | |
b.Text = "Selection 1";
b.Command += new CommandEventHandler(b_Command);
Panel1.Controls.Add(b);
}
}
void b_Command(object sender, CommandEventArgs e)
{ | [
0.04631653428077698,
-0.22878825664520264,
0.2136334627866745,
-0.35801053047180176,
0.09313765913248062,
0.2022860050201416,
0.2919193506240845,
-0.41317498683929443,
-0.20782649517059326,
-0.47647303342819214,
-0.5157070755958557,
0.5062459707260132,
-0.5506806373596191,
0.16962221264839... | |
// Execute heavy search 2 to generate new buttons
Button b2 = new Button();
b2.Text = "Selection 2";
b2.Command += new CommandEventHandler(b_Command);
Panel1.Controls.Add(b2);
}
}
}
```
The b\_Command Event Handler method is not being executed because on post... | [
0.020933927968144417,
-0.2718389928340912,
0.27791452407836914,
-0.46405133605003357,
0.04169319197535515,
0.014215526171028614,
0.3835739195346832,
-0.5575746893882751,
-0.3098624050617218,
-0.3922264575958252,
-0.40353843569755554,
0.6628471612930298,
-0.5460586547851562,
-0.052492767572... | |
generated). You need to re-create them every time your page gets recreated but in order to do this you need to explicitly cache information somewhere in state.
If this a page-scoped operation easiest way is to store it in the ViewState (as strings - if you start loading the ViewState with objects you'll see performan... | [
0.25882840156555176,
-0.383805513381958,
0.43675702810287476,
0.4177093803882599,
-0.13661563396453857,
0.011193412356078625,
0.1435169130563736,
-0.32071080803871155,
-0.6128478050231934,
-0.6696242690086365,
-0.05859563499689102,
0.5013080835342407,
-0.2927815914154053,
0.078866139054298... | |
(or Init) to re-create your controls.
This scenario means that you need just to store some info about your button in your b\_Command EventHandler instead of creating and adding buttons since if you do so you'll lose relative information in the next postback (as it is happening now).
so your code would become somethin... | [
0.010245434008538723,
-0.5179479122161865,
0.4976765513420105,
0.029459690675139427,
0.31316447257995605,
0.07164019346237183,
0.2710796594619751,
-0.0398533008992672,
-0.24460655450820923,
-0.7262303233146667,
-0.04961099103093147,
0.3244937062263489,
-0.42081019282341003,
0.1455380022525... | |
(IsPostBack)
{
this.recreateButtons();
}
else
{
// Execute heavy search 1 to generate buttons | [
-0.0288893710821867,
-0.338337242603302,
0.4013274013996124,
-0.3404693901538849,
-0.0012579538160935044,
0.44926556944847107,
0.30328020453453064,
-0.5288363695144653,
-0.2850569784641266,
-0.5360152721405029,
-0.06549982726573944,
0.6021362543106079,
-0.34898635745048523,
-0.090423561632... | |
Button b = new Button();
b.Text = "Selection 1";
b.Command += new CommandEventHandler(b_Command);
Panel1.Controls.Add(b);
//store this stuff in ViewState for the very first time
} | [
0.09157117456197739,
-0.39995890855789185,
0.6676748394966125,
-0.22968421876430511,
0.26118823885917664,
0.06737722456455231,
-0.009912451729178429,
-0.17879031598567963,
-0.4265563488006592,
-0.5649972558021545,
-0.12734872102737427,
0.6526195406913757,
-0.48110249638557434,
0.0526437833... | |
}
void b_Command(object sender, CommandEventArgs e)
{
//Execute heavy search 2 to generate new buttons
//TODO: store data into ViewState or Session
//and maybe create some new buttons
}
void recreateButtons() | [
0.21216796338558197,
-0.42692914605140686,
0.3144584894180298,
-0.1866367906332016,
0.31971341371536255,
0.23489990830421448,
0.3020632266998291,
-0.393759548664093,
-0.2604714334011078,
-0.5483148097991943,
-0.12318550795316696,
0.7247949242591858,
-0.45137959718704224,
-0.096826463937759... | |
{
//retrieve data from ViewState or Session and create all the buttons
//wiring them up to eventHandler
}
}
}
```
If you don't want to call recreateButtons on page load you can do it on PreLoad or on Init events, I don't see a difference since you'll be able to access ViewState/Ses... | [
0.3653028905391693,
-0.2881334722042084,
0.5042545199394226,
0.1048954650759697,
0.02214738354086876,
-0.2340356856584549,
0.18284229934215546,
-0.2014191895723343,
-0.20312117040157318,
-0.8272247910499573,
-0.05796424299478531,
0.7461630702018738,
-0.37220099568367004,
0.1591470092535019... | |
to re-create your dynamic buttons).
Someone will hate this solution but as far as I know the only way to retain state data server-side is **ViewState** - **Session** - Page.Transfer or client-side cookies. | [
0.13571536540985107,
-0.2519046366214752,
0.6879380941390991,
0.208747997879982,
0.11677554249763489,
0.10794518142938614,
0.5304481983184814,
0.007148032542318106,
-0.548104465007782,
-0.7876555919647217,
0.10519780218601227,
0.45758071541786194,
-0.22539517283439636,
0.25824829936027527,... | |
If I have a function that returns an object, but this return value is never used by the caller, will the compiler optimize away the copy? (Possibly an always/sometimes/never answer.)
Elementary example:
```
ReturnValue MyClass::FunctionThatAltersMembersAndNeverFails()
{
//Do stuff to members of MyClass that never... | [
0.26991039514541626,
0.20663458108901978,
0.4200800657272339,
-0.0700734481215477,
0.2422257363796234,
-0.41646185517311096,
0.5572215914726257,
-0.2659570276737213,
-0.014441207982599735,
-0.4577031135559082,
-0.18915528059005737,
0.5955320000648499,
-0.17384353280067444,
0.24619011580944... | |
modern ones.)
EDIT: Let's simplify this a bit, since there doesn't seem to be a consensus in the general case. What if `ReturnValue` is an int, and we return 0 instead of `successfulResultObject`?
If the ReturnValue class has a non-trivial copy constructor, the compiler must not eliminate the call to the copy construc... | [
-0.050505898892879486,
0.16585732996463776,
0.2529730498790741,
0.006503148004412651,
-0.06855273991823196,
-0.21978935599327087,
0.431986004114151,
-0.327532023191452,
-0.021293850615620613,
-0.648881733417511,
-0.2162705957889557,
0.7643183469772339,
-0.4849178194999695,
0.10542230308055... | |
We have a pretty mature COM dll, which we test using DUnit. One of our recent tests creates a few threads, and tests the object from those threads. This test works fine when running the test using the gui front-end, but hangs when running as a console application. Here's a quick pseudo view of what we have in the test
... | [
0.06848298013210297,
-0.09797132760286331,
0.6313272714614868,
0.09781365096569061,
0.0927668958902359,
0.15586097538471222,
0.45880886912345886,
-0.10997934639453888,
0.08800782263278961,
-0.7192096710205078,
0.1712108850479126,
0.7831798791885376,
-0.31268057227134705,
0.0236511025577783... | |
so I'm sure it's not the actual code I'm testing. In the console, fThreadRefCount never decrements, while if I run it as a gui app, it's fine!
As far as I can see, the OnTerminate event is just not called.
You need to provide more data.
Note that `OnTerminate` is called via `Synchronize()`, which requires a call to `... | [
0.054042425006628036,
0.15571989119052887,
0.7373610734939575,
0.0468435138463974,
0.25716376304626465,
-0.29734477400779724,
0.1102825477719307,
0.04000351205468178,
-0.24245326220989227,
-0.6089708209037781,
-0.11289634555578232,
0.7114973068237305,
-0.4058155417442322,
0.311265021562576... | |
Classes, Forms;
var
threadCount: Integer;
type
TMyThread = class(TThread)
public
procedure Execute; override;
class procedure Go;
class procedure HandleOnTerminate(Sender: TObject);
end;
procedure TMyThread.Execute;
begin
end;
class procedure TMyThread.Go;
function MakeThread: TThread;
begin... | [
-0.21081309020519257,
-0.19462242722511292,
0.7261579036712646,
-0.17119914293289185,
0.4204844832420349,
0.4438926875591278,
0.47583580017089844,
-0.39622995257377625,
-0.07688670605421066,
-0.5259465575218201,
-0.7209266424179077,
0.6402328014373779,
-0.3626132011413574,
0.38634076714515... | |
TMyThread.Go;
except
on e: Exception do
Writeln(e.Message);
end;
end.
``` | [
0.018820390105247498,
0.07588442414999008,
0.1634417027235031,
-0.26072242856025696,
0.12064792960882187,
-0.4318508505821228,
0.672290027141571,
0.12729424238204956,
-0.16574467718601227,
-0.3385917842388153,
-0.6175092458724976,
0.681914746761322,
-0.1748531311750412,
0.3158458173274994,... | |
We have a Linux application that makes use of OpenSSL's Python bindings and I suspect it is causing random crashes. Occasionally, we see it crash with the message:
> Python Fatal Error: GC Object already tracked
which would appear to be either a programming error on the part of the library, or a symptom of memory co... | [
0.20641489326953888,
0.22004437446594238,
-0.14676859974861145,
0.32868486642837524,
-0.066484235227108,
-0.3881092965602875,
0.23096980154514313,
0.40945005416870117,
-0.5102267265319824,
-0.18919500708580017,
-0.04099372774362564,
0.5164494514465332,
-0.4131110906600952,
0.20724900066852... | |
with this. Currently it is running with the trace module active and we're hoping it will happen again, but it could be a long while.
Yes, you can do this kind of thing:
```
(gdb) print PyRun_SimpleString("import traceback; traceback.print_stack()")
File "<string>", line 1, in <module>
File "/var/tmp/foo.py", line ... | [
0.05290813744068146,
-0.13546738028526306,
0.46108195185661316,
-0.17810113728046417,
0.2047899067401886,
-0.274079829454422,
0.18197770416736603,
-0.21171507239341736,
-0.3953356146812439,
-0.5470699071884155,
0.02495448850095272,
0.6419505476951599,
-0.5934011936187744,
-0.25277295708656... | |
worth noting that you can use [`valgrind`](http://valgrind.org/) with python, if you're prepared to recompile it. The procedure is described [here.](http://svn.python.org/projects/python/trunk/Misc/README.valgrind) | [
-0.16395744681358337,
-0.09659705311059952,
0.22143685817718506,
-0.30044999718666077,
0.055327679961919785,
-0.364934504032135,
0.3859139382839203,
0.09755541384220123,
-0.46494343876838684,
-0.2368401736021042,
-0.40636900067329407,
0.8251329660415649,
-0.17789359390735626,
-0.2946716547... | |
How can I calculate the last business day of the month in .NET?
I would do it like this for a Monday through Friday business week:
```
var holidays = new List<DateTime>{/* list of observed holidays */};
DateTime lastBusinessDay = new DateTime();
var i = DateTime.DaysInMonth(year, month);
while (i > 0)
{
var dtCurren... | [
0.01984267309308052,
-0.1919410526752472,
0.882226288318634,
-0.07315199077129364,
0.15902520716190338,
-0.030074339359998703,
0.4029475152492523,
-0.1418934166431427,
-0.35696321725845337,
-0.4652634561061859,
-0.19733722507953644,
0.5432142019271851,
-0.09922848641872406,
0.2600930035114... | |
i = i - 1;
}
}
``` | [
0.008732817135751247,
0.4150458574295044,
0.11002901196479797,
-0.46118322014808655,
0.12207194417715073,
-0.20540864765644073,
0.4192820191383362,
-0.1970798820257187,
0.14724238216876984,
-0.36910489201545715,
-0.26060372591018677,
0.5226761102676392,
-0.36907610297203064,
0.470010787248... | |
I'm looking to patch a piece of abandonware with some code.
The software is carbon based, so I can not use an InputManager (at least, I do not think I can). My idea was to add a dylib reference to the mach-o header, and launch a new thread when the initialization routine is called.
I have mucked around with the mach-... | [
0.2571491301059723,
0.370197057723999,
0.46582427620887756,
-0.13302339613437653,
0.41638708114624023,
-0.2222878634929657,
-0.16847792267799377,
0.15612101554870605,
-0.13786141574382782,
-0.8244735598564148,
-0.13375596702098846,
0.5467707514762878,
-0.3096429705619812,
0.220080807805061... | |
LC_LOAD_DYLIB
cmdsize 60
name @executable_path/libAltInput.dylib (offset 24)
time stamp 1183743291 Fri Jul 6 19:34:51 2007
current version 0.0.0
compatibility version 0.0.0
```
However, launching the binary gives me the following error
```
dyld: bad external relocation length
```
All I ca... | [
-0.1692666858434677,
0.17123587429523468,
0.642991840839386,
0.00984069611877203,
0.20688073337078094,
-0.12970371544361115,
0.25605738162994385,
-0.1325499266386032,
-0.19488616287708282,
-0.678180992603302,
-0.10504676401615143,
1.0767384767532349,
-0.3117842972278595,
0.4054265022277832... | |
it starts. A great source of information on doing this (as well as running code to do it) can be found here: <http://rentzsch.com/mach_inject/>.
Some caveats that you should be aware of:
1. the mach task\_for\_pid() call necessary to get the mach port to the task is now privleged and requires authorization to call. T... | [
0.22585296630859375,
-0.11742179095745087,
0.428737610578537,
0.07658520340919495,
0.16975489258766174,
-0.4066939055919647,
-0.08485173434019089,
0.06756433844566345,
-0.3617558181285858,
-0.7053024768829346,
-0.05919528380036354,
0.7279120683670044,
0.04618215560913086,
0.178593456745147... | |
to the application, however, if it is not thread-aware be very careful about using and manipulating data from outside of your injected code. Obviously all multithreaded issues will be amplified here because the original code was never aware of your additions. | [
0.39248910546302795,
0.07053282856941223,
0.15846820175647736,
0.24428628385066986,
0.22845026850700378,
-0.32050463557243347,
0.24532335996627808,
0.007244839332997799,
-0.23567505180835724,
-0.4486246407032013,
0.01931140571832657,
0.552550196647644,
-0.2849119305610657,
-0.0035318734589... | |
Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.)
*(1) Update: My mistake. I had downloaded the [non-SP1 samples](http://www.microsoft.com/downloads/details.aspx?FamilyId=01AE159F-08CD-495B-8... | [
-0.06335247308015823,
-0.13842302560806274,
0.3536970317363739,
0.11592184752225876,
-0.2349414825439453,
-0.09159047156572342,
0.07951458543539047,
-0.1883348822593689,
-0.5400454998016357,
-0.536477267742157,
0.10373640805482864,
0.2971917390823364,
-0.16519348323345184,
0.09494455903768... | |
a good time to try the new Feature Pack tooltip classes.
Is there any way to make these things work without overriding PreTranslateMessage() and manually calling RelayEvent()? (I don't think I've seen anything in MFC as poorly designed as tooltips.)
It doesn't seem as simple as merely calling CTooltipManager::CreateT... | [
0.4287332594394684,
-0.2887168526649475,
0.127710223197937,
0.031245000660419464,
-0.05398189276456833,
-0.09562566876411438,
0.4207594692707062,
-0.21667543053627014,
-0.26953721046447754,
-0.8337026834487915,
0.2017020583152771,
0.6670454740524292,
-0.11333639919757843,
-0.10853489488363... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.