text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
return 35.0/60.0
if (actualTime>300)and (actualTime<=360):
return 42.0/60.0
if (actualTime>360)and (actualTime<=420):
return 50.0/60.0
if (actualTime>420)and (actualTime<=480):
return 55.0/60.0
if (actualTime>480)and (actualTime<=540): | [
0.09548947960138321,
-0.6041896343231201,
0.5916695594787598,
0.2675664722919464,
0.5776832103729248,
0.5224282741546631,
-0.03270212188363075,
-0.4555637240409851,
-0.04969586431980133,
-0.5949499011039734,
-0.02352762222290039,
0.5599972009658813,
0.32709160447120667,
0.01987013220787048... | |
return 45.0/60.0
if (actualTime>540)and (actualTime<=600):
return 10.0/60.0
## Experiment ----------------------------------
model()
```
I think you want
```
return getnormal(self)
```
instead of
```
getnormal(self)
```
If the function exits without hitting a return statement, then it retur... | [
-0.0741175189614296,
-0.11994457244873047,
0.29105237126350403,
-0.24165688455104828,
0.1717626005411148,
-0.07634088397026062,
0.43072155117988586,
-0.2827819883823395,
-0.25115352869033813,
-0.4762447476387024,
-0.334646612405777,
0.6659913659095764,
-0.3135716915130615,
0.01712288148701... | |
while normal < 1:
normal = normalvariate(40,20)
return normal
``` | [
-0.31461864709854126,
-0.2874695956707001,
0.4478856027126312,
-0.17356857657432556,
0.12468788027763367,
-0.012888304889202118,
0.2290446162223816,
-0.18843406438827515,
0.29247692227363586,
-0.17934419214725494,
-0.343539297580719,
0.4936448037624359,
-0.31162208318710327,
-0.06120775267... | |
Alright, so I've got a couple divs wrapped in a container. The two interior divs overlap each over by 15px; The problem is I'm not able to layer them like I want.
```
<div class="headerButtons">
<div id="WorkTableButton" class="WorkTableButtonActive">
Work Table
</div>
<div id="additionalCostsButt... | [
0.28196027874946594,
-0.3057921230792999,
0.5661649703979492,
-0.2027374655008316,
-0.1354883462190628,
0.3110848665237427,
0.05814880505204201,
-0.37691858410835266,
-0.28690361976623535,
-0.8052223920822144,
-0.11975543200969696,
0.470342755317688,
-0.033463019877672195,
-0.2141558527946... | |
display:inline-block;
cursor:pointer;
}
#WorkTableButton{
width: 195px;
}
.WorkTableButtonActive{
background: url(ui_images/WorkTableActiveButton.png) no-repeat;
z-index:99999;
}
#additionalCostsButton{
width: 192px;
position:relative;
left: -15px;
}
.additionalCostsButtonInactive{
b... | [
0.0007165097049437463,
-0.16496099531650543,
0.8433448672294617,
-0.2741910517215729,
0.08873575180768967,
0.29220178723335266,
0.15901458263397217,
-0.2762469947338104,
-0.36421719193458557,
-0.5192247629165649,
-0.13606838881969452,
0.6195846199989319,
-0.183956578373909,
0.0945616066455... | |
width: 195px;
position: relative;
}
```
`#additionalCostsButton` will appear behind `#WorkTableButton` after that. | [
-0.03397797420620918,
-0.29119616746902466,
0.771790623664856,
-0.25726231932640076,
0.10296496003866196,
0.3109946548938751,
-0.2811312973499298,
-0.139940544962883,
-0.49179545044898987,
-0.8644837737083435,
-0.42130565643310547,
0.48509177565574646,
0.0942075327038765,
0.076332591474056... | |
Today at work someone tried to convince me that:
```
{$obj->getTableInfo()}
```
is fine for smarty/mvc/templating because it is using an objects method. I argued that because it makes a call to the database it has no place being there and it should be in the controller (we don't actually use MVC). Am I right in my u... | [
0.4405597150325775,
0.1396123617887497,
0.09525656700134277,
0.055582884699106216,
-0.2112104743719101,
-0.44760969281196594,
0.3069956600666046,
-0.10123521834611893,
-0.18293634057044983,
-0.4556643068790436,
-0.04839063808321953,
0.5235514640808105,
-0.5017142295837402,
0.59978222846984... | |
what it *should* be and do stuff like that, but it's not the correct way. | [
0.5162120461463928,
0.023109855130314827,
-0.11639214307069778,
-0.08785402029752731,
0.002764389617368579,
-0.23806001245975494,
0.5171347856521606,
0.19311539828777313,
0.06563343107700348,
-0.12512195110321045,
-0.022154131904244423,
0.2779702842235565,
-0.2233218401670456,
0.1326935291... | |
i am using c# to create a button for IE and this button performs certain actions that all depend on the document being a PDF document. I am trying to setup a guard to prevent any action taking place if the document type is not a PDF but not sure how as IE hands over the document to adobe and reader takes charge. I am u... | [
0.33692726492881775,
-0.012238134630024433,
0.5725592374801636,
0.026552559807896614,
-0.3425550162792206,
-0.4574960172176361,
0.33918496966362,
-0.24494780600070953,
0.22097238898277283,
-0.9449260234832764,
-0.14220896363258362,
0.7010190486907959,
-0.3904995918273926,
0.203036010265350... | |
you have installed that handles PDFs, because some plug-ins creates HTML wrapper for PDF file (like Adobe) so you get "HTML Document" as type and some plug-ins don't do this (like Foxit), so you can't relay on this exclusively.
So if you got PDF with HTML wrapper you can use *IHTMLDocument2::mimeType* to find out exac... | [
0.16967259347438812,
0.09620959311723709,
0.3497396409511566,
0.3485873341560364,
-0.2333514541387558,
-0.5021429061889648,
0.22551290690898895,
0.15691465139389038,
-0.07615663856267929,
-0.7765124440193176,
-0.07459170371294022,
0.47204291820526123,
-0.27090510725975037,
0.10630905628204... | |
to see if this is the case with PDFs alos.
Another options is to use *GetUrlCacheEntryInfoEx* API call to obtain file in local browser cache which stores document, then read it (only the beginning of the file, I think only the first 256 bytes are important) and call *FindMimeFromData* with data you just read and it wi... | [
0.2291063517332077,
-0.35127902030944824,
0.1720483899116516,
0.26591867208480835,
0.0505400113761425,
-0.1478191763162613,
0.47018441557884216,
0.11974169313907623,
0.020752422511577606,
-0.9179277420043945,
-0.26332542300224304,
0.6711706519126892,
-0.18160101771354675,
-0.05241294577717... | |
Our company is trying to implement a few single sign-on applications using Active Directory (Windows Server 2003) and LDAP. I would like to lock down the account used to make these LDAP queries as much as possible. What is the best practice for configuring this type of account?
You can restrict/allow what a user can or... | [
0.3152376711368561,
0.20084671676158905,
0.31680068373680115,
0.0007132847676984966,
-0.21701674163341522,
-0.2196522206068039,
-0.014292815700173378,
-0.09113573282957077,
-0.08946364372968674,
-0.5613068342208862,
0.1543567180633545,
0.44723716378211975,
-0.23320454359054565,
0.103274710... | |
delegating Active Directory administration: How delegation works in Active Directory](http://technet.microsoft.com/en-us/library/cc773317.aspx)
[Best practices for delegating Active Directory administration: Case study: a delegation scenario](http://technet.microsoft.com/en-us/library/cc773358.aspx) | [
-0.3934834599494934,
-0.15487706661224365,
-0.03217916563153267,
0.16846519708633423,
-0.018380893394351006,
-0.29129117727279663,
0.06752421706914902,
-0.33547452092170715,
-0.5062515139579773,
-0.4972524344921112,
-0.4491742253303528,
0.36383572220802307,
-0.18221265077590942,
0.48711204... | |
I know that its possible to read from a .txt file and then convert various parts of that into string, char, and int values, but is it possible to take a string and use it as real code in the program?
---
### Code:
```
string codeblock1="cout<<This is a test;";
string codeblock2="int array[5]={0,6,6,3,5};}";
int i;
c... | [
0.5152299404144287,
0.10382179170846939,
0.0523097887635231,
0.027750369161367416,
-0.04667743295431137,
0.021119633689522743,
0.4932057857513428,
-0.24486763775348663,
0.14930126070976257,
-0.8004708290100098,
-0.08395949751138687,
0.5227580070495605,
-0.21515284478664398,
0.0416260361671... | |
as a parse tree. Subsequently you can examine your parse tree and generate the necessary dynamic structures to perform the logic therin. The parse tree is subsequently converted into a runtime representation that is executed.
All compilers do exactly this. They take your code and they produce machine code based on th... | [
0.34220579266548157,
0.1812431514263153,
-0.24916993081569672,
0.09879199415445328,
-0.11558569222688675,
0.06369069218635559,
0.396506667137146,
-0.11682531982660294,
-0.23928771913051605,
-0.512291669845581,
-0.2518898844718933,
0.6387585997581482,
-0.37728917598724365,
-0.06180122867226... | |
operation) that generates code you can achieve the results you desire. | [
0.4651776850223541,
-0.16609779000282288,
-0.1267872452735901,
0.29961511492729187,
0.1369861662387848,
0.0531030148267746,
0.1988701969385147,
-0.4458006024360657,
-0.11265795677900314,
-0.571461021900177,
-0.595940113067627,
0.7160985469818115,
-0.35228049755096436,
-0.06033876910805702,... | |
"New Build Definition" in Team Explorer doesn't allow you to force a build to run more frequently than once every 24 hours. Is this possible?
I want the tests to run every hour regardless of whether any changes have been checked in.
I think this is possible by creating a scheduled task but I'd rather keep the solutio... | [
0.6120914816856384,
-0.19896914064884186,
0.2167801707983017,
-0.02039298415184021,
-0.05626353994011879,
-0.19258195161819458,
0.7400484681129456,
-0.3225492835044861,
-0.32253727316856384,
-0.9525781869888306,
0.08853635936975479,
0.7518805265426636,
-0.058815278112888336,
-0.03434527665... | |
I want to use some C++ STL collections in my Objective-C iPhone app. Apparently this is possible by giving files the extension ".mm" . What are some of the quirks/surprises associated with this?
I want to use the basic containers that I'm familiar with (vector, queue, set, ...)
Cheers!
See [Using C++ With Objective-C... | [
0.5556046962738037,
0.31637510657310486,
0.15534770488739014,
0.09731978178024292,
-0.1016855239868164,
0.01916138082742691,
0.12176128476858139,
-0.3096533715724945,
-0.45211541652679443,
-0.29302626848220825,
-0.13245810568332672,
0.7286085486412048,
-0.26191461086273193,
-0.266862601041... | |
new keywords not present in Objective-C. | [
-0.040527187287807465,
0.05687021464109421,
0.11717116087675095,
0.09270389378070831,
-0.13292774558067322,
-0.04984143003821373,
0.08267398923635483,
-0.16262482106685638,
-0.2713749408721924,
-0.3639226257801056,
-0.7277615070343018,
0.4656217396259308,
-0.3879980146884918,
-0.2440010309... | |
I have two *specific* C# coding conventions I've been practicing with mixed feelings.
I'd be curious to hear what people think. They are:
**#1. Name instances after the class it's an instance of, camelCased**
**#2: "Matching property names"**
Here's the rationale:
**#1. Name instances after the class it's an insta... | [
0.25141099095344543,
-0.055121347308158875,
0.187209814786911,
0.02033715508878231,
-0.09225399792194366,
-0.14727522432804108,
0.026595579460263252,
-0.21201469004154205,
-0.1538115292787552,
-0.9562235474586487,
0.1740364134311676,
0.6366689205169678,
-0.31520727276802063,
0.351017177104... | |
code like this causes me physical pain:
```
DataConnection dbConn = new DataConnection();
```
I can't stress enough how this convention has taken away the pain and anger of the variable name game.
This convention is in sharp contrast to attempting to name things in ways that try to indicate what the instance is do... | [
0.4622598886489868,
0.5485489964485168,
-0.1665308028459549,
0.08352715522050858,
-0.3603401780128479,
-0.46625766158103943,
0.49974435567855835,
-0.00728859705850482,
-0.13391630351543427,
-0.5512097477912903,
0.046415191143751144,
0.44673848152160645,
-0.42068880796432495,
0.454928964376... | |
same thing.
An example of this convention in practice is:
```
class Person { ...
public string FirstName { get; set; }
//and then
var person = new Person();
person.FirstName = firstName; //where firstName comes from somewhere else.
```
Very easy to read. Very boring. Boring is good when it comes to maintaining... | [
-0.13142725825309753,
-0.09630949795246124,
0.2693619132041931,
0.09390584379434586,
0.16659122705459595,
-0.276008278131485,
0.15342485904693604,
-0.07600387930870056,
-0.2824653387069702,
-0.7232362627983093,
-0.35814371705055237,
0.7745606303215027,
-0.3986469805240631,
0.24782657623291... | |
it exposes a very nice interface:
```
//notice how tempting it is to just say "ShoppingCart cart ... "
ShoppingCart shoppingCart = new ShoppingCart();
shoppingCart.Item = item;
```
Now, the alternative is to be creative -- You actually need to drum up two good variable names for Item: the public property name and ... | [
-0.06117246672511101,
-0.24580030143260956,
0.5286203622817993,
0.2837982177734375,
0.025834744796156883,
0.03582829609513283,
0.016263078898191452,
-0.10979516059160233,
-0.23370647430419922,
-0.6709654331207275,
-0.1486208289861679,
0.7805370092391968,
-0.360484778881073,
0.3373976647853... | |
..
///....
ShoppingCart userShoppingCart = new ShoppingCart();
userShoppingCart.ShoppingCartItem = userSelection;
```
I feel strongly enough about convention #1 that I think I can live with #2.
What do you think ?
in case you were not aware and if you care , C# already has a naming standard
<http://msdn.micr... | [
0.4378755986690521,
0.007179114501923323,
0.49570220708847046,
0.13933676481246948,
-0.08611844480037689,
-0.4871850311756134,
0.03791043534874916,
0.18459704518318176,
-0.40911591053009033,
-0.7396952509880066,
-0.025499623268842697,
0.559459924697876,
-0.3089118003845215,
0.2120683193206... | |
localWebServerLog, or even localWebServerLogFileInfo if you like the type in the name.
If I can hand off any advice from coming back to code you've written 6+ mos later. You will be scratching your head trying to figure out and track down what the heck all your dbConn and fileInfo's are. What file? What db? Lots of ap... | [
0.08036971837282181,
-0.13591447472572327,
0.4070650339126587,
0.23005883395671844,
-0.3478499948978424,
0.10321807861328125,
0.3281458914279938,
0.35082176327705383,
-0.3252449333667755,
-0.8626493811607361,
0.09973614662885666,
0.5089730024337769,
-0.49980777502059937,
0.3413644731044769... | |
be forced to litter your code with MyNameSpace.ShoppingCart.Item.
Having said all that ... even after years of coding I still screw up and don't follow the rules 100% of the time. I might have even used FileInfo fi = ... but that is why I love my Resharper "Refactor->Rename" command and I use it often. | [
0.696960985660553,
0.1495944708585739,
0.41524380445480347,
-0.058102793991565704,
-0.014578191563487053,
-0.17605489492416382,
0.335100919008255,
0.3407622277736664,
-0.1719735860824585,
-0.5826890468597412,
0.09217900782823563,
0.5120586156845093,
-0.19361892342567444,
0.4049311876296997... | |
website needs to go live which i have placed on client server.i have gven all permissions for IIS.in web.config file i have also given SQL connection string as :
```
<appSettings>
<add key="ConnectionString" value="Data Source=USER\SQLEXPRESS;Initial Catalog=people_metrix;User ID=MyUser;Password=abc123"/> </appSettin... | [
0.07667547464370728,
0.17794911563396454,
0.5738178491592407,
-0.11960022151470184,
-0.2979263365268707,
-0.32783693075180054,
0.5313268899917603,
0.027581315487623215,
-0.4868507385253906,
-0.9409191608428955,
0.0004630248004104942,
0.3056093454360962,
-0.3636493384838104,
0.3678009510040... | |
credentials (and not sa!).
Does the firewall on SQl sServer machine allow traffic on port 1433?
To allow connections to SQL Server by TCP port, perform the following steps.
1. Click Start | Control Panel | Network Connections
2. Right click on the network adapter that services inbound connections to SQL Server and ... | [
-0.22049644589424133,
0.20209605991840363,
0.8311443328857422,
0.23738627135753632,
0.09266697615385056,
-0.1765570342540741,
0.43450453877449036,
-0.33148279786109924,
-0.37417203187942505,
-0.5270481109619141,
-0.11935459822416306,
0.3657150864601135,
-0.3369213044643402,
0.3780176937580... | |
to enable different ports. To allow RPC over Named Pipes instead of TCP, open port 445 in the same way that I described above.
See this MS support article for configuring remote connections: [How to configure SQL Server 2005 to allow remote connections](http://support.microsoft.com/kb/914277) | [
-0.028853576630353928,
0.051984090358018875,
0.2806466817855835,
0.060931798070669174,
-0.10217760503292084,
-0.07533444464206696,
0.3143005967140198,
-0.07947057485580444,
-0.22366712987422943,
-0.33001357316970825,
0.014315592125058174,
0.29236146807670593,
-0.4017722010612488,
0.3868893... | |
How can I customize the sorting of categories in a `PropertyGrid`?
If I set either of the following...
```
propertyGrid.PropertySort = PropertySort.Categorized;
propertyGrid.PropertySort = PropertySort.CategorizedAlphabetical;
```
... then the categories will be alphabetized. ("Alphabetical" would seem to apply to ... | [
-0.2837306261062622,
-0.1126011312007904,
0.2895561754703522,
-0.013546444475650787,
-0.02465532161295414,
0.09744930267333984,
0.03845421224832535,
-0.2714652717113495,
-0.31260302662849426,
-0.6269119381904602,
-0.3369329571723938,
0.48160111904144287,
-0.12444818764925003,
0.22632631659... | |
public bool PropertyName {
get {
// ...
}
set {
// ...
this.OnPropertyChanged("PropertyName");
}
}
```
I have a few dozen properties in half a dozen categories.
Is there some way I can adjust the category | [
-0.03728119283914566,
0.10388213396072388,
0.24043697118759155,
-0.07959146052598953,
-0.13966967165470123,
-0.10554561018943787,
0.33604294061660767,
-0.15809978544712067,
-0.05789535865187645,
-0.5328501462936401,
-0.17554952204227448,
0.64667147397995,
-0.26799458265304565,
0.2285719960... | |
sort order while preserving my ease of use with `SelectedObject`?
If you mean that you want the categories sorted in a specific (non-alphabetical) way, then no - I don't think you can do that. You might want to try [VisualHint](http://www.visualhint.com/index.php/propertygrid/) - I expect it does have this (since you c... | [
0.1251438558101654,
-0.4090857207775116,
0.011193156242370605,
0.12171746045351028,
-0.5192576050758362,
-0.06320120394229889,
-0.1323828101158142,
-0.026633242145180702,
-0.41628748178482056,
-0.5888854265213013,
-0.039364367723464966,
0.2826569676399231,
-0.23729263246059418,
-0.10500388... | |
At work we use a .ini file to set variables prior to calling the rest of the framework (I think it goes
```
function getConfigVars(){
//read my_config.ini file
....
//call framework
}
```
and I have always wondered if there was a benefit to doing it that way.
It seems to me that you then have to write a... | [
0.2388179451227188,
0.23955276608467102,
0.3445527255535126,
-0.04383952543139458,
-0.13029931485652924,
-0.3980497419834137,
0.24703224003314972,
-0.29144933819770813,
-0.10029426217079163,
-0.6190379858016968,
0.012885709293186665,
0.595645010471344,
-0.1522938758134842,
0.09508683532476... | |
is set up and it seems more convenient to just call the variables and be able to have your IDE auto complete the text wherever you are using the ini variables / parse it for errors.
The [Zend Framework](http://framework.zend.com/) contains a config parses that parses files that are written in the ini format ([Zend\_Con... | [
-0.08237805217504501,
-0.08860275149345398,
0.09060195088386536,
0.06330843269824982,
-0.043043795973062515,
-0.42403537034988403,
-0.024383600801229477,
-0.3739970922470093,
0.09937460720539093,
-0.6383185386657715,
-0.19019503891468048,
0.43154382705688477,
-0.3612585961818695,
-0.236554... | |
both the ability to have a hierarchy of configuration data keys and inheritance between configuration data sections. Configuration data hierarchies are supported by separating the keys with the dot or period character (.). A section may extend or inherit from another section by following the section name with a colon c... | [
0.26184284687042236,
-0.4079548716545105,
0.12188050150871277,
0.23979219794273376,
0.24113856256008148,
0.07207275182008743,
-0.27954545617103577,
-0.4375225901603699,
-0.2595576047897339,
-0.42424532771110535,
-0.30202746391296387,
0.358175128698349,
-0.08569003641605377,
0.3777815699577... | |
for development and having two very different settings. Different paths set up in the ini file to where includes are located. This makes it much easier to move code from development to production knowing that immediately everything that is development will be turned off.
Sure, this would be possible with a PHP script,... | [
0.5741362571716309,
0.06404618918895721,
-0.07766422629356384,
0.15657781064510345,
0.01908182166516781,
-0.16239891946315765,
0.24346840381622314,
-0.1923389881849289,
-0.08468937873840332,
-0.5192740559577942,
0.009491411969065666,
0.608470618724823,
-0.2047211229801178,
0.08809165656566... | |
is set as a configuration variable (for example, site title that is used in the sites layout). INI files are easy to understand and read even for someone that has never programmed before.
Example from a website I am currently working on:
```
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_erro... | [
-0.26923391222953796,
-0.031080370768904686,
0.08599904924631119,
0.09009096026420593,
-0.08442389219999313,
0.09924822300672531,
-0.07162424176931381,
-0.5008981227874756,
-0.31204989552497864,
-0.8495746850967407,
0.08010625094175339,
0.0921270102262497,
-0.37110328674316406,
0.006192572... | |
for the various environments in which the code can be run. | [
0.16797852516174316,
0.16925345361232758,
-0.17320984601974487,
0.08821368962526321,
0.3218262791633606,
0.20399290323257446,
-0.005942031275480986,
-0.10529415309429169,
-0.1815979778766632,
-0.41006648540496826,
-0.4955942630767822,
0.5475595593452454,
0.08276718854904175,
-0.23669804632... | |
I'm a newbie developers and building an application with 3 other remote developers. I've only worked alone until now, and now I need a way to share my source code with the other developers on the project. All of the project sites out there (SourceForge, Codeplex, Google, etc) seem to be aimed at Open Source development... | [
0.9487137198448181,
0.42113932967185974,
0.13824893534183502,
0.10357684642076492,
-0.03663432598114014,
-0.20042377710342407,
0.2657402455806732,
0.14671139419078827,
-0.2528505027294159,
-0.6017658710479736,
0.18920309841632843,
0.5722540616989136,
0.08260168135166168,
0.4589380323886871... | |
is remotely accessible. [Subversion](http://subversion.tigris.org/) is excellent and very widely used; [Git](http://git-scm.com/) is another good option.
You could set up your own repository - you'll need a server which all devs can access via ssh, or via Apache/WebDAV - or use a hosted service, like [Beanstalk](http:... | [
0.4164181649684906,
-0.4602128565311432,
0.13399146497249603,
0.3964287042617798,
-0.20936277508735657,
-0.42629098892211914,
0.20424240827560425,
0.21409723162651062,
-0.5024557113647461,
-0.6018533706665039,
-0.24641689658164978,
0.16554902493953705,
-0.11060242354869843,
0.1828060895204... | |
Ok here is the question
I have three tables
```
events
- id
- name
questions
- id
- event_id
- name
answers
- id
- question_id
- description
```
While generating the add form, i can simply search for all the questions belonging to particular event, and show the questions in single HTML form.
But consider the edi... | [
0.05813722312450409,
0.13449084758758545,
0.39163315296173096,
0.026929832994937897,
-0.27608323097229004,
0.12801247835159302,
-0.09998692572116852,
-0.5096041560173035,
-0.17927083373069763,
-0.5424512624740601,
-0.04298685863614082,
0.5078681707382202,
-0.22212645411491394,
-0.105792433... | |
the user submits, should i delete all past answers and do a INSERT on the answers table for all the answer values? or is it a good practice to UPDATE existing answers first and INSERT only new values?
The former obiviously being easier with DELETE followed by INSERT. While the later is somewhat tedious. The problem wi... | [
0.008561786264181137,
0.10534884035587311,
0.25694775581359863,
0.41599202156066895,
-0.12433648854494095,
0.06517082452774048,
0.2677733302116394,
-0.26232561469078064,
-0.2051636427640915,
-0.5101526379585266,
-0.18177984654903412,
0.7388057708740234,
-0.18275627493858337,
0.196714371442... | |
an audit trail of changes to a particular item. With just insert/delete it's either much harder or plain impossible to have that kind of linkage and history.
As for how to handle the submission of the form, for fields that can be updated (ie they're existing records), you need to be able to identify the field somehow.... | [
0.7545858025550842,
0.161834716796875,
0.26066312193870544,
0.2111539989709854,
0.01783435232937336,
-0.6354128122329712,
0.2154465764760971,
-0.2823599576950073,
-0.006638332735747099,
-0.3955170810222626,
0.11037282645702362,
0.5396130681037903,
0.04588255658745766,
-0.0383751317858696,
... | |
client.
This could take the form of:
```
<input type="text" name="name_117" value="Some value">
<input type="text" name="name_118" value="Some other value">
<input type="text" name="name_1243" value="Yet another value">
```
and you have to process all the input parameters, decode the identifier and act accordingly.... | [
-0.28673115372657776,
-0.25008904933929443,
0.26622745394706726,
0.03897297382354736,
-0.020478276535868645,
-0.08602311462163925,
0.10148072987794876,
-0.09992470592260361,
-0.547789454460144,
-0.4216405153274536,
-0.20325951278209686,
0.9537397623062134,
-0.33615848422050476,
0.208364352... | |
Can any one give a simple method using JavaScript to display a status message while file is uploading and fade away when file is uploaded?
```
<style type="text/css">
#loadingMessage {
position: absolute;
top: WHEREVER;
left: WHEREEVER;
z-Index: 100;
}
</style>
<div id... | [
0.025235341861844063,
-0.22924281656742096,
0.7026954293251038,
0.0884808674454689,
-0.15968993306159973,
-0.20387226343154907,
0.19451680779457092,
-0.020217617973685265,
-0.36347898840904236,
-0.8768098950386047,
-0.2223912924528122,
0.20237025618553162,
-0.18903212249279022,
-0.03781198... | |
document.getElementById("yourform").onsubmit = function() {
document.getElementById("loadingMessage").visibilty = "visible";
return true;
};
</script>
``` | [
0.06153025105595589,
-0.26873213052749634,
0.617283821105957,
-0.336350679397583,
0.16640041768550873,
-0.10870549082756042,
0.6237518787384033,
-0.08685977011919022,
-0.09148139506578445,
-0.6959326267242432,
-0.5903491377830505,
0.6446958780288696,
-0.2715897858142853,
0.1747789680957794... | |
I need to replace the following:
```
CREATE TABLE /*!32312 IF NOT EXISTS*/ `access`
```
to
```
CREATE TABLE IF NOT EXISTS `access`
```
I've tried
```
:%s/\/\*\!\d+(.*)\*\//\1/g
```
But that didn't seem to go. What am I doing wrong?
vim requires backslashing + (or use \* instead). Also, you need to backslash gr... | [
-0.05649498850107193,
0.2628074884414673,
0.39077576994895935,
-0.13263674080371857,
-0.12718181312084198,
-0.17070457339286804,
0.7507553696632385,
-0.30870321393013,
-0.1337329000234604,
-0.5527664422988892,
-0.15758129954338074,
0.5522699356079102,
-0.4392144978046417,
-0.03214007988572... | |
I got a list of RegionGroup objects with two properties: an int "number" and a list<> of "Regions".
I need to output a distribution of number of Region objects combined for each number.
For example, given:
[Region 1] - number: 1 - list<> has 5 members
[Region 2] - number: 3 - list<> has 2 members
[Region 3] - numbe... | [
0.12352915853261948,
-0.1740102469921112,
0.5692495107650757,
0.16206642985343933,
-0.035355571657419205,
-0.06532169878482819,
0.3160390257835388,
-0.049609508365392685,
-0.7100505828857422,
-0.6134065985679626,
0.00007056506001390517,
0.0031207664869725704,
0.0052114371210336685,
0.52725... | |
various tutorials, and I think I need to use groups, but I couldn't quite get anything working.
Any help? Thanks!
The answer to this similar question may help:
[Linq Query with SUM and ORDER BY](https://stackoverflow.com/questions/820552/linq-query-with-sum-and-order-by)
or this one
[C# List<> GroupBy 2 Values](htt... | [
0.050246428698301315,
0.12467232346534729,
0.08878500014543533,
0.3929212987422943,
-0.041863761842250824,
-0.03340482339262962,
0.05557672306895256,
-0.17144644260406494,
-0.35921600461006165,
-0.22439204156398773,
-0.06276630610227585,
0.5606289505958557,
-0.043990734964609146,
-0.232581... | |
I have a asp.net application which is located on a server.
It was working but then I added a whole bunch of stuff and now I get:
XML-parser error: no element found
Address: <http://www.dtm.se/payex/Default.aspx>
Row 1, Column 1:
(I have translated this error message from Swedish so it might not be 100% accurate)
The... | [
0.20927076041698456,
0.38526320457458496,
0.5901780128479004,
-0.28633633255958557,
-0.1321011781692505,
-0.21403788030147552,
0.8138688802719116,
0.01403601560741663,
-0.2556258738040924,
-1.020789384841919,
-0.16895155608654022,
0.483833909034729,
-0.5488114356994629,
-0.1682923734188079... | |
case there was something wrong with the upload but the code was there.
I also have tried to remove the code I have added to see if I can get it to work again.
But no. Of course I am not 100% sure I got everything back to the way it was.
It doesn't matter which file I am trying to load all of them get this error messa... | [
0.4067855477333069,
0.11710532754659653,
0.10351162403821945,
0.1672847718000412,
0.06672955304384232,
-0.12268346548080444,
0.28129932284355164,
0.1978209763765335,
-0.42098885774612427,
-0.522596001625061,
0.3133687973022461,
0.5801718831062317,
-0.17269356548786163,
0.22974857687950134,... | |
of code so I don't know really what to upload here but maybe someone recognize this error message and knows what it is or maybe point me in the right direction.
The error was that I was using MySql and when I added the reference to the connector it added a line in web.config, but it didn't add the dll in the bin folder... | [
0.6086505055427551,
-0.17749860882759094,
0.6505458354949951,
0.2484709471464157,
-0.5403228402137756,
-0.07195790112018585,
0.21426840126514435,
-0.022875577211380005,
-0.21544234454631805,
-0.716812789440155,
0.5669009685516357,
0.44300925731658936,
-0.4314015507698059,
0.585578560829162... | |
maybe I had it mixed up with something else. | [
0.39533287286758423,
0.01062939316034317,
-0.18895849585533142,
0.07966960966587067,
-0.05875182896852493,
-0.06272494792938232,
0.1209833100438118,
0.1607859581708908,
-0.17787788808345795,
0.025373345240950584,
0.6292667388916016,
0.031327057629823685,
-0.22164569795131683,
0.27225086092... | |
I'm not having any luck finding one.
[Apache Ki](http://incubator.apache.org/ki/) (formerly known as [JSecurity](http://www.jsecurity.org/)) could be what you're looking for if you're not afraid of doing some things yourself. I've personally created a completely transparent, annotation based, per-page web application s... | [
0.26900798082351685,
-0.07541000843048096,
-0.24211692810058594,
0.10286230593919754,
-0.10208981484174728,
-0.375527948141098,
0.27695155143737793,
0.31265005469322205,
-0.08445584028959274,
-0.3075595200061798,
0.05429784208536148,
0.0790938213467598,
0.2051347941160202,
0.04504958540201... | |
I'm playing around with retrieving the MAC address from the NIC - there are a variety of ways to get it, this article covers the most common:
<http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451>
I'm currently using the GetAdaptersInfo method, which seems the most bulletproof, but if the MAC ... | [
0.026919109746813774,
0.1434459388256073,
0.6322624087333679,
0.29533934593200684,
0.4167785048484802,
-0.29418617486953735,
0.4180161654949188,
0.05916231870651245,
-0.21323750913143158,
-0.5157005786895752,
-0.3674313724040985,
0.8751473426818848,
-0.06182483211159706,
0.1766223013401031... | |
hardly transparent to the user.
Is there any other methods that anyone is familiar with, that will return the hardware MAC regardless of what the registry is set to? Ideally I'd like a solution that works on XP on up.
Thanks in advance!
My guess is that in the linked CodeGuru article, the Miniport solution is likely ... | [
0.29186394810676575,
0.04556813836097717,
0.45864376425743103,
0.40112459659576416,
-0.08813989907503128,
-0.15256765484809875,
0.2889443039894104,
0.009408681653439999,
-0.15106357634067535,
-0.8129445910453796,
-0.061891406774520874,
0.8756625056266785,
-0.07793014496564865,
-0.036383680... | |
providing PAN services.
Perhaps rather than rebooting after changing the registry setting, you could try stopping and restarting the relevent network services. You could easily check this manually prior to looking for a programmatic solution.
(n.b. the above is all guess work. If you try it and it works, perhaps add... | [
0.6525354385375977,
-0.13436469435691833,
-0.005538024008274078,
0.3840600252151489,
0.201811283826828,
0.11011739820241928,
0.033853501081466675,
0.19512592256069183,
-0.45236557722091675,
-0.6079830527305603,
-0.0782097652554512,
0.31120768189430237,
-0.039799999445676804,
-0.15258066356... | |
I am writing a SharePoint timer job, which needs to pull the content of a web page, and send that HTML as an email.
I am using HttpWebRequest and HttpWebResponse objects to pull the content.
The emailing functionality works fine except for one problem.
The web page which serves up the content of my email contains im... | [
0.2256854772567749,
0.13222599029541016,
0.7090838551521301,
-0.12726695835590363,
-0.24685581028461456,
0.11799265444278717,
0.0760141983628273,
-0.05611259117722511,
-0.1324606090784073,
-0.6008273959159851,
0.19084371626377106,
0.5152573585510254,
-0.38914674520492554,
0.035186085850000... | |
straight forward way to do this? I don't want to run a Regex over the html code to replace all relative URLs with absolute URLS.
Found this cool Codeplex tool called HtmlAgilityPack.
<http://www.codeplex.com/htmlagilitypack>
Using this API, we can parse Html like we can parse XML documents. We can also query and sear... | [
0.07097654044628143,
-0.22795842587947845,
0.9913537502288818,
0.17905433475971222,
-0.36199256777763367,
-0.07104378938674927,
0.01739591360092163,
-0.39285317063331604,
-0.026650698855519295,
-0.3053164482116699,
0.2709791362285614,
0.7381041646003723,
-0.20645271241664886,
0.07180239260... | |
foreach (HtmlNode node in hrefNodes)
{
string imgUrl = node.Attributes["src"].Value;
node.Attributes["src"].Value = webAppUrl + imgUrl;
}
StringBuilder sb = new StringBuilder(); | [
-0.2681649625301361,
0.1425725519657135,
0.6884616613388062,
-0.46840593218803406,
-0.1857922226190567,
0.36505478620529175,
0.538784921169281,
-0.6041445136070251,
-0.13277633488178253,
-0.6473168730735779,
-0.45203539729118347,
0.10401186347007751,
-0.3552835285663605,
0.2193569242954254... | |
StringWriter sw = new StringWriter(sb);
htmlDoc.OptionOutputAsXml = false;
htmlDoc.Save(sw);
htmlMessage = sb.ToString();
``` | [
-0.02747393026947975,
-0.2125459462404251,
0.7760221362113953,
-0.530819296836853,
0.038399580866098404,
0.13272632658481598,
0.6149434447288513,
-0.44129297137260437,
-0.16560441255569458,
-0.6987791061401367,
-0.13853974640369415,
0.36441570520401,
-0.3491368591785431,
0.0986113324761390... | |
I've used the last example on this page for equal height columns.
<http://www.ejeliot.com/blog/61>
The problem is, when you click an internal anchor link, the content is shifted up, and the overflow is making the top part of the page disappear.
For example, click this link
<http://www.noosanativeplants.com.au/~new/... | [
0.14595003426074982,
-0.15972788631916046,
0.1552463173866272,
0.03974489867687225,
-0.03774125501513481,
-0.08335860818624496,
0.012435248121619225,
0.3648858666419983,
-0.2636221647262573,
-0.4753926396369934,
0.22924625873565674,
0.07102762162685394,
-0.2559228837490082,
0.2180375456809... | |
require a bit of reworking to do the background for this page.
Thanks
I really recommend you to use the fail-safe faux columns method. If you are not a layout expert (no offence, seriously), stay away from the padding/margin/overflow magic and the one true layout technique. The latter is elegant but it can cause unwan... | [
-0.061454106122255325,
0.24624143540859222,
0.5989754796028137,
-0.023188069462776184,
-0.15119478106498718,
-0.0442194938659668,
0.46303439140319824,
-0.2969414293766022,
-0.268839567899704,
-0.6382793188095093,
0.14474919438362122,
0.7756593227386475,
-0.15617232024669647,
-0.05818598344... | |
negative margin "hack" will be visible. I recommend you to completely remove this solution and use faux columns. Faux columns background can be added to your #main-content or even the #content div (not just like the example in the [ALA article](http://www.alistapart.com/articles/fauxcolumns/) that sets the background i... | [
0.24666862189769745,
0.10390763729810715,
0.49359411001205444,
0.1378072202205658,
-0.23945623636245728,
-0.26873779296875,
0.23025843501091003,
0.38344806432724,
-0.11024963855743408,
-0.5095503330230713,
0.1736931949853897,
0.5138844847679138,
-0.2735162675380707,
-0.1459421068429947,
... | |
I found the [Wikipedia entry](http://en.wikipedia.org/wiki/Softcoding) on the soft coding anti-pattern terse and confusing. So what is soft coding? In what settings is it a bad practice (anti-pattern)? Also, when could it be considered beneficial, and if so, how should it be implemented?
Short answer: Going to extremes... | [
0.2221485823392868,
0.04927283897995949,
-0.023885458707809448,
0.10369594395160675,
-0.020696504041552544,
0.006073162890970707,
0.5919110774993896,
-0.23370015621185303,
-0.19031216204166412,
-0.6909505724906921,
-0.2975216805934906,
0.5940470099449158,
-0.20828846096992493,
0.0532656721... | |
I have a dropdown in which we add certain items after the dropdown is bound by data from the db, hence the need to sort the dropdown arises. So i need to sort a dropdown which can have duplicates. What is the best way of doing this?
Instead of adding items directly to the Dropdown, I would suggest adding them to the da... | [
0.12603193521499634,
-0.04125857725739479,
0.1546810120344162,
0.1765637993812561,
-0.06156216189265251,
0.10391262918710709,
-0.18037699162960052,
-0.3860001564025879,
-0.2504993975162506,
-0.5082626938819885,
-0.019103530794382095,
0.1956196278333664,
-0.3314257264137268,
0.4393875896930... | |
I am flabbergasted by the definition of the inode number:
> An inode is a data structure on a traditional Unix-style file system
> such as UFS or ext3. An inode stores basic information about a regular
> file, directory, or other file system object. [Source](http://www.cyberciti.biz/faq/unix-linux-remove-strange-nam... | [
-0.15695980191230774,
0.6839618682861328,
0.40454939007759094,
0.04258391633629799,
-0.01728862337768078,
-0.201267808675766,
-0.07584910094738007,
-0.13274802267551422,
-0.1861322820186615,
-0.42796728014945984,
-0.2129049450159073,
-0.017949195578694344,
-0.19168764352798462,
0.423606067... | |
15 user staff 510B Mar 19 02:28 stdout_TEST
```
If not, what kind of things you can know thanks to the data structure?
> Can you conclude something directly from the numbers in the front?
Not necessarily. Inodes are recycled.
> If not, what kind of things you can know thanks to the data structure?
Check the hea... | [
0.18381920456886292,
0.36299368739128113,
0.5554724335670471,
0.09833211451768875,
0.09030438214540482,
0.0969739705324173,
0.2219417542219162,
-0.39650580286979675,
-0.13900180160999298,
-0.7264521718025208,
-0.3270958364009857,
0.7560046315193176,
0.17589379847049713,
-0.0147546576336026... | |
new Windows 7 hides systray icons by default.
what is the recommended way to show information to users now?
I need to have a small clickable icon visible to user so user can access my "tool" anytime. Should I use the gadget to show my GUI instead? Can it communicate with my Delphi app somehow?
Without more informati... | [
0.1773107945919037,
-0.435442179441452,
0.5398872494697571,
0.07116691023111343,
0.14046084880828857,
-0.17560602724552155,
0.496095210313797,
0.20059865713119507,
-0.43108218908309937,
-0.7827321887016296,
-0.3498598635196686,
0.9259382486343384,
-0.42112383246421814,
-0.23635722696781158... | |
What cheat sheets exist for Objective-C?
I have googled but I really don't know what to look for. Most of them assume I know Objective-C and I don't. I really want a guide aimed at an experienced programmer.
The Apple developer site has ~~[Introduction to The Objective-C 2.0 Programming Language](http://developer.app... | [
-0.07265333831310272,
0.4007572531700134,
0.2607913017272949,
0.068845734000206,
-0.13105392456054688,
-0.044104598462581635,
0.26368287205696106,
-0.019417088478803635,
-0.06374730169773102,
-0.1674104630947113,
-0.10029768198728561,
1.046172022819519,
-0.21629787981510162,
-0.49784046411... | |
I use [Symfony Sandbox structure](http://www.symfony-project.org/book/1_2/03-Running-Symfony) in my development. Now, thinking of future ugrades, I want to separate the Symfony application out from my application and put it in a separate folder. The only problem is that it seems my application and Symfony are hopelessl... | [
0.12771165370941162,
0.3442802131175995,
0.42183980345726013,
-0.24464434385299683,
-0.1530270278453827,
-0.19699352979660034,
0.08114627003669739,
-0.02951398864388466,
-0.13045474886894226,
-0.5222970247268677,
0.032369956374168396,
0.5338427424430847,
-0.43474024534225464,
0.18161563575... | |
how can i retrieve URL for list box from web browser which is currently running on machine. using c#
see this [question](https://stackoverflow.com/questions/352236/reading-from-a-text-field-in-another-applications-window/365159), its for c++ but it may help | [
0.18977412581443787,
-0.1435590386390686,
0.39883121848106384,
0.20665343105793,
-0.09122595936059952,
-0.29211628437042236,
0.11711088567972183,
-0.18869031965732574,
-0.1663476973772049,
-0.4705646336078644,
-0.038598839193582535,
0.4123598039150238,
-0.09584541618824005,
-0.047762237489... | |
Input is xml as a string and I have a XSD schema to verify against.
I wish to validate the xml against the XSD schema while loading the xml into an XDocument (requirement since I need to do parsing with Linq afterwards).
Anyone has a small code-snippet?
Load the document, and then use [`XDocument.Validate`](http://ms... | [
0.05867568776011467,
0.3230500817298889,
0.5970167517662048,
0.17509889602661133,
-0.12232711911201477,
0.06764237582683563,
-0.21274955570697784,
-0.22485589981079102,
0.001834332593716681,
-0.5085030794143677,
-0.1392332762479782,
0.615530252456665,
-0.0997982919216156,
-0.21222759783267... | |
Javascript Confirm popup, I want to show Yes, No button instead of OK and Cancel.
I have used this vbscript code:
```
<script language="javascript">
function window.confirm(str) {
execScript('n = msgbox("' + str + '","4132")', "vbscript");
return (n == 6);
}
</script>
```
this only works in ... | [
0.206498920917511,
0.2910361588001251,
0.664114236831665,
-0.1604865938425064,
0.05935794115066528,
-0.2513989508152008,
0.16052071750164032,
-0.06082566827535629,
0.18812495470046997,
-0.5367760062217712,
0.04954233765602112,
0.4822521209716797,
-0.5541436672210693,
0.06738844513893127,
... | |
name.
Unfortunately, there is no cross-browser support for opening a confirmation dialog that is not the default OK/Cancel pair. The solution you provided uses VBScript, which is only available in IE.
I would suggest using a Javascript library that can build a DOM-based dialog instead. Try Jquery UI: <http://jqueryui.... | [
0.2370505928993225,
-0.28560593724250793,
0.4144214689731598,
0.19179554283618927,
-0.06278979033231735,
-0.2611362338066101,
0.38757145404815674,
0.024166425690054893,
-0.07722889631986618,
-0.622967004776001,
-0.055319689214229584,
0.4359167218208313,
-0.28168290853500366,
0.244971975684... | |
I use Clearcase on a project with ~3700 files. While making a release, there are some directories that have to be labeled recursively. The file count here is ~2400. The files in other directories are selectively labelled. I currently label the files using a script to iterate through a list of files and label the files ... | [
0.30558064579963684,
0.06030968204140663,
0.4301656484603882,
-0.11199020594358444,
0.04981502890586853,
-0.07984152436256409,
0.16651929914951324,
-0.16102927923202515,
-0.20387522876262665,
-0.830375611782074,
-0.09451687335968018,
0.46798011660575867,
-0.14430683851242065,
0.12040179222... | |
need to apply your label recursively if you can (that is if all the files of a given tree need labeling).
It is also recommended to do that operation on a dynamic view, in order to avoid any side effect related to an update status of a snapshot view (not updated, or update in progress)
The result will be faster (I ... | [
0.1880025863647461,
0.05779024586081505,
0.34766823053359985,
-0.04644772782921791,
0.15316322445869446,
-0.5826703310012817,
0.35821959376335144,
-0.14045576751232147,
-0.4296785295009613,
-0.44714343547821045,
-0.47137120366096497,
0.7859950661659241,
-0.319930762052536,
-0.0593177303671... | |
the point of labeling is to identify a *coherent* set of file (i.e. a set of file which evolves and is labeled as a all). That means "`mklabel -rec`" is always better than putting a label on a single file.
A recursive label does not miss any file, a label put on files from a list can result in an incomplete set (for... | [
0.346594899892807,
-0.13979268074035645,
-0.1038898155093193,
0.17238730192184448,
-0.37100329995155334,
-0.45167699456214905,
0.24430185556411743,
-0.3139622211456299,
-0.35704874992370605,
-0.45164284110069275,
-0.5438207387924194,
0.09795400500297546,
-0.4531872570514679,
0.444687217473... | |
Let's say I have an object that contains a Word property and a Sentence property. The sentence must use the word, and I want to replace the word in that sentence with a link using a public function (say, GetLinkedSentence). The catch is maybe the sentence uses a plural form of the word and maybe the "word" itself is ac... | [
0.22283817827701569,
0.09524673968553543,
0.383404940366745,
0.14768025279045105,
-0.17371641099452972,
-0.20188339054584503,
0.5520951151847839,
-0.0022218397352844477,
-0.28271186351776123,
-0.7956494092941284,
-0.18814821541309357,
0.3101617991924286,
-0.2467237114906311,
0.243410095572... | |
the whole word minus the last two letters. for example, if the word is "happy", {1} is replaced with "hap"
{2} = the second to last letter of the word ("p" if the word is "happy")
{3} = the second to last and last letter of the word ("py" in this example)
this will find "happy" "happily" "unhappy" "unhappily"... unf... | [
-0.07858525216579437,
0.1140400767326355,
0.47242471575737,
-0.24642376601696014,
-0.38946107029914856,
0.26532626152038574,
0.5226982235908508,
0.1609662026166916,
-0.4269844889640808,
-0.4373894929885864,
-0.5651792287826538,
0.30279818177223206,
-0.1266983598470688,
-0.00197857827879488... | |
for instance "exacerbate", so it will be matching "exacerba", "exacerbat" and "exacerbate", which is FAR less common than "hap" "happ" and "happy". it's also important to note it won't find words with extensive root changes, like "person" to "people".
so while it's not a PERFECT solution, it works for me :) thanks for... | [
-0.13903984427452087,
-0.11937447637319565,
0.20601893961429596,
-0.20020639896392822,
-0.7482843399047852,
0.47109705209732056,
0.7029033899307251,
-0.07742558419704437,
0.06306494772434235,
-0.5699322819709778,
-0.21561698615550995,
0.4047797918319702,
-0.19265398383140564,
0.13037027418... | |
I am a flex newbie. I need to disable some of the tabs in a flex tabbar specified, by configuration. I am having trouble in iterating over the tabs in the tab bar. If i use getChildAt() command, it does not disable the tab button, but the content of that tab button, so its no good.
Thanks and regards,
Mohit Ranka
When... | [
0.6684591174125671,
-0.022372020408511162,
0.16802208125591278,
-0.13682079315185547,
-0.04538754001259804,
-0.1457313895225525,
0.43751853704452515,
-0.14909528195858002,
-0.11885547637939453,
-0.6562358736991882,
-0.12289401888847351,
0.6116026639938354,
-0.27530890703201294,
0.094823189... | |
import mx.controls.tabBarClasses.Tab;
private function clickTab(event:ItemClickEvent):void {
var target:TabBar = event.currentTarget as TabBar;
var currTab:Tab;
var parity:int = event.index & 1;
/* disable all tabs at indices w/ same parity as clicked tab;
... | [
-0.34447455406188965,
-0.30876463651657104,
0.36581334471702576,
-0.13480067253112793,
0.12255217134952545,
0.4258098602294922,
0.34099525213241577,
0.009399162605404854,
-0.21653519570827484,
-0.342786580324173,
-0.3556585907936096,
0.7296282649040222,
-0.6832608580589294,
0.1309707611799... | |
opposite parity.
*/
for (var i=0; i<target.numChildren; ++i) {
currTab = target.getChildAt(i) as Tab;
currTab.enabled = (i&1)^parity;
}
}
]]>
</mx:Script>
<mx:TabBar id="someTabs" itemClick="clickTab(event)">
<mx:dataProvider> | [
-0.46924978494644165,
-0.30448293685913086,
0.537182629108429,
-0.1773521900177002,
-0.3498590290546417,
0.5676149129867554,
0.33231034874916077,
-0.1244731917977333,
-0.2711229920387268,
-0.2748619616031647,
0.11990557610988617,
0.332416296005249,
-0.7184031009674072,
0.05967825651168823,... | |
<mx:String>Foo</mx:String>
<mx:String>Bar</mx:String>
<mx:String>Baz</mx:String>
<mx:String>Bam</mx:String>
</mx:dataProvider>
</mx:TabBar>
``` | [
-0.22858840227127075,
0.2192053198814392,
0.5422228574752808,
-0.2617550194263458,
-0.11599787324666977,
0.29285964369773865,
-0.08094404637813568,
-0.5328341126441956,
-0.3298496901988983,
-0.2483382523059845,
-0.4954302906990051,
0.2746645510196686,
-0.563025176525116,
0.2163735628128051... | |
I need support for quantities with units. I'd like the type system to enforce unit correctness as much as possible. For example, it shouldn't be possible to combine grams with dollars. I'm going down the path of parameterized types, but this code seems far more repetitious than Scala code I've seen from others.
```
ab... | [
0.39451897144317627,
-0.0033306004479527473,
0.24832788109779358,
0.04485919326543808,
0.161345973610878,
0.10740113258361816,
0.337382048368454,
-0.659225344657898,
-0.1231660544872284,
-0.2548975348472595,
0.00713625131174922,
0.7208176851272583,
-0.1331312209367752,
0.02533104456961155,... | |
Quantity[T]) = this(lower, upper, new Confidence(.90))
}
```
Is there a cleaner way to do this? The drumbeat of "T<:UnitOfMeasure" is the main thing that's bothering me.
Date.parse raises an ArgumentError if you pass an invalid date such as Feb. 31. You can rescue the error if you want to respond to it instead of let... | [
0.364125519990921,
0.25872933864593506,
0.40770822763442993,
-0.17943575978279114,
-0.10635576397180557,
0.05987793952226639,
0.2653506398200989,
-0.1315060257911682,
-0.4212862551212311,
-0.3927355110645294,
0.18671377003192902,
0.7922905683517456,
0.08575504273176193,
0.3161126673221588,... | |
Page **must be scrolled after clicking on link with id** (let it be #link).
Here is my code, which **doesnt work**:
```
$(document).ready(function(){
$("#link").click(function () {
$(this).animate({ scrollTop: 2000 }, 'slow');
});
});
```
But **this one works**, after the page loads it slowly scro... | [
0.12001901865005493,
0.03756911680102348,
0.9002618789672852,
-0.12446565926074982,
-0.1300191432237625,
0.07389093190431595,
0.154164656996727,
-0.4794900119304657,
-0.21057173609733582,
-1.101224422454834,
-0.06328723579645157,
0.452385276556015,
-0.2192353457212448,
-0.01995686814188957... | |
$("#link").click(function () {
$("body").animate({ scrollTop: 2000 }, 'slow');
});
});
```
Hers's a pretty good explanation of <https://developer.mozilla.org/En/DOM/Element.scrollTop> | [
0.29078373312950134,
-0.23482728004455566,
0.29271674156188965,
0.02072952128946781,
0.2864680588245392,
0.08179881423711777,
0.3510802984237671,
-0.3949829339981079,
-0.1550101488828659,
-0.2724389135837555,
-0.040235865861177444,
0.6421982049942017,
-0.27796846628189087,
0.11915685981512... | |
I am writing certain code in MIPS and I've come to the point where the requirement is to store the result, temporarily, in `HI` and `LO` special registers (both are 4 bytes wide). These instructions are at my disposal:
```
divu s,t lo <-- s div t ; hi <-- s mod t
multu s,t hi / lo < -- s * t ;
```
So, `... | [
-0.04242052510380745,
0.05284789949655533,
0.3032076358795166,
-0.2433784455060959,
0.2008610963821411,
0.45589008927345276,
0.3185378313064575,
-0.44793903827667236,
-0.08202069252729416,
-0.500792384147644,
-0.5746836066246033,
0.12092000991106033,
0.08579026907682419,
0.0791043341159820... | |
bytes).
Later, to retrieve result from `HI` and `LO` registers, I can:
```
mfhi $v0
mflo $v1
```
I already figured out how to store result of a calculation in `LO`:
```
ori $v0,$0,1 # Store result from $a0 into LO
divu $a0,$v0
```
* the `divu` stores result of the division in LO, so I just divi... | [
0.15353727340698242,
-0.1586577594280243,
0.6912206411361694,
-0.3515523374080658,
-0.0074819838628172874,
0.416149765253067,
0.11904645711183548,
-0.6826739311218262,
-0.22378146648406982,
-0.29360198974609375,
-0.18507255613803864,
0.4163351356983185,
-0.07874544709920883,
0.276761204004... | |
# Shift $a0 by 32 bits and store into HI/LO
```
But, the result is that the value in `HI` is 1 bit right of where it should be (so if my value is `0100 1000` then `HI` will contain `0010 0100`).
Does anyone know how to store something in `HI` register?
I'd like to extend Nils Pipenbrinck answer:
From MIPS32 arquite... | [
0.033065613359212875,
0.24501675367355347,
0.6198786497116089,
-0.15469570457935333,
0.011801826767623425,
0.07887272536754608,
0.15631353855133057,
-0.5756175518035889,
-0.09690645337104797,
-0.15784132480621338,
-0.14730210602283478,
0.3751450777053833,
-0.5673156380653381,
0.04499243199... | |
DIVU,MULT, or MULTU must be read by MFHI or MFLO
before a new result can be written into either HI or LO.
If an MTHI instruction is executed following one of these arithmetic instructions, but before an MFLO or MFHI
instruction, the contents of LO are UNPREDICTABLE. The following example shows this illegal situation:
... | [
0.3223612904548645,
-0.4148642420768738,
0.2683488130569458,
-0.2251143753528595,
0.2630060315132141,
-0.03007759526371956,
0.28104904294013977,
-0.4296542704105377,
-0.014482397586107254,
-0.37038689851760864,
-0.49194660782814026,
0.5311517715454102,
-0.31388044357299805,
0.2712468802928... | |
# code not containing mflo
# this mflo would get an UNPREDICTABLE value
MFLO r3
```
Historical Information:
In MIPS I-III, if either of the two preceding instructions is MFHI, the result of that MFHI is UNPREDICTABLE.
Reads of the HI or LO special register must be separated from any subseque... | [
-0.09061776101589203,
-0.16291946172714233,
0.3763091564178467,
-0.3352220356464386,
0.155606210231781,
0.08684823662042618,
0.45895564556121826,
-0.5107276439666748,
-0.21159213781356812,
-0.20822355151176453,
-0.6323810815811157,
0.20144373178482056,
-0.4649072587490082,
-0.0725060477852... | |
and MIPS64, this restriction does not exist.
mtlo
====
Format: MIPS32 (MIPS I)
```
MTLO rs
```
Purpose:
To copy a GPR to the special purpose LO register
Description:
```
LO ← rs
```
The contents of GPR rs are loaded into special register LO.
Restrictions:
A computed result written to the HI/LO pair by DIV... | [
0.13417623937129974,
0.06842570751905441,
0.3827449381351471,
-0.042404383420944214,
0.29736804962158203,
0.08827998489141464,
-0.0747104361653328,
-0.4759467542171478,
-0.38022053241729736,
-0.13696441054344177,
-0.36011889576911926,
0.4559866487979889,
-0.5772337317466736,
0.101325273513... | |
MUL r2,r4 # start operation that will eventually write to HI,LO
... # code not containing mfhi or mflo
MTLO r6
... # code not containing mfhi
# this mfhi would get an UNPREDICTABLE value
MFHI | [
-0.24258214235305786,
-0.2814347743988037,
0.6418479084968567,
-0.3269519507884979,
-0.05502034351229668,
0.12162213027477264,
0.22596201300621033,
-0.3739997148513794,
-0.04692516848444939,
-0.28892794251441956,
-0.4393620789051056,
0.39395228028297424,
-0.4655136168003082,
0.075261957943... | |
r3
```
Historical Information:
In MIPS I-III, if either of the two preceding instructions is MFHI, the result of that MFHI is UNPREDICTABLE.
Reads of the HI or LO special register must be separated from any subsequent instructions that write to them by two
or more instructions. In MIPS IV and later, including MIPS32... | [
-0.13598695397377014,
0.11683525890111923,
0.23877310752868652,
-0.5707531571388245,
0.10250300914049149,
-0.08448541909456253,
0.5680668354034424,
-0.6939702033996582,
-0.21801027655601501,
-0.18784715235233307,
-0.47231313586235046,
0.16215509176254272,
-0.4575551748275757,
0.09561738371... | |
C++11 adds the ability for telling the compiler to [create a default implementation](http://en.wikipedia.org/wiki/C%2B%2B0x#Defaulting.2Fdeleting_of_standard_functions_on_C.2B.2B_objects) of any of the [special member functions](http://en.wikipedia.org/wiki/Special_member_functions). While I can see the value of deleti... | [
0.07444829493761063,
0.004027139861136675,
0.04956585168838501,
-0.5073347091674805,
-0.18361850082874298,
-0.18760208785533905,
0.27538037300109863,
-0.18022972345352173,
-0.09888511151075363,
-0.4581173360347748,
-0.49943047761917114,
0.8168191313743591,
-0.8130864500999451,
-0.666696846... | |
eg() {}
};
```
Or am I missing a use-case?
A defaulted constructor will have a declaration, and that declaration will be subject to the normal access rules. E.g. you can make the default copy constructor protected. Without these new declarations, the default generated members are public. | [
0.09046486020088196,
0.1319914311170578,
0.014496330171823502,
-0.06460283696651459,
0.21547967195510864,
-0.3962979316711426,
0.23767989873886108,
0.08712559938430786,
-0.1336919367313385,
-0.2952456474304199,
-0.621071994304657,
0.7404880523681641,
-0.3639340102672577,
0.4816252589225769... | |
How can i fadeOut a div using jquery
You realise jQuery has [a website](http://jquery.com/) with [documentation](http://docs.jquery.com/Main_Page), right?
And if you were to look at that documentation, you'd come across [the answer](http://docs.jquery.com/Effects/fadeOut).
```
$("#theIDofYourDivTag").fadeOut("slow");... | [
0.6001741290092468,
-0.221610426902771,
0.8174521327018738,
-0.05339675396680832,
0.1587512344121933,
-0.29328569769859314,
-0.027779046446084976,
-0.1748226135969162,
-0.08717240393161774,
-0.635669469833374,
-0.3372752070426941,
0.4105812907218933,
0.00437030429020524,
0.1839181035757064... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.