text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
How hard would it be to use GCC instead of VC++ from within Visual Studio 2008? Obviously, some of the keywords won't match, and some may not get syntax highlighting (unless you made a new language service).
Is this what a 'makefile project' is for, pretty much?
There is no GCC plugin for Visual Studio as the one for ... | [
0.5293108224868774,
0.015000487677752972,
-0.1635667234659195,
0.09892113506793976,
-0.3217525780200958,
-0.20628568530082703,
0.011598887853324413,
-0.025728922337293625,
-0.2282501608133316,
-0.4418944716453552,
-0.006127476692199707,
0.7235112190246582,
-0.4691450595855713,
-0.044997200... | |
like Makefiles, you may want to look at [CMake](http://www.cmake.org) which allows you to generate Makefiles or Visual Studio projects from a much simpler description. This also means that you're not bound to Makefiles or Visual Studio projects, but can switch between them as you like. | [
0.8284018635749817,
0.01670456863939762,
0.04069844260811806,
0.20150628685951233,
-0.03627477586269379,
-0.27058425545692444,
-0.2182060331106186,
-0.08334601670503616,
-0.6256624460220337,
-0.5868460536003113,
-0.004789571277797222,
0.1314644068479538,
0.03123200312256813,
-0.13983768224... | |
Is there a better way to do the following:
```
$array = array('test1', 'test2', 'test3', 'test4', 'test5');
// do a bunch of other stuff, probably a loop
$array[] = 'test6';
end($array);
echo key($array); // gives me 6
```
This will give the key of the most recently add array element.
Is there a better way to do th... | [
0.3417905569076538,
-0.13166086375713348,
-0.004074752796441317,
-0.2626716196537018,
-0.08434337377548218,
-0.13441376388072968,
0.34218382835388184,
-0.39989909529685974,
-0.07657894492149353,
-0.3566274046897888,
-0.038703370839357376,
0.5202760696411133,
-0.2633851170539856,
-0.1495480... | |
I've been thinking a lot lately about how to go about doing functional programming in C (*not* C++). Obviously, C is a procedural language and doesn't really support functional programming natively.
Are there any compiler/language extensions that add some functional programming constructs to the language? GCC provides... | [
0.09925186634063721,
0.0000826351169962436,
0.12761272490024567,
-0.005154326092451811,
-0.0749780535697937,
-0.14665788412094116,
0.04429309815168381,
-0.03870769217610359,
-0.4547622501850128,
-0.41308146715164185,
-0.14267641305923462,
0.5022999048233032,
-0.32938051223754883,
0.0537034... | |
a lambda expression, creating a closure which decays into a function pointer. C++0x is going to include lambda expressions (which I think is awesome); however, I'm looking for tools applicable to straight C.
[Edit] To clarify, I'm not trying to solve a particular problem in C that would be more suited to functional pr... | [
0.313892662525177,
-0.04931163415312767,
0.18026208877563477,
-0.1500224620103836,
-0.1362670212984085,
-0.1457604467868805,
0.17105892300605774,
-0.24794740974903107,
-0.21844953298568726,
-0.2435707300901413,
-0.2790006399154663,
0.7813677191734314,
-0.5931228399276733,
-0.32236322760581... | |
collection manually, though.
Relatedly, [blocks](http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-August/002670.html) have been added to Apple's fork of GCC; they're not function pointers, but they let you pass around lambdas while avoiding the need to build and free storage for captured variables by hand (effectively,... | [
0.31881481409072876,
-0.2937663197517395,
0.2719530165195465,
0.248855322599411,
-0.31200557947158813,
0.055412936955690384,
0.14264431595802307,
-0.4070398211479187,
-0.6341658234596252,
-0.08870898187160492,
-0.1706484854221344,
-0.028629152104258537,
-0.30788087844848633,
0.084905654191... | |
I haven't found an answer to this particular question; perhaps there isn't one. But I've been wondering for a while about it.
What exactly causes a binary file to display as "gibberish" when you look at it in a text editor? It's the same thing with encrypted files. Are the binary values of the file trying to be conver... | [
0.4070393145084381,
0.19538924098014832,
0.09579174965620041,
0.13114017248153687,
-0.22630637884140015,
0.03373023495078087,
0.34798285365104675,
0.31617748737335205,
-0.21316742897033691,
-0.6929687261581421,
-0.21354591846466064,
0.4437120854854584,
-0.10452793538570404,
0.3011727631092... | |
especially with Windows, a file is orphaned or otherwise not associated w/ a particular program. Opening it in a text editor sometimes tells you where it belongs but most of the time doesn't, due to the gibberish. If the extension doesn't provide any information, how can you determine what program it belongs to?
* ***A... | [
0.37054622173309326,
0.06103813275694847,
0.13720448315143585,
0.30695217847824097,
0.28456494212150574,
-0.3211204707622528,
0.20631708204746246,
0.2553238272666931,
-0.5067598819732666,
-0.7447665333747864,
-0.5154852271080017,
0.2874780297279358,
-0.05212319642305374,
0.416483998298645,... | |
convert the view to display raw binary values, i.e.
to show the 1s and 0s that make up the file?***
It depends on your editor. What you want is a "hex editor", rather than a normal text editor. This will show you the raw contents of the file (typically in hexadecimal rather than binary, since the zeros and ones would ... | [
0.33582639694213867,
-0.10781390219926834,
0.30823227763175964,
0.11099909991025925,
-0.30244484543800354,
0.17052417993545532,
0.20485641062259674,
-0.09977687150239944,
-0.10395149886608124,
-0.8206304311752319,
-0.1813083440065384,
0.6931544542312622,
0.041471969336271286,
-0.0035069291... | |
common header patterns) and tell you what sort of file it is (for example text, or audio, or video, or XML, etc). I'm not sure if there is an equivalent program for Windows. Of course, the output of this program is just a guess, but it can be very useful when you don't know what the format of a file is. | [
0.5838954448699951,
-0.053287334740161896,
0.19329559803009033,
0.42455607652664185,
0.031041176989674568,
-0.5129479765892029,
-0.20479537546634674,
0.2421271800994873,
-0.23199859261512756,
-0.5950191020965576,
0.002861557062715292,
0.42454150319099426,
-0.1644391119480133,
0.07124315947... | |
I am parsing an input text file. If I grab the input one line at a time using getline(), is there a way that I can search through the string to get an integer? I was thinking something similar to getNextInt() in Java.
I know there has to be 2 numbers in that input line; however, these values will be separated by one ... | [
-0.1318807303905487,
-0.007005887571722269,
0.2561260163784027,
-0.21800105273723602,
-0.14843705296516418,
0.24904362857341766,
0.22578537464141846,
-0.29857194423675537,
-0.12417421489953995,
-0.8545231819152832,
-0.22607354819774628,
0.3137895464897156,
-0.4611722528934479,
-0.198806241... | |
i2;
theFileStream >> i1 >> i2;
``` | [
-0.34981799125671387,
0.07804295420646667,
0.3166753947734833,
-0.2862562835216522,
0.16647043824195862,
0.000051469200116116554,
0.3041054308414459,
0.09492488950490952,
0.12562912702560425,
-0.6708679795265198,
-0.4020423889160156,
0.5125681161880493,
-0.37114667892456055,
0.069974556565... | |
I want to have a function that will return the reverse of a list that it is given -- using recursion. How can I do that?
Append the first element of the list to a reversed sublist:
```
mylist = [1, 2, 3, 4, 5]
backwards = lambda l: (backwards (l[1:]) + l[:1] if l else [])
print backwards (mylist)
``` | [
0.034402377903461456,
0.1151813268661499,
0.5254137516021729,
-0.502069354057312,
-0.09868986904621124,
0.5245382785797119,
0.12792275846004486,
-0.34477826952934265,
0.025391699746251106,
-0.39399880170822144,
0.015350566245615482,
0.4618799388408661,
-0.537910521030426,
-0.09219233691692... | |
I want to allow users to paste `<embed>` and `<object>` HTML fragments (video players) via an HTML form. The server-side code is PHP. How can I protect against malicious pasted code, JavaScript, etc? I could parse the pasted code, but I'm not sure I could account for all variations. Is there a better way?
I'm not reall... | [
0.64408278465271,
0.34617704153060913,
0.6328580379486084,
0.21178382635116577,
-0.28726184368133545,
-0.14958396553993225,
0.007721093017607927,
0.1558886468410492,
-0.1666836142539978,
-0.8395748734474182,
0.14439333975315094,
0.48377373814582825,
-0.21095481514930725,
0.3129680752754211... | |
and then you can parse out the URL and anything else, make sure they are legit and make your own `<EMBED>` tag.
**edit:** Alright, something like this should be fine:
```
$youtube = '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Z75QSExE0jU&hl=en&fs=1"></param> </param><embed sr... | [
0.3725575804710388,
-0.10010495781898499,
0.8560611605644226,
0.10825042426586151,
-0.29858991503715515,
-0.06876370310783386,
0.2214300036430359,
-0.9487171769142151,
-0.2506776750087738,
-0.34092673659324646,
-0.27524545788764954,
0.7150789499282837,
-0.26372939348220825,
0.1333353668451... | |
name="movie"
[3] => value="http://www.youtube.com/v/Z75QSExE0jU&hl=en&fs=1"
[4] => src="http://www.youtube.com/v/Z75QSExE0jU&hl=en&fs=1"
[5] => type="application/x-shockwave-flash"
[6] => allowfullscreen="true"
[7] => width="425"
[8] => height="344"
)
[1] => Array
... | [
0.33848807215690613,
-0.05603960528969765,
0.5147582292556763,
0.21554715931415558,
-0.2974262237548828,
-0.35187724232673645,
0.26369476318359375,
-0.48426496982574463,
-0.08561597764492035,
-0.14605242013931274,
-0.5089635848999023,
0.551662802696228,
-0.1490667462348938,
0.5012291669845... | |
name
[3] => value
[4] => src
[5] => type
[6] => allowfullscreen
[7] => width
[8] => height
)
[2] => Array
(
[0] => 425
[1] => 344
[2] => | [
0.2734932601451874,
-0.1037152111530304,
0.38405200839042664,
0.12611444294452667,
-0.20000608265399933,
-0.01237354427576065,
0.34962090849876404,
-0.7552387714385986,
0.006331730633974075,
-0.5915141105651855,
-0.2866072654724121,
0.291219562292099,
0.005588976200670004,
0.12457153201103... | |
movie
[3] => http://www.youtube.com/v/Z75QSExE0jU&hl=en&fs=1
[4] => http://www.youtube.com/v/Z75QSExE0jU&hl=en&fs=1
[5] => application/x-shockwave-flash
[6] => true
[7] => 425
[8] => 344
)
)
Array
(
[0] => Array
(
[0] => src="http://blip.tv/play/AZ_iEoaIf... | [
0.2299492061138153,
-0.3142926096916199,
0.6744899749755859,
0.1124071553349495,
-0.13266250491142273,
-0.17652547359466553,
0.2785991430282593,
-0.9545112252235413,
-0.3561234772205353,
0.14230172336101532,
-0.27385392785072327,
0.8017397522926331,
-0.09542446583509445,
0.4816333949565887... | |
width="640"
[3] => height="510"
[4] => allowscriptaccess="always"
[5] => allowfullscreen="true"
)
[1] => Array
(
[0] => src
[1] => type
[2] => width
[3] => height
[4] => allowscriptaccess
[5] => | [
-0.24899902939796448,
-0.3070199191570282,
0.6333242654800415,
0.06432992964982986,
0.17383188009262085,
-0.12267297506332397,
0.3056763708591461,
-0.7770772576332092,
-0.2719619870185852,
-0.6850003004074097,
-0.44831717014312744,
0.5472288727760315,
-0.12513573467731476,
-0.1043988764286... | |
allowfullscreen
)
[2] => Array
(
[0] => http://blip.tv/play/AZ_iEoaIfA
[1] => application/x-shockwave-flash
[2] => 640
[3] => 510
[4] => always
[5] => true
)
)
```
From then on it's pretty straight forward. For things like width/height you can verify them w... | [
0.3415429890155792,
-0.35964953899383545,
1.1351971626281738,
0.057813894003629684,
-0.030220406129956245,
-0.5565046668052673,
0.37925854325294495,
-0.535132646560669,
-0.23931945860385895,
-0.4115299880504608,
-0.014066877774894238,
0.5271326303482056,
-0.11924847215414047,
-0.2438005357... | |
through [`htmlentities`](http://www.php.net/htmlentities) and construct your own `<embed>` tag from the information. I am pretty certain this would be safe. You can even make the full-fledged `<object>` one like YouTube (which I assume works in more places) with links from blip.tv, since you would have all the required... | [
0.9150158762931824,
-0.30034109950065613,
0.6633160710334778,
0.34780749678611755,
0.001651340746320784,
-0.5621885657310486,
0.13244226574897766,
0.3283460736274719,
-0.47968900203704834,
-0.5789540410041809,
0.08749035000801086,
0.36932095885276794,
0.09655468910932541,
0.163471743464469... | |
When should I continue to make derived classes, and when should I just add conditionals to my code?
eg for a missile
```
class Object;
class Projectile : public Object;
class Missile : public Projectile;
class MissileGuided : public Missile;
```
Or should I implement that last one in the missile's code?
```
void M... | [
0.028423961251974106,
-0.18371863663196564,
0.3116017282009125,
0.14909572899341583,
0.1895025223493576,
0.05465411767363548,
0.22384552657604218,
-0.5313085913658142,
-0.2050902396440506,
-0.5139127373695374,
-0.4143970310688019,
0.6342341303825378,
-0.05405329540371895,
-0.19892418384552... | |
new targets if the original is destroyed or out of range, etc)
However then the same could be said for regular projectiles sharing properties of missiles in some cases (eg may be destroyable, large projectiles may show on radar, etc)
And then further I could say that projectiles share properties with ships (both move... | [
0.1764017790555954,
-0.03064904548227787,
0.2705201804637909,
0.4339565634727478,
-0.30855751037597656,
0.12830832600593567,
0.3059471547603607,
-0.407534122467041,
-0.23032823204994202,
-0.8609706163406372,
-0.21357659995555878,
0.5222461223602295,
-0.13166707754135132,
0.227696493268013,... | |
method with flags or something?
You may want to consider using **strategy pattern** instead of both approaches and encapsulate behaviours within external classes. Then the behaviours can be injected into the Missile class to make it GuidedMissile or SpaceRocket or whatever else you need.
This way excessive branching ... | [
0.192418172955513,
-0.5375977158546448,
0.3510383069515228,
0.3199118971824646,
0.05659813433885574,
-0.022267505526542664,
0.051990509033203125,
-0.27411454916000366,
-0.09652361273765564,
-0.5902783274650574,
-0.02612345851957798,
0.6205937266349792,
-0.5351177453994751,
-0.0077935480512... | |
current, Destination dest) {
return dest.getShortestRouteTo (current).getCourse();
};
}
Class GuidedMissileCPU implements INavigable {
Course calcCourse (Position current, Destination dest) {
return dest.getLowestAltRouteTo (current).getCourse();
};
}
class Missile {
INavigable CPU;
void setCP... | [
0.3169202208518982,
-0.6229666471481323,
0.7973229885101318,
0.2806990444660187,
0.3144190311431885,
0.009422899223864079,
0.02680005133152008,
-0.259834885597229,
-0.007920882664620876,
-0.6243402361869812,
-0.16084471344947815,
0.8233279585838318,
-0.24233898520469666,
0.2987114191055298... | |
issues that might be important in your context if you were to take that route:
1. To replace just a certain aspect of object's behaviour you'd need to decorate the entire class.
2. If the public interface of the decorated class (let say missile) to be ever changed (even some functionality unrelated to its navigation a... | [
0.2589905858039856,
-0.12252110242843628,
0.35528457164764404,
0.24769484996795654,
-0.19375018775463104,
-0.14231392741203308,
0.3901458978652954,
-0.4236312210559845,
-0.14455175399780273,
-0.44718605279922485,
-0.24049228429794312,
0.6638981699943542,
-0.4609840512275696,
0.153614208102... | |
method. In the scenario above this would lead to being able to have a GuidedMissileCPU that decorates a GeoStationaryRocketCPU -- clearly this is not what you want. You want it to choose a different navigation strategy not layer navigation strategies on top of one another.
Nonetheless, when provided with a ready-made ... | [
0.10428573936223984,
-0.4026135206222534,
0.5818750858306885,
0.5420525670051575,
0.0781950131058693,
-0.32509753108024597,
0.5715160369873047,
-0.45963507890701294,
-0.22458234429359436,
-0.24562382698059082,
-0.3913619816303253,
0.6604190468788147,
-0.1220705434679985,
-0.034325033426284... | |
Suppose to have a code like this:
```
<div class="notSelected">
<label>Name
<input type="text" name="name" id="name" />
</label>
<div class="description">
Tell us what's your name to make us able to fake to be your friend
when sending you an email.
</div>
</div>
... | [
0.2610997259616852,
0.13490262627601624,
0.03803827613592148,
-0.03230153024196625,
0.17926862835884094,
-0.17597278952598572,
0.3661133348941803,
0.11445517092943192,
0.045723579823970795,
-0.4994857907295227,
0.036499448120594025,
0.3979416489601135,
-0.4454212486743927,
-0.1061583533883... | |
a form.
I'd like to change the style from notSelected to Selected when:
* User focus on the input element
* User move the mouse over a notSelected div
When he change focus the Selected div should became notSelected again.
I'd like to do something like this to increment the size of the text of the selected div. Anywa... | [
0.3777661621570587,
-0.22603623569011688,
0.4335832893848419,
0.10223197937011719,
-0.5448594689369202,
-0.22027578949928284,
0.3115900158882141,
-0.22506044805049896,
-0.020433690398931503,
-0.8735899329185486,
-0.041124776005744934,
0.35434603691101074,
-0.40642595291137695,
-0.202809214... | |
effects like fading etc...
I downloaded MooTools but with a fast read of the docs I did not see how to do this without having a specific ID for any of the forms div, but is the first time I use it. I've no problem using any other framework, but if you suggest one, please write also what should I look for specifically.... | [
0.7162819504737854,
-0.24559395015239716,
0.5364819169044495,
-0.06861401349306107,
-0.12967975437641144,
-0.3809058666229248,
0.22623246908187866,
0.02897661179304123,
0.04920089617371559,
-0.718019962310791,
0.1672820746898651,
0.5289194583892822,
-0.17991076409816742,
-0.106732740998268... | |
"selectable". You can toggle other CSS classes later on. Create a CSS class named "selected" and give it the desired look.
```
<div class="selectable"> (=off) vs. <div class="selectable selected"> (=on)
```
Then add something like this to the scripts section of your document:
```
$(document).ready(function(){
/... | [
-0.06147275120019913,
-0.499199241399765,
0.5687674283981323,
-0.14527824521064758,
0.19252952933311462,
0.14854967594146729,
-0.2090684175491333,
-0.24483650922775269,
-0.03740980476140976,
-0.6906073689460754,
-0.5015066862106323,
0.5433208346366882,
-0.3874413073062897,
0.03402685746550... | |
// unless it has already been selected by mouse move
$("div.selectable input").focus(
function() {
$(this).parents("div.selectable").not(".mouseIsOver").addClass("selected");
}
).blur(
function() {
$(this).parents("div.selectable").not(".mouseIsOver").removeClass("selected");
}
);
});
... | [
0.0847996398806572,
-0.21466901898384094,
0.6453493237495422,
-0.08290480822324753,
0.436039000749588,
-0.02199839986860752,
0.20929943025112152,
0.01372930221259594,
-0.05927015468478203,
-0.8622085452079773,
-0.6202834844589233,
0.34200572967529297,
-0.094200499355793,
0.1417669802904129... | |
Does anybody know any resources on this subject?
I'm developing an embedded application for 2x16 LCD display. Ideally I would like to have a general (display independent) framework, that could be used virtually on any display - one or more segment(s) LED, 1x16, 2x16 LCD, etc.
Also would like to learn about general gui... | [
0.4799613654613495,
-0.03792101889848709,
0.3852907121181488,
0.22215434908866882,
-0.034597672522068024,
-0.03327358886599541,
-0.28432518243789673,
0.09402971714735031,
-0.3003048002719879,
-0.7498102784156799,
0.1246328130364418,
0.5334264636039734,
-0.1580972969532013,
0.06497833877801... | |
go for at least 4 buttons:
* MENU
* UP
* DOWN
* OK
If you specify the line width (like 16), then this would work for 16x2, 16x1 and 16 7-segment displays.... and you would take that into consideration when designing the text on the menus.
The UI would be more useful if you add more buttons, I would think about these... | [
0.07176332920789719,
-0.1667829155921936,
0.3620218336582184,
0.020434869453310966,
-0.15478268265724182,
0.7244683504104614,
-0.08049309998750687,
-0.29278144240379333,
-0.45476821064949036,
-0.7533928751945496,
0.061923157423734665,
0.7122213840484619,
-0.32705649733543396,
-0.0294707231... | |
16x1 or 16x2.
The main screen would be something like 08:15P SUN101908
when you press the menu key, it will show a menu (Set Time, Set Date, Set Alarm,Set Display), with UP&DOWN to move the item, and OK to select an item.
If you select "Set time" the UP and DOWN arrows will change the hours and OK will accept and mov... | [
0.1978694200515747,
-0.02556808479130268,
0.5699963569641113,
-0.1278919279575348,
0.13525928556919098,
0.5033934712409973,
-0.10486166924238205,
0.08709005266427994,
-0.5271815657615662,
-0.6554645895957947,
-0.2518703043460846,
0.5359233021736145,
-0.16494868695735931,
0.066199891269207,... | |
I'm looking for the best way to tell if an `<mx:Image>` has already fired the 'Event.COMPLETE' event. I want to do something if it has shown, or attach an event handler if it hasnt yet.
something like :
```
if (newBackground.percentLoaded < 100)
```
or
```
if (newBackground.content != null)
```
i was originally... | [
0.3633019030094147,
0.048477157950401306,
0.07938063889741898,
0.15525376796722412,
-0.16973084211349487,
-0.22670520842075348,
0.20253032445907593,
0.08519472181797028,
-0.06405843794345856,
-0.6563459634780884,
0.06979944556951523,
0.6369482278823853,
-0.4268646240234375,
-0.000400826800... | |
attach an `Event.COMPLETE` event listener to the Image before it starts loading. If this is the case, you could always subclass `mx.controls.Image` and add your own property `"loadingCompleted"` or `"complete"` that is initially `false` but gets set to `true` when the `Event.COMPLETE` event fires the first time. | [
0.2868080139160156,
-0.06987931579351425,
0.3075658082962036,
0.09221077710390091,
-0.07462796568870544,
-0.3657016456127167,
-0.17328007519245148,
-0.2943984270095825,
-0.1921076625585556,
-0.38074931502342224,
-0.48749884963035583,
0.7640244960784912,
-0.3030005693435669,
0.0375816635787... | |
Is there a max length for an array in C++?
Is it a C++ limit or does it depend on my machine? Is it tweakable? Does it depend on the type the array is made of?
Can I break that limit somehow or do I have to search for a better way of storing information? And what should be the simplest way?
What I have to do is stor... | [
0.14148545265197754,
0.044429853558540344,
0.15319010615348816,
-0.003621503710746765,
-0.05461188033223152,
0.07551617920398712,
0.11472618579864502,
-0.311527818441391,
-0.37716102600097656,
-0.2959132194519043,
0.32802510261535645,
0.5185204744338989,
-0.24562552571296692,
-0.0117699122... | |
N > 10 digits?
I need this because I'm writing some cryptographic algorithm (as for example the p-Pollard) for school, and hit this wall of integers and length of arrays representation.
There are two limits, both not enforced by C++ but rather by the hardware.
The first limit (should never be reached) is set by the r... | [
0.1589740365743637,
-0.08567247539758682,
0.4800531268119812,
-0.13013814389705658,
0.07916711270809174,
-0.09303445369005203,
0.08421525359153748,
-0.12484890222549438,
-0.38356438279151917,
-0.1335267871618271,
-0.0038338322192430496,
0.4502470791339874,
-0.2327922284603119,
0.1085346341... | |
a physical memory limit. The larger your objects in the array are, the sooner this limit is reached because memory is full. For example, a `vector<int>` of a given size *n* typically takes multiple times as much memory as an array of type `vector<char>` (minus a small constant value), since `int` is usually bigger than... | [
-0.004012292250990868,
-0.33717527985572815,
0.22525997459888458,
0.21004286408424377,
-0.056453391909599304,
0.15111680328845978,
0.10058439522981644,
-0.300927072763443,
-0.4286288917064667,
-0.7305784821510315,
-0.048621825873851776,
0.587225079536438,
-0.06663651019334793,
0.1688600182... | |
is free to manage memory any way it wants. A very odd but nontheless conceivable allocator could pool memory in such a way that identical instances of an object share resources. This way, you could insert a lot of identical objects into a container that would otherwise use up all the available memory.
Apart from that,... | [
0.15308915078639984,
0.060224443674087524,
0.04857838153839111,
0.4073757231235504,
-0.08667805790901184,
-0.5309975147247314,
0.026444757357239723,
0.12878268957138062,
-0.24882546067237854,
-0.22607733309268951,
-0.14400328695774078,
0.4638270437717438,
-0.3760462701320648,
-0.0510289780... | |
I've been playing with some algorithms on the internet for a while and I can't seem to get them to work, so I'm tossing the question out here;
I am attempting to render a velocity vector line from a point. Drawing the line isn't difficult: just insert a line with length `velocity.length` into the graph. This puts the ... | [
0.14715631306171417,
-0.15412156283855438,
0.6478721499443054,
0.03189871832728386,
-0.27183032035827637,
0.2700064182281494,
-0.14949388802051544,
-0.00838750135153532,
-0.2222362607717514,
-0.7539817690849304,
0.2437332570552826,
0.1417914181947708,
-0.11671438068151474,
0.50849044322967... | |
me. Given a directional vector `<x, y, z>`, what's the matrix I need?
**Edit 1:** Look; if you don't understand the question, you probably won't be able to give me an answer.
Here is what I currently have:
```
Vector3f translation = new Vector3f();
translation.scale(1f/2f, bod... | [
0.038385577499866486,
-0.24587389826774597,
0.7647818326950073,
-0.21724747121334076,
-0.32284924387931824,
0.2274538278579712,
-0.03577186167240143,
-0.4573579430580139,
-0.07641571760177612,
-0.7309243083000183,
0.15100377798080444,
0.5153577327728271,
-0.5509344935417175,
0.041477710008... | |
Vector3f vec_z = (Vector3f) body.velocity.clone();
vec_z.normalize();
Vector3f vec_y; // reference vector, will correct later
if (vec_z.x == 0 && vec_z.z == 0) { | [
-0.2875950038433075,
-0.5362375974655151,
0.8614753484725952,
-0.18124179542064667,
-0.024841811507940292,
0.38544803857803345,
0.09925959259271622,
-0.23652569949626923,
-0.34568673372268677,
-0.5876644253730774,
0.06870468705892563,
0.5995957851409912,
-0.4809519946575165,
0.065716952085... | |
vec_y = new Vector3f(-vec_z.y, 0f, 0f); // could be optimized
} else {
vec_y = new Vector3f(0f, 1f, 0f);
} | [
-0.07433632016181946,
-0.6061878204345703,
0.4998286962509155,
-0.2354348599910736,
-0.1260310709476471,
0.2865854799747467,
0.09497303515672684,
-0.23146463930606842,
-0.1498648077249527,
-0.5015667676925659,
-0.09749315679073334,
0.832245945930481,
-0.27744078636169434,
-0.13992272317409... | |
Vector3f vec_x = new Vector3f();
vec_x.cross(vec_y, vec_z);
vec_z.normalize();
vec_y.cross(vec_x, vec_z);
vec_y.normalize(); | [
-0.40760502219200134,
-0.6673305034637451,
0.8052930235862732,
-0.4328341782093048,
-0.4124522805213928,
0.3707490861415863,
0.20721915364265442,
-0.3074101209640503,
-0.05248546600341797,
-0.7380266189575195,
-0.2211068570613861,
0.5040938854217529,
-0.6592958569526672,
0.1430232077836990... | |
vec_y.negate();
Matrix3f rotation = new Matrix3f(
vec_z.z, vec_z.x, vec_z.y,
vec_x.z, vec_x.x, vec_x.y, | [
-0.3083571791648865,
-0.023724017664790154,
0.8346134424209595,
-0.6016916632652283,
-0.3539903163909912,
0.3228491246700287,
0.27678582072257996,
-0.7554919123649597,
-0.21371647715568542,
-0.319631427526474,
-0.16604937613010406,
0.38287466764450073,
-0.4320184290409088,
0.37148499488830... | |
vec_y.z, vec_y.x, vec_y.y
);
arrowTransform3D.set(rotation, translation, 1f);
```
based off of [this article](http://www.gamedev.net/reference/articles/article665.asp). And yes, I've tried the standard rotation matrix (vec\_x.x, vec\_y.x, etc) and it didn't work. I've been rota... | [
0.16870030760765076,
0.15537573397159576,
0.45962682366371155,
0.003828440560027957,
-0.28111129999160767,
0.016918638721108437,
0.08616519719362259,
-0.07265902310609818,
-0.37471017241477966,
-0.5190243721008301,
-0.22853364050388336,
0.5773814916610718,
-0.1597013622522354,
0.1782828867... | |
combination of two errors; one of which House MD pointed out (really bad naming of variables: `vec_z` was actually `vec_y`, and so on), and the other was that I needed to invert the matrix before passing it off to the rendering engine (transposing was close!). So the modified code is:
```
Vector3f ... | [
0.1259562224149704,
-0.21417202055454254,
0.6673786044120789,
-0.21341116726398468,
0.08047281950712204,
0.3137075901031494,
0.2485724538564682,
-0.3625281751155853,
-0.17423267662525177,
-0.5744094848632812,
0.037279825657606125,
0.49836161732673645,
-0.3704797625541687,
0.069143123924732... | |
Vector3f vec_x; // reference vector, will correct later
if (vec_y.x == 0 && vec_y.z == 0) {
vec_x = new Vector3f(-vec_y.y, 0f, 0f); // could be optimized | [
-0.39920392632484436,
-0.636217474937439,
0.5570358037948608,
-0.1517961323261261,
-0.05862777680158615,
0.312076598405838,
0.10279155522584915,
-0.2532917857170105,
-0.28212955594062805,
-0.5899861454963684,
0.14236848056316376,
0.6739629507064819,
-0.5001868009567261,
-0.321770578622818,... | |
} else {
vec_x = new Vector3f(0f, 1f, 0f);
}
Vector3f vec_z = new Vector3f();
vec_z.cross(vec_x, vec_y); | [
-0.17861713469028473,
-0.4779207408428192,
0.5521790981292725,
-0.39645376801490784,
-0.08480551093816757,
0.2706831395626068,
0.17099297046661377,
-0.2811582684516907,
0.0027929258067160845,
-0.5866790413856506,
-0.1906922459602356,
0.8318873047828674,
-0.5066669583320618,
0.0501415133476... | |
vec_z.normalize();
vec_x.cross(vec_z, vec_y);
vec_x.normalize();
vec_x.negate();
Matrix3f rotation | [
-0.28304216265678406,
-0.15017978847026825,
0.7464282512664795,
-0.47837361693382263,
-0.3746807277202606,
0.17546190321445465,
0.08990954607725143,
-0.5988376140594482,
-0.05363284796476364,
-0.3192359507083893,
-0.2608586847782135,
0.44949138164520264,
-0.5168694853782654,
0.557772278785... | |
= new Matrix3f(
vec_x.x, vec_x.y, vec_x.z,
vec_y.x, vec_y.y, vec_y.z,
vec_z.x, vec_z.y, vec_z.z | [
-0.22891241312026978,
0.07097835838794708,
0.8444012999534607,
-0.4547910690307617,
-0.2565629482269287,
0.3953626751899719,
0.14566686749458313,
-0.6415488719940186,
-0.10082191973924637,
-0.24191610515117645,
-0.05807332322001457,
0.4004665017127991,
-0.43207862973213196,
0.1695355772972... | |
);
rotation.invert();
```
[Dupe.](https://stackoverflow.com/questions/193918/what-is-the-easiest-way-to-align-the-z-axis-with-a-vector)
> The question there involves getting a rotation to a certain axis, whereas I'm concerned with getting a rotation matrix.
Gee, I wonder if you could turn [convert... | [
0.3959636390209198,
-0.12562750279903412,
0.5245397686958313,
-0.10314660519361496,
-0.031124325469136238,
0.08672045171260834,
-0.134440615773201,
-0.15033142268657684,
-0.12420446425676346,
-0.47447919845581055,
-0.08820278197526932,
0.7082594037055969,
-0.33486175537109375,
0.2220071107... | |
does - transpose the matrix, negate vectors until you have an even number of sign errors, that kind of thing.
Also your tone of voice comes across as sort-of rude, given that you're asking strangers to spend their time helping you. | [
0.6412907838821411,
0.27909258008003235,
-0.07012073695659637,
0.304624080657959,
-0.10914433002471924,
0.1785653531551361,
0.0015187565004453063,
0.11618247628211975,
-0.13900801539421082,
-0.38597339391708374,
0.09571360796689987,
0.19718261063098907,
-0.04575320705771446,
0.178937062621... | |
As it was made clear in my [recent question](https://stackoverflow.com/questions/212009/do-i-have-to-explicitly-call-systemexit-in-a-webstart-application), Swing applications need to explicitly call System.exit() when they are ran using the Sun Webstart launcher (at least as of Java SE 6).
I want to restrict this hack... | [
0.13858486711978912,
0.1702897548675537,
0.5235234498977661,
-0.13649368286132812,
-0.20659925043582916,
-0.5206289291381836,
0.35318636894226074,
-0.1742098033428192,
-0.39718538522720337,
-0.3232867419719696,
-0.18177646398544312,
0.436484694480896,
-0.2731170654296875,
-0.08859255164861... | |
do not ceate a dependency on the the webstart API?)
When your code is launched via javaws, javaws.jar is loaded and the JNLP API classes that you don't want to depend on are available. Instead of testing for a system property that is not guaranteed to exist, you could instead see if a JNLP API class exists:
```
privat... | [
0.49644947052001953,
-0.3676244914531708,
0.3271280527114868,
-0.23936808109283447,
0.07425454258918762,
-0.3380770981311798,
0.6265386343002319,
-0.2587133049964905,
-0.3372586667537689,
-0.6622161865234375,
-0.416718989610672,
0.4741538166999817,
-0.3394147455692291,
0.2573196291923523,
... | |
false;
}
return hasJNLP;
}
```
This also avoids needing to include javaws.jar on your class path when compiling.
Alternatively you could switch to compiling with javaws.jar and catching NoClassDefFoundError instead:
```
private boolean isRunningJavaWebStart() {
try {
ServiceManager.getServiceNam... | [
0.054457902908325195,
-0.1983533352613449,
0.08139949291944504,
-0.29744184017181396,
-0.030833963304758072,
-0.21759942173957825,
0.9259582161903381,
-0.27002832293510437,
-0.24898143112659454,
-0.691345751285553,
-0.22036196291446686,
0.6147832870483398,
-0.35324496030807495,
0.381367206... | |
throw. We are specifically calling this code to check for a NoClassDefFoundError. | [
0.43965089321136475,
0.16836994886398315,
-0.34491610527038574,
-0.018057050183415413,
-0.25081560015678406,
-0.36463144421577454,
0.5725712180137634,
0.016305824741721153,
-0.031581781804561615,
-0.31645235419273376,
0.1772589087486267,
0.32586538791656494,
-0.13488160073757172,
0.2705084... | |
I am looking for a *private* online source control system. Basically what I want is a private version of [Google Code](http://code.google.com/hosting/) or [SourceForge](http://sourceforge.net/). Private in the sense that only me and the person I invite can view the source code. The source code in the source control sho... | [
0.769065260887146,
0.24584214389324188,
0.272386372089386,
0.253248393535614,
0.08702653646469116,
-0.2653568983078003,
0.1940757781267166,
0.4234997630119324,
-0.07471111416816711,
-0.5564303994178772,
-0.16851311922073364,
0.45643001794815063,
-0.12216389924287796,
0.3442747890949249,
... | |
monthly access fee for this.
Any ideas?
Atlassian's BitBucket just announced Git repositories last week. Bit bucket allows unlimited private repositories for free. You need to pay if you want more than 5 users. | [
0.45402806997299194,
-0.32634517550468445,
0.20903019607067108,
0.6428133845329285,
-0.033380601555109024,
0.1352599412202835,
0.4136433005332947,
0.3813396394252777,
-0.3840046525001526,
-0.34177684783935547,
-0.23303253948688507,
0.20836420357227325,
-0.12210304290056229,
0.2261923551559... | |
Hi Anyone know of a simple system of getting xml formatted inside an editor. I mainly use textpad so that would be my main interest. What I'm really asking is that when I paste an xml string from a logfile or something into textpad that I can use a plugin or a third party tool to format the xml in textpad so it is read... | [
0.22961799800395966,
0.03339317440986633,
0.4426306188106537,
0.2242223620414734,
-0.3538222312927246,
-0.16579313576221466,
-0.14510074257850647,
0.15861870348453522,
-0.248022198677063,
-0.4056912362575531,
0.30881553888320923,
0.2870742678642273,
0.041275523602962494,
0.1222983449697494... | |
it to be formatted as an xml string eg. indentation.
Any suggestions?
Update: I found that Editpad pro allows you to write tools that will take the current selected text as input and replace it with the output. This is more powerful than what textpad allows you to do and just what I want.
There are add-ons for textpa... | [
0.20908090472221375,
-0.31583261489868164,
0.46405598521232605,
0.05093943700194359,
0.046951714903116226,
0.2017803192138672,
-0.1550147831439972,
-0.1301228553056717,
-0.03291912004351616,
-1.017695665359497,
-0.15625789761543274,
0.5614431500434875,
-0.198100283741951,
-0.12763899564743... | |
What I'd like to accomplish is to present charts on webpages. For example aspx pages gridviews that present a two column table are able to be copied & placed into Excel then a chart created. The pages I currently use most are ASP.NET 3.0 or SharePoint team sites with stored procedures. People are very interested in how... | [
0.2044025957584381,
-0.012053308077156544,
0.6800220608711243,
0.04303858056664467,
0.030575696378946304,
-0.18303711712360382,
-0.03052532486617565,
0.16352780163288116,
-0.3247576057910919,
-0.8228892087936401,
0.4035879671573639,
0.18799875676631927,
-0.01935005560517311,
-0.01881110481... | |
We're getting ready to translate our PHP website into various languages, and the gettext support in PHP looks like the way to go.
All the tutorials I see recommend using the english text as the message ID, i.e.
gettext("Hi there!")
But is that really a good idea? Let's say someone in marketing wants to change the te... | [
0.4210010766983032,
0.28227585554122925,
0.5600295066833496,
-0.01703895814716816,
-0.1456901878118515,
-0.37716707587242126,
0.5443832278251648,
0.5331966280937195,
-0.09480687975883484,
-0.4748901426792145,
-0.142903670668602,
0.43376097083091736,
0.1565110832452774,
-0.16832442581653595... | |
such as "`welcome_back_1`" which would be "`welcome back, %1`" etc. I always have English as my "base" language so in the worst case scenario when a specific language doesn't have a message ID, I fall-back on English.
I don't like to use actual English phrases as message ID's because if the English changes so does the... | [
0.2206696718931198,
0.3719470202922821,
-0.004045967012643814,
-0.19552212953567505,
-0.3468461334705353,
-0.0862601175904274,
0.6387847661972046,
0.506621778011322,
-0.018094893544912338,
-0.6539108157157898,
-0.3500717580318451,
0.34874773025512695,
-0.1576317995786667,
-0.10118092596530... | |
Somewhat-simplified example situation: I have entities A and B which are incredibly "heavy" domain objects. Loading one from the database is a pretty big deal. Then I have an entity C, which is a very simple object that has a label string, one A, and one B -- both lazy.
I'm doing some low-level querying to create huge... | [
0.4319005310535431,
0.3441482186317444,
0.044113170355558395,
0.21032455563545227,
-0.1612788289785385,
-0.028883425518870354,
-0.16205838322639465,
-0.010694630444049835,
-0.3418951630592346,
-0.2732384502887726,
0.0781705304980278,
0.30584874749183655,
-0.09875471889972687,
0.39064374566... | |
IDs directly into my C entities, and then let the A and B properties on it be fully loaded later only if needed.
I see the `<sql-insert/>` tag in the documentation, but the section is *really* sparse.
Is there any way to do what I want to do inside the NHibernate framework, or should I just do raw SQL? I'm trying to... | [
0.32370075583457947,
0.3105045258998871,
0.1747131496667862,
-0.06792094558477402,
-0.38841578364372253,
-0.13502638041973114,
0.04961194097995758,
0.04846332222223282,
0.11402678489685059,
-0.4855281412601471,
0.0004446938110049814,
0.4561040699481964,
-0.003091983264312148,
0.13644540309... | |
always have English as my "base" language so in the worst case scenario when a specific language doesn't have a message ID, I fall-back on English.
I don't like to use actual English phrases as message ID's because if the English changes so does the ID. This might not affect you much if you use some automated tools, b... | [
0.4273626208305359,
0.24422180652618408,
0.07714782655239105,
-0.0005585489561781287,
-0.2045900821685791,
-0.08779571950435638,
0.8099901080131531,
0.6188676953315735,
-0.07028331607580185,
-0.5339855551719666,
-0.23766575753688812,
0.41517555713653564,
-0.21642440557479858,
-0.2477288097... | |
I want to ask a question about how you would approach a simple object-oriented design problem. I have a few ideas of my own about what the best way of tackling this scenario, but I would be interested in hearing some opinions from the Stack Overflow community. Links to relevant online articles are also appreciated. I'm... | [
0.4546389579772949,
0.12148941308259964,
0.3285949230194092,
0.24006304144859314,
0.12678760290145874,
-0.07894954085350037,
-0.04035601392388344,
0.01876143366098404,
-0.29597920179367065,
-0.41476306319236755,
-0.03303874656558037,
0.2532917559146881,
-0.014724524691700935,
0.15660911798... | |
`Customer` table which also links to `PersonId`.
A simple object oriented approach would be to say that a `Customer` "is a" `Person` and therefore create classes a bit like this:
```
class Person {
public int PersonId { get; set; }
public string Name { get; set; }
public DateTime DateOfBirth { get; set; }... | [
-0.0655449777841568,
-0.18898141384124756,
0.46848437190055847,
-0.17940185964107513,
0.1452028751373291,
0.18906010687351227,
-0.07944697886705399,
0.175165057182312,
-0.1309155523777008,
-0.5304275751113892,
-0.28697001934051514,
0.3726305067539215,
0.053277838975191116,
0.39399698376655... | |
public int StaffId { get; set; }
public string JobTitle { get; set; }
}
```
Now we can write a function say to send emails to all customers:
```
static void SendEmailToCustomers(IEnumerable<Person> everyone) {
foreach(Person p in everyone)
if(p is Customer)
SendEmail(p);
}
```
This sys... | [
-0.04384539648890495,
0.0642971619963646,
0.6296839714050293,
-0.24835029244422913,
0.08498647809028625,
0.21652336418628693,
0.24405446648597717,
-0.06264156103134155,
-0.15019485354423523,
-0.580564558506012,
-0.4033878445625305,
0.5440636277198792,
-0.3601202666759491,
0.118110321462154... | |
a `Customer` and once as a `Staff`, do we make an arbitrary choice between:
```
class StaffCustomer : Customer { ...
```
and
```
class StaffCustomer : Staff { ...
```
Obviously only the first of these two would not break the `SendEmailToCustomers` function.
So what would you do?
* Make the `Person` class have... | [
0.15621894598007202,
-0.047805145382881165,
0.2628757357597351,
0.2056172788143158,
-0.2790397107601166,
0.2503024637699127,
0.11220801621675491,
-0.26731565594673157,
0.04451817646622658,
-0.46659308671951294,
-0.04839116707444191,
0.7716104984283447,
-0.40841639041900635,
0.0016001379117... | |
opinions on this. I don't believe there is a 'right' answer. This is a great example of where a rigid heirarchial object design can really cause problems after a system is built.
For example, lets say you went with the "Customer" and "Staff" classes. You deploy your system and everything is happy. A few weeks later, s... | [
0.17777620255947113,
-0.06593693792819977,
0.4136674702167511,
0.12170087546110153,
-0.08304819464683533,
-0.1099681481719017,
0.10076252371072769,
0.11420651525259018,
-0.35293683409690857,
-0.23658522963523865,
-0.12996074557304382,
0.4796048104763031,
0.15815626084804535,
0.228265509009... | |
you attempt to have a set of derived classes that implement all the permutations and combination of people and their roles. This is especially true given that the above example is very simple - in most real applications, things will be more complex.
For your example here, I would go with "Take another completely diffe... | [
0.21442316472530365,
-0.2595144808292389,
-0.20664845407009125,
0.36342036724090576,
-0.021294571459293365,
0.4423339366912842,
-0.0400119349360466,
-0.1595708280801773,
-0.10146092623472214,
-0.7283776998519897,
-0.1457943469285965,
0.6038990020751953,
-0.22747977077960968,
0.019659286364... | |
have a base "Role" class, and derive new roles from them. | [
0.15971466898918152,
-0.08727475255727768,
-0.2318488210439682,
0.0747523084282875,
-0.13373219966888428,
0.11925946176052094,
0.3999439775943756,
0.11021865904331207,
0.18751993775367737,
-0.6217559576034546,
-0.5987735390663147,
0.1789516806602478,
-0.12235965579748154,
-0.19656233489513... | |
What is the best way to format a decimal if I only want decimal displayed if it is not an integer.
Eg:
```
decimal amount = 1000M
decimal vat = 12.50M
```
When formatted I want:
```
Amount: 1000 (not 1000.0000)
Vat: 12.5 (not 12.50)
```
```
decimal one = 1000M;
decimal two = 12.5M;
Console.WriteLine(... | [
-0.10399328172206879,
0.25777265429496765,
0.6253858804702759,
0.10229076445102692,
0.09490884840488434,
0.27528244256973267,
-0.24866633117198944,
-0.30505961179733276,
-0.09173145145177841,
-0.45935261249542236,
-0.005051541607826948,
0.3466845154762268,
0.3257562816143036,
-0.0069815106... | |
I'm having to start building the architecture for a database project but i really don't know the differences between the engines.
Anyone can explain whats the pros and bads of each of these three engines? We'll have to choose one of them and the only thing I actually know about them is this:
* Mysql & Postgres:
+ Ar... | [
0.2217107117176056,
0.28594306111335754,
0.019401920959353447,
0.29131191968917847,
0.0005688636447302997,
-0.0768176019191742,
0.06888002157211304,
-0.0798380896449089,
0.03291471675038338,
-0.5356160402297974,
0.24988844990730286,
0.6160232424736023,
-0.10682765394449234,
0.1577502042055... | |
with low budget, what would you choose? And with a higher budget?
A few years ago I had to write a translation engine; you feed it one set of sql and it translates to the dialect of the currently connected engine. My engine works on Postgres (AKA PostgreSql), Ingres, DB2, Informix, Sybase, and Oracle - oh, and ANTS. Fr... | [
0.22511309385299683,
0.3284968435764313,
-0.032598529011011124,
0.22921043634414673,
-0.20240581035614014,
0.04191495478153229,
0.008954999037086964,
0.28018835186958313,
0.16293509304523468,
-0.6692885160446167,
-0.018244668841362,
0.771066427230835,
-0.21970322728157043,
0.04186921194195... | |
the engine - and ease of making and restoring backups - here are the primary areas of difference:
* datatypes
* limits
* invalids
* reserved words
* null semantics (see below)
* quotation semantics (single quote ', double quote ", or either)
* statement completion semantics
* function semantics
* date handling (includ... | [
0.025978397578001022,
0.07530588656663895,
0.21112988889217377,
0.042304329574108124,
-0.5294227600097656,
0.15085582435131073,
0.17384520173072815,
-0.10622512549161911,
-0.046329569071531296,
-0.455234557390213,
-0.04334254562854767,
0.5897237658500671,
-0.2675737142562866,
0.21237391233... | |
is null handling; Oracle SILENTLY converts blank input strings to null values. ...Somewhere, a LONG time ago, I read a writeup someone had done about "The Seventeen Meanings of Null" or some such and the real point is that nulls are very valuable and the distinction between a null string and an empty string is useful a... | [
-0.052990518510341644,
0.2645093500614166,
-0.9276854991912842,
0.23093798756599426,
-0.41531556844711304,
0.09498203545808792,
0.5296028256416321,
0.547546923160553,
-0.23049624264240265,
-0.4350416958332062,
0.16088181734085083,
0.4122087061405182,
-0.22958244383335114,
-0.10709395259618... | |
one else does and while they may be the only DB company to provide perfect adherence to the standard, they are also a royal pain in the butt to write code for.
Far and away my favorite is Postgres; it's very fast in \_real\_world\_ situations, has great support, and is open source / free. | [
0.4959840476512909,
0.3394171893596649,
-0.17855119705200195,
0.03558683022856712,
-0.26775506138801575,
-0.16933321952819824,
0.18335431814193726,
0.7616401314735413,
0.02846919745206833,
-0.6596919894218445,
-0.029080569744110107,
0.6014748811721802,
0.15888409316539764,
0.14193323254585... | |
Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?
I'm thinking it should work something like:
1. I call get\_definition(word)
2. It returns the definition for that word (ideally in some way to easily format the definition for display.
Thanks
[Ruby-WordNet](http://www.devei... | [
0.2650564908981323,
0.07817428559064865,
0.06713574379682541,
0.3541882634162903,
-0.2077728509902954,
0.0235529076308012,
0.4517571032047272,
-0.09995777904987335,
0.08945169299840927,
-0.8124696016311646,
0.03419256955385208,
0.5456709265708923,
-0.1383686661720276,
0.002666584448888898,... | |
representing
> one underlying lexical concept.
> Different relations link the synonym
> sets. | [
-0.29187336564064026,
-0.04614127054810524,
0.086880624294281,
0.380179762840271,
-0.4890049695968628,
0.11604747921228409,
0.3246804177761078,
-0.24285593628883362,
0.061593156307935715,
-0.8052217960357666,
-0.3242999315261841,
0.4156073331832886,
-0.37474286556243896,
-0.008586262352764... | |
How can I construct the following string in an Excel formula:
> Maurice "The Rocket" Richard
If I'm using single quotes, it's trivial: `="Maurice 'The Rocket' Richard"` but what about double quotes?
Have you tried escaping with an additional double-quote? By escaping a character, you are telling Excel to treat the " ... | [
-0.07385621964931488,
0.5745808482170105,
-0.06709673255681992,
0.0476284995675087,
-0.15963158011436462,
0.08167100697755814,
0.4320868253707886,
-0.24783284962177277,
0.046495355665683746,
-0.1929263323545456,
-0.32986384630203247,
0.32918137311935425,
-0.3825869560241699,
-0.22523544728... | |
How do I get a status report of all files currently being uploaded via HTTP form based file upload on an Apache Server?
I don't believe you can do this with Apache itself. The upload looks like nothing more than a POST as far as Apache cares. There are modules and other servers that do special processing to uploads so ... | [
0.5912542939186096,
-0.03765760734677315,
0.26587221026420593,
0.39329540729522705,
-0.23329664766788483,
-0.5098902583122253,
0.37540367245674133,
0.21502111852169037,
-0.30372411012649536,
-0.5769363045692444,
0.3089986741542816,
0.28979119658470154,
0.11458102613687515,
0.13866223394870... | |
When I run the following, PowerShell hangs waiting for the dialog to close, even though the dialog is never displayed:
```
[void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' )
$d = New-Object Windows.Forms.OpenFileDialog
$d.ShowDialog( )
```
Calling `ShowDialog` on a `Windows.Forms.Form` works... | [
0.6151332259178162,
0.3686556816101074,
0.8847872614860535,
-0.366970419883728,
-0.02052844502031803,
-0.37134304642677307,
0.5683542490005493,
-0.26323285698890686,
0.13484235107898712,
-0.6344006061553955,
-0.039202094078063965,
0.7118781805038452,
-0.3586491048336029,
0.1493214964866638... | |
Luck! | [
-0.10010179132223129,
0.29505473375320435,
0.1133265420794487,
0.12858165800571442,
0.03212675079703331,
-0.2657812535762787,
0.22824953496456146,
0.5914942026138306,
-0.08978446573019028,
-0.4274490177631378,
-0.1402377337217331,
0.062099259346723557,
0.3263606131076813,
-0.04082640632987... | |
In a [recent issue](https://stackoverflow.com/questions/215933/gcc-compiler-error-on-windows-xp), I've found that DJGPP can only accept the DOS command line character limit. To work around this limitation, I've decided to try to write a makefile to allow me to [pass longer strings](http://www.delorie.com/djgpp/v2faq/fa... | [
0.35288867354393005,
0.18428316712379456,
0.28280559182167053,
-0.2988596558570862,
-0.0561327189207077,
-0.3084752857685089,
0.3496496379375458,
-0.255987286567688,
0.016232574358582497,
-0.4207756519317627,
-0.004068668000400066,
0.6674090027809143,
-0.4135601818561554,
-0.06899622082710... | |
-Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions \
-nostdinc -fno-builtin -I./include
ASFLAGS := -f aout
export OUTPUT := $(CURDIR)/$(TARGET)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)... | [
-0.45288199186325073,
-0.09700135141611099,
0.7090898752212524,
-0.1907985657453537,
-0.1687547117471695,
0.21506695449352264,
0.12784256041049957,
-0.45883041620254517,
-0.20283088088035583,
-0.5758404731750488,
-0.46173396706581116,
0.3356322646141052,
-0.46040841937065125,
-0.1243991404... | |
: %.o : %.asm
$(AS) $(ASFLAGS) $< -o $@
$(COBJS) : %.o : %.c
$(CC) -c $< $(CFLAGS) -o $@
```
When attempting to run it, I receive this error:
```
make: *** No rule to make target `consoleio.c', needed by `consoleio.o'. Stop.
```
What I don't understand is why it's trying to find a rule for .c f... | [
0.3792281150817871,
0.25888389348983765,
0.6061441898345947,
-0.1393568217754364,
0.20572291314601898,
-0.18276932835578918,
0.4056300222873688,
0.07273939251899719,
-0.14335937798023224,
-0.4052078127861023,
-0.23437285423278809,
0.5865802764892578,
-0.4460049271583557,
0.1418351680040359... | |
are trying to do will not work without VPATH, and since you are still learning makefiles, I would avoid using VPATH.
The rule is looking for "consoleio.c", which if I understood your makefile correctly does not exist; what exists is "source/consoleio.c". You probably should change it to something like "$(SOURCES)/%.c"... | [
0.400463342666626,
0.08298666030168533,
0.45326340198516846,
-0.30170875787734985,
0.26008516550064087,
0.21658581495285034,
0.5231981873512268,
0.004254589788615704,
0.12109765410423279,
-0.5707321166992188,
-0.18016868829727173,
0.6390445232391357,
-0.5241900086402893,
-0.2009267359972,
... | |
%.c" (or in your case "%.o: $(SOURCES)/%.c")
* Explicit list the dependencies for each file: "foo.o: foo.c bar.h baz.h" (with no command, the implicit rule has the command) | [
0.40264418721199036,
0.4382779598236084,
0.47635647654533386,
-0.4750317633152008,
0.3244338035583496,
0.193473681807518,
-0.013149097561836243,
-0.009810852818191051,
-0.014079776592552662,
-0.21162155270576477,
-0.16762949526309967,
0.6938289999961853,
-0.49508044123649597,
0.12902453541... | |
I've tested my iPhone app on the iPhone. Now I want to test it on the iPod touch. Assuming I have an iPod touch what else do I need?
I just want to make sure all the certificates and stuff that I used for the iPhone will work for the iPod touch too.
The certificates will work fine as is. If you really want to test aga... | [
0.5057956576347351,
0.3643472492694855,
0.22557476162910461,
-0.07479897141456604,
0.24155758321285248,
0.2904438078403473,
0.19776108860969543,
-0.1848158985376358,
-0.13229720294475555,
-0.47232770919799805,
0.6581520438194275,
0.7396999001502991,
-0.11358636617660522,
-0.214765533804893... | |
instruction in the portal. You may have to upload a new version only because it looks like itunes connect doesn't let you change support after the fact, probably to keep compatibility for a given version. | [
0.3199554681777954,
-0.3475824296474457,
0.10514359176158905,
0.4563612937927246,
0.22231341898441315,
-0.2820347547531128,
0.6568242311477661,
0.36214834451675415,
-0.05275504291057587,
-0.7426296472549438,
-0.45857223868370056,
0.5331484079360962,
-0.18762116134166718,
-0.092056073248386... | |
File formats I would like to play include .wav, .mp3, .midi.
I have tried using the Wireless Toolkit classes with no success. I have also tried using the AudioClip class that is part of the Samsung SDK; again with
If this device supports audio/mpeg you should be able to play mp3 use this code inside your midlet...
Th... | [
0.38878655433654785,
-0.2404000461101532,
0.6054840683937073,
-0.041508905589580536,
0.13575956225395203,
-0.24756309390068054,
0.16143465042114258,
-0.3194505274295807,
0.004434722010046244,
-0.8245958089828491,
-0.06140584871172905,
0.981390655040741,
-0.3067933917045593,
0.3197088539600... | |
player.prefetch();
player.start();
}
catch(Exception e)
{}
}
```
As for emulators my nokia experience is that I couldn't make it emulate mp3 player but when I put application on phone it works... | [
-0.32323285937309265,
-0.14009389281272888,
0.47110515832901,
-0.21371503174304962,
-0.012857912108302116,
-0.11439676582813263,
-0.02438100427389145,
-0.08585157245397568,
-0.011490736156702042,
-0.5498462319374084,
0.06856299191713333,
0.9438952207565308,
-0.37105023860931396,
0.27709060... | |
I know that this is a simple question for PHP guys but I don't know the language and just need to do a simple "get" from another web page when my page is hit. i.e. signal the other page that this page has been hit.
EDIT: curl is not available to me.
If curl wrappers are on (they are per default), you can use:
```
fil... | [
0.3810955286026001,
0.13317649066448212,
0.5208448767662048,
0.038803569972515106,
-0.346943736076355,
-0.2791025936603546,
0.3632775843143463,
0.040543049573898315,
-0.12798739969730377,
-0.6011200547218323,
-0.0843580961227417,
0.5077316164970398,
-0.32326167821884155,
-0.023022476583719... | |
your page has completed, and output has been sent to the client. | [
0.398896723985672,
0.16036616265773773,
0.5029953122138977,
-0.032289810478687286,
-0.10932476073503494,
-0.3061213493347168,
0.2221023291349411,
0.2579662799835205,
-0.10441016405820847,
-0.9112962484359741,
-0.4213126599788666,
0.37051922082901,
0.03938095271587372,
0.1334782987833023,
... | |
My place of employment is looking into buying a third party tool, for batch based US and Canadian Address correction, with Geo-coding.
* What Products have you used?
* What do you like about them?
* What do you not like about them?
Note that, We are a C/C++ Unix Shop.
We use [Melissa Data](http://www.melissadata.com/... | [
0.7426633238792419,
-0.015279583632946014,
0.061959560960531235,
0.12992434203624725,
0.17519113421440125,
0.28542089462280273,
-0.004458386451005936,
0.5683937668800354,
-0.5690432190895081,
-0.6760664582252502,
0.2944048345088959,
0.08630827069282532,
0.32531967759132385,
0.1932592988014... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.