text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
From my experiments, it does not appear to do so. If this is indeed true, what is the best method for removing line breaks? I'm currently experimenting with the parameters that TRIM accepts of the character to remove, starting with trimming `\n` and `\r`.
`Trim()` in MySQL only removes spaces.
I don't believe there is... | [
0.10467078536748886,
0.2703579068183899,
-0.025650350376963615,
-0.09651850163936615,
0.10080213099718094,
0.3102400302886963,
0.22786861658096313,
0.016886556521058083,
0.009852650575339794,
-0.5673758387565613,
-0.23091210424900055,
0.27987346053123474,
-0.34438982605934143,
0.0369334258... | |
I'm currently working on some logging code that supposed to - among other things - print information about the calling function. This should be relatively easy, standard C++ has a `type_info` class. This contains the name of the typeid'd class/function/etc. but it's mangled. It's not very useful. I.e. `typeid(std::vect... | [
0.3387318551540375,
0.036945488303899765,
0.13002626597881317,
0.10624689608812332,
0.020676612854003906,
-0.10012364387512207,
0.19212186336517334,
-0.0009120154427364469,
-0.04574130102992058,
-0.6229978799819946,
0.20074164867401123,
0.47107183933258057,
-0.461418479681015,
0.2919577956... | |
it can't be turned off, but it should be helpful for debugging.
Given the attention this question / answer receives, and the valuable feedback from [GManNickG](https://stackoverflow.com/questions/281818/unmangling-the-result-of-stdtype-infoname/4541470#comment26629807_4541470), I have cleaned up the code a little bit. ... | [
0.13748665153980255,
-0.048064928501844406,
0.5835881233215332,
-0.16000360250473022,
-0.08702605217695236,
0.021483680233359337,
0.14152143895626068,
-0.2513684928417206,
-0.09191184490919113,
-0.4941199719905853,
-0.35867881774902344,
0.6570792198181152,
-0.4950054883956909,
0.1062844097... | |
// enable c++11 by passing the flag -std=c++11 to g++
std::unique_ptr<char, void(*)(void*)> res {
abi::__cxa_demangle(name, NULL, NULL, &status),
std::free
};
return (status==0) ? res.get() : name ;
}
#else
// does nothing if not g++
std::string demangle(const char* name) {
return nam... | [
0.1991955190896988,
-0.05378146842122078,
0.19350270926952362,
-0.21988889575004578,
0.43698519468307495,
-0.09257172793149948,
0.3294329345226288,
-0.27359822392463684,
-0.0878053605556488,
-0.5324407815933228,
-0.33128705620765686,
0.709492027759552,
-0.39108267426490784,
-0.388892084360... | |
std::cout << "Type of ptr_base: " << type(ptr_base) << std::endl;
std::cout << "Type of pointee: " << type(*ptr_base) << std::endl;
delete ptr_base;
}
```
It prints:
Type of ptr\_base: `Base*`
Type of pointee: `Derived`
Tested with g++ 4.7.2, g++ 4.9.0 20140302 (experimental), clang++ 3.4 (trunk 184647... | [
0.2525000274181366,
0.07156680524349213,
0.4769781827926636,
-0.08971155434846878,
-0.14131613075733185,
0.18600551784038544,
0.2200489342212677,
-0.5845170021057129,
-0.10838230699300766,
-0.0939536988735199,
-0.0449451319873333,
0.33070746064186096,
-0.20339085161685944,
-0.1692066341638... | |
p(ptr) { }
~handle() { std::free(p); }
};
std::string demangle(const char* name) {
int status = -4; // some arbitrary value to eliminate the compiler warning
handle result( abi::__cxa_demangle(name, NULL, NULL, &status) );
return (status==0) ? result.p : name ;
}
#else
// does nothing if not g++
s... | [
-0.05526784434914589,
-0.030905939638614655,
0.5939283967018127,
-0.19123995304107666,
-0.032727692276239395,
0.24342215061187744,
0.3859712779521942,
-0.4340570867061615,
-0.5120860934257507,
-0.05892794951796532,
-0.5662027597427368,
0.3174712657928467,
-0.34409576654434204,
0.0698367059... | |
buffer, `abi::__cxa_demangle()` assumes it to be allocated on the heap. Allocating the buffer on the stack is a bug (from the gnu doc): *"If `output_buffer` is not long enough, it is expanded using `realloc`."* **Calling `realloc()` on a pointer to the stack**... ouch! (See also [Igor Skochinsky](https://stackoverflow.... | [
-0.22591735422611237,
0.09830167144536972,
0.5072305798530579,
-0.11113887280225754,
0.028832657262682915,
0.21581974625587463,
0.03935527428984642,
-0.048890914767980576,
-0.5617221593856812,
-0.39290937781333923,
-0.07827968150377274,
0.21522022783756256,
-0.3793256878852844,
0.381340503... | |
and the compiler optimizations, the output will be: garbage / nothing / program crash.
To verify the second bug: set the buffer size to 1 and call it with something whose name is longer than 1 character. When you run it, the program almost assuredly crashes as it attempts to call `realloc()` with a pointer to the st... | [
-0.06514974683523178,
0.06277033686637878,
0.4386211037635803,
-0.21001479029655457,
0.26171383261680603,
-0.0429699681699276,
0.4924497604370117,
0.14310681819915771,
-0.6101558208465576,
-0.5082693696022034,
-0.21958541870117188,
0.5500048995018005,
-0.1893264204263687,
0.315742045640945... | |
`HAVE_CXA_DEMANGLE`. I check `__GNUG__` although that does not guarantee that the code will even compile. Anyone has a better idea?
```cpp
#include <cxxabi.h>
const string demangle(const char* name) {
int status = -4;
char* res = abi::__cxa_demangle(name, NULL, NULL, &status);
const char* const demangl... | [
0.6157247424125671,
0.20393040776252747,
0.12593425810337067,
-0.3670165240764618,
0.27292048931121826,
-0.11706390231847763,
0.5051572322845459,
-0.45161107182502747,
-0.11282505840063095,
-0.31579381227493286,
-0.551778256893158,
0.7215104699134827,
-0.40187275409698486,
0.22605805099010... | |
I'm using ASP.NET Membership and noticed there isn't a method in the [Roles class](http://msdn.microsoft.com/en-us/library/system.web.security.roles_members.aspx) to *modify* a role (its name for instance), only to create and delete them.
Is it possible or it's not supported?
EDIT: @CheGueVerra: Yes, nice workaround.... | [
0.15765269100666046,
-0.19437594711780548,
0.26547011733055115,
0.2131032794713974,
0.13186046481132507,
0.12739405035972595,
0.21079705655574799,
-0.03870260715484619,
-0.1681939959526062,
-0.544773519039154,
0.03595731407403946,
0.4188021421432495,
-0.20358619093894958,
0.256695330142974... | |
earlier to the role with the new name.
```
public void RenameRoleAndUsers(string OldRoleName, string NewRoleName)
{
string[] users = Roles.GetUsersInRole(OldRoleName);
Roles.CreateRole(NewRoleName);
Roles.AddUsersToRole(users, NewRoleName);
Roles.RemoveUsersFromRole(users, OldRoleName);
Roles.Delet... | [
-0.18786373734474182,
-0.17317210137844086,
0.7258098721504211,
-0.2362653911113739,
0.31310662627220154,
0.45600366592407227,
0.12499386817216873,
-0.2578137516975403,
-0.24827054142951965,
-0.6998368501663208,
-0.11347952485084534,
0.6887918710708618,
-0.4506876766681671,
0.1023561656475... | |
validate that the user is really in that role. Well that's what I understood, when I asked about it.
rtpHarry edit: Converted pseudocode sample to compilable c# method | [
0.2870755195617676,
-0.004573772195726633,
-0.09170537441968918,
0.14177954196929932,
-0.05474579334259033,
0.010618140920996666,
0.20998862385749817,
-0.24889783561229706,
-0.12963390350341797,
-0.2908726632595062,
0.052802253514528275,
0.5494712591171265,
-0.3686163127422333,
-0.23439659... | |
This is as much a code maintenance issue as a code issue, but I have a WebForm that no longer checks it CustomValidator. It worked when I last touched the code over a year ago, but it no longer works now that the user has requested some changes ...
The WebForm contains a data-bound drop down with a default " - All -" ... | [
0.3377954661846161,
0.040066372603178024,
0.5545142292976379,
0.14222699403762817,
0.21809884905815125,
-0.01775357872247696,
0.163140207529068,
-0.032496754080057144,
-0.3486238420009613,
-0.33662280440330505,
-0.21286620199680328,
0.4659727215766907,
-0.28076571226119995,
0.1289879679679... | |
code, but neither fire.
Where would you start looking? What are the usual suspects? I have, of course, compared my working copy to what is in source control, but nothing jumps out as being suspicious.
Just in case it matters, here is my code:
```
<asp:DropDownList ID="_AssessmentDropDown" runat="server" DataSourceI... | [
0.12376680225133896,
0.26707154512405396,
0.17845124006271362,
0.15700198709964752,
-0.01576116867363453,
0.011889961548149586,
0.4602453410625458,
-0.6293982863426208,
0.05490569770336151,
-0.8111013770103455,
0.08294364809989929,
0.7040309309959412,
0.11783070862293243,
-0.10249973833560... | |
</SelectParameters>
</asp:ObjectDataSource>
```
I notice a couple of issues
* I don't think you need a CausesValidation=true if AutoPostBack is set to false
* You do not use validation groups, so that cannot be the cause
* Why not use a RequiredFieldValidator?
* If you want to fire validation on empty fields, set the... | [
0.16868242621421814,
0.038878895342350006,
0.20880389213562012,
0.03730406612157822,
-0.2130778729915619,
-0.08654891699552536,
0.49525538086891174,
-0.3122211694717407,
-0.22844980657100677,
-0.3835148811340332,
0.171743705868721,
0.6231865882873535,
-0.2552000880241394,
-0.07095661759376... | |
I often find myself writing simple for loops to perform an operation to many files, for example:
```
for i in `find . | grep ".xml$"`; do bzip2 $i; done
```
It seems a bit depressing that on my 4-core machine only one core is getting used.. is there an easy way I can add parallelism to my shell scripting?
EDIT: To ... | [
0.1445375680923462,
0.15653397142887115,
-0.18702952563762665,
0.13160280883312225,
-0.18481670320034027,
-0.0556013248860836,
0.31103819608688354,
-0.10819113999605179,
-0.23742249608039856,
-0.6592627167701721,
-0.11958590894937515,
0.27640387415885925,
-0.5839545130729675,
-0.3618137836... | |
10,000). The scripts I use to solve such problems look like the one above, but might have a different command, or even a sequence of commands to execute.
For example, just now I am running:
```
for i in `find . | grep ".xml.bz2$"`; do find_graph -build_graph $i.graph $i; done
```
So my problems are in no way bzip s... | [
0.06799007207155228,
0.25797560811042786,
0.4984932839870453,
0.2447911947965622,
-0.19450297951698303,
0.23291116952896118,
0.2784450650215149,
0.032356876879930496,
-0.5175303816795349,
-0.7384086847305298,
0.07647024095058441,
0.6367471814155579,
-0.3274712562561035,
0.16952283680438995... | |
| parallel bzip2
```
To learn more:
* Watch the intro video for a quick introduction:
<https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1>
* Walk through the tutorial (man parallel\_tutorial). You command line
with love you for it. | [
0.19923196732997894,
0.32630911469459534,
0.27039697766304016,
0.19406042993068695,
0.003297132905572653,
0.11169687658548355,
0.38145238161087036,
0.49199551343917847,
-0.36254239082336426,
-0.7484291791915894,
-0.05959128215909004,
0.5735648274421692,
-0.08279604464769363,
0.390503346920... | |
Does anyone know of a way to store values as NVARCHAR in a manually created query in ColdFusion using the querynew() function? I have multiple parts of a largish program relying on using a query as an input point to construct an excel worksheet (using Ben's POI) so it's somewhat important I can continue to use it as a ... | [
0.13876895606517792,
0.13640692830085754,
0.18565118312835693,
0.005272271111607552,
-0.2317638099193573,
-0.03804819658398628,
0.31923407316207886,
-0.01850861869752407,
-0.28929683566093445,
-0.20822851359844208,
0.3266597390174866,
0.34202104806900024,
-0.19380925595760345,
0.2369293272... | |
know that too :)
When creating a ColdFusion query with queryNew(), you can pass a list of datatypes as a second argument. For example:
```
<cfset x = queryNew("foo,bar","integer,varchar") />
```
Alternatively, you can use cf\_sql\_varchar (which you would use in queryparam tags). According to the livedocs, nvarchar ... | [
0.23936352133750916,
0.12769939005374908,
0.4930284023284912,
0.03991732746362686,
0.2434089034795761,
-0.10693035274744034,
0.209072083234787,
-0.24231848120689392,
0.004871009849011898,
-0.5475785732269287,
-0.042635951191186905,
0.5374345183372498,
-0.47624748945236206,
0.17095020413398... | |
I would like the value of the input text box to be highlighted when it gains focus, either by clicking it or tabbing to it.
```
<html>
<body>
<script>
function focusTest(el)
{
el.select();
}
</script>
<input type="text" value="one" OnFocus="focusTest(this); return false;" />
<br/>
<input type="text" value="two" O... | [
0.02824391797184944,
-0.034605178982019424,
0.5634730458259583,
-0.4736131429672241,
-0.11299353837966919,
0.12474179267883301,
0.01641198806464672,
-0.41375207901000977,
-0.08776793628931046,
-1.0196789503097534,
-0.2686299979686737,
0.905230700969696,
-0.362703800201416,
-0.4140368103981... | |
Upon further testing it turns out the OnMouseUp event is clearing the selection so it is enough to add
```
onMouseUp="return false;"
```
to the input element for things to work as they should. | [
-0.04658697545528412,
0.06012776494026184,
0.11559348553419113,
-0.12877576053142548,
0.14370842278003693,
0.007022720295935869,
0.5358219146728516,
-0.33354631066322327,
0.10908955335617065,
-0.11565681546926498,
-0.3305906653404236,
0.5065726637840271,
-0.12582673132419586,
0.15905146300... | |
Can my webmethod only return strings like I see in all the asp.net site examples?
asp.net Webmethods can return any serializable data type. | [
0.2329685240983963,
-0.24799032509326935,
0.1860291063785553,
0.45866814255714417,
-0.29735979437828064,
-0.36008745431900024,
0.16251155734062195,
0.33011239767074585,
-0.3128282129764557,
-0.7829270362854004,
-0.11298675090074539,
0.24006067216396332,
-0.41349726915359497,
0.317407965660... | |
Do you generate your data dictionary? If so, how?
I use extended procedures in SQL Server 2005 to hold onto table and field information. I have some queries that create a dictionary out of them, but it's ... meh. Do you have a particular query or tool you use? Do you generate it off of your database diagrams?
Googlin... | [
0.36065512895584106,
0.13616205751895905,
0.14569629728794098,
0.2548099160194397,
-0.23806017637252808,
-0.22031551599502563,
0.03764626383781433,
0.051734790205955505,
-0.08783790469169617,
-0.3809020221233368,
0.45074811577796936,
0.3662375807762146,
-0.1322641521692276,
0.0841699689626... | |
This includes:
* ERD
* List of tables, columns, and constraints
* Set of warnings about DB anomalied (e.g. tables without indexes) | [
-0.08565891534090042,
0.2793886363506317,
0.12681782245635986,
-0.06316171586513519,
-0.02737763337790966,
0.08218025416135788,
0.10818261653184891,
-0.2830665409564972,
-0.13260403275489807,
-0.5660017132759094,
-0.40792638063430786,
0.27782171964645386,
-0.4010513722896576,
-0.0605412386... | |
In developing search for a site I am building, I decided to go the cheap and quick way and use Microsoft Sql Server's Full Text Search engine instead of something more robust like Lucene.Net.
One of the features I would like to have, though, is google-esque relevant document snippets. I quickly found determining "rele... | [
0.097519651055336,
0.09211289882659912,
0.3411688506603241,
0.46586838364601135,
-0.2567441761493683,
-0.05585801228880882,
0.00041789814713411033,
0.3378264904022217,
-0.04824948310852051,
-0.987055242061615,
-0.03464226424694061,
0.056150127202272415,
-0.05291684716939926,
0.212158709764... | |
-- but it really doesn't matter).
My first thought is to use .IndexOf() in a loop and build an array of term distances (subtract the index of the found term from the previously found term), then ... what? Add up any two, any three, any four, any five, sequential array elements and use the one with the smallest sum (he... | [
0.043412916362285614,
0.04975775629281998,
0.46372541785240173,
0.2397073656320572,
-0.23861064016819,
-0.21711863577365875,
-0.009055987931787968,
-0.2314203977584839,
-0.3187112510204315,
-0.5179101824760437,
0.1272297501564026,
0.155185729265213,
-0.3629375100135803,
0.30933678150177,
... | |
I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the server takes a long time to start. When this happens, Windows pops a dialog box like this:
**Server Busy**
The action cannot be completed because the other program is busy. Choose 'Switch To' to activate the busy pro... | [
-0.07158501446247101,
-0.25437572598457336,
0.6119677424430847,
-0.0377563014626503,
0.016254790127277374,
-0.12211448699235916,
0.3346721827983856,
0.19051967561244965,
-0.26382672786712646,
-0.8440372347831726,
-0.20266616344451904,
0.6061059236526489,
-0.4585810601711273,
0.108904726803... | |
anyone point me in the right direction?
If you're using MFC, we used to do stuff like this:
```
// prevent the damned "Server Busy" dialog.
AfxOleGetMessageFilter()->EnableBusyDialog(0);
AfxOleGetMessageFilter()->EnableNotRespondingDialog(0);
``` | [
0.2708250880241394,
0.32609090209007263,
0.8209344744682312,
-0.29608672857284546,
0.2444896697998047,
-0.2044946402311325,
0.37902015447616577,
0.20058272778987885,
-0.2706167995929718,
-0.6867833137512207,
-0.07607122510671616,
0.4757317304611206,
-0.4646930396556854,
0.00128981168381869... | |
Assuming one has an abstract base class `foo` with `__get()` defined, and a child class `bar` which inherits from `foo` with a private variable `$var`, will the parent `__get()` be called when trying to access the private `$var` from outside the class?
Yes.
```
<?php
abstract class foo
{
public functi... | [
0.07344082742929459,
0.11984650045633316,
0.21373485028743744,
-0.45034459233283997,
0.3270128667354584,
0.2490825355052948,
0.06458129733800888,
-0.25354939699172974,
-0.012105422094464302,
0.023215530440211296,
-0.383108526468277,
0.5368235111236572,
-0.47977399826049805,
0.2284590154886... | |
}
class bar extends foo
{
private $var;
public function __construct()
{
$this->var = "25\n";
}
public function getVar()
{
return $this->var;
} | [
0.14246441423892975,
0.21198271214962006,
0.4479723870754242,
-0.6643721461296082,
-0.006212614476680756,
0.24785056710243225,
0.5292621850967407,
-0.43549567461013794,
0.0764199048280716,
-0.30696019530296326,
-0.3813107907772064,
0.7222375273704529,
-0.6078373789787292,
0.137082368135452... | |
}
$obj = new bar();
echo $obj->var;
echo $obj->getVar();
?>
```
output:
$ php test.php
Parent (Foo) \_\_get() called for var
25 | [
0.11950963735580444,
0.2740127742290497,
0.321272075176239,
-0.47379693388938904,
0.23199167847633362,
0.3491656184196472,
0.5485800504684448,
-0.5383095741271973,
0.06647849082946777,
-0.39943331480026245,
-0.17526735365390778,
0.36917930841445923,
-0.22296904027462006,
0.1173905581235885... | |
Imagine I have a process that starts several child processes. The parent needs to know when a child exits.
I can use `waitpid`, but then if/when the parent needs to exit I have no way of telling the thread that is blocked in `waitpid` to exit gracefully and join it. It's nice to have things clean up themselves, but it... | [
0.277361661195755,
0.12104196101427078,
0.09840904921293259,
-0.1525471955537796,
0.43937015533447266,
0.40099388360977173,
0.26174089312553406,
0.046000886708498,
-0.4050358533859253,
-0.812792956829071,
0.2348504364490509,
-0.14657942950725555,
0.050150368362665176,
0.5204678177833557,
... | |
case it may not be super critical that I know when a child exits right away, but I'd like to know ASAP...
I can use a signal handler for `SIGCHLD`, and in the signal handler do whatever I was going to do when a child exits, or send a message to a different thread to do some action. But using a signal handler obfuscate... | [
0.241908460855484,
-0.22258493304252625,
0.2666186988353729,
0.1603526622056961,
0.5016558170318604,
-0.01757044345140457,
0.24834303557872772,
0.23479419946670532,
-0.12329288572072983,
-0.4470135271549225,
0.20694826543331146,
0.2617352306842804,
0.1210276186466217,
-0.05301946401596069,... | |
to exit, while still having it blocked in `waitpid` the rest of the time, always ready to react. *Is there such a call in linux? Of the alternatives, which one is best?*
---
EDIT:
Another method based on the replies would be to block `SIGCHLD` in all threads with `pthread` \ `_sigmask()`. Then in one thread, keep ca... | [
-0.23255982995033264,
-0.2230517566204071,
0.3244416415691376,
-0.1621544510126114,
-0.09622272849082947,
-0.06323857605457306,
0.47075146436691284,
0.13144662976264954,
-0.1779584288597107,
-0.713465690612793,
-0.31390976905822754,
0.24699634313583374,
-0.37961798906326294,
0.220268279314... | |
and in line of the wait thread, without using a signal handler.
The function can be interrupted with a signal, so you could set a timer before calling waitpid() and it will exit with an EINTR when the timer signal is raised. Edit: It should be as simple as calling alarm(5) before calling waitpid(). | [
0.18871815502643585,
-0.6749003529548645,
0.5219890475273132,
0.09388417750597,
0.15468427538871765,
0.07179505378007889,
0.2161489576101303,
-0.24729174375534058,
-0.19005194306373596,
-0.330221951007843,
-0.1314736157655716,
0.6183991432189941,
-0.3120433986186981,
0.1334650069475174,
... | |
At my workplace we are using CVS as the version control system. Since we are using Windows mostly, TortoiseCVS and WinCVS serve as the GUI front-ends to CVS.
Is there anything like those front-ends for one of the distributed VCS (bzr, hg, git)? I know we could use the command line but that is not an option.
I've alre... | [
0.21424074470996857,
-0.050060972571372986,
0.5341492295265198,
-0.0631619468331337,
-0.16234895586967468,
0.0051147486083209515,
0.04159636050462723,
0.1996377557516098,
-0.1352638304233551,
-0.6362257599830627,
-0.04839371144771576,
0.9077727794647217,
-0.07341194897890091,
0.11247149109... | |
I have multiple ordered lists. Unfortunately, the order of the items isn't a simple alpha or numeric comparison, otherwise this is trivial. So what I have is something like:
```
List #1 List #2 List #3
groundhog groundhog easter
mothersday mayday mothersday
midsummer laborday ... | [
0.5272220373153687,
0.49386534094810486,
0.13054583966732025,
-0.26852479577064514,
-0.35121971368789673,
0.2142753303050995,
0.1145804300904274,
0.293324738740921,
-0.5169538855552673,
-0.17778046429157257,
0.2926405072212219,
-0.07889249175786972,
0.20079399645328522,
0.19498208165168762... | |
unknown. I am guaranteed that the order of the items from list-to-list is self consistent. (i.e. that no matter which list it occurs in, easter is always before halloween)
But what I need is a new ordered list that represents each item in the other lists only once, that preserves all of the known relationships above:
... | [
0.3608764708042145,
0.4080065190792084,
0.32454177737236023,
-0.13593152165412903,
-0.06309151649475098,
0.20916621387004852,
0.3357212245464325,
0.06484273821115494,
-0.7173944711685181,
-0.3362092971801758,
0.154958575963974,
0.23006455600261688,
-0.09560924768447876,
0.3432897627353668,... | |
with even modest data sets.
You may want to have a look at [topological sorting](http://en.wikipedia.org/wiki/Topological_sort). I think it applies quite well to your case. | [
0.044952642172575,
-0.2161925584077835,
0.013424239121377468,
-0.02646128088235855,
-0.05214602127671242,
-0.14205972850322723,
-0.2698713541030884,
0.32651886343955994,
-0.42828989028930664,
-0.849031388759613,
-0.30435577034950256,
-0.04072416201233864,
-0.03238503262400627,
0.2346418499... | |
I'm in the process of setting up a new website which would greatly benefit from having user-forums.
Since I already have user accounts, and profile details, stored away it seems that I'd benefit from choosing an open-source forum package which I could modify so that logins were tested against my existing database.
Ri... | [
0.6382761001586914,
0.1612226665019989,
0.22274982929229736,
-0.10962927341461182,
-0.5081687569618225,
-0.19958578050136566,
0.45714783668518066,
0.6224841475486755,
-0.5876931548118591,
-0.21483388543128967,
0.12555083632469177,
0.47740623354911804,
-0.3012479841709137,
0.321266382932662... | |
need to use a PHP solution then so be it, but first are there any simple forums that are written in perl that you'd suggest? I'd expect to have different forum-groups and nominate particular users as moderators. More than that I don't need, just basic threading and an attractive appearance.
Really simple forums are oft... | [
0.6127195954322815,
0.18821774423122406,
0.09351047873497009,
0.35392940044403076,
-0.35946202278137207,
-0.221114382147789,
-0.03919735923409462,
0.294789582490921,
-0.42068400979042053,
-0.2675814926624298,
0.28413671255111694,
0.6461601853370667,
-0.10055804252624512,
-0.300165653228759... | |
are several great PHP ones out there that aren't so insecure an rather well developed. | [
0.5091733932495117,
0.1489715427160263,
-0.06408657133579254,
0.6162236928939819,
-0.012677298858761787,
-0.05901234224438667,
0.147422656416893,
0.7112940549850464,
-0.2464645951986313,
-0.27708882093429565,
0.42527157068252563,
0.153612419962883,
0.1397269368171692,
-0.4211753010749817,
... | |
Is there a way to force the flash garbage collector to clean up freed memory? I've seen that it takes a lot of time for flash to clean up not referenced memory...
Unfortunately there isn't. It's something Grant Skinner has written lots about, so check [his blog](http://www.gskinner.com/blog/archives/2006/06/as3_resourc... | [
0.08049160987138748,
0.32632434368133545,
-0.36793363094329834,
0.20418289303779602,
0.15251535177230835,
-0.012020041234791279,
0.4560718536376953,
-0.12005356699228287,
-0.30308622121810913,
-0.1783808022737503,
0.20000353455543518,
0.3672534227371216,
-0.13481871783733368,
0.00606849230... | |
I know they're using a jQuery plugin, but I can't seem to find which one they used. In particular, what I'm looking for is autocomplete with exactly the same functionality as SO's autocomplete, where it will perform an AJAX command with each new word typed in and allow you to select one from a dropdown.
Note that the t... | [
0.06483719497919083,
-0.16533058881759644,
0.23929856717586517,
-0.056431349366903305,
-0.2317337840795517,
0.013192330487072468,
0.12225893884897232,
-0.04034483805298805,
-0.3233006000518799,
-0.5181050896644592,
-0.15775252878665924,
0.6433532238006592,
-0.2596511244773865,
-0.356787890... | |
originally, albeit with various tweaks and customizations made to it over the years. | [
0.10238666832447052,
-0.27047672867774963,
0.21034234762191772,
0.0676293820142746,
0.22839489579200745,
0.2689923644065857,
0.05589989945292473,
0.015442196279764175,
0.0243707112967968,
0.07052560895681381,
0.07783271372318268,
-0.0012896973639726639,
0.07508024573326111,
0.3278105854988... | |
In C# I sometimes wish I could make special methods for certain "instantiations" of generic classes.
**UPDATE: The following code is just a dumb example of a more abstract problem - don't focus too much on time series, just the principles of "adding extra methods" for certain T**.
Example:
```
class Timeseries<T>
{... | [
0.29780447483062744,
-0.18297389149665833,
-0.12896227836608887,
-0.17998962104320526,
-0.15037210285663605,
-0.1352005898952484,
0.10740666836500168,
-0.15291592478752136,
-0.1633327752351761,
-0.42586395144462585,
-0.13937485218048096,
0.559471845626831,
-0.6156354546546936,
-0.335332274... | |
but I cannot find one that I'm satisfied with.
**1. Inherit into a special class**
```
class TimeseriesDouble : Timeseries<double>
{
double Interpolate(...) { ... }
...
}
```
**cons:** `TimeseriesDouble.Slice()` will return a new `Timeseries<double>` object, now missing my special methods.
**2. External m... | [
0.17247460782527924,
-0.07925021648406982,
0.15170282125473022,
-0.02536836825311184,
0.13688628375530243,
0.11513026803731918,
0.09270080924034119,
-0.19688019156455994,
-0.29032135009765625,
-0.7708615064620972,
-0.138814315199852,
0.35389474034309387,
-0.4636351466178894,
0.195966124534... | |
TimeSeriesDouble : TimeSeries_base { .. typesafe versions of methods .. }
```
**cons:** too much duplication of things from `TimeSeries_base` into the two subclasses. The base class might become just a place holder for utility functions for the sub classes.
**pro:** I can now do things like `List<TimeSeries_base>` d... | [
0.424394428730011,
0.09831394255161285,
-0.019955331459641457,
-0.12145796418190002,
0.19662068784236908,
0.1390947848558426,
0.06583142280578613,
0.001070142607204616,
-0.25528550148010254,
-0.8418154120445251,
0.008160791359841824,
0.43213310837745667,
-0.5075644254684448,
0.054249923676... | |
the self-referential generics trick:
```
public class TimeSeries<T, U> where U : TimeSeries<T, U>
{
U Slice(...)
}
public class TimeSeriesDouble : TimeSeries<double, TimeSeriesDouble>
{
...
}
```
It can get a bit brain-bending, but it can work. | [
-0.07426422089338303,
-0.29808810353279114,
-0.06521277129650116,
0.1801733374595642,
-0.3498089611530304,
-0.11806628853082657,
0.30278289318084717,
0.06270341575145721,
0.13088178634643555,
-0.5538493394851685,
-0.010510754771530628,
0.5746699571609497,
-0.3760688900947571,
0.10794923454... | |
Suppose I have a SELECT statement that returns some set of results. Is there some way I can number my results in the following way:
> SELECT TOP 3 Name FROM PuppyNames ORDER BY NumberOfVotes
would give me...
> Fido
>
>
> Rover
>
>
> Freddy Krueger
...but I want...
> 1, Fido
>
>
> 2, Rover
>
>
> 3, Freddy K... | [
-0.0055910139344632626,
0.08007398247718811,
0.3498004972934723,
-0.11248539388179779,
-0.14751942455768585,
0.295961856842041,
0.13116446137428284,
-0.37243759632110596,
-0.2707578241825104,
-0.22782014310359955,
0.004172757733613253,
0.2940969169139862,
-0.38546422123908997,
0.0387232676... | |
typical technique was to create a new temporary table to contain the result of your query, plus add an `IDENTITY` column and generate incremental values. See an article that talks about this technique here: <http://www.databasejournal.com/features/mssql/article.php/3572301/RowNumber-function-in-SQL-Server-2005.htm> | [
-0.11709266901016235,
-0.3353818953037262,
0.4584842622280121,
-0.004076759330928326,
-0.10411381721496582,
0.1483665406703949,
-0.23557813465595245,
-0.4604787230491638,
-0.4591158926486969,
-0.10661250352859497,
-0.12916968762874603,
0.22661833465099335,
-0.48825138807296753,
-0.16739757... | |
There's been a cluster of Perl-hate on Stack Overflow lately, so I thought I'd bring my "[Five things you hate about your favorite language](http://use.perl.org/~brian_d_foy/journal/32556)" question to Stack Overflow. Take your favorite language and tell me five things you hate about it. Those might be things that just... | [
0.26555055379867554,
0.5301045775413513,
-0.10644448548555374,
0.030344543978571892,
-0.36285436153411865,
0.16044928133487701,
0.4552990794181824,
0.36755114793777466,
-0.10709401965141296,
-0.38062962889671326,
-0.14742523431777954,
0.3258238434791565,
-0.26314684748649597,
0.01986781693... | |
want to hear the things that you hate but tolerate so you can use all of the other stuff, and I want to hear it about the language you wished other people would use.
I ask this whenever someone tries to push their favorite language on me, and sometimes as an interview question. If someone can't find five things to hat... | [
0.7922024130821228,
0.524122416973114,
-0.10969039052724838,
-0.301143079996109,
-0.17407315969467163,
0.19009999930858612,
0.2671280801296234,
0.3892126977443695,
-0.09389674663543701,
-0.4732518494129181,
0.017405716702342033,
0.6525141000747681,
-0.25998371839523315,
0.27023276686668396... | |
or religion, which means that if I don't choose his favorite technology, I'm wrong.
I don't care that much which language you use. Don't want to use a particular language? Then don't. You go through due diligence to make an informed choice and still don't use it? Fine. Sometimes the right answer is "You have a strong ... | [
0.8875927329063416,
0.8671857118606567,
-0.003584134392440319,
0.0047671119682490826,
0.0009091976680792868,
-0.003865518607199192,
0.36462193727493286,
0.3258136212825775,
0.08882302790880203,
-0.2489461898803711,
-0.08584991097450256,
0.8183050751686096,
-0.1781592071056366,
-0.369289785... | |
know it so well have non-specific complaints. I ask things like "If you could start over on this project, what would you do differently?" In this fantasy land, users and programmers get to complain about anything and everything they don't like. "I want a better interface", "I want to separate the model from the view", ... | [
0.9418182969093323,
0.16535721719264984,
0.24510341882705688,
0.47161319851875305,
0.23563694953918457,
-0.4788774251937866,
0.2800180912017822,
0.09656298160552979,
0.25461363792419434,
-0.35809603333473206,
0.13093586266040802,
0.3975449204444885,
-0.16337993741035461,
0.5989575982093811... | |
about how much of the programmer's ego is tied up in what he's telling me.
Hate isn't the only dimension of figuring out how much people know, but I've found it to be a pretty good one. The things that they hate also give me a clue how well they are thinking about the subject.
Five things I hate about Java:
* No firs... | [
0.5474998354911804,
0.38895779848098755,
-0.28023242950439453,
0.01822030171751976,
-0.3951955735683441,
-0.08268795907497406,
0.5118905305862427,
0.30353060364723206,
-0.17003053426742554,
-0.6377673149108887,
0.054955046623945236,
0.5062105059623718,
-0.1896848976612091,
0.26204478740692... | |
violated egregiously, and code quadruples in size and halves in legibility.
I know, I should check out Scala. | [
0.511014997959137,
0.10426811873912811,
0.060309845954179764,
0.0941162258386612,
0.05694909393787384,
-0.0460454560816288,
0.3955453038215637,
0.040620092302560806,
-0.4797913730144501,
-0.58823561668396,
0.20455439388751984,
0.33944791555404663,
-0.10389742255210876,
0.2370331734418869,
... | |
In Visual Studio, How do I show all classes inherited from a base class?
**For example**, in ASP.NET MVC there are several '[ActionResult](http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult.aspx)' types -- and they all inherit from / implement the base class `ActionResult`.
It looks like unless you... | [
0.4504847228527069,
-0.14529578387737274,
0.09992395341396332,
-0.002530585741624236,
-0.42642873525619507,
-0.1596219837665558,
0.04725634679198265,
-0.14182379841804504,
-0.4020228981971741,
-0.5366319417953491,
-0.2529555559158325,
0.5341309905052185,
-0.17690354585647583,
-0.1206451281... | |
something in Resharper that will help me out?
Sure, [Resharper](http://www.jetbrains.com/resharper/) can do this. And much more.
Just right click on type name in any place and choose "Go To Inheritor" in context menu.
"Go To Inheritor" can be also applied to method for navigating to overrides and an interface method's... | [
0.18954983353614807,
-0.2821456491947174,
0.5716654658317566,
0.4321398138999939,
0.16701285541057587,
-0.3750112056732178,
-0.06349125504493713,
-0.231388658285141,
0.03611224517226219,
-0.6333496570587158,
0.07930375635623932,
0.9053118228912354,
-0.2597872018814087,
-0.1574423462152481,... | |
9.2, on any type in source code, rt-click "Find Usage Advanced", select Find="Derived" and Scope="Solutions and Libraries".
For example, to find all inheritors (both in the library and your code) of some base class in an included DLL from any vendor, declare a variable in your code with that base class. Then right-c... | [
-0.023522572591900826,
-0.09688685089349747,
0.3627608120441437,
0.006414868403226137,
0.1789030134677887,
-0.24464350938796997,
-0.1565556526184082,
-0.2281353622674942,
0.13279125094413757,
-0.47466933727264404,
-0.3284010887145996,
0.660433828830719,
-0.48377150297164917,
0.078031815588... | |
I have a .net transaction with a SQL insert to a SQL Server 2005 database. The table has an identity primary key.
When an error occurs within the transaction, `Rollback()` is called. The row inserts are rolled back correctly, however the next time I insert data to the table, the identity is incremented as if the roll... | [
-0.058555591851472855,
0.2827485501766205,
0.19824901223182678,
-0.0030423225834965706,
-0.05208501219749451,
-0.20848561823368073,
-0.003607591148465872,
-0.14765696227550507,
-0.20453552901744843,
-0.440358430147171,
0.212211474776268,
0.5722236633300781,
-0.22945046424865723,
0.23747842... | |
If other transactions had to wait to see if the auto-number was going to be used or "rolled back", they would be blocked by the existing transaction using the auto-number. For example, consider my psuedo code below with table A using an auto-number field for the ID column:
```
User 1
------------
begin transaction
ins... | [
-0.316404789686203,
-0.009798785671591759,
0.34779220819473267,
-0.36473461985588074,
0.10676700621843338,
-0.0129412105306983,
-0.06201443821191788,
-0.30516019463539124,
-0.2757337689399719,
-0.6993067860603333,
-0.1394675076007843,
0.5119516253471375,
-0.35313206911087036,
-0.1565125733... | |
auto-number from the first insert into A was used.
This is a feature, not a bug. I would recommend using another scheme to generate auto-numbers if you need them to be tightly sequential. | [
0.26759999990463257,
-0.03772170469164848,
-0.11006957292556763,
-0.006623913533985615,
-0.06946992874145508,
0.1861453801393509,
-0.16206452250480652,
-0.04197696968913078,
-0.2781912088394165,
-0.3983853757381439,
-0.10210365802049637,
0.8014503121376038,
-0.449263334274292,
-0.221020922... | |
The following C# code takes 5 minutes to run:
```
int i = 1;
string fraction = "";
while (fraction.Length < 1000000)
{
fraction += i.ToString();
i++;
}
```
"Optimising it" like this causes it to run in 1.5 seconds:
```
int i = 1;
string fraction = "";
while (fraction.Length < 1000000)
{
// concatenating... | [
0.005034421570599079,
-0.2734765112400055,
0.47283756732940674,
-0.25193920731544495,
0.18750500679016113,
0.21208646893501282,
0.6958572268486023,
-0.5106763243675232,
-0.02227487973868847,
-0.3993959426879883,
-0.4084286689758301,
0.5289037823677063,
-0.1944766640663147,
-0.2009300589561... | |
}
fraction += tmp;
}
```
**EDIT:** Some people suggested using `StringBuilder`, which is an excellent suggestion also, and this comes out at 0.06s:
```
int i = 1;
StringBuilder fraction = new StringBuilder();
while (fraction.Length < 1000000)
{
fraction.Append(i);
i++;
}
```
Playing around to find the ... | [
0.0967811867594719,
-0.15265773236751556,
0.4985075294971466,
-0.4129948019981384,
-0.06674793362617493,
0.012426275759935379,
0.22796766459941864,
-0.4010898172855377,
-0.05819443240761757,
-0.583434522151947,
-0.06122851371765137,
0.5120142698287964,
-0.12424574792385101,
-0.020247910171... | |
first 1000 chars will take almost no time opposed to the last 1000 chars.
I would assume that the time-consuming part is the actual copying of the large string into a new memory-area every time you add a char that is the tough work for your computer.
Your optimization can easily be compared to what you usually do wi... | [
0.18928630650043488,
-0.16253259778022766,
0.0642300620675087,
0.31592032313346863,
0.05810202658176422,
0.3437080383300781,
0.24442702531814575,
-0.1603679060935974,
-0.33383819460868835,
-0.7186857461929321,
0.315813809633255,
0.4367072582244873,
0.026477131992578506,
0.11354809254407883... | |
have defined a char-array with the appropriate size from the beginning, it would probably be blazing fast, because then it won't have to copy it over and over again. | [
0.4645393192768097,
0.2319454848766327,
0.12624961137771606,
-0.019635992124676704,
-0.2865360677242279,
-0.04419654235243797,
0.15607711672782898,
0.033212509006261826,
-0.0461280457675457,
-0.4020720422267914,
0.10718956589698792,
0.4361984431743622,
0.19210965931415558,
0.08834719657897... | |
In Ant is there any way to do something like this:
```
<arguments id="arg-list">
<arg value="arg1" />
<arg value="arg2" />
</arguments>
<property name="prop1" refid="arg-list" />
```
I'm trying to write a macro for psexec and I'm looking for a nice way to pass in the argument list.
I know that you can do s... | [
0.19254611432552338,
-0.19952668249607086,
-0.035896703600883484,
0.03731532394886017,
-0.22412486374378204,
0.04590989276766777,
0.3020012378692627,
0.08764682710170746,
-0.278935968875885,
-1.0527467727661133,
0.25861412286758423,
0.24072551727294922,
-0.6641927361488342,
-0.138209640979... | |
of changing your design, rather than answering your question, I suggest:
1) You can pass the argument list to exec as a line:
```
<macrodef name="example">
<attribute name="args"/>
<sequential>
<exec executable="example.exe">
<arg value="somearg" />
<arg line="@{args}"/>
</exec>
</sequential... | [
-0.013813496567308903,
0.038670435547828674,
0.5116128921508789,
-0.10668116062879562,
-0.07825633883476257,
0.34486642479896545,
-0.10320425033569336,
-0.36766019463539124,
-0.19908656179904938,
-0.5225425362586975,
-0.16562512516975403,
0.4124799072742462,
-0.3971248269081116,
-0.3347699... | |
<params />
</exec>
</sequential>
</macrodef>
<example>
<arg value="arg1"/>
<arg value="arg2"/>
</example>
```
This will run example.exe:
```
example.exe somearg arg1 arg2
```
I hope I haven't been teaching my grandmother to suck eggs here. | [
-0.0069498587399721146,
0.37171509861946106,
0.004600317683070898,
-0.33274930715560913,
-0.0905086100101471,
0.10833220183849335,
0.5408133268356323,
0.20169104635715485,
-0.39176198840141296,
-0.4742533266544342,
0.017427930608391762,
0.24696415662765503,
-0.16173803806304932,
0.16890892... | |
I've noticed, using visual studio 2003, that I can "comment out" my comments to make them no longer be comments. This one needs an example:
If I have:
```
/*
int commented_out = 0;
*/
```
I can comment out the /\* and \*/ with // and code within the /\* and \*/ is no longer "commented out" (the text changes to non-... | [
-0.14197596907615662,
0.3190563917160034,
0.19180195033550262,
-0.3487434983253479,
-0.5434173345565796,
-0.17224404215812683,
0.02517601102590561,
0.15817895531654358,
-0.27732595801353455,
-0.6073629260063171,
-0.0560971163213253,
0.7680699825286865,
-0.5303424000740051,
-0.0024404781870... | |
C++ standard says that a `/*` is the start of a comment block only if it itself is not commented out. I often use what you've written above to comment or uncomment a block of code by adding/deleting one character. A nice little trick for switching between two blocks of code, one of which is always commented out is:
``... | [
0.0416276752948761,
0.1033814325928688,
0.07415204495191574,
-0.2543148994445801,
-0.36174458265304565,
0.10028261691331863,
-0.16028931736946106,
0.0919744074344635,
-0.4119013547897339,
-0.5798425674438477,
-0.3804246485233307,
0.35299861431121826,
-0.42732948064804077,
0.023052118718624... | |
I'm looking for a .NET library that will allow creation of a Word document. I need to export HTML based content to a Word doc (97-2003 format, not docx).
I know that there are the Microsoft Office Automation libraries and Office interop, but as far as I can tell, they require that you have office actually installed an... | [
0.4344089925289154,
0.23267239332199097,
0.2490333765745163,
-0.03851727396249771,
-0.12925800681114197,
-0.1301625669002533,
0.18957673013210297,
-0.013099920004606247,
-0.08883736282587051,
-0.8783398866653442,
-0.19321641325950623,
0.644766628742218,
-0.3157559633255005,
0.0515047684311... | |
embedded in the HTML??*
Yes. I use an internal style sheet, as I mentioned.
Document Example:
```
<html>
<head>
<STYLE type="text/css">
h1 {text-align:center; font-size:12.0pt; font-family:Arial; font-weight:bold;}
p {margin:0in; margin-bottom:0pt; font-size: 10.0pt;font-family: Arial;}
p.Address {text-... | [
-0.019184712320566177,
0.3049401342868805,
0.5742785334587097,
-0.10350345075130463,
-0.26523661613464355,
0.3858672082424164,
0.18591871857643127,
-0.15206937491893768,
0.12129451334476471,
-0.9489260315895081,
-0.1981835514307022,
0.38008809089660645,
-0.12692201137542725,
-0.12850797176... | |
What is a good crawler (spider) to use against HTML and XML documents (local or web-based) and that works well in the Lucene / Solr solution space? Could be Java-based but does not have to be.
In my opinion, this is a pretty significant hole which is keeping down the widespread adoption of Solr. The new DataImportHandl... | [
-0.04757535085082054,
-0.0023186998441815376,
0.15208452939987183,
0.11707241088151932,
-0.18805064260959625,
-0.19258786737918854,
0.15147988498210907,
0.05074964836239815,
-0.23284266889095306,
-0.8167601823806763,
0.037957705557346344,
0.36786404252052307,
-0.3476373553276062,
-0.052364... | |
and none of them integrates out-of-the-box with Solr.
Keep an eye on OpenPipeline and Apache Tika. | [
0.4285283088684082,
0.2938005328178406,
-0.1437811255455017,
0.07649048417806625,
-0.23578831553459167,
-0.1528451144695282,
0.6766661405563354,
0.11516743898391724,
0.03845217823982239,
-0.4430004060268402,
0.21866874396800995,
0.3161509335041046,
-0.019331060349941254,
-0.236790165305137... | |
I'm looking to setup video uploads for users on a site and want to have them viewed through a Flash player. The site is already partially built (by someone else) and I'm wondering what kind of technologies there are to deal with the video files, specifically in PHP.
I'm thinking the files need to be converted to an FL... | [
0.8054817318916321,
-0.024151839315891266,
0.5129181742668152,
0.2468067705631256,
-0.3792576193809509,
-0.33197760581970215,
-0.3271639347076416,
0.1676521599292755,
-0.6103752851486206,
-0.4688975214958191,
0.15916140377521515,
0.5493190288543701,
-0.24030810594558716,
0.2810612618923187... | |
encoding library that a lot of other tools are based on. It's a bit tricky to use directly, but I think there are a few wrappers around. | [
0.5834401845932007,
0.26376548409461975,
-0.09400718659162521,
0.4663219451904297,
0.10028519481420517,
-0.028626447543501854,
-0.4004592001438141,
0.3141774535179138,
0.15681643784046173,
-0.8971642255783081,
0.22621376812458038,
0.6284102201461792,
-0.13875174522399902,
-0.18621721863746... | |
How can you express X of Y are true, in boolean logic? a rule like 2 of the following must be true (A, B, C, D, E, F)
is it a form of multiplcation or set operations?
the end result is all the permutations like AB OR AC OR AD, if you said 3 of following it is like ABC, ABD, ABE, etc.. so it is like (A,B,C)^2?
thank... | [
-0.034400440752506256,
0.21679362654685974,
0.35600438714027405,
0.12985406816005707,
-0.37627294659614563,
-0.1481774002313614,
0.6455402970314026,
-0.36333394050598145,
-0.11688514053821564,
-0.15778757631778717,
-0.272174596786499,
0.5449433922767639,
-0.2346220165491104,
-0.21383094787... | |
:
A'B'C'D'E F
```
With permutations, there's a great many subexpressions you need to write.
Of course, if this is a programming question, you could just convert the booleans to 0 or 1, add them all up and ensure the result is 2. | [
0.20071879029273987,
0.030926557257771492,
-0.0233258418738842,
-0.15378300845623016,
-0.22487765550613403,
-0.07209876924753189,
0.1988784372806549,
-0.1743796169757843,
0.004432935733348131,
-0.06369403749704361,
-0.32617831230163574,
0.2789047360420227,
-0.3879069983959198,
-0.043199781... | |
I have a website cgi-bin program that is written in c++.
Unfortunately the website provider for my friend's site only allows Perl or PHP cgi-bin scripts.
Is there an easy way to simply have a very small Perl or PHP wrapper that just calls the c++ compiled binary?
Would the c++ program still be able to read from st... | [
0.5273334980010986,
0.20208773016929626,
0.16747349500656128,
0.09713645279407501,
-0.29197800159454346,
-0.19925770163536072,
0.1443944275379181,
0.10613703727722168,
-0.1323569416999817,
-0.5488607883453369,
0.19680655002593994,
0.5307932496070862,
-0.2707540988922119,
0.1683236807584762... | |
code in other languages to be called in perl, including one for [C++](http://search.cpan.org/~neilw/Inline-CPP-0.25/). If you can't find something that works, maybe you can make your own wrapper using that package. | [
0.5476698875427246,
0.0712738037109375,
0.23251573741436005,
0.15461626648902893,
-0.20177769660949707,
0.0026227899361401796,
0.06750749796628952,
0.20205293595790863,
-0.2449721246957779,
-0.12379550188779831,
-0.20228223502635956,
0.44361212849617004,
-0.3290064334869385,
-0.19218441843... | |
I'm working on a school project and I'm getting some weird errors from Xcode. I'm using TextMate's Command+R function to compile the project. Compilation seems to work okay but linking fails with an error message I don't understand.
ld output:
> ld: duplicate symbol text\_field(std::basic\_istream >&)in /path/final/... | [
0.22500038146972656,
0.15006475150585175,
0.48573052883148193,
-0.06183779239654541,
-0.15571391582489014,
-0.06653676182031631,
0.43752506375312805,
-0.3492560088634491,
-0.02430594526231289,
-0.713634192943573,
-0.10815315693616867,
0.32732802629470825,
-0.2624967694282532,
0.01270665973... | |
getline(in, s, ENDF);
return s;
}
long long_field(istream &in){
return atol(text_field(in).c_str());
}
int int_field(istream &in){
return atoi(text_field(in).c_str());
}
double double_field(istream &in){
return atof(text_field(in).c_str());
}
#endif
```
What is going wrong? For a number of rea... | [
0.3878714144229889,
-0.25444281101226807,
0.7326598763465881,
0.04026752710342407,
0.3073404133319855,
0.13538558781147003,
0.4232617914676666,
0.038760747760534286,
0.14289803802967072,
-0.4542544186115265,
-0.31486567854881287,
0.5178762078285217,
-0.6028788685798645,
0.27209535241127014... | |
times.
You should have a header file (e.g., `io_functions.h`) that specifies everything contained in `io_functions.cpp` and include that *header* file into the other two. | [
0.8069282174110413,
0.2712916433811188,
0.3943997919559479,
0.17443884909152985,
0.35387206077575684,
-0.16906370222568512,
-0.30375733971595764,
0.1853962391614914,
-0.5186733603477478,
-0.9214194416999817,
-0.1145709902048111,
0.3435455858707428,
-0.3208353817462921,
-0.04752430319786072... | |
I was wondering if someone would be able to help me write a CQL query for NDepend that will show me all the methods in my form class that handle the form events. So I would like to be able to find all the methods that look like this:
```
Private Sub AddFolderButton_Click(ByVal sender As System.Object, ByVal e As Syste... | [
0.03306310251355171,
-0.16884997487068176,
0.3853857219219208,
0.02579493261873722,
-0.17696699500083923,
-0.08014314621686935,
0.07999985665082932,
-0.15001961588859558,
-0.34384408593177795,
-0.460127592086792,
-0.011236975900828838,
0.38866665959358215,
-0.29109814763069153,
0.117846228... | |
thing how the hell did I live without it all this time.
I am Patrick from the NDepend team and I confirm, so far using a condition 'Namelike + regular expression' on the 'method name + signature' is the best way to achieve what you want with CQL. | [
0.2780850827693939,
0.186786487698555,
0.09033618867397308,
-0.0612548403441906,
0.4511425197124481,
-0.0493057519197464,
0.634011447429657,
0.1726723313331604,
-0.1423957794904709,
-0.5596432685852051,
0.030987892299890518,
0.37663233280181885,
0.14866702258586884,
0.08550886064767838,
... | |
Currently we have a DLL that checks whether a username/password is a valid Windows user using the Windows API LogonUser method. We need to enhance it so it checks whether the user belongs to a specified group as well. Is there a Windows method that does that?
Given a Windows username and password, find out whether the... | [
0.1423105001449585,
-0.006911048665642738,
0.34939393401145935,
0.1775522530078888,
-0.05115653946995735,
-0.11908721178770065,
-0.09783810377120972,
-0.17700403928756714,
-0.4304787218570709,
-0.6562157869338989,
-0.15378597378730774,
0.27962547540664673,
-0.18484407663345337,
0.355737984... | |
PLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
{$EXTERNALSYM PLOCALGROUP_USERS_INFO_0}
_LOCALGROUP_USERS_INFO_0 = record
lgrui0_name: LPWSTR;
end;
{$EXTERNALSYM _LOCALGROUP_USERS_INFO_0}
LOCALGROUP_USERS_INFO_0 = _LOCALGROUP_USERS_INFO_0;
{$EXTERNALSYM LOCALGROUP_USERS_INFO_0}
TLocalGroupUsersIn... | [
-0.4313265383243561,
-0.1545049101114273,
0.5979706645011902,
-0.21810981631278992,
-0.12048393487930298,
0.293218195438385,
0.009900935925543308,
-0.27085715532302856,
-0.5067113041877747,
-0.47263702750205994,
-0.2079855501651764,
0.31754302978515625,
-0.1267176866531372,
-0.118735820055... | |
bufptr: Pointer; prefmaxlen: DWORD;
var entriesread: DWORD; var totalentries: DWORD): NET_API_STATUS; stdcall;
{$EXTERNALSYM NetApiBufferFree}
function NetApiBufferFree(Buffer: Pointer): NET_API_STATUS; stdcall;
function GetGroupsForNetUser(uname: widestring): string;
implementation
function NetUserGetLocalGroups;... | [
-0.321775883436203,
-0.23049677908420563,
0.7855387926101685,
-0.4398614466190338,
-0.013521408662199974,
0.5160818696022034,
0.2908099293708801,
-0.4175916612148285,
-0.1761285960674286,
-0.4727613031864166,
-0.5599605441093445,
0.51275634765625,
-0.5201660394668579,
-0.02576270140707493,... | |
case Status of
NERR_Success: begin
result := 'success, but no groups';
pTmpBuf := bufptr;
if pTmpBuf <> nil then
begin
result := '';
for i := 0 to EntriesRead - 1 do
begin
if pTmpBuf <> nil then | [
-0.29767054319381714,
-0.2454439252614975,
0.33858415484428406,
-0.23144717514514923,
0.11825988441705704,
0.2130475491285324,
0.201710507273674,
-0.4580201804637909,
-0.14956504106521606,
-0.41520535945892334,
-0.3816899359226227,
0.4474325180053711,
-0.23878242075443268,
0.05176347121596... | |
begin
if result = '' then
begin
result := pTmpBuf.lgrui0_name
else
result := result + ';' + pTmpBuf.lgrui0_name;
end;
Inc(pTmpBuf); | [
0.05432752147316933,
-0.22086139023303986,
0.9428237080574036,
-0.5179032683372498,
0.11308643221855164,
0.3451507091522217,
0.23419158160686493,
-0.4998846650123596,
-0.003507876070216298,
-0.1287209391593933,
-0.3991018831729889,
0.5472031235694885,
-0.36897042393684387,
0.21960133314132... | |
end;
end;
end;
ERROR_ACCESS_DENIED: begin
result := 'The user does not have access.';
end;
NERR_InvalidComputer: begin
result := 'The computer name is invalid.';
end;
NERR_UserNotFound: begin
result := 'The user name could not be found. (' + uname + ')';
end;
else... | [
-0.49976930022239685,
0.3873753845691681,
0.2666131258010864,
0.01550300419330597,
0.16372330486774445,
0.20335213840007782,
0.4750838279724121,
0.03704497218132019,
-0.3269510865211487,
-0.14068405330181122,
-0.48401379585266113,
0.2590858042240143,
-0.17852286994457245,
0.696883797645568... | |
'Unknown error.';
end;
end;
if bufptr <> nil then
NetApiBufferFree(bufptr);
end;
end.
``` | [
0.01758275367319584,
-0.29743996262550354,
0.3405468463897705,
-0.15961748361587524,
0.0019394241971895099,
0.007537722121924162,
0.5658396482467651,
-0.018786940723657608,
0.062258362770080566,
-0.472905695438385,
-0.27947694063186646,
0.5364701747894287,
-0.6387698650360107,
0.3874664306... | |
I'm writing C# code that needs to connect to COM events. I implemented the use of
IConnectionPointContainer and IConnectionPoint thus:
```
IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer;
if (connectionPointContainer == null)
{
Debug.Fail("... | [
-0.16115495562553406,
-0.03649336099624634,
0.5055098533630371,
-0.2901713252067566,
0.070600725710392,
0.09208206087350845,
0.6710776686668396,
-0.3684413731098175,
0.07496877014636993,
-0.8357759118080139,
-0.10682234913110733,
0.6781186461448669,
-0.3852461278438568,
0.0918961763381958,... | |
connectionPointContainer.FindConnectionPoint(ref IID_IScriptGeneratorEvents, out m_connectionPoint);
m_connectionPoint.Advise(this, out m_cookie);
```
The problem is that when the COM server is actually implemented in .Net (say, C#), after .Net creates it, it handles it as a .Net object, not a COM object. Since... | [
-0.06836133450269699,
0.05985872447490692,
0.5005902647972107,
-0.08755305409431458,
-0.23097452521324158,
-0.12549185752868652,
0.2100425809621811,
0.17067386209964752,
-0.1372980922460556,
-0.8559364080429077,
-0.0018873319495469332,
0.7217028141021729,
-0.49093204736709595,
0.2663450539... | |
implement the COM server.
P.S I must use IConnectionPointContainer as the COM server may be implemented in non-.Net (C++, Java).
Thanks,
Inbar
I didn't find a way to do this.
Eventually I will define another interface in .Net and will write 2 code paths, one for .Net objects and one for real COM objects. | [
0.21224388480186462,
-0.03929586708545685,
0.3080369532108307,
0.02408590540289879,
-0.43668147921562195,
-0.014536555856466293,
0.24755792319774628,
-0.0008076422964222729,
-0.06379693001508713,
-1.0241456031799316,
0.1323333978652954,
0.503747820854187,
-0.4687340557575226,
-0.0573551282... | |
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008 Server. I used the in-place upgrade path, going first from NT 4.0 to Windows 2003 Server and then 2003 Server to 2008 Server. The orginal NT 4.0 domain was name *Company*. The new domain is *Company*.local. I have confirmed user and comput... | [
0.1308145374059677,
0.316020131111145,
0.8780460953712463,
-0.18039961159229279,
-0.10710585862398148,
0.0027098259888589382,
0.24868285655975342,
0.2718743085861206,
-0.25095558166503906,
-0.6879655122756958,
-0.0014140906278043985,
0.5296759009361267,
-0.2115115225315094,
0.4398866891860... | |
up the GPO correctly, but the script does not get executed on the client after login.
Upon investigation, I noticed I could execute the script (batch file) from the client manually after login if I navigated directly to the domain controller:
\\*ServerName*\SysVol\*Company*.local\Policies\{GUID}\User\Scripts\Logon
Ho... | [
0.37407931685447693,
0.5675152540206909,
0.6895129084587097,
-0.17125587165355682,
0.13002242147922516,
-0.2933425307273865,
-0.04789348319172859,
-0.3611890971660614,
-0.30331048369407654,
-0.3718511760234833,
0.03585828095674515,
0.507199764251709,
-0.41316866874694824,
0.406785666942596... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.