text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
|^&\#60;(b|h)r\s?(&\#47;)?&\#62;$
|^&\#60;a(?!&\#62;).+?&\#62;$
|^&\#60;img(?!&\#62;).+?(&\#47;)?&\#62;$",
RegexOptions.Singleline |
RegexOptions.IgnorePatternWhitespace |
RegexOptions.ExplicitCapture
RegexOptions.Compiled
);
```
Update 2:
You might be interested in this [xss](http://ha.cke... | [
0.05066731944680214,
0.02191099524497986,
0.6643613576889038,
-0.09545238316059113,
0.1840977668762207,
0.08591774851083755,
0.37474098801612854,
-0.12088221311569214,
-0.28309711813926697,
-0.674187421798706,
-0.5585976839065552,
0.22089144587516785,
-0.6242898106575012,
0.086242713034152... | |
It's quite some time that I'm trying to figure out this problem and from googling around many people have similar problems.
I'm trying to model a User in a Social Network, using Hibernate, and what is more basic to a social network than to map a friendship relation?
Every user in the system should have a list of it's ... | [
0.13391616940498352,
-0.05741611495614052,
0.0706312358379364,
-0.007638671901077032,
-0.12685519456863403,
-0.18712028861045837,
0.13167664408683777,
-0.2477978765964508,
-0.18868565559387207,
-0.7647850513458252,
0.35830384492874146,
0.5355504155158997,
-0.3385135233402252,
0.17839525640... | |
= null;
@ManyToMany
protected List<User> friends = null
}
```
The problem now is that it tells me I use ManyToMany wrongly by having no clear distinction between friend and befriended. So far so good, I get the error, but how can I do what I want?
Any idea? I've reached the end of my wisdom.
The fact about Man... | [
0.1388361006975174,
-0.12449444085359573,
0.6471701860427856,
-0.37039169669151306,
-0.06800440698862076,
-0.3173644244670868,
0.3582752048969269,
-0.2377597689628601,
-0.12244650721549988,
-0.7971700429916382,
0.03348546847701073,
0.7961521744728088,
-0.3454746901988983,
0.030391085892915... | |
@ManyToMany
@JoinTable(name = "user_friends",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "friend_id"))
protected List friends = null;
@ManyToMany(mappedBy = "friends")
protected List befriended = null;
}
```
Hope it works =)
EDIT: Also, be very ca... | [
0.2582683563232422,
-0.23724445700645447,
0.23058463633060455,
-0.029153233394026756,
-0.2195504605770111,
-0.3393746018409729,
0.5823745131492615,
-0.3272198736667633,
0.14375807344913483,
-0.5841745138168335,
0.1673879772424698,
0.710604727268219,
-0.35918283462524414,
0.1145851612091064... | |
I have a service that returns a collection of MyClass objects.
If all of the MyClass instances have null in MyClass2Reference then everything works fine.
Otherwise, I get a "Connection reset" error on the client side.
What am I doing wrong?
```
[DataContract]
public MyClass
{
[DataMember]
int ID;
[DataMember]
MyClass2... | [
-0.14426575601100922,
-0.0731235146522522,
0.07451238483190536,
-0.1186593696475029,
-0.14111477136611938,
0.03175441548228264,
0.7648558020591736,
-0.2844500243663788,
-0.1879197657108307,
-0.7585944533348083,
0.06649015843868256,
0.5039941072463989,
-0.19928738474845886,
0.30141115188598... | |
small then this is what I'd do.
It's pretty common to split things like this based on input size or type. Algorithms have different strengths or weaknesses and it would be foolish to use one where another would be better... In this case Namin's method is O(n), but has a larger constant factor than the O(n log n) sorte... | [
0.025198375806212425,
0.0027734769973903894,
0.023974517360329628,
-0.18818947672843933,
0.00864866841584444,
0.184245303273201,
-0.09861268103122711,
-0.668192446231842,
-0.3454594612121582,
-0.5305786728858948,
0.20327147841453552,
0.37101617455482483,
-0.36925697326660156,
0.42294880747... | |
Here's one I have always wondered about...
Please excuse my naivety, but - How do you decide what version number to name your software?
I assume, when somebody creates a "final" version of an application/program it is version 1.0? - Then, what happens when you update it, how do you decide to call it 1.1 or 1.03 etc e... | [
0.338599294424057,
0.08314333856105804,
0.2582491934299469,
-0.09581945091485977,
-0.10832089185714722,
-0.2511737644672394,
0.01364096812903881,
0.043547723442316055,
-0.2592529058456421,
-0.3088016211986542,
-0.1856805831193924,
0.4395796060562134,
-0.15234223008155823,
0.362057477235794... | |
version number, where each number means:
**breaking.feature.fix**
* **breaking**: Something has changed that means code/expectations must change
* **feature**: Something new is added, but old code/expectations will still work fine.
* **fix**: Nothing's new, but a bug has been fixed.
I leave my old answer below, as i... | [
0.23112449049949646,
-0.002868657698854804,
0.5950095057487488,
-0.17758309841156006,
-0.11472828686237335,
-0.08411845564842224,
0.13811048865318298,
0.2966204881668091,
-0.39064112305641174,
-0.504270076751709,
-0.18206411600112915,
0.6137717366218567,
-0.16812101006507874,
0.31692510843... | |
you choose to use the w.xyz format, you only get 9 digits before overflow. However, if you're releasing that often, you may have a bigger problem.
Let's illustrate with FooApp, my new product!
* 0.9 - The first public beta
* 0.91 - The second public beta
* 0.911 - The emergency beta release to fix a crash on the Mot... | [
0.4563763439655304,
-0.01672430709004402,
0.38645607233047485,
-0.2221309244632721,
-0.15485677123069763,
-0.08176589757204056,
0.5744403600692749,
0.1723213940858841,
-0.20426790416240692,
-0.5293506979942322,
-0.024630310013890266,
0.7048066258430481,
-0.48717424273490906,
-0.11251385509... | |
What is the cleanest way to align properly radio buttons / checkboxes with text? The only reliable solution which I have been using so far is table based:
```
<table>
<tr>
<td><input type="radio" name="opt"></td>
<td>Option 1</td>
</tr>
<tr>
<td><input type="radio" name="opt"></td>
<td>Option 2</td>
</... | [
0.030725369229912758,
0.18562504649162292,
0.3497469127178192,
-0.06977497041225433,
-0.17629212141036987,
-0.034587789326906204,
0.5630900263786316,
-0.6234604120254517,
-0.03269108384847641,
-0.6612520813941956,
-0.021931041032075882,
0.721425473690033,
-0.2872256636619568,
-0.3581174910... | |
differently in different browsers. Ideally, I would like to find a solution which does not assume anything about sizes or special browser quirks. I’m fine with using tables, but I wonder where there is another solution.
I think I have finally solved the problem. One commonly recommended solution is to use vertical-alig... | [
0.3573687672615051,
0.2359558343887329,
0.4013327658176422,
-0.2646728754043579,
-0.04307703673839569,
-0.1305619478225708,
0.3473708927631378,
0.011125130578875542,
-0.21737301349639893,
-0.8228248953819275,
-0.16006851196289062,
0.48693588376045227,
-0.0251871719956398,
0.050955921411514... | |
should be in the perfect centre (the x-height is the height of the character x). However, the problem seems to be caused by the fact browsers commonly add some random uneven margins to radio buttons and checkboxes. One can check, for instance in Firefox using Firebug, that the default checkbox margin in Firefox is `3px... | [
0.030255844816565514,
0.18836086988449097,
0.866793692111969,
-0.0048074922524392605,
-0.11481433361768723,
-0.40604639053344727,
-0.028431499376893044,
-0.2843326926231384,
-0.011998331174254417,
-0.6679925918579102,
0.03883970528841019,
0.43211525678634644,
-0.010122413747012615,
0.13640... | |
note that in the table based solution the margins are somehow eaten and everything aligns nicely. | [
-0.033299580216407776,
0.14115391671657562,
0.29638925194740295,
0.011128891259431839,
0.01940421760082245,
0.030541174113750458,
-0.09112562239170074,
0.12024272978305817,
-0.3536621034145355,
-0.8321036100387573,
0.19489216804504395,
0.3818032443523407,
0.1546231359243393,
-0.15317696332... | |
I'm wondering if there is an existing class or library code in Cocoa Touch that shows the user a list of real-time suggestions while they are entering text input, with the suggestions based on similarities between what they have already entered and previous entries.
For instance, see how Safari on the iPod Touch shows... | [
0.31767380237579346,
0.17615024745464325,
0.1096193715929985,
0.03171901777386665,
0.04908910021185875,
0.02150152251124382,
-0.13915087282657623,
0.24207821488380432,
-0.4160473942756653,
-0.560865581035614,
0.21643052995204926,
0.38151952624320984,
-0.020906005054712296,
0.13960553705692... | |
welcome.
This should do the trick:
```
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^subdir/(.*)$ http://domain.co.uk/$1 [R=301,L]
</IfModule>
```
Update: Tested it, it works. | [
0.2720593810081482,
0.16803479194641113,
0.6359236240386963,
-0.19393962621688843,
0.18007348477840424,
-0.39952003955841064,
0.45801985263824463,
-0.12829381227493286,
0.09341950714588165,
-0.6747865676879883,
0.11521996557712555,
0.4385708272457123,
0.1483202576637268,
0.1048147752881050... | |
What are some software packages available to provide 90% of the avatar functionality for my games? My favorite is xbox's Avatar system (but I want it in my PC games).
I need the ability to customize the looks of a person (body, clothes, etc...).
looks lile [miieditor.com](http://miieditor.com/) was shut by Nintendo ..... | [
0.5257354974746704,
-0.2649535834789276,
0.3470434546470642,
0.19747810065746307,
-0.12789982557296753,
0.08823226392269135,
0.07094409316778183,
0.3112558424472809,
-0.05718580260872841,
-0.5441635847091675,
0.13409215211868286,
0.4548377990722656,
-0.02352161891758442,
0.4484350085258484... | |
I'm working on a program that uses PHP's internal array pointers to iterate along a multidimensional array. I need to get an element from the current row, and I've been doing it like so:
```
$arr[key($arr)]['item']
```
However, I'd much prefer to use something like:
```
current($arr)['item'] // invalid syntax
```
... | [
-0.04926293343305588,
0.24110105633735657,
0.4794587790966034,
-0.25100284814834595,
-0.16225209832191467,
0.03927292674779892,
0.32491710782051086,
-0.23499424755573273,
-0.19542473554611206,
-0.46743565797805786,
-0.0038064548280090094,
0.5668192505836487,
-0.3040439188480377,
0.03137227... | |
function expressions, `current($arr)['item']`. | [
-0.2153565138578415,
-0.169735848903656,
0.26949581503868103,
-0.04000869393348694,
0.05406574904918671,
0.32420098781585693,
0.011323596350848675,
0.07516125589609146,
-0.02028452418744564,
-0.006406585685908794,
-0.36363187432289124,
0.6047414541244507,
-0.4071882367134094,
-0.0713903009... | |
Currently, I only know a way of doing RPC for POJOs in Java, and is with the very complex EJB/JBoss solution.
Is there any better way of providing a similar functionality with a thiner layer (within or without a Java EE container), using RMI or something that can serialize and send full blown objects over the wire?
... | [
0.3277418613433838,
0.15841886401176453,
0.1450604349374771,
-0.01698826439678669,
-0.19201114773750305,
-0.582504391670227,
0.33736085891723633,
0.04266434535384178,
-0.4684339165687561,
-0.5128201842308044,
-0.1621733158826828,
0.385679692029953,
-0.28063032031059265,
0.24792392551898956... | |
allow me to use fairly complex SQL very easily), but the only things I want to keep over the wire are:
* Invocation of lookup/data modification methods (automagic serialization goes here).
* Transparent session control (authentication/authorization). I still have to see how to accomplish this.
Both items have to work... | [
0.26900947093963623,
0.20040340721607208,
0.4064645767211914,
0.2769226133823395,
-0.11808318644762039,
-0.6270493268966675,
0.2917877435684204,
-0.14312759041786194,
-0.3437548577785492,
-0.4734084904193878,
0.09959039092063904,
0.7290752530097961,
-0.0035638317931443453,
-0.1445405781269... | |
possible.
As is nearly always the case, [Spring](http://www.springsource.org/) comes to the rescue. From the [reference documentation](http://static.springframework.org/spring/docs/2.5.x/reference/index.html), you will want to read [Chapter 17. Remoting and web services using Spring](http://static.springframework.org/s... | [
0.21847939491271973,
-0.2653338611125946,
0.36565878987312317,
-0.13750779628753662,
-0.18326249718666077,
0.11066672950983047,
0.15644261240959167,
-0.3606491982936859,
-0.47628286480903625,
-0.1606898158788681,
-0.1725950539112091,
0.5177303552627563,
-0.19037246704101562,
0.025238128378... | |
the additional benefit in that it can do the wiring for both the server and the client, easily and transparently.
Personally I would choose either (2) or (3). HTTP is network friendly. It's easy to deploy in a Web container. [Jetty](http://www.mortbay.org/jetty/)'s long-lived connections give you the option over serve... | [
0.5793948173522949,
-0.06445954740047455,
0.4874008893966675,
0.2526901960372925,
-0.1616913229227066,
-0.1577761322259903,
0.14943520724773407,
-0.18220151960849762,
-0.5911353826522827,
-0.45189160108566284,
0.16701893508434296,
0.42126980423927307,
0.17999857664108276,
0.135186195373535... | |
to redistribute the class files. Or you can use a customized serialization solution (even XML) to avoid this. But that has issues as well.
Using a Web container will allow you to easily plug-in [Spring Security](http://static.springframework.org/spring-security/site/), which can be a bit daunting at first just because... | [
0.3531169891357422,
-0.21157510578632355,
-0.05230060592293739,
0.25725388526916504,
-0.0032964441925287247,
-0.10203247517347336,
0.25310513377189636,
-0.05338163301348686,
-0.49671119451522827,
-0.4834645986557007,
-0.1513376533985138,
0.11432966589927673,
-0.2658076584339142,
0.22545903... | |
I'm trying to create a randomized maze in C++, but I can't start because I don't know how to create grids or cells. How could I create it? And I also want to create it using ASCII characters. how can i store it in array? (can any one give a sample code and some explanation so i can understand it better)
Another questi... | [
0.396783709526062,
0.12684491276741028,
0.021000873297452927,
0.3446570634841919,
-0.15139375627040863,
0.2810996174812317,
0.2729824483394623,
-0.2004764974117279,
-0.24137453734874725,
-0.8569165468215942,
0.1305297315120697,
0.03353077545762062,
-0.3998349905014038,
0.2399679571390152,
... | |
a part of my project, thank you vary much!
You probably want to store your maze in a 2-dimension char array. You can declare an array with or without initializing it in C++.
```
char a[30][10]; // declares a char array of 30 rows and 10 columns.
// declare an array with 3 rows and 3 columns, and provide initial valu... | [
0.043863825500011444,
0.010175533592700958,
0.3271522521972656,
0.052843544632196426,
0.1151299700140953,
0.45064449310302734,
0.49153557419776917,
-0.41361236572265625,
0.006949093658477068,
-0.5061367750167847,
0.12570598721504211,
0.29267823696136475,
-0.5220595002174377,
0.037234012037... | |
{'x', 'o', ' '}
};
```
You could change the initial values to `'|'` and `'-'` for walls in your maze, and use a space character, `' '`, for the passageways.
Either initialization method works, but you always use the elements the same way. Here's how you clear the board in the initialized a... | [
-0.1253998875617981,
-0.08560745418071747,
0.2467195689678192,
0.22275304794311523,
0.19697412848472595,
0.29545608162879944,
0.14991191029548645,
-0.3320621848106384,
-0.3596283793449402,
-0.5395979881286621,
-0.09670702368021011,
-0.06661319732666016,
-0.1269150823354721,
0.2189353108406... | |
above.
```
// clear the board
for (int row=0; row<3; row++) {
for (int col=0; col<3; col++) {
ticTacToeBoard[row][col] = ' ';
}
}
```
If you want to read the value of an element (useful when you're trying to navigate a maze), you use the same subscript notation as when you're setting its value.
```
... | [
-0.18715700507164001,
0.15589600801467896,
0.48553767800331116,
-0.07622901350259781,
0.18623243272304535,
0.04403924196958542,
0.36664503812789917,
-0.3742859959602356,
-0.2987265884876251,
-0.626642644405365,
-0.3745743930339813,
0.11077677458524704,
-0.44144466519355774,
-0.067395374178... | |
I am looking for a XSL snippet that simply returns the XML unaltered. It sounds trivial but I can't seem to find an example anywhere on the web. Any help out there?
In order to copy the complete XML document, it is necessary to have a template that matches the root. This might be:
**`<xsl:template match="/">`**
... | [
0.019735587760806084,
-0.09618823230266571,
0.2973349094390869,
0.009980447590351105,
-0.10820673406124115,
-0.10538067668676376,
0.18992285430431366,
-0.16595430672168732,
-0.12305136024951935,
-1.0743048191070557,
-0.16674095392227173,
0.3023083806037903,
-0.27504536509513855,
0.16249385... | |
programmers use another one, widely known as the `identity transformation` or the [`identity rule`](http://www.w3.org/TR/xslt#copying)**:
```
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node(... | [
0.13496872782707214,
-0.24280957877635956,
0.09374924749135971,
0.08672415465116501,
-0.061441898345947266,
-0.31244486570358276,
0.08858908712863922,
-0.4369426369667053,
-0.1598718762397766,
-0.6953685879707336,
-0.4082795977592468,
0.7839460968971252,
-0.40761473774909973,
-0.0568824857... | |
element(s) that have a specific name or satisfy some other condition, renaming particular elements, changing the namespace of particular elements, creating new children or siblings of particular elements, ..., etc.
For more information and code snippets using the identity transformation, do look [**here**](http://dpaw... | [
0.11155764758586884,
-0.04731350764632225,
-0.0035698728170245886,
0.17198951542377472,
0.1851564347743988,
-0.37150248885154724,
0.251397043466568,
-0.23687897622585297,
0.03543407469987869,
-0.261152982711792,
-0.6660139560699463,
-0.1504630297422409,
-0.2208273708820343,
0.1488098651170... | |
Is it possible to retrieve the geometric position (i.e. top/left offsets from either the parent element, the page, etc) of a text node?
Not directly. TextNode does not have the originally-IE offset\* (and similar) extensions for measuring on-viewport positioning.
On IE only, you could create a TextRange object, labori... | [
-0.18285606801509857,
-0.5454164743423462,
0.4671134352684021,
0.2569518983364105,
-0.029711883515119553,
-0.08922573179006577,
0.03662056475877762,
-0.08251480758190155,
-0.013041452504694462,
-0.6469415426254272,
-0.027474597096443176,
0.43899965286254883,
-0.059986285865306854,
-0.49466... | |
would be wrapping the text in a span element (either in the document, or dynamically and/or temporarily by script), and using the span to measure positioning, assuming it's not picking up any additional styles that may affect the position. Note however that a wrapped span may not give the expected right/bottom values; ... | [
0.2368871122598648,
0.017479969188570976,
0.505050778388977,
0.21271765232086182,
-0.11849382519721985,
-0.17182354629039764,
0.20435002446174622,
0.16905759274959564,
-0.22467710077762604,
-0.38016772270202637,
-0.3270481824874878,
0.3936021327972412,
-0.007060336414724588,
-0.33688127994... | |
How should I perform garbage collection in a program that consists of multiple threads or processes?
How can I scan the stack from each of those threads and processes?
Does each process require its own garbage collection routine? Is it a good idea to run the garbage collector in a separate thread/process from the act... | [
0.6096012592315674,
0.016669362783432007,
-0.11241751164197922,
0.161077618598938,
-0.21064823865890503,
-0.01769317127764225,
-0.0023967567831277847,
-0.37168291211128235,
-0.43411919474601746,
-0.34518101811408997,
0.1517716497182846,
0.45592746138572693,
-0.3403315842151642,
0.410207539... | |
GC per process.
In the multi-threaded case, it makes sense to run GC as another thread. That way, you can fiddle with the priority of that thread to ensure a mostly-smooth operation of the whole program. For a single-threaded process, it's easiest to have a GC which hooks into the 'normal' memory-management routines ... | [
0.07588902860879898,
-0.04335559532046318,
0.19626206159591675,
0.21803812682628632,
-0.18691369891166687,
-0.14253787696361542,
-0.2860014736652374,
-0.07361417263746262,
-0.5400679111480713,
-0.32647979259490967,
-0.35178518295288086,
0.5356942415237427,
-0.5283030867576599,
0.2125575095... | |
single-threaded program is stop-the-world by nature. In the multi-threaded case, the GC thread can be given special privileges by the thread scheduler (make it uninterruptible once it decides to run), which allows you to run a stop-the-world GC from such a privileged thread.
If the GC could be interrupted by the muta... | [
0.17057110369205475,
-0.23895372450351715,
0.01846325397491455,
0.2626335024833679,
-0.253207802772522,
-0.34106022119522095,
0.05493774637579918,
0.2134445160627365,
-0.4503563642501831,
-0.24813440442085266,
-0.18413305282592773,
0.3265485167503357,
-0.8051559329032898,
0.480108410120010... | |
a single-threading, hook-into-memory-management-routines setup, where it may be interrupted ie by a timeout to ensure somewhat-smooth operation of the whole system; it can also be used in a multi-threaded system, where it simply competes with other threads for running time.
How you could find the stack(s) of a program... | [
0.2709709107875824,
-0.01859949342906475,
0.3258739709854126,
0.23355993628501892,
0.2233106940984726,
-0.23528951406478882,
0.013037788681685925,
-0.16632722318172455,
-0.5725880861282349,
-0.49624723196029663,
-0.07175058126449585,
0.5663743019104004,
-0.3056899309158325,
-0.025183262303... | |
more info, as Charly Martin said above, the folks at Sun have done some amazing research and development in the area of garbage collection, just like the members and associates of the IBM Jikes RVM team.
**Edit:** After reading your comment to Charlie Martin, let me give you a much terser advice: Hook up the Boem GC ... | [
0.5855866074562073,
0.3253893554210663,
0.05274200066924095,
0.06630122661590576,
-0.13154162466526031,
-0.6550067663192749,
0.057443492114543915,
0.2350521832704544,
-0.2740553617477417,
-0.40192291140556335,
-0.32511788606643677,
0.6952308416366577,
-0.2543826699256897,
-0.03154274821281... | |
the interesting parts of your project. Don't get stuck with the GC, or, worse, have a badly implemented GC which will annoy you to no end. | [
0.47233232855796814,
0.0791836604475975,
0.012109707109630108,
0.351070761680603,
-0.11900033056735992,
-0.27799972891807556,
0.04389338195323944,
0.526899516582489,
-0.2946167588233948,
-0.1421365886926651,
-0.16588157415390015,
0.4500584304332733,
-0.09400609135627747,
0.2987030148506164... | |
Quite often I come across a nice looking or functional website, and wonder what technology was used to create it. What techniques are available to figure out what a
particular website was built with?
Few frameworks seem to include any kind of generator meta tag like web editors do. Are there any tell-tale signs of par... | [
0.7077704668045044,
0.13826854526996613,
0.1125124916434288,
0.454740434885025,
-0.17470423877239227,
-0.36277732253074646,
0.5231574773788452,
0.3400924801826477,
-0.3056428134441376,
-0.6970427632331848,
-0.2615357041358948,
0.1644757241010666,
0.15806159377098083,
-0.010969063267111778,... | |
many more):
* [BuiltWith](http://builtwith.com/)
* [DomainTools](http://www.domaintools.com/)
* [NetCraft](http://news.netcraft.com/)
* [W3Techs](http://w3techs.com/sites)
* [SimilarTech](http://www.similartech.com)
Firefox addons:
* [Wappalyzer](http://wappalyzer.com/) - CMS, frameworks/libraries, e-commerce, messa... | [
0.4566381573677063,
0.22501039505004883,
0.1522063910961151,
0.0742233470082283,
-0.22903341054916382,
-0.15274962782859802,
0.24772882461547852,
-0.11277804523706436,
-0.5120003819465637,
-0.5051049590110779,
-0.11982674151659012,
0.3133517801761627,
-0.06228922680020332,
0.13358682394027... | |
of service holes.
If I was interested I'd probably look, in no particular order, at:
* urls, and file extensions.
* HTTP response headers
* Source code for comments, or standard JS libraries
Incidentally, the tools mentioned in other answers are only looking at some of the above properties of the site for you, albei... | [
0.7433302998542786,
0.39432263374328613,
0.06223652884364128,
0.10900983214378357,
-0.0028311614878475666,
0.025142645463347435,
0.4712750017642975,
0.34649744629859924,
-0.33893486857414246,
-0.5654226541519165,
-0.33160945773124695,
0.3510779142379761,
-0.12177138775587082,
0.20155431330... | |
There has to be something utterly simple I'm overlooking here, but for the life of me I can't get a JavaScript file to include properly from my master page. My declaration in the `<head>` element looks normal enough:
```
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="/_p... | [
0.07735821604728699,
0.31679877638816833,
0.3930327892303467,
-0.261035293340683,
-0.1798505336046219,
-0.1405067890882492,
0.22400031983852386,
-0.27892687916755676,
-0.24185992777347565,
-0.697861909866333,
-0.18025770783424377,
0.1171460747718811,
-0.14948561787605286,
0.005050170700997... | |
and as far as I can tell, I've done it the exact same way again. It's hardly rocket science, so I must be overlooking something blindingly obvious but damned if I can figure out what it is.
In desparation, I turn to you. Any ideas?
One final point as well: viewing the source of the page shows a very unlikely form act... | [
0.22925813496112823,
-0.0060177939012646675,
0.49229544401168823,
-0.00456406082957983,
0.09056322276592255,
-0.16305148601531982,
0.4854968786239624,
-0.0034392408560961485,
-0.23462888598442078,
-0.7075638771057129,
-0.35865291953086853,
0.4048423767089844,
-0.15975049138069153,
-0.01840... | |
Visual Studio, chances are the link won't work. By default, VS serves up sites as something like <http://localhost:3456/projectname/>... so /\_private won't actualy be at the root.
You can change this in the properties on the project/solution, or use some other approaches to rewrite the script path dynamically.
As ... | [
0.5007758140563965,
-0.32093653082847595,
0.01313750073313713,
0.05307048186659813,
-0.4180664122104645,
-0.22887125611305237,
0.35721057653427124,
0.13397711515426636,
-0.2645762264728546,
-0.559410810470581,
-0.06311172991991043,
0.5872200131416321,
-0.23173759877681732,
-0.0650885701179... | |
I don't understand how classes are used. The following code gives me an error when I try to use the class.
```
class MyStuff:
def average(a, b, c): # Get the average of three numbers
result = a + b + c
result = result / 3
return result
# Now use the function `average` from the `MyStuff` cl... | [
0.016727281734347343,
0.035856641829013824,
0.3234434127807617,
-0.2557840049266815,
-0.3095601499080658,
0.34322041273117065,
0.3487682640552521,
-0.3388528525829315,
-0.06966715306043625,
-0.5733435750007629,
0.2945125699043274,
0.5704284906387329,
-0.4275713860988617,
-0.202661171555519... | |
MyStuff instance as first argument (got int instance instead)
```
What's wrong?
You can instantiate the class by declaring a variable and calling the class as if it were a function:
```
x = mystuff()
print x.average(9,18,27)
```
However, this won't work with the code you gave us. When you call a class method on a ... | [
-0.12101107090711594,
0.0010069769341498613,
0.25895342230796814,
-0.18418645858764648,
-0.4639950692653656,
0.12099368870258331,
0.5399089455604553,
-0.11127166450023651,
0.05097539350390434,
-0.6509782075881958,
0.1485937088727951,
0.6004749536514282,
-0.5796930193901062,
0.1689964681863... | |
to take four parameters. The first parameter is an object reference, and the remaining 3 parameters would be for the 3 numbers. | [
0.026317669078707695,
0.15222901105880737,
0.43587616086006165,
0.09551714360713959,
0.061145901679992676,
0.49053311347961426,
0.024174554273486137,
-0.7012119889259338,
-0.03498316556215286,
-0.4002842605113983,
-0.1046476662158966,
0.5205320119857788,
-0.43911945819854736,
0.25784531235... | |
I'm using Delphi 2007.
I am copying files to a remote drive. When the copying ends, I shutdown/standby the machine. It can happen that some files don't get copied from buffer to disk, and the remote disk gets disconnected, so the backup is not completed. I need to detect disk activity on that disk to properly be able ... | [
0.11647310853004456,
0.09009580314159393,
0.3338468372821808,
-0.0527644045650959,
0.08427026122808456,
-0.297089546918869,
0.2991563081741333,
-0.1944369226694107,
-0.22834999859333038,
-0.4859834313392639,
-0.06505805253982544,
0.7640487551689148,
-0.2945592701435089,
0.00926365982741117... | |
disk.
What you are looking for is the [Windows equivalent of the Unix sync command](http://technet.microsoft.com/en-us/sysinternals/bb897438.aspx). You could run this tool from your program. Please read the information on the linked page, this requires administrative rights, and even so it may not be enough to be sure... | [
0.24254822731018066,
0.020236628130078316,
0.345101922750473,
0.4068700671195984,
0.20819327235221863,
-0.47358450293540955,
-0.18859224021434784,
0.5132614374160767,
-0.3141142427921295,
-0.6857040524482727,
-0.32448068261146545,
1.0698542594909668,
-0.10461732745170593,
0.121210418641567... | |
I am not sure what the problem is but I keep receiving this error when I try to use a while statement in my code.
> Invalid token 'while' in class,
> struct, or interface member
> declaration
I want to use a while loop to have something continuously update while a statement is true.
The rest of my code is rather l... | [
0.3836407959461212,
-0.0020854866597801447,
0.22762395441532135,
-0.1386835277080536,
0.05332864448428154,
-0.3162118196487427,
0.5264068841934204,
0.46119043231010437,
-0.24717260897159576,
-0.33831384778022766,
0.04841984435915947,
0.5308219194412231,
-0.03305575251579285,
0.103994518518... | |
the Form1.cs file with all the other event handlers (for buttons and such).
Thanks!
---
I was unaware that loops had to be placed within a method (fairly new to c#), but I tried it and no errors were returned. Thanks for your help everybody!
Previously, I just had the loop within the main class of the program.
Base... | [
0.570589005947113,
-0.06639955937862396,
0.26831525564193726,
0.20887748897075653,
-0.2588638961315155,
-0.47309374809265137,
0.4158671796321869,
0.022240731865167618,
-0.4474066495895386,
-0.6516546607017517,
0.02153012715280056,
0.36871156096458435,
-0.13696540892124176,
-0.3204959928989... | |
method, you likely have a mismatched brace problem. | [
0.585030198097229,
0.29285770654678345,
-0.29234012961387634,
0.4341668486595154,
0.06786687672138214,
0.27909237146377563,
0.5641639828681946,
-0.004499088507145643,
-0.32421165704727173,
-0.7192240953445435,
0.4696689546108246,
0.5745251178741455,
-0.03548727184534073,
-0.216573029756546... | |
Imagine I am doing something like this:
```
void *p = malloc (1000);
*((char*)p) = some_opcode;
*((char*)p+1) = another_opcode; // for the sake of the example: the opcodes are ok
....
etc...
```
How can I define a function pointer to call p as if it was a function? (i'm using VC++ 2008 express).
Thanks
A comment w... | [
-0.07967787981033325,
0.12322322279214859,
0.42906808853149414,
-0.16721120476722717,
-0.010259335860610008,
0.16599802672863007,
0.3010233938694,
-0.10619471967220306,
-0.2681426405906677,
-0.9017831087112427,
-0.04005364701151848,
0.5662084221839905,
-0.33304017782211304,
0.1787208318710... | |
`flProtect` to `[PAGE_EXECUTE_READWRITE][2]`
Note, you should probably do three allocations, one guard page, the pages you need for your code, then another guard page. This will give you a little protection from bad code.
Also wrap calls to your generated code with [structured exception handling](http://msdn.microsof... | [
0.16306297481060028,
-0.040446508675813675,
0.6153346300125122,
-0.000049260906962445006,
0.17019319534301758,
-0.02738247439265251,
-0.13886532187461853,
-0.32379674911499023,
-0.3131735920906067,
-0.13049104809761047,
-0.11258813738822937,
1.0855836868286133,
-0.23436151444911957,
-0.283... | |
calling conventions [here](http://msdn.microsoft.com/en-us/library/ms794533.aspx).
Also, you can still obtain Microsoft's Macro Assembler [MASM here](http://www.microsoft.com/downloads/details.aspx?familyid=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en). I recommend writing your machine code in MASM and look at ... | [
0.17035584151744843,
0.361497163772583,
0.23998215794563293,
0.19609875977039337,
0.1790873408317566,
-0.27938035130500793,
0.1838049292564392,
-0.15120084583759308,
-0.2561836540699005,
-0.49728021025657654,
-0.05830356106162071,
0.8064618706703186,
-0.23572729527950287,
-0.05662608891725... | |
I have a problem with CDATA deserialization using standard .Net XmlSerializer.
**Update**: I get XML from external system and I can't influence it's format so I can't make CData be enclosed in a separate Element of Attribute.
Serialization gives this:
```
<?xml version="1.0" encoding="utf-16"?>
<MyClass xmlns:xsi="h... | [
0.05793085694313049,
0.073837511241436,
0.21123014390468597,
-0.09293117374181747,
-0.24447757005691528,
-0.2712264060974121,
0.31101194024086,
-0.3264755308628082,
-0.23685723543167114,
-0.6094416975975037,
-0.2298535704612732,
0.5804872512817383,
-0.4541321396827698,
0.4751483201980591,
... | |
value; }
}
[XmlAnyElement]
public XmlCDataSection CData
{
get { return new XmlDataDocument().CreateCDataSection(Data); }
set { Data = value.Value; }
}
}
```
Here's the test which fails:
```
[Test]
public void CData_as_inner_text_test()
{
MyClass item = new MyClass();
ite... | [
0.18994484841823578,
-0.12787660956382751,
0.4677486717700958,
-0.09282480925321579,
-0.16416224837303162,
-0.05300920084118843,
0.3666698634624481,
-0.4397737681865692,
0.028940360993146896,
-0.621356189250946,
-0.40916910767555237,
0.4399683177471161,
-0.33907073736190796,
0.293399393558... | |
serializer.Serialize(sw, item);
serialized = sw.GetStringBuilder().ToString();
}
MyClass deserialized;
using (StringReader sr = new StringReader(serialized))
{
deserialized = (MyClass)serializer.Deserialize(sr);
}
Assert.AreEqual(item.Data, deserialized.Data); // For some reas... | [
-0.20128175616264343,
-0.16403280198574066,
0.5432952642440796,
-0.11861290782690048,
-0.14960676431655884,
-0.09898807853460312,
0.42424070835113525,
-0.2163366675376892,
-0.2927630841732025,
-0.5821326375007629,
-0.48661521077156067,
0.24001090228557587,
-0.42200422286987305,
0.638989090... | |
absolutely equivalent to:
```
<MyClass>Hello, world!</MyClass>
```
You shouldn't care whether the external app writes the content of MyClass as CData or not. Likewise, the external app shouldn't care how you write it out.
IOW, this should be all you need:
```
public class MyClass
{
string _data;
[XmlText... | [
0.11609857529401779,
-0.04889121279120445,
0.2631952166557312,
0.1218540370464325,
-0.10455550998449326,
-0.2250661849975586,
0.08309263736009598,
0.2739298641681671,
-0.058838218450546265,
-0.5733911395072937,
-0.41644710302352905,
0.4976406693458557,
-0.41543877124786377,
0.0898222327232... | |
We have a user provided string that may contain unicode characters, and we want the robot to type that string.
How do you convert a string into keyCodes that the robot will use?
How do you do it so it is also java version independant (1.3 -> 1.6)?
What we have working for "ascii" chars is
```
//char c = nextChar(... | [
0.040004998445510864,
-0.12429043650627136,
0.5480287075042725,
-0.10689505189657211,
0.26425784826278687,
0.13320337235927582,
0.1692974865436554,
-0.42041295766830444,
0.03541978448629379,
-0.6766856908798218,
-0.3878840208053589,
0.463964581489563,
-0.20225712656974792,
-0.0649705231189... | |
worry about case with standard characters
if (Character.isUpperCase(c))
{
robot.keyPress(KeyEvent.VK_SHIFT);
}
robot.keyPress(key.getKeyCode());
robot.keyRelease(key.getKeyCode());
if (Character.isUpperCase(c))
{
robot.keyRelease(KeyEvent.VK_SHIFT);
}
}
```
Based on javamonkey79's code I've c... | [
0.08538753539323807,
-0.1899755895137787,
0.8367371559143066,
-0.21695782244205475,
0.3510129451751709,
0.3567104637622833,
0.11189433187246323,
-0.4192805886268616,
-0.047059398144483566,
-0.5930249094963074,
-0.42290353775024414,
0.8723441362380981,
-0.400608092546463,
-0.221173241734504... | |
get the required VK_NUMPAD key-code
int numpad_kc = key_code / (int) (Math.pow(10, i)) % 10 + KeyEvent.VK_NUMPAD0;
r.keyPress(numpad_kc);
r.keyRelease(numpad_kc);
}
r.keyRelease(KeyEvent.VK_ALT);
}
```
This automatically goes through each decade of the unicode key-code, maps it to th... | [
-0.23123349249362946,
-0.09039946645498276,
0.6348507404327393,
-0.22252307832241058,
0.41720977425575256,
0.16944684088230133,
0.36485785245895386,
-0.3269636929035187,
-0.10379353165626526,
-0.4800773859024048,
-0.6206730604171753,
0.5101233124732971,
0.09244754910469055,
0.1110351234674... | |
I have a window with a title on it. When the user selects a choice from a drop down list, the title image can change. The problem is when the image loads, it's a blurred, stretched, and pixelated. These are PNG files I'm working with and they look good prior to setting the source dynamically.
Here's the code I'm using... | [
0.22744834423065186,
-0.23535345494747162,
0.9826362133026123,
-0.2646806836128235,
-0.11475450545549393,
0.2326778620481491,
0.14216826856136322,
-0.27987703680992126,
0.1199239045381546,
-0.9215705990791321,
-0.021221425384283066,
0.6481859683990479,
-0.19969284534454346,
0.4007974565029... | |
= new Bitmap(iconStream);
System.Drawing.Image img = brush.GetThumbnailImage(brush.Height, brush.Width, null, System.IntPtr.Zero);
var imgbrush = new BitmapImage();
imgbrush.BeginInit();
imgbrush.StreamSource = ConvertImageToMemoryStream(img);
imgbrush.CreateOptions = BitmapCreat... | [
-0.0008897768566384912,
-0.37560856342315674,
0.7083147764205933,
0.14605872333049774,
-0.05571075156331062,
0.44337576627731323,
0.3264829218387604,
-0.5543122887611389,
-0.0734378919005394,
-0.7505567669868469,
-0.018739130347967148,
0.5843323469161987,
-0.3733905851840973,
0.28755781054... | |
{
var ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
return ms;
}
```
And the XAML
```
<Image x:Name="imgTitle" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Column="1" Grid.Row="1" Stretch="None" d:IsLocked="False"/>
```
And for ... | [
0.22636252641677856,
-0.17267361283302307,
0.8626164197921753,
-0.12666654586791992,
-0.0589156337082386,
-0.0018939231522381306,
-0.06455247104167938,
-0.29379257559776306,
-0.40486395359039307,
-0.574442446231842,
-0.3300447165966034,
0.6392961740493774,
-0.09867832064628601,
0.165542602... | |
image control to "Uniform" or "UnfirofmToFill".
Second option is that maybe the image is not aligned to the pixel grid, you can read about it on my blog at <http://www.nbdtech.com/blog/archive/2008/11/20/blurred-images-in-wpf.aspx> | [
0.061680980026721954,
-0.5298530459403992,
0.5366235375404358,
0.19310007989406586,
-0.36255016922950745,
-0.15509946644306183,
0.23599368333816528,
-0.11469027400016785,
-0.31007710099220276,
-0.6771305203437805,
0.006842853035777807,
0.6289749145507812,
-0.13839420676231384,
-0.069588638... | |
Hopefully I'm just missing something obvious, but I'm trying to get my head around the differences between the Load and the Shown events in [Windows Forms](http://en.wikipedia.org/wiki/Windows_Forms).
Traditionally, I've only used Load (or actually OnLoad, since I think it's cleaner to override a method than to rely o... | [
0.28508007526397705,
-0.3032124936580658,
0.4100003242492676,
-0.007818516343832016,
-0.33929356932640076,
-0.46132075786590576,
0.11235735565423965,
0.11614969372749329,
-0.425744891166687,
-0.8548609018325806,
-0.2135646939277649,
0.5448030233383179,
-0.3387756943702698,
0.01544027682393... | |
is first displayed.") it *sounds* like the Load event should occur, then the form should become visible, then the Shown event should occur; the combination of the two thereby letting you carry out some tasks both before and after the form is visible. Makes sense, right?
However, experimentation has shown that the Show... | [
0.3134801983833313,
-0.0025487258099019527,
0.07772767543792725,
0.03990843519568443,
-0.20299172401428223,
-0.10860010236501694,
0.393636554479599,
-0.1122312918305397,
-0.341736763715744,
-0.44682952761650085,
-0.28352537751197815,
0.5840150117874146,
-0.14788436889648438,
-0.27543613314... | |
first.
Am I just going crazy, or have I missed something? (And if they do occur at about the same time, then why was the Shown event added in the first place?)
(My current solution for doing something both before and after showing the form is to use OnLoad for the "before showing" stuff and start a short-duration one... | [
0.5407601594924927,
-0.1721961349248886,
0.22798407077789307,
0.23217155039310455,
-0.10417959839105606,
-0.6286510229110718,
0.6298347115516663,
0.03518400341272354,
-0.4449308216571808,
-0.5002682209014893,
0.15958862006664276,
0.31879886984825134,
-0.4330233037471771,
-0.048772387206554... | |
loop, disturbing the normal flow of events. The *Load* event is triggered by Windows sending the WM\_SHOWWINDOW message, just before the window becomes visible. There is no Windows notification for "your window is now fully shown", so the WF designers came up with a trick to generate the *Shown* event. They use Control... | [
0.5083198547363281,
-0.44729819893836975,
0.43639877438545227,
-0.3959592878818512,
-0.0915028303861618,
-0.3114887773990631,
0.3570510745048523,
0.044264089316129684,
-0.36676353216171265,
-0.3114300072193146,
-0.3717109262943268,
0.1796022653579712,
-0.616624116897583,
0.3634176552295685... | |
you use MessageBox.Show(). Its message loop dispatches the delegate registered with BeginInvoke(), causing the Shown event to run *before* the window is shown.
There are lots of other ways to get diagnostics beyond MessageBox. Debug.Print() and Console.WriteLine() are handy, their output goes to the [Visual Studio Out... | [
0.2700076699256897,
-0.11086221039295197,
0.010534990578889847,
-0.0395083948969841,
-0.1137218028306961,
-0.24084222316741943,
0.46832460165023804,
-0.14551299810409546,
-0.3163125216960907,
-0.7519121766090393,
-0.1818343549966812,
0.4894234538078308,
-0.17670707404613495,
-0.00511956540... | |
I wrote a device controller (rs232) and it is being used successfully, however users want to view data and control the device (or perhaps communicate through my program) from Excel. I dismissed DDE as an option and found that RTD (IRtdServer) is probably a good start (though no way to send data back to the "server" fro... | [
0.11947181075811386,
0.07294075936079025,
0.7685142755508423,
-0.08470359444618225,
-0.14143019914627075,
0.09394467622041702,
0.30271226167678833,
-0.3275092542171478,
-0.031897567212581635,
-0.7079625725746155,
0.040385328233242035,
1.0413541793823242,
-0.2989412844181061,
0.042800642549... | |
COM interface to the EXE.
But what I need after that is some way of controlling my app/proxying commands to the device through my app from Excel.
What would be the best way to do that?
Perhaps another COM interface and calling it from VBA or something? I am not familiar with using scripting from Excel, so perhaps so... | [
0.2703762352466583,
-0.12730979919433594,
0.5611552596092224,
0.09953580051660538,
-0.2381550371646881,
0.10003457218408585,
-0.013215902261435986,
0.12154820561408997,
-0.05481208488345146,
-0.8841237425804138,
0.05827045813202858,
0.9066329598426819,
-0.48533979058265686,
0.0341763012111... | |
welcome as well, but that is a long-term rewrite.
Thanks
EDIT
I have an alternative to adding COM support into the existing EXE. I think it is more flexible to add a two-way communications (cross platform - maybe boost or corba or just straight IP based with my own message protocol)
A COM server (or two) can wrap t... | [
0.2539274990558624,
-0.08622623234987259,
0.6752294898033142,
0.05054695904254913,
-0.42747482657432556,
-0.17779195308685303,
0.0016133901663124561,
0.2899416983127594,
-0.11397414654493332,
-0.7021768689155579,
-0.02467702515423298,
0.7260584831237793,
-0.08405862003564835,
-0.0249977540... | |
these devices are on PCs that are pretty old and have perhaps NT or XP on them and I don't relish increasing my setup/install package from 700KB to the ridiculous .NET install size...
**Create a shortcut using Python (via WSH)**
```
import sys
import win32com.client
shell = win32com.client.Dispatch("WScript.Shell")
... | [
0.14181113243103027,
0.14158214628696442,
0.4820278286933899,
-0.1934349536895752,
0.16980625689029694,
-0.054281048476696014,
0.2715325355529785,
-0.28719601035118103,
-0.14224155247211456,
-0.9646872878074646,
0.071046382188797,
0.7647903561592102,
-0.3259732723236084,
-0.055019237101078... | |
I have a class called User with static function loginRequired(), which returns false if the user is logged in and true if the user is logged out. It also appends an error to an error class that I created that tells the person using the site that they must be logged in to view the content.
The idea is that for the top ... | [
0.06747973710298538,
0.23205463588237762,
0.20773743093013763,
-0.12608714401721954,
0.019621364772319794,
-0.21565456688404083,
0.49918732047080994,
0.053493522107601166,
0.014727795496582985,
-0.4423416256904602,
0.08882691711187363,
0.6851734519004822,
-0.2554752230644226,
0.36265313625... | |
inside of the loginRequired function... but because loginRequired() is in a separate class in a separate file, this won't work. Is it possible to return from the function that calls loginRequired(), within loginRequired()?
Thanks.
The way I've seen a number of open source apps handle this is by having a `require_login... | [
0.362810343503952,
-0.16067324578762054,
0.289592444896698,
0.19927233457565308,
0.23888139426708221,
-0.3339398205280304,
0.5378768444061279,
-0.11618317663669586,
-0.18682722747325897,
-0.5693585872650146,
-0.24463902413845062,
0.8585827350616455,
-0.35785534977912903,
0.2771186530590057... | |
I am trying to use jCarousel plugin for jQuery in order to provide my website users with scrollable (horizontal) content.
The content I am mentioning is basically user defined `<li>` elements, styled so that they have a feel and look of a tab. so basically I am trying to achieve the same effect of the tabs in pageflak... | [
0.7596662640571594,
0.21354268491268158,
0.37412503361701965,
-0.07090826332569122,
-0.35046589374542236,
0.010219152085483074,
-0.23570133745670319,
0.26013049483299255,
-0.30590128898620605,
-0.6019220352172852,
0.11625853925943375,
0.23445597290992737,
-0.20256033539772034,
0.1543784737... | |
I have not control over what the user will name his/her tab...making it impossible for me to guess the width of the total container div.
I have tried using a silly method such as guessing the width programatically assuming each letter being approx 5 pixels and multiplying 5 with the length of the word they have given ... | [
0.09944639354944229,
0.12201011925935745,
0.5173475742340088,
-0.34846556186676025,
-0.25276216864585876,
0.2524920701980591,
-0.18741291761398315,
-0.028064202517271042,
-0.24984344840049744,
-0.6727331876754761,
0.08189636468887329,
0.08463688939809799,
-0.2423572689294815,
0.43541803956... | |
which I can</li>
<li class='MyTab' id='580'>never guess</li>
<li class='MyTab' id='581'><img src='img/bullet_key.png' /> The length of</li>
</lu>
```
The above html is produced programatically through ajax\_tabs\_output.aspx, loaded into a javascript array and the jCarousel takes care of the rest..
```
functio... | [
0.24290256202220917,
0.01524438802152872,
0.579615592956543,
-0.12458877265453339,
-0.08406797051429749,
0.22918683290481567,
0.17473536729812622,
-0.5922114253044128,
-0.07235652953386307,
-0.4470541775226593,
0.06343689560890198,
0.35987409949302673,
-0.20030033588409424,
-0.187010541558... | |
async: false,
success: function(out)
{
tabs_array = out;
}
});
}// end outputTabsArray | [
-0.330593466758728,
-0.25851741433143616,
0.41721999645233154,
-0.08768880367279053,
-0.07717140018939972,
0.18989641964435577,
0.44613251090049744,
-0.2985903024673462,
-0.05033276602625847,
-0.15918110311031342,
-0.0330648273229599,
0.7151927947998047,
-0.31449222564697266,
0.36494544148... | |
function mycarousel_itemLoadCallback(carousel, state)
{
for (var i = carousel.first; i <= carousel.last; i++) {
if (carousel.has(i)) {
continue;
} | [
0.04095253348350525,
-0.21457195281982422,
0.6439219117164612,
-0.12658461928367615,
0.33232536911964417,
0.1434118002653122,
0.07607734203338623,
-0.17145198583602905,
-0.26252540946006775,
-0.3395392596721649,
-0.17757095396518707,
0.24493764340877533,
-0.1551690548658371,
0.325682789087... | |
if (i > tabs_array.length) {
break;
}
carousel.add(i, mycarousel_getItemHTML(tabs_array[i-1]));
}
};
/** | [
0.14984554052352905,
-0.24414779245853424,
0.38049235939979553,
0.005994485225528479,
0.22493258118629456,
-0.07809869199991226,
0.17890529334545135,
-0.1467650681734085,
-0.41318151354789734,
-0.23629720509052277,
-0.35041937232017517,
0.1510002613067627,
-0.2492375373840332,
0.1455051302... | |
* Item html creation helper.
*/
function mycarousel_getItemHTML(item)
{
return '<div class="MyTab" id="' + item.tab_id + "'>" + item.tab_name + '</div>';
};
$('#mycarousel').jcarousel({
size: tabs_array.length, | [
0.08146445453166962,
-0.11397809535264969,
0.4765341281890869,
-0.16868233680725098,
-0.24428823590278625,
0.4811468720436096,
0.24396765232086182,
-0.29846861958503723,
-0.3501662313938141,
-0.3675016462802887,
-0.1564270406961441,
0.19404006004333496,
-0.4118758738040924,
0.3831151127815... | |
itemLoadCallback: {onBeforeAnimation: mycarousel_itemLoadCallback}
});
```
The closest thing to what you want is probably [jscrollhorizontalpane](http://plugins.jquery.com/project/jscrollhorizontalpane). I've never used it so I can't vouch for it's effectiveness as a solution to this specific problem.
This so... | [
-0.24592864513397217,
-0.03653541952371597,
0.7536056041717529,
0.012391054071485996,
-0.03395971655845642,
-0.023141000419855118,
0.10011208057403564,
0.2333812713623047,
-0.16375555098056793,
-0.6825609803199768,
-0.26284337043762207,
0.34748128056526184,
-0.060295529663562775,
-0.151061... | |
class="tab">...</li>
<li class="tab">...</li>
<li class="tab">...</li>
</ul>
</div>
</div>
<a href="#" class="left">←</a>
<a href="#" class="right">→</a>
</div>
```
What we'll be doing is shifting the "*space*" element back and forth inside "*window*" element. This can be don... | [
-0.37311047315597534,
-0.17324945330619812,
0.8303859233856201,
-0.313251793384552,
0.06284606456756592,
0.38978311419487,
0.10623159259557724,
-0.3687466084957123,
-0.06675492972135544,
-0.818628191947937,
-0.39126676321029663,
0.5009453892707825,
-0.06276518106460571,
0.02330261282622814... | |
/* lots of space for tabs */
overflow : hidden; /* clear floats */
}
.tabs {
float : left; /* shrink so we can determine tabs width */
}
.tab {
float : left; /* line tabs up */
}
```
This is just the basic stuff that the technique needs. Some of this stuff could be applied by jQuery,
**Add events ... | [
-0.17165978252887726,
-0.47132572531700134,
0.585941731929779,
-0.2788543403148651,
-0.030759725719690323,
0.08579591661691666,
0.10300209373235703,
-0.24665050208568573,
-0.48567265272140503,
-0.725367546081543,
-0.3737656772136688,
0.5337389707565308,
-0.2611936628818512,
-0.012521822936... | |
) {
$('.scrollable a.left, .scrollable a.right').show();
}
else {
$('.scrollable a.left, .scrollable a.right').hide();
}
})
.trigger('resize');
```
**Add events to scroll buttons.**
```
$('.scrollable a.left').hover(
function (e) {
var sz = $('.window');
sz.animate({ scrollLeft ... | [
-0.2567939758300781,
-0.18735386431217194,
0.8857840299606323,
-0.4969228506088257,
0.11807069182395935,
0.4425432085990906,
0.16475273668766022,
-0.6186872720718384,
-0.13743025064468384,
-0.6173638701438904,
-0.44385480880737305,
0.5360527634620667,
-0.40277236700057983,
0.11417019367218... | |
scrollLeft : margin }, 1000, 'linear');
},
function (e) {
$('.window').stop();
});
```
Done!
The widths could also be calculated by looping through the "*tab*" elements and summing upp `outerWidth`. This is unnecessary if you have full control but might be a better choice for a full standalone plugin. | [
-0.03908480703830719,
-0.35393986105918884,
0.877215564250946,
-0.09606688469648361,
0.11833784729242325,
0.016864627599716187,
0.2515404224395752,
-0.3948364555835724,
-0.23503519594669342,
-0.5776112079620361,
-0.1405685395002365,
0.8162376284599304,
0.04748457670211792,
0.17058005928993... | |
I'm used to doing Java programming, where you never really have to think about pointers when programming. However, at the moment I'm writing a program in C++. When making classes that have members of other classes, when should I use pointers and when should I not? For example, when would I want to do this:
```
class F... | [
0.45427149534225464,
0.38783156871795654,
0.044819653034210205,
-0.44607144594192505,
-0.1743544340133667,
0.03708149120211601,
0.2893114984035492,
-0.12454769015312195,
-0.260009765625,
-0.7217122912406921,
0.1337270438671112,
0.3065814673900604,
-0.5269945859909058,
-0.0749407485127449,
... | |
program, whereas the `Foo` class just needs to be able to access it.
* You want to postpone the construction of the `Bar` object (i.e., you want to create it *after* constructing `Foo`).
* In your business logic, the `Bar` object may not exist at all; you would use `null` also in Java. However, check out [boost::option... | [
0.17997127771377563,
0.19477254152297974,
0.05405332148075104,
-0.16186462342739105,
-0.012159476056694984,
-0.2126658707857132,
0.24080859124660492,
-0.09680742025375366,
-0.19575390219688416,
-0.3439154624938965,
-0.26616859436035156,
0.3668644428253174,
-0.5914204120635986,
0.1018459275... | |
these cases (\*), start by using a smart pointer, such as [boost::shared\_ptr](http://www.boost.org/doc/libs/release/libs/smart_ptr/shared_ptr.htm). Otherwise, you are likely to forget to deallocate the memory, sooner or later. Once you know what you are doing, consider case-by-case what pointer type is best.
(\*) any... | [
-0.3164573609828949,
0.14023247361183167,
0.3069218695163727,
0.2135414332151413,
0.36006543040275574,
-0.023370105773210526,
-0.030229244381189346,
-0.1327364593744278,
-0.1799306869506836,
-0.7373564839363098,
-0.38286834955215454,
0.769176185131073,
-0.18225105106830597,
-0.307736426591... | |
I am having a frame-based webpage with 3 frames. A topliner, a navigation on the left side and a content frame on the bottom right side.
Now, I want to show up a popup-menu when the user right-clicks on the content-frame. Because a div-container can not go out of the frame, my idea was, placing the whole frame-page in... | [
0.2886614203453064,
0.22534242272377014,
0.6594586372375488,
-0.09165819734334946,
-0.2317972630262375,
0.20912499725818634,
-0.01790320873260498,
0.03374356031417847,
-0.25885412096977234,
-0.9239414930343628,
-0.026380999013781548,
0.27621352672576904,
-0.3514014184474945,
0.251122236251... | |
navigation-frame
content-frame
>
>
<iframe> (my popup-menu, positioned absolutelly and hidden by default)
</html>
```
In my content-frame I am having a "onmouseover"-event assigned to the body-tag. This event should open the popup-iframe at the current mouse-position. And exactly here is my problem: How... | [
-0.5233598947525024,
-0.003606138750910759,
1.1522853374481201,
0.08936479687690735,
0.3441633880138397,
-0.13694827258586884,
0.3654160797595978,
-0.03714262321591377,
0.07181670516729355,
-0.9982202053070068,
-0.10729788988828659,
0.6762010455131531,
-0.3031333088874817,
-0.2111160606145... | |
{
top.popupFrame.style.left = event.screenX + "px";
top.popupFrame.style.top = event.screenY + "px";
top.popupFrame.style.display = "";
return false;
}
}
```
As you can see, the "event.screenX" and "screenY" - variables are not that variables I can use, because they are not relative to the mainp... | [
0.34084436297416687,
-0.03875749930739403,
0.6485518217086792,
-0.11640045046806335,
0.04527217894792557,
-0.24268510937690735,
0.29431626200675964,
0.1492128223180771,
-0.14595499634742737,
-1.1056069135665894,
-0.15138334035873413,
0.5699788928031921,
-0.3943682909011841,
0.0650937035679... | |
modal one at that...
By the way - FF 3 and up also [supports window.showModalDialog](https://developer.mozilla.org/en/DOM/window.showModalDialog) | [
-0.13007408380508423,
-0.1510809063911438,
0.6281633973121643,
-0.0017584993038326502,
-0.3169122636318207,
-0.02398351952433586,
0.3461257517337799,
-0.09075397253036499,
-0.32788318395614624,
-0.6214284300804138,
-0.29570841789245605,
0.6358535885810852,
-0.3878074586391449,
-0.111109465... | |
I develop tools in Autodesk Maya. Many of the tools I build have simple windowed GUIs for the animators and modellers to use. These GUIs often contain what you'd normally expect to see in any basic window; labels, lists, menus, buttons, textfields, etc. However, there are limitations to the complexity of the UIs you ca... | [
0.6959927678108215,
0.1788995862007141,
0.28219321370124817,
0.019461650401353836,
-0.0767168179154396,
0.06582274287939072,
-0.04795989766716957,
0.009187615476548672,
0.02380550280213356,
-0.9659866094589233,
-0.03775918483734131,
0.6762411594390869,
-0.1269908845424652,
0.12784686684608... | |
mean that window would no longer be tied to Maya. Not a deal breaker, but it means when Maya is minimized, the window won't follow suit.
I've tried something like this before with tkinter as a test, but found that it needed a MainLoop to run in its own thread. This is logical, but in my case, it conflicts with Maya's ... | [
0.5279943943023682,
-0.16045404970645905,
0.12365639209747314,
0.0883750468492508,
-0.1515285074710846,
-0.123409703373909,
0.14005711674690247,
0.2197655737400055,
-0.45323190093040466,
-0.36503830552101135,
0.029309451580047607,
0.5122752785682678,
-0.44286492466926575,
0.233541950583457... | |
prevent one script from, say, deleting an object while another script is trying to do work on the same object.
wxPython has this same "mainloop" methodolgy. I'm wondering if there's any way around it so that it can work within Maya?
I'm not sure if this is germane, but some googling turns up that PyQt is pretty popula... | [
0.3068210184574127,
-0.13578148186206818,
0.24466650187969208,
0.017014458775520325,
-0.14871910214424133,
-0.2568728029727936,
0.37905949354171753,
-0.009522923268377781,
-0.5265558958053589,
-0.43101662397384644,
-0.012458181008696556,
0.34538954496383667,
-0.23058456182479858,
0.1829519... | |
QApplication inside it:
```
def initializePumpThread():
global pumpedThread
global app
if pumpedThread == None:
app = QtGui.QApplication(sys.argv)
pumpedThread = threading.Thread(target = pumpQt, args = ())
pumpedThread.start()
```
and then sets up a function to process the Qt eve... | [
-0.34032824635505676,
-0.08819268643856049,
0.7326415777206421,
-0.4412398040294647,
0.19096693396568298,
0.45259004831314087,
0.22804881632328033,
-0.2055913656949997,
0.016572022810578346,
-0.8560007810592651,
-0.2001783698797226,
0.49604299664497375,
-0.5412404537200928,
0.0058551216498... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.