text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Form form = new Form();
form.Controls.Add(btn);
ToolTip ttip = new ToolTip();
ttip.SetToolTip(btn, "Hello world");
Application.Run(form);
}
```
---
re the comment; then just something like:
```
form.Shown += delegate {
ttip.Show("hi", form, 0,0, 3000);
};
```
(where `form` ... | [
0.233749657869339,
-0.20574535429477692,
0.7624430060386658,
-0.25679582357406616,
-0.149789497256279,
-0.11094639450311661,
0.4062578082084656,
-0.33825525641441345,
-0.10361045598983765,
-0.6974515914916992,
-0.7151485085487366,
0.26372528076171875,
-0.4893217980861664,
0.014224756509065... | |
I have some DLLs that it would be much easier to use .net 3.5 internally (to take advantage of Linq, etc). I want to use these DLL with asp.net websites that are currently running asp.net 2.0.
Is this scenario possible? Are there any restrictions or gotchas (e.g. asp.net doesn't make any calls to methods which return... | [
0.26199445128440857,
0.023669622838497162,
0.4215707778930664,
0.073045514523983,
-0.30367961525917053,
-0.3974391520023346,
0.24829678237438202,
-0.03390287235379219,
-0.16381852328777313,
-0.563263475894928,
0.03238584101200104,
0.48875686526298523,
-0.3873794674873352,
-0.00749923428520... | |
be if the web site would not run with .NET 2.0 SP2.
This is very different from the way it used to be - installing .NET 1.1 on a .NET 1.0 web site I was responsible for broke the web site, even though the web site wasn't using 1.1 - I had installed 1.1 so I could use a particular tool. The upgrade from .NET 1.1 to .NE... | [
0.4515743851661682,
-0.3294352889060974,
0.06786622852087021,
-0.15577496588230133,
-0.013587784953415394,
-0.2955031096935272,
0.32752394676208496,
-0.2659653425216675,
0.34133726358413696,
-0.827672004699707,
-0.3968045115470886,
0.8113830089569092,
-0.5652104020118713,
0.004104734864085... | |
are often surprised to look at the IIS settings and see that their web sites still show as running .NET 2.0. But it's the exact same .NET 2.0, just with two service packs applied. Any site that doesn't use the new assemblies can't be affected at all (beyond what a service pack might do).
To further reiterate what has ... | [
0.6311076879501343,
0.11280030012130737,
0.04627014324069023,
-0.015109202824532986,
-0.19809451699256897,
-0.45958882570266724,
0.30846917629241943,
-0.13327094912528992,
-0.2303866595029831,
-0.3864254951477051,
0.0116981016471982,
0.6972131133079529,
-0.5528134107589722,
-0.157990112900... | |
I would like to output variables and values out in a [PowerShell](http://en.wikipedia.org/wiki/Windows_PowerShell) script by setting up flags and seeing the data matriculate throughout the script.
How would I do this?
For example, what would be the PowerShell equivalent to the following PHP code?
```
echo "filesi... | [
0.08761054277420044,
-0.10443664342164993,
0.5820343494415283,
0.03392260894179344,
0.09474093466997147,
0.0978674441576004,
0.11980491131544113,
-0.17824113368988037,
-0.07665538042783737,
-0.4763789176940918,
-0.4179898798465729,
0.44697824120521545,
-0.2763476073741913,
-0.0113411294296... | |
information, `Write-Debug` for debugging (so would seem to fit in this case).
**Additional**: In PSH2 (at least) scripts using cmdlet binding will automatically get the `-Verbose` and `-Debug` switch parameters, locally enabling `Write-Verbose` and `Write-Debug` (i.e. overriding the preference variables) as compiled c... | [
-0.09749633818864822,
0.08910119533538818,
0.28300535678863525,
0.04330676794052124,
-0.18789319694042206,
-0.23979420959949493,
0.14542537927627563,
0.2297169417142868,
-0.3126317858695984,
-0.58769291639328,
-0.5870094299316406,
0.5353409647941589,
-0.01680670864880085,
-0.16140514612197... | |
We are trying to come up with a numbering system for the asset system that we are creating, there has been a few heated discussions on this topic in the office so I decided to ask the experts of SO.
Considering the database design below what would be the better option.
... | [
0.31592729687690735,
0.23240984976291656,
0.2590475380420685,
0.06495127826929092,
-0.041176628321409225,
0.1975419968366623,
-0.18251073360443115,
-0.2823917865753174,
-0.3822248578071594,
-0.5157589912414551,
0.060250651091337204,
0.6957336068153381,
-0.0798206701874733,
0.12545074522495... | |
==================
"RD00000001WCK" "00000001.1"
```
(the `00000001.1` means it's the **first** segment of the road. This *increases* everytime you add a new segment e.g. `00000001.2`)
**Example 3:** Using a bit of both(adding a new column)
```
======================= ==========================
ID(PK) Road_N... | [
0.3205552399158478,
0.4972561299800873,
0.36535558104515076,
-0.19185268878936768,
-0.27027568221092224,
0.3379472494125366,
0.05230187997221947,
-0.2380816638469696,
-0.4455929398536682,
-0.5258470773696899,
-0.1314859390258789,
0.28344836831092834,
0.1521328091621399,
0.3110257685184479,... | |
have always liked keeping things simple so I *prefer* example 1, but I have been reading that you should not expose your primary keys in reports/documents. So now I'm thinking more along the lines of example 3.
I am also leaning towards example 3 because if we decide to change how our asset numbering is generated it ... | [
0.43062156438827515,
-0.25133976340293884,
-0.12316688150167465,
0.20649103820323944,
-0.28291523456573486,
-0.2467823028564453,
0.3381913900375366,
-0.02578340284526348,
-0.3946838974952698,
-0.3804200291633606,
0.051627788692712784,
0.517072319984436,
-0.20137429237365723,
0.041417755186... | |
subject that has been extensively covered. I covered this in [Database Development Mistakes Made by AppDevelopers](https://stackoverflow.com/questions/621884/database-development-mistakes-made-by-appdevelopers/621891#621891).
> Natural keys are keys based on
> externally meaningful data that is
> (ostensibly) unique... | [
0.28037622570991516,
0.07829823344945908,
-0.1960882842540741,
0.38202229142189026,
0.2679360508918762,
-0.05709517374634743,
0.043128106743097305,
0.029404601082205772,
-0.3646864593029022,
-0.24663448333740234,
-0.4863297641277313,
0.3239566385746002,
-0.10478553920984268,
0.327988833189... | |
**always**
> use surrogate keys. This issue has
> come up in these questions:
>
>
> * [How do you like your primary keys?](https://stackoverflow.com/questions/404040/how-do-you-like-your-primary-keys)
> * [What’s the best practice for Primary Keys in tables?](https://stackoverflow.com/questions/337503/whats-the-bes... | [
0.03596651181578636,
-0.14086873829364777,
0.6748625636100769,
0.09181582927703857,
0.2686946988105774,
-0.1260671615600586,
0.013405254110693932,
-0.20756930112838745,
-0.33023732900619507,
-0.4158553183078766,
-0.2774648070335388,
0.8414835333824158,
-0.13533343374729156,
-0.239232659339... | |
I have a `DataTable resultSet;` - I'm trying to check fields for null, but get an '{}' (empty-set ?) object back. Searches involving "{}" aren't yielding any appropriate solutions.
This is the code that isn't working as expected when the "fk\_id" field is null:
```
if (resultSet.Rows[0].ItemArray[resultSet.Columns.In... | [
-0.1795566827058792,
0.24418208003044128,
0.3441314399242401,
-0.022476820275187492,
-0.25131145119667053,
-0.0940827950835228,
0.45990675687789917,
-0.2893444895744324,
-0.08409061282873154,
-0.640837550163269,
0.000502798764500767,
0.003448778996244073,
-0.2157328724861145,
0.54683369398... | |
"database NULL" value - they use [DBNull.Value](http://msdn.microsoft.com/en-us/library/system.dbnull.value.aspx). If you need your code to work the way you've presented it, try this:
```
if (resultSet.Rows[0].ItemArray[resultSet.Columns.IndexOf("fk_id")] == DBNull.Value)
``` | [
-0.12180446833372116,
-0.030188921838998795,
0.47148892283439636,
-0.08387269824743271,
-0.16248859465122223,
-0.09502135962247849,
0.2121330350637436,
-0.13072744011878967,
-0.2702835500240326,
-0.4760548770427704,
-0.029494505375623703,
0.04190417751669884,
-0.32840192317962646,
0.556675... | |
I'm working on a homework project and i'm trying to store inventory data into a file.
The inventory data size shouldn't be too large cause technically no one is going to really use it.
**I need to write these contents to a file:**
• Item Description
• Quantity on Hand
• Wholesale Cost
• Retail Cost
• Date Added t... | [
0.4531080424785614,
0.13003914058208466,
0.16764210164546967,
-0.05675213038921356,
-0.0031132311560213566,
0.14268217980861664,
0.12600106000900269,
-0.16004088521003723,
-0.4855445921421051,
-0.7444964647293091,
0.12860795855522156,
0.436160683631897,
0.06892313808202744,
0.0832129269838... | |
If I can just figure out how to read / write structs to a file this should be really easy.
If you could provide a small example on how to do this I would really appreciate it.
Thanks!
**IOStream library** does it
> The [ofstream](http://www.cplusplus.com/reference/iostream/ofstream/) class provides the interface to ... | [
0.2522173523902893,
-0.14851240813732147,
0.581275463104248,
0.20896518230438232,
0.05405877158045769,
-0.10947129875421524,
-0.04710132256150246,
0.2134048044681549,
-0.17415551841259003,
-0.7163264155387878,
-0.0011073375353589654,
0.6314501166343689,
-0.31530705094337463,
-0.18216824531... | |
C#: How do you disable a key from being pressed indefinetly in textbox's keydown event?
The standard way to handle that is to create an event handler for the `Textbox.KeyDown` event and then set `KeyEventArgs.SuppressKeyPress` to true if the key pressed matches the key you want to disable. Here is an example:
```
your... | [
0.2280406951904297,
-0.11987542361021042,
0.06088865175843239,
-0.1709631383419037,
0.16415177285671234,
-0.3984045684337616,
0.4185469150543213,
-0.39544180035591125,
-0.0806799829006195,
-0.21780964732170105,
-0.6696373820304871,
0.8041388988494873,
-0.5044293999671936,
-0.02681252360343... | |
In C++ templates, one can specify that a certain type parameter is a default. I.e. unless explicitly specified, it will use type T.
Can this be done or approximated in C#?
I'm looking for something like:
```
public class MyTemplate<T1, T2=string> {}
```
So that an instance of the type that doesn't explicitly spec... | [
0.36452600359916687,
0.01223821472376585,
0.1990523487329483,
-0.2262779325246811,
-0.0032257256098091602,
-0.04170728474855423,
-0.05943065136671066,
-0.2576068639755249,
0.02629246562719345,
-0.5950222015380859,
-0.05938943475484848,
0.8919286131858826,
-0.5499971508979797,
-0.1888764053... | |
other options in this vein.
Subclassing is the best option.
I would subclass your main generic class:
`class BaseGeneric<T,U>`
with a specific class
`class MyGeneric<T> : BaseGeneric<T, string>`
This makes it easy to keep your logic in one place (the base class), but also easy to provide both usage options. Dep... | [
0.03642554208636284,
-0.28547295928001404,
-0.06855347752571106,
0.17861588299274445,
-0.18591360747814178,
-0.07315723598003387,
0.21855583786964417,
0.029880711808800697,
-0.15161339938640594,
-0.6732162833213806,
0.060970332473516464,
0.661804735660553,
-0.13829202950000763,
0.146757468... | |
I tried to create a dropdown menu in JQuery, but it's proving quite difficult.
My code is here:
```
$(document).ready(function(){
$('ul li').mouseover(function()
{
$(this).children("ul").show();
});
$('ul li ul').mouseover(function()
{
$('ul li u... | [
-0.03294484689831734,
-0.10864325612783432,
0.6916060447692871,
-0.4220903217792511,
0.26209160685539246,
0.25719302892684937,
0.021791735664010048,
-0.028665147721767426,
0.14158551394939423,
-0.5679379105567932,
-0.5492613911628723,
0.6680693030357361,
-0.35623791813850403,
0.12873196601... | |
}).mouseout(function(){
$('ul li ul').hide();
});
});
```
Basically I want to hover over a list item and the sub ul to drop down, then I can hover over the list items and If the mouse goes off of the sub nav, the menu hides again.
thanks,
Keith
UPDATE: I removed the border from the CSS and ... | [
0.10407305508852005,
-0.38329657912254333,
0.6164161562919617,
-0.2237648367881775,
0.0912737026810646,
-0.14359042048454285,
0.40125495195388794,
0.17458130419254303,
-0.42148205637931824,
-0.8400779962539673,
-0.07426752150058746,
0.6739232540130615,
-0.4968857765197754,
0.03657590970396... | |
with excellent cross-browser support. It definitely doesn't have the problem you are experiencing. I haven't checked the source code, but the key difference is that it adds a delay on mouseout. This means that an action isn't triggered, unless the position of the cursor is steady for some time (default delay is 800ms).... | [
-0.2479979693889618,
-0.40312623977661133,
0.5797106027603149,
0.0014626759802922606,
0.0014886698918417096,
-0.22198714315891266,
0.6829771399497986,
-0.09657160192728043,
-0.41343092918395996,
-0.5004076361656189,
-0.12075646221637726,
0.7160156965255737,
-0.1632913202047348,
-0.09941603... | |
I've tentatively written this method:
```
public static Func<T> WeakCacheFor<T>( Func<T> provider ) where T: class
{
var cache = new WeakReference(null);
return () => {
var x = (T)cache.Target;
if( x == null )
{
x = provider();
cache.Target = x;
} | [
-0.01924797333776951,
-0.5101142525672913,
0.40590113401412964,
-0.07150724530220032,
-0.17136557400226593,
0.12046758085489273,
0.2545175552368164,
-0.07509928196668625,
-0.10191205143928528,
-0.6293500661849976,
-0.261726051568985,
0.34520423412323,
-0.31923678517341614,
0.32075408101081... | |
return x;
};
}
```
So a bit of background:
I have some long-winded legacy methods which look a bit like this:
```
var id = GetDatabaseId();
if(a){
var data = GetLoader().Init(id).GetData(); // expensive!
// do stuff with data
}
if(b){
// don't load data
}
... lots more variations, some contain GetLo... | [
0.17872267961502075,
-0.24096953868865967,
0.3639537990093231,
-0.09114108979701996,
0.1563338041305542,
-0.17291851341724396,
0.4247526228427887,
-0.2969703674316406,
-0.3447020649909973,
-0.3697591722011566,
-0.2952883541584015,
0.5486633777618408,
-0.5264304280281067,
0.2003137320280075... | |
loadData(); some don't....
```
My thoughts about this:
* I don't need to cache beyond the scope of this method call, so it's fine if the GC collects it as soon as the method returns
* If the code takes a path which doesn't need to load the data, the hit won't be incurred
* If it does need the data it will be cached ... | [
0.23250813782215118,
-0.04490334168076515,
0.3306269943714142,
0.16768085956573486,
0.0003451249503996223,
-0.1922924965620041,
0.15274477005004883,
-0.1421113908290863,
-0.23256756365299225,
-0.5120841860771179,
-0.029848987236618996,
0.6966068148612976,
-0.2848697006702423,
-0.0906764417... | |
might cause a strong reference to inadvertenly be held?
2. Am I being too clever for my own good? - Should I just incur the hit and cache the data in a normal local variable even if it's not needed?
I suspect I may be being too clever, but even if I am, does this seem to anyone else like a solution which can be useful... | [
-0.12745805084705353,
-0.0072742486372590065,
0.3437687158584595,
0.1497182548046112,
-0.016197143122553825,
-0.26377353072166443,
0.49778422713279724,
-0.18756523728370667,
-0.14844176173210144,
-0.1980046033859253,
0.008589768782258034,
0.5908403396606445,
-0.16304583847522736,
-0.140991... | |
all and a normal ref will work just fine. I Was suffering from a case of "can't see the forest for the trees" I think.
I don't see any point in using a weak reference. Once you have loaded the data there is hardly any reason to throw it away until you are sure that it's not useful any more.
What you are implementing i... | [
0.4701693058013916,
-0.004898009821772575,
0.1564842313528061,
-0.02238072082400322,
-0.3326375186443329,
-0.19076992571353912,
0.29364433884620667,
-0.16051335632801056,
-0.20395509898662567,
-0.509436309337616,
-0.13623544573783875,
0.8756586909294128,
-0.5628340244293213,
0.156157523393... | |
return () => {
if (item == null) {
item = provider();
}
return item;
};
}
```
(And a small tip: You are using the `var` keyword way too much.) | [
0.2202596515417099,
-0.35058000683784485,
0.37193191051483154,
-0.04407075047492981,
-0.03609393537044525,
0.07439500093460083,
0.440087229013443,
-0.3403054177761078,
-0.052815958857536316,
-0.2936750650405884,
-0.2753998637199402,
0.6040176153182983,
-0.15003053843975067,
0.2635985314846... | |
I often find myself needing a tool that would allow me to:
search for multiple multi-line regex patterns in a large file and replace them using back-referencing.
Should I:
1. take the 2 hours it'll require to build myself such a tool
2. use something someone has already built (please suggest)
3. learn to use a langu... | [
0.619567334651947,
0.30076083540916443,
0.40458688139915466,
0.11564404517412186,
0.10343236476182938,
0.06820227950811386,
0.36170676350593567,
-0.15478642284870148,
-0.12277261167764664,
-0.7316657304763794,
0.07682501524686813,
0.1654672622680664,
0.021762609481811523,
-0.08337575197219... | |
entries except for the value string part. Either this tool would need to be able to loop through once for every value or just once with 100 OR terms (|) in the expression (it would be huge). In this case I'm replacing the matches with a blank but in other cases, I'd reformat the text and re-insert the value field.
I re... | [
0.2753455340862274,
0.1554287075996399,
0.7553609013557434,
-0.028004862368106842,
-0.15766818821430206,
-0.01817270554602146,
0.4404994249343872,
-0.46528592705726624,
-0.1642279326915741,
-0.5337568521499634,
-0.11090080440044403,
0.5257587432861328,
-0.29398518800735474,
0.0034601273946... | |
line
match = exp.search (xml_line)
# print out the groups the regex found
print match.groups ()
```
N.B. You could also use [python XML parsing libraries](http://www.diveintopython.org/xml_processing/) to strip out the elements you don't want. Using the python XMl parsing simplifies some of the complexity that I have... | [
-0.12105964869260788,
-0.17513741552829742,
0.25618740916252136,
0.04352094605565071,
-0.39981207251548767,
0.014613104052841663,
0.054552674293518066,
-0.3973986804485321,
-0.14781367778778076,
-0.48514264822006226,
-0.23627232015132904,
0.28714364767074585,
-0.4955589771270752,
-0.172041... | |
Just want to know if there's a tutorial or a how-to for serializing objects, putting them into a stream over network, and deserialize it on the other side. I understand the principles of serialization, I/O, streams, sockets, and so on, I just would like an example of a client sending an object to a server to start with... | [
0.5581825375556946,
0.02873539738357067,
0.18697811663150787,
0.2581455409526825,
-0.2548098564147949,
-0.08805326372385025,
0.14264392852783203,
0.2745247483253479,
-0.3243025839328766,
-0.4808909595012665,
-0.02765507996082306,
0.2526291012763977,
0.0690632313489914,
0.36942246556282043,... | |
I think that's precisely what you want. | [
0.4327467679977417,
0.37303149700164795,
-0.12282051146030426,
0.03599204868078232,
0.09323710203170776,
0.11389784514904022,
-0.03408846631646156,
0.12152229994535446,
-0.08436425775289536,
-0.12433048337697983,
0.20457185804843903,
0.5063248872756958,
0.07716655731201172,
0.2460889518260... | |
I'm using Apache2, and when reloading/restarting the server I get this warning:
`apache2: Could not reliably determine the server's fully qualified domain name, using (my FQDN) for ServerName`
Everything works fine, but I'm trying to figure out what's causing the error. I'm grabbing the source to see if can find it, ... | [
0.09460768103599548,
0.4412621259689331,
0.22125113010406494,
-0.07990772277116776,
-0.18712326884269714,
-0.45096832513809204,
0.6608425974845886,
0.11343483626842499,
-0.20887944102287292,
-0.5982170104980469,
-0.024603260681033134,
0.3215392827987671,
-0.27368736267089844,
0.43237528204... | |
is correct
Versions:
```
Apache/2.2.9
Linux 2.6.24-23-xen x86_64
Description: Debian GNU/Linux 5.0 (lenny)
```
Any ideas?
Are you sure you have a `ServerName` directive with the proper value - outside any `<VirtualHost>` blocks? (You also need a `ServerName` inside each `<VirtualHost>` block, of course)
When A... | [
0.47716477513313293,
0.193551167845726,
0.5586369633674622,
-0.018499407917261124,
0.0671190470457077,
-0.7044692039489746,
0.4554606080055237,
0.10650177299976349,
-0.23636798560619354,
-0.5938198566436768,
-0.26634085178375244,
0.6030317544937134,
-0.4675368368625641,
-0.0916713178157806... | |
I have a *UIViewController* that is pushed onto a *UINavigationController* and is currently displayed. When I go to start some asynchronous task inside the view controller, I can set **hidesBackButton** on self.navigationItem to **YES**, and the back button is hidden correctly.
As soon as the task is finished, and I s... | [
0.09231618046760559,
-0.19868920743465424,
0.7567896842956543,
-0.02658776380121708,
0.02359292469918728,
-0.03859381005167961,
0.6474348902702332,
0.45043230056762695,
-0.2569580078125,
-1.0148491859436035,
-0.0969691276550293,
0.5587888956069946,
0.13792605698108673,
0.4007844924926758,
... | |
correctly!
Are you calling hidesBackButton = NO from a thread? All UI operations should be done on the main thread, otherwise they won't have any effect. | [
0.41191017627716064,
-0.040072567760944366,
0.11866530030965805,
-0.060284797102212906,
-0.1456606239080429,
-0.22815413773059845,
0.5865376591682434,
-0.25101110339164734,
0.0184611976146698,
-0.18455679714679718,
-0.3329833447933197,
0.6831134557723999,
-0.36083388328552246,
-0.002149754... | |
I've been given an existing PHP application that was originally deployed on a LAMP host.
Because most of our team are .Net developers, our boss wants it deployed in a windows environment.
Is it madness to expect this to just work?
Here's some additional info of the LAMP host:
* Linux 2.4.32
* PHP 5.2.6
* No non-d... | [
0.7390872836112976,
0.09404841810464859,
0.14420874416828156,
0.0077987611293792725,
0.09161357581615448,
-0.3310890793800354,
-0.02976761758327484,
-0.15884947776794434,
0.05351641774177551,
-0.729780375957489,
0.2049351930618286,
0.7833579778671265,
0.03492513298988342,
-0.16026346385478... | |
profits.
For example:
Investments:
* time spend to implement test
infrastructure (no serious product
unit tests can be possible without
test-specific infrastructure code
that streamlines product specific
test patterns, test data
creation/removal, etc.);
* time spend on writing actual tests;
* time spend on reviewing... | [
0.5448740720748901,
0.36278036236763,
-0.11744450777769089,
0.3023277819156647,
0.054473042488098145,
-0.00031155667966231704,
0.15691301226615906,
0.12498161941766739,
-0.1414271891117096,
-0.405052125453949,
-0.3430332839488983,
0.8860660791397095,
0.35184162855148315,
0.0175728574395179... | |
Given this data
```
34 foo
34 bar
34 qux
62 foo1
62 qux
78 qux
```
I want to replace the string at 2nd column into "" if it is "qux".
Resulting:
```
34 foo
34 bar
34
62 foo1
62
78
```
How do you do that with sed? In particular the data is very big with ~10^7 lines
I *wouldn't* actually do it with `sed` since... | [
-0.10210857540369034,
0.22262834012508392,
0.6125447750091553,
-0.2252991646528244,
-0.17551930248737335,
0.28833818435668945,
0.4111907482147217,
-0.12326174229383469,
-0.013129121623933315,
-0.6920638084411621,
-0.17056231200695038,
0.30062565207481384,
-0.5402002930641174,
0.10770793259... | |
== "qux") {$2 = ""}; print }'
```
If you must use `sed`:
```
cat file | sed 's/ *qux *$//'
```
making sure that you use the correct white space (the above uses only spaces). | [
0.06521640717983246,
0.10590247809886932,
0.24973025918006897,
-0.43406885862350464,
0.362178236246109,
-0.10015468299388885,
0.22102929651737213,
-0.14945019781589508,
0.00014960899716243148,
-0.8901822566986084,
-0.7262622117996216,
0.245708167552948,
-0.4839637577533722,
0.0220232307910... | |
I am trying to get a better understanding of the [jQuery.map](http://docs.jquery.com/Utilities/jQuery.map) function.
So in general terms .map takes a array and "maps" it to another array of items.
easy example:
```
$.map([0,1,2], function(n){
return n+4;
});
```
results in [4,5,6]
I think I understand what it... | [
0.07458169758319855,
-0.03596555441617966,
0.31719258427619934,
-0.18920664489269257,
-0.06319482624530792,
0.10102773457765579,
0.07110919058322906,
-0.46337732672691345,
-0.31183668971061707,
-0.8406552672386169,
-0.12650151550769806,
0.4703957140445709,
-0.31881123781204224,
0.197078049... | |
return this.innerHTML;
})
```
The above converts the `<label>` elements inside a list of users to just the text contained therein. Then I can do:
```
alert('The following users are still logged in: ' + usernames.join(', '));
``` | [
0.16729062795639038,
0.007274861913174391,
0.7006482481956482,
-0.33839067816734314,
0.1615811288356781,
-0.361530601978302,
0.23114444315433502,
-0.04372213035821915,
-0.018994146957993507,
-0.5362197160720825,
-0.2631513774394989,
0.6251071691513062,
-0.3106467127799988,
0.12568722665309... | |
Is it possible to have Greasemonkey scripts run before *anything* else on the page?
I'm aware of `@run-at document-start`, but this appears to run immediately after the `<HTML>` tag. Normally this isn't a problem, but if the page is misformatted as in the example below, there doesn't seem to be anything I can do.
I'... | [
0.6332616806030273,
0.5137918591499329,
0.3670414090156555,
-0.21800437569618225,
0.028013497591018677,
-0.3251924514770508,
0.37460848689079285,
0.3404827117919922,
-0.5010762810707092,
-0.6330201029777527,
0.0986456498503685,
0.4779096841812134,
-0.3800925314426422,
-0.16835127770900726,... | |
all, e.g. this is allowed:
```
<script> document.write('<!'+'--'); </script>
```
If browser goes past this script without executing it, it will see completely different document, therefore you can't analyze DOM of HTML document before scripts run.
Opera solves this problem in [UserJS](http://www.opera.com/browser/t... | [
-0.04680578410625458,
-0.2649848163127899,
0.4131679832935333,
-0.14003103971481323,
-0.08500130474567413,
-0.3674529492855072,
0.33057573437690735,
-0.5657116770744324,
-0.17297838628292084,
-0.3793468177318573,
-0.315152108669281,
0.6275209188461304,
-0.24626865983009338,
-0.073535509407... | |
Does anyone know what can cause this problem?
> PHP Fatal error: Cannot redeclare class
It means you've already created a class.
For instance:
```
class Foo {}
// some code here
class Foo {}
```
That second Foo would throw the error. | [
0.04014486074447632,
0.12481708824634552,
-0.13873231410980225,
-0.08647216111421585,
-0.13033048808574677,
-0.16929394006729126,
0.7541548609733582,
0.06611981242895126,
-0.22895655035972595,
-0.5253269672393799,
0.022674979642033577,
0.4819806218147278,
-0.2716183662414551,
0.46439331769... | |
I've already asked 2 questions kind of related to this project, and i've reached this conclusion. Writing the size of the Struct to the file , and then reading it back is the best way to do this.
I'm creating a program for a homework assignment that will allow me to maintain inventory. I need to read / write multiple ... | [
0.5085631012916565,
0.2132635861635208,
0.15603478252887726,
0.031080259010195732,
0.13828366994857788,
0.05561840534210205,
0.0875789225101471,
-0.2086646556854248,
-0.14881937205791473,
-0.7771843075752258,
0.4789634943008423,
0.20468316972255707,
-0.21673227846622467,
0.2934159934520721... | |
compile errors... and I have zero clue on how to fix them. If you could help me on this I would be so appreciative... thank you. I'm so lost right now...
\*\*\*\* HOPEFULLY THE LAST EDIT #3 \*\*\*\*\*\*\*\*\*\*\*\*\*
My Code:
```
// Project 5.cpp : main project file.
#include "stdafx.h"
#include <iostream>
#includ... | [
-0.03422116860747337,
0.17792998254299164,
0.41310983896255493,
0.20653466880321503,
0.42173925042152405,
0.30472853779792786,
0.3349984884262085,
-0.06120660528540611,
-0.1464792788028717,
-0.7716799974441528,
-0.026531899347901344,
0.7291936278343201,
-0.34857380390167236,
0.060695488005... | |
retailCost;
int dateAdded;
} ;
int main(void)
{
cout << "Welcome to the Inventory Manager extreme! [Version 1.0]" << endl;
vector<InventoryItem> structList;
ofstream out("data.dat");
writeVector( out, structList );
while (1)
{
string line = "";
cout << endl;
co... | [
0.16705863177776337,
-0.5079139471054077,
0.8022436499595642,
-0.06572975963354111,
0.27352237701416016,
0.04137879237532616,
-0.136477530002594,
0.10390624403953552,
0.10858815163373947,
-0.5264846086502075,
-0.35437965393066406,
0.8073452115058899,
-0.1719634085893631,
0.1395993977785110... | |
cout << "2: Display a record " << endl;
cout << "3: Edit a current record " << endl;
cout << "4: Exit the program " << endl;
cout << endl;
cout << "Enter a command 1-4: ";
getline(cin , line);
int rValue = checkCommand(line); | [
0.15173020958900452,
-0.19990544021129608,
0.72170090675354,
-0.3321393132209778,
0.3619309067726135,
0.0077047827653586864,
0.2203979343175888,
-0.39197486639022827,
0.07051564753055573,
-0.23794297873973846,
-0.5280974507331848,
0.6591485142707825,
-0.358639121055603,
0.2667013108730316,... | |
if (rValue == 1)
{
cout << "You've entered a invalid command! Try Again." << endl;
} else if (rValue == 2){
cout << "Error calling command!" << endl;
} else if (!rValue) {
break;
} | [
0.08082988113164902,
0.04979637265205383,
0.4864455759525299,
-0.2681376338005066,
0.1317465603351593,
-0.021190417930483818,
0.8260298371315002,
-0.45591604709625244,
-0.21614660322666168,
-0.2464769333600998,
-0.4750448763370514,
0.7330417633056641,
-0.3057161271572113,
0.114823617041110... | |
}
system("pause");
return 0;
}
int checkCommand (string line)
{
int intReturn = atoi(line.c_str());
int status = 3;
switch (intReturn)
{
case 1:
break;
case 2:
break;
case 3: | [
0.032599132508039474,
-0.6436513066291809,
0.3755665421485901,
-0.22924910485744476,
0.39841213822364807,
0.22336345911026,
0.5155899524688721,
-0.35384199023246765,
-0.20675911009311676,
-0.26998522877693176,
-0.46029478311538696,
0.5245864391326904,
-0.35988765954971313,
0.09759194403886... | |
break;
case 4:
status = 0;
break;
default:
status = 1;
break;
}
return status;
}
template <typename Template>
void readFromFile(Template& t)
{
ifstream in("data.dat");
readVector(in, t); Need to figure out how to pass | [
0.16778406500816345,
-0.540705680847168,
0.25767362117767334,
-0.06737928092479706,
0.5036725401878357,
-0.21180637180805206,
0.5080235600471497,
-0.2665332555770874,
0.039215605705976486,
-0.45713716745376587,
-0.42130550742149353,
0.3722638785839081,
-0.39978212118148804,
-0.067337334156... | |
the vector structList via a Template
in.close();
}
template <typename Template>
void writeToFile(Template& t)
{
ofstream out("data.dat");
readVector(out, t); Need to figure out how to pass the vector structList via a Template
out.close();
}
template<typename T>
void writeVector(ofstream &out, const ve... | [
-0.14267221093177795,
-0.7267118096351624,
0.8472058176994324,
-0.059829436242580414,
-0.17366556823253632,
0.5139287114143372,
-0.10504509508609772,
-0.5467427968978882,
-0.10343367606401443,
-0.7560263276100159,
-0.02142920531332493,
0.7873059511184692,
-0.6331034898757935,
-0.2219289988... | |
size;
vector<T> vec;
vec.reserve(size);
for(int i = 0; i < size; ++i)
{
T tmp;
in >> tmp;
vec.push_back(tmp);
}
return vec;
}
```
My Compile Errors:
```
1>.\Project 5.cpp(128) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'c... | [
-0.21817563474178314,
-0.21857939660549164,
0.3243003189563751,
-0.3460233211517334,
0.06612583994865417,
0.5092306137084961,
0.3069114089012146,
-0.5943289995193481,
-0.3554435670375824,
-0.5238135457038879,
-0.4438856542110443,
0.7320640683174133,
-0.3342497944831848,
-0.1182582378387451... | |
9.0\VC\include\ostream(653): could be 'std::basic_ostream<_Elem,_Traits> &std::operator <<<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const char *)'
1> with
```
That is the only error i'm getting now. I see your code is SO Much better. My new compiler error is SUPER long. I've shown where... | [
-0.14507803320884705,
-0.08902783691883087,
0.4496746063232422,
0.05172491818666458,
0.3194172978401184,
0.13390877842903137,
0.5331281423568726,
0.07202316075563431,
-0.10778322070837021,
-0.7350432872772217,
0.10672292858362198,
0.6339613795280457,
-0.5234047770500183,
0.0566734150052070... | |
and such, though, it'd be better to rely on iterators:
```
template<typename T>
void writeVector(ofstream &out, const vector<T> &vec)
{
out << vec.size();
for(vector<T>::const_iterator i = vec.begin(); i != vec.end(); ++i)
{
out << *i;
}
}
template<typename T>
vector<T> readVector(ifstream &i... | [
-0.0956031009554863,
-0.5429490208625793,
0.5785477161407471,
-0.15333795547485352,
0.06376756727695465,
0.2951255142688751,
-0.07650124281644821,
-0.7661202549934387,
-0.11507275700569153,
-0.6461533904075623,
-0.18807196617126465,
0.6160198450088501,
-0.4269264042377472,
0.05672363564372... | |
in >> tmp;
vec.push_back(tmp);
}
return vec;
}
```
You'd want functions to read and write your `InventoryItem` as well, probably:
```
ostream &operator<<(ostream &out, const InventoryItem &i)
{
out << i.Item << i.Description; // FIXME Read/write strings properly.
out << i.Quantity;
out ... | [
-0.08949293941259384,
-0.2194928228855133,
0.7155247926712036,
-0.23675388097763062,
0.4251977503299713,
0.39436155557632446,
0.054157234728336334,
-0.2984541654586792,
-0.14870771765708923,
-0.895621120929718,
-0.43997928500175476,
0.599644124507904,
-0.21052996814250946,
0.08882308006286... | |
i.Description; // FIXME Read/write strings properly.
in >> i.Quantity;
in >> i.wholesaleCost >> i.retailCost;
in >> i.dateAdded;
}
``` | [
0.28942954540252686,
0.0315125472843647,
0.3050709366798401,
-0.14100009202957153,
0.41740548610687256,
-0.03273708373308182,
-0.08536391705274582,
-0.020190304145216942,
-0.018958281725645065,
-0.78005450963974,
-0.3612763285636902,
0.48094722628593445,
-0.13707326352596283,
0.46064236760... | |
I have started to feel that using regular expressions decreases code maintainability. There is something evil about the terseness and power of regular expressions. Perl compounds this with side effects like default operators.
I DO have a habit of documenting regular expressions with at least one sentence giving the b... | [
0.5600282549858093,
0.3639601171016693,
0.041991882026195526,
0.14665137231349945,
-0.2231270670890808,
0.006278518121689558,
0.808141827583313,
0.32251375913619995,
-0.3429785668849945,
-0.226505845785141,
-0.027608659118413925,
0.4942264258861542,
-0.294595867395401,
-0.41026070713996887... | |
am reading Klingon.
Do you intentionally dumb down your regular expressions? Do you decompose possibly shorter and more powerful ones into simpler steps? I have given up on nesting regular expressions. Are there regular expression constructs that you avoid due to mainainability issues?
**Do not let this example clou... | [
-0.451489120721817,
0.4795665144920349,
-0.06480693072080612,
-0.02529502660036087,
0.047608211636543274,
-0.006762797478586435,
0.9058772921562195,
-0.15744978189468384,
-0.2369832843542099,
-0.01945354789495468,
-0.6147745251655579,
0.18456371128559113,
-0.5658418536186218,
-0.1671021431... | |
try to wrap all my Regular Expression calls inside their own function, with a meaningful name and an some basic comments. I like to think of Regular Expressions as a write only language, readable only by the one that wrote it (Unless it's really simple). I fully expect that someone would need to probably completely re-... | [
0.3209414482116699,
0.18698610365390778,
0.09596607834100723,
0.046868547797203064,
-0.1874462068080902,
0.007984458468854427,
0.6432960033416748,
0.28488945960998535,
-0.2144840657711029,
-0.29076817631721497,
-0.2124963104724884,
0.6377882957458496,
-0.24107575416564941,
-0.3111009001731... | |
I am so used to attach a process when debugging ASP.NET application in .NET 2.0 and VS.NET 2005. I don't know what happened to this functionality in VS.NET 2008.
I also don't want to do debugging by starting from the start page because when the application is big enough you don't want it to be compiled and you sometim... | [
0.07241354137659073,
0.12526459991931915,
0.27187561988830566,
-0.0002419681695755571,
-0.19087380170822144,
-0.2248675674200058,
0.272837370634079,
-0.18216463923454285,
-0.1753334254026413,
-0.6139551997184753,
-0.0833740159869194,
0.8413282632827759,
-0.3244207799434662,
0.1543706357479... | |
Server is selected as "Use Default Web Server" and custom server is grayed out which I cannot check. (I don't know if I need some change here but I can't even try that)
On top of it, I tried debugging from default page but in that case what I got is "Unable to start debugging on the web server. Mixed mode debugging is... | [
0.11008816212415695,
0.10882093012332916,
0.07425027340650558,
-0.10964490473270416,
-0.23115839064121246,
-0.07194950431585312,
0.4578533470630646,
0.1117413118481636,
-0.193349689245224,
-0.7495037913322449,
0.022051285952329636,
0.5636789202690125,
-0.56174635887146,
0.28445276618003845... | |
level of PHP or other kinds.
Additional notes:
1. I am using DotNetNuke 5.0.1 and building modules under that.
2. IIS 7 is used with Integrated mode.
Help came from Mitchel Sellers.
He pointed out that the debug mode was ok however while attaching to the process, the "Attach To" was "Automatic:Native Code".
After ch... | [
0.1633119136095047,
0.09310071170330048,
0.3500249683856964,
0.0925121158361435,
-0.13631774485111237,
-0.04660111293196678,
0.47363242506980896,
-0.04966508224606514,
0.002847858238965273,
-0.5927196741104126,
-0.03486737608909607,
0.7683741450309753,
-0.1271960586309433,
-0.1839533150196... | |
is 64 bit by default. Additionally without the "Managed" option selected, you would never be able to debug anyway.
Now, as to why it was different? I'm not sure, but once you change it you should be set to go for the future. | [
0.20261773467063904,
-0.3145383894443512,
0.24105431139469147,
0.45836949348449707,
0.44892242550849915,
-0.17122292518615723,
0.038494136184453964,
0.29477980732917786,
-0.2508043944835663,
-0.4201015830039978,
-0.05656712129712105,
0.5625011920928955,
-0.1614958941936493,
0.3108562827110... | |
I have an HTML document of this format:
```
<tr><td colspan="4"><span class="fullName">Bill Gussio</span></td></tr>
<tr>
<td class="sectionHeader">Contact</td>
<td class="sectionHeader">Phone</td>
<td class="sectionHeader">Home</td>
<td class="sectionHeader">Work</td>
</tr>
... | [
0.03686320036649704,
0.16892310976982117,
0.5943083167076111,
-0.1282443106174469,
-0.13610976934432983,
0.11285468190908432,
0.12093360722064972,
-0.32944631576538086,
-0.05030529201030731,
-0.8579468727111816,
0.11138196289539337,
0.10624685138463974,
-0.25475800037384033,
-0.04147264361... | |
<td class="sectionContent"><span>MD</span><br><span>Owings Mills</span><br><span>21093</span></td>
</tr>
<tr><td colspan="4"><hr class="contactSeparator"></td></tr>
<tr><td colspan="4"><span class="fullName">Eddie Osefo</span></td></tr>
<tr>
<td class="sectionHeader">Contact</td>
<td c... | [
0.0019108593696728349,
0.07812729477882385,
0.5987532734870911,
-0.08433127403259277,
-0.032830946147441864,
-0.02383194863796234,
0.23733225464820862,
-0.521904468536377,
-0.4694706201553345,
-0.5153031945228577,
-0.045538317412137985,
0.46411168575286865,
-0.23503054678440094,
-0.0378315... | |
<td class="sectionContent"><span></span></td>
</tr>
<tr><td colspan="4"><hr class="contactSeparator"></td></tr>
```
So it alternates - chunk of contact info and then a "contact separator". I want to grab the contact info so my first obstacle is to grab the chunks in between the contact separator. I have alre... | [
-0.009551134891808033,
0.27638664841651917,
0.4655272662639618,
-0.07763031870126724,
-0.15804754197597504,
-0.1277976781129837,
0.3100237548351288,
-0.39397314190864563,
-0.20157884061336517,
-0.6374130845069885,
-0.07786422222852707,
0.8252823352813721,
-0.5267707705497742,
-0.1885146349... | |
prints, but do not get the results I expect. Here is the code:
```
page = agent.get uri.to_s
chunks = page.body.match(/<tr><td colspan="4"><span class="fullName">((.|\s)*?)<hr class="contactSeparator">/).captures
chunks.each do |chunk|
puts "new chunk: " + chunk.inspect
end
```
Note that page.body is just th... | [
0.05559156462550163,
-0.03025957942008972,
0.4958444833755493,
0.0818115621805191,
-0.21950680017471313,
0.09926144778728485,
-0.06633936613798141,
-0.7657686471939087,
-0.49216604232788086,
-0.6915702223777771,
-0.029985567554831505,
0.21919769048690796,
-0.4315314292907715,
-0.2699365317... | |
chunks of contact info, even though on rubular I have verified that these chunks should be extracted.
2) All of the \r\n\t (line feeds, tabs, etc.) are showing up in the matches.
Can anyone see the issue here?
Alternatively, if anyone knows of a good free AOL contacts importer, that would be great. I have been using... | [
0.30146798491477966,
0.238265261054039,
0.257049024105072,
0.21485409140586853,
-0.09569061547517776,
-0.3854694366455078,
0.1522364467382431,
0.3041083514690399,
-0.1912248581647873,
-0.7185866236686707,
-0.04372631013393402,
0.6332107186317444,
-0.5396394729614258,
-0.07508353888988495,
... | |
names = page.search("//span[@class='fullName']")
# Every contact has a fullName node, so for each fullName node, we grab the chunk of contact info
names.each do |n|
# next_sibling.next_sibling skips:
# <tr>
# <td class=\"sectionHeader\">Contact</td>
# <td class=\"sectionHeader\">Ph... | [
-0.11604271829128265,
0.01213897205889225,
0.7623641490936279,
-0.11661028861999512,
0.21752049028873444,
0.021202977746725082,
0.061789702624082565,
-0.31495383381843567,
-0.3862788677215576,
-0.7568479776382446,
-0.14891411364078522,
0.24072971940040588,
-0.13395142555236816,
0.329928159... | |
# to give us the actual chunk of contact information
# then taking the children of that chunk gives us rows of contact info
contact_info_rows = n.parent.parent.next_sibling.next_sibling.children
# Iterate through the rows of contact info
contact_info_rows.each do |row|
# Iterate throug... | [
0.06389104574918747,
0.10348311066627502,
0.47877785563468933,
-0.015426048077642918,
0.13054028153419495,
0.6062238812446594,
-0.21761314570903778,
-0.20477214455604553,
-0.2344341278076172,
-0.5575082898139954,
-0.08046533912420273,
0.22258849442005157,
-0.10655708611011505,
0.0306284893... | |
".next_siblings" because space after "Email 1" element is processed as a sibling
if info.content.strip == "Email 1:" then email = info.next_sibling.next_sibling.content.strip end
# If the contact info has a screen name but no email, use screenname@aol.com
if (info.content.strip == "Screen... | [
-0.31984806060791016,
-0.22383162379264832,
1.0669276714324951,
-0.11667930334806442,
0.23318825662136078,
-0.0028063177596777678,
0.029695356264710426,
-0.06541932374238968,
-0.13236257433891296,
-0.8410338759422302,
-0.42731761932373047,
0.3840489089488983,
-0.19305619597434998,
0.248893... | |
if info.content.strip == "Mobile:" then mobile = info.next_sibling.content.strip end
# Maybe we can try and get zips later. Right now the zip field can look like the street address field
# so we can not tell the difference. There is no label node
#zip_match = /\A\D*(\d{5})-?\d{4}\D*\z/i... | [
0.1704094260931015,
-0.05460692197084427,
0.9058347940444946,
0.0242096409201622,
0.20697598159313202,
-0.2409932017326355,
0.010889493860304356,
-0.18414565920829773,
-0.24684901535511017,
-0.7503178715705872,
-0.20595769584178925,
0.23826490342617035,
-0.5234681367874146,
0.1134535148739... | |
end
end
contacts << { :name => n.content, :email => email, :mobile => mobile }
# clear variables
email, mobile = "", ""
end
``` | [
-0.1856212466955185,
0.047206372022628784,
0.8466840982437134,
-0.058381494134664536,
0.5053578019142151,
-0.14106495678424835,
-0.07923886179924011,
0.22470642626285553,
0.1946730613708496,
-0.48548686504364014,
-0.17075590789318085,
0.45760485529899597,
-0.453418105840683,
0.275367587804... | |
Across various SQL dialects, what string representation for a Date and/or DateTime would be most likely to be interpreted correctly? Is there an SQL Standard? Are the two answers identical or similar?
EDIT:
For suggestions, can we all please comment with any known SQL dialects that don't comply?
I would bet the ISO 8... | [
0.3147328495979309,
0.015007966198027134,
0.43031975626945496,
0.13811346888542175,
-0.18854571878910065,
0.022397523745894432,
0.13815541565418243,
0.12429141998291016,
-0.25879576802253723,
-0.49184468388557434,
-0.26103347539901733,
0.15720516443252563,
-0.278389573097229,
0.04312017187... | |
At first image height is coming as zero, after that by refreshing the page i am getting its actual height. I need to get its height at first time? could any body helps me?
```
$j(document).ready(function(){
var imgV = new Image();
imgV.src="http://www.kerrvilletexascvb.com/Riverside%20Nature%20Ce... | [
0.08840736001729965,
-0.26008257269859314,
1.0861790180206299,
0.0026780306361615658,
0.04566643014550209,
0.24152766168117523,
0.08550667762756348,
-0.3657378554344177,
-0.29285237193107605,
-0.6002197265625,
0.05904302000999451,
0.6587749123573303,
0.08027689903974533,
0.0503265671432018... | |
.attr("src", "http://www.google.com/intl/en_ALL/images/logo.gif")
.load(function() {
alert(this.width);
alert(this.height);
})
;
``` | [
0.2732217311859131,
-0.15411216020584106,
0.851808488368988,
-0.4062817394733429,
-0.038197554647922516,
0.00975313875824213,
0.12028491497039795,
-0.3376161456108093,
-0.3035416007041931,
-0.4218055307865143,
-0.4778803884983063,
0.7947661280632019,
-0.4903552830219269,
0.0165020953863859... | |
I'm trying to use svn through svnTortoise on a windows xp machine. Its just me, just trying to do it in house. On my laptop I installed tortoise and everything works great. Then I came to my desktop and installed svnTortoise and tried it. But this time I get these errors.
```
Checkout from file://F:/repos/mav_admin, r... | [
0.08332788199186325,
0.41238507628440857,
0.22438941895961761,
-0.30489155650138855,
0.06840585172176361,
0.33670157194137573,
0.6593001484870911,
0.2735747694969177,
-0.534891664981842,
-0.5781816244125366,
-0.03070942685008049,
1.0159554481506348,
-0.1779644638299942,
0.21602964401245117... | |
the above error, but not when I use my laptop. My laptop is running Vista... (didn't want to pay to downgrade...) and my desktop computer is a 64-bit computer... but I'm running 32-bit XP.
Tortoise Info is
```
TortoiseSVN 1.6.0, Build 15855 - 32 Bit , 2009/03/21 12:36:36
Subversion 1.6.0,
apr 1.3.3
apr-utils 1.3.4
... | [
-0.1807853728532791,
0.2845800817012787,
0.27670854330062866,
-0.10077783465385437,
0.17726820707321167,
0.14658957719802856,
0.7667824029922485,
0.23544204235076904,
-0.5600894093513489,
-0.35525619983673096,
-0.11568737030029297,
0.9180803894996643,
-0.15299703180789948,
0.21493938565254... | |
[tsvn\_1.6\_releasenotes.html](http://tortoisesvn.tigris.org/tsvn_1.6_releasenotes.html)
> TortoiseSVN 1.6 no longer supports
> access to BDB repositories via the
> file:/// url. This doesn't affect
> accessing BDB repositories over svn://
> or http:// though.
>
>
> If you have a BDB repository that you
> still acce... | [
0.15340237319469452,
-0.14450222253799438,
0.5866767764091492,
-0.2524605095386505,
-0.2976190447807312,
-0.20104731619358063,
0.4771400988101959,
-0.2184416502714157,
-0.4734446406364441,
-0.35604047775268555,
-0.31326615810394287,
0.6056475639343262,
-0.3344898819923401,
0.23558726906776... | |
I'm having some concurrency issues with a webpage I'm building. Basically, I have three script files that I'm using to hold some data:
**script1.js:**
```
var myValue = 1;
```
**script2.js:**
```
var myValue = 2;
```
**script3.js:**
```
var myValue = 3;
```
And I have one page, **mypage.html** that basically ... | [
0.1804327368736267,
0.16901634633541107,
0.8608026504516602,
-0.11053657531738281,
-0.3339911997318268,
0.21623371541500092,
0.44518205523490906,
-0.4237772822380066,
-0.2500610649585724,
-0.9916231036186218,
-0.047696709632873535,
0.34167301654815674,
-0.10092659294605255,
-0.151266515254... | |
<div onclick="get_number()">Click me!</div>
</body>
</html>
```
The main idea with this page is that you would query it like this:
`mypage.html?run=script1`
which would tell the `get_number()` function to dynamically insert `script1.js` in to mypage.htm. Then, I call `get_number()` to display the value loaded from t... | [
0.4222767949104309,
0.2223062962293625,
0.6052004098892212,
-0.12091539800167084,
-0.360223650932312,
-0.12123224884271622,
0.14593680202960968,
0.02514767274260521,
-0.25333744287490845,
-0.9531113505363464,
0.0521942600607872,
0.4849916696548462,
-0.18787327408790588,
-0.1317978203296661... | |
Safari, I get an error that `myValue` is undefined. However, if I click the `Click me` div that I created, the number displays correctly. So, I know I'm correctly loading the javascript external file. But, it just isn't loaded in time for my `get_number()` function to work correctly `onload`.
Now, I hacked up my file ... | [
0.19468124210834503,
0.18738910555839539,
0.4470791816711426,
-0.2729511857032776,
-0.12358857691287994,
0.0009689766447991133,
0.5860035419464111,
-0.27807506918907166,
-0.5223953723907471,
-0.5702319145202637,
-0.06245677173137665,
0.5655850768089294,
-0.6543833613395691,
-0.145347326993... | |
document.write( myValue ), 10 } );
}
```
The setTimeout delays enough for the DOM to be updated and the javascript to be loaded in most cases. But, this is a total hack. Firefox tends to load this 'improved' code correctly all the time while Chrome and Safari manage to get the value about 50% of the time.
So, I gue... | [
0.22391632199287415,
0.296668142080307,
0.5959751009941101,
-0.24878518283367157,
-0.025699475780129433,
-0.3794410526752472,
0.38825735449790955,
-0.23339113593101501,
-0.2175663709640503,
-0.7177424430847168,
0.02402004413306713,
1.1762927770614624,
-0.24408437311649323,
0.11008933931589... | |
to your script files, so that when they're run, they call the function that does your
```
document.write( myValue );
```
So that script1.js would be
```
var myValue = 1;
scriptLoaded();
```
and your main file would have:
```
function scriptLoaded(){
document.write( myValue );
}
``` | [
-0.045658137649297714,
0.12457741051912308,
0.4955803453922272,
-0.4676353931427002,
0.20129264891147614,
-0.09308387339115143,
0.2661355137825012,
0.05304785817861557,
0.1374274343252182,
-0.6500501036643982,
-0.28365984559059143,
0.7293097972869873,
-0.15777505934238434,
0.02879669889807... | |
How can I get this layout for a simple form with CSS
```
------------------------------------------------------------------------------------------
|Date From | dropdown box | Date To | dropdown box| button|
------------------------------------------------------------------------------------------
grid or table
----... | [
0.06105279549956322,
-0.24118132889270782,
0.6143472194671631,
0.1855918914079666,
0.4657997190952301,
-0.07210703194141388,
-0.10460897535085678,
-0.21672414243221283,
-0.12495730072259903,
-0.9466361999511719,
0.29033204913139343,
0.4208798408508301,
0.010600349865853786,
0.0939510539174... | |
I will be developing some applications using mobile barcode scanners and need to choose between C++ and C# for **coding on the scanners.**
I am considering [Intermec's CK31](http://www.intermec.com/products/cmptrck31/index.aspx) or similar for the combination of wifi, scanning choices, programmability and user interfa... | [
-0.12686343491077423,
0.4312954843044281,
0.40693026781082153,
-0.22274011373519897,
0.21000412106513977,
0.0018035761313512921,
0.0068725221790373325,
-0.026245567947626114,
-0.047951605170965195,
-0.9700021147727966,
-0.04286331683397293,
0.5588348507881165,
-0.20403577387332916,
-0.2668... | |
any recommendations one way or another?
I am **NOT** looking for answers advocating C++ over C# as languages in general - my productivity in either is similar and I have enough experience to be able to create complex, robust C++ solutions.
What I would appreciate are *war stories* or factors to put into our platform... | [
0.5568340420722961,
0.48678168654441833,
-0.044123440980911255,
0.16908757388591766,
-0.19283542037010193,
0.00933151226490736,
0.07472366094589233,
0.26106712222099304,
-0.3045080304145813,
-0.5208408236503601,
-0.01196327619254589,
0.7689891457557678,
-0.06583428382873535,
0.108191311359... | |
for Windows Mobile and Windows CE in C, C++ and C# for quite a few years now. Moreover, I been doing so for Honeywell (formerly Hand Held Products, purchased by Honeywell in 2007) where I've worked on nearly all aspects of the devices, from drivers and services to Line of Business GUIs and utilities.
First of all, I *... | [
0.2729035019874573,
0.4053262770175934,
0.37855038046836853,
-0.15722590684890747,
0.32963740825653076,
0.3247931897640228,
0.016944384202361107,
0.17495092749595642,
0.060994286090135574,
-0.44763246178627014,
-0.17617373168468475,
0.4997926652431488,
-0.23454664647579193,
0.1755224019289... | |
from any device that runs an OS as old as WinCE 4.2, especially if you are even considering .NET development. The reasoning for this is that 4.2 only has, at most, .NET CF 1.0 embedded in ROM (part of the OS ROM image), meaning that you would require a ~5MB CAB file to install at least .NET CF 2.0 Yes, you could develo... | [
0.6944151520729065,
0.3365142047405243,
0.4869042634963989,
-0.1363050788640976,
-0.185736745595932,
-0.2654750645160675,
0.17155113816261292,
-0.1617896556854248,
-0.007331083528697491,
-0.8620524406433105,
0.028105905279517174,
0.7973885536193848,
0.012177136726677418,
0.2311032414436340... | |
look for that.
On that same vain, you may even want to consider using a device with Windows Mobile 6.0 or 6.1 as they are easy to program with and will always have CF 2.0 pre-installed. In case you're wondering why I have not mentioned CF 3.0 or CF 3.5, it's just because the first Mobile platform to be release with t... | [
0.3684437870979309,
0.19505812227725983,
0.6834385991096497,
0.21580037474632263,
-0.11802767217159271,
-0.20558735728263855,
0.36771905422210693,
0.2218807488679886,
-0.1702311933040619,
-1.0899896621704102,
0.2262100726366043,
0.7447343468666077,
-0.04489060118794441,
0.06738992035388947... | |
Windows Mobile cousin, so that is all a matter of your programming preference and what your end users want and need.
Regarding [kgiannakakis's](https://stackoverflow.com/questions/708484/c-or-c-to-program-mobile-barcode-device/708572#708572) comments on SDKs being only a thing layer, this is just not true. If you have... | [
0.018472570925951004,
-0.000424007885158062,
0.4810977280139923,
0.033452291041612625,
0.13432356715202332,
-0.07676997780799866,
0.1510101854801178,
-0.07912590354681015,
-0.16203713417053223,
-0.5022484660148621,
-0.1466423124074936,
0.5881659388542175,
-0.15379920601844788,
0.1183026432... | |
have to do a P/Invoke with our code from C#.
If you want to take a look at the SDK I'm talking about, it's freely available to download [here](http://www.handheld.com/Site.aspx/na/en/resources/product_downloads/software/?product=262) and has some great examples.
IMHO I would actually consider the provided SDK as more ... | [
0.6114051342010498,
0.2084587812423706,
0.28352707624435425,
0.43086010217666626,
0.1663072109222412,
-0.15225620567798615,
-0.35659265518188477,
-0.14612649381160736,
-0.08227328956127167,
-0.6952583193778992,
-0.08265732228755951,
0.6633488535881042,
0.22523637115955353,
0.33611658215522... | |
an external scanner hooked to the device?
Take a look at the Honeywell offering if you want [here](http://www.handheld.com/Site.aspx/na/en/products/categories/?cat=10). We've got devices with probably the best imager based bar code scanner in the business, built into all of our units. And we have a rock solid SDK (I sh... | [
0.4802355170249939,
0.40439698100090027,
0.2688072919845581,
0.0450766459107399,
-0.04416065663099289,
0.020294465124607086,
0.19596946239471436,
0.11549054831266403,
0.1276160031557083,
-0.49252641201019287,
-0.009236225858330727,
0.9879431128501892,
0.1287769079208374,
0.1657839119434356... | |
(Win32) C or C++. So .NET is out for anything like that.
C and C++ can absolutely be your friend on mobile devices in terms of keeping things lightweight, since you don't need the whole .NET framework to run the add. Remember, you have a maximum of 32MB of memory for any process (not including DLLs..that's another lec... | [
-0.1613989919424057,
-0.026868285611271858,
0.16835778951644897,
0.26128387451171875,
-0.13152249157428741,
-0.31623053550720215,
0.054418034851551056,
0.1204136312007904,
-0.18195539712905884,
-0.8470951318740845,
0.10887190699577332,
0.9486936330795288,
-0.26684704422950745,
-0.289608508... | |
harder than it is with .NET Actually, most of the C++ apps I write are completely headless and have no GUI at all... .NET CF *does not* have WPF (yet), and is stuck with WinForms, but it's really easy to pick up. Pretty much drag and drop in the designer. And also remember, like I mentioned before, that WinCE has a com... | [
-0.2169823795557022,
0.078948475420475,
0.23715662956237793,
0.17081598937511444,
-0.304656058549881,
0.01840520091354847,
0.18000362813472748,
0.26210078597068787,
-0.21790651977062225,
-0.8415018320083618,
0.025758463889360428,
1.2050726413726807,
0.033925481140613556,
-0.308246552944183... | |
always. For one, having a device with the version of the CF you are going to use stored in ROM will mean that you will generally have no more memory used on a .NET application vs the equivalent C++ app. In some cases, .NET will even use *less* memory. For example, a .NET app vs a C++ app that uses MFC can often use les... | [
0.46965837478637695,
-0.20147253572940826,
0.5596903562545776,
0.24632364511489868,
0.21486961841583252,
-0.055720847100019455,
-0.06746339797973633,
0.12708909809589386,
-0.5867211818695068,
-0.536146879196167,
-0.17908234894275665,
0.8164727687835693,
-0.6228930354118347,
-0.213814333081... | |
garbage collector is freeing up memory that you may have forgotten to do in a C++ app.
Execution speed on more modern devices is generally no different between the two. Granted, you will always have little parts of each language where one will be faster than the other, but .NET is mature enough at this point that the ... | [
0.3601149916648865,
-0.0014413775643333793,
-0.02550516277551651,
0.32140472531318665,
-0.2845689058303833,
-0.30167216062545776,
0.2840309739112854,
0.12115762382745743,
-0.286406010389328,
-0.7120590209960938,
0.3612113893032074,
0.5002860426902771,
-0.2698187828063965,
-0.02724351361393... | |
because it was calling into a native DLL via P/Invoke and the .NET portion was essentially getting "Impatient."
I have never seen any issues with battery life in one language vs the other. But I've never specifically tested for it either.
I really think that, in the end, it still comes down to the SDK that comes with... | [
0.2537495195865631,
0.01534948218613863,
-0.016323836520314217,
0.07666132599115372,
-0.02846471406519413,
-0.15424379706382751,
0.2900765538215637,
0.16878622770309448,
-0.02743702568113804,
-0.2463333010673523,
0.007353527005761862,
0.7706334590911865,
-0.2347380667924881,
-0.11229370534... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.