text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Inspired by chapter 7 of Learning jQuery 1.3 (not found in the third edition), I've put together this sort routine:
```
var rows = $table.find('tbody > tr').get();
$.each(rows, function(index, row) {
var $cell = $(row).children('td').eq(column);
$(row).data('sortKey',$cell);
});
rows.sort(function(a, b) {
... | [
-0.14112050831317902,
-0.282938152551651,
0.2844228446483612,
0.021740034222602844,
0.10672091692686081,
0.1808767020702362,
0.28715649247169495,
-0.17792508006095886,
-0.17834141850471497,
-0.7028822302818298,
-0.20856939256191254,
0.12933771312236786,
-0.4087570905685425,
0.1910459250211... | |
like using `$(a)` and `$(b)` on every row.
**Q:** Is there a way I can cache `$(a)` and `$(b)`? The author uses something he calls an *expando* instead.
> This kind of property, attached to a DOM element but not a normal DOM
> attribute, is called an expando. This is a convenient place to store
> the key, since we ... | [
-0.056482620537281036,
-0.16152943670749664,
0.46137621998786926,
-0.12146157771348953,
0.3839072287082672,
0.026888784021139145,
-0.18793831765651703,
-0.3492017388343811,
-0.43591269850730896,
-0.7082811594009399,
-0.17005853354930878,
0.5039151906967163,
-0.1809166967868805,
0.096384346... | |
quick
$(a).data('sortKey') // slow
```
This is superior because it does not need to construct a new jQuery object -- you are right to think of this as a performance issue.
The second is to cache the result of `data`, so you only need to do it once.
```
rows.sort(function(a, b) {
var aKey = $.data(a, 'sortKey'),... | [
-0.15470880270004272,
-0.30941447615623474,
0.2230684608221054,
-0.2997620701789856,
0.20328301191329956,
0.09948970377445221,
0.22846446931362152,
-0.2521756887435913,
-0.17863430082798004,
-0.4705885946750641,
-0.433594673871994,
0.5662674903869629,
-0.6040604710578918,
-0.07247460633516... | |
jQuery 1.7, which is much superior to 1.3, both in speed and in other functionality. | [
-0.3145081400871277,
-0.43309053778648376,
0.8283842206001282,
-0.07087092101573944,
-0.43371322751045227,
-0.23737528920173645,
-0.05599972605705261,
0.28279292583465576,
0.1192769929766655,
-0.5125688314437866,
-0.3451632559299469,
0.4345683157444,
-0.18889030814170837,
-0.16853065788745... | |
I have an MVC3 app written in C# that I'd like to generate rel=canonical tags for. In searching SO for ways to achieve this automatically, I came across [this post](https://stackoverflow.com/questions/5396724/generating-an-canonical-automatically-for-mvc3-webapplication).
I implemented it in my dev environment and it ... | [
0.3976442813873291,
0.11290673911571503,
0.6722818613052368,
-0.023629406467080116,
-0.36598286032676697,
-0.3198961615562439,
0.2630387842655182,
-0.124217689037323,
-0.271729975938797,
-0.36327072978019714,
-0.15354278683662415,
0.5485930442810059,
-0.25947457551956177,
0.133815586566925... | |
URL that points to my site (same IP address just a different hostname, I have no idea why, they claim it's for reverse DNS purposes -- this is another subject). However, I've started seeing my page show up in Google search results under this mirrored URL. Not good for SEO, since it's "duplicate content". Now, I've fixe... | [
0.10814715921878815,
0.2696422040462494,
0.6152116060256958,
0.19063439965248108,
-0.2879326641559601,
-0.31766432523727417,
0.37240296602249146,
0.27183276414871216,
-0.5360879898071289,
-0.483402818441391,
0.23292694985866547,
0.05667901411652565,
-0.28323662281036377,
0.744331419467926,... | |
rel=canonical link tag would have output a canonical URL containing the MIRRORED URL if someone were to go to the mirrored site, which is not at all what I would want. It should ALWAYS be `<link rel="canonical" href="http://www.productionsite.com" />`, regardless of the URL in the address bar, right? I mean, isn't that... | [
0.4249527156352997,
0.02916751243174076,
0.8903787136077881,
0.0094243623316288,
-0.4704592227935791,
-0.10876046121120453,
0.41124486923217773,
-0.1117975264787674,
-0.4563697874546051,
-0.2998146712779999,
-0.2450239211320877,
0.5038959383964539,
-0.34423038363456726,
0.3876136541366577,... | |
with a hard-coded domain name, I'm just wondering why I see so many examples of people generating canonical URLs this way when it doesn't seem to fit the purpose (at least in my example). What problem are they trying to solve by just inserting the current URL into a rel=canonical link element?
Great question, and you'r... | [
0.5261442065238953,
0.19583342969417572,
0.4642067849636078,
0.3120891749858856,
-0.25439032912254333,
-0.6438266038894653,
0.395904541015625,
0.30659219622612,
-0.4368523955345154,
-0.32901984453201294,
-0.11140822619199753,
0.39286696910858154,
-0.3629128932952881,
0.6524659395217896,
... | |
the massage that occurs to the originally requested URL, people are trying to set the canonical link to the "settled on" final URL format, post rewriting. That said, I think you've dialed in on an oversight most people are having - which is "What about URLs that reached the page, that were NOT anticipated and REWRITTEN... | [
0.22462008893489838,
-0.2590346932411194,
0.9549486637115479,
0.26529955863952637,
0.17619925737380981,
-0.39149534702301025,
0.43329310417175293,
0.0412789024412632,
-0.232374906539917,
-0.4852210283279419,
0.03072199784219265,
0.5959441661834717,
-0.1683083474636078,
0.3175216317176819,
... | |
valid url; This is because it was "fixed" by your rewrite rules. Make sense? So you'll need to update your MVC routes to handle the bad route created by your ISP. NOTE: You MUST make sure you don't use the originally requested URL, but the final, rewritten one, when building the canonical link value.
Continue on for m... | [
0.5856457948684692,
0.1501363217830658,
0.7179977297782898,
0.3342004716396332,
-0.11669284105300903,
-0.5363773703575134,
0.6915391087532043,
0.2559555172920227,
-0.42226552963256836,
-0.4337955415248871,
0.06331676244735718,
0.4945564270019531,
-0.41738638281822205,
0.4099661111831665,
... | |
are stating that having www.yourdomain.com/mypage.htm and yourdomain.com/mypage.htm is actually hurting your page ranking due to "duplicated" content. I suspect this is why people are showing the "same domain" there, because it's actually the domain stripped of the "WWW". (I use a rewrite rule to make the www vs no-www... | [
0.6320776343345642,
0.036557089537382126,
0.6420178413391113,
0.20269861817359924,
-0.2578120827674866,
-0.6735089421272278,
0.37503254413604736,
0.11832500994205475,
-0.39744192361831665,
-0.6505377888679504,
0.03014272265136242,
0.567810595035553,
-0.2274085283279419,
0.32244759798049927... | |
rewrite rule that sends them to your "real" domain OR at *least* have the canonical link be setup to only use your "real" domain with the WWW consistently there, or not there. (It is argued which is better, I don't think it matters as long as you are consistent.) | [
0.5400216579437256,
-0.12763789296150208,
0.7387031316757202,
0.22160309553146362,
-0.16882000863552094,
-0.4054027795791626,
0.7601059675216675,
0.06869656592607498,
-0.25139328837394714,
-0.8440724611282349,
-0.0795050859451294,
0.397085964679718,
-0.3784935474395752,
0.2743000090122223,... | |
In my site i have to store two types of delivery dates contract delivery date and adjusted delivery date for orders.Basically contract date is delivery date of productes at the time of order taken .and adjusted date is adjusteants in date that can be less or grater then contract date
Table is like below:
```
id pro... | [
0.4948869049549103,
0.1403481364250183,
0.5551741719245911,
-0.4818097651004791,
-0.06437476724386215,
0.49475163221359253,
-0.22957447171211243,
-0.13014498353004456,
0.0905240848660469,
-0.45341116189956665,
0.26968178153038025,
0.4794481098651886,
0.3493082821369171,
0.44805580377578735... | |
date else contract date
Done with below query :
```
select id,
product_name,
if(adjdeldat is not NULL, adjdeldat, condeldat) as delivery_date
from orders
```
Above query works fine but I have to get products with any delivery date(if(adjdelcat is not NULL,adjdeldat,condetdat)) > lastyear (for no... | [
0.31452128291130066,
-0.16493722796440125,
0.8827496767044067,
-0.27000829577445984,
-0.10185636579990387,
0.11025721579790115,
0.11531463265419006,
-0.0913320779800415,
-0.18626481294631958,
-0.6992477774620056,
0.059881482273340225,
0.5501134395599365,
0.19420666992664337,
0.224094837903... | |
your "link juice" any harder.
I suspect the main reason is because MVC, by design, is a URL rewriting/routing system. So depending on the massage that occurs to the originally requested URL, people are trying to set the canonical link to the "settled on" final URL format, post rewriting. That said, I think you've dial... | [
0.2710406482219696,
-0.09728630632162094,
0.566389262676239,
0.2692384421825409,
0.1793576031923294,
-0.36560750007629395,
0.43597346544265747,
0.3482756018638611,
-0.2403099685907364,
-0.528480052947998,
0.01422419399023056,
0.6529717445373535,
-0.23496603965759277,
0.29455825686454773,
... | |
For example: If you rewrote your ISP's mirrored domain requests, then by the time it reaches the loaded page, it's NOW a valid url; This is because it was "fixed" by your rewrite rules. Make sense? So you'll need to update your MVC routes to handle the bad route created by your ISP. NOTE: You MUST make sure you don't u... | [
0.6229915618896484,
-0.11384449154138565,
0.6150609254837036,
0.32755979895591736,
-0.05390669405460358,
-0.4495513141155243,
0.5781949758529663,
0.29040461778640747,
-0.37930601835250854,
-0.549561083316803,
0.1264817863702774,
0.44231507182121277,
-0.40497204661369324,
0.3119068741798401... | |
this because your site already "mirrors" another domain that people always forget about. The "WWW" subdomain.
Believe it or not, although debated, many are stating that having www.yourdomain.com/mypage.htm and yourdomain.com/mypage.htm is actually hurting your page ranking due to "duplicated" content. I suspect this i... | [
0.643358051776886,
-0.027543578296899796,
0.7095357179641724,
0.15898972749710083,
-0.26081323623657227,
-0.5782533884048462,
0.5727891325950623,
0.22500813007354736,
-0.4186512231826782,
-0.6782324910163879,
0.2147710621356964,
0.542836606502533,
-0.16119173169136047,
0.5812063813209534,
... | |
of your site, it might actually just penalize you for having pages that fail to load (i.e. 404s) I recommend having a rewrite rule that sends them to your "real" domain OR at *least* have the canonical link be setup to only use your "real" domain with the WWW consistently there, or not there. (It is argued which is bet... | [
0.7774277329444885,
0.062475405633449554,
0.42179906368255615,
0.3446640968322754,
-0.2593441605567932,
-0.5817537307739258,
0.6570267081260681,
0.49850380420684814,
-0.3756195306777954,
-0.8058509230613708,
0.0724879652261734,
0.4761052429676056,
-0.17544874548912048,
0.26889336109161377,... | |
when we enter wrong password in a program that need password in OSX the window shakes how can i implement it in my program?
use below code when user enter wrong password
```
static int numberOfShakes = 8;
static float durationOfShake = 0.5f;
static float vigourOfShake = 0.05f;
CGRect frame=[self.view.wind... | [
0.20248159766197205,
0.06917008012533188,
0.49359482526779175,
-0.06207127869129181,
0.012427517212927341,
0.2510879635810852,
0.6813490986824036,
-0.3705274164676666,
-0.34684842824935913,
-0.3476564586162567,
-0.06026140972971916,
0.47695425152778625,
-0.08142668753862381,
0.135562762618... | |
CGPathAddLineToPoint(shakePath, NULL, NSMinX(frame) - frame.size.width * vigourOfShake, NSMinY(frame));
CGPathAddLineToPoint(shakePath, NULL, NSMinX(frame) + frame.size.width * vigourOfShake, NSMinY(frame));
}
CGPathCloseSubpath(shakePath);
shakeAnimation.path = shakePath;
shakeAnimation.duratio... | [
-0.1162455677986145,
0.05765834078192711,
0.41774776577949524,
-0.13066397607326508,
-0.10376729816198349,
0.12555798888206482,
0.6698567271232605,
-0.38651686906814575,
-0.48455220460891724,
-0.17366096377372742,
-0.3450123369693756,
0.5845016837120056,
-0.11911400407552719,
0.05804293602... | |
I'm using SQL Server 2008 R2 and Microsoft Excel.
* I have the server set up to be logged in via Windows user *or* database user
* I **can** log into the database fine with the database user
* I **can** connect to the database with my Silverlight app
* I **cannot** figure out how to connect from a remote PC in Excel
... | [
-0.011572801508009434,
0.3989882469177246,
0.3235064446926117,
-0.1193302720785141,
-0.31079167127609253,
0.0485742911696434,
0.38953015208244324,
0.03791894018650055,
-0.014055048115551472,
-0.9056426286697388,
0.38477522134780884,
0.46154189109802246,
-0.27614831924438477,
0.261957705020... | |
SQL Server:
A) It doesn't admit remote connections
B) There's a firewall or anything else that avoids remote computers connections
C) You don't have SQL Browser service running
Troubleshooting steps:
1) In a remote computer open cmd and run `ping win2k8-01` You should get responses from your computer. if not, ther... | [
-0.15033061802387238,
0.08978629112243652,
0.2856709659099579,
0.24219506978988647,
-0.16587644815444946,
-0.34572526812553406,
0.2732079029083252,
-0.13454248011112213,
-0.28804755210876465,
-0.609856128692627,
-0.03616245090961456,
0.4099563658237457,
-0.20466849207878113,
0.131729453802... | |
Verify that TCP/IP is enabled. If not enable it [How to: Enable the TCP/IP Protocol for a Database Instance](http://msdn.microsoft.com/en-us/library/bb909712%28VS.90%29.aspx)
4) Verify that your server allows remote connections. To do this open SSMS, connect to your server, right click, open Properties, and look for "... | [
0.08385191857814789,
0.06288572400808334,
0.40450701117515564,
0.3700675666332245,
0.2523147761821747,
-0.5514199733734131,
0.4018365442752838,
-0.09195500612258911,
-0.29029926657676697,
-0.8439500331878662,
-0.3802873194217682,
0.6046829223632812,
-0.1972261667251587,
-0.0591088533401489... | |
try connecting with another tool from the remote computer (you can install SSMS on that computer and try connecting).
This should work. if not let me know what is failing.
If it's working, enable firewall again and try connecting again. If you cannot, you need to [configure your firewall to allow SQL Server connectio... | [
0.29126882553100586,
-0.054245565086603165,
0.10115890949964523,
0.2589744031429291,
-0.04878546670079231,
-0.34014442563056946,
0.5123201012611389,
0.12098588794469833,
-0.38839268684387207,
-1.0897005796432495,
-0.16873885691165924,
0.6944273710250854,
-0.40881621837615967,
0.14690154790... | |
My div with class name 'header-body-right' doesn't seem to be floating to the left of my div named 'header-body-centre' and I can't understand why, here is my HTML,
```
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> </TITLE>
<meta charset="UTF-8" />
<link href="main.css" rel="stylesheet" type="text/css">
<META NA... | [
-0.09357339888811111,
0.18105259537696838,
0.811370849609375,
-0.14755550026893616,
-0.25177720189094543,
-0.03215533867478371,
-0.06797178834676743,
-0.20215150713920593,
-0.09322711080312729,
-0.7585841417312622,
-0.08599590510129929,
0.15497639775276184,
0.03215336054563522,
0.204520881... | |
<div class="header-body-centre">
<div class="logo">
<img src="logo.png" />
</div>
</div>
<div class="header-body-right">
test
</div>
</div>
<div class="navbar">
</div>
<div class="content-container"> | [
0.30043303966522217,
-0.2421828806400299,
0.26229849457740784,
-0.03310537338256836,
-0.3105885088443756,
-0.04505438730120659,
-0.023444930091500282,
-0.5878145098686218,
-0.14377787709236145,
-0.5777281522750854,
-0.16099314391613007,
0.2558266818523407,
0.06910998374223709,
0.0580494180... | |
</div>
</BODY>
</HTML>
```
The CSS I am using for the code is posted below,
```
body
{
margin:0px;
padding:0px;
}
.header-top
{
height:11px;
width:100%;
background-image: url('HeaderTopNav.png');
background-repeat: repeat-x;
}
.header-body
{
width:100%;
height:100px;
}
.header-... | [
0.21574144065380096,
0.16743503510951996,
0.6828359961509705,
0.04830910265445709,
-0.08191266655921936,
0.23130470514297485,
0.20276066660881042,
-0.12535275518894196,
-0.2096446305513382,
-0.6378685832023621,
-0.44981494545936584,
0.1454440802335739,
-0.09647373110055923,
0.0277067404240... | |
float:left;
}
.quickNav
{
float:right;
}
.container
{
margin: 0 auto;
background-color: #fff;
border: 2px solid #c9c8c8;
border-bottom: none;
height:auto;
overflow:hidden;
width: 1000px;
clear:both;
}
```
Can anyone see why? I have tried floating the header-bosy-centre and decr... | [
-0.022116724401712418,
0.14327368140220642,
0.5614253878593445,
-0.019266953691840172,
0.04952312633395195,
-0.05672398582100868,
0.197645902633667,
-0.19995075464248657,
-0.3908425271511078,
-0.5177018642425537,
-0.1690586358308792,
0.3532413840293884,
-0.1372021734714508,
0.1100545376539... | |
also, causing the elements to appear side by side.
```
.header-body-centre
{
margin: 0 auto;
height:100%;
width:70%;
float: left;
}
```
Your prior styling did not work because of how floated elements behave. When an element is floated it is taken out of the normal flow of the document. It is shifted ... | [
0.35529786348342896,
-0.12216819077730179,
0.6308878064155579,
0.013647590763866901,
0.1210085079073906,
-0.07224661111831665,
-0.15325626730918884,
-0.34756505489349365,
-0.10940534621477127,
-0.5276715159416199,
0.0609898716211319,
0.036743659526109695,
-0.20505556464195251,
0.1038423851... | |
I have a php file which has the following path
```
Shubhmangalam/admin/welcome_image_edition/delete_image.php
```
and an image file with the following path
```
Shubhmangalam/welcome_images/image_1.jpg
```
I want to delete the image\_1.jpg file which I know can be done by using unlink() method..
but the prob is th... | [
-0.22680307924747467,
0.4781700074672699,
0.809675931930542,
-0.2999388575553894,
-0.3572631776332855,
-0.19814912974834442,
0.5259060263633728,
-0.4249430000782013,
-0.12483711540699005,
-0.4729755222797394,
-0.4602467119693756,
0.5135204195976257,
-0.3068464994430542,
0.20746676623821259... | |
the image by getting appropriate path.. I dont want the actual path, but the path from the project folder that is `Shubhmangalam`
thanks in advance
If you did a migration from MYSQL DB, just check that ... `USING latin1 ) COLLATE latin1_swedish_ci` ... is always usefull and correct.
Some mistakes can come from that. ... | [
0.1983775496482849,
0.010165798477828503,
0.617994487285614,
0.22657805681228638,
-0.11533710360527039,
-0.17277942597866058,
0.4354753792285919,
0.24415969848632812,
-0.007878171280026436,
-0.9172040224075317,
-0.07863782346248627,
0.4987071454524994,
-0.01858317106962204,
-0.074185341596... | |
I am currently playing around with LISP. Everything is fine, but I can't understand the following issue.
I have the this append-operation:
```
(define (append l1 l2)
(if (eq? l1 null)
l2
(cons (first l1)
(myappend (rest l1) l2))))
```
I use it like this:
```
(myappend (cons (cons 1 2) nu... | [
-0.22573937475681305,
0.03469650819897652,
0.5157430768013,
-0.4849908649921417,
0.044784996658563614,
-0.2100304663181305,
0.3049291968345642,
-0.24629707634449005,
-0.1946314424276352,
-0.6709836721420288,
-0.16540522873401642,
0.8857437372207642,
-0.5214871168136597,
-0.1360970884561538... | |
lists. Can anybody help me? What is LISP doing?
`cons` returns a dotted pair, not necessarily a list.
`(cons 1 2)` returns `(1 . 2)`
`(cons 1 null)` returns `(1)`
`(cons 1 (cons 2 null))` returns `(1 2)` | [
-0.13986895978450775,
0.20046177506446838,
0.3402099013328552,
-0.004667326342314482,
-0.15835946798324585,
-0.16889114677906036,
0.16964870691299438,
0.019044822081923485,
-0.5974022746086121,
-0.4573940634727478,
-0.25572869181632996,
0.4585144817829132,
-0.8674026727676392,
-0.348490267... | |
I'm working through Ryan Bates' Railscast #124: Beta Invitations. I've got all the code in place, but I haven't been able to actually get things working. When I try to send an invite email, I get this message.
```
Routing Error
No route matches [POST] "/invitations"
```
If I pluralize the resource's n... | [
0.36582210659980774,
0.318672776222229,
0.03902602195739746,
-0.212424635887146,
-0.019738005474209785,
-0.29053714871406555,
0.672836422920227,
-0.0138322738930583,
-0.32795143127441406,
-0.6609315276145935,
0.16423799097537994,
0.3495318293571472,
-0.471201628446579,
0.31972309947013855,... | |
:destroy]
match '/hunts', :to => 'hunts#index'
match '/signup/', :to => 'users#new'
match '/signin', :to => 'sessions#new'
match '/signout', :to => 'sessions#destroy'
match '/contact', :to => 'pages#contact'
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
root :to => "... | [
-0.08181124180555344,
-0.04861052706837654,
0.6993107199668884,
0.21128594875335693,
0.039274588227272034,
-0.15339913964271545,
0.27134251594543457,
-0.949944794178009,
-0.32021448016166687,
-0.6668030619621277,
-0.4867313802242279,
0.4528532326221466,
-0.4146929681301117,
0.3342655003070... | |
if logged_in?
Mailer.deliver_invitation(@invitation, signup_url(@invitation.token))
flash[:notice] = "Thank you, invitation sent."
redirect_to root_path
else
flash[:notice] = "Thank you, we will notify when we are ready."
redirect_to root_path
end
else
rende... | [
-0.10420428961515427,
-0.2783583104610443,
0.6348419785499573,
-0.06672456860542297,
0.10879012197256088,
-0.20802877843379974,
0.532825231552124,
-0.2146894484758377,
-0.34741854667663574,
-0.8885014653205872,
-0.3367058336734772,
0.37084832787513733,
-0.052365414798259735,
0.010255225002... | |
form_for @invitation do |f| %>
<p>
<%= f.label :recipient_email, "Friend's email address" %><br />
<%= f.text_field :recipient_email %>
</p>
<p><%= f.submit "Invite!" %></p>
<% end %>
```
`rake routes` is a very useful tool which you can use to see all the routes defined for your ... | [
0.10426928102970123,
-0.35208892822265625,
0.855026364326477,
0.10516946017742157,
-0.13485974073410034,
-0.30931970477104187,
0.30553779006004333,
-0.6120748519897461,
0.1779780387878418,
-0.7813143730163574,
0.1060832217335701,
0.49328479170799255,
-0.13145436346530914,
-0.09575976431369... | |
invitation#index
POST /invitation(.:format) invitation#create
new_invitation GET /invitation/new(.:format) invitation#new
edit_invitation GET /invitation/:id/edit(.:format) invitation#edit
invitation GET /invitation/:id(.:format) invitation#show
P... | [
0.024833351373672485,
-0.02546420507133007,
0.5947130918502808,
0.024986369535326958,
-0.33237403631210327,
-0.3216893672943115,
0.08369464427232742,
-0.5632501244544983,
-0.22026458382606506,
-0.6665483117103577,
-0.5997575521469116,
0.25931620597839355,
-0.09913870692253113,
-0.006434235... | |
DELETE /invitation/:id(.:format) invitation#destroy
```
Note that you are calling the `InvitationController`'s actions.
So nothing is wrong with your route -> controller mapping.
You are just posting to a non-existent route. When you pluralize the route's name, you end up having a non-existent controller (`Inv... | [
0.053928084671497345,
-0.29403042793273926,
0.4869486689567566,
0.2078397125005722,
0.0007371412357315421,
-0.7048782110214233,
0.5320947170257568,
0.24525006115436554,
-0.4114466905593872,
-0.8106352090835571,
-0.6351616382598877,
0.3732600808143616,
-0.47342294454574585,
0.40373057126998... | |
I am trying to run the [official helloworld](https://shadyabhi@github.com/shadyabhi/helloworld.git) program in google-appengine 1.6.4 for python 2.7.
It's so frustrating to be not able to run a simple helloworld. I would appreciate any kind of help here.
Error I encounter:-
```
shadyabhi@MBP-archlinux ~/codes/gae $... | [
-0.10106270015239716,
0.36391428112983704,
0.40240681171417236,
-0.06356781721115112,
-0.057704418897628784,
-0.036479197442531586,
0.8555315732955933,
0.0033788199070841074,
-0.17234669625759125,
-0.5643917322158813,
-0.1821630448102951,
0.48609834909439087,
-0.47755926847457886,
-0.34076... | |
on port 8080: http://localhost:8080
INFO 2012-04-06 23:25:56,774 dev_appserver_multiprocess.py:649] Admin console is available at: http://localhost:8080/_ah/admin
WARNING 2012-04-06 23:26:00,928 py_zipimport.py:139] Can't open zipfile /usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info: IOError: [Errno 13]... | [
-0.35383304953575134,
0.43006786704063416,
0.6959369778633118,
-0.018434597179293633,
0.10816089808940887,
0.20118214190006256,
0.548027515411377,
-0.32081496715545654,
-0.11825228482484818,
-0.4809003472328186,
-0.43568095564842224,
0.5470410585403442,
-0.2933984100818634,
0.2134607285261... | |
wsgi.py:189]
Traceback (most recent call last):
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 239, in _LoadHandler
raise I... | [
-0.12343987822532654,
0.29618388414382935,
0.4283379316329956,
0.02418075129389763,
-0.1773071587085724,
0.11792990565299988,
0.40572261810302734,
-0.1996222734451294,
-0.27495551109313965,
-0.3689819276332855,
-0.39897018671035767,
0.39438265562057495,
-0.08885442465543747,
0.058758161962... | |
are struggling to get the basic tutorial working, the first thing you should do is make sure that your project is literally the exact same as the google example. | [
0.5040512084960938,
0.19512172043323517,
-0.11747035384178162,
0.31118112802505493,
0.04468855634331703,
-0.15065814554691315,
0.2732866406440735,
0.36653485894203186,
-0.1263752579689026,
-0.5660691261291504,
0.04723113775253296,
0.6548044085502625,
0.19905170798301697,
-0.166250094771385... | |
I'm developing for Spotify (JavaScript) on an OSX machine and the application crashes when I'm trying to play a song.
The call I make to the API is: `player.play(trackURI);`
What happens is that the Spotify client will play for about 1/4th of a second the song, then it will crash. I do believe it is this method that ... | [
0.4235081076622009,
0.23479245603084564,
0.21711361408233643,
-0.17110681533813477,
0.13351187109947205,
-0.22913531959056854,
0.30070188641548157,
0.10432320833206177,
-0.3546530306339264,
-0.5513689517974854,
0.24725224077701569,
0.7156077027320862,
-0.4313662350177765,
0.216956138610839... | |
for the `EVENT_CHANGE` event like so `player.observe(models.EVENT.CHANGE, function (e) {`
When the song ends and a new one starts, I want to play the next song in my fake queue. Therefore, I call `player.play(nextSongId)` when the EVENT.CHANGE is triggered with `e.data.curtrack == true`.
Then I guess Spotify tries to... | [
-0.04895541071891785,
-0.36551418900489807,
0.4339005947113037,
-0.1739884614944458,
0.28564780950546265,
-0.1599765419960022,
0.27946406602859497,
-0.018614787608385086,
-0.4647204279899597,
-0.6132475137710571,
-0.2087087780237198,
0.8153495788574219,
-0.46815410256385803,
0.290066868066... | |
event, and then I would again call player.play() again. See the piece of code for a good way to deal with song changes.
```
player.observe(models.EVENT.CHANGE, function (e) {
// Only update the page if the track changed
if (e.data.curtrack == true && !justChangedSong) {
var songId = queue.shift();
... | [
-0.0748295858502388,
-0.5717536807060242,
0.559406578540802,
-0.28009942173957825,
0.16131554543972015,
0.16801896691322327,
0.1707749217748642,
-0.10778431594371796,
-0.44635963439941406,
-0.48126518726348877,
-0.012917309999465942,
0.8397363424301147,
-0.4215501844882965,
0.2027589976787... | |
justChangedSong = true;
}
}
else if (justChangedSong)
{
justChangedSong = false;
}
});
```
Also, if you have a button called "Next song" or so, connect it to the `playNextSong()` method:
```
function playNextSong()
{
var songId = queue.shift();
if (songId != null)
{
... | [
-0.2028120905160904,
-0.7729424238204956,
0.8389898538589478,
-0.1551685631275177,
0.29425638914108276,
-0.007833646610379219,
-0.1720864474773407,
0.2146538496017456,
-0.6069934368133545,
-0.8900289535522461,
-0.1052544042468071,
0.568922221660614,
-0.3399446904659271,
0.17216725647449493... | |
not crashing anymore. Cheers! | [
0.15837518870830536,
0.06432939320802689,
0.5073270797729492,
-0.00777416629716754,
-0.17149297893047333,
-0.3390089273452759,
0.1218651533126831,
0.5989974141120911,
-0.9588894248008728,
-0.3903641104698181,
-0.012221293523907661,
0.45447152853012085,
0.15546508133411407,
-0.1716039478778... | |
I have made many changes to my source files and would just like to pull the last push that was done. I would like it to delete any new files, and revert modified files to the last version. I basically want to just revert to how the origin master last was.
Is there a way to do this without deleting the directory, re-i... | [
0.2699495255947113,
-0.27504152059555054,
0.46446388959884644,
0.10983363538980484,
0.1489904522895813,
0.22850660979747772,
-0.026572108268737793,
0.14929071068763733,
-0.3886488974094391,
-0.6422103047370911,
-0.15880714356899261,
0.7518293261528015,
-0.12557630240917206,
0.4236022531986... | |
I have an Xcode project written in Objective C and I am trying to create a UML diagram. However, the project is too big for me to create by hand so and I can't find the class modeling function in Xcode4. Is there a free UML program that I can import my xcode project and automatically generates the UML diagram?
Take a l... | [
0.49005934596061707,
-0.0875103771686554,
0.048515427857637405,
-0.12884753942489624,
-0.2557889223098755,
0.1837550848722458,
0.003398638917133212,
0.12687455117702484,
-0.300717830657959,
-0.6046203970909119,
0.32807570695877075,
0.3682873547077179,
-0.4091869294643402,
0.007858850993216... | |
I can easily add webparts to my custom master page, but they appear static (in page edit mode)...Is there a way i can add custom webparts in master page with user editing its properties (through property bag)
Sadly In master page, visual web-part is not editable as they dont exist in web part zone, so now we use user c... | [
0.21502633392810822,
-0.10766684263944626,
0.30314794182777405,
0.12002182751893997,
-0.2708527147769928,
-0.34386706352233887,
0.20914646983146667,
-0.28048622608184814,
-0.24595022201538086,
-0.5914169549942017,
-0.19619111716747284,
0.3324042856693268,
-0.019961290061473846,
0.286782562... | |
I am working on a Face Detection Problem, I have working code that uses Androids FaceDetector to find the faces but I need to figure out a way to implement OpenCV/JavaCV functions to detect faces. This is not using a live camera, it uses a image from the gallery, I am able to retrieve that images path, but I cant seem ... | [
0.2909829318523407,
0.11310815811157227,
0.2780357301235199,
0.12511834502220154,
-0.1544409841299057,
-0.026139041408896446,
0.4817090928554535,
-0.19774973392486572,
-0.12886449694633484,
-0.788514256477356,
0.31337523460388184,
0.6598603129386902,
-0.049915045499801636,
-0.0090521480888... | |
as they dont exist in web part zone, so now we use user control as delegate control. | [
0.04353119805455208,
-0.21796894073486328,
0.33817610144615173,
0.19217832386493683,
0.09376542270183563,
-0.5780174732208252,
0.09418636560440063,
-0.09025884419679642,
-0.16148851811885834,
-0.630044162273407,
-0.2715117633342743,
0.09992706030607224,
0.03853187337517738,
0.0553077049553... | |
(Using WPF Application / WPF UserControl)
It is possible to use the below code to save the text from a textbox to a global string.
```
private void commentBox_TextChanged(object sender, TextChangedEventArgs e)
{
Properties.Settings.Default.cmd01 = commentBox.Text;
//always save on every input change??
Pr... | [
0.01716204173862934,
-0.09418430179357529,
0.6492393612861633,
-0.27237436175346375,
-0.010147239081561565,
0.0016126979608088732,
0.2486904412508011,
0.064155712723732,
-0.298157662153244,
-0.8862870931625366,
-0.20594359934329987,
0.6097172498703003,
-0.3902822732925415,
0.09212266653776... | |
you suggested: subscribe to [UIElement.LostFocus Event](http://msdn.microsoft.com/en-us/library/system.windows.uielement.lostfocus.aspx) or [Keyboard.LostKeyboardFocus Attached Event](http://msdn.microsoft.com/en-us/library/system.windows.uielement.lostkeyboardfocus.aspx) of your `TextBox` and do the save there.
```
p... | [
0.2108658105134964,
-0.12704697251319885,
0.5258797407150269,
0.006921959109604359,
0.1738690286874771,
0.06116596981883049,
0.05719773471355438,
-0.10998813062906265,
-0.19254523515701294,
-0.516718864440918,
-0.3571503758430481,
0.5029737949371338,
-0.26882225275039673,
0.270804852247238... | |
I'm new to CodeIgniter and have created a controller that talks to a few views and models.
Once my controller finishes doing its things (lets say this controller handles logins and registrations), how does it hand off to another controller (to handle a user's interface and so forth)?
Appears that I was just doing it w... | [
0.16762278974056244,
-0.057997122406959534,
0.2696997821331024,
0.2696382403373718,
-0.10262048989534378,
-0.1738886535167694,
0.1363246589899063,
-0.09368910640478134,
-0.06111050769686699,
-0.6476107239723206,
0.10486996173858643,
0.3835696578025818,
-0.2264534831047058,
0.33254703879356... | |
I am creating a computer vision application that detect objects via a web camera. I am currently focusing on the performance of the application
My problem is in a part of the application that generates the XML cascade file using Haartraining file. This is very slow and takes about **6days** . To get around this probl... | [
0.14165280759334564,
0.10008403658866882,
0.4437207877635956,
0.12473122775554657,
-0.18756848573684692,
-0.13269563019275665,
0.07900756597518921,
-0.24604645371437073,
-0.264533132314682,
-0.5849679708480835,
-0.03672302886843681,
0.34125038981437683,
-0.49290063977241516,
-0.00100290449... | |
GPU **but on the same machine**. Is that so? On the other hand OpenMP is for multi-processing and using openmpi we can use multiple CPUs over the network. But OpenMP has no GPU support.
Can you please suggest the pros and cons of using either of the libraries.
OpenCL is for using the GPU stream processors. <http://en.... | [
-0.1455312967300415,
0.01878400705754757,
0.48245376348495483,
0.1656765639781952,
-0.678620457649231,
0.014953162521123886,
-0.3600911796092987,
-0.2282339334487915,
-0.46184080839157104,
-0.8010109066963196,
-0.06435756385326385,
0.28072646260261536,
-0.8476921319961548,
0.09932201355695... | |
you can just put a pragma telling it to parellelize a main loop, and you can get speedups in the order of the number of CPU cores.
If your problem is very data parallel and floating pointish - than you can get better performance out of GPU - but you have to write a kernel in a C-like language and map or read/write mem... | [
-0.03194998949766159,
-0.05170851945877075,
0.2379956990480423,
0.45470181107521057,
-0.1293690949678421,
-0.04837123304605484,
0.03986344859004021,
-0.11063791066408157,
-0.17444373667240143,
-0.8944190740585327,
-0.19373252987861633,
0.584138035774231,
-0.507313072681427,
-0.146745666861... | |
but you need a cluster (a bunch of servers on the same network), and they are expensive. | [
0.5467352271080017,
0.3595796227455139,
-0.042712364345788956,
0.5118390321731567,
0.3716566860675812,
-0.10798034071922302,
-0.030381731688976288,
0.3694891333580017,
-0.2395540326833725,
-0.4927006661891937,
0.07343334704637527,
0.42260757088661194,
0.09480436891317368,
-0.00878066755831... | |
I want to simply read some JSON data from a URL, then turn that into an collection of POCO classes, but I can't seem to figure out what I'm doing wrong.
Here is a sample of the JSON data, as it is fetched from the URL:
```js
[
{
"Name":"Together As One Run",
"Location":"Parkville, MO",
"ScheduledAt":"\/Date(133498440... | [
0.3005439043045044,
0.0733199417591095,
0.18607750535011292,
0.11036180704832077,
0.18697373569011688,
0.2645024359226227,
0.41290146112442017,
0.08265553414821625,
-0.5802555084228516,
-0.4712130129337311,
0.3380369246006012,
0.18567822873592377,
-0.28749021887779236,
0.36947911977767944,... | |
get; set; }
public String Location { get; set; }
public DateTime ScheduledAt { get; set; }
public String URL { get; set; }
}
```
I have tried to deserialize JSON data in several ways, and nothing seems to work:
```cs
//reader is an instance of StreamReader
var content = reader.ReadToEnd();
//nope
//var output ... | [
0.352133184671402,
-0.21981163322925568,
0.28358155488967896,
0.1110910177230835,
-0.029502887278795242,
-0.10064511001110077,
0.4883720278739929,
0.04184157773852348,
-0.21923892199993134,
-0.9279009699821472,
-0.02091135084629059,
0.37875062227249146,
-0.4229786694049835,
0.1585417538881... | |
var jObj1 = JsonConvert.DeserializeObject<Race[]>(jsonstr);
var jobj2 = new JavaScriptSerializer().Deserialize<Race[]>(jsonstr);
``` | [
-0.2653656601905823,
-0.20032651722431183,
-0.140546977519989,
-0.41225725412368774,
0.06067144125699997,
0.5274071097373962,
0.5900142192840576,
-0.24501930177211761,
-0.036439161747694016,
-0.7080747485160828,
-0.334287166595459,
0.5170785784721375,
-0.677751362323761,
-0.107426732778549... | |
i know this is basic but somehow i have been stuck here for some time. if i have to read from a text file some pattern like this
```
10 9 20 12 14 29
11 3 16 30 33 26
12 20 10 14 8
```
i want all of these numbers to be takes differently. | [
0.553702712059021,
0.3495931029319763,
0.09949693083763123,
-0.16586729884147644,
-0.08953269571065903,
0.05185515061020851,
0.4066890776157379,
0.015353307127952576,
-0.2431190460920334,
-0.6988654136657715,
0.48147326707839966,
0.22504015266895294,
-0.25753355026245117,
0.270411640405654... | |
what is the basic java function that needs to be used. i did try using trim and then split but i m not getting proper result passing "|\t" as the parameter to split. any help would be appreciated.
You can try this:
```
String[] line = s.split("\\s+");
for (String next : line) {
int i = Integer.parseInt(next);
... | [
-0.15444976091384888,
-0.3168266713619232,
0.1974325031042099,
-0.262788325548172,
0.08734359592199326,
-0.11170123517513275,
0.07703322172164917,
-0.19370631873607635,
-0.053379517048597336,
-0.5530871748924255,
-0.13892808556556702,
0.5412378311157227,
-0.36299794912338257,
-0.0981320813... | |
I've got everything setup and working for MQTT now. I am using the IBM wmqtt.jar and the Mosquitto broker..
My Java Servlet creates an MQTTConnection to the broker and publishes under the topic "AndroidDeviceID/myAppName" ..
The Android client subscribes to that same topic...
It seems to me that if anyone knew th... | [
0.08401902765035629,
0.17489273846149445,
0.622987687587738,
0.029532477259635925,
0.13560864329338074,
0.03490025922656059,
0.2647560238838196,
0.12022492289543152,
-0.05878663808107376,
-0.7268772125244141,
-0.12664207816123962,
0.877956211566925,
-0.20683170855045319,
0.2240033149719238... | |
as well as limiting access to topics with access control lists. There are details in the mosquitto.conf man page: <http://mosquitto.org/man/mosquitto-conf-5.html> | [
-0.2685089111328125,
-0.15522003173828125,
-0.011930340901017189,
0.23031672835350037,
0.19795846939086914,
-0.40825343132019043,
0.12052912265062332,
0.06629805266857147,
-0.5319614410400391,
-0.42176172137260437,
-0.648531973361969,
0.7400824427604675,
0.1704886108636856,
0.1597949415445... | |
I want to change the sidebars on the following template to have fixed position.
Is it possible to do it without using javascript and only css?
[Template Demo](http://jsfiddle.net/kFBuD/109/)
PS: Placing position fixed for the sidebards it is not an option because its changing the whole structure of the site and they... | [
0.5162997245788574,
0.03615022078156471,
0.36129358410835266,
-0.18816141784191132,
0.024587437510490417,
-0.12073096632957458,
0.2895592749118805,
-0.3723306357860565,
-0.19955238699913025,
-0.5866225361824036,
-0.06670097261667252,
0.362283855676651,
-0.20336231589317322,
-0.071543663740... | |
I can post on group / page and user wall, but i don't want my app to show error when posting on selected wall, if the selected wall doesn't allow posting so **is there any way to know that are we able to post on target wall?**
Note: I found two similar questions but they do not pertain to exactly what i want
[1 App... | [
0.4353976845741272,
0.1972021907567978,
0.21927998960018158,
0.2312910407781601,
-0.2841823697090149,
-0.3435719311237335,
0.29370611906051636,
-0.19108359515666962,
-0.28195860981941223,
-0.8136431574821472,
-0.1048581674695015,
0.35606712102890015,
0.0029594397637993097,
-0.0266202297061... | |
enabled the Leads module for Global Search, right? | [
0.19641804695129395,
-0.05631067603826523,
0.19137004017829895,
0.31888723373413086,
0.012690190225839615,
-0.3672395944595337,
0.02794552408158779,
0.48017624020576477,
-0.32277750968933105,
-0.09834981709718704,
-0.16078107059001923,
0.47027456760406494,
-0.14023970067501068,
-0.16275836... | |
I want to disable the button that is contained in a data list row. Is it possible to disable the button after it has been clicked once by the user? If so, can someone please suggest how I can achieve that.
```
<asp:DataList ID="DataList1" runat="server" DataKeyField="Qno" OnItemCommand="DataList1_OnItemCommand"
... | [
-0.02104593813419342,
0.2052900642156601,
0.6695070862770081,
-0.3557853400707245,
0.1546793282032013,
0.001028678147122264,
0.5334823727607727,
-0.4710971415042877,
-0.1584506779909134,
-0.504650890827179,
-0.41841042041778564,
0.6105878353118896,
-0.5170930027961731,
0.12177204340696335,... | |
/> <asp:Button ID="Button2" runat="server" Text="Submit" CommandName="Validate" />
<br />
</ItemTemplate>
```
I have nothing to do with ASP, but if you want javascript (jQuery) solution then you can just do something like
```
$(.once-clickable-button).click(function(){
$(this).attr("disabled", ... | [
0.059442032128572464,
-0.049617353826761246,
0.48755404353141785,
-0.14850369095802307,
0.02684156969189644,
0.0700213685631752,
0.3456670343875885,
-0.04706091061234474,
-0.35978856682777405,
-0.6827725172042847,
-0.3442152142524719,
0.5560033321380615,
-0.24546004831790924,
-0.1632800698... | |
I was just wondering if any one knew of any good beginner tutorials for CakePHP 2.1 other than the ones on their site (the cakephp book/ blog tutorial)?
The most popular tutorial that I've seen is the blog tutorial. It is relevant for the version you specified.
<http://book.cakephp.org/2.0/en/tutorials-and-examples/b... | [
0.42680710554122925,
-0.19209662079811096,
0.04711826145648956,
0.07106003910303116,
-0.23604078590869904,
-0.4035884141921997,
-0.014574294909834862,
0.6394612193107605,
-0.4159773588180542,
-0.4029034972190857,
0.14735841751098633,
0.3781604468822479,
0.08870108425617218,
-0.171393170952... | |
First Post, so forgive any noob-iness -- I'm trying to create a multi-page product sign-up form. I can get the form to display and the submit button, but I can't find any examples of URL patterns for my urls.py file. I found another similar question with the following suggestions:
"You need to write a view to handle y... | [
0.2381480485200882,
0.09665822982788086,
0.3124721944332123,
0.18659383058547974,
-0.45700228214263916,
-0.14945419132709503,
0.23371489346027374,
0.19995731115341187,
-0.2071506828069687,
-0.4130226671695709,
0.0010031370911747217,
0.19125191867351532,
-0.1852257400751114,
0.0028153338935... | |
the problem. I can't seem to find an example of what the next pattern should be. Here's my urls.py code (index.html and details.html are my templates so far):
```
url(r'^signup/$', 'signup.views.select_product', name='select_product'),
url(r'^signup/(?P<product_id>\d+)/$', 'signup.views.subscriber_signup', name='subsc... | [
0.32308271527290344,
0.013486668467521667,
1.1275421380996704,
-0.331655353307724,
0.0001515886833658442,
0.09709588438272476,
-0.058144040405750275,
-0.2628070116043091,
-0.06167612597346306,
-0.7772872447967529,
-0.27402427792549133,
0.3556153178215027,
-0.14171113073825836,
0.2196440547... | |
All validation rules pass
# Process the data in form.cleaned_data
# ...
return HttpResponseRedirect('signup/index.html') # Redirect after POST
else:
form = ProductForm() # An unbound form
return render_to_response('signup/index.html', {'title': title, 'pform': pform}, context... | [
0.4653042256832123,
0.030937494710087776,
0.9312941431999207,
-0.03136463835835457,
-0.10031020641326904,
-0.22714823484420776,
0.2945786118507385,
-0.7981187701225281,
-0.056714173406362534,
-0.4448177218437195,
-0.6429963707923889,
0.21646970510482788,
-0.1144663468003273,
0.105187356472... | |
if request.method == 'POST': # If the form has been submitted...
sform = SubscriberForm(request.POST) # A form bound to the POST data
if sform.is_valid(): # All validation rules pass
# Process the data in form.cleaned_data
# ...
return HttpResponseRedirect('signup/detail.html... | [
0.4529690444469452,
-0.11317258328199387,
0.9358477592468262,
0.02748173289000988,
-0.06722396612167358,
-0.2428092360496521,
0.36555659770965576,
-0.6729456782341003,
-0.25925225019454956,
-0.34031781554222107,
-0.4861256778240204,
0.11685819178819656,
-0.2675604820251465,
0.0481165051460... | |
return render_to_response('signup/detail.html', {'title': title, 'sform': sform, 'signup': signup,}, context_instance=RequestContext(request))
```
I also counted on `InsertHelper` improving singificantly the speed, but the difference wasnt that drastic when I tested it.
Still the strength of the `InsertHelper` is in ... | [
-0.023572009056806564,
0.10539121180772781,
0.6215787529945374,
-0.24482160806655884,
-0.2750515639781952,
0.10776989907026291,
0.322553426027298,
-0.3481251001358032,
-0.021467110142111778,
-0.917546272277832,
-0.03972805663943291,
0.9477086067199707,
-0.08670391887426376,
-0.175731033086... | |
will speed up a bit more. Place these outside the loop for the batch insert.
```
// Get the numeric indexes for each of the columns that we're updating
final int idColumn = ih.getColumnIndex("_id");
final int nameColumn = ih.getColumnIndex("StoreName");
final int descColumn = ih.getColumnIndex("StoreDescription");... | [
0.041166871786117554,
0.026903662830591202,
0.5660037398338318,
-0.11005230247974396,
0.46081000566482544,
0.10668682307004929,
0.09232868254184723,
-0.06921848654747009,
-0.21073663234710693,
-0.6423624157905579,
-0.2994592785835266,
0.5983783602714539,
-0.18781431019306183,
0.11087176948... | |
How can I generate a link from a service? I've injected "router" inside my service, however generated links are `/view/42` instead of `/app_dev.php/view/42`. How can I solve this?
My code is something like this:
**services.yml**
```
services:
myservice:
class: My\MyBundle\MyService
arguments: [ @... | [
0.10186851024627686,
0.1318262368440628,
0.48117706179618835,
0.1273600459098816,
-0.05339943990111351,
-0.08429200947284698,
0.2645452618598938,
-0.15012980997562408,
-0.05367128923535347,
-0.876039981842041,
0.05925578624010086,
0.2062533050775528,
-0.34261399507522583,
0.348978519439697... | |
of all, you will have to have a dependency on @router (to get generate()).
Secondly, you must set the scope of your service to "request" (I've missed that).
<http://symfony.com/doc/current/cookbook/service_container/scopes.html>
Your `services.yml` becomes:
```
services:
myservice:
class: My\MyBundle\MyS... | [
0.1844855397939682,
-0.02605549246072769,
0.7785871624946594,
-0.047299109399318695,
0.009733958169817924,
-0.24531301856040955,
0.22984077036380768,
-0.15230832993984222,
-0.2729863226413727,
-0.8067790269851685,
-0.18043683469295502,
0.5038154125213623,
-0.41018518805503845,
0.3920598030... | |
Symfony 3.0.
>
>
> Use the `request_stack` service (introduced in Symfony 2.4) instead of
> the `request` service/scope and use the `shared` setting (introduced in
> Symfony 2.8) instead of the `prototype` scope (read more about shared
> services). | [
0.12117063254117966,
-0.137088805437088,
0.473116010427475,
-0.07240329682826996,
-0.10992864519357681,
-0.29371029138565063,
-0.14816038310527802,
-0.16919900476932526,
-0.24017857015132904,
-0.7531803250312805,
-0.3081881105899811,
0.3023841381072998,
-0.709732174873352,
-0.0767998248338... | |
I want to add a list of colours to a combobox in metro app using C#. In turn, user can choose a particular colour from the list to change background.
The probable library available is Windows.UI.Colors
Here is a link to achieve it for a simple Desktop app: <http://www.c-sharpcorner.com/uploadfile/mahesh/how-to-load-a... | [
-0.01695922203361988,
-0.4877931475639343,
0.5714757442474365,
0.18254999816417694,
-0.17527589201927185,
0.2796715199947357,
0.07432504743337631,
-0.27414441108703613,
-0.23362182080745697,
-0.8525457382202148,
0.10129684954881668,
0.4367396831512451,
-0.28793367743492126,
0.0816644802689... | |
<Grid Background="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Rectangle Width="35" Height="20" Fill="{Binding Name}" Margin="5,0"/>
<TextBlock Grid.Column="1" Ma... | [
-0.2778272032737732,
-0.15702806413173676,
0.3850087821483612,
-0.06513794511556625,
-0.129127636551857,
0.31201785802841187,
-0.2287171483039856,
-0.6891075372695923,
-0.36810511350631714,
-0.791232705116272,
0.04746834188699722,
0.1447928100824356,
-0.21210654079914093,
0.047825068235397... | |
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
```
This is the xaml file.
```
private static void LoadColors()
{
var t = typeof(Colors);
var ti = t.GetTypeInfo();
var dp = ti.DeclaredProperties;
colors = new List<PropertyInfo>();
foreach (var item in dp)
{
colors.Add(item);
... | [
0.28159192204475403,
-0.4193785786628723,
0.42252862453460693,
-0.11831061542034149,
-0.05060634762048721,
0.11712218075990677,
0.14041118323802948,
-0.6433868408203125,
-0.09645812958478928,
-0.86239093542099,
-0.4134870767593384,
0.4447833001613617,
-0.5048015117645264,
0.217583030462265... | |
LoadColors();
return colors;
}
}
```
This is C# code.
Thanks all for support & help. | [
0.4429536759853363,
-0.004650123417377472,
0.21333931386470795,
0.1825690120458603,
0.10236960649490356,
-0.48751020431518555,
0.32294705510139465,
0.13847775757312775,
-0.05314280837774277,
-0.5862067341804504,
-0.20344309508800507,
0.5838682055473328,
-0.4166547954082489,
-0.076873451471... | |
I would like to use src/main/javascript as the source directory for my javascript files while still using src/main/webapp for most other web files but the maven jetty:run plugin does not know about this directory by default.
The following is as far as I've gotten so far but it does not seem to make Jetty aware of my ... | [
0.08930961042642593,
0.41967132687568665,
0.2774834632873535,
-0.2353314608335495,
0.022412937134504318,
-0.07927744835615158,
0.2311341017484665,
-0.04699249565601349,
-0.3499225080013275,
-0.7981038689613342,
0.08330336213111877,
0.5025394558906555,
-0.06135491281747818,
0.06736715137958... | |
<contextPath>/${project.artifactId}</contextPath>
<extraClasspath>target/classes/:src/main/javascript</extraClasspath>
</webAppConfig>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<directory>src/main/javascript</directory>
</reso... | [
0.28637999296188354,
-0.14422021806240082,
0.5347729325294495,
-0.002697798190638423,
0.1275026500225067,
0.4071046710014343,
-0.006250086706131697,
-0.48605749011039734,
-0.1556263267993927,
-0.7628964185714722,
-0.07353458553552628,
0.27755025029182434,
-0.006194794550538063,
-0.03894799... | |
maven jetty plugin aware of this addtional web directory?
Looks like this could help you:
* <http://docs.codehaus.org/display/JETTY/Multiple+WebApp+Source+Directory>
So i'd amend your configuration as follows:
```
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<versio... | [
-0.29073649644851685,
0.028240196406841278,
0.3923589885234833,
-0.2690284550189972,
0.06380755454301834,
0.267210990190506,
0.10379677265882492,
-0.40235933661460876,
-0.5379601716995239,
-0.5446187853813171,
-0.01871364191174507,
0.5114600658416748,
-0.16328787803649902,
-0.0463669113814... | |
I am trying to set a `OnCheckedChangeListener` to a `CheckBox` but my application exits in the run time. I also tried to set listeners for my `TextView` and I still get the same result. Can anyone help?
```
import android.app.ListActivity;
import android.content.Context;
import android.content.DialogInterface;
import ... | [
0.26409783959388733,
-0.045743077993392944,
0.7197296023368835,
-0.23445560038089752,
-0.032316654920578,
0.2318362444639206,
0.8007057905197144,
-0.6265698075294495,
0.2339758574962616,
-0.7066123485565186,
-0.3186638653278351,
0.9362362623214722,
-0.34137624502182007,
0.13594530522823334... | |
inflater=getLayoutInflater();
row=inflater.inflate(R.layout.main, parent, false);
}
label=(TextView)row.findViewById(R.id.weekofday);
label.setText(month[position]);
checkBox=(CheckBox)row.findViewById(R.id.checkBox);
return row;
}
}
String[] month = {
"January", "February", "March", "April",
"May", "June", "Jul... | [
0.046059750020504,
0.08376310020685196,
0.9823704361915588,
-0.33221006393432617,
-0.054135605692863464,
0.21852296590805054,
0.6424440145492554,
-0.38439974188804626,
-0.11667317897081375,
-0.43822813034057617,
-0.2777019441127777,
0.6618257761001587,
-0.28342705965042114,
0.2771492600440... | |
`CheckBox` status so you don't end up with strange rows status). Bellow is an example:
```
public class ListViewActivity extends ListActivity {
public class MyCustomAdapter extends ArrayAdapter<String> {
private ArrayList<Boolean> status = new ArrayList<Boolean>();
public MyCustomAdapter(Context... | [
0.14244727790355682,
-0.26836901903152466,
0.5947076082229614,
-0.13900874555110931,
0.03284977376461029,
-0.2416549175977707,
0.30087849497795105,
-0.34078526496887207,
-0.27043867111206055,
-0.6577749252319336,
-0.3591890037059784,
0.49380210041999817,
-0.3879273533821106,
0.303951561450... | |
= 0; i < objects.length; i++) {
status.add(false);
}
}
@Override
public View getView(final int position, View convertView,
ViewGroup parent) {
View row = convertView; | [
0.05941681191325188,
-0.26541537046432495,
0.7114342451095581,
-0.47615551948547363,
-0.10309526324272156,
0.3529132604598999,
0.4109143912792206,
-0.3475573658943176,
0.18824182450771332,
-0.41680389642715454,
-0.33496716618537903,
0.5474175214767456,
-0.16242626309394836,
0.2106949388980... | |
if (row == null) {
LayoutInflater inflater = getLayoutInflater();
row = inflater.inflate(R.layout.adapters_listviewactivity_row,
parent, false);
}
TextView | [
-0.11076734960079193,
-0.23471549153327942,
0.985832929611206,
-0.3198074698448181,
0.016281232237815857,
0.019247323274612427,
0.35179805755615234,
-0.3425425887107849,
0.065546415746212,
-0.6607642769813538,
-0.324901819229126,
0.7139948606491089,
-0.19415706396102905,
0.1546496599912643... | |
label = (TextView) row.findViewById(R.id.weekofday);
label.setText(month[position]);
CheckBox checkBox = (CheckBox) row.findViewById(R.id.checkBox);
checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedCha... | [
-0.2658994793891907,
-0.3549748957157135,
0.7413057088851929,
-0.08431929349899292,
0.17056362330913544,
0.265666663646698,
0.7009234428405762,
-0.478461354970932,
-0.2817988395690918,
-0.5652740001678467,
-0.07753845304250717,
0.37782084941864014,
-0.05218286067247391,
0.5400201082229614,... | |
boolean isChecked) {
Toast.makeText(getApplicationContext(), "" + position,
Toast.LENGTH_SHORT).show();
if (isChecked) { | [
0.13709864020347595,
0.027666134759783745,
0.24344122409820557,
-0.5012823939323425,
0.017237870022654533,
-0.3254903554916382,
0.6720205545425415,
-0.22882139682769775,
0.009525367058813572,
-0.4674183428287506,
-0.6078795194625854,
0.3541102409362793,
-0.25440481305122375,
0.189922600984... | |
status.set(position, true);
} else {
status.set(position, false);
}
}
}); | [
-0.24582785367965698,
-0.42259711027145386,
0.35808414220809937,
-0.21483036875724792,
0.57857346534729,
-0.15643846988677979,
-0.039867907762527466,
-0.03415340185165405,
-0.047386154532432556,
-0.28201839327812195,
-0.47530004382133484,
0.8472174406051636,
-0.193134143948555,
0.055543001... | |
checkBox.setChecked(status.get(position));
return row;
}
}
String[] month = { "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December" };
/** Called when the activity is first created. */
@Override
publ... | [
0.4870185852050781,
-0.6430965065956116,
0.6898461580276489,
-0.06574378907680511,
0.39166948199272156,
0.11467347294092178,
0.24074295163154602,
0.06986016035079956,
-0.2770257592201233,
-0.36587825417518616,
-0.5199248790740967,
0.28358832001686096,
-0.38326793909072876,
0.25086650252342... | |
setListAdapter(new MyCustomAdapter(ListViewActivity.this,
R.layout.main, month));
}
}
```
For the `TextView` you'll have to do the same thing. | [
0.32468846440315247,
-0.40165823698043823,
0.7882972359657288,
-0.11548153311014175,
0.013557925820350647,
-0.5489037036895752,
0.1379527598619461,
-0.09874700009822845,
-0.31216341257095337,
-0.6720554232597351,
-0.3564879596233368,
0.7304412126541138,
-0.40899306535720825,
0.127163633704... | |
I am just grabbing user data from a few tables but users have the option of adding more than one skill or exp.
```
$query_str = "SELECT a.*, b.*, c.*, d.*, e.* FROM edu a
JOIN exp b ON a.user_id=b.user_id
JOIN user_profiles c ON a.user_id=c.user_id
JOIN skills d ON a.user_id=... | [
0.3959943354129791,
0.08636747300624847,
0.48674869537353516,
0.03129751607775688,
0.10590074211359024,
0.10726089775562286,
0.1597665399312973,
-0.0757388100028038,
-0.09741643816232681,
-1.0262343883514404,
-0.046114735305309296,
0.5588120818138123,
0.06957096606492996,
-0.15416879951953... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.