text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
In C++, `sizeof('a') == sizeof(char) == 1`. This makes intuitive sense, since `'a'` is a character literal, and `sizeof(char) == 1` as defined by the standard.
In C however, `sizeof('a') == sizeof(int)`. That is, it appears that C character literals are actually integers. Does anyone know why? I can find plenty of m... | [
-0.15494364500045776,
0.15399061143398285,
0.20454424619674683,
-0.2849303185939789,
-0.28255173563957214,
-0.15779267251491547,
-0.05439748615026474,
-0.15449607372283936,
-0.3324040472507477,
-0.0517364926636219,
-0.32149192690849304,
0.5675477981567383,
-0.21730606257915497,
-0.07392900... | |
in the first place eliminated that step.
> There were and still are multi character constants such as 'abcd' or however
> many will fit in an int." | [
-0.08635277301073074,
-0.07620487362146378,
-0.0974908098578453,
0.05363684147596359,
-0.09341098368167877,
0.1605122685432434,
0.16693943738937378,
-0.22681966423988342,
0.07387199252843857,
-0.3254155218601227,
-0.05961780250072479,
0.2492450475692749,
-0.45667460560798645,
-0.0053959172... | |
Pretty self explanatory question. Is there any reason to use one or the other?
Count(\*) counts all records, including nulls, whereas Count(fieldname) does not include nulls. | [
0.12420178949832916,
0.12624813616275787,
-0.09569159895181656,
0.03938242420554161,
-0.02197839878499508,
-0.0217568501830101,
0.5926916599273682,
0.05628367140889168,
-0.10685841739177704,
-0.09868505597114563,
0.004105237312614918,
0.4358852803707123,
-0.24031531810760498,
-0.2178387194... | |
I recently started to learn about LINQ and came across the `OrderBy` extension method. This initially excited me because the syntax seemed much nicer than the `Sort` method that we use all over the place for Generic Lists.
For example, when sorting a list of languages, we normally do something like:
```
neutralCultur... | [
0.07249542325735092,
-0.05982116609811783,
0.2899393141269684,
-0.2827419340610504,
-0.24727527797222137,
0.07062385976314545,
-0.10082996636629105,
0.0012740385718643665,
-0.07584229856729507,
-0.6186627149581909,
-0.06901944428682327,
0.2955569624900818,
-0.4919195771217346,
0.1844685524... | |
for `List<T>` using the same signature that is used for `OrderBy`.
```
public static void Sort<TSource, TKey>(this List<TSource list, Func<TSource, TKey> keySelector)
{
list = list.OrderBy(keySelector).ToList<TSource>();
}
```
This would be called like:
```
neutralCultures.Sort(ci => ci.EnglishName);
```
Mayb... | [
0.2388305962085724,
-0.14167584478855133,
0.22707101702690125,
-0.17235641181468964,
0.09730049967765808,
-0.14195363223552704,
0.30420854687690735,
-0.2413260042667389,
-0.3581554591655731,
-0.318146288394928,
-0.225015789270401,
0.7360902428627014,
-0.7187697291374207,
0.1878569424152374... | |
an object (which is what an extension method looks like to the user of your framework) shouldn't change which instance the reference points to.
For your example, I would stick with Sort. | [
0.30102279782295227,
-0.03581501543521881,
-0.08019980043172836,
-0.040751442313194275,
-0.1784927099943161,
-0.15847010910511017,
0.22597636282444,
0.05300290510058403,
-0.18577702343463898,
-0.6598746180534363,
-0.08226800709962845,
0.2716776132583618,
-0.4278808534145355,
0.052353285253... | |
I am writing some UI tests using Selenium and i have a JavaScript Tree control, using the Dojo toolkit.
I have implemented a context menu for each node of the tree using the examples that Dojo provide, but I need the Selenium test to "invoke" the right click on the tree node, but I cannot get this to work. The tests ... | [
0.39774468541145325,
0.026027774438261986,
-0.13144251704216003,
-0.015131663531064987,
-0.15858624875545502,
-0.08471860736608505,
0.4476071894168854,
-0.26869073510169983,
0.2324777990579605,
-0.5989030003547668,
0.1438159942626953,
0.5076201558113098,
-0.05063316971063614,
-0.3569228053... | |
to how to do it?
try this instead, reason what things didn't quite work is that the context menu is in fact bound to the oncontextmenu event.
```
function contextMenuClick(element){
var evt = element.ownerDocument.createEvent('MouseEvents');
var RIGHT_CLICK_BUTTON_CODE = 2; // the same for FF and IE
evt.... | [
0.014354772865772247,
-0.23099814355373383,
0.6834855675697327,
-0.014456294476985931,
0.4528668224811554,
-0.08044604957103729,
0.5181169509887695,
-0.33164554834365845,
0.06206851452589035,
-0.6047669053077698,
-0.22675560414791107,
1.0439962148666382,
-0.25763654708862305,
-0.3695624172... | |
return element.fireEvent('onclick', evt)
}
else{
// dispatch for firefox + others
return !element.dispatchEvent(evt);
}
}
``` | [
-0.16434131562709808,
0.08460371941328049,
0.4518013596534729,
-0.30987033247947693,
0.4154374599456787,
-0.10595619678497314,
0.33643805980682373,
-0.5462551116943359,
0.05639469251036644,
-0.4761086702346802,
-0.33063191175460815,
0.921918511390686,
-0.6839714050292969,
-0.22200655937194... | |
I was wondering if there is something similar to Java's `JFileChooser` for Python?
`JFileChooser` is a graphical front end to choose a file.
Preferably something that is already with Python. Maybe with Tkinter.
For something that doesn't require wxPython and sticks with the standard Python libs, you can use the tkFil... | [
0.22226275503635406,
-0.2867589294910431,
0.5229712128639221,
-0.27362632751464844,
-0.1803886741399765,
-0.07941979169845581,
0.3324199914932251,
-0.23378895223140717,
-0.20284081995487213,
-0.6303679943084717,
-0.05955306813120842,
0.8742886781692505,
-0.20857949554920197,
-0.32301247119... | |
Consider the tables: (`->` denotes a SQL defined relationship)
```
USER (userid, username, imageid->IMAGE.imageid)
EVENT (eventid, userid->USER.userid, description)
IMAGE (imageid, location)
```
Say I have a view (let's call it `vw_UserInfo`) defined as the following query.
```
SELECT u.*, i.* FROM users u
INNER JO... | [
-0.03967391699552536,
0.005715095438063145,
0.5533208847045898,
-0.13480181992053986,
-0.17386378347873688,
0.06145650893449783,
-0.19360896944999695,
-0.22213199734687805,
-0.2668391466140747,
-0.7466902732849121,
-0.056948937475681305,
0.5346735119819641,
-0.12487351149320602,
0.08154965... | |
= e.userid
```
Benefit from the foreign key defined just as much as
```
SELECT u.*, i.*, e.* FROM users u
INNER JOIN images i ON i.imageid = u.imageid
INNER JOIN events e ON e.userid = u.userid
```
would?
No, because views (at least in SQL Server) are not really part of the constraints system (the existence or non... | [
-0.10119827836751938,
-0.05034150183200836,
0.5776925683021545,
0.029728984460234642,
-0.20058798789978027,
-0.009003596380352974,
-0.004763532429933548,
-0.0840025246143341,
-0.24424612522125244,
-0.7710115313529968,
-0.2208232432603836,
0.5206694602966309,
-0.3232305347919464,
0.07253673... | |
by Celko](http://www.simple-talk.com/sql/t-sql-programming/constraint-yourself!/), you can see that the more metadata you give the database about the constraints and foreign-key relationships between your tables, this can improve the performance of queries. | [
0.25133267045021057,
0.40294045209884644,
0.4448855221271515,
0.16412511467933655,
0.05387353152036667,
-0.30020925402641296,
-0.226009801030159,
-0.0012778083328157663,
-0.5178008079528809,
-0.4241742789745331,
-0.20383211970329285,
0.18296752870082855,
-0.02660354971885681,
0.19357572495... | |
I have written a program that will etablish a network connection with a remote computer using TCPClient I am using it to transfer files in 100k chunks to a remote .net application and it inturn then writes them to the HardDrive. All file transfers work good except when it comes to ZIP files - it is curious to note that... | [
0.422333687543869,
0.1089584082365036,
0.347793847322464,
0.4244662821292877,
-0.06640350073575974,
-0.28947603702545166,
0.1994386613368988,
-0.0019299557898193598,
-0.2117372751235962,
-0.6077362298965454,
-0.07314947992563248,
0.45288223028182983,
-0.2088334858417511,
0.3021231293678283... | |
so it's kinda tricky to say exactly what's wrong.
The *usual* mistake is to assume that Stream.Read reads all the data you ask it to instead of realising that it might read less, but that the amount it *actually* read is the return value.
In other words, the code shouldn't be:
```
byte[] buffer = new byte[input.Leng... | [
0.21089297533035278,
-0.017392298206686974,
0.1833953857421875,
-0.13426253199577332,
-0.024637369439005852,
-0.11144963651895523,
0.44424137473106384,
-0.05873270332813263,
-0.08880665153265,
-0.42363440990448,
-0.1910911202430725,
0.5618776679039001,
-0.27882280945777893,
0.1190259829163... | |
I want to make a control that handles user input, so I want to be able to handle different keyboards, and one of the ways is using IME.
If you don't handle it, there is a floating window that appears when you have IME active (for example japanese writing active). I found the messages that needs to be taken care of, b... | [
-0.03498703986406326,
0.23448631167411804,
0.36486557126045227,
-0.07452763617038727,
-0.2858201265335083,
0.22216957807540894,
0.2769918143749237,
0.09424588084220886,
-0.021690426394343376,
-0.6525464653968811,
0.08279494941234589,
0.31360942125320435,
0.02268432080745697,
0.234521538019... | |
the best IME API documentation is provided by non-Microsoft sites:
* **IME programming sample** (*very* well commented code!) from Google's Chrome browser
+ [ime\_input.h](http://code.google.com/p/chrome-browser/source/browse/trunk/src/chrome/browser/ime_input.h)
+ [ime\_input.cc](http://code.google.com/p/chrome-bro... | [
-0.09669766575098038,
0.3926193416118622,
0.056754957884550095,
0.0445011742413044,
-0.35641732811927795,
0.22120164334774017,
0.22574971616268158,
-0.06332201510667801,
0.023182209581136703,
-0.6919434666633606,
-0.17250365018844604,
0.4815974831581116,
-0.1646052747964859,
0.006298247259... | |
don't need any of the advanced features (like input via tablet/voice recognition/fancier IME/etc) then using the old API is sufficient.
The best documentation on the Text Services Framework is the [TSF Aware Blog](http://blogs.msdn.com/tsfaware/) written by another Microsoft dev. Eric Brown may even personally answer ... | [
0.43224942684173584,
0.18219399452209473,
0.4432549774646759,
-0.019839605316519737,
-0.22909003496170044,
-0.37955236434936523,
0.2084575742483139,
-0.0647529661655426,
-0.3506089150905609,
-0.6425427198410034,
-0.23156221210956573,
0.3496483266353607,
-0.2955716550350189,
-0.166110813617... | |
IME GUI, then implement an empty rendering method: [UILess Mode Overview (MSDN)](http://msdn.microsoft.com/en-us/library/aa966970(VS.85).aspx) | [
-0.49593251943588257,
-0.25379514694213867,
0.26384392380714417,
-0.019267486408352852,
-0.07030101120471954,
0.202554851770401,
0.17596134543418884,
0.04013392701745033,
0.061849195510149,
-0.9669566750526428,
-0.6859128475189209,
0.3814011812210083,
-0.23272565007209778,
-0.0997885167598... | |
I want 'only' my Login page to be SSL enabled. When the user logsin using <https://mysite.login.aspx>, after the login the user should be taken to an <http://mysite.default.aspx>
Please tell me step by step how to do it.
[Here's a Step by Step Guide](http://msdn.microsoft.com/en-us/library/ms998310.aspx) for you!
[Tr... | [
0.1350197046995163,
-0.23697181046009064,
0.5055156350135803,
-0.20772171020507812,
0.010414370335638523,
-0.2990298867225647,
0.5790166258811951,
-0.28226783871650696,
-0.11859734356403351,
-0.7468976378440857,
-0.24147380888462067,
0.288983017206192,
-0.5109476447105408,
-0.3542071878910... | |
I'd like to be able to replace things in a file with a regular expression using the following scheme:
I have an array:
```
$data = array(
'title' => 'My Cool Title',
'content' => ''
)
```
I also have a template (for clarity's sake, we'll assume the below is assigned to a variable *$template*)
```
<html>
<title... | [
0.2784445583820343,
0.0442386195063591,
0.21274824440479279,
0.10438138991594315,
-0.10177195817232132,
-0.20769087970256805,
0.2254953235387802,
-0.08542922139167786,
-0.03370961174368858,
-0.6879511475563049,
-0.11723572760820389,
0.47107136249542236,
-0.13253983855247498,
-0.07460321485... | |
data into a template by array index?
With a little work before hand you can do it with a single `preg_replace` call:
```
$replacements = array();
foreach ($data as $search => $replacement) {
$replacements["/<% $search %>/"] = $replacement;
}
$endMarkup = preg_replace(
array_keys($replacements),
array_val... | [
0.2455085664987564,
-0.21252766251564026,
0.42306503653526306,
-0.2889830768108368,
0.1664768010377884,
0.13362284004688263,
0.19390136003494263,
-0.6723042726516724,
-0.23183561861515045,
-0.48898109793663025,
-0.3449108898639679,
0.5986121892929077,
-0.5700252652168274,
0.100559167563915... | |
**rowCount** returns 0 when query.SetFirstResult is different from 0 ?
if the result of pageIndex x pageSize = 0 // it gives me the rowCount but when it is not equal to 0, countCriteria gives me 0 instead of rowCount.
What can i do ?
Thanks in advance
Modified from the [Recipes](https://docs.python.org/library/itert... | [
-0.30959683656692505,
0.08313056081533432,
0.564703106880188,
-0.28202739357948303,
-0.08530677855014801,
0.03035888820886612,
0.2950676679611206,
-0.3208165168762207,
-0.34140291810035706,
-0.6310999989509583,
-0.2012391984462738,
0.4143924117088318,
-0.34731319546699524,
-0.1316883862018... | |
I'm using [jquery.flickr-1.0.js](http://www.projectatomic.com/2008/04/jquery-flickr/) to search flickr for images in my application.
The problem i'm facing is that sometimes it takes a few seconds for flickr to
respond with results and i want to load a spinning gif in place of my search button
'btnRefresh' until the r... | [
0.7192078828811646,
-0.26321202516555786,
1.1077806949615479,
0.12601572275161743,
-0.38771408796310425,
-0.08712781965732574,
0.11335893720388412,
-0.06183180212974548,
-0.4874640107154846,
-0.5332473516464233,
0.06242695823311806,
0.41840189695358276,
-0.3228062689304352,
0.1889872103929... | |
api_key: "XXXXXXXXXXXXXXXXXXXX",
per_page: 18,
search_text: $('input#flickr_search_'+number+'').val(),
id: $(this).attr("id")
});
});
});
```
the flickr plugin supports a callback property in its options. So, you could just display the spinner before calling flick... | [
0.4454176425933838,
-0.35234105587005615,
0.6388359069824219,
0.005670533981174231,
-0.06953097134828568,
0.17846368253231049,
0.21365652978420258,
-0.08848406374454498,
-0.2040167599916458,
-0.28124672174453735,
0.03852611780166626,
0.7222679853439331,
-0.6406064629554749,
0.3051997423171... | |
$("#spinner").show();
var number = $(this).attr("id");
$('#gallery_flickr_'+number+'').show();
jQuery('#gallery_flickr_'+number+'').html("").flickr({
api_key: "XXXXXXXXXXXXXXXXXXXX",
per_page: 18,
search_text: $('input#flickr_search_'+number+'').va... | [
0.2641403079032898,
-0.09454848617315292,
0.9774423241615295,
-0.10568472743034363,
-0.3153267800807953,
0.252023845911026,
0.13692080974578857,
-0.4385336637496948,
-0.3383430540561676,
-0.4898941218852997,
-0.14212577044963837,
0.6546299457550049,
-0.538765013217926,
0.2525741755962372,
... | |
callback: function() {
$("#spinner").hide();
}
});
});
});
```
That ought to do it... assuming you have something in your page called spinner that is by default hidden. | [
-0.11945608258247375,
-0.3258136212825775,
0.49634718894958496,
-0.16503357887268066,
0.09856405854225159,
-0.41130879521369934,
0.2927123010158539,
-0.1824413388967514,
-0.07342149317264557,
-0.15753361582756042,
-0.2322060614824295,
0.689481258392334,
-0.4387807548046112,
0.1826971769332... | |
I have this code below and the "if ((DateTime)DataReader[0] > DateTime.Now)" condition returns false even if the datetime in the database is greater than the datetimenow.
I used this code before and it use to work I never changed any thing.
So the question is why does the condition return false?
Thanks,
Simon
```
... | [
0.38136225938796997,
-0.07150260359048843,
0.6083581447601318,
-0.1275254637002945,
0.2260255515575409,
-0.2587392330169678,
0.6808118224143982,
-0.4362899661064148,
-0.1587584763765335,
-0.5305848717689514,
-0.10696693509817123,
0.528983473777771,
-0.16755899786949158,
0.3474816679954529,... | |
compare DateTime with >, <, == or != operators. Instead you can use the Compare and CompareTo methods of the DateTime class.
[Compare](http://msdn.microsoft.com/en-us/library/system.datetime.compare.aspx): Compares two instances of DateTime and returns an integer that indicates whether the first instance is earlier th... | [
-0.2152416855096817,
-0.14512501657009125,
0.3294416666030884,
0.016961492598056793,
0.0847502052783966,
0.11660562455654144,
0.019241349771618843,
-0.338134765625,
0.02792520262300968,
-0.6657799482345581,
-0.06189434602856636,
0.408444881439209,
-0.3791411519050598,
0.275972843170166,
... | |
In a Java application I want to be able to take a timestamp at the start of an operation and be able to periodically check how long the operation has been running. The catch is: I do not want to be impacted by the Network Time Protocol moving the clock around, or the admin changing the time, or anything which can abrup... | [
0.1616133749485016,
-0.2469196915626526,
0.29080328345298767,
-0.2996070384979248,
0.2919017970561981,
-0.18450571596622467,
0.11798325926065445,
-0.08357787132263184,
-0.46067479252815247,
-0.6891002058982849,
0.11288918554782867,
0.2440744787454605,
-0.39172446727752686,
0.02544756792485... | |
meaningful in working out elapsed time between two events. Since the documentation states that it is not related to any system or wall time I believe it could be used in your sitatuion. | [
0.2862233817577362,
0.07302533835172653,
-0.02025795169174671,
0.2619435787200928,
-0.05575159192085266,
0.07497555762529373,
0.1695183664560318,
-0.027830712497234344,
-0.0705379769206047,
-0.5089884400367737,
0.22267717123031616,
-0.061430200934410095,
0.27464810013771057,
-0.20934374630... | |
I'm trying to generate some [url 'slugs'](http://codex.wordpress.org/Glossary#S) for my website. It's based upon a single piece of user generated text.
Now, i have made my own slug method, so i'm not after some code for that.
What i'm wondering is where is the best place to determine if this slug is unique and then i... | [
0.5831875801086426,
0.34795793890953064,
0.26811686158180237,
0.12036589533090591,
-0.05879509076476097,
0.09276639670133591,
-0.2977549731731415,
-0.22817909717559814,
-0.16651810705661774,
-0.42786768078804016,
0.5155993700027466,
0.03775899112224579,
-0.016061851754784584,
0.39428296685... | |
(not the slug) and then generated the slug and added the record count + 1 to the end of the new slug.
eg.
5 records are found in the table with the same User generated content.
the slug for this now the slug-text with a 6 added to the end.
Flaws: if the user changes their text, the slug doesn't change.
Anyways, i'm... | [
0.625769853591919,
0.11531945317983627,
0.38100752234458923,
0.22361715137958527,
-0.21560119092464447,
-0.20394326746463776,
-0.20054413378238678,
-0.011018249206244946,
-0.3931053578853607,
-0.3633935749530792,
0.5225668549537659,
0.4887443780899048,
-0.02552674151957035,
0.3116539418697... | |
has to be unique. I believe hulu.com does it this way as well. I think it's a practical solution to the problem. | [
0.7192174196243286,
0.27559179067611694,
-0.13635565340518951,
0.20976132154464722,
0.24998725950717926,
-0.11739983409643173,
0.11508690565824509,
0.5059823393821716,
-0.17153410613536835,
-0.0314149372279644,
0.19435915350914001,
-0.20664414763450623,
0.16658145189285278,
0.3281448781490... | |
I am developing an application where the security requirements for data transferred and access are fairly high. As I understand, Windows authentication is the preferred method for TCP over an intranet.
How do you deal with situations where Domains are not used and only simple workgroups are available? (Some customers ... | [
0.29399609565734863,
0.21896837651729584,
0.3380192816257477,
0.21992649137973785,
0.1827835887670517,
-0.38858336210250854,
0.12931180000305176,
-0.11756639182567596,
-0.40247151255607605,
-0.5815491676330566,
0.03520127385854721,
0.4352072477340698,
-0.013077862560749054,
0.0413949675858... | |
the computer is locked after a period of time)? This is particularly important as I know some of the users are prone to leaving their computers logged in, so how do I ensure that the account owner is the actual user?
If so, whats the point of using Windows authentication over say username/password authentication if th... | [
0.5771341323852539,
0.3339749872684479,
0.27969589829444885,
0.17586372792720795,
0.25607460737228394,
-0.39271280169487,
-0.036498311907052994,
-0.040335822850465775,
-0.41384756565093994,
-0.12364047765731812,
0.15638870000839233,
0.30648595094680786,
0.18922817707061768,
0.2992857694625... | |
think it's a practical solution to the problem. | [
0.7254478335380554,
0.4387734830379486,
-0.03845548629760742,
0.21533145010471344,
-0.02361643873155117,
-0.11417221277952194,
0.24042381346225739,
0.611870527267456,
-0.027302060276269913,
-0.3668769299983978,
0.14924636483192444,
0.3091903328895569,
0.13895730674266815,
-0.10765069723129... | |
So, I want to start using virtualenv this year. I like the no-site-packages option, that is nice. However I was wondering how to install certain packages into each virtualenv. For example, lets say I want to install django into each virtualenv... is this possible, and if so, how? Does buildout address this?
---
Well ... | [
0.4603116810321808,
0.09211240708827972,
0.23817752301692963,
-0.08571694046258926,
-0.24514319002628326,
-0.5747214555740356,
0.41035059094429016,
0.22753767669200897,
-0.262450248003006,
-0.7173473238945007,
0.07965227216482162,
0.7763260006904602,
-0.17860586941242218,
-0.08252376317977... | |
is created, such as installing new packages. | [
0.4991930425167084,
0.05797552317380905,
-0.17600782215595245,
0.39783644676208496,
0.5299257040023804,
-0.2768274247646332,
0.1333872675895691,
-0.016469188034534454,
0.06843939423561096,
-0.7471861243247986,
-0.5600488185882568,
0.3860321640968323,
0.1037960797548294,
-0.0827586725354194... | |
I was having a look at [this](http://java.sun.com/docs/books/tutorial/essential/io/cl.html) tutorial at Sun on command line I/O. It stated that:
> You might expect the Standard Streams
> to be character streams, but, for
> historical reasons, they are byte
> streams. System.out and System.err are
> defined as Prin... | [
0.44504210352897644,
-0.13821731507778168,
0.270566463470459,
0.10464315116405487,
0.02526889182627201,
-0.1645238995552063,
-0.3915039002895355,
-0.14633069932460785,
-0.48948127031326294,
-0.5634620785713196,
0.30443984270095825,
0.3669241666793823,
-0.2566487193107605,
-0.08893250674009... | |
character translation model was insufficient and the Character oriented Reader/Writer class hierarchy was added in Java 1.1.
But it was too late for System.out and friends. | [
-0.6492499113082886,
-0.17772766947746277,
0.15412698686122894,
-0.020335441455245018,
-0.38696885108947754,
0.16991578042507172,
0.2835043966770172,
0.06217236816883087,
0.20921111106872559,
-0.62800133228302,
0.12130462378263474,
0.41981273889541626,
-0.46834596991539,
-0.138366445899009... | |
I have the below code in stdafx.h.
```
using namespace std;
typedef struct {
DWORD address;
DWORD size;
char file[64];
DWORD line;
} ALLOC_INFO;
typedef list<ALLOC_INFO*> AllocList;
//AllocList *allocList;
```
Without the commented code (last line), it compiles just fine. But when I add th... | [
0.05165886506438255,
0.27166691422462463,
0.18048876523971558,
-0.22920767962932587,
-0.28470709919929504,
0.19061395525932312,
0.34124764800071716,
-0.3566073477268219,
-0.30474284291267395,
-0.6657909154891968,
0.002226663753390312,
0.4256627559661865,
-0.2964005172252655,
-0.26379704475... | |
files, just *declarations*. Declarations specify that something exists while definitions actually define them (by allocating space). For example `typedef`, `extern` and function prototypes are all declarations, while things like `struct`, `int` and function bodies are definitions.
What's happening is that you're most ... | [
0.421593576669693,
0.058864980936050415,
0.14442548155784607,
0.19119669497013092,
-0.10552683472633362,
-0.27827852964401245,
0.20096436142921448,
-0.025616753846406937,
-0.28370219469070435,
-0.656455397605896,
-0.39884093403816223,
0.15973757207393646,
-0.544135332107544,
0.242028117179... | |
C++ source file (such as a `main.cpp`):
```
AllocList *allocList;
```
That way, every compilation unit that includes `stdafx.h` will know about the external variable, but it's only defined in one compilation unit.
Based on your further information:
> I was trying to follow <http://www.flipcode.com/archives/How_To_... | [
0.27472615242004395,
0.24645259976387024,
0.20351512730121613,
-0.1902683973312378,
-0.013470375910401344,
-0.15029355883598328,
-0.038303107023239136,
0.03404711186885834,
-0.30742883682250977,
-0.33202314376831055,
-0.308962881565094,
0.4009622037410736,
-0.6424124240875244,
-0.092582762... | |
__cdecl operator new(
unsigned int size,
const char *file,
int line);
```
Also in that header, put the other prototypes for `AddTrack()`, `DumpUnfreed()`, etc., and the `#define`, `typedef` and `extern` statements:
```
extern AllocList *allocList;
```
Then, in a new file `mymemory.cpp` (which also cont... | [
0.20756295323371887,
0.24165579676628113,
0.44968265295028687,
0.1638336330652237,
0.4365465044975281,
-0.06982707977294922,
-0.13817360997200012,
-0.06315329670906067,
-0.21194353699684143,
-0.5436605215072632,
-0.3030981719493866,
0.4800749123096466,
-0.3896869719028473,
-0.1046531423926... | |
won't get duplicates during the link and because the declarations are there, you won't get undefined references either.
Keep in mind that this won't track memory leaks in code that you don't compile (e.g., third-party libraries) but it should let you know about your own problems. | [
0.3278379440307617,
0.20370280742645264,
0.21131892502307892,
0.4170520007610321,
0.06612211465835571,
-0.5121256113052368,
0.5795609951019287,
0.22151492536067963,
-0.5148968696594238,
-0.7270780801773071,
-0.068511001765728,
0.5807708501815796,
-0.3124922513961792,
-0.00868512224406004,
... | |
I have the option of writing two different formats for a database structure:
```
Article
-------
ArticleID int FK
Article_Tags
------------
ArticleTagID int FK
ArticleID int FK
TagText varchar(50)
```
or
```
Article
-------
ArticleID int PK
Article_Tags
------------
ArticleTagID int PK
ArticleID int FK
TagText va... | [
-0.30932140350341797,
0.14622876048088074,
0.5159984827041626,
-0.04440457746386528,
-0.22938041388988495,
0.1413222998380661,
0.1083221286535263,
-0.6188949942588806,
-0.17624656856060028,
-0.7353852987289429,
-0.009613878093659878,
0.39658430218696594,
-0.6172099709510803,
-0.25358864665... | |
int FK
Tag
---
TagId int identity(1,1) PK
TagText varchar(50)
```
There really is no reason to denormalize this from get go. (your first and second versions are not normalized)
Having tags in a separate table is fine, and getting the unique tags is cleaner without that distinct statement.
Performance wise if an... | [
-0.019171632826328278,
-0.17516262829303741,
0.2558717727661133,
-0.03203197196125984,
-0.4311046898365021,
-0.05382902920246124,
0.2702817916870117,
-0.6603842377662659,
-0.14456400275230408,
-0.3713415861129761,
-0.08043093234300613,
0.34492141008377075,
-0.2869769334793091,
-0.174486801... | |
I wish to draw an image based on computed pixel values, as a means to visualize some data. Essentially, I wish to take a 2-dimensional matrix of color triplets and render it.
Do note that this is not image processing, since I'm not transforming an existing image nor doing any sort of whole-image transformations, and ... | [
0.6921736001968384,
0.2032618671655655,
0.14377738535404205,
-0.06659846752882004,
-0.05902004614472389,
0.5182439088821411,
-0.06725508719682693,
-0.05123100429773331,
-0.24642221629619598,
-0.8899980187416077,
0.06075168773531914,
0.25198182463645935,
-0.3646506071090698,
0.3181704878807... | |
be useful. Final target format is PNG or any other lossless format.
I've been using PIL at the moment via ImageDraw's draw.point , and I was wondering, given the very specific and relatively basic features I require, is there any faster library available?
If you have `numpy` and `scipy` available (and if you are manip... | [
0.10281356424093246,
-0.35494667291641235,
0.2720385193824768,
0.23170164227485657,
-0.25726640224456787,
0.07966402918100357,
-0.2070205956697464,
0.006385310553014278,
-0.29265260696411133,
-0.7435802221298218,
-0.17963062226772308,
0.34809795022010803,
-0.46393564343452454,
-0.038040705... | |
the middle pixel red
data[512,513] = [0,0,255] # Makes the next pixel blue
img = smp.toimage( data ) # Create a PIL image
img.show() # View in default viewer
```
The nice thing is `toimage` copes with different data types very well, so a 2D array of floating-point numbers gets sensib... | [
0.19290558993816376,
-0.4815727770328522,
0.25601667165756226,
0.17386974394321442,
0.04087384417653084,
0.15686263144016266,
-0.16423436999320984,
0.29230165481567383,
-0.13487952947616577,
-0.9714393019676208,
-0.03590286150574684,
0.36431172490119934,
-0.4097132980823517,
-0.03475413843... | |
I need to do something like this:
```
<script type="text/javascript">
token_url = "http://example.com/your_token_url";
</script>
```
I'm using the Beta version of MVC, but I can't figure out how to get the absolute url of an action. I'd like to do something like this:
```
<%= Url.AbsoluteAction("Action","Contro... | [
0.11079531908035278,
-0.2685784697532654,
0.702552318572998,
-0.11600478738546371,
-0.018687400966882706,
-0.24929076433181763,
0.21193574368953705,
-0.2881261110305786,
-0.37583455443382263,
-0.5720224976539612,
-0.23684057593345642,
0.5378847718238831,
-0.36753132939338684,
-0.0590342357... | |
I am having trouble setting up passive FTP on IIS 6. I used this instruction: <http://www.velikan.net/iis-passive-ftp/>
When I tried to upload a file through the FTP, I got the error:
```
425 Can't open data connection. : /index.html
```
The interesting thing is that from the server, I can see the index.html file ... | [
0.06088709086179733,
-0.03321575000882149,
0.72637939453125,
-0.3579041361808777,
-0.0700594112277031,
-0.004901607520878315,
0.5097633600234985,
-0.32429471611976624,
-0.5150641202926636,
-0.6555560827255249,
-0.3396117091178894,
0.8254359364509583,
-0.2966342568397522,
-0.042909260839223... | |
null, null, Request.Url.Scheme);
``` | [
0.0893593579530716,
0.03502628952264786,
0.3169350326061249,
-0.3880416750907898,
-0.07398181408643723,
-0.054849110543727875,
0.4561549127101898,
-0.15243566036224365,
-0.03446297347545624,
-0.2817191481590271,
-0.501660168170929,
0.21047785878181458,
-0.5425361394882202,
0.47472241520881... | |
I'm looking for a good solution for graphically viewing a SOAP-based web service and possibly interacting with it (for testing purposes). Online (browser-based) solutions would be interesting too.
I've had success with a combination of the Elipse WTP WSDL Editor and SoapUI.
Eclipse WTP WSDL Editor -<http://wiki.eclips... | [
0.3518625497817993,
-0.07662404328584671,
0.06926529854536057,
0.1722208708524704,
-0.39406996965408325,
0.18687520921230316,
0.10811035335063934,
-0.16692133247852325,
0.22483384609222412,
-0.807834804058075,
0.283416211605072,
0.5471583008766174,
-0.019065596163272858,
-0.175904244184494... | |
I have a console application written in Delphi.
I saw that I can have global variables by assigning them to unit scopes, but in a console application I don't use units (from what I've understood it's forms-only).
Nope, a unit is not equivalent to a form.
A unit is a module which contains part of your program. Each for... | [
0.21369868516921997,
0.05882412940263748,
0.33394426107406616,
0.013664769940078259,
-0.04279397055506706,
-0.09005042165517807,
0.054320890456438065,
-0.18558156490325928,
0.08468250185251236,
-0.6112555265426636,
-0.12604838609695435,
0.39379051327705383,
-0.3372879922389984,
0.100754402... | |
TMyClass = class
end;
implementation
end.
unit B;
interface
uses
A; // I can now see and use TMyClass.
```
You can declare global variables by declaring them in a unit:
```
unit A;
interface
var
GVar1 : Integer;
implementation
var
GVar2 : Integer;
end.
```
GVar1 is visible and can be ... | [
-0.32129374146461487,
-0.09102459996938705,
0.42252117395401,
-0.12146323174238205,
-0.22104553878307343,
-0.09511668980121613,
0.4828300178050995,
0.045898064970970154,
-0.32549333572387695,
-0.6874246001243591,
-0.08675214648246765,
0.6072124242782593,
-0.4493480622768402,
0.264588892459... | |
really need a global, you better define it in the implementations section and provide access functions.
By the way, you can see a unit as a kind of a class (with a single instance). It even has a way to construct and destruct:
```
unit A;
interface
type
TMyClass = class
end;
implementation
initializatio... | [
-0.2261558175086975,
-0.3116638660430908,
0.12198415398597717,
0.29912859201431274,
0.002796419896185398,
-0.02241532877087593,
0.04425617679953575,
0.2928096354007721,
-0.37622764706611633,
-0.7474430799484253,
-0.1408463418483734,
0.3597677946090698,
-0.23479063808918,
0.2938054800033569... | |
I just encountered this [article](http://www.jennifersemtner.com/css/101/extending-css-spriting/) of an extention of css sprites that enables the spriting trick with foreground images . I [tried](http://www.kavoir.com/2009/01/extended-css-sprites-for-foreground-images-img.html) to use the technique on :hover but it doe... | [
0.24986328184604645,
-0.08473643660545349,
0.4731989800930023,
-0.1558532863855362,
-0.3413664400577545,
0.20095135271549225,
0.5643943548202515,
-0.1797545850276947,
-0.5833706855773926,
-0.37609824538230896,
0.13311293721199036,
0.41906148195266724,
-0.10435169190168381,
-0.0390237867832... | |
Thanks for the answers but the :hover IS for , so I believe all IE browsers should work out the effects. Therefore the problem might very probably be about the clip property.
I just want to make sure if :hover works properly with clip on . Appears so far it doesn't.
The whole technique described seems problematic to m... | [
0.6896690726280212,
-0.005379884038120508,
0.3637571930885315,
0.1595999300479889,
-0.23874297738075256,
-0.07022206485271454,
0.35707521438598633,
0.07393105328083038,
-0.19190530478954315,
-0.4858799874782562,
-0.04394117742776871,
0.5859953761100769,
-0.19784265756607056,
-0.16072401404... | |
logos and menus, etc)
4. For images in pages (that are not actually background images), it seems semantically bad to hide the image in CSS.
On 1, given that these are background images and not semantically images in their own right I think the correct approach is to put that text directly in the markup and hide it wit... | [
0.5740858316421509,
0.24531327188014984,
0.44459760189056396,
0.05661273002624512,
-0.19524125754833221,
-0.2684045433998108,
0.37628185749053955,
-0.20288701355457306,
-0.25785741209983826,
-0.18839304149150848,
-0.17556101083755493,
0.6987314820289612,
-0.5701364278793335,
-0.29501098394... | |
back to semantic interpretation.
Number 4 I completely agree with, but then if you're just hiding the image in the conglomeration of a sprite'd image anyway what do you gain? You could debate this, but an `<img>` has a semantic meaning representing a resource with a URI and as such that URI should be distinct, not dep... | [
0.24269358813762665,
0.1767464429140091,
0.22667311131954193,
0.2332800030708313,
-0.4486517012119293,
-0.210551455616951,
0.20127098262310028,
0.23805907368659973,
-0.234894797205925,
-0.5151302814483643,
-0.1274082213640213,
0.6417462229728699,
-0.05532329902052879,
0.29229867458343506,
... | |
the existing background-image/position technique is superior. | [
-0.3090323209762573,
-0.18276552855968475,
0.3585355281829834,
0.032280780375003815,
0.017522772774100304,
0.19594894349575043,
-0.2164144515991211,
-0.20584164559841156,
0.011683624237775803,
-0.706579327583313,
-0.22715887427330017,
0.536943256855011,
0.1076417863368988,
-0.1174626871943... | |
We have some software which relied on certain behavior from another (**very** commonly used) application that has now changed, rendering our current implementation workable, but less than optimal.
We believe that this change may have affected a number of other applications, particularly in the performance monitoring a... | [
0.2784976065158844,
0.3266128897666931,
0.053280457854270935,
0.234005868434906,
0.16903823614120483,
-0.20994099974632263,
0.26312634348869324,
0.07461385428905487,
-0.19748197495937347,
-0.49154332280158997,
-0.10333392024040222,
0.6570133566856384,
-0.19159939885139465,
0.00299294409342... | |
answers, I suspect the best ones will come from those that have been through the process, even unsuccessfully)? Have you had it accepted (what are the chances that Alan Cox et al hangs about on SO)?
What is the correct process to follow? I have no intention of sending off an email to Linus since I know he has a cadre ... | [
0.5146912932395935,
0.02723395824432373,
0.17024023830890656,
0.4722869396209717,
-0.11872243881225586,
-0.14015455543994904,
0.14867116510868073,
0.08671693503856659,
-0.26194292306900024,
-0.3732507824897766,
-0.10137920826673508,
0.21011857688426971,
-0.00865661446005106,
0.394795238971... | |
world's never heard of can contribute, but I'd be interested to find out.
---
EDIT with more details:
The change is not actually for a performance bug, but an improvement (in my view) to the process accounting entries (currently) written when a process terminates.
Websphere App Server (ah, IBM, bless their little h... | [
0.30803877115249634,
0.48995909094810486,
0.6367883682250977,
0.17677274346351624,
0.3565162420272827,
-0.1814180165529251,
0.34274929761886597,
0.33782103657722473,
-0.5798138380050659,
-0.3201588988304138,
-0.01920410990715027,
0.12378396093845367,
0.16153711080551147,
0.3328451216220855... | |
IBM's Software Group are going to fix their software for us :-). In any case, I believe it may be a useful feature to have for other long-lived processes.
Currently type-3 process accounting records are written when a process exits, what we're looking at is a mechanism to write type-N records periodically while a proc... | [
0.14028754830360413,
0.11575523763895035,
0.4047921597957611,
0.06857161968946457,
0.42613691091537476,
-0.18425282835960388,
-0.11898814886808395,
0.04774423688650131,
-0.5556918978691101,
-0.5744635462760925,
0.025889962911605835,
0.3480326235294342,
-0.04739045351743698,
0.2330581843852... | |
for specific processes but that's a horrible kludge since it doesn't integrate well with the real process accounting.
It needn't be often (we'd be happy with 24 hours) but there may be a performance impact since the work that's currently done only on process exit() will have to be done occasionally on process context ... | [
0.3815042972564697,
0.25266551971435547,
0.26693612337112427,
0.13263531029224396,
0.10355380177497864,
-0.06034836918115616,
0.4456544816493988,
-0.23151279985904694,
-0.4180513322353363,
-0.7181447148323059,
0.11344834417104721,
0.36811020970344543,
0.3770780563354492,
0.1271884292364120... | |
go. Give me a couple of days and I'll accept the best answer.
Before anything else:
concentrating about the performance bug report, and getting it right (with repeatable benchmarks) will at least help you to get people to bother with the problem. Also submit the patch after testing it, but beware that your great patch ... | [
0.436379075050354,
-0.005933139473199844,
0.3101441562175751,
0.5968832969665527,
0.03915104269981384,
-0.5199631452560425,
0.26952850818634033,
0.21163322031497955,
0.1549922078847885,
-0.6079292893409729,
-0.2430083304643631,
0.6508035659790039,
0.08694945275783539,
-0.5314633846282959,
... | |
subsystem ML.
I'd suggest you to read through all other answers, and all applicable material, before contacting kernel developers; and read the bibliography of SubmittingPatches as well.
They might be harsh if you do it wrong. The kernelnewbies IRC chat is a good place for you to start, because they are for sure welco... | [
0.1167258471250534,
-0.0722067654132843,
-0.0007627121522091329,
0.12753957509994507,
-0.3969923257827759,
-0.20701977610588074,
0.20721985399723053,
0.6400139927864075,
-0.10695251822471619,
-0.6260565519332886,
-0.06453922390937805,
0.5334210991859436,
0.1348503828048706,
-0.094979405403... | |
itself at least. Abstracting from you (since I don't know your skills), what is more unlikely is that your patch will be accepted without modifications, or that it's written according to the right skills. But actually, if your patch is addressed to a smaller community, it may be much easier.
From somebody with some ex... | [
0.5899247527122498,
0.3379162847995758,
0.2829403281211853,
-0.0596473328769207,
-0.012406053952872753,
-0.06680575013160706,
0.3740936815738678,
-0.09521346539258957,
0.006178836338222027,
-0.7331357002258301,
-0.24309521913528442,
0.8367214798927307,
0.038976553827524185,
-0.459781020879... | |
than optimal.
because this will buy you a "fix your code" recommendation immediately by most readers.
If performance of an existing application (not written by you) is impacted, that's different. For instance, once Linus promptly paid attention to fixing in the kernel performance for screwed up code, because that cod... | [
-0.09888146817684174,
-0.15232308208942413,
0.1826508492231369,
0.6109480857849121,
0.0416128896176815,
-0.16749213635921478,
0.35658037662506104,
0.0884154736995697,
0.04065585508942604,
-0.6446603536605835,
0.005960091948509216,
0.6290619969367981,
-0.41280245780944824,
0.046689260751008... | |
good, as long as your usage of that application is not deemed unreasonable.
Finally, if you refer to source code, they'll likely ask to see the interested section - think to license issues with your code, if they exist, and solve any of them beforehand if you want to answer them quickly.
Btw, this is a partial accoun... | [
0.5365666747093201,
0.26456764340400696,
0.208840474486351,
-0.09698568284511566,
-0.15274974703788757,
-0.3697909414768219,
0.4257937967777252,
0.26525840163230896,
-0.1865835040807724,
-0.20529963076114655,
-0.10660170018672943,
0.27713996171951294,
0.463420569896698,
-0.0449821911752224... | |
I have a source file with two similar yet subtly different sections. I'd like to merge the two sections into one subroutine with a parameter that handles the subtle differences, but I need to be sure I'm aware of them all so I don't miss any.
What I usually do in such cases is copy each of the sections to a separate... | [
0.5867667198181152,
-0.05920778587460518,
0.1454078108072281,
0.17475049197673798,
-0.31491756439208984,
-0.04733750969171524,
0.004583084024488926,
0.16384808719158173,
-0.33513420820236206,
-0.8258840441703796,
0.31357529759407043,
0.6853484511375427,
-0.06302344053983688,
0.041652321815... | |
Visually select one section of your file and type `:Linediff`. Visually select the other section and type `:Linediff`. It will put vim in to [vimdiff](https://gist.github.com/mattratleph/4026987) mode, showing only the two sections you highlighted previously. Type`:LinediffReset` to exit vimdiff mode.
More info:
<htt... | [
0.2187948077917099,
-0.552534282207489,
1.190049648284912,
-0.008798420429229736,
-0.18802253901958466,
0.0327896922826767,
0.05002595856785774,
0.000114837872388307,
-0.59113609790802,
-0.7545279860496521,
-0.07647895812988281,
0.5888339877128601,
-0.4256422221660614,
0.010146498680114746... | |
Here are two questions related to modifying the data source for strongly typed dataset connection string.
When my app is deployed, a light weight database ( in the form of Microsoft Access) is deployed to the Application Data folder. I have a strongly typed dataset that is wrapped around that. So the question is how t... | [
0.15391899645328522,
0.09954747557640076,
0.7542755007743835,
0.06713534891605377,
0.3120025098323822,
0.20170576870441437,
0.09851571172475815,
-0.31066709756851196,
-0.12254791706800461,
-0.8467587232589722,
-0.2408582717180252,
0.6098442077636719,
-0.39068150520324707,
0.035662546753883... | |
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>
```
To make it read from the Application Data folder copy?
I [read from SO](https://stackoverflow.com/questions/31449/dataset-connection-strings-in-vs-2008) and elsewhere that it's best to use app.config or web.config to manage the connect... | [
0.2572842240333557,
0.18275627493858337,
0.6098153591156006,
-0.21885748207569122,
0.10313817858695984,
-0.07601427286863327,
-0.020935816690325737,
-0.1288154125213623,
-0.4103687107563019,
-0.726111650466919,
-0.23129722476005554,
0.5519001483917236,
-0.3718094229698181,
0.06945695728063... | |
your connection string.
When you deploy an Windows Forms application you could have an app.config file.
yourproject.exe gives you a yourproject.exe.config file, which is the app.config file. | [
0.19005002081394196,
0.04824396222829819,
0.561193585395813,
0.07561121135950089,
0.26970523595809937,
0.01114823017269373,
0.11899976432323456,
0.2103453129529953,
-0.43588531017303467,
-0.8083656430244446,
-0.3359178304672241,
0.47634217143058777,
-0.504263699054718,
-0.04397409781813621... | |
I've followed this example: [RCP+JavaWS](http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/java_web_start.htm) but the app just briefly comes up and goes away. I've turned the console on and it quickly goes away too. I've tried adding: -console, -consoleLog, and -noExit to my applicatio... | [
0.23745910823345184,
0.10542073100805283,
0.43590477108955383,
-0.02919621579349041,
-0.17075563967227936,
-0.0963057428598404,
0.37316322326660156,
0.14191307127475739,
-0.3399510383605957,
-0.7561308145523071,
-0.07262996584177017,
0.8562812209129333,
-0.30103564262390137,
-0.09803362190... | |
a yourproject.exe.config file, which is the app.config file. | [
0.34040534496307373,
-0.022003931924700737,
0.3270981013774872,
0.15820927917957306,
0.5172488689422607,
-0.16361357271671295,
0.0646892562508583,
0.2617972195148468,
-0.20983751118183136,
-0.42774254083633423,
-0.51120924949646,
0.6353206634521484,
-0.4549262821674347,
-0.147750124335289,... | |
I'm writing an application where a user provides a connection string manually and I'm wondering if there is any way that I could validate the connection string - I mean check if it's correct and if the database exists.
You could try to connect? For quick (offline) validation, perhaps use `DbConnectionStringBuilder` to ... | [
0.20329707860946655,
0.2530451714992523,
0.4475003182888031,
0.002670841058716178,
-0.16532742977142334,
-0.17402717471122742,
0.09422348439693451,
-0.20989076793193817,
-0.18247415125370026,
-0.7783905267715454,
-0.09388573467731476,
0.3553552031517029,
-0.40311720967292786,
0.25507259368... | |
conn.Open(); // throws if invalid
}
```
If you only know the provider as a string (at runtime), then use `DbProviderFactories`:
```
string provider = "System.Data.SqlClient"; // for example
DbProviderFactory factory = DbProviderFactories.GetFactory(provider);
using(DbConnection conn = factory.CreateC... | [
0.1623445451259613,
0.046138059347867966,
0.6032190322875977,
-0.19376090168952942,
0.05645754188299179,
0.1213969811797142,
0.28293362259864807,
-0.06071259081363678,
-0.33453524112701416,
-0.8373188376426697,
-0.35788971185684204,
0.23218049108982086,
-0.6193788051605225,
0.4242089986801... | |
Can WebOrb record a video (flv) streaming using the webcam as a source? How?
A numeric literal that starts with a zero is interpreted as octal, so writing 01004 is *exactly* the same as writing 516.
Some other answers suggesting using parseInt inside the function to convert the octal value to decimal.
This wont help,... | [
0.3594129979610443,
-0.0520336776971817,
0.3800828456878662,
0.30329254269599915,
-0.09786567091941833,
-0.164125457406044,
0.21698272228240967,
-0.014306088909506798,
-0.2541552186012268,
-0.30300673842430115,
-0.03060501627624035,
0.30755066871643066,
-0.19541826844215393,
0.009181643836... | |
than a numeric, and use parseInt(num, 10) inside the function. | [
-0.19854527711868286,
-0.008016150444746017,
0.21813049912452698,
0.1709911823272705,
0.03384127467870712,
0.2752071022987366,
-0.16442789137363434,
-0.2725539207458496,
0.0428164005279541,
-0.5288829207420349,
-0.30207058787345886,
0.2505141794681549,
0.13946214318275452,
-0.1238535791635... | |
I am using CruiseControl .NET with the Subversion source control plugin to automatically build our project.
Some of the projects are automatically checking for modifications, but occasionally the check fails and CruiseControl .NET marks the project with an "Exception":
```
ThoughtWorks.CruiseControl.Core.CruiseContro... | [
0.06499256193637848,
-0.14636404812335968,
0.5574557185173035,
-0.03371113911271095,
0.15169869363307953,
-0.3002949059009552,
0.27948033809661865,
-0.03643568977713585,
-0.2599188983440399,
-0.5328065752983093,
-0.08522208780050278,
0.7809053063392639,
-0.11703409254550934,
0.008570277132... | |
Source Control Block.
See [CCNET Documentation - Subversion Source Control Block](http://confluence.public.thoughtworks.org/display/CCNET/Subversion+Source+Control+Block)
The cleanUp and revert properties does what you want. | [
0.5338943600654602,
-0.13059307634830475,
0.20285950601100922,
-0.0018708246061578393,
-0.017879066988825798,
-0.5710158944129944,
-0.029813798144459724,
-0.32706207036972046,
-0.3007659614086151,
-0.3315728008747101,
-0.14310407638549805,
0.5842920541763306,
-0.1417701095342636,
-0.021730... | |
How do you generate paper-prints from a web application?
Specifically I am thinking about more complex paper documents like diplomas, invoices and contracts. Variable number of pages with frames, tables, logos and headers/footers.
Today I use custom forms and CSS for certain things and iTextSharp for others (I work w... | [
0.9552549719810486,
0.2877512276172638,
0.1386546492576599,
0.47193166613578796,
-0.04444889724254608,
-0.23195646703243256,
-0.43257978558540344,
-0.4438933730125427,
-0.2852672040462494,
-0.6545351147651672,
0.07815160602331161,
0.36601316928863525,
0.056304555386304855,
0.00596955418586... | |
them (if necessary). The easiest way to do this is with a full version of Adobe Acrobat, but you can also add fillable form fields using nothing but iTextSharp.
For example, for an award or diploma, you find, create, or modify a PDF containing all of the text, graphics, fancy borders and fonts for the document, then a... | [
0.48251616954803467,
0.044247496873140335,
0.8444308042526245,
0.6076854467391968,
-0.08350660651922226,
-0.2081552892923355,
-0.33125022053718567,
-0.11513581871986389,
-0.16302943229675293,
-0.4734395444393158,
-0.4718448221683502,
0.5991758108139038,
-0.047977615147829056,
0.02797275781... | |
user.
At the end of this post is a complete ASHX handler code example.
Also remember that iTextSharp (or just iText) is also useful for combining PDF documents or pages from different documents. So, for an annual report that has a fixed design for a cover or explanation page but dynamically generated content, you can... | [
0.3108792304992676,
0.06735002249479294,
0.5243216156959534,
0.37254634499549866,
-0.24085228145122528,
-0.24557547271251678,
0.10745023190975189,
-0.22161152958869934,
-0.26161929965019226,
-0.5321070551872253,
-0.3272245526313782,
0.39781418442726135,
-0.27477145195007324,
0.214236244559... | |
iTextSharp;
using iTextSharp.text;
using iTextSharp.text.pdf;
namespace iTextFormFillerDemo
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class DemoForm : IHttpHandler
{
public void ProcessRequest(HttpContext context)
... | [
0.18860873579978943,
-0.24251744151115417,
0.4224335253238678,
0.24736391007900238,
0.2847312092781067,
-0.12398277223110199,
0.4131091237068176,
-0.5383198261260986,
-0.1914665400981903,
-0.8275046348571777,
-0.8058575987815857,
0.7649644613265991,
-0.3409278094768524,
0.07928268611431122... | |
appearing on its own page - if you remove it,
//the page will appear in the browser in the same window.
context.Response.AddHeader("Content-Disposition",
"attachment; filename=DemoForm_Filled.pdf");
FillForm(context.Response.OutputStream);
context.Resp... | [
-0.1055053249001503,
-0.4526274502277374,
0.8985655307769775,
-0.2239549160003662,
0.057510849088430405,
0.11365967243909836,
0.08110447227954865,
-0.03187103942036629,
-0.27015766501426697,
-0.8095079064369202,
-0.7322138547897339,
0.20511533319950104,
-0.2155672311782837,
0.2575995624065... | |
// Fills the form and pushes it out the output stream.
private void FillForm(System.IO.Stream outputStream)
{
//Need to get the proper directory (dynamic path) for this file.
//This is a filesystem reference, not a web/URL reference...
//The PDF reader reads in the f... | [
0.015275046229362488,
-0.09230741858482361,
0.6861342191696167,
-0.05370131880044937,
0.3817513585090637,
-0.05509152635931969,
-0.10895975679159164,
0.05468874052166939,
0.003416287712752819,
-0.7064277529716492,
-0.29467570781707764,
0.4809199273586273,
-0.3047332465648651,
0.25517275929... | |
PdfReader reader = new PdfReader("C:/DemoForm_Fillable.pdf");
//The PDF stamper creates an editable working copy of the form from the reader
//and associates it with the response output stream
PdfStamper stamper = new PdfStamper(reader, outputStream);
//The PDF has a s... | [
-0.19467793405056,
-0.30153194069862366,
0.7586961984634399,
0.2619779706001282,
-0.24967525899410248,
0.16161829233169556,
-0.25504371523857117,
-0.46534839272499084,
-0.17443038523197174,
-0.31612062454223633,
-0.7702018022537231,
0.5700668692588806,
-0.27769553661346436,
-0.363968431949... | |
//Note that this is shorthand for writing out
//stamper.AcroFields.SetField(...) for each set
AcroFields form = stamper.AcroFields;
//Set each of the text fields this way: SetField(name, value)
form.SetField("txtFieldName", "Field Value");
form.SetField("txt... | [
0.2798161208629608,
-0.1760120838880539,
0.34445682168006897,
-0.31471967697143555,
0.02058025635778904,
0.030737651512026787,
-0.04658476263284683,
-0.3784962594509125,
0.07621501386165619,
-0.10844498127698898,
-0.5426027178764343,
0.6352905035018921,
-0.4243624806404114,
-0.201197892427... | |
//Set the radio button fields using the names and string values:
form.SetField("rbRadioButtons", "Yes"); //or "No"
//Form flattening makes the form non-editable and saveable with the
//form data filled in
stamper.FormFlattening = true;
//Closing the stamper... | [
0.31699514389038086,
-0.019917847588658333,
0.751542866230011,
-0.1662459820508957,
0.2479720562696457,
-0.2042195051908493,
0.3706047832965851,
-0.6392433047294617,
0.2865616977214813,
-0.0707634836435318,
-0.4868394434452057,
0.7975597381591797,
-0.47281256318092346,
-0.01034384313970804... | |
stamper.Close();
//We're done reading the file
reader.Close();
}
public bool IsReusable
{
get
{ | [
0.17593349516391754,
-0.010457544587552547,
0.4557695984840393,
-0.2710138261318207,
0.2739221453666687,
-0.2354763001203537,
-0.05958545580506325,
-0.14820821583271027,
-0.15161319077014923,
-0.22688397765159607,
-0.4526878297328949,
0.60921311378479,
-0.3677273094654083,
-0.0018940356094... | |
return false;
}
}
}
}
``` | [
-0.01846739836037159,
0.3521522879600525,
-0.09832122176885605,
-0.25845250487327576,
0.19039364159107208,
-0.23910918831825256,
0.5218135714530945,
0.2589348554611206,
0.24684758484363556,
-0.1528417468070984,
-0.43812814354896545,
0.84714275598526,
-0.2124020904302597,
0.2719268798828125... | |
I get security exception when using `System.Net.WebClient` to do HTTP requests, which is due to the fact that `crossdomain.xml` or `clientaccesspolicy.xml` on the target server are either missing or are too restrictive. I know there is a good reason for this (cookies and cross-site request forgery), but it does not app... | [
0.3582657277584076,
0.27135562896728516,
0.42848095297813416,
0.04280479624867439,
-0.11384448409080505,
-0.3706698715686798,
0.3666756749153137,
0.21721193194389343,
-0.2247961461544037,
-0.757723867893219,
0.01229516975581646,
0.21621577441692352,
-0.07920524477958679,
0.3401477038860321... | |
bandwidth.
What is the way (if there is one) to do it in Silverlight? Am I using the right class?
I think that that is actually not possible, at least with WebClient.
The whole idea is to restrict (protect...) the clients from unwanted requests to other servers.
To get around that, what you can do is have a proxy web... | [
0.7432031631469727,
-0.013477806933224201,
0.32654035091400146,
0.4302833378314972,
-0.24226424098014832,
-0.48918652534484863,
-0.11835819482803345,
0.0866108387708664,
-0.1234733834862709,
-0.5932675004005432,
0.2720317840576172,
0.6377428770065308,
-0.36461466550827026,
0.31879371404647... | |
I have a C code base and need to programmatically identify all of the global variables used. I think that gcc can be made to produce a memory map file but don't know how and this might let me see which variables are global? Any help would be appreciated.
Cheers
You can extract such information from your object files w... | [
-0.04905125871300697,
0.3102806508541107,
0.6081758737564087,
-0.12268440425395966,
0.0007899884367361665,
-0.057725004851818085,
-0.00933893769979477,
0.013349144719541073,
-0.39893850684165955,
-0.47532176971435547,
-0.25961431860923767,
0.5183250904083252,
-0.29227373003959656,
0.214089... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.