text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
posts.name, posts.value
FROM posts, post_attributes
WHERE posts.id = post_attributes.post_id
AND post_attributes.name IN ('title', 'body')
ORDER BY id;
```
Add a `post_attributes.*` to the end if you want all the fields from post attributes. | [
0.3525685667991638,
0.36233407258987427,
0.4392243027687073,
0.0670294389128685,
-0.12007277458906174,
-0.008098579943180084,
-0.1372254192829132,
-0.1173321083188057,
0.14892202615737915,
-0.5100818872451782,
-0.15176041424274445,
0.25808924436569214,
-0.1848333328962326,
0.36963272094726... | |
I have an app, which cycles through a huge number of records in a database table and performs a number of SQL and .Net operations on records within that database (currently I am using Castle.ActiveRecord on PostgreSQL).
I added some basic btree indexes on a couple of the feilds, and as you would expect, the performanc... | [
0.18767115473747253,
0.327857106924057,
0.2032640278339386,
-0.1061502993106842,
-0.07924756407737732,
0.1680222898721695,
0.46751725673675537,
-0.086371049284935,
-0.25345340371131897,
-0.687279999256134,
-0.021201539784669876,
0.54475998878479,
-0.16920755803585052,
0.08389559388160706,
... | |
needs to update the index, as well as the data), but what suggestions and best practices should I consider with creating database indexes? How do I best select the feilds/combination of fields for a set of database indexes (rules of thumb)?
Also, how do I best select which index to use as a clustered index? And when i... | [
-0.02671302668750286,
0.20288293063640594,
0.2595098316669464,
0.1731739491224289,
-0.04339371994137764,
-0.20743915438652039,
0.025690877810120583,
-0.3750794529914856,
-0.271642804145813,
-0.4303952753543854,
0.0768362432718277,
0.749407947063446,
-0.17315161228179932,
0.0999302193522453... | |
table is created).
* Index ALL foreign key columns.
* Create more indexes ONLY if:
+ Queries are slow.
+ You know the data volume is going to increase significantly.
* Run statistics when populating a lot of data in tables.
If a query is slow, look at the execution plan and:
* If the query for a table only uses a f... | [
-0.13388240337371826,
-0.04173960164189339,
0.27569103240966797,
0.375789076089859,
-0.032135237008333206,
0.00046056477003730834,
0.052253104746341705,
-0.3043349087238312,
-0.5518711805343628,
-0.8011789917945862,
-0.009413783438503742,
0.38226738572120667,
-0.49380165338516235,
-0.01788... | |
with more distinct values, followed by columns with fewer distinct values.
* If a query needs to access more than 10% of the data, a full scan is normally better than an index. | [
0.013713397085666656,
-0.220680832862854,
0.4588127136230469,
0.31568166613578796,
-0.08908921480178833,
0.1213182583451271,
0.18405219912528992,
-0.26200780272483826,
-0.15419666469097137,
-0.5024338364601135,
-0.3955993354320526,
0.08011926710605621,
-0.24710948765277863,
0.0377942025661... | |
I am trying to determine if my code is running on an iPhone or an iPhone3G. My first try was to use the UIDevice class in UIKit, but both iPhone and iPhone3G return the same responses:
```
NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by user
NSLog([[UIDevice currentDevice] uniqueIdentifier]); ... | [
-0.09123636782169342,
0.09275706112384796,
0.49116048216819763,
-0.2311861664056778,
0.1475568264722824,
0.22701621055603027,
0.4094860851764679,
0.049156203866004944,
-0.06712450832128525,
-0.6896052360534668,
-0.1079789251089096,
0.5850595235824585,
-0.3595964014530182,
0.072269819676876... | |
appropriate calls.
I'm sure there is some piece of hardware I could query (such as something in location services) but that seems like a hack. Does anyone know a simply way of determining this?
The iPhone runs OS X. [Here's](http://www.cocoadev.com/index.pl?MacintoshModels) how to determine your hardware platform on a... | [
-0.04654308408498764,
0.14490516483783722,
0.5449849963188171,
0.20828752219676971,
0.2714405953884125,
0.11429868638515472,
0.2624504864215851,
-0.12870706617832184,
-0.29069027304649353,
-0.5544113516807556,
-0.2267104685306549,
0.8526604771614075,
0.004387272987514734,
-0.43780443072319... | |
Have a table of data surrounded by form tags. At the bottom of the page have a footer that is fixed.
When the table is empty (only table header displaying) the entire footer shifts half way off the screen, to the right.
Any ideas?
```
<form action="/cgi-bin/Lib.exe" method=POST name="dd" ID="Form1">
<div id="yy... | [
0.08680170029401779,
-0.17544277012348175,
0.7594678997993469,
0.01701587438583374,
0.2629326581954956,
-0.21016345918178558,
-0.17099426686763763,
-0.25499090552330017,
-0.17087677121162415,
-0.9546345472335815,
-0.2683957517147064,
0.18410523235797882,
-0.23842935264110565,
0.05151103064... | |
<tr>
<th>Start</th>
<th>End</th> | [
-0.2837764620780945,
0.2769840657711029,
0.4306412637233734,
-0.004923022817820311,
-0.06314811110496521,
0.20475900173187256,
0.2877286970615387,
0.09155745804309845,
0.1412735879421234,
-0.5423709750175476,
-0.6291179656982422,
0.07877198606729507,
0.09576662629842758,
0.1371238529682159... | |
</tr>
</thead>
<p><small><font face="Arial"><small>$DATA</small></font></small></p>
<tbody>
<tr> | [
-0.23024162650108337,
0.010199885815382004,
-0.1880740076303482,
-0.15022465586662292,
-0.17819006741046906,
0.6100994944572449,
0.15245823562145233,
-0.13957588374614716,
0.10851071029901505,
-0.7226561307907104,
-0.5761672258377075,
0.38837310671806335,
-0.23465889692306519,
-0.130407080... | |
<td><input type=radio name="begin" value="$START" ID="Radio0"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio3"></td>
</tr> | [
0.19122818112373352,
0.08819934725761414,
0.6597796678543091,
-0.24279214441776276,
-0.19102978706359863,
-0.24699489772319794,
0.4553610384464264,
-0.7299885749816895,
0.11308059096336365,
-0.1825263500213623,
-0.4216488301753998,
0.7920355200767517,
-0.2840977907180786,
0.228661209344863... | |
<tr>
<td><input type=radio name="begin" value="$START" ID="Radio1"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio4"></td> | [
0.15215647220611572,
0.09912305325269699,
0.6731581091880798,
-0.10173097252845764,
-0.17273195087909698,
-0.34697505831718445,
0.3437124788761139,
-0.669833779335022,
0.05781904235482216,
-0.14092132449150085,
-0.4999065697193146,
0.8030904531478882,
-0.3736667335033417,
0.195378303527832... | |
</tr>
<tr> | [
0.004869907628744841,
0.19029833376407623,
0.10640747845172882,
-0.07967972755432129,
0.3352130055427551,
0.11201538145542145,
0.30050233006477356,
0.477814257144928,
-0.17206712067127228,
-0.4729834794998169,
-0.3590504825115204,
0.21917113661766052,
0.013491136953234673,
-0.0375706590712... | |
<td><input type=radio name="begin" value="$START" ID="Radio2"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio5"></td>
</tr> | [
0.2460055947303772,
0.031760863959789276,
0.6330072283744812,
-0.16428712010383606,
-0.10869991034269333,
-0.28960177302360535,
0.4024275541305542,
-0.7046643495559692,
0.07420611381530762,
-0.14429105818271637,
-0.4579677879810333,
0.797912061214447,
-0.19583407044410706,
0.29549351334571... | |
</tbody>
</table>
</div>
<p><small><font face="Arial"><small>$DATA</small><strong></p>
</strong></font></small>
</form>
<div id="footer">
<div id="labfooter"> | [
0.0794399231672287,
-0.30872657895088196,
-0.03502662852406502,
-0.12925395369529724,
0.006377981975674629,
0.60648512840271,
-0.0914381891489029,
-0.33717676997184753,
-0.12710995972156525,
-0.7472060322761536,
-0.17486871778964996,
0.21929068863391876,
-0.34193170070648193,
-0.1271247267... | |
</div>
</div>
```
The CSS:
```
#footer {
width:100%;
height:5em;
}
html>body #footer {
position:fixed;
bottom:0;
z-index:10; /* Prevent certain problems with form controls */
}
#header,
#footer {
color:#111;
background:#ddd;
text-align:center;
}
```
It's hard to debug... | [
0.12706774473190308,
0.21668826043605804,
0.5319021940231323,
0.012017837725579739,
-0.06275542825460434,
-0.027066148817539215,
0.2974647581577301,
-0.19680994749069214,
-0.32501113414764404,
-0.7538921236991882,
-0.3249187469482422,
0.1356583684682846,
-0.22908465564250946,
-0.0422055721... | |
that can throw off many browser renderings. Sometimes it may look like it runs well, but the DOM can be thrown way off from improper code.
For start try removing the `<p>...</p>` in between the `<thead>` and `<tbody>` | [
0.18636766076087952,
0.004564848728477955,
0.16495083272457123,
0.1399424970149994,
-0.0664953961968422,
-0.2345975637435913,
0.3450901210308075,
-0.3117538094520569,
0.12164394557476044,
-0.4936674237251282,
-0.2856748402118683,
0.6986610889434814,
-0.15993689000606537,
0.1597791612148285... | |
I got another problem with the FCKEditor within ASP.NET MVC. Please review the code below
```
<script type="text/javascript">
var sBasePath = 'http://localhost:2170/Content/fckeditor/';
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = sBasePath;
oFCKe... | [
0.22130563855171204,
-0.48646336793899536,
0.5142665505409241,
-0.14984101057052612,
-0.13558264076709747,
-0.06804042309522629,
0.52387934923172,
-0.45628249645233154,
-0.15215080976486206,
-0.6989135146141052,
0.1275882124900818,
0.361598402261734,
-0.4596392512321472,
-0.125686049461364... | |
timer;
function ShowContent() {
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
if (oEditor != undefined) {
var ContentText = '<%= Model.Article.ContentText %>';
oEditor.SetHTML(ContentText) | [
0.0839078426361084,
-0.2666025459766388,
0.5257817506790161,
-0.17438320815563202,
0.1386510580778122,
0.10978840291500092,
0.28513336181640625,
-0.4628332555294037,
-0.32271096110343933,
-0.3791234791278839,
-0.3981388211250305,
0.6435567736625671,
-0.4106977581977844,
0.2776700258255005,... | |
clearTimeout(timer);
}
else {
timer = setTimeout("ShowContent()", 1000);
} | [
0.056059904396533966,
-0.42963850498199463,
0.6112218499183655,
-0.2795025706291199,
0.3244110345840454,
0.03774287551641464,
0.37769562005996704,
0.12953190505504608,
-0.07612159103155136,
-0.5731251239776611,
-0.2578178346157074,
0.5201205015182495,
-0.1672087013721466,
0.180913209915161... | |
}
timer = setTimeout("ShowContent()", 1000);
</script>
```
as you can see, the first problem is I have to hardcode the BasePath value, if I set the BasePath to a relative path like Content/fckeditor, then it will look for FCKEditor in <http://localhost:2170/Article/Content/fckeditor> which will l... | [
0.04738173633813858,
-0.23240676522254944,
0.5189690589904785,
0.04176757112145424,
0.04497602581977844,
-0.11389753222465515,
0.4044530391693115,
-0.2712409496307373,
-0.13939683139324188,
-0.8627362251281738,
0.18107284605503082,
0.6359480023384094,
-0.3457658886909485,
0.197288513183593... | |
fully loaded, I can not directly use SetHTML method when creating fckeditor, because at the moment, the oEditor object is undefined. Instead, I have to use setTimeout function to repeatly check the oEditor object until it is available, and then bind content to it.
I don't know if are there any other ways to solve the ... | [
0.18923193216323853,
-0.08802051842212677,
0.7603662610054016,
0.16384762525558472,
-0.341274231672287,
-0.41116082668304443,
0.27040308713912964,
-0.096025750041008,
-0.15694120526313782,
-0.5036613941192627,
-0.3802560567855835,
0.6437233090400696,
-0.23594990372657776,
0.088003717362880... | |
method:
```
var sBasePath = '<%= Url.Content ("~/Content/fckeditor/") %>';
```
That way, it won't matter where the application is running (<http://localhost:PORT> or <http://dev.someplace.com> etc). | [
0.2730867862701416,
-0.14061802625656128,
0.5670602917671204,
0.039839763194322586,
0.3259747624397278,
-0.360433429479599,
0.4426211714744568,
-0.03425154834985733,
0.043749988079071045,
-0.8750650882720947,
-0.620684027671814,
0.1465013325214386,
-0.26604241132736206,
0.2676549255847931,... | |
I want to use the new [Constraint-based model](http://nunit.com/index.php?p=constraintModel&r=2.4.8) in NUnit. In which assembly and namespace are the classes defined? (Specificially, I'm looking for the "Is" class and the IConstraint implementations discussed in the documentaton). They do not seem to be in NUnit.Frame... | [
-0.16396106779575348,
-0.19480369985103607,
0.6406739354133606,
-0.039683613926172256,
-0.1711845099925995,
0.10742861032485962,
0.19799499213695526,
0.055270589888095856,
-0.37709417939186096,
-0.8021714687347412,
-0.2193956822156906,
0.402189701795578,
-0.27515679597854614,
-0.2566536962... | |
I am doing that but if the language is Spanish, this is being displayed 475,00 €
The client wants it so that it is actually $ 475.00
possible?
Wouldn't some kind of Timer be more appropriate? You could then just have one thread which if there were more items remaining it would resume the timer and check again a secon... | [
0.3713003098964691,
-0.11876439303159714,
0.466452032327652,
0.20511335134506226,
0.021943097934126854,
-0.3166874945163727,
0.436683714389801,
0.11743273586034775,
-0.0002774067397695035,
-0.6433168649673462,
-0.11183126270771027,
0.9092901945114136,
0.037387095391750336,
-0.3037429153919... | |
is UNTESTED code to try:
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows.Threading;
using System.Windows;
namespace WpfApplication1
{
public class Notification
{
public DateTime TimeStamp { get; set; }... | [
-0.16693048179149628,
-0.16706207394599915,
0.5842342376708984,
-0.19491413235664368,
0.18249662220478058,
0.30572745203971863,
0.2614987790584564,
-0.31639987230300903,
-0.23714926838874817,
-0.47978562116622925,
-0.29485562443733215,
0.338008314371109,
-0.3783595561981201,
0.205640360713... | |
public NotificationCollection(TimeSpan timeout, Dispatcher dispatch)
{
this.timeout = timeout;
timer = new DispatcherTimer(new TimeSpan(0, 0, 1), DispatcherPriority.Normal, this.Cleanup, dispatch);
}
protected override void InsertItem(int index, Notification item)
... | [
-0.02901250682771206,
-0.18940922617912292,
0.11997473984956741,
-0.3838530480861664,
0.18982218205928802,
0.32222750782966614,
0.20981048047542572,
-0.28669485449790955,
0.13894999027252197,
-0.3062060475349426,
-0.3908373713493347,
0.6781406998634338,
-0.5238144993782043,
0.2002244591712... | |
timer.Start();
}
private void Cleanup(object o, EventArgs e)
{
timer.Stop();
// Sanity
if (this.Count == 0)
return; | [
0.27743956446647644,
-0.3937562108039856,
0.14427690207958221,
-0.2340722382068634,
0.5448453426361084,
0.09372034668922424,
0.4529620409011841,
-0.2130603790283203,
-0.27316105365753174,
-0.1282164305448532,
-0.3546173870563507,
0.7258942723274231,
-0.3126614987850189,
0.5114440321922302,... | |
var deadList = from note in this.Items
where note.TimeStamp + this.timeout - DateTime.UtcNow < TimeSpan.Zero
select note;
foreach (var note in deadList) | [
-0.08549614995718002,
-0.2805633842945099,
0.046401068568229675,
-0.4789823591709137,
0.3518357574939728,
0.21253061294555664,
0.26986339688301086,
-0.20105282962322235,
-0.26369228959083557,
-0.664938747882843,
-0.2683887779712677,
0.14044828712940216,
-0.1308572143316269,
0.3407092094421... | |
{
this.Remove(note);
}
if (this.Count > 0)
timer.Start();
}
}
}
``` | [
0.28117936849594116,
-0.050964221358299255,
0.24799823760986328,
-0.5941125154495239,
0.4567301869392395,
-0.3680078089237213,
0.25423750281333923,
-0.4147101938724518,
-0.17080628871917725,
-0.48958820104599,
-0.32642653584480286,
0.5081875324249268,
-0.42420488595962524,
0.49321067333221... | |
Is there a way to define a temp table without defining it's schema up front?
Actually using a table VARIABLE, an in-memory table, is the optimal way to go. The #table creates a table in temp db, and ##table is global - both with disk hits. Consider the slow-down/hit experienced with the number of transactions.
```
CRE... | [
0.1208268404006958,
0.06680936366319656,
0.21097084879875183,
0.07714995741844177,
-0.19022606313228607,
-0.017568932846188545,
0.19976821541786194,
-0.35180771350860596,
-0.21421204507350922,
-0.48093414306640625,
-0.1313408613204956,
0.4948442280292511,
-0.3150283098220825,
-0.0400325208... | |
(
AccountId BIGINT,
AccountName VARCHAR(50),
...
)
INSERT INTO @tmp_Accounts ([AccountId], [AccountName]...
)
SELECT AccountID, AccountName
FROM Accounts
WHERE ...
IF @@Rowcount = 0
BEGIN
SET @ErrorMessage = 'No accounts found.' | [
-0.22498387098312378,
0.06774181127548218,
0.21311815083026886,
-0.14423945546150208,
0.3571006953716278,
0.2744724154472351,
0.2491726130247116,
-0.1296447068452835,
-0.16162970662117004,
-0.49900656938552856,
-0.11061728000640869,
0.5539945363998413,
-0.08048521727323532,
0.0292798671871... | |
SET @Result = 0
RETURN @Result
END
ELSE
BEGIN
SET @Result = 1
SELECT *
FROM @tmp_Accounts
END
```
Note the way you insert into this temp table.
The down-side of | [
0.5401253700256348,
-0.22299136221408844,
0.42582863569259644,
-0.17054463922977448,
0.07469841837882996,
-0.15077625215053558,
-0.06572792679071426,
-0.2665252685546875,
-0.07683011144399643,
-0.4122532904148102,
0.02454211376607418,
0.5153485536575317,
-0.14197729527950287,
-0.0855905339... | |
this is that it may take a bit longer to write, as you have to define your table variable.
I'd also recommend SQL Prompt for Query Analyzer by RedGate. | [
-0.04789091274142265,
0.07202164083719254,
0.300495445728302,
0.1326780468225479,
-0.04690100625157356,
-0.1613488644361496,
0.07140897214412689,
0.2163156419992447,
-0.17176328599452972,
-0.6448474526405334,
0.1850021928548813,
0.46090584993362427,
-0.010951483622193336,
0.122319899499416... | |
A similar question was asked earlier [there](https://stackoverflow.com/questions/69192/using-stack-as-queue), but the question here is the reverse of it, using two queues as a stack. The question...
Given two queues with their standard operations (`enqueue`, `dequeue`, `isempty`, `size`), implement a stack with its st... | [
-0.1561477780342102,
-0.3074243664741516,
0.21753466129302979,
-0.018652191385626793,
-0.07676699012517929,
0.36740437150001526,
-0.24190136790275574,
-0.2664541006088257,
-0.5173640847206116,
-0.5562210083007812,
-0.21738915145397186,
0.18210673332214355,
-0.3356219232082367,
-0.153556212... | |
tagged 'java'"),[c#](/questions/tagged/c%23 "show questions tagged 'c#'"),[python](/questions/tagged/python "show questions tagged 'python'"),[vb](/questions/tagged/vb "show questions tagged 'vb'"),[javascript](/questions/tagged/javascript "show questions tagged 'javascript'"),[php](/questions/tagged/php "show question... | [
-0.053310856223106384,
-0.3288879990577698,
0.5677456259727478,
-0.12111017107963562,
0.10278669744729996,
0.6075941920280457,
-0.04681059345602989,
-0.3810808062553406,
-0.24447275698184967,
-0.5526766180992126,
-0.18948894739151,
0.19617889821529388,
-0.4346517324447632,
-0.1655165255069... | |
I have gotten to know my way around a few programming languages, and I'd like to try my hand at making a command-line text editor -- something that runs in the terminal, like vim/emacs/nano, but is pure text (no guis, please). Preferably, I'd like to do this in python. Where do I start? Are there any (python) libraries... | [
0.5498321652412415,
0.12738023698329926,
0.14112092554569244,
0.007901783101260662,
-0.016540588811039925,
-0.15191662311553955,
0.0855429545044899,
0.25136974453926086,
-0.0925799310207367,
-0.7938660383224487,
0.03602553531527519,
0.7222551703453064,
-0.18983915448188782,
-0.189947679638... | |
Our application consumes lots of memory and we need to identify which function cause the maximum usage of the memory. Is their any way or even any existing tool to do this(Windows, Native)?
**Here is the environment:**
Windows Xp
VS2008
Native C++ (MFC Based)
Thanks so much.
If you have Visual Studio 2008 Team Sys... | [
-0.03152832016348839,
0.17102068662643433,
0.02076343633234501,
0.21731187403202057,
-0.3034589886665344,
0.052943430840969086,
0.1090017706155777,
-0.07627277076244354,
-0.3948177397251129,
-0.4857921004295349,
-0.040096644312143326,
0.823340654373169,
-0.026877157390117645,
-0.1713877320... | |
memory profiling/memory leak tool they like to use for their java webapps?](https://stackoverflow.com/questions/46642/does-anyone-here-have-a-favorite-memory-profiling-memory-leak-tool-they-like-to-u)
[Best .NET memory and performance profiler?](https://stackoverflow.com/questions/49912/best-dotnet-memory-and-performa... | [
0.011513586156070232,
0.029659263789653778,
0.1798361986875534,
0.2295399010181427,
0.07674860954284668,
-0.4608732759952545,
0.20341609418392181,
-0.04130439832806587,
-0.2619853913784027,
-0.6276777386665344,
0.009146332740783691,
0.38551443815231323,
0.004355923738330603,
-0.02228194288... | |
Where can I find a **well-respected reference** that details the proper handling of PID files on Unix?
On Unix operating systems, it is common practice to “lock” a program (often a daemon) by use of a special lock file: the PID file.
This is a file in a predictable location, often ‘/var/run/foo.pid’. The program is s... | [
0.2262554168701172,
0.21379409730434418,
0.24462354183197021,
0.09790661931037903,
0.10031799972057343,
-0.046898145228624344,
-0.047572456300258636,
-0.049931660294532776,
-0.0903700664639473,
-0.49464675784111023,
-0.2922009825706482,
0.2527286410331726,
-0.20704242587089539,
0.150034815... | |
file”) of the process that currently holds the lock; this allows an easy way to automate sending a signal to the process that holds the lock.
What I can't find is a good reference on expected or “best practice” behaviour for handling PID files. There are various nuances: how to actually lock the file (don't bother? us... | [
0.23605568706989288,
0.2391848862171173,
-0.04249792918562889,
0.13869573175907135,
0.0956248864531517,
0.0396617129445076,
0.051431477069854736,
-0.22371383011341095,
-0.3064079284667969,
-0.2905358076095581,
-0.27996018528938293,
0.5258826613426208,
-0.1367771327495575,
0.107926376163959... | |
topic?
As far as I know, PID files are a convention rather than something that you can find a respected, mostly authoritative source for. The closest I could find is [this section](http://www.pathname.com/fhs/2.2/fhs-5.13.html) of the Filesystem Hierarchy Standard.
[This Perl library](http://search.cpan.org/~ecalder/P... | [
0.6034588813781738,
-0.07208070904016495,
0.0976085215806961,
0.09557222574949265,
-0.20388799905776978,
-0.24541941285133362,
-0.036222830414772034,
0.178556427359581,
-0.38912394642829895,
-0.16081760823726654,
-0.14273670315742493,
0.44175198674201965,
-0.28528934717178345,
-0.044953715... | |
couldn't find any detailed guidelines, but you might be able to get more info on their developers' mailing lists. | [
0.8252788782119751,
-0.025784632191061974,
-0.045480020344257355,
0.24747860431671143,
0.07237359881401062,
-0.4028303623199463,
0.17962950468063354,
0.09854915738105774,
-0.042099785059690475,
-0.2799006402492523,
0.2554837465286255,
0.2503611743450165,
0.2163533866405487,
-0.172431141138... | |
Can someone point me to a C# open source implementaion with a simple image animations.
e.g. I feed the input image to animator, and the animation code produces a few dozen of images which if displayed sequentially looks like animation.
I am not something extremely fancy - a simple DirectX filter like animations woul... | [
0.6771470904350281,
0.00572371669113636,
0.05084919556975365,
0.33068299293518066,
-0.013583561405539513,
-0.18810124695301056,
-0.015746230259537697,
0.21785181760787964,
-0.23044472932815552,
-0.4136601984500885,
0.024653024971485138,
0.2871522605419159,
0.10866691172122955,
0.0961541309... | |
I have some special exception cases that I want to throw and catch, so I want to define my own exception classes.
What are the best practices for that? Should I inherit from `std::exception` or `std::runtime_error`?
Yes, it's good practice to [inherit](https://isocpp.org/wiki/faq/exceptions#what-to-throw) from `std::... | [
0.35640856623649597,
0.2708400785923004,
-0.30606064200401306,
0.048029009252786636,
-0.03820503503084183,
-0.36370936036109924,
0.06048784777522087,
-0.1850966066122055,
-0.24521568417549133,
-0.4150867164134979,
-0.09773877263069153,
0.35590648651123047,
-0.07304038852453232,
0.294793874... | |
makes these exceptions carry more information, but how useful this really is depends on how you do your exception handling. | [
0.5194617509841919,
0.132280632853508,
0.031348176300525665,
0.2917599678039551,
0.2152937948703766,
-0.30722707509994507,
0.28317534923553467,
-0.14264290034770966,
-0.25103074312210083,
-0.5117547512054443,
0.01397789642214775,
0.3852196931838989,
-0.11660275608301163,
-0.292275816202163... | |
I am trying to do a [Project Euler](https://projecteuler.net/problems) problem but it involves adding the digits of a very large number. (100!)
Using Java int and long are too small.
Thanks for any suggestions
Class [BigInteger](http://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html)
looks like it might... | [
0.2127181440591812,
0.162575364112854,
-0.2937023937702179,
0.016864318400621414,
-0.24599438905715942,
0.28508105874061584,
0.30919939279556274,
0.04431624338030815,
-0.3080209791660309,
-0.3297902047634125,
0.3169054388999939,
0.13508157432079315,
-0.305603563785553,
0.0328407920897007,
... | |
I am about to write a program to keep track of my school assignments and I was wondering what database language would be the most efficient and simple to implement to track the meta-data of the assignments? I am thinking about XML, but it would require several documents.
I (currently) have at least ten assignments per... | [
0.6007634401321411,
0.1751175969839096,
0.3437836766242981,
0.25161245465278625,
0.005633442662656307,
0.02999320812523365,
0.09910309314727783,
-0.07886144518852234,
-0.23890909552574158,
-0.5510237216949463,
0.29044488072395325,
0.30179399251937866,
0.5527932643890381,
-0.066871963441371... | |
the amount of meta-data without having to make large changes in either the format or the retrieval system.
Quite frankly, if you pick a full-fledged database you run the risk of spending more time on data entry than you do on your homework. If you really need to keep track of this, I would seriously recommend a spreads... | [
0.2647748589515686,
0.06682644784450531,
-0.10121753066778183,
0.5692259073257446,
-0.0160098634660244,
-0.12789560854434967,
0.055879145860672,
0.04377979412674904,
-0.37903210520744324,
-0.5660457015037537,
0.08401812613010406,
0.7864519357681274,
0.0006671813898719847,
-0.01136998273432... | |
I have this simple code in php:
```
<?php
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=kid_tag.doc");
echo '<table cellspacing="0" cellpadding="0" border="0" width="8.4cm">
<tr>
<td colspan="3" style="text-align: right; height: 0.6cm">Nursery</td>
</tr... | [
0.08874998986721039,
0.05744502693414688,
1.1228463649749756,
0.051656726747751236,
-0.08363323658704758,
0.10886022448539734,
0.2917231619358063,
-0.5495120882987976,
-0.2720284163951874,
-0.5550501942634583,
0.12040991336107254,
-0.07576751708984375,
0.06923770159482956,
0.10525801777839... | |
with MS Office Word, however, width is reduced (not proper width!) when opened with open office writer.
You are actually importing HTML into MS Word and OpenOffice.org. HTML is not the native format of neither Word nor OpenOffice.org, which means the input has to be converted first.
It is no surprise that these appli... | [
-0.14555460214614868,
0.02894759364426136,
0.5850967764854431,
-0.171525239944458,
-0.2234320193529129,
-0.09419876337051392,
0.2624790370464325,
0.16624192893505096,
-0.21753402054309845,
-1.0406280755996704,
-0.3638538122177124,
0.4029615819454193,
-0.16512130200862885,
0.010935937054455... | |
area.
The solution would be to provide HTML which works in both applications. You could do that using [conditional comments](http://de.wikipedia.org/wiki/Conditional_Comments) which are a proprietary Microsoft extension to HTML and therefore only understood by Microsoft products.
This is how it could look like in yo... | [
0.17274363338947296,
-0.07896801829338074,
0.741218090057373,
-0.247787207365036,
0.07135649025440216,
-0.15997019410133362,
-0.08742300420999527,
-0.49949055910110474,
-0.5457022190093994,
-0.5816452503204346,
-0.3334529399871826,
0.1733494997024536,
-0.23267680406570435,
0.05902788415551... | |
I haven't seen a continuous version control system - one that would save changes in your code as you developed them, rather than waiting for an official check in. The changes would be saved as 'not checked in' of course, but they would be saved away for backup, and viewing by others before you actually did the official... | [
0.5308910012245178,
-0.06169263646006584,
0.050992682576179504,
0.2697259783744812,
0.1456974297761917,
-0.08802621811628342,
-0.055771347135305405,
0.2860063910484314,
-0.45715653896331787,
-0.47345077991485596,
0.11482732743024826,
0.5450109243392944,
-0.2025509774684906,
0.1490986198186... | |
make those packets smaller and integrate continuously?
-Adam
> Right now programmers think of source code control as integrating packets of code, but why not make those packets smaller and integrate continuously?
I would say DVCS are already basically doing this now, not because they are decentralised, but because co... | [
0.3764016330242157,
-0.038474325090646744,
-0.018643273040652275,
0.32865434885025024,
-0.14758607745170593,
-0.2500019669532776,
0.2742985486984253,
-0.029572872444987297,
-0.36556440591812134,
-0.8598252534866333,
-0.13642634451389313,
0.5070510506629944,
-0.3934670388698578,
-0.00190741... | |
the way git inherently works means, as you said, "the changes would be saved as 'not checked in' of course".. When you commit, the changes are local, then you push them to the remote machine with a separate command.. You could commit every time you save, then rebase them into a single commit if you wished.
As for a to... | [
0.2836747467517853,
-0.1877242922782898,
0.5941235423088074,
-0.10220307856798172,
0.16299556195735931,
-0.18324528634548187,
-0.12470559030771255,
0.22417673468589783,
-0.48959702253341675,
-0.8143816590309143,
-0.13840021193027496,
0.7412720322608948,
-0.10791172832250595,
0.125696018338... | |
([github](http://github.com/melo/perl-app-cacm/tree/master)), which does something similar
> [CACM] watches a specific directory, and commits all the changes to a standalone Git repository.
>
>
> To use just do:
>
>
> `cacm --repo dir_of_git_repo --watch dir_to_watch`
I'm not sure why you'd want to do so.. I find... | [
0.33802419900894165,
-0.07072889059782028,
0.7289431095123291,
-0.12455828487873077,
-0.0833861455321312,
-0.06693358719348907,
-0.01539662852883339,
-0.19196821749210358,
-0.6920652389526367,
-0.623377799987793,
-0.13179080188274384,
0.3560371994972229,
-0.1450309157371521,
0.226171195507... | |
Does anyone know how to (or if) you can convert a string to an enumerated type in the objective-c/cocoa/iphone environment?
For example:
If I have an XML document with the element:
`<dog breed="GermanShepard">`
I would like to be able to read the "breed" attribute into an NSString and then convert it into a type "D... | [
0.5374255180358887,
0.3035793900489807,
0.026047315448522568,
0.055273160338401794,
0.28944289684295654,
0.03974037244915962,
0.42743101716041565,
-0.19526547193527222,
-0.06943962723016739,
-0.43609294295310974,
-0.16021618247032166,
0.43464285135269165,
-0.19899050891399384,
-0.208030954... | |
that once I have an NSString, I am unable to convert it to an enumerated type (ie. the Dog type in the example). I only included the XML example above as a means of illustrating why I would want to do such a thing.
There's no way to do this out of the box. You'll need to make a table that allows you to associate the st... | [
0.2925752103328705,
0.12516836822032928,
-0.003864722792059183,
-0.09465201944112778,
-0.031263452023267746,
-0.023998426273465157,
0.16295428574085236,
-0.05489278584718704,
-0.216777041554451,
-0.33627989888191223,
0.02556941658258438,
0.3806755244731903,
-0.36596691608428955,
0.15537355... | |
I have a DIV with a script as shown below
```
<div style="text-align:center">
<script type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=www.mysite.com'></script>
</div>
```
What I want is that the users should not be able to see this div on the site, but th... | [
0.5849867463111877,
0.28712964057922363,
0.4520047903060913,
-0.2948109209537506,
-0.22574299573898315,
-0.435118705034256,
0.17659300565719604,
-0.1171189546585083,
-0.00218126829713583,
-0.723645806312561,
-0.15950040519237518,
0.44553259015083313,
-0.43887561559677124,
0.274715781211853... | |
inside the DIV tag will still get loaded, which I believe is the desired effect. | [
0.4096207320690155,
0.1184394359588623,
0.5747898817062378,
0.10317140817642212,
0.3314020335674286,
-0.27407607436180115,
0.08503852039575577,
-0.21333922445774078,
-0.06568028032779694,
-0.30098772048950195,
0.07522797584533691,
0.43420469760894775,
0.06850730627775192,
-0.31634628772735... | |
I have a simple form that is used to update an entity in my ASP.NET MVC app. I want the user to be able to submit the form, have the proper Action on my controller be called and then notify the user that the update was completed.
Because I wanted to display a JQuery dialog after the user clicks the update button, I wa... | [
0.32783350348472595,
-0.11694555729627609,
0.6577234268188477,
0.030021218582987785,
-0.16230832040309906,
-0.08805333077907562,
0.17257916927337646,
-0.34749171137809753,
-0.21016402542591095,
-0.541126012802124,
-0.049499429762363434,
0.5794838070869446,
-0.15903742611408234,
-0.16720183... | |
my route and that has been decorated with `[Authorize]` and `[AcceptVerbs(HttpVerbs.Post)]`
For example, if the user is updating their entity at the following URL:
```
/SomeController/Edit/5
```
When JQuery submits the form, I want to submit it to my Edit Action that is already decorated and accepts the ID as a par... | [
0.30270445346832275,
0.14031803607940674,
1.0215519666671753,
-0.1999833732843399,
0.01571142114698887,
-0.1300925612449646,
0.23195399343967438,
-0.4079122841358185,
0.062027208507061005,
-0.6528610587120056,
-0.18511462211608887,
0.3480836749076843,
-0.12867654860019684,
-0.0042670932598... | |
var serializedForm = frm.serialize();
$.post(action, serializedForm, function() {
alert('Call completed');
});
return false; | [
0.2777995765209198,
-0.551962673664093,
0.6424790024757385,
-0.21107691526412964,
-0.08307335525751114,
0.18946391344070435,
0.4711923897266388,
-0.4566042721271515,
-0.13241662085056305,
-0.2004130333662033,
-0.24157379567623138,
0.5778031349182129,
-0.5480338931083679,
0.2582225799560547... | |
});
```
If I define my form as follows:
```
<form id="formFoo" action="/SomeController/SomeOtherAction" method="post">
```
and my Action as follows:
```
public void SomeOtherAction()
{
var myEntity=new MyEntity();
UpdateModel(myEntity);
}
```
Then my action is called and my object is populated properly... | [
-0.00029701838502660394,
-0.10488863289356232,
0.7174805402755737,
-0.3428272008895874,
0.00896845106035471,
0.2151741236448288,
0.26673755049705505,
-0.13820359110832214,
-0.29679790139198303,
-0.4389045834541321,
-0.32717159390449524,
0.48048919439315796,
-0.3143092095851898,
-0.14866723... | |
that I'm posting back to the form, but that seems very ugly. Or is there a way I can get the ID field while in in my SomeOtherAction action? Or am I just going about this all wrong?
When you call:
```
$.post(action
```
Then the "action" argument needs to include the ID. In your question, you don't say what this is a... | [
0.2541023790836334,
0.2648489773273468,
0.5063272714614868,
-0.14592359960079193,
0.042393699288368225,
-0.04619837924838066,
0.14174628257751465,
-0.20436476171016693,
-0.06566740572452545,
-0.4993794858455658,
0.006602741777896881,
0.4978324770927429,
-0.2775438129901886,
0.1547333598136... | |
any difference, but without knowing what your routes are I would say that you should stick closely to the URI format that you give in the question.
So install firebug, if you haven't already, put a breakpoint in the JavaScript, and inspect the value of the action argument.
If it still looks right, open the Net panel ... | [
0.5233679413795471,
0.09463070333003998,
0.41307687759399414,
0.029027214273810387,
0.12796545028686523,
-0.2451474517583847,
0.1802886724472046,
-0.031147299334406853,
-0.026687035337090492,
-0.7483959197998047,
-0.245751291513443,
0.5357659459114075,
-0.293561190366745,
-0.13727231323719... | |
action.
Finally, but me that in a plug for the [jQuery Ajax Form plug-in](http://malsup.com/jquery/form/). I find that it makes this sort of thing very easy. | [
0.2451448291540146,
-0.0268489308655262,
0.10070735961198807,
0.15610046684741974,
-0.2204846292734146,
-0.1599806845188141,
0.21505805850028992,
0.12079973518848419,
-0.41146203875541687,
-0.32993751764297485,
-0.10514038056135178,
0.5554637312889099,
0.0017883075634017587,
-0.07510098069... | |
Is it better to have one fat data context class with all the tables in it or break them into smaller classes and potentially having "single table" classes?
From organizational standpoint I feel like I shouldn't split relations over several data contexts (I don't even think it's doable). But on the other hand I think t... | [
0.3066522777080536,
-0.004009033553302288,
-0.19631806015968323,
0.36266449093818665,
-0.23432756960391998,
-0.11530638486146927,
0.19885000586509705,
0.1361866295337677,
-0.5201059579849243,
-0.6233022809028625,
0.14104196429252625,
0.3931313753128052,
-0.24038617312908173,
-0.01283595524... | |
to have one or more separate data context implementations. A new data context is "empty" until you actually start using it, and table instances are created as needed.
What makes a data context instance expensive is when you use the same instance over and over again for tracking changes to different objects - for examp... | [
0.1273329257965088,
-0.04807557165622711,
-0.0263376422226429,
0.5494267344474792,
0.21466241776943207,
-0.09234318882226944,
0.22429238259792328,
-0.12520378828048706,
-0.2973991632461548,
-0.7899532318115234,
0.02452663891017437,
0.47901737689971924,
-0.2502870559692383,
-0.0627943351864... | |
level, as you only instantiate the ones you need within the current unit of work.
To me, the data context logically represents the target database, so it should represent all the entities that are mapped within that database, whether there are 10 or 100 - splitting it up really offers no benefit other than less lines ... | [
0.24010586738586426,
-0.09435728937387466,
0.06323256343603134,
0.5735116004943848,
-0.05018897354602814,
-0.023085318505764008,
0.1279577910900116,
-0.07823510468006134,
-0.037518374621868134,
-0.7501059770584106,
-0.10992755740880966,
0.6063317656517029,
0.01389689464122057,
-0.014353821... | |
I am currently trying to figure out how to save the content from a RichTextbox into a stream(currently using FileStream) and do this alongside a bunch of other data. Then of course I want to be able to load from this file.
I was currently trying to use something along the following lines.
```
FileStream stream = new F... | [
0.23826497793197632,
-0.13865149021148682,
0.6074315905570984,
-0.10844364017248154,
-0.026193710044026375,
0.17129340767860413,
0.43644779920578003,
-0.1644093543291092,
-0.3584688901901245,
-1.0359100103378296,
-0.33295732736587524,
0.6582906246185303,
-0.3162996172904968,
0.248092055320... | |
and a bunch more Properties. So my problem is that TextRange.Load() reads to the end of the file...making it impossible for me to use that considering I have 2 TextRanges I need to save/load.
So here I am trying to come up with another way to be able to save/load the content of a RichTextBox with other data. I dont hav... | [
0.3927728235721588,
0.06620089709758759,
0.22603975236415863,
0.25740164518356323,
-0.10512927174568176,
-0.12144244462251663,
0.3717992305755615,
0.2939889430999756,
-0.2996470332145691,
-0.7791197299957275,
0.03771379962563515,
0.6035228967666626,
0.03216080367565155,
-0.1308264583349228... | |
file into memory
* Load the section of that file that is the contents of the richtextbox into a MemoryStream
* Load the richtextbox contents from that MemoryStream
Or are you wanting to know how you'd create and parse a file to contain different sections for the title, and the contents, and any other fields ? | [
0.40867164731025696,
0.0503184050321579,
0.01941562071442604,
0.2652120292186737,
0.39008069038391113,
-0.03814510628581047,
0.037548914551734924,
0.28704485297203064,
-0.19852983951568604,
-0.4826394021511078,
-0.04692805930972099,
0.38879936933517456,
-0.3853250741958618,
0.0656540021300... | |
I have the following codes to create chart graphics by dojox.charting:
```
function createChart() {
var node = dojo.byId("surfaceDiv");
while (node.hasChildNodes())
{
node.removeChild(node.lastChild); // remove all the children graphics
}
var nodes = "<div id='chart1' style='width: 10px; height: 10px;'>... | [
-0.12105526775121689,
-0.015424669720232487,
0.9389150738716125,
0.04376380890607834,
0.012234710156917572,
0.36540430784225464,
0.2765389084815979,
-0.33095064759254456,
-0.20034416019916534,
-1.0887954235076904,
0.024360982701182365,
0.3118552267551422,
0.06821869313716888,
0.26199299097... | |
the first call; however, if it is called again, the chart is displayed OK, but the legend is not displayed. In firebug, I noticed there is an error saying "Tried to register widget with id==legend1 but that id is already registered" in manager.xd.js (line 8). It looks like that somewhere in dojox's library cached the p... | [
0.34331634640693665,
-0.20270287990570068,
0.586758553981781,
-0.04747910797595978,
-0.19448894262313843,
-0.28700169920921326,
0.42494136095046997,
-0.22467361390590668,
-0.3615933358669281,
-0.6495600938796997,
0.019264454022049904,
0.664170503616333,
-0.20262646675109863,
0.243288397789... | |
node with id="surfaceDiv", and the legend node" is the next div with id="legendDiv". Therefore, the above function can be called again.
I think that is a bug in dojox.charting.widget.Legend(...). What I did was to clean all the graphics and legend dom elements under div "surfaceDiv", and add new div "chart1" for chart ... | [
0.009381935000419617,
-0.3219118118286133,
0.7767373919487,
0.11976514011621475,
-0.18265914916992188,
-0.0195242241024971,
0.07280375808477402,
-0.18610642850399017,
-0.12491283565759659,
-0.9487894177436829,
0.20636293292045593,
0.6838687062263489,
0.128753662109375,
0.2725197374820709,
... | |
and legend were displayed but the legend was missing in the subsequent calls or clicks.
To work around the problem or bug, I have to set legend ID dynamically with different values. Any cached legend id value within dojox.charting.widget.Legend(...) will not be conflict with new ids. Here is the codes:
```
var legend... | [
0.1924395114183426,
-0.002393027301877737,
0.61273193359375,
0.2818167507648468,
0.08901515603065491,
0.21379618346691132,
0.36828088760375977,
-0.18263371288776398,
-0.19021597504615784,
-0.7804474234580994,
-0.09564827382564545,
0.2195369005203247,
0.36796432733535767,
0.6394371390342712... | |
"<div id='" + legendID + "' ></div>"; // Set legend ID dynamically
dojo.html.set(node, nodes);
var nodeChart = dojo.byId("chart1");
var nodeLegend = dojo.byId(legendID);
var chart1 = new dojox.charting.Chart2D(nodeChart);
// set chart types and point series
chart1.render();
// now to add legend:
var le... | [
-0.048598069697618484,
-0.2816675007343292,
1.0092436075210571,
0.11989977955818176,
-0.14369754493236542,
0.2702831029891968,
0.48219260573387146,
-0.4967085123062134,
-0.5755550265312195,
-0.8518620729446411,
-0.06644553691148758,
0.2885225713253021,
0.052188605070114136,
0.2783434092998... | |
If i try with BitConverter,it requires a byte array and i don't have that.I have a Int32 and i want to convert it to UInt32.
In C++ there was no problem with that.
A simple cast is all you need. Since it's possible to lose precision doing this, the conversion is explicit.
```
long x = 10;
ulong y = (ulong)x;
``` | [
-0.01600276678800583,
0.1546010673046112,
0.35021543502807617,
-0.4242980182170868,
-0.14861081540584564,
0.23075611889362335,
0.1588011234998703,
-0.09546349942684174,
0.01779610849916935,
-0.517514169216156,
-0.004960124846547842,
0.6027461290359497,
-0.4740852415561676,
0.02110408060252... | |
I have an attributeGroup defined in my XSD schema. From what I've read and tried out, there is no way I could specify the optionality of the usage of whole group (so that either all of the attributes are specified, or none), something like:
```
<xs:attributeGroup name="NameDesc">
<xs:attribute name="n" type="xs:s... | [
0.17796194553375244,
0.037930916994810104,
0.30540403723716736,
-0.06595349311828613,
-0.1191667690873146,
-0.2488246113061905,
0.035822123289108276,
-0.23476681113243103,
0.00458190031349659,
-0.40919509530067444,
0.008858018554747105,
0.6332536935806274,
-0.22204890847206116,
-0.07047194... | |
way to achieve this?
I've read [How to make "use" attribute (required/optional) depend on another value?](https://stackoverflow.com/questions/511148/xsd-how-to-depend-the-use-attribute-required-optional-with-the-other-value), but I'm not sure this applies to my case.
As far as I know (someone please correct me if I'm ... | [
0.39110779762268066,
-0.2664707899093628,
0.1721600592136383,
0.15205830335617065,
0.23539261519908905,
-0.13467223942279816,
-0.015374302864074707,
-0.06624175608158112,
-0.1332962065935135,
-0.33433499932289124,
0.14172965288162231,
0.7736356258392334,
-0.13731350004673004,
-0.2141630053... | |
In VC++ 2003, I could just save the source file as UTF-8 and all strings were used as is. In other words, the following code would print the strings as is to the console. If the source file was saved as UTF-8 then the output would be UTF-8.
```
printf("Chinese (Traditional)");
printf("中国語 (繁体)");
printf("중국어 (번체)");
p... | [
-0.494157075881958,
0.07421774417161942,
0.683047890663147,
-0.34114041924476624,
-0.392255574464798,
0.14863651990890503,
0.21667876839637756,
-0.16407150030136108,
-0.029474375769495964,
-0.406197190284729,
-0.36659684777259827,
0.685488760471344,
-0.24413858354091644,
-0.156819045543670... | |
causing these warnings are corrupted. The ones that do fit the locale (in this case 932 = Japanese) are converted to the locale encoding, i.e. Shift-JIS.
I cannot find a way to get VC++ 2008 to compile this for me. Note that it doesn't matter what locale I use in the source file. There doesn't appear to be a locale th... | [
0.06226135790348053,
0.20435981452465057,
0.09168549627065659,
-0.27851882576942444,
-0.0640580877661705,
-0.11838698387145996,
0.806350827217102,
0.1475803703069687,
-0.1562618464231491,
-0.4210807681083679,
-0.23195016384124756,
0.34335893392562866,
-0.49841025471687317,
0.11482140421867... | |
still 932)
```
It appears that VC2008 forces all characters into the specified (or default) locale, and that locale cannot be UTF-8. I do not want to change the file to use escape strings like "\xbf\x11..." because the same source is compiled using gcc which can quite happily deal with UTF-8 files.
Is there any way ... | [
-0.04826615750789642,
0.46102213859558105,
0.20858845114707947,
-0.20069482922554016,
0.1734408140182495,
0.21854586899280548,
0.43624773621559143,
-0.07481170445680618,
-0.20290611684322357,
-0.488630086183548,
-0.22644025087356567,
0.3027891516685486,
-0.2116258442401886,
0.1463929563760... | |
are.
**Update**
Thanks for the suggestions, but I want to avoid wchar. Since this app deals with strings in UTF-8 exclusively, using wchar would then require me to convert all strings back into UTF-8 which should be unnecessary. All input, output and internal processing is in UTF-8. It is a simple app that works fine... | [
0.17177025973796844,
-0.1460057646036148,
0.4784853458404541,
-0.02444096840918064,
-0.15925587713718414,
-0.045042987912893295,
0.4836767911911011,
-0.11089280247688293,
-0.024506818503141403,
-1.070784091949463,
-0.38802433013916016,
0.5185227990150452,
-0.638261079788208,
0.142429828643... | |
VC2008 to be backward compatible with VC2003. I want a locale or compiler setting that says strings are used as is, essentially as opaque arrays of char, or as UTF-8. It looks like I might be stuck with VC2003 and gcc though, VC2008 is trying to be too smart in this instance.
Update:
I've decided that there is no guar... | [
-0.0878172218799591,
0.031308162957429886,
0.3620162904262543,
-0.027216963469982147,
-0.12012089788913727,
-0.1895839422941208,
0.5501318573951721,
-0.0671345442533493,
-0.2040238380432129,
-0.53916335105896,
-0.00007578845543321222,
0.4988066256046295,
-0.3967607617378235,
0.127450197935... | |
declaring everything as L"" strings didn't work (and is painful in gcc as described below).
Instead I believe that you just need to bite the bullet and move all text into a data file and load it from there. I am now storing and accessing the text in INI files via [SimpleIni](http://code.jellycan.com/simpleini/) (cros... | [
0.4020875096321106,
-0.022662697359919548,
0.0737660676240921,
-0.15181967616081238,
-0.006235372740775347,
0.010725845582783222,
0.6421399116516113,
0.10607632249593735,
-0.09887818992137909,
-0.4927680790424347,
-0.3130311071872711,
0.40763750672340393,
-0.5333299040794373,
0.06970934569... | |
as this is not about internationalization, nor a misunderstanding of Unicode, character encodings. I appreciate your attempt to help though, apologies if I wasn't clear enough.
The problem is that I have source files that need to be cross-compiled under a variety of platforms and compilers. The program does UTF-8 proc... | [
0.17918714880943298,
0.07995142787694931,
0.0985599011182785,
0.0761336013674736,
-0.27438485622406006,
-0.36240053176879883,
0.3376251757144928,
0.05060669034719467,
-0.2832253873348236,
-0.6483653783798218,
-0.27213385701179504,
0.5032592415809631,
-0.25575289130210876,
-0.00512196775525... | |
UTF-8 encoded source files
* source files must not have a UTF-8 BOM
vc2003:
* string literals are used as is (raw strings)
* supports UTF-8 encoded source files
* source files may or may not have a UTF-8 BOM (it doesn't matter)
vc2005+:
* string literals are massaged by the compiler (no raw strings)
* char string l... | [
0.0011449833400547504,
-0.09282246977090836,
0.4493330419063568,
0.039495766162872314,
-0.20779678225517273,
0.044399287551641464,
0.6144523024559021,
-0.1658332198858261,
-0.14516671001911163,
-0.5206702351570129,
-0.40611666440963745,
0.49303463101387024,
-0.3964349925518036,
0.038214575... | |
into the compiled program is via UTF-8 + BOM + wchar which means that I need to convert all strings back to UTF-8 at time of use.
There isn't any simple cross-platform method of converting wchar to UTF-8, for instance, what size and encoding is the wchar in? On Windows, UTF-16. On other platforms? It varies. See the [... | [
0.22496667504310608,
0.3772130608558655,
0.6275792717933655,
-0.3064255118370056,
-0.26878821849823,
-0.0015616569435223937,
0.3815160393714905,
-0.31798145174980164,
-0.06999696791172028,
-0.5671677589416504,
-0.29367896914482117,
0.5719488263130188,
-0.3032136559486389,
0.130861401557922... | |
UTF-8, and all strings
// to be encoded as wchar_t otherwise the strings will be converted into the
// local multibyte encoding and cause errors. To use a wchar_t as UTF-8, these
// strings then need to be convert back to UTF-8. This function is just a rough
// example of how to do this.
# define utf8(str) Convert... | [
0.26278063654899597,
-0.1114262118935585,
0.6494636535644531,
-0.3517744839191437,
-0.12183616310358047,
-0.113899365067482,
0.34374019503593445,
-0.3113376200199127,
-0.08164143562316895,
-0.5263277888298035,
-0.22517547011375427,
0.700812041759491,
-0.6571947932243347,
0.1625226885080337... | |
so the files
// should be saved as UTF-8. gcc requires the files to not have a UTF-8 BOM.
# define utf8(str) str
#endif
```
Note that this code is just a simplified example. Production use would need to clean it up in a variety of ways (thread-safety, error checking, buffer size checks, etc).
This is used like the... | [
-0.028599020093679428,
0.20765797793865204,
0.4377999007701874,
-0.017625903710722923,
-0.12582772970199585,
0.0009688346181064844,
0.32768934965133667,
-0.14336241781711578,
-0.16431069374084473,
-0.4565789997577667,
-0.313198983669281,
0.36449652910232544,
-0.14851389825344086,
0.1439496... | |
I'm using [jQuery Countdown plugin](http://keith-wood.name/countdown.html) to implement a Countdown and call a webservice when timer expires.
The problem is that I'm using AJAX on the page, and have to re-setup the Countdown on every AJAX request like so:
```
var prm = Sys.WebForms.PageRequestManager.getInstance();
... | [
0.11726272106170654,
-0.05713643133640289,
0.9241498112678528,
-0.22342965006828308,
0.16439051926136017,
0.16840015351772308,
0.18222405016422272,
-0.2789466679096222,
-0.44153937697410583,
-0.6208240389823914,
-0.3214890956878662,
0.7095507979393005,
-0.1430382877588272,
0.06165857985615... | |
$('#timer').countdown('destroy'); /*should work, but doesn't*/
$('#timer').countdown({ until: cutoffTime, serverTime: serverTime, onExpiry: OrderingEnded, format: 'yowdHMS' });
}
else
OrderingEnded();
}
```
This, for some reason, creates a new instance of the Countdown on ... | [
0.2571389973163605,
0.11521954089403152,
0.7929218411445618,
-0.08400222659111023,
0.47585979104042053,
-0.05636781454086304,
0.42785632610321045,
0.003513011382892728,
-0.1781071573495865,
-0.6839179992675781,
-0.484665185213089,
0.7642833590507507,
-0.5434273481369019,
0.361141562461853,... | |
time?**
### EDIT
found this in documentation, doesn't do it for me though
```
$('#timer').countdown('destroy');
```
ok, figured it out, just needed to call the
```
$('#timer').countdown('destroy');
```
on beginRequest
```
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(Del... | [
0.11905565112829208,
-0.2280915081501007,
1.0747689008712769,
-0.3069038689136505,
0.3926866054534912,
0.1376451700925827,
0.1878136545419693,
-0.43539416790008545,
-0.31470003724098206,
-0.5709224939346313,
-0.5054889917373657,
0.6703295111656189,
-0.3068668246269226,
0.4035343825817108,
... | |
'yowdHMS' });
}
else
OrderingEnded();
}
``` | [
-0.0032587393652647734,
0.34671956300735474,
0.37600284814834595,
-0.6390126347541809,
-0.060058485716581345,
0.022412998601794243,
0.3486310541629791,
-0.054935529828071594,
-0.2315627485513687,
-0.3984905481338501,
-0.5775330662727356,
0.6816929578781128,
-0.5260809659957886,
0.462924420... | |
i am getting this error
```
Unexpected error encountered while preparing for the operation.
org.eclipse.core.runtime.AssertionFailException
```
and in the detail window
```
Unexpected error encountered while preparing for the operation.
null argument:
```
when i am try to update from this site
<http://mantis... | [
0.6123822331428528,
0.09522885084152222,
0.22450508177280426,
-0.3321220874786377,
-0.15821221470832825,
0.17410989105701447,
0.24462512135505676,
-0.43322646617889404,
-0.018134649842977524,
-0.7923887372016907,
0.05460849404335022,
1.0866142511367798,
-0.2591223120689392,
-0.227547124028... | |
from "template" and then do the install in there.
After the install, I copy the new files under "plugins" and "features" to my work installation into the directory `eclipse/dropins/` + name of the plugin. See [my blog](http://blog.pdark.de/2008/09/29/installing-eclipse-341-despite-p2/) for details. | [
0.7933543920516968,
0.02819225937128067,
0.17597061395645142,
-0.1911230981349945,
-0.01848760060966015,
-0.20505675673484802,
0.056975070387125015,
-0.20987626910209656,
-0.07588442414999008,
-0.4832567274570465,
-0.22813786566257477,
0.8644803166389465,
0.02117636613547802,
-0.3747501373... | |
In iPhone Developer Program Portal, there's a video to demonstrate how to create a development certificate and assign a private key
Now I have finished the development process and starting to distribute
I have created a "Distribution Certificate", but how do I assign a private key to this certificate?
As it got the... | [
0.22476401925086975,
0.28182536363601685,
0.09192751348018646,
0.12063853442668915,
0.21075432002544403,
-0.21447569131851196,
0.1020873486995697,
-0.0057676611468195915,
-0.18512392044067383,
-0.45640799403190613,
-0.10314509272575378,
0.5632948875427246,
-0.23282812535762787,
-0.07224950... | |
thanks.
Read the [Maintain Signing Assets](https://help.apple.com/xcode/mac/current/#/dev3a05256b8) section of the Xcode Help site. It explains step-by-step what you will need to do, in the correct order.
> Before you can code sign your app, you create your development certificate and later, a distribution certificate... | [
0.6390582323074341,
0.46358615159988403,
0.2780311703681946,
0.1108282059431076,
0.4024757444858551,
-0.37625744938850403,
0.49574923515319824,
-0.19121813774108887,
0.05682247504591942,
-0.8123630285263062,
-0.24233879148960114,
0.4282337427139282,
0.10616907477378845,
-0.1763157993555069... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.