text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
```
<td id="hello"> OPD </td>
```
On my html page, this is how I am getting a td tag in a tr.
I want to get the value "OPD" in java script variable.
```
var td1 = document.getElementById("hello");
```
Can I get this value by performing any operation on td1.
Is there any other way to do this. Please help
```
var ... | [
0.33660247921943665,
-0.0292426235973835,
0.5766047239303589,
-0.1846766471862793,
-0.02845400758087635,
0.2092858850955963,
0.24046707153320312,
-0.5706169009208679,
-0.11297580599784851,
-0.385836124420166,
-0.0972793847322464,
0.9316266775131226,
-0.3560437858104706,
-0.1269001215696334... | |
I have seen quite a few ways to output variables. Which of these ways is "better"?
```
my_name = 'Jeff Hall'
my_height = 74
puts "Let's talk about %s." % my_name
puts "He's %d inches tall." % my_height
```
vs.
```
puts "Let's talk about #{my_name}."
puts "He's #{my_height} inches tall."
```
Also, what do the `s... | [
0.20040364563465118,
0.48060518503189087,
0.16996799409389496,
-0.12840567529201508,
-0.3112305700778961,
0.17823059856891632,
0.4336661696434021,
-0.1493699997663498,
-0.06535474956035614,
-0.6842007040977478,
0.039293572306632996,
0.2574371099472046,
0.268230676651001,
0.0488136820495128... | |
I'm coding an edit form and I can't get the part where you check previously checked checkboxes to function properly.
For example I have a list of five items in a database, I previously checked two of them and saved the form. When I press edit on the form, I need to get this again:
```
[ ] Item 1
[X] Item 2
[ ] Item 3... | [
0.5620474815368652,
0.0694330632686615,
0.24389050900936127,
0.20448389649391174,
-0.03115168586373329,
0.19887369871139526,
0.08700884133577347,
-0.5877681374549866,
-0.05119805410504341,
-0.9259483218193054,
0.16212977468967438,
0.5345330834388733,
-0.20762696862220764,
0.284462243318557... | |
if an item in `$related` is found in `$amenities`, it will print the box checked and if not, it will print it unchecked. This is my code relevant to that part.
**$amenities (print\_r)**
```
Array
(
[0] => Array
(
[itemID] => 3
[itemName] => Crema Chantilly
)
[1] => ... | [
0.6204872131347656,
0.24102120101451874,
0.24711225926876068,
0.06581371277570724,
0.24410496652126312,
-0.05756738781929016,
0.24093909561634064,
-0.5755613446235657,
0.0742826908826828,
-0.6443682312965393,
0.03857658430933952,
0.6376900672912598,
-0.006239030510187149,
0.333633095026016... | |
[itemID] => 4
[itemName] => Caribe Cooler
)
[2] => Array
(
[itemID] => 5
[itemName] => Cacahuates Japoneses
)
[3] => Array | [
0.0017243276815861464,
0.01081512589007616,
0.22497791051864624,
0.2668108344078064,
-0.12081216275691986,
0.28025931119918823,
0.007485560141503811,
-0.31098878383636475,
-0.07122721523046494,
-0.1645275503396988,
-0.09731625765562057,
0.4082922637462616,
-0.32005858421325684,
0.144024819... | |
(
[itemID] => 6
[itemName] => Cerveza Sol (lata)
)
[4] => Array
(
[itemID] => 7
[itemName] => Chocolate derretido
)
)
```
**$related (print\_r)**
```
Array
(
[0] => Array | [
-0.08330246061086655,
0.17862316966056824,
0.5132901072502136,
-0.08010919392108917,
0.08272983133792877,
0.34261855483055115,
-0.1448199450969696,
-0.07969363778829575,
-0.4741864502429962,
-0.30259251594543457,
-0.140381321310997,
0.7791263461112976,
-0.22438380122184753,
0.2590677738189... | |
(
[itemID] => 3
[itemName] => Crema Chantilly
)
[1] => Array
(
[itemID] => 4
[itemName] => Caribe Cooler
)
)
```
As you can see, there | [
0.33572670817375183,
0.18638981878757477,
0.22860004007816315,
-0.13621769845485687,
0.017945578321814537,
0.05981918051838875,
0.14432646334171295,
-0.08780398219823837,
-0.30168336629867554,
-0.44061169028282166,
-0.3275291919708252,
0.1729772686958313,
-0.01759169064462185,
0.2830514013... | |
are two items in `$related` that match two items in `$amenities`.
What I'm trying here is something like this:
```
<?php foreach ($related as $single) : ?>
<?php foreach ($amenities as $amenity) : ?>
<?php if ( $single === $amenity) : ?>
<input type="checkbox" class="left" checked="yes" name="ame... | [
0.47926396131515503,
-0.06577499210834503,
0.12390807271003723,
0.16702403128147125,
0.04680211469531059,
-0.05974702537059784,
-0.25159308314323425,
-0.6515129804611206,
-0.2012477070093155,
-0.7585949301719666,
0.045726265758275986,
0.33483850955963135,
-0.20571088790893555,
0.4161609113... | |
<?php endif ?>
<?php endforeach;?>
<?php endforeach;?>
```
But, the results are being duplicated for the full options list. I'm getting this:
```
[X] Item 1
[ ] Item 2
[ ] Item 3
[ ] Item 4
[ ] Item 5
[ ] Item 1
[ ] Item 2
[X] Item 3
[ ] Item 4
[ ] Item 5
```
And I need to get
```
[X] Item 1
[ ] Item 2
[X]... | [
-0.0754588320851326,
0.1750197857618332,
0.449107825756073,
0.143230140209198,
-0.136826753616333,
0.14252041280269623,
0.3059142529964447,
-0.42437943816185,
-0.08635996282100677,
-0.4278624653816223,
-0.11263873428106308,
0.5599438548088074,
-0.3898416757583618,
-0.06467262655496597,
-... | |
writing in every loop check its existance and set its status checked
```
<?php foreach ($amenities as $single) : ?>
<?php $strChecked = '';?>
<?php foreach ($related as $amenity) : ?>
<?php if ( $single === $amenity) : ?>
<?php $strChecked = ' checked="checked"';break;?>
<?php endif ?>
... | [
0.517440915107727,
0.129774272441864,
0.10660752654075623,
-0.07021874189376831,
0.005512111820280552,
0.2518652379512787,
0.7464047074317932,
-0.30481794476509094,
-0.03427250310778618,
-0.4230126738548279,
-0.18956385552883148,
-0.17437958717346191,
-0.5952016711235046,
0.141654789447784... | |
I am trying since two days to install OpenCV 2.3.0 or 2.3.1 on my mac 10.6.8 snow leopard. I followed the following commands
```
$ cd /Users/ateendra/Desktop/OpenCV-2.3.0/
$ mkdir build
$ cd build/
$ cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 ..
$ ccmake .
$ make -j8
$ sudo make insta... | [
0.20914997160434723,
0.33824753761291504,
0.3789291977882385,
-0.35201165080070496,
-0.1351550966501236,
0.098678357899189,
1.0150810480117798,
-0.29984310269355774,
-0.07889050990343094,
-0.4961058795452118,
-0.10364925861358643,
0.4336134195327759,
-0.3105027973651886,
-0.158941894769668... | |
type
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
```
I've managed to install OpenCV 2.3.1 on OSX 10.6.8, but I've done it using [MacPorts](http://www.macports.org/), (which I recommend as it deals wit... | [
0.06328950077295303,
0.3519189953804016,
0.4638293385505676,
-0.36002063751220703,
-0.17172302305698395,
-0.3473287522792816,
0.6660886406898499,
-0.31044289469718933,
-0.20606042444705963,
-0.7737473249435425,
-0.1763429343700409,
0.7436919212341309,
-0.38441744446754456,
-0.0605152063071... | |
existing dylib in the wrong place. | [
0.20652104914188385,
0.2078867405653,
0.12641002237796783,
-0.005193040706217289,
-0.29758957028388977,
-0.1642978936433792,
0.2734844386577606,
-0.07371582835912704,
0.2398044615983963,
-0.5556370615959167,
0.20392976701259613,
0.2262064665555954,
-0.32568395137786865,
0.512710452079773,
... | |
I'm trying to write a macro to delete all rows that have "True" in column A.
Here is what I have so far:
```
Sub deleteBlankRows3()
Dim lastrow as Long
Dim x as Long
lastrow = 4650
For x=8 to x=lastrow
If (Range("A1").Offset(x,0) = True) Then
Range("A1").Offset(x,0).EntireRow.Delete
x = x + 1
End if
Next... | [
0.09703966975212097,
0.10982685536146164,
0.45766258239746094,
-0.38141635060310364,
0.056955546140670776,
0.02567155659198761,
0.43412351608276367,
-0.3791263997554779,
-0.21336078643798828,
-0.35769549012184143,
-0.15641899406909943,
0.701308012008667,
-0.30875757336616516,
-0.0868973359... | |
property for equivalence tests against a non-range property.
Second, your cells probably contain a string "True", rather than the value `True` so try using
```
If (Range("A1").Offset(x,0).Value = "True") Then
```
Finally, if you actually find a row, and you delete it, then your will actually end up skipping a row,... | [
-0.16924482583999634,
-0.14742262661457062,
0.10192794352769852,
-0.0554937981069088,
0.3208625316619873,
-0.06566348671913147,
0.3313060700893402,
-0.3203139901161194,
-0.3014359176158905,
-0.5622044801712036,
-0.21137423813343048,
0.4186834990978241,
-0.3080570697784424,
0.04179554805159... | |
x if you've just deleted a row:
```
If (Range("A1").Offset(x,0).Value = "True") Then
Range("A1").Offset(x,0).EntireRow.Delete
Else
x = x + 1
EndIf
``` | [
0.038792677223682404,
0.2412165254354477,
0.3246619701385498,
-0.3658057749271393,
0.17447032034397125,
0.26066944003105164,
0.07740557938814163,
-0.10561510920524597,
-0.10768149048089981,
-0.2479284405708313,
-0.3550581932067871,
0.47503480315208435,
-0.4691443145275116,
0.17649044096469... | |
UPDATE:
I also tried implementing UITextViewDelegate delegate and then doing in my controller:
```
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
{
[textView resignFirstResponder];
return YES;
}
```
I also set the delegate of the text view to be self (controller view instance).
Clicking the Done b... | [
-0.22435298562049866,
-0.16770653426647186,
1.026283621788025,
-0.19921612739562988,
-0.24910655617713928,
0.05142970010638237,
0.24390795826911926,
-0.3671887516975403,
-0.07698876410722733,
-0.7667024731636047,
-0.20377664268016815,
0.8502326607704163,
-0.2836388945579529,
0.138949900865... | |
line.
So I have a UITextView element on my scene and when a user taps it, keyboard appears and it can be edited.
However, I cannot dismiss the keyboard.
How can I add Done button to the keyboard so it can be dismissed?
thats quite simple :)
```
[textField setReturnKeyType:UIReturnKeyDone];
```
for dismissing the ... | [
-0.3451293706893921,
-0.30061209201812744,
1.004378318786621,
-0.13438595831394196,
-0.06478232890367508,
-0.12542350590229034,
0.5116697549819946,
-0.43673861026763916,
0.12637682259082794,
-0.5771000981330872,
-0.529578447341919,
0.5268282294273376,
-0.39424386620521545,
0.12596772611141... | |
Should I use E\_NOTICE enabled on live server?
As I can see in [Why should I fix E\_NOTICE errors?](https://stackoverflow.com/questions/5073642/why-should-i-fix-e-notice-errors)
everybody is again with using `isset()` to omit notices. I have read pros, but how about code readability?
Let's examine some code:
```php
... | [
-0.1757691502571106,
0.3586065173149109,
0.5728607177734375,
-0.4523598849773407,
-0.08622991293668747,
-0.3549858033657074,
0.25335538387298584,
-0.5506519675254822,
-0.38875535130500793,
-0.6299309730529785,
-0.42820098996162415,
0.5440832376480103,
-0.5738189220428467,
-0.19909134507179... | |
to understand what is happening here.
A few bits about debugging - I never wasted a day to debug errors caused by not initialized variable. Yes, maybe half of a hour was wasted to slide down into the classes/functions but this not a big waste when comparing to losing code readability IMHO?
A few bits about performanc... | [
0.336222767829895,
0.03200804069638252,
0.07718750089406967,
0.012275896966457367,
-0.47734448313713074,
0.023500198498368263,
0.8231511116027832,
-0.24831487238407135,
-0.20006026327610016,
-0.37859484553337097,
0.11493362486362457,
0.43752723932266235,
0.19310873746871948,
-0.00042544139... | |
does it takes in comparison to DB connections, etc.?
Maybe I just not used to write correct code(used only PHP for long time now).
For context we have moved our project to server which displaying E\_NOTICEs, that's why I'm asking this. I don't know why this is a big problem to switch them off?
Another example:
```p... | [
0.06367763131856918,
0.10541296005249023,
0.5826900601387024,
-0.16673249006271362,
-0.28803449869155884,
-0.1952241063117981,
0.3663519322872162,
-0.5303930044174194,
-0.17457537353038788,
-0.45381030440330505,
-0.03409906104207039,
0.5620694160461426,
-0.26066818833351135,
0.233370825648... | |
= $this->getAttributes();
$this->_oldattributes['category_id'] != $tattr['category_id']
```
which will give me what I need, and there are no errors, right?
Same with not an object error, in Yii when I have set up relations some objects may not be initialized, yes there is a kind of error, because have null value and... | [
-0.021551351994276047,
0.07264206558465958,
0.5223851799964905,
-0.3575780391693115,
-0.26653799414634705,
-0.2360588163137436,
0.25722426176071167,
-0.48617154359817505,
-0.19118890166282654,
-0.4285238981246948,
-0.5361852645874023,
0.699883759021759,
-0.4769043028354645,
0.0199424624443... | |
...
```
When I look at your code, for example
```
$this->_oldattributes['category_id']
```
my first thought was, that this should probably be a class instead.
```
class Attributes {
public $categoryId;
// and so on
}
```
The difference now is, that don't need to use `isset()` anymore, because now the proper... | [
-0.09413261711597443,
0.2142135053873062,
-0.012942013330757618,
-0.1843651980161667,
0.03661924600601196,
-0.24362437427043915,
0.016896743327379227,
0.17801806330680847,
-0.40531423687934875,
-0.540812075138092,
-0.16270039975643158,
0.6305626034736633,
-0.5722692608833313,
0.25423407554... | |
Does DISTINCT in a simple query with an aggregate function have any effect?
```
select DISTINCT salesperson, SUM(sales_amt) from sales GROUP BY salesperson
```
I realize there are more complicated queries where DISTINCT *can* have an affect, such as:
```
select salesperson, SUM(DISTINCT sales_amt) from sales GROUP ... | [
-0.7296739816665649,
0.3516737222671509,
-0.07949566096067429,
0.028073275461792946,
-0.6168084740638733,
0.27460944652557373,
-0.05512181296944618,
-0.34635207056999207,
-0.28743529319763184,
-0.12852782011032104,
-0.4111817479133606,
0.12596596777439117,
-0.11078294366598129,
0.464440673... | |
here by aggregating `salesperson`.
```
select DISTINCT salesperson, SUM(sales_amt) from sales GROUP BY salesperson
```
And you are, as you've noted, correct that placement of the `DISTINCT` *inside* the aggregate `SUM()` may produce a different rowset. | [
-0.20950435101985931,
0.42569810152053833,
0.23385176062583923,
-0.14507436752319336,
-0.22370274364948273,
0.43267735838890076,
-0.37352457642555237,
-0.20021718740463257,
-0.09496404975652695,
-0.46816718578338623,
-0.32819706201553345,
0.378063440322876,
-0.021282687783241272,
0.3264171... | |
A string looks like this:
```
<form id="unban" method="post" action="unban.php?uid=<? echo $uID; ?>">
<input type="hidden" name="name" value="" />
<a onclick="document.getElementById('unban').submit();">UnBan</a>
</form>
```
And i need this to be echoed out with a loa... | [
-0.06429572403430939,
-0.1410791128873825,
0.10949897021055222,
-0.22496172785758972,
-0.36444151401519775,
-0.14222392439842224,
0.40528881549835205,
-0.17679330706596375,
-0.10551545768976212,
-0.31035116314888,
-0.2721906900405884,
0.11815482378005981,
-0.3545037806034088,
0.13805121183... | |
it in a variable and use it in the echo. My echo looks like:
```
echo "<tr><td>" . $row['username'] . "</td><td>" . $banBool . "</td><td>". $status ."</td><td>" . $row['full_name'] . "</td></tr>";
```
where `$status` would be the form above depending on an if statement.
Is there a way to hold it as a string and sti... | [
0.1821032464504242,
-0.09915121644735336,
0.19806860387325287,
-0.41330406069755554,
-0.3189956843852997,
0.029550449922680855,
0.4307287931442261,
-0.5418359041213989,
0.005401248577982187,
-0.2308882623910904,
0.09450370073318481,
0.09395285695791245,
-0.3284044563770294,
-0.022762173786... | |
...
</form>
<?php
}
```
If you really need to hold it in a string, just make sure to escape whichever type of quotes are holding the string by **adding a backslash before each one**:
```
$status = '<form id="unban" method="post" action="unban.php?uid='.$uID.'">
<input type="hidden" name="name" va... | [
0.03147786110639572,
-0.026648815721273422,
0.21796914935112,
-0.13780665397644043,
0.05199506878852844,
-0.03598896786570549,
0.680383026599884,
-0.3815034329891205,
-0.2727327346801758,
-0.14600040018558502,
-0.38238832354545593,
0.2755858302116394,
-0.24510106444358826,
0.02504319883882... | |
with the variable) | [
-0.1890532672405243,
0.046670470386743546,
0.4328811764717102,
-0.03490474075078964,
-0.21052828431129456,
0.045736681669950485,
0.08002686500549316,
-0.44197511672973633,
-0.1681157946586609,
0.008948041126132011,
-0.20159517228603363,
0.7226845026016235,
-0.4643409252166748,
0.1885241866... | |
I am reading through a framework for a game, and it has a `Door` `struct` inside the `Room` `class` as follows:
```
#include <vector>
class Room{
public:
struct Door{
unsigned name;
unsigned orientation;
Room* room1;
Room* room2;
};
std::vector<Door*> adjacent;
};
```
Wha... | [
-0.15969443321228027,
0.19071431457996368,
0.1418069750070572,
-0.024468785151839256,
0.04456000030040741,
-0.0013675051741302013,
0.17309239506721497,
-0.09655289351940155,
-0.051957204937934875,
-0.5623144507408142,
-0.2186955064535141,
0.1805947721004486,
-0.08716412633657455,
0.2967330... | |
is the purpose of defining a struct inside of a class?
It's just a nested type.
> And, does it make a difference what access modifier that the struct is defined with?
If `Door` was declared `private` then trying to declare a variable of type `Room::Door` outside this class will give an error. | [
-0.0671030655503273,
-0.009286224842071533,
-0.09932897984981537,
0.06993640214204788,
-0.22613458335399628,
-0.10761169344186783,
0.39744406938552856,
-0.05509066954255104,
-0.049783553928136826,
-0.4579976797103882,
-0.13281622529029846,
0.22473277151584625,
-0.2617565989494324,
0.427687... | |
I'm maintaining a legacy application written in C++. It crashes every now and then and Valgrind tells me its a double delete of some object.
What are the best ways to find the bug that is causing a double delete in an application you don't fully understand and which is too large to be rewritten ?
Please share your be... | [
0.27029550075531006,
0.2145257592201233,
0.2135148048400879,
0.034928955137729645,
0.03704426810145378,
-0.1796993911266327,
0.589959442615509,
0.06625624001026154,
-0.507439374923706,
-0.3469497859477997,
-0.12317920476198196,
0.40392664074897766,
-0.25039342045783997,
0.2570628821849823,... | |
deletes of the object/class under suspicion, it's time to insert some `cout << "class Foo constructed, ptr= " << this << endl;` statements in your code (and corresponding `delete`/destructor prints).
2. Run valgrind with --db-attach=yes. I've found this very handy, if a bit tedious. Valgrind will show you a stack trace... | [
-0.16270498931407928,
0.0008937904494814575,
0.3889852464199066,
-0.08249559998512268,
-0.023028310388326645,
-0.1062227264046669,
0.44710686802864075,
-0.04332389682531357,
-0.4304843842983246,
-0.45327135920524597,
-0.39871442317962646,
0.658208429813385,
-0.3509845435619354,
0.046320304... | |
(and secondly) deleted.
3. Just scour the code. Look for construction/deletion of the object in question. Sadly, sometimes it winds up being in a 3rd party library :-(.
4. **Update**: Just found this out recently: Apparently gcc 4.8 and later (if you can use GCC on your system) has some new built-in features for detect... | [
0.12305518239736557,
-0.014389901421964169,
0.3405924439430237,
0.04751261696219444,
-0.0039461045525968075,
-0.192960724234581,
0.3914416432380676,
-0.07786138355731964,
-0.5441522598266602,
-0.6386638283729553,
-0.16721691191196442,
0.3481923043727875,
-0.41336947679519653,
0.08121126890... | |
While going through the book [Scala for the Impatient](https://rads.stackoverflow.com/amzn/click/com/0321774094), I came across this question:
> Come up with one situation where the assignment x = y = 1 is valid in
> Scala. (Hint: Pick a suitable type for x.)
I am not sure what exactly the author means by this quest... | [
0.03615477681159973,
-0.15211717784404755,
0.09429427981376648,
0.04697374999523163,
0.01897706463932991,
0.134874165058136,
-0.010786451399326324,
-0.307258278131485,
-0.22761540114879608,
-0.5147022008895874,
0.05985381826758385,
0.30910301208496094,
-0.0474700853228569,
0.31601089239120... | |
as:
```
var y = 2
var x = (y = 1)
```
and finally:
```
var x: Unit = ()
``` | [
-0.17759309709072113,
0.11623390763998032,
0.2208690196275711,
-0.2211390733718872,
-0.21401935815811157,
0.16819016635417938,
0.11617876589298248,
-0.3945496678352356,
0.013815921731293201,
-0.32148754596710205,
-0.4819488823413849,
0.5279536843299866,
0.04150445759296417,
0.3624875843524... | |
I have following CDATA inside xml document:
```
<![CDATA[ <p xmlns="">Refer to the below: <br/>
</p>
<table xmlns:abc="http://google.com pic.xsd" cellspacing="1" class="c" type="custom" width="100%">
<tbody>
<tr xmlns="">
<th style="text-align: left">Basic offers...</th>
</t... | [
0.38609373569488525,
-0.0586589053273201,
0.5768751502037048,
-0.12051429599523544,
0.01955748349428177,
0.09798549115657806,
-0.16877026855945587,
-0.2792966067790985,
-0.008868442848324776,
-0.9490336179733276,
0.12966907024383545,
0.4348090887069702,
-0.1296418011188507,
0.1035703122615... | |
<td style="text-align: left">
<ul>
<li>Session</li>
</ul>
</td>
</tr>
<tr xmlns=""> | [
0.010134286247193813,
-0.45961228013038635,
0.30632731318473816,
0.022430332377552986,
-0.3719942271709442,
0.10807055234909058,
-0.01246928982436657,
-0.4807352125644684,
-0.06795606017112732,
-0.2870011031627655,
-0.2953907251358032,
0.6636882424354553,
-0.21946443617343903,
-0.026247546... | |
<td style="text-align: left">capabilities</td>
<td style="text-align: left">
<ul>
<li>Navigation,</li>
<li>message, and</li>
<li>contacts</li> | [
-0.030754603445529938,
-0.3851574659347534,
0.6102122068405151,
0.015501241199672222,
-0.12326736003160477,
0.24817727506160736,
0.07785031944513321,
-0.4271702468395233,
-0.1411830633878708,
-0.8103129267692566,
-0.3576047122478485,
0.7216001749038696,
-0.2493779957294464,
-0.306089311838... | |
</ul>
</td>
</tr>
<tr xmlns="">
<td style="text-align: left">Data</td>
<td style="text-align: left">
<p>Here visit google for more info <a href="http://www.google.com" target="_blank"><font color="#0033cc">www.google.com</font></a>.</p>
<p>Remo... | [
0.02391909249126911,
-0.1527218222618103,
0.7542250156402588,
0.011289579793810844,
-0.27251988649368286,
0.11220305413007736,
-0.08052468299865723,
-0.6632660627365112,
-0.09131636470556259,
-0.4638516902923584,
-0.5796336531639099,
0.4109501242637634,
-0.28512057662010193,
0.096644379198... | |
<a href="/abc/def/{T}/t/1" target="_blank">Information</a> remove the tag.</p>
</td>
</tr>
</tbody>
</table>
<p xmlns=""><br/>
</p>
]]>
```
I want to some how scan for href="/abc/def and remove the href tag which starts with abc/def. In above example remove the href tag and just leave "Info... | [
0.49043017625808716,
0.005050350446254015,
0.23856587707996368,
-0.0034650093875825405,
-0.0032551323529332876,
-0.26197537779808044,
0.1319396048784256,
-0.5387365221977234,
0.029920946806669235,
-0.8444005250930786,
-0.2419474571943283,
0.6390591263771057,
-0.3267466127872467,
0.06439078... | |
or is there a way to do it with xml itself?
This is the regex i am trying:
```
"<a href=\"/abc/def/.*></a>"
```
I want to keep inner text of the a href tag just remove the tags. But above regex is not working.
Using [HtmlAgilityPack](http://html-agility-pack.net/?z=codeplex)
```
HtmlAgilityPack.HtmlDocument doc = ... | [
-0.09570696949958801,
-0.27062591910362244,
0.8169344067573547,
-0.19694125652313232,
0.02670348435640335,
-0.025160470977425575,
0.1982380896806717,
-0.5878190398216248,
-0.09266474097967148,
-0.5839236974716187,
-0.26256299018859863,
0.616969645023346,
-0.4735448658466339,
-0.08357036113... | |
I have a form where I have a `rich:select` whether they choose option A or option B an `h:inputText` is rendered.
Initially the `h:inputText` corresponding to option A is rendered and if I leave it blank the `requiredMessage` appears and everything is OK.
Now when I select the second option of the `rich:select` the `h:... | [
0.05959664657711983,
-0.05113527923822403,
0.6604031324386597,
-0.2363797277212143,
-0.06382318586111069,
0.002654867945238948,
0.30327850580215454,
-0.1516166627407074,
-0.0701562762260437,
-0.8315489292144775,
-0.4481153190135956,
0.7090682983398438,
-0.2822820544242859,
-0.0833524540066... | |
<h:outputLabel for="tipoPersona">Tipo de persona</h:outputLabel>
<rich:select id="tipoPersona"
required="true" value="#{userInformationController.tipoPersona}" | [
-0.10883220285177231,
-0.19753305613994598,
0.5160658359527588,
0.30238109827041626,
0.06459221988916397,
-0.10046698153018951,
0.21987788379192352,
-0.4785842001438141,
-0.14059890806674957,
-0.26652246713638306,
-0.47077980637550354,
0.6738598942756653,
0.0527806282043457,
-0.44929978251... | |
requiredMessage="Seleccione el tipo de persona"
defaultLabel="Seleccione una opción">
<f:selectItems value="#{userInformationController.tipoPersonaOpciones}"/>
<f:ajax event="blur" render="tipoPersonaMessage"/> | [
-0.05463284254074097,
-0.5044419169425964,
0.7334640026092529,
0.37268197536468506,
0.11698183417320251,
-0.2881300747394562,
0.38965678215026855,
-0.47982853651046753,
-0.08175449818372726,
-0.4141222834587097,
-0.5296437740325928,
0.791394829750061,
0.1662033051252365,
-0.668993413448333... | |
<f:ajax event="selectitem"
render="outputLabelCURP inputTextCURP messageCURP outputLabelRFC inputTextRFC messageRFC"
listener="#{userInformationController.doRenderCURP}"/> | [
-0.4870680570602417,
-0.06135810911655426,
0.30997154116630554,
-0.37002354860305786,
-0.2402004897594452,
0.09633520990610123,
0.42365798354148865,
-0.17212705314159393,
0.014429859817028046,
-0.6679980158805847,
-0.2754994034767151,
0.559398889541626,
-0.19136498868465424,
-0.12562397122... | |
</rich:select>
<rich:message id="tipoPersonaMessage" ajaxRendered="true"
for="tipoPersona"/>
<a4j:outputPanel id="outputLabelCURP"> | [
-0.20855699479579926,
-0.25148284435272217,
0.19738657772541046,
0.26119035482406616,
-0.06303108483552933,
0.01756233721971512,
0.3663391172885895,
-0.31325286626815796,
-0.3617742657661438,
-0.3181091248989105,
-0.32646942138671875,
0.4214920401573181,
0.003622535616159439,
-0.6917737722... | |
<h:outputLabel for="CURP" value="CURP"
rendered="#{userInformationController.curpRendered}"/>
</a4j:outputPanel> | [
-0.05455024167895317,
-0.05442661792039871,
0.35112202167510986,
-0.0988679900765419,
0.04579534754157066,
0.14895112812519073,
-0.1881350874900818,
-0.18652527034282684,
-0.2924823760986328,
-0.5121374130249023,
-0.5089434385299683,
0.4164849519729614,
-0.07493902742862701,
-0.04254123196... | |
<a4j:outputPanel id="inputTextCURP">
<h:inputText id="CURP" required="true"
requiredMessage="Introduzca el CURP" | [
0.010648323222994804,
-0.05108419433236122,
0.43412140011787415,
-0.08758679032325745,
-0.013173654675483704,
0.034157268702983856,
-0.32001110911369324,
0.21032576262950897,
-0.01929195038974285,
-0.07034668326377869,
-0.4440086781978607,
0.6189913153648376,
-0.0844692662358284,
-0.244719... | |
rendered="#{userInformationController.curpRendered}">
<f:ajax event="blur" render="curpMessage"/>
</h:inputText>
</a4j:outputPanel> | [
-0.4483158588409424,
-0.24770882725715637,
0.4845851957798004,
-0.19362454116344452,
-0.13180194795131683,
0.2762815058231354,
0.1893073320388794,
0.01375301368534565,
-0.07461076974868774,
-0.6306496262550354,
-0.4242050051689148,
0.6193174123764038,
-0.1374904364347458,
-0.40297260880470... | |
<a4j:outputPanel id="messageCURP">
<rich:message id="curpMessage" ajaxRendered="true"
for="CURP" | [
-0.2638632357120514,
-0.22799931466579437,
0.02452090196311474,
-0.04672374948859215,
-0.017622189596295357,
0.06262630969285965,
0.22557374835014343,
0.2217455357313156,
-0.4152006208896637,
-0.5106105804443359,
-0.14976277947425842,
0.52354496717453,
-0.1274796426296234,
-0.2972175776958... | |
rendered="#{userInformationController.curpRendered}"/>
</a4j:outputPanel>
<a4j:outputPanel id="outputLabelRFC">
<h:outputLabel for="RFC" value="RFC" | [
-0.17440050840377808,
-0.014450146816670895,
0.37851572036743164,
-0.28037363290786743,
0.05397050455212593,
0.12747745215892792,
0.10765537619590759,
-0.15690141916275024,
-0.19340699911117554,
-0.8016250729560852,
-0.5710617303848267,
0.35757455229759216,
-0.1410478949546814,
-0.19307327... | |
rendered="#{not userInformationController.curpRendered}"/>
</a4j:outputPanel>
<a4j:outputPanel id="inputTextRFC">
<h:inputText id="RFC" required="true" | [
-0.22931432723999023,
-0.05228058993816376,
0.47416338324546814,
-0.21155712008476257,
0.10780629515647888,
0.19726458191871643,
0.3311851918697357,
-0.22909928858280182,
-0.0027213175781071186,
-0.6393063068389893,
-0.6503661274909973,
0.5450484752655029,
-0.00901020411401987,
-0.47074177... | |
requiredMessage="Introduzca el RFC"
rendered="#{not userInformationController.curpRendered}">
<f:ajax event="blur" render="rfcMessage"/> | [
-0.11596837639808655,
-0.2647133767604828,
0.43309053778648376,
0.08071698248386383,
-0.034021809697151184,
-0.3372870683670044,
0.3560597896575928,
-0.270626038312912,
0.1300291270017624,
-0.7546348571777344,
-0.4268847107887268,
0.7560177445411682,
-0.21884475648403168,
-0.38833257555961... | |
</h:inputText>
</a4j:outputPanel>
<a4j:outputPanel id="messageRFC">
<rich:message id="rfcMessage" ajaxRendered="true" | [
-0.13982802629470825,
0.13838821649551392,
0.0517297200858593,
-0.059511858969926834,
-0.18936924636363983,
-0.18934810161590576,
0.38684117794036865,
0.05318523943424225,
-0.25670862197875977,
-0.558595597743988,
-0.2018885463476181,
0.5509071946144104,
-0.15618810057640076,
-0.3923906087... | |
for="RFC"
rendered="#{not userInformationController.curpRendered}"/>
</a4j:outputPanel>
</h:panelGrid>
```
**UPDATE**
I have | [
0.318268746137619,
0.10525254160165787,
0.5586723685264587,
-0.17458795011043549,
0.0903802439570427,
-0.0655442327260971,
0.07407129555940628,
-0.47985708713531494,
-0.01905190385878086,
-0.8508362174034119,
-0.014840764924883842,
0.5241380929946899,
0.1657651960849762,
0.0098379347473382... | |
made some changes on the UI and now I have this
```
<fieldset>
<legend>Datos SURI</legend>
<h:panelGrid columns="3">
<h:outputLabel for="tipoPersona">Tipo de persona</h:outputLabel>
<rich:select | [
-0.22709263861179352,
-0.3537313640117645,
1.0620919466018677,
-0.06902759522199631,
-0.2584257423877716,
0.11557526141405106,
0.0844445675611496,
-0.5058150887489319,
-0.2790796458721161,
-0.5883868932723999,
0.13747496902942657,
0.617491602897644,
0.21678215265274048,
-0.318761944770813,... | |
id="tipoPersona"
required="true" value="#{userInformationController.tipoPersona}"
requiredMessage="Seleccione el tipo de persona" | [
0.17547544836997986,
-0.4044724404811859,
0.5859262943267822,
0.3388976752758026,
0.209258571267128,
-0.317367285490036,
0.2630087435245514,
-0.5009875893592834,
-0.15736307203769684,
-0.13738326728343964,
-0.23576070368289948,
0.6903681755065918,
0.08469104766845703,
-0.472044974565506,
... | |
defaultLabel="Seleccione una opción">
<f:selectItems value="#{userInformationController.tipoPersonaOpciones}"/>
<f:ajax event="blur" render="tipoPersonaMessage"/>
<f:ajax event="selectitem" | [
-0.4393164813518524,
-0.5539589524269104,
0.6263823509216309,
0.2731267809867859,
0.23022282123565674,
-0.1349756419658661,
0.08370395749807358,
-0.06170281395316124,
-0.27291885018348694,
-0.5800843834877014,
-0.5750733017921448,
0.7551753520965576,
0.0400930717587471,
-0.6602272987365723... | |
render="outputLabelCURP inputTextCURP messageCURP
outputLabelRFC inputTextRFC messageRFC
datosPersonaFisica | [
-0.4061347544193268,
-0.0786350816488266,
0.524627149105072,
-0.3385714888572693,
-0.35184043645858765,
0.28058815002441406,
0.36032068729400635,
-0.3536646366119385,
0.23967204988002777,
-0.8087989091873169,
-0.2663557231426239,
0.5479893088340759,
-0.24739384651184082,
-0.166433677077293... | |
datosPersonaMoral"
listener="#{userInformationController.doRenderTipoPersona}"/>
</rich:select>
<rich:message id="tipoPersonaMessage" ajaxRendered="true" | [
-0.08069121837615967,
-0.2999824583530426,
0.4191540479660034,
0.055953286588191986,
0.03389235958456993,
-0.2613154649734497,
0.7222200632095337,
-0.5095495581626892,
0.06811105459928513,
-0.4045562148094177,
-0.23958632349967957,
0.6672519445419312,
0.03744394704699516,
-0.43700501322746... | |
for="tipoPersona"/>
<a4j:outputPanel id="outputLabelCURP">
<h:outputLabel for="CURP" value="CURP"
rendered="#{userInformationController.personaFisicaRendered}"/> | [
-0.18315798044204712,
-0.4289562702178955,
0.5654581785202026,
0.1499672383069992,
0.04092736169695854,
0.13696643710136414,
0.24104826152324677,
-0.3312741219997406,
-0.297877699136734,
-0.3345789909362793,
-0.2457488775253296,
0.5893765091896057,
-0.027441492304205894,
-0.339513987302780... | |
</a4j:outputPanel>
<a4j:outputPanel id="inputTextCURP">
<h:inputText id="CURP" required="true" | [
-0.10990576446056366,
0.13427124917507172,
0.27508121728897095,
-0.20282842218875885,
-0.06751642376184464,
0.26957079768180847,
0.011539055965840816,
-0.13255803287029266,
-0.14993515610694885,
-0.35510140657424927,
-0.5781427025794983,
0.4604375660419464,
-0.04648517817258835,
-0.4800319... | |
requiredMessage="Introduzca el CURP"
value="#{userInformationController.curp}"
rendered="#{userInformationController.personaFisicaRendered}"> | [
-0.014752332121133804,
-0.2647392153739929,
0.5528061985969543,
0.32457202672958374,
0.2193608582019806,
-0.14976219832897186,
0.1363859325647354,
-0.1545662134885788,
0.09605428576469421,
-0.41706201434135437,
-0.2621556222438812,
0.7144371867179871,
-0.05595077946782112,
-0.0531794987618... | |
<f:ajax event="blur" render="curpMessage identificadorSURI"
listener="#{userInformationController.doSearchIdSURI}"/>
</h:inputText> | [
0.0548572838306427,
-0.024370530620217323,
0.25152862071990967,
0.12580788135528564,
-0.322923481464386,
-0.12190444022417068,
0.21152810752391815,
-0.1911463588476181,
0.26358118653297424,
-0.4722681939601898,
-0.4494963586330414,
0.657756507396698,
-0.17137247323989868,
-0.18483702838420... | |
</a4j:outputPanel>
<a4j:outputPanel id="messageCURP">
<rich:message id="curpMessage" ajaxRendered="true" for="CURP"
rendered="#{userInformationController.personaFisicaRendered}"/> | [
-0.4468134045600891,
-0.24714699387550354,
0.10579615831375122,
-0.027587395161390305,
-0.09071440994739532,
0.14639633893966675,
0.3586800992488861,
0.21564365923404694,
-0.3541809320449829,
-0.5511149168014526,
-0.21880988776683807,
0.6620652079582214,
-0.10140915215015411,
-0.2467385828... | |
</a4j:outputPanel>
<a4j:outputPanel id="outputLabelRFC">
<h:outputLabel for="RFC" value="RFC" | [
0.03068838268518448,
0.3819734752178192,
-0.02863411232829094,
-0.19004778563976288,
-0.09344518929719925,
-0.02451241947710514,
-0.05649109184741974,
-0.1367291957139969,
-0.35461390018463135,
-0.5910258293151855,
-0.31068745255470276,
0.18201081454753876,
-0.2764010429382324,
-0.04326694... | |
rendered="#{userInformationController.personaMoralRendered}"/>
</a4j:outputPanel>
<a4j:outputPanel id="inputTextRFC">
<h:inputText id="RFC" required="true" | [
-0.23501595854759216,
-0.2914063632488251,
0.5844694972038269,
-0.15973196923732758,
0.03932151943445206,
0.20108138024806976,
0.5718005299568176,
-0.1993451714515686,
-0.12405650317668915,
-0.3869325816631317,
-0.4141581952571869,
0.7642650604248047,
-0.2219237983226776,
-0.33211737871170... | |
requiredMessage="Introduzca el RFC"
value="#{userInformationController.rfc}"
rendered="#{userInformationController.personaMoralRendered}"> | [
0.15004020929336548,
-0.10580447316169739,
0.4525681436061859,
0.14091843366622925,
0.08803331851959229,
-0.35523733496665955,
0.5326881408691406,
-0.39336520433425903,
0.11417891085147858,
-0.5176303386688232,
-0.28499504923820496,
0.5865371227264404,
-0.2879284620285034,
0.15640521049499... | |
<f:ajax event="blur" render="rfcMessage identificadorSURI"
listener="#{userInformationController.doSearchIdSURI}"/>
</h:inputText>
</a4j:outputPanel> | [
0.07136408984661102,
-0.04104522243142128,
0.11846737563610077,
0.012451738119125366,
-0.35309916734695435,
0.03362518176436424,
0.2175394892692566,
-0.175741046667099,
0.08648957312107086,
-0.5393766760826111,
-0.38527804613113403,
0.6219738125801086,
-0.170369952917099,
-0.23816080391407... | |
<a4j:outputPanel id="messageRFC">
<rich:message id="rfcMessage" ajaxRendered="true" for="RFC"
rendered="#{userInformationController.personaMoralRendered}"/>
</a4j:outputPanel> | [
-0.26050856709480286,
-0.22120216488838196,
0.27562475204467773,
-0.07851812243461609,
-0.1732027530670166,
0.08553693443536758,
0.6110711693763733,
-0.01129396166652441,
-0.405685156583786,
-0.17360997200012207,
-0.04246728867292404,
0.753420352935791,
-0.31853970885276794,
-0.23081435263... | |
<h:outputLabel for="identificadorSURI">Identificador SURI</h:outputLabel>
<h:inputText id="identificadorSURI" disabled="true"
value="#{userInformationController.identificadorSuri}"/>
</h:panelGrid> | [
-0.23786544799804688,
0.12531177699565887,
0.4970555901527405,
0.5148120522499084,
-0.27030399441719055,
-0.024198446422815323,
-0.23723597824573517,
-0.0314159020781517,
-0.22323615849018097,
-0.49814456701278687,
-0.31452932953834534,
0.5702911019325256,
0.06682150065898895,
-0.191401392... | |
</fieldset>
```
However, I found that putting my Bean in **RequestScope** isn't firing the listener on both of the `h:inputText` (id='CURP' and id='RFC'), whereas if I put the bean in **ViewScope** the listener is getting fired and processed correctly.
What I need is to actually have the Bean in RequestScope because... | [
0.4715493321418762,
0.18520484864711761,
0.32648393511772156,
-0.04680952802300453,
-0.16109336912631989,
-0.15457864105701447,
0.0028735119849443436,
-0.36994776129722595,
-0.2766411304473877,
-0.6858607530593872,
0.10722606629133224,
0.656522810459137,
-0.5370156168937683,
0.082293339073... | |
select.
Can someone explain to me why is this happening? I could'n figure out what's the trick !
Cheers
A request scoped bean is recreated on every single request, also on every single ajax request. So when you change a property by ajax to a new value other than default (e.g. the one responsible for `rendered` attrib... | [
0.01601460948586464,
-0.06542930752038956,
0.6709818243980408,
-0.013690262101590633,
-0.2542511224746704,
0.04951878637075424,
0.15070471167564392,
-0.27377304434776306,
-0.13028058409690857,
-0.6225236058235168,
-0.0442509688436985,
0.6286714673042297,
-0.03457434102892876,
-0.1563139557... | |
long as you're interacting with the same view by ajax requests, until you navigate away to a different view or recreate the view. As to the functional requirement of recreating the form on change of `<rich:select>`, just do that inside the `doRenderTipoPersona()` method.
If you really need to stick to the request scop... | [
0.12430024892091751,
-0.2041822075843811,
0.39548197388648987,
-0.04041009396314621,
-0.1802396923303604,
-0.3413991630077362,
0.2681846618652344,
0.15858997404575348,
-0.2198059856891632,
-0.8818795680999756,
-0.25439897179603577,
0.6439831852912903,
-0.054051827639341354,
-0.120183996856... | |
If I wanted the "follow button" to display, "Follow + username" (with username being an instance variable for each different user), what would be a good way to accomplish this?
```
<div class="actions"><%= f.submit "Follow, <%= @user.name %>" %></div>
```
Thanks!
You can use *string interpolation*, which replace... | [
0.1288725584745407,
-0.22234374284744263,
0.3699995279312134,
-0.04435470327734947,
0.07354030758142471,
-0.1405796855688095,
0.44741350412368774,
-0.34803229570388794,
-0.055243413895368576,
-0.15203528106212616,
0.14149847626686096,
0.5264132618904114,
-0.5244859457015991,
-0.22614362835... | |
So I have a piece of code:
```
jQuery.fn.center = function(parent) {
parent = this.parent();
this.css({
"position": "absolute",
"top": ((($(parent).height() - this.outerHeight()) / 2) + $(parent).scrollTop() + "px"),
"left": ((($(parent).width() - this.outerWidth()) / 2) + $(parent).scrollLeft() + "px")
});
return th... | [
0.03435957804322243,
-0.06012490391731262,
0.5161505341529846,
-0.014834420755505562,
0.20899556577205658,
0.05070684105157852,
-0.12859848141670227,
-0.14275722205638885,
-0.08246731758117676,
-0.6833347678184509,
0.03856392204761505,
0.15147662162780762,
0.09641801565885544,
0.3957005739... | |
may have been doing it wrong, or if there is a better way.
2. I need it to move back to the position it was in. The way this works, is the block is gonna be positioned on the page (via CSS), and when the user clicks, it moves it to the center of the page, as the code is already doing. Is there any way that, if a user c... | [
0.14424119889736176,
-0.31640011072158813,
0.444704532623291,
0.1077665165066719,
-0.019823579117655754,
-0.16062331199645996,
-0.03453458473086357,
-0.021827714517712593,
-0.228459894657135,
-0.6836666464805603,
-0.06368999928236008,
0.3217494487762451,
-0.1893833428621292,
0.094446025788... | |
is more for aesthetics, and i don't deem it necessary, but would like it if you have a little extra time. I would like the block to slide from it's position to the center of the page, and back, as opposed to just popping there. As I stated, this is just aesthetics and i really don't need that to happen.
Much appreciat... | [
0.4135567843914032,
-0.2963344156742096,
0.39702340960502625,
0.15854401886463165,
-0.20361043512821198,
-0.0879402756690979,
-0.3156030476093292,
-0.14765648543834686,
-0.013986916281282902,
-0.7692798972129822,
0.1289490908384323,
-0.013522153720259666,
0.08779836446046829,
-0.1639886051... | |
A z index
> more or less. I tried to apply a z-index, but it didn't seem to work.
> I dunno if I may have been doing it wrong, or if there is a better
> way.
I always use z-index in range of 1001 or greater for such cases. Even in the demo, it works fine. Try this and let us know if you still not working for you.
... | [
0.3524479269981384,
-0.11581580340862274,
0.5423263311386108,
0.22565574944019318,
-0.09413480013608932,
-0.032953739166259766,
-0.039987705647945404,
0.14941392838954926,
-0.0818929672241211,
-0.9068558216094971,
0.10490487515926361,
0.24835927784442902,
-0.194621741771698,
0.073474958539... | |
when
> the user clicks, it moves it to the center of the page, as the code is
> already doing. Is there any way that, if a user clicks an exit button,
> I can program said button to move it back to where it originally was?
> i don't know if I can pass variables around in jQuery.
I stored the original position of t... | [
-0.13263000547885895,
-0.1673513650894165,
0.5351447463035583,
-0.050075747072696686,
0.05729757249355316,
0.0544125959277153,
0.11819200217723846,
-0.20773597061634064,
0.004311179742217064,
-0.6777299642562866,
0.04702841863036156,
0.46970757842063904,
-0.18045949935913086,
0.00762786762... | |
it if you have a little extra time. I would like the block
> to slide from it's position to the center of the page, and back, as
> opposed to just popping there. As I stated, this is just aesthetics
> and i really don't need that to happen.
You can use `.animate` instead of CSS which will transcend the element from... | [
0.13861672580242157,
-0.17209097743034363,
0.15073822438716888,
0.12540005147457123,
-0.08177376538515091,
-0.023783134296536446,
0.21151310205459595,
0.015945054590702057,
0.1540125012397766,
-0.8719959855079651,
-0.19257484376430511,
0.3233781158924103,
-0.0695650726556778,
-0.0807982087... | |
I am facing a deadlock problem from a PL/pgSQL function in my PostgreSQL database. Please find the SQL statement in the code block (just example):
```
BEGIN
UPDATE accounts SET balance = 0 WHERE acct_name like 'A%';
UPDATE accounts SET balance = balance + 100 WHERE acct_name like '%A';
EXCEPTION WHEN OTHERS THEN RAISE... | [
0.13083656132221222,
0.26939189434051514,
0.378481388092041,
-0.17217908799648285,
-0.09931381046772003,
0.12031953781843185,
0.23175467550754547,
0.08210651576519012,
-0.4104570150375366,
-0.4324026107788086,
0.21346186101436615,
0.5221228003501892,
-0.1136547103524208,
0.2441725879907608... | |
as I know, if we blocked whole statement with `BEGIN`/`END`. There will be the same transaction and should not be locked by itself.
There is definitely **some other process** competing for the same resource. That is the nature of a deadlock. A function like you display can never deadlock itself. See [comment by @kgritt... | [
0.26456186175346375,
0.11457314342260361,
-0.05338673293590546,
0.04030075669288635,
-0.19389501214027405,
-0.1990959644317627,
0.3102862238883972,
0.0197363942861557,
-0.5706596374511719,
-0.138467937707901,
0.09468585252761841,
0.45736488699913025,
-0.18179984390735626,
0.427940785884857... | |
Postgres from giving you the full details. Remove the **EXCEPTION** block from your plpgsql function, if you don't get the information in the db log and try again.
To alleviate deadlocks, you can do a number of things. If all your clients access resources in a synchronized order, deadlocks cannot occur. The manual pro... | [
0.1567421406507492,
0.07975954562425613,
0.43991345167160034,
0.04163522273302078,
-0.13159500062465668,
-0.1594509780406952,
0.523492157459259,
-0.06104958802461624,
-0.13313812017440796,
-0.5532708168029785,
-0.28125035762786865,
0.750253438949585,
-0.4076148271560669,
0.0237929876893758... | |
queries involved in
> the deadlock to the server log (Itagaki Takahiro)
Also, version 8.3 will meet its [end of life in February 2013](http://www.postgresql.org/support/versioning/). You should start to consider upgrading.
A deadlock situation involving `VACUUM` should have been [fixed in 8.3.1](http://www.postgresq... | [
-0.058628614991903305,
0.16333593428134918,
0.6035042405128479,
0.1480986475944519,
-0.07545213401317596,
-0.07618554681539536,
0.37865304946899414,
0.026453208178281784,
-0.31387144327163696,
-0.2539205551147461,
-0.2453290820121765,
0.5880928635597229,
-0.024379657581448555,
0.3397436141... | |
I've looked through a lot of questions here for something similar and there are quite a few, albeit with one minor change. I'm trying to sort values with a zip\_iterator as a compound key.
Specifically, I have the following function:
```
void thrustSort(
unsigned int * primaryKey,
float * secondaryKey,
u... | [
-0.04948069900274277,
-0.06156715378165245,
0.9339591264724731,
-0.15665340423583984,
-0.18367603421211243,
0.46568819880485535,
-0.025618497282266617,
-0.6596319675445557,
0.021681228652596474,
-0.5995088815689087,
-0.10165352374315262,
0.5899738073348999,
0.23216192424297333,
0.051316924... | |
thrust::make_tuple,thrust::device_ptr>(dev_ptr_pkey, dev_ptr_skey);
thrust::zip_iterator, thrust::device_ptr > > first =
thrust::make_zip_iterator, thrust::device_ptr > >(keytup_begin);
thrust::sort_by_key(first, first + numberOfPoints, dev_ptr_values, ZipComparator());
}
```
and this custom pre... | [
-0.4405735433101654,
-0.10978783667087555,
1.095682144165039,
-0.26221174001693726,
-0.07203848659992218,
0.45954689383506775,
0.1285434514284134,
-0.6069955229759216,
0.06787163019180298,
-0.49558258056640625,
-0.5798566341400146,
0.6703862547874451,
0.15011325478553772,
0.198955923318862... | |
return false;
}
};
```
The errors I'm getting are:
```
Error 1 error : no instance of constructor "thrust::device_ptr::device_ptr [with T=unsigned int]" matches the argument list C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include\thrust\detail\tuple.inl 309 1 ---
Error 2 error : no inst... | [
-0.19955947995185852,
0.28542912006378174,
0.38376033306121826,
0.17158477008342743,
-0.1847098469734192,
0.14137229323387146,
0.5140730142593384,
-0.5473989248275757,
0.2550296187400818,
-0.6809178590774536,
-0.11139292269945145,
0.8190783262252808,
-0.20590893924236298,
-0.16118869185447... | |
The `const tdp_uif_tuple&` type you defined expands to `const thrust::tuple<thrust::device_ptr<unsigned int>, thrust:device_ptr<float> >&`
The code below compiles for me:
```
struct ZipComparator
{
__host__ __device__
inline bool operator() (const thrust::tuple<unsigned int, float> &a, const thrust::tuple<uns... | [
-0.0457661971449852,
-0.24591517448425293,
1.2041058540344238,
-0.1962612271308899,
-0.03704705089330673,
0.24133001267910004,
-0.007636002264916897,
-0.3338130712509155,
0.04393379017710686,
-0.4204392433166504,
-0.2773115038871765,
0.5114239454269409,
-0.1997421532869339,
-0.036522511392... | |
you're looking to clean up the length of those templates, you can do this:
```
void thrustSort(
unsigned int * primaryKey,
float * secondaryKey,
unsigned int * values,
unsigned int numberOfPoints)
{
tdp_uint dev_ptr_pkey(primaryKey);
tdp_float dev_ptr_skey(secondaryKey);
tdp_uint dev_ptr... | [
0.20492246747016907,
-0.2110634744167328,
0.5018673539161682,
-0.135200634598732,
-0.1720750778913498,
0.2790066599845886,
0.16795483231544495,
-0.8247388601303101,
0.003543397644534707,
-0.593797504901886,
-0.24254390597343445,
0.3932197093963623,
-0.038981493562459946,
0.0478431768715381... | |
inferred from the arguments. | [
0.1555812507867813,
0.13720808923244476,
0.07100914418697357,
0.14901010692119598,
-0.005231058690696955,
0.23638375103473663,
0.17268505692481995,
-0.03401978313922882,
0.08311174809932709,
0.003648937912657857,
-0.010495162568986416,
0.2458203136920929,
0.11285033822059631,
0.04773640260... | |
I am using restkit to post the create action to my rails application from mu ipad application. I Create the mapping for attributes :
```
- (void) initCustomerMapping
{
RKObjectMapping *customerSerializationMapping = [RKObjectMapping mappingForClass:[NSMutableDictionary class]];
[customerSerializationMapping ... | [
-0.07175414264202118,
0.09648788720369339,
0.5119906663894653,
-0.2516484260559082,
0.07141345739364624,
0.4833872318267822,
0.10377023369073868,
-0.37117981910705566,
0.12104084342718124,
-0.9701299667358398,
-0.19939637184143066,
0.5061542987823486,
-0.09957893192768097,
-0.1254992187023... | |
[customerSerializationMapping mapKeyPath:@"city" toAttribute:@"city"];
[[RKObjectManager sharedManager].mappingProvider setSerializationMapping:customerSerializationMapping forClass:[Customer class]];
}
```
And i send the request :
```
Customer* customer = [[Customer alloc] init];
customer.lastname =... | [
-0.09751246124505997,
-0.03571370989084244,
0.9541248679161072,
-0.13592186570167542,
0.1661989837884903,
0.34923872351646423,
-0.17514173686504364,
-0.4052828252315521,
-0.40389013290405273,
-0.564268171787262,
-0.5876331925392151,
0.28619590401649475,
-0.0025992817245423794,
0.0198277458... | |
"house_name"=>"test", "address_line_1"=>"test", "city"=>"test", "sci"=>"546", "firstname"=>"test", "lastname"=>"test", "address_line_2"=>"test", "postal_code"=>"75896"}
```
And i want to get :
```
{ "customer" =>
{"water_used"=>"710", "house_name"=>"test", "address_line_1"=>"test", "city"=>"test", "sci"=>... | [
0.18279677629470825,
-0.0046495432034134865,
0.9036675095558167,
-0.018520671874284744,
0.3232654631137848,
0.21489764750003815,
-0.0687796100974083,
-0.5250730514526367,
-0.13890796899795532,
-0.7356049418449402,
-0.26145610213279724,
0.3518729507923126,
-0.20193485915660858,
0.3081434667... | |
[customerSerializationMapping mapKeyPath:@"firstname" toAttribute:@"customer[firstname]"];
[customerSerializationMapping mapKeyPath:@"house_name" toAttribute:@"customer[house_name]"];
[customerSerializationMapping mapKeyPath:@"sci" toAttribute:@"customer[sci]"];
[customerSerializationMapping mapKeyPath:@... | [
-0.16241683065891266,
0.04858602583408356,
0.6681807041168213,
-0.12490732967853546,
0.29719120264053345,
0.3662411570549011,
-0.16949693858623505,
-0.3922869861125946,
-0.26464587450027466,
-0.7036212086677551,
-0.2956088185310364,
0.2950376570224762,
0.23754078149795532,
-0.0653980150818... | |
Because codenameone can not use external libraries (HttpConnection) then I have to use the internal library / API provided Codenameone, it's just that I've managed to post the data to format text / string by using ConnectionRequest, I want to know is there any way to post the data in the form of an image with using Con... | [
0.2854321599006653,
-0.09887871146202087,
0.43019068241119385,
0.1394057422876358,
-0.04635339230298996,
-0.18873514235019684,
0.4179290533065796,
0.0732554942369461,
-0.2897976338863373,
-1.1593056917190552,
-0.052665360271930695,
0.4894956648349762,
-0.26328179240226746,
0.40926989912986... | |
myrequest.setUrl("http://www.xxxx.com/mobile/login/");
myrequest.setPost(true);
myrequest.addArgument("email", "info@xxx.net"); | [
0.25524047017097473,
-0.016712330281734467,
0.5656945109367371,
0.24452371895313263,
-0.11842851340770721,
-0.055834975093603134,
0.27910664677619934,
0.14758560061454773,
-0.09520513564348221,
-0.5498837828636169,
-0.4425494968891144,
0.1808626502752304,
-0.3692329525947571,
0.02884334325... | |
myrequest.addArgument("password", "xxx");
myrequest.setPriority(ConnectionRequest.PRIORITY_CRITICAL); | [
-0.6228266358375549,
-0.1766020804643631,
0.33169475197792053,
0.31528595089912415,
0.38295504450798035,
-0.061849649995565414,
0.404606431722641,
0.2347143292427063,
-0.27690136432647705,
-0.6353095769882202,
-0.3944631516933441,
0.44570836424827576,
-0.3752160668373108,
0.527954041957855... | |
NetworkManager.getInstance().addToQueue(myrequest);
myrequest.addResponseListener(new ActionListener() {
@Override | [
-0.18747487664222717,
-0.6305602192878723,
0.501829206943512,
0.02799372561275959,
0.26836320757865906,
-0.08362463861703873,
0.6584712266921997,
-0.3646533489227295,
-0.5352483987808228,
-0.7029170393943787,
-0.17996369302272797,
0.5385192632675171,
-0.6048682332038879,
0.0944929346442222... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.