text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
wrong with that? The installer installs successfully and I get the error:
> Application manager cannot install
> this application on your mobile device
> due to an invalid setup file.
> Reinstall and try again.
I've got this working before on another application using ActiveSync. I am currently using Windows Mobil... | [
0.21235209703445435,
0.22787393629550934,
0.3807041049003601,
0.07780666649341583,
0.058724191039800644,
-0.22058965265750885,
0.7392097115516663,
-0.026870811358094215,
-0.15330111980438232,
-0.8886314630508423,
0.15499061346054077,
0.7677314281463623,
-0.5193625092506409,
0.1689615547657... | |
it looks right on. It should work -- however, Vista and WMDC are strange birds. Is it possible you're trying load the .INI file into WMDC from a location that a "standard" user doesn't have permissions to?
I don't know where your Windows installer is extracting the files to, but perhaps try a User folder?
The only ot... | [
0.44592490792274475,
-0.01670760288834572,
0.26413223147392273,
0.16404637694358826,
0.31016528606414795,
-0.22424080967903137,
0.043917976319789886,
0.1162395030260086,
-0.18218179047107697,
-0.7383926510810852,
0.08765328675508499,
0.5122097134590149,
-0.2207755595445633,
0.2176559269428... | |
in WMDC and reinstalling your app. | [
0.46994203329086304,
-0.18634843826293945,
0.2905646562576294,
0.23908179998397827,
0.17259423434734344,
-0.35474398732185364,
-0.03424898907542229,
0.11490347981452942,
-0.02040206640958786,
-0.716023325920105,
-0.15780705213546753,
0.4491666555404663,
-0.06086426600813866,
-0.10376349836... | |
Using Zend Framework I want to use controllers stored in a directory which is not default.
What I'm trying to achieve is that if the requested path begins with admin/ controllers/admin is used, with layout/admin and views/admin etc.
How would I go about achieving this in a reasonably graceful manner?
You could use th... | [
0.3404075801372528,
-0.035209085792303085,
0.3993639349937439,
0.108885757625103,
-0.06821892410516739,
-0.28269386291503906,
-0.21764013171195984,
-0.4869692325592041,
-0.1040397509932518,
-0.9220402240753174,
-0.04623423516750336,
0.6249245405197144,
-0.1858951300382614,
0.15226610004901... | |
I have created java api -ported from C# to be more specific- which aside from public interface, contains a lot of internal stuff that I don't want a user to know about. In C#, I have used doxygen to generate documentation. I presume javadoc has similar features to exclude certain public members, classes, even packages.... | [
0.4876008629798889,
0.14015604555606842,
-0.0399135947227478,
-0.13018321990966797,
-0.196711465716362,
-0.41247570514678955,
-0.0615360327064991,
-0.1610202044248581,
-0.21021009981632233,
-0.5623068809509277,
-0.05369354039430618,
0.7591401934623718,
-0.4892786741256714,
-0.0878882706165... | |
If I have a DataSet as a result of a SQL query, can I bind it directly to a TreeView and show the hierarchy of my data? I know I'd have to use several HierarchicalDataTemplates, but I don't know how to tell each one what data to display.
If I have a 4-level hierarchy, like so:
```
<HierarchicalDataTemplate x:Key="Fir... | [
-0.020697837695479393,
0.046945877373218536,
0.5089789628982544,
0.13787072896957397,
-0.22899362444877625,
-0.06746675819158554,
-0.17902612686157227,
-0.5364522933959961,
-0.14446096122264862,
-0.6081383228302002,
-0.07783576846122742,
0.4655754864215851,
-0.23106104135513306,
0.24628415... | |
HierarchicalDataTemplate expect a hierarchy of objects. The DataSet is inherently flat.
You will have to somehow convert that dataset to a hierarchy of objects, each with its own "Children" collection. The ItemsSource of the treeview will be bound to the "top level collection" (the rows without a parent reference).
E... | [
-0.2699970304965973,
-0.44121184945106506,
0.41421064734458923,
0.7203285694122314,
-0.052405644208192825,
0.24794961512088776,
0.025620587170124054,
-0.09604600071907043,
-0.1330893486738205,
-0.8371585607528687,
-0.03450773283839226,
0.2019217312335968,
-0.3806595206260681,
0.24000674486... | |
I'd like to know how do the member types work in Scala, and how should I associate types.
One approach is to make the associated type a type parameter. The advantages of this approach is that I can prescribe the variance of the type, and I can be sure that a subtype doesn't change the type. The disadvantages are, that... | [
0.18068915605545044,
-0.40233999490737915,
0.21920917928218842,
0.01246344018727541,
-0.30278417468070984,
0.0018587044905871153,
0.029575765132904053,
-0.4163497984409332,
-0.11016465723514557,
-0.39374616742134094,
0.30038899183273315,
0.4796336591243744,
-0.6052050590515137,
0.066365048... | |
therefore, I can't use the type in function parameters (when x : X, X#T might not be in any relation with x.T)
A concrete example would be:
I have a trait for DFAs (could be without the type parameter)
```
trait DFA[S] { /* S is the type of the symbols in the alphabet */
trait State { def next(x : S); }
/* final... | [
0.14295519888401031,
-0.2743418514728546,
0.15427036583423615,
-0.34216609597206116,
-0.19105461239814758,
0.062449824064970016,
0.2686985433101654,
-0.5261114239692688,
0.18404856324195862,
-0.9514369964599609,
0.06243413686752319,
0.367872029542923,
-0.3754879832267761,
0.187722101807594... | |
specify the type parameters, all must be inferred
* I'd like the function to be called with the concrete DFA type (but if there is a solution where the function would not have a type parameter for the DFA, it's OK)
* the alphabet types must be unconstrained (ie. there must be a DFA for Char as well as for a yet unknown... | [
0.2021104246377945,
-0.11386200785636902,
0.33757391571998596,
-0.3882644772529602,
-0.19127224385738373,
0.009325201623141766,
0.1604827344417572,
-0.4177974760532379,
0.09353702515363693,
-0.5045499801635742,
-0.05493694171309471,
0.5855922102928162,
-0.5612446069717407,
-0.0338741503655... | |
write the whole type parameter list on each call site.
```
def runDFA[D <: DFA[S] forSome { type S }, SQ <% Seq[D#Sigma]]( ... same as above
```
this didn't work (invalid circular reference to type D??? (what is it?))
I also deleted the type parameter, created an abstract type Sigma and tried binding that type in t... | [
0.11056888848543167,
-0.034307464957237244,
0.3150654733181,
-0.18837197124958038,
-0.18952418863773346,
-0.2335176169872284,
0.5307762622833252,
-0.4392962157726288,
0.03506523370742798,
-0.46351107954978943,
0.02082277461886406,
0.5293435454368591,
-0.6286904215812683,
0.0548498742282390... | |
is it impossible and what would have to be changed so it worked?
The reasons I want runDFA ro be a free function (not a method) is that I want other similar functions, like automaton minimization, regular language operations, NFA-to-DFA conversions, language factorization etc. and having all of this inside one class i... | [
0.042986031621694565,
-0.04906706511974335,
0.3396728038787842,
-0.13891874253749847,
-0.16294510662555695,
-0.0037555955350399017,
-0.032850231975317,
-0.14076188206672668,
0.08283812552690506,
0.008639070205390453,
0.0211250651627779,
0.5987306237220764,
-0.6859406232833862,
-0.311418682... | |
will automatically insert the conversion.
Additionally, what Jorge said about type parameters on D and making it a method on DFA hold. Because of the way inner classes work in Scala I would *strongly advise* putting runDFA on DFA. Until the path dependent typing stuff works, dealing with inner classes of some external... | [
0.122601218521595,
-0.4554983079433441,
0.20167751610279083,
-0.23979279398918152,
-0.22185452282428741,
-0.26768091320991516,
0.2271309196949005,
-0.4608687162399292,
0.0453997477889061,
-0.7288934588432312,
0.10596667975187302,
0.8431238532066345,
-0.5371887683868408,
-0.0729961916804313... | |
What successful conversion/rewrite have you done of software you were involved with? What where the languages and framework involved in the process? How large was the software in question? Finally what is the top one or two thing you learned from being involved with the process.
This is related to this [question](http... | [
0.1461041122674942,
0.1410651057958603,
0.03012138046324253,
0.2897970974445343,
0.015337483957409859,
-0.03955785185098648,
0.13520702719688416,
-0.3054807186126709,
-0.24049575626850128,
-0.2619350850582123,
-0.0021115653216838837,
0.7386032938957214,
-0.053057845681905746,
-0.0600828267... | |
I'm somewhat confused by the following behavior I'm seeing within an Xcode project compiled for the iPhone simulator (or device):
```
NSString *test = [[NSString alloc] initWithCString:"foo"];
NSLog(@"test retain count = %d", [test retainCount]); // prints 1
[test release];
NSLog(@"test retain count = %d", [test re... | [
0.36555320024490356,
0.375748872756958,
0.19052109122276306,
-0.13117700815200806,
0.32949408888816833,
-0.14031267166137695,
0.5775352716445923,
-0.1715262085199356,
0.027423422783613205,
-0.4725368916988373,
-0.1440695822238922,
0.5561714172363281,
-0.18233180046081543,
-0.02191132865846... | |
to do the above in practice. This was just a test to see why in some debugging cases a retain count of 1 wasn't actually reflecting the real state of an object. Thanks for your responses. This was just a test stub to see why I was seeing certain behavior in a few cases. What I'm really trying to do is track down a very... | [
0.6506553292274475,
0.13121454417705536,
0.05413353070616722,
0.31419286131858826,
-0.07908851653337479,
-0.15364603698253632,
0.4500587284564972,
-0.03059445135295391,
-0.5904636383056641,
-0.39102911949157715,
0.17004647850990295,
0.6551002860069275,
0.019359145313501358,
-0.217692598700... | |
is particularly true with string literals where the data is permanently available and is never really deleted.
Concentrate of ensuring your code follows the [Cocoa memory management rules](http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html) with respect to object ownership. Where nece... | [
0.005142516922205687,
0.26372095942497253,
0.028211142867803574,
0.19815640151500702,
0.073076032102108,
-0.06553887575864792,
0.44489017128944397,
-0.10656070709228516,
-0.5553804039955139,
-0.45153748989105225,
-0.4060647785663605,
0.8470350503921509,
0.11719870567321777,
-0.331223160028... | |
I would like to select a WPF TreeView Node on right click, right before the ContextMenu displayed.
For WinForms I could use code like this [Find node clicked under context menu](https://stackoverflow.com/questions/2527/c-treeview-context-menus), what are the WPF alternatives?
Depending on the way the tree was populate... | [
0.17363341152668,
-0.39570802450180054,
0.49541935324668884,
-0.12434104830026627,
-0.052395183593034744,
-0.048360615968704224,
0.17680203914642334,
-0.3880756199359894,
-0.03230633959174156,
-0.8507452011108398,
-0.20416264235973358,
0.8123759031295776,
-0.4586462080478668,
-0.0550375357... | |
e.Handled = true;
}
}
static TreeViewItem VisualUpwardSearch(DependencyObject source)
{
while (source != null && !(source is TreeViewItem))
source = VisualTreeHelper.GetParent(source);
return source as TreeViewItem;
}
``` | [
0.16682562232017517,
-0.2033667415380478,
0.395725816488266,
-0.05508256331086159,
-0.056852828711271286,
0.05137588083744049,
0.41436225175857544,
-0.12787722051143646,
-0.2655600309371948,
-0.5892012119293213,
-0.30612969398498535,
0.67606520652771,
-0.3455507755279541,
0.191794455051422... | |
So I'm hosting WCF service in a WinForms application. I have the following
```
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
InstanceContextMode = InstanceContextMode.PerCall)]
public class Test : ITest
{
public string TestIt(string input)
{
Thread.Sleep(5000);
return ... | [
0.5499807596206665,
-0.16511040925979614,
0.27540209889411926,
-0.2592281103134155,
0.0596243292093277,
-0.022329986095428467,
0.35814547538757324,
-0.34281110763549805,
-0.1571052521467209,
-1.1296457052230835,
-0.012888994067907333,
0.4497601389884949,
-0.13877828419208527,
0.50464928150... | |
calls the Test Service, Client2 doesn't have to wait till the first call is complete. However, when Client1 calls TestIt, Client2 blocks until the call from Client1 is complete!?!?! Shouldn't it make a new instance each time based on the above settings?
Also, is the best way to keep a WinForms application that is host... | [
0.3259490132331848,
-0.12369462847709656,
0.3121482729911804,
-0.010494635440409184,
-0.22476211190223694,
-0.20666179060935974,
0.5618592500686646,
-0.3919120132923126,
0.21431338787078857,
-0.6588794589042664,
-0.11333116143941879,
0.43790003657341003,
-0.22546261548995972,
0.21164833009... | |
default, if there is a synchronization context when service.Open() happens, WCF will pick it up and use it. But if you don't want that feature, this flag is how to turn it off. | [
0.1895778775215149,
-0.23880119621753693,
0.36359766125679016,
-0.02125670574605465,
0.16755220293998718,
-0.57990962266922,
0.49141162633895874,
0.1542297899723053,
-0.05214835703372955,
-0.6469542384147644,
-0.24869176745414734,
0.6070126295089722,
-0.38804689049720764,
0.316804766654968... | |
The query:
```
SELECT tbl1.*
FROM tbl1
JOIN tbl2
ON (tbl1.t1_pk = tbl2.t2_fk_t1_pk
AND tbl2.t2_strt_dt <= sysdate
AND tbl2.t2_end_dt >= sysdate)
JOIN tbl3 on (tbl3.t3_pk = tbl2.t2_fk_t3_pk
AND tbl3.t3_lkup_1 = 2577304
AND tbl3.t3_lkup_2 = 1220833)
where tbl2.t2_lkup_1 = 1020000002981587;
```
Facts:
* O... | [
-0.19532588124275208,
-0.11436034739017487,
0.08211111277341843,
0.2705170810222626,
0.3823532164096832,
0.2667025327682495,
0.14973653852939606,
-0.41930535435676575,
0.030807478353381157,
-0.7600999474525452,
-0.08316492289304733,
0.11036256700754166,
-0.5904419422149658,
0.1961229741573... | |
that
it should be faster if it could do a index query on tbl1.
Explain plan on a database with 11,000 rows in tbl1 and 3500 rows in
tbl2 shows that it's doing a full table scan on tbl1. Seems to me that
it should be faster if it could do a index query on tbl1.
Update: I tried the hint a few of you suggested, and the ... | [
0.45930156111717224,
-0.0315767303109169,
-0.2878430187702179,
0.2234243005514145,
0.0479680560529232,
0.2092084139585495,
-0.02851223014295101,
-0.12219478189945221,
-0.0710732638835907,
-0.7070688605308533,
0.05022120475769043,
0.40255773067474365,
-0.3605640232563019,
0.1767855137586593... | |
data (over 100,000 rows in tbl1 and 50,000 rows
in tbl2) were what it took to make it decide that indexes were worth it. Thanks to everybody who helped. I still think Oracle performance tuning is a black art, but I'm glad some of you understand it.
Further update: I've updated the question at the request of my former ... | [
0.3043091595172882,
0.16571034491062164,
0.11588206887245178,
0.2178429365158081,
-0.01800604723393917,
0.2200482338666916,
0.14808475971221924,
-0.027353310957551003,
-0.2265147864818573,
-0.5236523747444153,
0.17211614549160004,
0.5848007798194885,
0.16271723806858063,
-0.233205348253250... | |
it is doing are RANGE SCAN not UNIQUE SCAN. So its estimates of how many rows are being returned could easily be far off (whether statistics are up to date or not).
My guess is that its estimate of the final row count from the TABLE ACCESS of TBL2 is fairly high, so it thinks that it will find a large number of matche... | [
-0.02821415290236473,
-0.2365691363811493,
0.32295843958854675,
-0.13693168759346008,
-0.0660274550318718,
-0.30084869265556335,
0.28362196683883667,
-0.14270377159118652,
-0.20358969271183014,
-0.48664188385009766,
0.13464292883872986,
0.3417285084724426,
-0.25228744745254517,
0.067842632... | |
by the optimizer. | [
0.44966399669647217,
-0.0504852831363678,
0.3423563539981842,
0.12991507351398468,
0.1402536928653717,
0.10265519469976425,
-0.2812325954437256,
-0.2690323293209076,
0.09354463964700699,
-0.36053013801574707,
-0.4012572467327118,
0.8145087361335754,
-0.01057699229568243,
-0.413825660943985... | |
I'm setting up a database and I'm interested in having a facebook-like friends system.
My original plan was to have a table like so:
```
uid friends
4 30,23,12,33
30 54,92,108
```
with all these numbers being FK's to tables with user information.
I was told that this is inadvisable and practically impossible s... | [
0.08009567111730576,
0.3317435681819916,
0.31883665919303894,
0.04624895751476288,
-0.08720648288726807,
0.3286382853984833,
0.042630136013031006,
0.054289158433675766,
-0.5427592396736145,
-0.4651411771774292,
0.49668407440185547,
-0.16316139698028564,
-0.2407439649105072,
0.0150126051157... | |
54
30 92
30 108
```
ect.
Won't this leave me with an enormous number of rows? (tens of thousands?)
Is the first technique not worth it in terms of time and efficiency?
10's of thousands of rows is peanuts, even for Mysql. There is no other way to model a many-to-many relationship. You will have indexes on... | [
0.4533300995826721,
0.4113105535507202,
0.4419243037700653,
0.19154605269432068,
-0.07707460224628448,
0.13040542602539062,
-0.21680399775505066,
-0.16770926117897034,
-0.30708885192871094,
-0.43012237548828125,
0.30093762278556824,
0.3948827087879181,
-0.10313299298286438,
0.2207523435354... | |
[alt text http://agricam.net/test.gif](http://agricam.net/test.gif)
I need to add a row dynamically in SQL after the Marketer number changes with the header "Marketer Total" that should add only the "Total" column. For example, after the last row of Marketer 22 row, there should be "Marketer Total" and then under the ... | [
0.194300577044487,
0.03224333003163338,
0.22002561390399933,
-0.043635956943035126,
-0.2915743589401245,
0.4752342402935028,
-0.44985073804855347,
-0.14530496299266815,
-0.08990472555160522,
-0.3334805369377136,
0.13978198170661926,
0.47643038630485535,
0.19256873428821564,
0.5878959894180... | |
in SQL](http://www.odetocode.com/Articles/85.aspx)
implementation:
```
DECLARE @SOMETABLE TABLE (SUBMARKETER INT, GRADE CHAR, MARKETER INT,
DATE DATETIME, TOTAL INT)
INSERT INTO @SOMETABLE
SELECT 1415, 'A', 22, '02/25/2009', 26 UNION
SELECT 1415, 'B', 22, '02/25/2009', 93 UNION
SELECT 1415, 'C', 22, '02/25/2009',... | [
0.18503937125205994,
-0.05604555830359459,
0.4068334698677063,
-0.22627994418144226,
-0.059649739414453506,
0.46031156182289124,
-0.26227325201034546,
-0.15277282893657684,
0.3246989846229553,
-0.2510811984539032,
-0.14378224313259125,
0.181406170129776,
0.05429646372795105,
0.475540518760... | |
SUBMARKETER, GRADE, TOTAL, DATE
FROM (
SELECT MARKETER, SUBMARKETER, GRADE, SUM(TOTAL) AS TOTAL,
CONVERT(VARCHAR,DATE,101)[DATE]
FROM @SOMETABLE
WHERE DATE >= '2/25/2009' AND DATE < '2/26/2009'
AND MARKETER IN ('22','500')
GROUP BY MARKETER, SUBMARKETER, GRADE, DATE WITH ROLLUP
)M
WHER... | [
0.058405570685863495,
-0.38165730237960815,
0.5738081336021423,
-0.2024988979101181,
-0.009020092897117138,
0.613110363483429,
-0.1545119434595108,
-0.18786372244358063,
-0.2640943229198456,
-0.306958943605423,
-0.29968205094337463,
0.5463919043540955,
0.12209060788154602,
0.54933983087539... | |
fields in table, that will became an issue to filter out useless grouping. | [
-0.2028595507144928,
0.006370842456817627,
0.19224286079406738,
0.04271174594759941,
-0.21083082258701324,
-0.13446730375289917,
-0.2772080898284912,
-0.17642293870449066,
-0.34736186265945435,
-0.7007298469543457,
-0.0833977684378624,
0.14433424174785614,
-0.3871031403541565,
0.2084047049... | |
I have a control (derived from System.Windows.Forms.Control) which needs to be transparent in some areas. I have implemented this by using SetStyle():
```
public TransparentControl()
{
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent.
}
```
Now, this works if the... | [
0.17059846222400665,
-0.10730664432048798,
0.67514967918396,
-0.19522210955619812,
-0.08836149424314499,
-0.21013271808624268,
0.2630654573440552,
-0.27062028646469116,
0.12720158696174622,
-0.7533801198005676,
0.11752534657716751,
0.5811256170272827,
-0.35165533423423767,
0.08528844267129... | |
so:
```
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x20; // WS_EX_TRANSPARENT
return cp;
}
}
```
The problem here is that it *really* slows down the painting of the control. The control is already double buffered, so not... | [
0.3501523435115814,
0.08052009344100952,
0.4020424783229828,
0.07163209468126297,
0.24684745073318481,
-0.02498611994087696,
0.48458611965179443,
-0.25012773275375366,
-0.33076101541519165,
-0.655568540096283,
-0.016547201201319695,
0.4126562774181366,
-0.3370228111743927,
0.09126424044370... | |
but again, that does not work in my case.
EDIT: I should note that I do have a workaround. The child (transparent) controls could simply draw themselves onto the parent's Graphics object, but it is really ungly and I don't like the solution at all (though it may be all I have).
EDIT2: So, following the advice that I ... | [
-0.07785815745592117,
-0.012366407550871372,
0.5909262895584106,
0.15507519245147705,
-0.1934281885623932,
0.18034133315086365,
-0.07586570829153061,
-0.1231517493724823,
-0.1341516077518463,
-0.8215274214744568,
0.06291717290878296,
0.4216432571411133,
-0.27933308482170105,
0.042937610298... | |
Container property lines up correctly in the debugger, but I still do not get a transparency effect. Does anyone have any ideas?
I decided to simply paint the parent under my child controls manually. [Here is a good article.](http://componentfactory.blogspot.com/2005/06/net2-transparent-controls.html) | [
0.11227281391620636,
-0.17513792216777802,
0.27338963747024536,
0.04014425352215767,
0.09187860786914825,
-0.0031996110919862986,
-0.05998854339122772,
0.04858163744211197,
-0.3835185766220093,
-0.518584668636322,
0.046048011630773544,
0.18567676842212677,
-0.20057019591331482,
0.374504148... | |
I need to create one config option for my Rails application. It can be the same for all environments. I found that if I set it in `environment.rb`, it's available in my views, which is exactly what I want...
```
environment.rb
AUDIOCAST_URI_FORMAT = http://blablalba/blabbitybla/yadda
```
Works great.
However, I'm ... | [
0.43307358026504517,
0.0789615586400032,
0.20305633544921875,
0.06422094255685806,
-0.11938733607530594,
-0.18306708335876465,
0.17158842086791992,
-0.12185421586036682,
0.12738680839538574,
-0.7563508152961731,
0.07590039819478989,
0.9489408135414124,
-0.4013756513595581,
0.28798639774322... | |
<<: *defaults
production:
<<: *defaults
```
This configuration file gets loaded from a custom initializer in **config/initializers**:
```
# Rails 2
APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml")[RAILS_ENV]
# Rails 3+
APP_CONFIG = YAML.load_file(Rails.root.join('config/config.yml'))[Rails.env]
``... | [
-0.1423627883195877,
0.012650007382035255,
0.4805152118206024,
-0.09785721451044083,
-0.3578006625175476,
-0.21145989000797272,
0.4239865243434906,
-0.10272850841283798,
-0.3937133550643921,
-0.7340120673179626,
-0.3564275801181793,
0.6055132746696472,
-0.27125313878059387,
0.0432716943323... | |
I've seen a few JavaScript image rotators that use either the HTML5 canvas element or an AJAX call to a server-side script, but is it possible to do it without using those methods? Internet Explorer doesn't support canvas (I'm aware of excanvas, but I'd like to do without if possible) and I'm not sure if AJAX will be f... | [
0.42750120162963867,
-0.27825379371643066,
0.32838085293769836,
0.10031108558177948,
-0.3489621579647064,
-0.15302596986293793,
-0.1518261432647705,
0.21082907915115356,
-0.587605893611908,
-0.6315580606460571,
-0.04389018565416336,
0.41041022539138794,
-0.24047155678272247,
0.120302625000... | |
supported by Safari 4 and Firefox 3.1).
Your best bet is to use [Raphael](http://raphaeljs.com)'s image() and rotate(), which should support all semi-modern browsers (using SVG) and most versions of IE (using VML). | [
0.7380538582801819,
-0.19430066645145416,
0.6644285321235657,
-0.1970207840204239,
-0.16140232980251312,
-0.19925551116466522,
0.16012386977672577,
-0.2205697000026703,
-0.22927050292491913,
-0.438942551612854,
-0.05150483176112175,
0.587949275970459,
-0.19631192088127136,
-0.4586768448352... | |
For a web project I need the possibility to generate jpg and animated gif images very fast. As server platform I will use Linux and the [`NekoVM`](http://nekovm.org/) (behind a apache via `mod_tora`). As there is no library for image generation for [`Haxe`](http://haxe.org) and `neko` I am about to write a own one.
`N... | [
0.39186084270477295,
0.1952974498271942,
0.2534632980823517,
0.16608333587646484,
-0.21533465385437012,
-0.3134598731994629,
-0.11225150525569916,
0.032317545264959335,
-0.2214290350675583,
-0.6675022840499878,
-0.12073332071304321,
0.4976678490638733,
-0.24812519550323486,
0.0815226584672... | |
lot of stuff we don't need.
At the moment this works great, but it seems to be a little bit slow. Is there another popular open library that I could try to use for my purposes (and that is maybe faster)?
Have you tried [Magick++](http://www.imagemagick.org/Magick++/) and/or [MagickCore](http://www.imagemagick.org/api/... | [
0.5143967866897583,
-0.10553595423698425,
0.20250874757766724,
0.07429449260234833,
0.0582953616976738,
-0.16021139919757843,
0.0627768412232399,
-0.21395492553710938,
-0.284464031457901,
-0.6721423864364624,
0.0613643154501915,
0.892688512802124,
-0.2894764542579651,
-0.14331430196762085,... | |
I have a class that derives from ActiveRecord::Base.
This class has a subclass that is differentiated in the database by a type id column.
How do I make sure that all the inherited active record functions in the derived classes append the type\_id column to the conditions hash on any queries that are executed by the de... | [
0.25082340836524963,
-0.010618059895932674,
0.13230401277542114,
0.011452242732048035,
0.20058000087738037,
-0.0032717844005674124,
0.28757116198539734,
0.061983801424503326,
-0.01285240426659584,
-0.5820910930633545,
0.20199471712112427,
0.5887567400932312,
-0.24411137402057648,
0.1088217... | |
How would I validate that a program exists, in a way that will either return an error and exit, or continue with the script?
It seems like it should be easy, but it's been stumping me.
Answer
------
POSIX compatible:
```
command -v <the_command>
```
Example use:
```
if ! command -v <the_command> &> /dev/null
then... | [
0.19331716001033783,
0.2196897715330124,
0.22784388065338135,
0.03148781508207321,
0.059775084257125854,
-0.2671261429786682,
0.1926523745059967,
-0.5051568150520325,
-0.1471981704235077,
-0.4379841685295105,
-0.06127162650227547,
0.7810696959495544,
0.03334365785121918,
-0.143264755606651... | |
also rely on the builtins to actually do what you want, while the effects of external commands can easily vary from system to system.
Why care?
* Many operating systems have a `which` that **doesn't even set an exit status**, meaning the `if which foo` won't even work there and will **always** report that `foo` exist... | [
0.5654723644256592,
0.04442078247666359,
0.20404809713363647,
0.17045646905899048,
0.17609931528568268,
-0.4171857535839081,
0.2786954939365387,
-0.05657186731696129,
-0.262909471988678,
-0.4049125611782074,
-0.12600910663604736,
0.8010616302490234,
-0.3772733807563782,
-0.1371885687112808... | |
foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
```
```
type foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
```
```
hash foo 2>/dev/null || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
```
... | [
0.022841673344373703,
0.38485410809516907,
0.2580045461654663,
-0.5491509437561035,
0.0020365759264677763,
-0.07407747209072113,
0.785962700843811,
-0.534530758857727,
0.06708378344774246,
-0.2929762601852417,
-0.3402148485183716,
0.6397789120674133,
-0.5576418042182922,
-0.136236041784286... | |
the output (and dangerous!))
If your hash bang is `/bin/sh` then you should care about what POSIX says. `type` and `hash`'s exit codes aren't terribly well defined by POSIX, and `hash` is seen to exit successfully when the command doesn't exist (haven't seen this with `type` yet). `command`'s exit status is well defin... | [
-0.07717905193567276,
-0.12315007299184799,
0.3935200870037079,
0.1494661122560501,
0.26024147868156433,
-0.3833145201206207,
0.4555053114891052,
-0.11537241190671921,
-0.15809297561645508,
-0.4251289367675781,
-0.21690568327903748,
0.6952698826789856,
-0.2930665910243988,
0.09378837794065... | |
the command's location will be hashed (for faster lookup next time you use it), which is usually a good thing since you probably check for its existence in order to actually use it.
As a simple example, here's a function that runs `gdate` if it exists, otherwise `date`:
```
gnudate() {
if hash gdate 2>/dev/null; ... | [
0.15553855895996094,
-0.4482893943786621,
0.3601127564907074,
0.006831954699009657,
0.13494038581848145,
-0.1949349343776703,
0.1646682471036911,
-0.07168648391962051,
-0.054637134075164795,
-0.5399699807167053,
-0.3729686737060547,
0.569240152835846,
-0.30872997641563416,
-0.0970164388418... | |
can do:
```bash
checkBin <the_command> || errorMessage "This tool requires <the_command>. Install it please, and then run this tool again."
``` | [
0.22189132869243622,
0.23070651292800903,
0.17895665764808655,
-0.12598830461502075,
0.24879783391952515,
-0.42396920919418335,
0.41550540924072266,
-0.4015624225139618,
-0.21309338510036469,
-0.6420214772224426,
-0.280023455619812,
1.114140510559082,
-0.25568658113479614,
-0.1043375134468... | |
I am using the excellent [jQuery MultiSelect](http://abeautifulsite.net/notebook/62) plugin.
The problem I have is that I would like to submit the form when the values have changed.
Having all sorts of trouble getting this one working, does anyone have insight into how to achieve this?
Also open to alternative jQue... | [
0.008120843209326267,
0.010684439912438393,
0.5112907290458679,
-0.17568546533584595,
-0.17238633334636688,
-0.035970624536275864,
0.45108386874198914,
-0.21693898737430573,
-0.049489814788103104,
-0.8202207088470459,
-0.249716654419899,
0.5898609161376953,
-0.34926706552505493,
0.02575144... | |
// Default options
if( !o ) var o = {};
if( o.selectAll == undefined ) o.selectAll = true;
if( o.selectAllText == undefined ) o.selectAllText = "Select All";
if( o.noneSelected == undefined ) o.noneSelected = 'Select options';
if( | [
-0.4363510310649872,
-0.629770040512085,
0.22185561060905457,
-0.35004422068595886,
0.6658704280853271,
0.3477800488471985,
0.08079247921705246,
0.1189885064959526,
-0.16404786705970764,
-0.453462153673172,
-0.6283555030822754,
0.826887309551239,
-0.21596603095531464,
-0.3148140609264374,
... | |
o.oneOrMoreSelected == undefined ) o.oneOrMoreSelected = '% selected';
// Initialize each multiSelect
$(this).each( function() {
var select = $(this);
var html = '<input type="text" readonly="readonly" class="multiSelect" value="" style="cursor: default;" />';
... | [
-0.298594206571579,
-0.21812498569488525,
0.5634639263153076,
-0.3091813623905182,
0.09699404239654541,
0.34258022904396057,
0.11400274187326431,
-0.3328799307346344,
-0.1567801982164383,
-0.6207998991012573,
-0.23405878245830536,
0.4790356755256653,
-0.4624377489089966,
0.0358378775417804... | |
class="multiSelectOptions" style="position: absolute; z-index: 99999; display: none;">';
if( o.selectAll ) html += '<label class="selectAll"><input type="checkbox" class="selectAll" />' + o.selectAllText + '</label>';
$(select).find('OPTION').each( function() {
if( $(... | [
-0.3230804204940796,
-0.48546451330184937,
0.5284073352813721,
-0.14361119270324707,
0.1680455505847931,
0.17612746357917786,
0.13012291491031647,
-0.3016148507595062,
-0.12463647872209549,
-0.580105721950531,
-0.5691754221916199,
0.537231981754303,
-0.23431873321533203,
0.0427930168807506... | |
html += '<label><input type="checkbox" name="' + $(select).attr('name') + '" value="' + $(this).val() + '"';
if( $(this).attr('selected') ) html += ' checked="checked"';
html += ' />' + $(this).html() + '</label>';
} | [
-0.21402454376220703,
-0.2620581388473511,
0.5492752194404602,
-0.10361348092556,
-0.22658854722976685,
-0.07501921057701111,
0.3376922607421875,
-0.39659449458122253,
-0.10826300829648972,
-0.6517518162727356,
-0.6556902527809143,
0.22311770915985107,
-0.6123640537261963,
-0.1322358250617... | |
});
html += '</div>';
$(select).after(html);
// Events
$(select).next('.multiSelect').mouseover( function() { | [
-0.1716277301311493,
-0.4785015285015106,
0.5261944532394409,
-0.40347787737846375,
0.6472290754318237,
0.03937448188662529,
0.4262140393257141,
-0.24882842600345612,
-0.11045132577419281,
-0.5626442432403564,
-0.2694269120693207,
0.5738788843154907,
-0.323049932718277,
0.01410529203712940... | |
$(this).addClass('hover');
}).mouseout( function() {
$(this).removeClass('hover');
}).click( function() {
// Show/hide on click | [
0.016668124124407768,
-0.33131539821624756,
0.3936159312725067,
-0.5087561011314392,
0.41853803396224976,
0.03440403193235397,
0.5192804932594299,
-0.19464944303035736,
0.05422100052237511,
-0.47316330671310425,
-0.13841253519058228,
0.6068556904792786,
-0.6764459609985352,
0.1406067013740... | |
if( $(this).hasClass('active') ) {
$(this).multiSelectOptionsHide();
} else {
$(this).multiSelectOptionsShow();
} | [
0.16012170910835266,
-0.2915019690990448,
0.22579826414585114,
-0.2540452480316162,
0.1068534180521965,
-0.34822019934654236,
0.4146784245967865,
-0.5331956744194031,
-0.44593074917793274,
-0.6144494414329529,
-0.43711575865745544,
0.64719158411026,
-0.48850539326667786,
0.1085768193006515... | |
return false;
}).focus( function() {
// So it can be styled with CSS
$(this).addClass('focus');
}).blur( function() { | [
0.41963931918144226,
-0.40627291798591614,
0.5778707265853882,
-0.27101853489875793,
-0.07564786821603775,
0.08826500177383423,
0.42335963249206543,
-0.2185375839471817,
0.08578559011220932,
-0.5918176770210266,
-0.26065272092819214,
0.7330783009529114,
-0.6166977286338806,
-0.044943027198... | |
// So it can be styled with CSS
$(this).removeClass('focus');
});
// Determine if Select All should be checked initially | [
0.43573063611984253,
-0.3632156252861023,
0.14126631617546082,
-0.20089207589626312,
0.16184191405773163,
-0.014868516474962234,
0.32449766993522644,
-0.1387154906988144,
-0.024291427806019783,
-0.45578140020370483,
-0.4827035367488861,
0.4583510160446167,
-0.5063520669937134,
-0.215640828... | |
if( o.selectAll ) {
var sa = true;
$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT:checkbox').not('.selectAll').each( function() {
if( !$(this).attr('checked') ) sa = false;
}); | [
-0.24306531250476837,
-0.26935380697250366,
0.2244734913110733,
-0.4709256887435913,
0.3709549307823181,
0.38307443261146545,
0.365122526884079,
-0.4288323223590851,
0.10039622336626053,
-0.39460453391075134,
-0.511735737323761,
0.472725510597229,
-0.33811435103416443,
0.08590012043714523,... | |
if( sa ) $(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT.selectAll').attr('checked', true).parent().addClass('checked');
}
// Handle Select All
$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT.selectAll').click( function() {
... | [
-0.1248854398727417,
-0.39471641182899475,
0.23687542974948883,
-0.2552989423274994,
0.12343216687440872,
0.3643028736114502,
0.38970622420310974,
-0.31091707944869995,
0.000057089233450824395,
-0.6700037121772766,
-0.3323858082294464,
0.30878910422325134,
-0.3621135950088501,
0.1715784221... | |
true).parent().addClass('checked'); else $(this).parent().parent().find('INPUT:checkbox').attr('checked', false).parent().removeClass('checked');
});
// Handle checkboxes
$(select).next('.multiSelect').next('.multiSelectOptions').find('INPUT:checkbox').click( function() ... | [
-0.00509046483784914,
-0.257176011800766,
0.14546558260917664,
-0.13562335073947906,
0.20164988934993744,
0.24677112698554993,
0.47272953391075134,
-0.2351037561893463,
-0.1311909556388855,
-0.5432299375534058,
-0.38214170932769775,
0.4098736345767975,
-0.4918264150619507,
0.29243838787078... | |
$(this).parent().parent().prev('.multiSelect').focus();
if( !$(this).attr('checked') ) $(this).parent().parent().find('INPUT:checkbox.selectAll').attr('checked', false).parent().removeClass('checked');
if( callback ) callback($(this));
});
// Init... | [
-0.018198613077402115,
-0.26177966594696045,
0.31970280408859253,
-0.3190976083278656,
0.08016804605722427,
0.24958720803260803,
0.29575133323669434,
-0.06331191956996918,
0.07163769006729126,
-0.5925790071487427,
-0.5713975429534912,
0.5504549145698547,
-0.4956201910972595,
0.215853065252... | |
$(select).next('.multiSelect').next('.multiSelectOptions').each( function() {
$(this).multiSelectUpdateSelected(o);
$(this).find('INPUT:checked').parent().addClass('checked');
});
// Handle hovers | [
-0.0013805661583319306,
-0.19462648034095764,
0.20042596757411957,
-0.3224744200706482,
0.31763219833374023,
0.3773133456707001,
0.0354372039437294,
-0.4158603250980377,
-0.23090682923793793,
-0.4852026402950287,
-0.2271987348794937,
0.39491522312164307,
-0.23803827166557312,
0.14968319237... | |
$(select).next('.multiSelect').next('.multiSelectOptions').find('LABEL').mouseover( function() {
$(this).parent().find('LABEL').removeClass('hover');
$(this).addClass('hover');
}).mouseout( function() {
$(this).parent().find('LABEL').removeClas... | [
-0.19693027436733246,
-0.4424898624420166,
0.1776433140039444,
-0.3485845923423767,
0.6014280915260315,
0.1613479107618332,
0.399486243724823,
-0.2974523603916168,
-0.00007532146264566109,
-0.5550075769424438,
-0.38060471415519714,
0.6174306869506836,
-0.36516278982162476,
0.31352019309997... | |
});
// Keyboard
$(select).next('.multiSelect').keydown( function(e) {
// Is dropdown visible?
if( $(this).next('.multiSelectOptions').is(':visible') ) { | [
-0.3166353106498718,
-0.41713541746139526,
0.6302808523178101,
-0.45098328590393066,
0.49497929215431213,
0.22032956779003143,
0.26742038130760193,
-0.0787397027015686,
-0.3296462893486023,
-0.35505160689353943,
-0.48422953486442566,
0.694360613822937,
-0.3007722795009613,
-0.0188330579549... | |
// Dropdown is visible
// Tab
if( e.keyCode == 9 ) {
$(this).addClass('focus').trigger('click'); // esc, left, right - hide | [
0.2643665671348572,
-0.5552510023117065,
0.47329071164131165,
-0.36931559443473816,
0.39815884828567505,
0.11660373955965042,
0.24408923089504242,
-0.08680599182844162,
-0.1815648376941681,
-0.28296199440956116,
-0.29444923996925354,
0.6220818758010864,
-0.25097936391830444,
-0.20489962399... | |
$(this).focus().next(':input').focus();
return true;
} | [
0.291340172290802,
-0.2343185395002365,
0.21818123757839203,
-0.3865511417388916,
0.42154720425605774,
0.16904549300670624,
0.4755413234233856,
-0.0944390520453453,
0.0383981354534626,
-0.47886180877685547,
-0.5756292343139648,
0.955489456653595,
-0.3457927405834198,
0.04993712902069092,
... | |
// ESC, Left, Right
if( e.keyCode == 27 || e.keyCode == 37 || e.keyCode == 39 ) {
// Hide dropdown
$(this).addClass('focus').trigger('click'); | [
0.26477110385894775,
-0.4693734049797058,
0.4719344675540924,
-0.4320979118347168,
0.46996158361434937,
0.004899068269878626,
0.20939072966575623,
-0.20511265099048615,
-0.05763301998376846,
-0.2662755846977234,
-0.42485159635543823,
0.6885819435119629,
-0.4103180170059204,
-0.098302416503... | |
}
// Down
if( e.keyCode == 40 ) { | [
-0.17670805752277374,
0.03258328512310982,
0.44113874435424805,
-0.23383136093616486,
0.6739578247070312,
0.12763363122940063,
0.0627676397562027,
-0.3526419401168823,
-0.184790700674057,
-0.25374722480773926,
-0.3993472754955292,
0.5808008313179016,
-0.11578189581632614,
-0.13003832101821... | |
if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
// Default to first item
$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover'); | [
-0.22374597191810608,
-0.3730173110961914,
0.34560710191726685,
-0.21705913543701172,
0.3181550204753876,
-0.06026434153318405,
-0.007049675099551678,
-0.2680092453956604,
-0.17259643971920013,
-0.6732640862464905,
-0.5665234327316284,
0.5183447003364563,
-0.3095226585865021,
0.14137177169... | |
} else {
// Move down, cycle to top if on bottom
$(this).next('.multiSelectOptions').find('LABEL.hover').removeClass('hover').next('LABEL').addClass('hover'); | [
-0.1859113872051239,
-0.3879038989543915,
0.10217741876840591,
-0.19243626296520233,
0.49762919545173645,
0.14648792147636414,
0.12882712483406067,
-0.2601708471775055,
-0.25955143570899963,
-0.6847456097602844,
-0.3401625454425812,
0.460943341255188,
-0.30678725242614746,
0.15579770505428... | |
if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
} | [
-0.288221538066864,
-0.34537237882614136,
0.22629882395267487,
-0.17907990515232086,
0.25928711891174316,
-0.23115120828151703,
0.008793704211711884,
-0.3059423863887787,
-0.2552197277545929,
-0.7142579555511475,
-0.4420677721500397,
0.4648876488208771,
-0.3467860519886017,
0.0409089997410... | |
}
return false;
}
// Up | [
0.1516985446214676,
0.2035149335861206,
0.06274552643299103,
-0.10678249597549438,
0.23863719403743744,
0.2951819896697998,
0.19514375925064087,
-0.364187091588974,
-0.27510568499565125,
-0.24708250164985657,
-0.25524428486824036,
0.7544599771499634,
-0.1678379774093628,
0.0316559858620166... | |
if( e.keyCode == 38 ) {
if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
// Default to first item | [
-0.18605273962020874,
-0.4544738829135895,
0.4599458575248718,
-0.00319753959774971,
0.2058664858341217,
0.08672252297401428,
0.052615687251091,
-0.3481912314891815,
-0.330399751663208,
-0.5905554890632629,
-0.513821542263031,
0.4434781074523926,
-0.13641022145748138,
0.2735985815525055,
... | |
$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
} else {
// Move up, cycle to bottom if on top | [
-0.05444806069135666,
-0.2839653193950653,
0.22065044939517975,
-0.1002410501241684,
0.3594740331172943,
0.11570862680673599,
0.12554152309894562,
-0.3473570644855499,
-0.4578932821750641,
-0.6040539145469666,
-0.20181593298912048,
0.5483830571174622,
-0.21429584920406342,
0.10095207393169... | |
$(this).next('.multiSelectOptions').find('LABEL.hover').removeClass('hover').prev('LABEL').addClass('hover');
if( !$(this).next('.multiSelectOptions').find('LABEL').hasClass('hover') ) {
$(this).next('.multiSelectOptions').find('LABEL:last').addClass('... | [
-0.1427106112241745,
-0.3664683997631073,
0.3498378396034241,
-0.2672528326511383,
0.20765326917171478,
-0.1202964335680008,
0.11889360100030899,
-0.3369746506214142,
-0.17143380641937256,
-0.7321979999542236,
-0.507959246635437,
0.44205230474472046,
-0.2446039915084839,
0.2161103039979934... | |
}
}
return false; | [
-0.11579488217830658,
0.2314775586128235,
-0.29676347970962524,
-0.3971431851387024,
0.31216317415237427,
-0.18630394339561462,
0.646827757358551,
0.2953055799007416,
0.31927189230918884,
0.03063158132135868,
-0.19840586185455322,
1.0542834997177124,
-0.2468930035829544,
0.0259189568459987... | |
}
// Enter, Space
if( e.keyCode == 13 || e.keyCode == 32 ) {
// Select All | [
-0.44883930683135986,
0.176596537232399,
0.07533315569162369,
-0.11222655326128006,
0.5646706223487854,
0.2925563156604767,
0.15559150278568268,
-0.46788185834884644,
0.042549505829811096,
-0.5062458515167236,
-0.5268305540084839,
0.12628288567066193,
-0.3174845278263092,
-0.01098723057657... | |
if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').hasClass('selectAll') ) {
if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked') ) {
// Uncheck all | [
-0.29762038588523865,
-0.05984826385974884,
0.21035248041152954,
-0.14702866971492767,
0.20348362624645233,
-0.08768591284751892,
0.23277762532234192,
-0.46895283460617065,
-0.13612152636051178,
-0.5361286997795105,
-0.5159769654273987,
0.5417894124984741,
-0.5530857443809509,
0.1020825728... | |
$(this).next('.multiSelectOptions').find('INPUT:checkbox').attr('checked', false).parent().removeClass('checked');
} else { | [
0.007566067855805159,
-0.20936422049999237,
-0.1886223405599594,
-0.05994764342904091,
0.34866777062416077,
0.05882536619901657,
0.46557098627090454,
-0.1625286191701889,
0.1049523800611496,
-0.4235755205154419,
-0.2324856072664261,
0.5828772783279419,
-0.49017590284347534,
0.2527539134025... | |
// Check all
$(this).next('.multiSelectOptions').find('INPUT:checkbox').attr('checked', true).parent().addClass('checked');
} | [
0.13122229278087616,
-0.2242533266544342,
-0.1731557846069336,
0.03098067082464695,
0.28263553977012634,
0.06621671468019485,
0.2585168182849884,
-0.022433077916502953,
0.16564935445785522,
-0.5430299639701843,
-0.20910246670246124,
0.5921180248260498,
-0.38197898864746094,
0.0039903521537... | |
$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
if( callback ) callback($(this));
return false; | [
0.07683420181274414,
-0.14343714714050293,
0.38327157497406006,
-0.41124361753463745,
0.25429433584213257,
0.09677701443433762,
0.3097245991230011,
-0.3702528774738312,
-0.26165589690208435,
-0.20586739480495453,
-0.33181998133659363,
0.6088922023773193,
-0.3931236267089844,
0.379826813936... | |
}
// Other checkboxes
if( $(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked') ) {
// Uncheck | [
-0.11254521459341049,
-0.08733543008565903,
0.0850730761885643,
-0.09750302135944366,
0.2426920384168625,
0.05323243513703346,
0.21446940302848816,
-0.3151290714740753,
-0.07691652327775955,
-0.5643825531005859,
-0.23139475286006927,
0.2961656451225281,
-0.4611477255821228,
0.0436755940318... | |
$(this).next('.multiSelectOptions').find('LABEL.hover INPUT:checkbox').attr('checked', false);
$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
$(this).next('.multiSelectOptions').find('LABEL').removeClass('checked').find('INPUT:checked').... | [
0.061071913689374924,
-0.21831625699996948,
0.015986021608114243,
-0.13062366843223572,
0.058910418301820755,
0.2553532123565674,
0.32265952229499817,
-0.1332872062921524,
-0.2008563131093979,
-0.5543842911720276,
-0.4357454478740692,
0.3976045548915863,
-0.39964306354522705,
0.21843343973... | |
// Select all status can't be checked at this point
$(this).next('.multiSelectOptions').find('INPUT:checkbox.selectAll').attr('checked', false).parent().removeClass('checked'); | [
0.1901487559080124,
-0.38370686769485474,
-0.08896230161190033,
-0.13811001181602478,
0.4364328682422638,
0.020301153883337975,
0.33488908410072327,
0.10781577229499817,
0.10646586120128632,
-0.5176758766174316,
-0.3353874087333679,
0.45723384618759155,
-0.3359962999820709,
0.2087876349687... | |
if( callback ) callback($(this));
} else {
// Check
$(this).next('.multiSelectOptions').find('LABEL.hover | [
-0.08294188231229782,
-0.15054498612880707,
0.44936689734458923,
-0.30444929003715515,
0.3289210796356201,
-0.10013000667095184,
0.19493122398853302,
-0.5284967422485352,
-0.2640874981880188,
-0.4754585921764374,
-0.2879163324832916,
0.7873133420944214,
-0.3812151551246643,
0.2957194149494... | |
INPUT:checkbox').attr('checked', true);
$(this).next('.multiSelectOptions').multiSelectUpdateSelected(o);
$(this).next('.multiSelectOptions').find('LABEL').removeClass('checked').find('INPUT:checked').parent().addClass('checked');
... | [
0.030724365264177322,
-0.3316517472267151,
0.1538146436214447,
-0.0757465735077858,
0.27141284942626953,
0.20815660059452057,
0.2722882926464081,
-0.13997426629066467,
-0.1765349954366684,
-0.45115193724632263,
-0.36756742000579834,
0.4484378397464752,
-0.3991231322288513,
0.15200982987880... | |
callback($(this));
}
}
return false;
} else { | [
-0.12143764644861221,
-0.19437409937381744,
0.0035132647026330233,
-0.4852065443992615,
-0.0229547880589962,
-0.19931308925151825,
0.4169985055923462,
-0.3405866324901581,
0.17854303121566772,
0.032508011907339096,
-0.35997748374938965,
1.0590169429779053,
-0.48735901713371277,
0.186109364... | |
// Dropdown is not visible
if( e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13 || e.keyCode == 32 ) { // down, enter, space - show | [
-0.06011611223220825,
-0.08746156841516495,
0.4684252440929413,
-0.16475749015808105,
0.2782527506351471,
0.20137925446033478,
0.0997312143445015,
-0.049523841589689255,
-0.3492754101753235,
-0.21931283175945282,
-0.6891013979911804,
0.0578639879822731,
-0.1955091506242752,
0.0400868058204... | |
// Show dropdown
$(this).removeClass('focus').trigger('click');
$(this).next('.multiSelectOptions').find('LABEL:first').addClass('hover');
return false; | [
0.25215840339660645,
-0.4023868441581726,
0.17634476721286774,
-0.2929288446903229,
0.17978595197200775,
0.037008136510849,
0.3608371913433075,
-0.11442511528730392,
-0.021061213687062263,
-0.31004080176353455,
-0.434024840593338,
0.6881162524223328,
-0.285392165184021,
0.11096252501010895... | |
}
// Tab key
if( e.keyCode == 9 ) {
// Shift focus | [
0.35019633173942566,
-0.47315526008605957,
0.347579687833786,
-0.49946147203445435,
0.1386430710554123,
0.24909265339374542,
-0.0951387882232666,
0.0916985496878624,
-0.023479420691728592,
-0.41251707077026367,
-0.47776561975479126,
0.7618248462677002,
-0.33036085963249207,
-0.103386491537... | |
to next INPUT element on page
$(this).focus().next(':input').focus();
return true;
} | [
0.019657423719763756,
-0.12530893087387085,
0.5522423982620239,
-0.4126407504081726,
0.3077755570411682,
0.19156472384929657,
0.24483633041381836,
-0.12618295848369598,
-0.024754909798502922,
-0.8006486892700195,
-0.6321619153022766,
0.6975160837173462,
-0.3045819401741028,
0.0057110120542... | |
}
// Prevent enter key from submitting form
if( e.keyCode == 13 ) return false;
});
// Eliminate the original form element | [
-0.19427794218063354,
-0.11736561357975006,
0.1864168345928192,
-0.4440891146659851,
0.019653035327792168,
-0.19401401281356812,
0.48957064747810364,
-0.5781667828559875,
0.31972697377204895,
-0.3686443269252777,
-0.43487808108329773,
0.36908018589019775,
-0.3596104681491852,
0.15168708562... | |
$(select).remove();
});
},
// Hide the dropdown
multiSelectOptionsHide: function() {
$(this).removeClass('active').next('.multiSelectOptions').hide();
if( postback ) postback($(this));
},
// Show the dropdown | [
-0.08042815327644348,
-0.564617395401001,
0.165321946144104,
-0.3182031512260437,
0.13827650249004364,
0.08220156282186508,
0.4425393342971802,
-0.4148050844669342,
-0.23136591911315918,
-0.34363287687301636,
-0.3661777675151825,
0.5069478154182434,
-0.4648517966270447,
0.15147776901721954... | |
multiSelectOptionsShow: function() {
// Hide any open option boxes
$('.multiSelect').multiSelectOptionsHide();
$(this).next('.multiSelectOptions').find('LABEL').removeClass('hover');
$(this).addClass('active').next('.multiSelectOptions').show();
// Position i... | [
0.13342683017253876,
-0.3761098086833954,
0.3913246989250183,
-0.27339881658554077,
0.07131849229335785,
0.10608449578285217,
0.18174026906490326,
-0.6761234402656555,
-0.3674083948135376,
-0.4496287405490875,
-0.2794114649295807,
0.42824071645736694,
-0.4835584759712219,
0.064511522650718... | |
$(this).next('.multiSelectOptions').css({ top: offset.top + $(this).outerHeight() + 'px' });
$(this).next('.multiSelectOptions').css({ left: offset.left + 'px' });
// Disappear on hover out
multiSelectCurrent = $(this);
var timer = '';
$(this).next('.multiSe... | [
-0.17129738628864288,
-0.11167097836732864,
0.6282442808151245,
-0.44982045888900757,
0.323047935962677,
0.26638710498809814,
0.1883859485387802,
-0.258878231048584,
-0.3634492754936218,
-0.4167516827583313,
-0.32194092869758606,
0.46422097086906433,
-0.4314965605735779,
0.2643838226795196... | |
clearTimeout(timer);
}, function() {
timer = setTimeout('$(multiSelectCurrent).multiSelectOptionsHide(); $(multiSelectCurrent).unbind("hover");', 250);
});
},
// Update the textbox with the total number of selected items
multiSelectUpdateSelected: functi... | [
-0.23256762325763702,
-0.2457377314567566,
0.7597207427024841,
-0.20919255912303925,
0.24289610981941223,
0.5339843034744263,
0.2660611569881439,
-0.2786223590373993,
-0.33212700486183167,
-0.5506170988082886,
-0.4128481149673462,
0.38968735933303833,
-0.16972140967845917,
0.16765537858009... | |
s = '';
$(this).find('INPUT:checkbox:checked').not('.selectAll').each( function() {
i++;
})
if( i == 0 ) {
$(this).prev('INPUT.multiSelect').val( o.noneSelected );
} else { | [
-0.017794836312532425,
-0.2897275984287262,
0.5096217393875122,
-0.38018855452537537,
0.2217300832271576,
0.3744053244590759,
0.4221591651439667,
-0.48129186034202576,
-0.1617966890335083,
-0.70964115858078,
-0.5769935250282288,
0.4687139391899109,
-0.34871020913124084,
0.23966233432292938... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.