text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm hoping there is a better way to the following. I'm creating a jigsaw-type application and this is the current code i'm using:
```
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
//location of current touch
CGPoint location = [touch locationInView:self.view];... | [
-0.21849413216114044,
-0.12093993276357651,
0.9705193638801575,
-0.2695152461528778,
0.23102322220802307,
0.12082868069410324,
0.18302395939826965,
-0.20685678720474243,
-0.09445145726203918,
-0.8851560950279236,
0.15259790420532227,
0.5988641977310181,
-0.13143621385097504,
-0.01005492173... | |
[self animateFirstTouch:img40 withLocation:location];
return;
}
}
```
I'm hoping that there is a better, more efficieny way to do this, rather than naming every image. I'm thinking something like, if touch view is equal to a UIImageView, then perform some task. The same for touchesEnded:
```
-(void) touchesEnded... | [
-0.23900973796844482,
-0.12733504176139832,
0.9418057799339294,
-0.34360527992248535,
0.01942574419081211,
0.18630851805210114,
0.19882987439632416,
-0.605873167514801,
0.02143131196498871,
-0.841132402420044,
0.20757293701171875,
0.7270018458366394,
-0.21599768102169037,
-0.09774352610111... | |
if ([touch view] == image4) {
[self animateReleaseTouch:image4 withLocation:location];
} else if{
......
......
} else if ([touch view] == image40) {
[self animateReleaseTouch:image40 withLocation:location];
}
return;
}
```
Any help please?
Wait so you are testing to see if the `[touch view]` is equal to ... | [
-0.28938746452331543,
-0.09801149368286133,
0.7692687511444092,
-0.27423179149627686,
-0.056271620094776154,
0.26157328486442566,
0.07479044049978256,
-0.4363861382007599,
-0.03029792197048664,
-0.6056820750236511,
0.10577831417322159,
0.8661392331123352,
-0.4202442467212677,
-0.1150666549... | |
[self animateReleaseTouch:image2 withLocation:location];
} else if ([touch view] == image3) {
[self animateReleaseTouch:image3 withLocation:location];
}
```
You should only need this:
```
[self animateReleaseTouch:[touch view] withLocation:location];
```
Or if you want to ensure that you can only do this with ... | [
-0.08036338537931442,
-0.09699413925409317,
0.5389121770858765,
-0.3372635841369629,
-0.03274308890104294,
0.1974351406097412,
0.35157617926597595,
-0.6797277927398682,
-0.1418372541666031,
-0.6708329319953918,
0.10313523560762405,
0.8055223822593689,
-0.2162935882806778,
-0.35518521070480... | |
you have a ton of sequentially named variables, you are doing it wrong. What you really want instead is an array. | [
0.4246835708618164,
-0.02262619510293007,
-0.1926691085100174,
0.48430579900741577,
-0.15403103828430176,
0.08184447139501572,
0.0382230244576931,
-0.0021555612329393625,
-0.32263293862342834,
-0.3724883794784546,
0.1973767727613449,
0.3298000991344452,
-0.46983757615089417,
0.423015594482... | |
Since the live() method is deprecated as of version 1.7, I started going through my source and converting all of my live event handlers over to on(). I was under the impression that the change would be simple and everything would work as it had before; however, I ran into some code that doesn't behave as it should.
I ... | [
0.27969542145729065,
-0.21702177822589874,
0.7220820188522339,
-0.4561712145805359,
0.2992708683013916,
-0.11053457856178284,
0.2515837550163269,
-0.24211189150810242,
-0.15499825775623322,
-0.6793257594108582,
-0.1836971491575241,
0.9256601333618164,
-0.6269583106040955,
-0.00253001344390... | |
page occur). But if I change the code to the following
```
$('table.accordion-header').on("click", function ($e) {
// gobs of code
}
```
then the click event is no longer raised after any asynchronous postbacks on the page occur. Please note - the click event does work up to any asynchronous postbacks, **but after... | [
-0.20650753378868103,
0.30152958631515503,
0.7858868837356567,
-0.21201331913471222,
0.14463606476783752,
0.1132134348154068,
0.26611530780792236,
-0.02948516421020031,
-0.4775722324848175,
-0.6800930500030518,
-0.3417540490627289,
0.6937914490699768,
-0.5544796586036682,
0.012669505551457... | |
Fact: I'm not that good with jQuery.
Problem:
I have a form containing dynamically rendered radio buttons. When clicking on a radio button, I want a div to appear to give a text explanation. Within the "hidden" div I want a button or link to "close" the div. I have a set of 27 radio buttons, clicking on each WORKS pe... | [
0.22472995519638062,
0.14687393605709076,
0.5392085313796997,
0.03352116420865059,
-0.09871600568294525,
0.16854344308376312,
0.5284092426300049,
0.0064331479370594025,
-0.19090412557125092,
-0.5076171159744263,
-0.00901650171726942,
0.8545554876327515,
-0.10341819375753403,
-0.14870645105... | |
of the other 26, the button doesn't do anything in those divs.
Here is the code for my radio buttons:
```
$categoryQuery = "SELECT * FROM blah, blah";
$categoryResult = mysqli_query($link, $categoryQuery );
while($row = mysqli_fetch_array($categoryResult)){
$cat_id = $row['att_cat_id'];... | [
-0.2795998156070709,
-0.09611222892999649,
0.7803298234939575,
-0.28174668550491333,
-0.40363609790802,
0.2024437040090561,
0.31564250588417053,
-0.7543063163757324,
-0.09378592669963837,
-0.3801766335964203,
-0.1031091958284378,
0.6709115505218506,
-0.5685786604881287,
0.12918558716773987... | |
while($row = mysqli_fetch_array($categoryhelpResult)){
$cat_id = $row['att_cat_id'];
$category = $row['att_cat_name'];
$category_description = $row['att_cat_description'];
echo "<div id='blk-$cat_id' class='toHide'>";
echo "<strong><em><center>Attorney Search Help Center</center></em></strong><... | [
-0.2473425716161728,
-0.0813560038805008,
0.6028523445129395,
-0.40819990634918213,
-0.13065774738788605,
0.06152132898569107,
0.22363875806331635,
-0.7242109775543213,
-0.1419585645198822,
-0.3158062696456909,
-0.33873534202575684,
0.5331544876098633,
-0.1913955807685852,
0.01955216564238... | |
$("#blk-"+$(this).val()).show();
});
});
$("#hidr").click(function () {
$('.toHide').hide(1000);
});
</script>
```
Any help would be great.
First thing: It looks like your
```
$("#hidr").click(function () {
$('.toHide').hide(1000);
});
```
is outside of your
```
$(function(){
// this part
});
... | [
0.2724151015281677,
0.010152543894946575,
0.5482198596000671,
-0.2186550796031952,
0.027994820848107338,
-0.25285428762435913,
0.5156838893890381,
-0.04405159875750542,
-0.009043071419000626,
-0.5409436225891113,
0.012202813290059566,
0.7388436198234558,
-0.2357526272535324,
-0.01117912866... | |
```
<button id='hidr'>Hide</button>
```
You're using an id! :) There's only supposed to be one thing on your page with any given id. Try using class instead. That way you can attach the .click event to every $(".hidr")
Then, it's only a matter of referencing the parent to make it all disappear. Like this:
```
$("... | [
0.17979994416236877,
0.3279494047164917,
0.6396177411079407,
-0.03853769972920418,
0.35435765981674194,
-0.2341422587633133,
0.30772095918655396,
-0.23760172724723816,
-0.07343679666519165,
-0.7690953016281128,
0.015263686887919903,
0.7720385789871216,
-0.3814907968044281,
0.12710672616958... | |
I'm trying to send back multiple variables from a php file to ajax using json in an array. The code in the php file works perfectly and does everything with my database like it should. But as soon as I add dataType: "json" in ajax, nothing happens in the php file anymore. I googled a bit and some people mentioned it co... | [
0.35033944249153137,
0.08737295120954514,
0.28670328855514526,
-0.20798441767692566,
-0.4779866337776184,
-0.019343046471476555,
0.37978222966194153,
-0.07719023525714874,
-0.1929943710565567,
-0.6753039360046387,
0.41237884759902954,
0.6072221994400024,
-0.3930487632751465,
0.044437646865... | |
"date" => "$date"));
?>
```
And this is the ajax code:
```
.ajax(
{
url: 'UpdateComments.php',
type: 'POST',
dataType: "json",
data:
{
type: "add",
comment: $("#comment").val(),
id: videoID
},
success: function (data)
{
//Get the data variables from json and displ... | [
0.07396800071001053,
-0.13370652496814728,
0.5748826265335083,
0.009030339308083057,
-0.09847669303417206,
-0.2501494586467743,
0.024600500240921974,
0.021743206307291985,
-0.04934697970747948,
-0.5497961044311523,
-0.251617968082428,
0.4478128254413605,
-0.1900232583284378,
-0.10223035514... | |
whether that is some readable or **unreadable**(invisible) char. Try doing something like this:
```
<?php
//at the very beginning start output buffereing
ob_start();
// do your logic here
// right before outputting the JSON, clear the buffer.
ob_end_clean();
// now print
echo json_encode(array("id" => $realid, "un"... | [
0.3315867781639099,
-0.1629604548215866,
0.28760239481925964,
-0.39826899766921997,
0.15856915712356567,
0.009042913094162941,
0.32734498381614685,
-0.3059197664260864,
-0.3588797450065613,
-0.3833496868610382,
-0.2849065065383911,
0.5295768976211548,
-0.4944045841693878,
-0.19714623689651... | |
So, I've extended [CGridView](http://www.yiiframework.com/doc/api/1.1/CGridView) to include an Advanced Search feature tailored to the needs of my organization.
* **Filter** - lets you show/hide columns in the table, and you can also reorder columns by dragging the little drag icon to the left of each item.
* **Sort*... | [
0.32649949193000793,
-0.25103244185447693,
0.6007673144340515,
-0.10207486152648926,
-0.20110268890857697,
0.0654529333114624,
-0.09865744411945343,
-0.15088434517383575,
-0.2945329546928406,
-0.5705484747886658,
-0.010807214304804802,
0.22678080201148987,
-0.18932823836803436,
-0.10900212... | |
and do the searching and sorting in PHP before rendering the table contents.
Now writing Version 2, where I aim to focus on clever [CDbCriteria](http://www.yiiframework.com/doc/api/1.1/CDbCriteria) creation, allowing MySQL to do the heavy lifting so it will run quicker. The implementation is trivial when dealing with ... | [
0.1063682809472084,
0.1925114393234253,
0.389078289270401,
-0.05771992728114128,
-0.4777769148349762,
-0.2152852714061737,
0.028999192640185356,
-0.2601025700569153,
-0.2028420865535736,
-0.8242258429527283,
0.07953258603811264,
0.4302156865596771,
-0.3575296700000763,
-0.0316065289080143,... | |
all `with` relations in my query so that I include comparisons?** I've included all my relations `with` my criteria in the model's `search` function and I've tried CDbCriteria's `together` set to true ...
```
public function search() {
$criteria=new CDbCriteria;
$criteria->compare('id', $this->id);
$criter... | [
-0.013269694522023201,
0.04553251340985298,
0.5604096055030823,
-0.1955520063638687,
-0.2691279351711273,
0.2331090122461319,
0.15753597021102905,
-0.731995701789856,
-0.032566480338573456,
-0.5529845952987671,
-0.15712574124336243,
0.6332542300224304,
-0.4953860640525818,
0.31315031647682... | |
'pagination' => array('pageSize' => 50)
));}
```
Then I'll snatch the criteria from the [DataProvider](http://www.yiiframework.com/doc/api/1.1/CActiveDataProvider) and [add a few conditions](http://www.yiiframework.com/doc/api/1.1/CDbCriteria#addCondition-detail), for example, looking for dates > 1234567890. But I st... | [
-0.06434819847345352,
0.004610166884958744,
0.31758758425712585,
-0.0654716044664383,
0.01339677069336176,
0.3016713559627533,
0.027633724734187126,
-0.7420592904090881,
-0.08420708775520325,
-0.2891472280025482,
-0.09232808649539948,
0.3741132318973541,
-0.19982576370239258,
0.15137551724... | |
is the query a `SELECT COUNT(DISTINCT 't'.'id')` ?
**Edit** @DCoder Here's the specific relation I'm working with now. The main table is Call, which has a [`HAS_MANY`](http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship) relation to CallSegments, which keeps the times. So the `startTime` o... | [
-0.35916537046432495,
-0.013277541846036911,
0.44872361421585083,
-0.15388444066047668,
-0.2763102054595947,
0.028417086228728294,
0.0417422316968441,
-0.3944261968135834,
-0.03735643997788429,
-0.44627413153648376,
0.01768496073782444,
0.5353323221206665,
-0.3618032932281494,
0.3098982572... | |
Looks like the issue has may have been reported: [Yii](http://code.google.com/p/yii/issues/detail?id=2494) and [github](https://github.com/yiisoft/yii/issues/204) tickets.
It is not a good idea to snatch the sql from a criteria and use it by yourself.
If you are using the "with" property then you could easily use com... | [
0.1413799524307251,
-0.10038673132658005,
0.1910496950149536,
0.2095465511083603,
-0.3247707784175873,
-0.03232880309224129,
-0.11304544657468796,
-0.4524567127227783,
-0.13386701047420502,
-0.7178980112075806,
0.041107214987277985,
0.35148507356643677,
-0.40294578671455383,
0.144128635525... | |
on a different query. A workaround will be to drop the "with" property and write the joins by yourself in the "join" property like:
```
$criteria->join = "LEFT OUTER JOIN `relation_table` `relation0` ON (`t`.`id`=`relation0`.`id`)
LEFT OUTER JOIN `relation_table` `relation1` ON (`t`.`id`=`relation1`.`id`)
LEFT OUTER ... | [
-0.07436348497867584,
0.10422635078430176,
0.20644064247608185,
-0.18152621388435364,
-0.12935930490493774,
0.00034306489396840334,
0.24687182903289795,
-0.3600829541683197,
0.03246184065937996,
-0.38813477754592896,
-0.33081376552581787,
0.29479119181632996,
-0.5795590877532959,
0.1748083... | |
I have a frivolous question. Is there any way to use an image in lieu of points in gnuplot? For example, if I was plotting data about pasta consumption or something, I would have pictures of pasta (instead of usual gnuplot points).
Another option is to find a dingbats type of font with a suitable glyph. Then you can us... | [
0.5126097202301025,
-0.10553683340549469,
0.2672055959701538,
0.40807098150253296,
-0.19964544475078583,
0.07739290595054626,
-0.21962785720825195,
-0.14142253994941711,
-0.34702882170677185,
-0.7506024837493896,
0.08630726486444473,
0.5450049042701721,
-0.11665187031030655,
0.315642267465... | |
I have this container div whose width I would like to set according to the widths of the inner divs. The issue I am facing is that the container div with auto width spans the entire page.
I have done a rough mock of what I would like (2nd implementation with constant width set) vs what I am getting with my auto setti... | [
0.0884043499827385,
0.0344901978969574,
0.671180784702301,
-0.026147514581680298,
-0.24295954406261444,
0.012104533612728119,
-0.14080318808555603,
-0.1371237188577652,
-0.10807296633720398,
-0.9344770908355713,
-0.03385181725025177,
0.49579325318336487,
-0.18702095746994019,
-0.1555037796... | |
part here
});
``` | [
-0.26416802406311035,
0.27037060260772705,
0.41063565015792847,
-0.14824073016643524,
0.1400516778230667,
0.1361636519432068,
0.028407994657754898,
0.0856657326221466,
0.15494047105312347,
-0.4551609456539154,
-0.36223581433296204,
0.6309108734130859,
-0.2947711944580078,
0.256862163543701... | |
```
$time1 = strtotime(date("Y-m-d", time()));
$time2 = strtotime(date("Y-m-d", time()));
$time1 = $time1 + (7 * 24 * 60 * 60);
$time2 = strtotime(date("Y-m-d", $time2) . " +1 week");
```
The second line and third line obviously doing different things in my code. That is when i am processing a date which is older th... | [
0.2777164578437805,
-0.12013060599565506,
0.5427321195602417,
-0.15358790755271912,
0.23175646364688873,
0.253953218460083,
0.3943900167942047,
-0.04529000073671341,
-0.3722435235977173,
-0.8000536561012268,
-0.12467770278453827,
0.39483022689819336,
0.08728180080652237,
0.1915188729763031... | |
says that you live in New Zealand, and Wikipedia says that New Zealand switches from daylight-saving-time to regular time on the first Sunday in April, which was yesterday (or, er, two days ago for you). So it may recently have been the case for you that one week was actually 7 × 24 + 1 hours (because the hour from 2:0... | [
0.8563975691795349,
-0.2697058916091919,
0.49323275685310364,
-0.20441237092018127,
-0.20399801433086395,
-0.19654899835586548,
0.7807527184486389,
0.34614571928977966,
-0.7952627539634705,
-0.1965555101633072,
-0.20152685046195984,
-0.004210159182548523,
-0.004950768779963255,
0.150951296... | |
I am running Jconsole on my macbook and trying to connect to a linux terminal on ec2 that does not have graphics(only command line access).
I run my code like this:
```
java -jar program.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9005
-Dcom.sun.management.jmxremote.authenticate=false -Dco... | [
0.2886659502983093,
0.214647114276886,
0.2600376009941101,
-0.12075957655906677,
0.1774388551712036,
-0.03564596176147461,
0.5647121071815491,
0.2112545669078827,
-0.4447944760322571,
-0.6423835754394531,
0.06722719222307205,
0.5701345205307007,
-0.27688148617744446,
0.12191417813301086,
... | |
I have the correct address here
```
The system accepted it(no errors when I created/uploaded runnable jar). I also opened the firewall on my instance to allow all TCP traffic. No Luck. I tried the above statement also as a flag to launch to the program but still no luck.
Any ideas how do this?
UPDATE: This will sho... | [
0.1245243102312088,
0.1931961625814438,
0.16426518559455872,
-0.19967246055603027,
-0.09622649848461151,
-0.2905033826828003,
0.6387621164321899,
0.07100522518157959,
-0.18176886439323425,
-0.8836637139320374,
0.17048321664333344,
0.7409480214118958,
-0.21618856489658356,
-0.01231379248201... | |
the program tries to connect and then says connection failed(before it would just say it at the login screen right away).
Set the hostname property before the VM starts:
```
java -Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9005 \
-Dcom.sun.management.jmxremote.authenticate=false \
... | [
0.03434641286730766,
0.13174006342887878,
0.4610351324081421,
-0.11459533125162125,
0.03180304914712906,
-0.4045950472354889,
0.6963832974433899,
-0.014080206863582134,
-0.39638468623161316,
-0.4943687319755554,
-0.4876825511455536,
0.625284731388092,
-0.3321933448314667,
0.491965860128402... | |
I am very new to iOS development, I have an app all set and ready to be distributed, but I seem to get this error every single time I run the application on my DEVICE only, the iOS simulator works just fine. Heres the full error:
> Application failed codesign verification. The signature was invalid, contains disallowe... | [
0.10487049072980881,
0.6559769511222839,
0.32183197140693665,
-0.055774323642253876,
0.18502847850322723,
-0.10397142171859741,
0.5480496883392334,
-0.5382016897201538,
-0.19103507697582245,
-0.36345577239990234,
-0.21060629189014435,
0.21926993131637573,
-0.2332494854927063,
-0.1698431968... | |
The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
Executable=/Users/masonsocha/Library/Developer/Xcode/DerivedData/Multibrowser-brgeiknbjgrywwehhohafjwxjqnk/Build/Products/App Store-iphoneos/Multibrowser.app/Multibrowser
codesign_wrapper-... | [
0.4030822813510895,
0.11967494338750839,
0.5111070871353149,
0.17810478806495667,
0.09736602008342743,
0.10588525235652924,
0.863172173500061,
-0.5008344650268555,
-0.19958823919296265,
-0.13972938060760498,
-0.10585135221481323,
0.4108424782752991,
-0.2167321890592575,
-0.1457670032978058... | |
keys set up correctly. This is a good reference <https://developer.apple.com/legacy/library/technotes/tn2250/_index.html>
2. I had previously adjusted my Keychain Certificate Preferences to make Outlook work but that pretty much screwed up XCode code signing..
After I set these to the "best attempt" setting (see scree... | [
0.46380287408828735,
-0.0075571583583951,
0.5287864208221436,
-0.01755700632929802,
0.3758658170700073,
0.07871194183826447,
0.18774481117725372,
-0.42473384737968445,
-0.44895192980766296,
-0.2976078689098358,
0.17416086792945862,
0.608660101890564,
-0.19165436923503876,
-0.15936908125877... | |
I have a domain constraint which I am validating like
```
userName(blank:false, nullable:false, Size: 5..50,matches:'^[A-Za-z\\d]*$',validator:{chkUser,user->if(user.loginService.getUser(user.organizationId,user.userName)!=null){ | [
0.11208535730838776,
0.27483507990837097,
0.5813833475112915,
-0.1106010153889656,
0.3314923942089081,
-0.11865096539258957,
0.2985641360282898,
0.014993791468441486,
-0.04564760997891426,
-0.6284838318824768,
-0.2469460666179657,
0.3546326160430908,
-0.2980445921421051,
0.4788444936275482... | |
return[propertyName="userName"]} | [
-0.45237696170806885,
-0.257445365190506,
-0.37583401799201965,
-0.32121673226356506,
0.18694163858890533,
-0.2551179528236389,
0.12011494487524033,
0.16916829347610474,
0.33834588527679443,
-0.2688088119029999,
-0.35759109258651733,
1.0046199560165405,
-0.10844102501869202,
-0.06385082751... | |
})
```
So what I am trying to do is call login service and see if username exists. IF the username exists I have to return message USerName already exists. I have modified my message.properties as:
```
BuildUserNameCommand.userName.matches= Username Should have alphanumeric characters only
BuildUserNameCommand.userN... | [
-0.07028647512197495,
0.3912876546382904,
0.33627456426620483,
-0.34736236929893494,
0.10716017335653305,
0.034972745925188065,
0.46329954266548157,
-0.18116924166679382,
-0.023886527866125107,
-0.7769677639007568,
0.005314231850206852,
0.6673536896705627,
-0.41817712783813477,
0.322541356... | |
Ive got a jquery app that has several grids (jqgrid) in defferent tabs.
Below ech grid I have a button:
```
<div id="content1" class="content">
<table id="grid1" class="myGridClass"></table>
<input id="ColChooser1"type = "button" value="Choose Columns" class="grid1"></input>
</div>
<div id="content2" class = ... | [
-0.43887221813201904,
-0.27590152621269226,
0.8809541463851929,
-0.13113677501678467,
-0.3796888589859009,
0.3024778962135315,
-0.018283532932400703,
-0.4728360176086426,
-0.1703750193119049,
-0.6536602973937988,
0.17800216376781464,
0.6631588339805603,
-0.4036760926246643,
0.0274477042257... | |
if `this.attr('class')` will always be the same despite each button having the same class as its table element since jquery ui may add additional classes --
**Edited**
Below is what worked - close to the 1st answer below but tweaked a bit -
```
$('div.DataContent :input[value="Choose Columns"]').click(fu... | [
-0.33688998222351074,
-0.21107104420661926,
0.6101235151290894,
0.051487598568201065,
0.25873246788978577,
0.06226605549454689,
0.40750545263290405,
-0.0530991405248642,
-0.10348546504974365,
-0.8266180753707886,
-0.3370339870452881,
0.2779947817325592,
-0.10890647768974304,
0.076675973832... | |
element deeper)
also used a more specific selector '.myGridClass' rather than 'table' because jqGrid adds several other table elements, making use of the 'table' not return the original one intended
Take a look at the [traversing](http://api.jquery.com/category/traversing/) page in the jQuery docs. You should be able t... | [
-0.10306655615568161,
-0.34679514169692993,
0.3148987293243408,
0.01737748086452484,
0.043284669518470764,
0.32574567198753357,
0.1720593124628067,
-0.3942820727825165,
-0.038340602070093155,
-0.5729004740715027,
-0.22138410806655884,
0.3701663911342621,
-0.11753886938095093,
0.23612582683... | |
I want to implement password rules to be of minimum length 8 and alphanumeric. The new and confirm fields are getting checked now, These rules should be applied when creating a new instance of a user and change password functionality for the existing user also.
1) If there is a grails plugin which can do this.
2) is ha... | [
0.3740035891532898,
-0.019990883767604828,
0.22231051325798035,
-0.005248615052551031,
-0.0953824445605278,
-0.25839754939079285,
0.3242315948009491,
-0.07747165113687515,
-0.05390804633498192,
-0.45434704422950745,
-0.009702981449663639,
0.8245970010757446,
0.0002264348149765283,
-0.14108... | |
parentsUntil, children) to select the elements you want.
e.g:
```
$('div.content :input[value="Choose Columns"]').click(function{
$(this).parent().children('table').jqGrid('columnChooser');
});
``` | [
0.08090253174304962,
-0.07639161497354507,
0.1850418746471405,
0.0341050885617733,
0.44554856419563293,
0.21715828776359558,
-0.05907922983169556,
-0.04823674261569977,
-0.03242432326078415,
-0.7418239116668701,
-0.34894779324531555,
0.4338589906692505,
-0.3141949474811554,
0.1822355687618... | |
The standard logging code does not seem to work instantiating a logger with the canonical name nor using an anonymous logger.
Code below:
```
private static final Logger logger = Logger.getLogger(UserAccessFilter.class
.getCanonicalName());
// ...
public void doFilter(ServletRequest req, ServletResponse resp, Filt... | [
0.23306746780872345,
-0.025764135643839836,
0.48365601897239685,
-0.09523212164640427,
0.0474005751311779,
-0.10409094393253326,
0.4285484254360199,
-0.36509010195732117,
-0.4222961664199829,
-0.6194538474082947,
-0.03363282233476639,
0.5341722369194031,
-0.44602373242378235,
-0.1042063757... | |
above by default. Look in `WEB-INF/logging.properties` and add / replace `.level = INFO` to see INFO messages (or log WARNING+ messages). | [
0.3008354902267456,
0.0936509296298027,
0.5888340473175049,
0.06509434431791306,
0.30761685967445374,
-0.5641263127326965,
0.15258927643299103,
-0.20267033576965332,
-0.1886051744222641,
-0.6230249404907227,
-0.2670852541923523,
0.61451256275177,
-0.3303222358226776,
-0.0018282312666997313... | |
I am having trouble setting and echoing out a cookie, I was wondering if you could help me out, I am relatively new to php but I can work my way around. Here is the code...
```
if (empty($_COOKIE['source'])) {
$kw = $_SESSION["keyword"];
//echo $kw;
$needle = array(
"bomanite"
);
if (multineedle_stripos($kw, $need... | [
0.49218887090682983,
0.1430526226758957,
0.6968662142753601,
-0.12475075572729111,
-0.15843413770198822,
-0.08765961974859238,
0.4215656518936157,
-0.365303099155426,
-0.10322888940572739,
-0.3966822326183319,
0.06230436637997627,
0.637191116809845,
-0.40304842591285706,
-0.054575305432081... | |
$source = "ppc";
$liveemail = "bomanite@bomanite.ca";
$livephone = "<span id='bom-phone'>Call us for a Quote: (416) 800 5446</span>";
} else {
$source = "organic";
$liveemail = "bomanite@bomanite.ca";
$livephone = "<span id='bom-phone'>Call us for a Quote: (905) 660 5545</span>";
}
setcookie("so... | [
0.510604202747345,
0.04246127977967262,
0.34361106157302856,
0.054816801100969315,
0.27218034863471985,
0.12344624847173691,
-0.011378866620361805,
-0.17609769105911255,
-0.0059522162191569805,
-0.4270261526107788,
-0.34020841121673584,
0.7941750288009644,
-0.2617288827896118,
-0.174779668... | |
* 60 * 24 * 30), '/', 'bomanite.cidev.info/');
} else {
$source = $_COOKIE['source'];
$kw = $_COOKIE["kw"];
$liveemail = $_COOKIE['liveemail'];
$livephone = $_COOKIE['livephone'];
}
?>
```
Cookies are very sensitive to path.. Can you try this?
```
setcookie("source", $source, time() + (60 * 60 * 24 * 30), '/');
... | [
0.10870333760976791,
-0.18265286087989807,
0.3263886570930481,
-0.14691175520420074,
0.4674336910247803,
-0.1452993005514145,
0.8009752035140991,
-0.30344799160957336,
0.00319388578645885,
-0.8695678114891052,
-0.2197750359773636,
1.065758466720581,
-0.42205125093460083,
-0.221153855323791... | |
> **Possible Duplicate:**
>
> [Calling NSLog from C++: “Format string is not a string literal (potentially insecure)”](https://stackoverflow.com/questions/9793199/calling-nslog-from-c-format-string-is-not-a-string-literal-potentially-inse)
>
> [Why is my string potentially unsecure in my iOS application?](https:/... | [
-0.02169150672852993,
0.36283591389656067,
0.37825390696525574,
-0.25280189514160156,
0.23192037642002106,
-0.09739987552165985,
0.491782546043396,
-0.17896637320518494,
-0.3125539720058441,
-0.47925710678100586,
-0.26009294390678406,
0.5314317345619202,
-0.4009050726890564,
-0.07009789347... | |
"unsafe" is that it's possible to crash the program in cases like this:
```
NSString *someString = @"The integer format specifier is %d";
NSLog([NSString stringWithFormat:@"%@", someString]);
```
The input to `NSLog` is treated like a format string, but there's no corresponding value for the `%d` at the end. In your... | [
0.0638214498758316,
0.4246509075164795,
-0.08445609360933304,
-0.06511911004781723,
0.20726336538791656,
-0.2577067017555237,
0.6423826813697815,
0.24094650149345398,
-0.008993743918836117,
-0.2915928363800049,
-0.17798633873462677,
0.45477768778800964,
-0.4468909800052643,
0.2939552962779... | |
Use PHP and Mysql.
Fields in my table (product) are `id`, `full_price`, `sell_price`, etc.
How can I SELECT products ORDER BY discount DESC, where discount = (full\_price-sell\_price) \* 100 / full\_price? I try to use this, but it doesn't work:
```
SELECT *
FROM product
WHERE full_price > 0
ORDER BY (d... | [
0.05373270437121391,
0.021508485078811646,
0.20618130266666412,
-0.1446896344423294,
-0.2888900935649872,
0.45383861660957336,
-0.36308375000953674,
-0.31510844826698303,
0.021707871928811073,
-0.5399994850158691,
-0.025590557605028152,
0.7233423590660095,
-0.010904371738433838,
0.15328587... | |
> 0
ORDER BY discount DESC
``` | [
-0.18458715081214905,
0.04167290776968002,
0.30462926626205444,
-0.08352775126695633,
-0.016139328479766846,
0.05411394312977791,
0.2946307361125946,
-0.27800092101097107,
0.26593631505966187,
-0.4553811252117157,
-0.4219754934310913,
0.6846734285354614,
-0.21183747053146362,
0.06547393649... | |
in my recent asp.net (c#) website project a user needs to login to view a secure.aspx page. after logging in when a user clicks logout link from secure.aspx page, the user logs out, and redirected to login page..
but after that if the user presses the back button of the browser, the browser shows the secured pages,but ... | [
0.35245180130004883,
-0.10265546292066574,
0.6482778191566467,
-0.04216492176055908,
0.041704367846250534,
-0.29145994782447815,
0.15179046988487244,
0.22364938259124756,
-0.4831196963787079,
-0.7794573903083801,
-0.05918944999575615,
0.40227314829826355,
-0.16037942469120026,
0.1199167072... | |
worry, the page is only a local cached copy for history; there is no problem in the permissions and the user is not actually logged in, though s/he may appear to be. | [
0.38606512546539307,
0.1706131100654602,
0.4296446442604065,
0.1908033788204193,
0.4213930368423462,
-0.47049885988235474,
0.5031306147575378,
0.2718648314476013,
-0.5550518035888672,
-0.36869025230407715,
-0.2668077051639557,
0.370932012796402,
0.007728085853159428,
0.08259538561105728,
... | |
I am starting a new app development and the other two programmers are located in different area so we have decided to us wire framing for initial design work. Does anyone have any suggestion of a good wire frame program, willing to paid but free sound great as well…
You can use [`find`](http://groovy.codehaus.org/groov... | [
0.39232367277145386,
0.18125198781490326,
0.40724679827690125,
-0.08755173534154892,
0.22767576575279236,
0.06042153760790825,
0.13518930971622467,
-0.8042361736297607,
-0.04111739993095398,
-0.6674057245254517,
-0.08983273804187775,
0.7321988344192505,
-0.25127288699150085,
-0.52659535408... | |
Using sqlite3, I have a table that looks like this:
```
+---------+-----------------+----------+-----------+--------+
| ArtId | Location | ArtistID | Title | Size |
+---------+-----------------+----------+-----------+--------+
| 3 | China | 400 | birds | small |
| 4 | ... | [
0.052186112850904465,
0.184046670794487,
0.5474020838737488,
0.15449850261211395,
-0.2494039237499237,
-0.08296985179185867,
0.12210433930158615,
-0.22514811158180237,
-0.18133099377155304,
-0.37615659832954407,
0.18881742656230927,
0.19659216701984406,
-0.17290589213371277,
0.121296465396... | |
stars | large |
| 5 | Chile | 427 | clouds | medium |
| 6 | US | 427 | clouds | small |
| 7 | France | | [
-0.07339651137590408,
0.29950374364852905,
0.8499571681022644,
0.10508079081773758,
0.029311710968613625,
-0.04127899184823036,
-0.06327776610851288,
0.3707869052886963,
-0.7633599638938904,
-0.36550620198249817,
-0.4058379828929901,
0.3099592924118042,
-0.44494351744651794,
0.517463207244... | |
123 | collage | small |
| 8 | Spain | 123 | collage | large |
| 9 | Belarus | 123 | collage | medium |
+---------+-----------------+----------+-----------+--------+
```
I have a query that produces all the results where the only results are ones with duplicate titles... | [
0.5785520076751709,
0.05849139019846916,
0.6622075438499451,
0.1642635017633438,
-0.09338930249214172,
-0.07307780534029007,
-0.1198943629860878,
-0.517029881477356,
-0.5235608220100403,
-0.35260066390037537,
-0.2945779860019684,
0.09336642175912857,
-0.5712897181510925,
-0.193444654345512... | |
(SELECT Title, ArtistID FROM LiveArt GROUP BY Title, ArtistID) c2
WHERE c1.Title = c2.Title AND c1.ArtistID = c2.ArtistID
```
to produce the following table:
```
+---------+-----------------+----------+-----------+--------+
| ArtId | Location | ArtistID | Title | Size |
+---------+-----------------+-... | [
0.0855460986495018,
0.05166519433259964,
0.8487962484359741,
0.2781692445278168,
-0.02842768281698227,
0.2565513253211975,
0.004708997439593077,
-0.2807825803756714,
-0.4484815299510956,
-0.2905362844467163,
-0.37507835030555725,
0.16511008143424988,
0.07812880724668503,
0.3145416378974914... | |
| 427 | clouds | small |
| 7 | France | 123 | collage | small |
| 8 | Spain | 123 | collage | large |
| 9 | Belarus | [
0.19426211714744568,
-0.14980895817279816,
0.3939877152442932,
-0.018605956807732582,
0.045875005424022675,
0.495201975107193,
0.2278781682252884,
0.12258601933717728,
-0.9011315107345581,
-0.15969814360141754,
-0.5952813625335693,
-0.18784862756729126,
-0.45515376329421997,
0.144762486219... | |
| 123 | collage | medium |
+---------+-----------------+----------+-----------+--------+
```
What I want returned is this:
```
+---------+-----------------+----------+-----------+--------+
| ArtId | Location | ArtistID | Title | Size |
+---------+-----------------+----------+-----------+------... | [
0.10281293094158173,
0.062180135399103165,
0.9807193875312805,
0.1769571751356125,
0.20188522338867188,
0.04518958553671837,
-0.010255894623696804,
-0.3849537968635559,
-0.4234822988510132,
-0.06909571588039398,
-0.425849050283432,
0.370309054851532,
-0.05146598815917969,
-0.38757935166358... | |
| 123 | collage | large |
| 9 | Belarus | 123 | collage | medium |
+---------+-----------------+----------+-----------+--------+
```
How can I tweak my query to do that (skip the first matched result)?
```
select * from tabName A
where A.ArtId !=
(
select min(ArtId)
from tabName B... | [
0.17290176451206207,
-0.1983114629983902,
0.5262280106544495,
0.21892350912094116,
0.005608922801911831,
0.29318690299987793,
0.22820264101028442,
-0.6047729849815369,
-0.3491201102733612,
-0.3573307693004608,
-0.2506943941116333,
0.364289253950119,
-0.3678756058216095,
-0.0506651438772678... | |
ArtistID Title Size
---------- ---------- ---------- ---------- ----------
6 US 427 clouds small
8 Spain 123 collage large
9 | [
-0.060936179012060165,
0.0816357210278511,
0.6746895909309387,
0.3076733350753784,
0.062464021146297455,
0.43385225534439087,
-0.11500537395477295,
0.11897899955511093,
-0.5479546785354614,
-0.1452156901359558,
-0.24957752227783203,
0.2833128869533539,
0.16823862493038177,
-0.2691990137100... | |
Belarus 123 collage medium
``` | [
0.5743688344955444,
0.10616397112607956,
0.10862573236227036,
-0.03687313199043274,
0.00838610902428627,
-0.07338275015354156,
0.13132327795028687,
0.1697957068681717,
-0.43325507640838623,
-0.18658539652824402,
-0.2268652319908142,
0.13970939815044403,
-0.5556504130363464,
0.0610304661095... | |
Google search results are showing my pages as (ip)/mypage.html instead of <https://www.mydomain.com/mypage.html>. I believe the solution is to redirect the ip's to the domain. I've found many, very similar ways to do this, but none of them are working for me. I have an existing rule that redirects http to https. This i... | [
0.08869681507349014,
0.2961825728416443,
1.0189098119735718,
-0.11065687239170074,
0.040074996650218964,
-0.32357338070869446,
0.3588411509990692,
-0.1268410086631775,
-0.22603128850460052,
-0.6986712217330933,
0.13937656581401825,
0.381969153881073,
-0.36682069301605225,
0.316841930150985... | |
or like so:
```
RewriteEngine On
RewriteCond %{HTTP_HOST} ^11\.11\.11\.111$ [NC,OR]
RewriteCond %{HTTP_HOST} ^([a-z.]+)?mydomain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]
``` | [
0.062303125858306885,
0.28674086928367615,
0.864398181438446,
-0.3009268641471863,
0.1607975959777832,
-0.015444769524037838,
0.2682154178619385,
-0.010007579810917377,
-0.28072428703308105,
-0.7153692245483398,
-0.06572270393371582,
0.5440310835838318,
-0.18503543734550476,
0.312241405248... | |
**EDIT:** `entry.content.$t` is the wrong field to access individual cells. **entry.gsx$[*cell column header*]** is the correct method. Apologies and thanks for helping to solve this.
Original question:
I'm trying to parse [JSON data from a Google Spreadsheet](http://code.google.com/apis/gdata/docs/json.html). The pr... | [
0.25253230333328247,
0.34780874848365784,
0.5690265893936157,
0.04994279518723488,
0.42131277918815613,
0.08159089833498001,
0.5983161330223083,
0.11116649210453033,
-0.1630425900220871,
-0.676068902015686,
-0.25470277667045593,
-0.09509533643722534,
-0.31755200028419495,
0.050829883664846... | |
phonenumber: (555) 555-5555,
website: http://www.780cafe.com,
latitude: 37.760505,
longitude: -122.421447"
},
```
Look carefully, the `$t` field returns an entire string which is a row in the Google spreadsheet. So `entry.content.$t` returns a string: `location: 780 Valenc... | [
0.24150528013706207,
0.00789929460734129,
0.7858067750930786,
0.23911847174167633,
0.8541531562805176,
0.1967652142047882,
0.07824429124593735,
0.3781490921974182,
-0.08707232773303986,
-0.21370597183704376,
-0.1401919275522232,
0.3450199365615845,
-0.24384036660194397,
-0.0847525522112846... | |
cells in the spreadsheet have commas (like addresses) which aren't escaped or quoted. Something like
```
jQuery.parseJSON(entry.content.$t)
```
or
```
eval('('+ entry.content.$t + ')')
```
throws an error. I suppose regex is an option, but I'm hoping others may have solved this in a more elegant way. Thanks for ... | [
-0.1537572741508484,
-0.19477325677871704,
0.37396323680877686,
0.1876680552959442,
0.24991445243358612,
-0.18990685045719147,
0.05954594165086746,
-0.09595184028148651,
-0.018984152004122734,
-0.738467276096344,
-0.02009250409901142,
0.23069924116134644,
-0.4329547584056854,
-0.2323306500... | |
Suppose I have an `events` controller. If I request `/events` by `GET` it will respond with `index` action in news controller, this view will display future events.
I want to add a new action called `past`, it is like `index`, which return an array of `Event`s but with another query.
I have added to `routes.rb` this ... | [
-0.04482311010360718,
-0.2760995328426361,
0.5262612104415894,
0.11269511282444,
-0.0454622358083725,
0.00017454582848586142,
0.026528073474764824,
0.038759659975767136,
-0.4782780408859253,
-0.7213873267173767,
-0.10727941244840622,
0.43837156891822815,
-0.1438712477684021,
0.288894206285... | |
for 127.0.0.1 at 2012-04-02 19:32:01 -0500
Processing by EventsController#show as HTML
Parameters: {"id"=>"past"}
```
And finally here you have `rake routes` output:
```
events GET /events(.:format) {:action=>"index", :controller=>"events"}
event GET /events/:id(.:... | [
-0.020582322031259537,
-0.41876089572906494,
0.6705530285835266,
0.2624603509902954,
0.013472887687385082,
0.02968272939324379,
0.1602596938610077,
-0.3360842764377594,
-0.32833877205848694,
-0.6580747961997986,
-0.05852339044213295,
0.46615779399871826,
-0.022023754194378853,
0.0639619454... | |
/events/past(.:format) {:action=>"past", :controller=>"events"}
contact_us_event POST /events/:id/contact_us(.:format) {:action=>"contact_us", :controller=>"events"}
GET /events(.:format) {:action=>"index", :controller=>"events"}
POST /events... | [
0.10068700462579727,
-0.3047257363796234,
0.5894661545753479,
0.3032863736152649,
0.2508072555065155,
0.20174574851989746,
0.13078925013542175,
-0.0936843678355217,
-0.23089134693145752,
-0.5178545713424683,
-0.43670159578323364,
0.5748894214630127,
-0.18452338874340057,
-0.189223930239677... | |
{:action=>"create", :controller=>"events"}
new_event GET /events/new(.:format) {:action=>"new", :controller=>"events"}
edit_event GET /events/:id/edit(.:format) {:action=>"edit", :controller=>"events"}
GET /events/:id(.:format) {:action=>"sh... | [
0.2792346477508545,
-0.5654376745223999,
0.28556540608406067,
0.21473538875579834,
-0.08245699107646942,
0.1320614367723465,
0.07462475448846817,
-0.4849551022052765,
-0.5009965300559998,
-0.46851199865341187,
-0.2754247188568115,
0.49586108326911926,
-0.37142491340637207,
-0.0107812192291... | |
PUT /events/:id(.:format) {:action=>"update", :controller=>"events"}
DELETE /events/:id(.:format) {:action=>"destroy", :controller=>"events"}
```
Other test was check routes using Rails console:
```
$ script/rails c
1.9.2-p318 :001 > rs = ActionController::Routing::Rou... | [
0.2919781804084778,
-0.4224264621734619,
0.06856852024793625,
-0.03664439171552658,
0.09384289383888245,
0.052891600877046585,
0.4784929156303406,
-0.3498252332210541,
-0.11608212441205978,
-0.6797394752502441,
-0.12711799144744873,
0.43063005805015564,
-0.31782329082489014,
-0.00759787810... | |
this:
Remove all the following js scripts you have loaded in your document:
```
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-collapse.js"></script>
<script src="js/bootstrap-carousel.js"></script>
```
And just keep the following in that same order (jQuery goes first)
```
<script src="js/jq... | [
0.01893465593457222,
0.04945332556962967,
0.2790142297744751,
-0.15519724786281586,
0.06818844377994537,
-0.012273721396923065,
0.2285776138305664,
-0.0032559980172663927,
-0.39502817392349243,
-0.7831867933273315,
-0.2348686009645462,
0.7103428840637207,
-0.3766383230686188,
0.05916081368... | |
Trying to make manageable output for Android to convert $output into JSONObjects. When I use the commented out bottom line, it receives the data in Android's log just fine, but can't convert JSONArray to JSONObject - thus the desire for a foreach loop to return each SQL row on its own. I can't see any syntax issues, so... | [
-0.01887821964919567,
0.06427013874053955,
0.2640003263950348,
-0.2677709460258484,
-0.31735995411872864,
0.2427874356508255,
0.4355245530605316,
-0.2616921067237854,
-0.015233365818858147,
-0.8182178139686584,
0.07356379181146622,
0.6744705438613892,
-0.7411177158355713,
-0.12885203957557... | |
from QUESTIONS where CATEGORY like 'elections'");
while($row=mysql_fetch_assoc($sql))
$output[]=$row;
foreach($output) {
echo $output;
}
mysql_close();
//print(json_encode($output));
?>
```
And here's the error:
```
Parse error: syntax error, unexpected ')' in /home/frehud/public_html/android_api/getQuestions/inde... | [
0.032387904822826385,
0.25356197357177734,
0.4400513768196106,
-0.2662670910358429,
0.04450373351573944,
0.1866898536682129,
0.2976619303226471,
-0.6030459403991699,
-0.056621111929416656,
-0.27626538276672363,
-0.6305254101753235,
0.3983651399612427,
-0.5238009095191956,
0.047319531440734... | |
I'm trying to calculate the number of lines of best fit for an ellipse; given a desired error margin (minimum distance from the boundary).
My solution for a unit circle was thus.
```
def f(u, v, r):
mid_uv = (u + v) * 0.5
N = normalized(mid_uv)
return N * r
```
And repeat `v = f(u, v, r)` until `radius... | [
-0.34268829226493835,
-0.006001466419547796,
0.9224429130554199,
-0.026492025703191757,
-0.32821306586265564,
0.4550132155418396,
0.3801649808883667,
-0.3863397538661957,
-0.2877483665943146,
-0.6757803559303284,
-0.058696430176496506,
0.21210543811321259,
0.1173008382320404,
0.21649080514... | |
it for).
How can I adapt it?
Or better yet, is there another solution?
I cannot formulate a nice neat answer - working with ellipses is quite a bit more challenging that circles - but here goes, in steps:
**First -** I would tighten up the algorithm for the circle by using a bit of trig. If you draw a chord (line seg... | [
-0.05424688756465912,
-0.06876879930496216,
0.5746138691902161,
-0.09087714552879333,
-0.1117098331451416,
0.42761075496673584,
0.02955741435289383,
-0.6477774977684021,
-0.32103967666625977,
-0.8226568102836609,
0.17769722640514374,
0.63051438331604,
0.24278903007507324,
0.052629500627517... | |
chord's bisector.) Inverting this formula, you can calculate the angle given the tolerable error. The first line of code gives the precise angle; the second line shrinks the angle if needed so that it is an exact fraction of the whole circle.
```
angle = 2 * math.acos( 1 - error )
angle = (2*math.pi) / math.ceil( (2*m... | [
-0.37915727496147156,
0.1566096544265747,
0.5773035287857056,
-0.15551450848579407,
-0.058130692690610886,
0.5093809366226196,
-0.00584404869005084,
-0.32060375809669495,
-0.13261334598064423,
-0.7988007664680481,
-0.11929314583539963,
0.4166986048221588,
0.16054055094718933,
0.28162094950... | |
adjusted as follows:
```
angle = 2 * math.acos( 1 - error/radius )
angle = (2*math.pi) / math.ceil( (2*math.pi) / angle )
```
And calculate the chord end-points by multiplying the sin and cos values by the radius.
**Third -** For an ellipse with maximal and minimal radii `major` and `minor`, I would use the circle ... | [
-0.45903557538986206,
-0.13841478526592255,
0.9025371074676514,
-0.10199255496263504,
-0.1290302723646164,
0.353609174489975,
0.02773277834057808,
-0.2792409062385559,
-0.18499287962913513,
-0.6880998015403748,
0.14339976012706757,
0.7397255897521973,
0.1811124086380005,
0.1705707311630249... | |
end-points like this:
```
[ (major, 0),
(major*cos(angle), minor*sin(angle)),
(major*cos(2*angle), minor*sin(2*angle)),
... ]
```
This does not always give you the minimal polygon for an ellipse (it will have more chords than necessary near the minor axis, especially for very squashed ellipses), but you only h... | [
-0.6333653330802917,
0.1672234684228897,
0.5235030651092529,
0.059409938752651215,
-0.20909324288368225,
0.08897589892148972,
0.11731619387865067,
-0.18540968000888824,
-0.29711586236953735,
-0.5892061591148376,
-0.02614339254796505,
0.27475687861442566,
0.1729169636964798,
0.1919970214366... | |
i wan't to remove all sales according to predict expression
```
IQueryable<Sale> sales = entites.Sales.Where<Sale>(s => s.EmployeeId == check.EmployeeId);
foreach (Sale sale in sales)
entites.Sales.DeleteObject(sale);
```
i'm looking for a lambda which can do this in one line of code .
selecting and... | [
0.1801244169473648,
0.44678795337677,
0.13190415501594543,
-0.02860792726278305,
-0.46066999435424805,
0.46921467781066895,
0.17337311804294586,
-0.09840074926614761,
0.08611954748630524,
-0.35977259278297424,
-0.31014275550842285,
0.8611440062522888,
-0.4589194059371948,
0.315446943044662... | |
I'm finding it difficult to debug my shell scripts. I have the following file test.csv
```
The Gardens,Gard (AUS),AEST,NSW,,Sandown Park,SPrk (AUS),AEST,VIC,,Grade 5,GR5,
Wentworth Park,WPrk (AUS) ,AEST,NSW,,The Meadows,Mead (AUS),AEST,VIC,,Juvenille,JUV,
Angle Park,AnPk (AUS),ACST,SA,,Warragul,Wgul (AUS),AEST,VIC,,,,... | [
0.35913047194480896,
0.06051528453826904,
0.5045797228813171,
-0.19954487681388855,
0.18129318952560425,
0.39986076951026917,
0.5166113376617432,
-0.2186668962240219,
-0.05764119327068329,
-0.47744226455688477,
-0.19412116706371307,
0.23054173588752747,
-0.23835863173007965,
0.092797197401... | |
any action block (`{...}`), it is evaluated every line *as a condition*. It returns the number of substitutions it made, so it will return 0 on most of the inputs, but 1 on the lines you want to change. Since there is no action accompanying it, the default action is executed, printing the line; that is why you are gett... | [
-0.2314361035823822,
-0.26116231083869934,
0.3292224705219269,
-0.3791947662830353,
0.04485968500375748,
0.23124822974205017,
0.21699140965938568,
-0.14138390123844147,
-0.32195401191711426,
-0.46192631125450134,
-0.5149836540222168,
0.6378464698791504,
-0.488163024187088,
-0.2752834856510... | |
I am trying to get a WordPress image to change based on which tab is clicked.
I want the image to be replaced with a new image using jQuery's fade effect. The image must be relative to the tab.
Example...
If tab "my1" is clicked, then replace current images with my1.jpg
If tab "my2" is clicked, then replace current ... | [
0.025154752656817436,
-0.12255779653787613,
0.5843109488487244,
-0.2564930021762848,
0.01069654431194067,
0.22993938624858856,
0.40003857016563416,
-0.0989200621843338,
0.11249499768018723,
-0.8156419992446899,
-0.18092811107635498,
0.5292884111404419,
-0.49147534370422363,
0.0125801255926... | |
on most of the inputs, but 1 on the lines you want to change. Since there is no action accompanying it, the default action is executed, printing the line; that is why you are getting the full line printed.
The fix, as others have said, is putting the `gsub` call inside the action block.
(Also, why `\,`? Comma is not ... | [
-0.171949565410614,
-0.13697201013565063,
0.36148127913475037,
-0.35405686497688293,
0.12400905042886734,
0.22004033625125885,
0.05738629028201103,
-0.058029428124427795,
-0.24351342022418976,
-0.37691834568977356,
-0.6016169190406799,
0.8201396465301514,
-0.4683045446872711,
-0.3416149020... | |
I have a view which has scrolling images + paging. I have added these images on a UIVIEW and have added this UIView to main view. I want to detect click event on images within scrollview and handle them in main view.
How do I do it?
Please help
You can solve the problem with a gesture recognizer.
```
// In the view ... | [
0.03387691080570221,
-0.19920946657657623,
0.9433450102806091,
-0.11924795061349869,
-0.3296729624271393,
0.048151254653930664,
0.38592490553855896,
-0.43492797017097473,
-0.14736181497573853,
-0.8194882273674011,
0.1129344180226326,
0.8658387064933777,
-0.10977393388748169,
-0.08032795786... | |
view gets tapped
```
- (void)imageViewTapped:(UITapGestureRecognizer *)gr {
UIImageView *theImageViewThatGotTapped = (UIImageView *)gr.view;
}
``` | [
-0.06615208089351654,
-0.3559958338737488,
0.7497138977050781,
0.010911529883742332,
-0.13200727105140686,
0.08330673724412918,
0.38284745812416077,
0.03621109202504158,
-0.11396463215351105,
-0.726963996887207,
-0.20494435727596283,
0.6871705055236816,
-0.02904481440782547,
0.024200199171... | |
Can someone tell me what `-moz-border-radius` is used for?
I understand it is one of Mozilla CSS Extensions but I don't understand what really it is used for.
I tried the following example in Firefox and both `border-radius` and `-moz-border-radius` do the same thing.
See this [jsFiddle example](http://jsfiddle.net... | [
0.47912105917930603,
0.033967699855566025,
0.43385398387908936,
0.05958497151732445,
-0.005425409413874149,
-0.3842960596084595,
0.11811339855194092,
0.008369914256036282,
-0.4390611946582794,
-0.7391766905784607,
0.0009266590350307524,
0.44890737533569336,
-0.3313390910625458,
0.224998712... | |
the spec finally turned out, whereas everybody else implemented the standard. You won't notice a difference if you only use one value for it though (`-moz-border-radius: 10px` and `border-radius: 10px` behaves the same, but `-moz-border-radius: 10px 8px 4px 12px` and `border-radius: 10px 8px 4px 12px` do not (unless I'... | [
0.2686837613582611,
-0.047204870730638504,
0.7835570573806763,
0.17335373163223267,
0.0022740946151316166,
-0.22357577085494995,
0.11717060208320618,
-0.2354307919740677,
-0.1626148223876953,
-0.35535892844200134,
0.3176707923412323,
0.6193663477897644,
0.15437695384025574,
0.2292963117361... | |
I need to ignore fields instead of select fields in fetch data or reverse select fields.
Is that possible? If yes, how?
Regarding to the documentation, it's not possible: <http://propelorm.org/reference/model-criteria.html#getting-columns-instead-of-objects>
But you can do it on your own.
Built an array of your fiel... | [
0.28212833404541016,
-0.05256785824894905,
0.6022560000419617,
0.14756086468696594,
-0.007185220718383789,
0.00667852396145463,
0.30982276797294617,
-0.4617941677570343,
-0.2812015116214752,
-0.3840840458869934,
0.06879502534866333,
0.5915222764015198,
-0.35475531220436096,
0.1957563161849... | |
= MyTableQuery::create()
->select(array_keys($fields))
->find();
}
``` | [
-0.031000502407550812,
0.3345719575881958,
0.27983224391937256,
-0.19045153260231018,
0.2980771064758301,
-0.06969639658927917,
0.12149649113416672,
-0.06325125694274902,
0.10243666917085648,
-0.5073237419128418,
-0.08915179967880249,
0.4658447206020355,
-0.15679657459259033,
0.51640337705... | |
I have a PHP script which is generating buttons to each content schedule. The script echo's 1 HTML button with the same name, class and ID, however the value's are set based on a variable.
In jQuery I have declared the button based on it's class, so something like
```
$('.save').button();
```
However when I click ... | [
0.13862571120262146,
-0.06861305981874466,
0.5814573764801025,
-0.2763414680957794,
-0.11378853023052216,
-0.04294940084218979,
0.28431442379951477,
-0.2147406041622162,
-0.06858444958925247,
-0.5142463445663452,
-0.13715580105781555,
0.37013688683509827,
-0.301580011844635,
-0.00528805004... | |
// Always alerts "1" regardless of button pressed.
});
});
```
**PHP**
```
$ctr = 1;
foreach($GLOBALS['conflict_schedule'] as $key => $value) {
$html = '
<div style="float:right;">
<button class="save" name="save" value="' . $ctr . '" id="save">Save</button>
</div>
echo $html;
$... | [
-0.07409456372261047,
-0.295186847448349,
0.5574908256530762,
-0.47206711769104004,
0.2482362538576126,
0.023011410608887672,
0.42789751291275024,
-0.3926059901714325,
-0.31655260920524597,
-0.21988210082054138,
-0.5384000539779663,
0.6967582106590271,
-0.7444126009941101,
-0.2230689525604... | |
alert(clicked.val());
});
});
``` | [
0.23832111060619354,
-0.3366047441959381,
0.5831499099731445,
-0.40467649698257446,
0.3226667046546936,
-0.4352355897426605,
0.49169430136680603,
0.09715309739112854,
-0.04576681926846504,
-0.5511901378631592,
-0.636860191822052,
1.014831304550171,
-0.5153849720954895,
0.18464422225952148,... | |
I am wondering why the following is marked as an error with `no suitable method found to override` in VS2010 (.NET 4):
```
public override string ToString(int foo=0) {
// some stuff
}
```
I've found [this](https://stackoverflow.com/questions/8909811/c-sharp-optional-parameters-on-overridden-methods) which seems... | [
-0.12157680839300156,
0.0798833891749382,
0.2609401047229767,
-0.05039346218109131,
0.06654419004917145,
-0.4592287838459015,
0.35206660628318787,
-0.02385142631828785,
-0.28532999753952026,
-0.2862381339073181,
-0.17405763268470764,
0.643143892288208,
-0.4126364290714264,
0.15189006924629... | |
the same signature as the method that they are overriding, and optional parameters aren't just syntactic sugar for overloading; they're also part of the method signature and even part of the resultant IL code.
This:
```
public virtual string ToString();
```
Is not the same as this:
```
public override string ToStr... | [
0.09692025184631348,
-0.15388014912605286,
0.02873794175684452,
-0.061018940061330795,
0.09018484503030777,
-0.31227418780326843,
0.41958552598953247,
-0.017012694850564003,
0.09292188286781311,
-0.3087005615234375,
-0.2964371144771576,
0.7869650721549988,
-0.5743572115898132,
0.0216676499... | |
I mostly do PHP development but I also do Asp .Net development in VS 2010. VS comes with a built in webserver for debugging. Could VS cause a problem with my apache webserver? Is there a better setup?
Slice assignment can be used to insert one sequence within another (mutable).
```
>>> a = [1, 2, 3]
>>> a[1:1] = [4, 5... | [
0.20527465641498566,
0.033095020800828934,
0.17944073677062988,
-0.12231025099754333,
-0.5084857940673828,
-0.028330359607934952,
0.33610790967941284,
-0.29310905933380127,
-0.020310258492827415,
-0.6826364994049072,
0.31710872054100037,
0.508243203163147,
-0.367631196975708,
0.07772891223... | |
In ASP.NET MVC 4 Beta, I have an entity with this property:
```
[DisplayFormat(DataFormatString = "{0:o}", ApplyFormatInEditMode = true)]
public virtual DateTime SavedAt { get; set; }
```
In a view, generated with the "Controller with read/write actions and views, using EntityFramework" template, I have this code to... | [
-0.39928048849105835,
-0.48815491795539856,
0.8883714079856873,
-0.09603097289800644,
0.038923781365156174,
-0.011429455131292343,
0.04144730791449547,
-0.2948358356952667,
-0.16972318291664124,
-0.49459874629974365,
-0.17350061237812042,
0.3003171682357788,
-0.04094571992754936,
0.0299795... | |
value="2012-03-31T22:45:18.2244059" />
<span class="field-validation-valid" data-valmsg-for="SavedAt" data-valmsg-replace="true"></span>
</div>
```
Notice that the date is formatted as "2012-03-31T22:45:18.2244059".
If I replace the view code fragment with this:
```
@Html.HiddenFor(model => model.SavedAt)
```
... | [
-0.0042996457777917385,
-0.11790358275175095,
0.8256058096885681,
-0.12325843423604965,
-0.03801374137401581,
-0.13570141792297363,
0.450105756521225,
-0.10139963030815125,
-0.28459420800209045,
-0.3815530240535736,
-0.23905201256275177,
0.730432391166687,
0.20650483667850494,
0.1999855339... | |
doesn't. Only the EditorFor and DisplayFor helpers use the DisplayFormat.
> If not, what would be a good alternative to have the hidden field
> output in the desired format?
You shouldn't really care about the format of a hidden field. It's hidden, nobody sees it. But if for some reason you wanted a custom format yo... | [
0.11177153885364532,
-0.15541036427021027,
0.5682757496833801,
0.18239720165729523,
-0.04429761320352554,
-0.21581965684890747,
0.30845263600349426,
-0.3274644613265991,
-0.1962084174156189,
-0.5890401601791382,
-0.097972072660923,
0.7269517183303833,
-0.23424676060676575,
0.07104796171188... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.