text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
My issue is nearly identical to [this question](https://stackoverflow.com/questions/8227825/android-x86-porting-unable-to-make-it-work). I tried those solution and none worked. But I am using a different Android x86 image. I'm using the ICS (4.0-RC1) asus\_laptop image. (I tried a different image previously and couldn'... | [
-0.1334884911775589,
0.2672920525074005,
0.6483793258666992,
0.018182797357439995,
0.20774313807487488,
0.18706056475639343,
0.3136807680130005,
-0.20206594467163086,
-0.43568214774131775,
-0.6280107498168945,
-0.28735658526420593,
0.7868102788925171,
-0.2831522226333618,
0.175172045826911... | |
ICS x86 on VirtualBox with Internet Connection](https://stackoverflow.com/questions/9847285/android-ics-x86-on-virtualbox-with-internet-connection)
* <http://groups.google.com/group/android-x86/browse_thread/thread/30fa23d81cddfab1/2e480f6b9cbf773d>
* [How to setup network for Android Honeycomb in VirtualBox?](https://... | [
-0.15384799242019653,
0.16037939488887787,
0.4634525179862976,
0.13178583979606628,
0.01260549295693636,
-0.03518161177635193,
0.09026679396629333,
-0.10191202163696289,
-0.3024812638759613,
-0.8502010703086853,
-0.20798759162425995,
0.49638646841049194,
-0.2737516164779663,
0.152328342199... | |
I don't know if this is a proper question here.
As we know, in the CAP theorem, "A" means "Availability". On [wikipedia](http://en.wikipedia.org/wiki/CAP_theorem), the explanation of "Availability" is:
```
Availability: a guarantee that every request receives a response about whether it was successful or failed
```... | [
-0.11547127366065979,
0.16595430672168732,
0.58465176820755,
0.2562171518802643,
0.3079374432563782,
0.08508643507957458,
0.22636595368385315,
0.15654008090496063,
-0.4472648501396179,
-0.43207669258117676,
-0.18667317926883698,
0.33527517318725586,
-0.1945391595363617,
0.5265193581581116,... | |
that no system could satisfy the 3 requirements simultaneously. My question is, if a system claims to satisfy both "A" and "P", what is the accurate meaning of this "A"? 6'9' or even higher?
I recommend that you avoid Wikipedia and instead read the definition as provided in the proof by [Gilbert and Lynch](https://user... | [
0.05021299049258232,
0.3274945914745331,
0.10382208228111267,
-0.11691013723611832,
-0.20650044083595276,
0.3052034378051758,
0.44184866547584534,
-0.48323917388916016,
-0.33263468742370605,
-0.013492577709257603,
-0.3154342472553253,
0.3476065397262573,
-0.47484248876571655,
0.14008298516... | |
failures occur, for simplicity we are requiring
> 100% availability"
So if almost all requests receive a response or we allow for arbitrary failures to occur, a system can be considered to have high availability. | [
0.0031027935910969973,
0.1521759182214737,
0.23417694866657257,
0.2816804349422455,
0.21425282955169678,
-0.20727135241031647,
0.5745302438735962,
0.32176995277404785,
-0.23049230873584747,
-0.4892527461051941,
-0.41390082240104675,
0.5865497589111328,
-0.3209940493106842,
-0.0089730313047... | |
I'm dealing with a [replacement character](http://www.fileformat.info/info/unicode/char/fffd/index.htm) inside a MySQL database... and it's fine if it stays there but I'm trying to edit it. My form displays the character as a diamond shape with a question mark in it (�). So I submit the form, I compare the data between... | [
0.3126736879348755,
0.19700053334236145,
0.4283435046672821,
0.0713503360748291,
0.14445647597312927,
0.07791563868522644,
0.0025990407448261976,
-0.1331579089164734,
-0.14854487776756287,
-0.33448803424835205,
-0.21521243453025818,
0.24272212386131287,
-0.15297043323516846,
0.320690453052... | |
thinks the string has changed-- which it has, but not really. I've tried to employ different methods of either turning the replacement character into the html entity equivalent from the database when it's being compared --it starts to turn another seemingly normal characters into another replacement character html enti... | [
0.28898024559020996,
-0.007639950141310692,
0.48642921447753906,
0.21052289009094238,
-0.1968400627374649,
0.017635950818657875,
0.3696865439414978,
0.08400624245405197,
-0.2892354726791382,
-0.4570881426334381,
0.03202226012945175,
0.6421425342559814,
-0.4209725856781006,
0.25634142756462... | |
� REPLACEMENT CHARACTER (U+FFFD) as it's decimal, numeric HTML Entitiy: `�`. Probably you're already outputting it that way to the browser?
However, if you expect the input to contain HTML entities, you need to decode them if you don't want to store them into your database as HTML. To decode numeric entities wi... | [
-0.017438098788261414,
0.05696827918291092,
0.6539701223373413,
-0.02320779860019684,
-0.20170865952968597,
0.40278688073158264,
0.008442975580692291,
-0.29086753726005554,
-0.08170472830533981,
-0.5041264891624451,
-0.325659841299057,
0.534236490726471,
-0.3410789668560028,
-0.06529375910... | |
for the webpage:
```
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
```
and for the form:
```
<form action="" method="post" accept-charset="utf-8">
```
good luck. | [
-0.17032426595687866,
0.14357513189315796,
0.8600754141807556,
-0.24870435893535614,
0.12814398109912872,
-0.1544533222913742,
0.5594522356987,
0.08888859301805496,
-0.02772548981010914,
-0.7290273904800415,
-0.45655569434165955,
0.6997513175010681,
0.047176092863082886,
-0.075958788394927... | |
How are function declarations handled?
```js
var abc = '';
if (1 === 0) {
function a() {
abc = 7;
}
} else if ('a' === 'a') {
function a() {
abc = 19;
}
} else if ('foo' === 'bar') {
function a() {
abc = 'foo';
}
}
a();
document.write(abc); //writes "foo" even though 'foo' !== 'bar'
```
This e... | [
0.3476369380950928,
0.03455878794193268,
0.2013840228319168,
-0.5598262548446655,
-0.21152007579803467,
0.044100187718868256,
0.3041202425956726,
-0.5843331813812256,
-0.12232023477554321,
-0.44074466824531555,
-0.3257618248462677,
0.8371480107307434,
-0.6271857023239136,
0.025334632024168... | |
nested inside of an `if` block as shown in the question. In non-strict mode, the results were unpredictable. Different browsers and engines implemented their own rules for how they would handle function declarations inside blocks.
As of 2018, many browsers support ECMAScript 2015 (ES2015) to the extent that [function ... | [
-0.28179097175598145,
-0.27897751331329346,
0.2825995981693268,
-0.02881988137960434,
-0.0838208869099617,
-0.26934611797332764,
0.341631680727005,
-0.4222061038017273,
-0.1531822830438614,
-0.25006869435310364,
-0.6161011457443237,
0.3933723568916321,
-0.4487536549568176,
-0.1802753955125... | |
in the global scope.
If you need to conditionally define a function, then you should use [function expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions#Constructor_vs._declaration_vs._expression). | [
0.07991934567689896,
-0.39561665058135986,
-0.04492602497339249,
0.03271779417991638,
0.009257803671061993,
-0.1608840674161911,
0.012452073395252228,
0.09163966029882431,
-0.2765013575553894,
-0.3359070122241974,
-0.3308427929878235,
0.5600070357322693,
-0.45021042227745056,
-0.1448736935... | |
This question might seem stupid, but I cannot find any instruction on how to roll back an evolution in Play 2.0. Google only finds pages which say that the "Downs" section of an evolution file is used for that and that's all. Any pointers or instructions will be appreciated.
The **Downs** part is mainly used to revert ... | [
0.3077292740345001,
0.005039009731262922,
0.4146105945110321,
-0.15377581119537354,
-0.1084289401769638,
0.13493001461029053,
0.022629335522651672,
-0.13242539763450623,
-0.043216999620199203,
-0.8347659707069397,
0.19470685720443726,
0.7389211654663086,
-0.29403021931648254,
-0.0268941652... | |
new 2.sql to ensure the database is in sync with the codebase.
As far as I know there is no way to trigger **Downs** by itself, as the purpose of an Evolution is to prepare the database to work with your code, and applying just one **Downs** step would leave the application in an inconsistent state with many potential... | [
0.24130475521087646,
-0.03948849439620972,
0.43438780307769775,
-0.11462947726249695,
-0.19285337626934052,
-0.11290296912193298,
0.40626540780067444,
-0.4528353810310364,
-0.21618740260601044,
-0.806865394115448,
0.056341540068387985,
0.7009318470954895,
-0.5924047827720642,
0.02711960673... | |
I've got a table `category` that links category numbers to category names.
e.g., 1-Fruit, 2-Vegetables, 3-Insects, 4-Cities etc...
I've got another table `item` that has items that belong to exactly one category. Each item has a unique id, the name and its category. e.g., 314-Pumpkin-(category)1
In short:
```
catego... | [
-0.07711897790431976,
0.34059613943099976,
0.23386721312999725,
-0.05027735233306885,
-0.329878032207489,
0.352481871843338,
-0.0008618514984846115,
-0.14861540496349335,
-0.6009224653244019,
-0.6063249111175537,
-0.21425950527191162,
0.18054500222206116,
-0.16397298872470856,
0.4773500561... | |
I want is a table which includes all categories (even those without actual items) and that lists the correct items underneath each category.
I can devise some cumbersome method to do what I want, but there must be a neat solution. How can I join the data from both tables in one call so that every category and every it... | [
0.28883984684944153,
0.04027681052684784,
0.38698896765708923,
0.08301539719104767,
-0.0705433264374733,
0.11392602324485779,
0.16346465051174164,
-0.41857773065567017,
-0.19636699557304382,
-0.3105981647968292,
-0.07693485915660858,
0.5890893340110779,
-0.22478698194026947,
0.097551062703... | |
success or error if it was called before the server thread execution had completed? The call to Sleep suspends the current server thread, so of course your response is going to take five seconds to come back.
The asynchronous part would apply to Javascript code that directly follows your ajax post. For example:
```
<... | [
0.23671068251132965,
-0.40203657746315,
0.5252214074134827,
-0.28041863441467285,
0.06751319766044617,
0.02491208165884018,
0.453492134809494,
-0.3603784143924713,
-0.14506828784942627,
-0.6145404577255249,
-0.07958606630563736,
0.6014823317527771,
-0.0318303182721138,
-0.16354024410247803... | |
url: "testservice.aspx/sampleService",
data: param,
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
error: function() {
alert("Error");
},
success: function(msg) {
alert("Success") | [
0.19181375205516815,
-0.11982598155736923,
0.31238240003585815,
-0.02374468743801117,
-0.05763836205005646,
0.11289625614881516,
0.30910253524780273,
0.04559391736984253,
-0.04300620034337044,
-0.33350884914398193,
-0.6058956384658813,
0.3222654163837433,
-0.256157785654068,
0.004807318560... | |
alert(msg.d)
}
});
alert('This alert is asynchronous! We do not know yet if the ajax call will be successful because the server thread is still sleeping.');
}); </script>
``` | [
-0.04132099449634552,
-0.36069950461387634,
0.3230734169483185,
-0.2405892014503479,
0.19559118151664734,
-0.4623921811580658,
0.5696130990982056,
0.3162150979042053,
-0.09548693150281906,
-0.7504913806915283,
-0.5330693125724792,
0.6648020148277283,
-0.3834722340106964,
0.1097217798233032... | |
I am using struts2 for my web application. Now for session management we are actually keeping the user id in session (i.e. the DB identifier) and while logging out we remove this user id from session object. Our session object (which encapsulates the user id) is implementing sessionaware interface and therefore i guess... | [
0.25795477628707886,
0.36114048957824707,
0.05278411880135536,
-0.15404734015464783,
-0.5447890758514404,
-0.4736386835575104,
0.7246292233467102,
-0.3466845154762268,
0.005945981480181217,
-0.5772952437400818,
0.1284010410308838,
0.5356124639511108,
-0.447491317987442,
0.32025304436683655... | |
which i am describing. So could someone please tell me if removing the user id from session is sufficient and if not then what kind of security hazards i might have? Should i also do session.invalidate on logout?
Aside from the typo that Jonathan points out, your logic seems flawed. The first time through the function,... | [
0.4109021723270416,
0.07713893055915833,
0.2924683690071106,
0.06064796820282936,
-0.09976555407047272,
-0.04680663347244263,
0.3110365867614746,
-0.4448474049568176,
-0.22558259963989258,
-0.2975575625896454,
-0.014033851213753223,
0.8482012748718262,
-0.2576124668121338,
-0.0862694233655... | |
the previous HTML with all the tags in it - it's not the string you started with. You will need to save the original string somewhere unmodified so you can start with just the text string each time through the function rather than build on the previous formatted HTML each time. | [
0.3801221549510956,
-0.31854119896888733,
0.5553039312362671,
-0.0020095789805054665,
-0.2443772852420807,
-0.28486669063568115,
0.2980290949344635,
-0.07363967597484589,
-0.3554688096046448,
-0.7374633550643921,
-0.26976677775382996,
0.3338666260242462,
-0.6092304587364197,
0.099650025367... | |
```
<Grid x:Name="mainGrid">
<Border BorderBrush="Black">
<Grid Name="detailGrid">
```
Here, the `detailGrid` and its `border` takes complete Width and Height, as available from the outer `mainGrid`, where as the contents inside the `detailGrid` are having Width and Height that... | [
0.030496209859848022,
0.12942014634609222,
0.6453848481178284,
0.04477215185761452,
0.372374951839447,
0.008025668561458588,
-0.2323150783777237,
-0.24132266640663147,
-0.16773726046085358,
-0.7896535396575928,
-0.17541077733039856,
0.31880417466163635,
0.08418139070272446,
0.0209727343171... | |
visible ?
Set the border and the inner grid `HorizontalAlignment` and `VerticalAlignment` to `Center`.
(or just the border should do it) | [
0.10451411455869675,
-0.06254413723945618,
0.6178540587425232,
-0.018552176654338837,
0.08036447316408157,
0.06417510658502579,
0.08239061385393143,
0.20499850809574127,
-0.3093087673187256,
-0.7247280478477478,
-0.11800181120634079,
0.12186286598443985,
0.029822273179888725,
0.01555828191... | |
There is a requirement, I need to call method from other class, but the method name is changed with different actions, something like below:
```
NSArray *arrays = [NSArray arrayWithObjects:@"aaa", @"bbb", nil];
for ( NSString *array in arrays ){
blablabla.......
Aclass *abc = [[Aclass alloc] methodName%@:variable],arr... | [
-0.004288742784410715,
-0.03876403719186783,
0.17869840562343597,
0.17887379229068756,
0.08463763445615768,
-0.16751106083393097,
0.3653918206691742,
-0.2099371701478958,
-0.05790025740861893,
-0.2872006297111511,
-0.026485618203878403,
0.6166242361068726,
-0.4099671542644501,
0.0146670443... | |
Aclass * abc = [Aclass performSelector:customSelector:aaaID];
}else {
NSLog(@"## Class does not respond to %@", customSelector);
}
```
Aclass \* | [
0.017097020521759987,
-0.1724279522895813,
0.019062088802456856,
0.17670838534832,
0.058364178985357285,
0.019565453752875328,
0.4285748600959778,
-0.1632535457611084,
-0.07048708200454712,
-0.15637440979480743,
-0.17747437953948975,
0.40927281975746155,
-0.3689032793045044,
0.120430216193... | |
abc = [Aclass performSelector:customSelector:aaaID]; this part is not allows in objective-C.
Thanks
You can use `[self performSelector:<#(SEL)#> withObject:<#(id)#>];`
```
NSArray *selectorArray = [NSArray arrayWithObjects:@"abc",@"gcd", nil];
for (NSString *method in selectorArray)
{
[self performSelector:NS... | [
0.08714994788169861,
0.3170279562473297,
0.03227704018354416,
-0.07437208294868469,
-0.05250600352883339,
-0.012929347343742847,
0.27367860078811646,
-0.49740156531333923,
-0.12811660766601562,
-0.49598395824432373,
0.02617240883409977,
0.6589087843894958,
-0.3367041051387787,
-0.181694582... | |
i want to open a link in a view,something like <http://google.com> . i tried it with iframe src="" but when i run it on iphone it opens in webview so i unable see header and footer.
```
<div data-role="view" data-layout="overview-layout" data-title="More">
<div data-role="content" >
<div class="km-scr... | [
0.05291525647044182,
0.05277673527598381,
0.7058401703834534,
-0.1647031009197235,
-0.08417098224163055,
0.21668487787246704,
0.0758124440908432,
-0.089727483689785,
-0.42029422521591187,
-0.7277312278747559,
0.08297741413116455,
0.5169174075126648,
-0.09434958547353745,
0.2487232834100723... | |
<ul data-role="listview">
<li><a class="details-link" data-role="listview-link" href="">xxx</a></li>
<li><a class="details-link" data-role="listview-link" href="#moreinfo">yyy</a></li>
<li></li> | [
-0.15362392365932465,
-0.3875046372413635,
0.7021687030792236,
-0.021086199209094048,
-0.21897652745246887,
0.46457773447036743,
-0.3409649729728699,
-0.17660918831825256,
-0.49620485305786133,
-0.6974225044250488,
-0.3185604512691498,
0.6147394180297852,
-0.17575447261333466,
-0.088931158... | |
</ul>
</li>
</ul>
</div>
</div>
</div>
<div data-role="view" data-layout="overview-layout" id="moreinfo" data-title="More Info">
<div data-role="content">
<div class="km-scroll-container">
<iframe width="100%" | [
-0.26079681515693665,
-0.32371604442596436,
0.7255714535713196,
-0.05298762023448944,
-0.20917931199073792,
0.10561122745275497,
-0.13495364785194397,
-0.26247912645339966,
-0.11031338572502136,
-0.7577357292175293,
-0.3391612470149994,
0.3884603977203369,
0.13440535962581635,
0.1690942645... | |
height="100%" frameborder="0" scrolling="no" marginheight="0"
marginwidth="0" src="http://www.google.com">
</iframe>
</div>
</div>
```
when i open this page it directly opens google in a webview, my intention is to open when i click 'yyy'. i need it to run in iphone also.
R... | [
0.06532271206378937,
0.1759069412946701,
0.6390654444694519,
0.045640986412763596,
0.14566892385482788,
0.21103599667549133,
0.1259455680847168,
-0.238557368516922,
-0.18651582300662994,
-0.3255343735218048,
-0.27636462450027466,
0.40392836928367615,
0.2737685739994049,
-0.1908572614192962... | |
although they often consist of many files. They live in the Start menu, where they can easily be accessed, sorted, filtered, etc.
* *Program files* are the individual files making the programs. They're little more than implementation details, and the end users should not have to be bothered with them or even know they ... | [
0.6368334293365479,
0.22456251084804535,
-0.2096266746520996,
0.31152477860450745,
0.27040356397628784,
-0.12407279014587402,
0.0606369785964489,
0.24730350077152252,
-0.32116490602493286,
-0.5958291888237,
-0.439799040555954,
0.21111008524894714,
0.021309049800038338,
0.12139611691236496,... | |
i have a WCF implementation and i host it within windows service(self-hosted). I use callback contract inorder to trigger some events on the client side.
The question is how i can be sure or check that client is still alive for triggering its callback event. Is there any check mechanism? I use .NET 3.5.
Thanks.... | [
0.1269056797027588,
-0.10148226469755173,
0.44570887088775635,
-0.2364964336156845,
0.10408833622932434,
-0.1580580323934555,
0.36552727222442627,
0.05666910856962204,
-0.17084161937236786,
-0.6531440615653992,
-0.14627814292907715,
0.548973798751831,
-0.3345264494419098,
0.391186445951461... | |
I have a query like this
```
SELECT user_id
FROM user
WHERE user_id NOT
IN (
FIND_IN_SET( user.user_id, '1,2,3,4,7,8,21,42,12' )
)
```
But its not working fine ,when the series is in continue then only it print the id not present
ex. as 1,2,3,4 is in continuous this ids are only not present in my result but i wa... | [
-0.13421553373336792,
-0.25429511070251465,
0.73421710729599,
-0.09648027271032333,
-0.09122171998023987,
0.2125350385904312,
0.08867976814508438,
-0.47682425379753113,
-0.059550631791353226,
-0.6096047163009644,
0.032013166695833206,
0.48691603541374207,
-0.36105453968048096,
0.3570107817... | |
IN (
'1,2,3,4,5,7,8,9'
)
it ignore only the first value
so please help
```
SELECT user_id
FROM user
WHERE user_id NOT
IN ( 1,2,3,4,7,8,21,42,12 );
``` | [
-0.2639649510383606,
0.4123561382293701,
0.4689251780509949,
-0.18323375284671783,
0.3323732316493988,
0.20143142342567444,
0.09881549328565598,
-0.0906178280711174,
0.1267905831336975,
-0.26248976588249207,
-0.3298041820526123,
0.36520689725875854,
-0.19330698251724243,
0.0284736361354589... | |
I am using `Asp.Net/C#`.Currently I am working on the Login page,My `login page` is not dependent on the `Master Page` , and therefore the Link to `Stylesheet` I have set in the head section
```
<link rel="stylesheet" href="Styles/Login.css" type="text/css"/>
```
The problem is that the styles are not having any e... | [
0.1356407105922699,
0.23015105724334717,
0.7927132844924927,
-0.20021386444568634,
-0.03076924942433834,
0.15943758189678192,
0.1788356751203537,
-0.2825857102870941,
-0.27251872420310974,
-0.9273138642311096,
-0.24393267929553986,
0.30123433470726013,
0.016216469928622246,
0.1825724542140... | |
top:50%;
margin-left: -130px;
margin-top: -100px;
left:50%;
}
```
Here is the login page
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HomeLogin.aspx.cs" Inherits="CwizBankApp.HomeLogin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm... | [
-0.32007214426994324,
0.27607545256614685,
0.8723311424255371,
0.11971166729927063,
-0.010643387213349342,
-0.15990909934043884,
-0.07078280299901962,
-0.31546199321746826,
-0.25077518820762634,
-0.7709103226661682,
-0.1172257661819458,
0.29575827717781067,
0.14452369511127472,
-0.02244817... | |
with this.
Any suggestions are highly appreciated.
Thanks
Finally The issue has been solved
Adding this in the web.config solved it
```
<location path="~/Styles">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
```
try this
```
<loca... | [
0.056377630680799484,
-0.2706550061702728,
0.5147671103477478,
0.23914757370948792,
0.16934457421302795,
-0.39014768600463867,
-0.13073858618736267,
-0.15915867686271667,
-0.2833971679210663,
-0.7603031992912292,
0.07064660638570786,
0.3361155092716217,
0.07324033230543137,
0.0761214122176... | |
</authorization>
</system.web>
</location>
```
please update the path with your Style sheet path....Refer to this article
<http://forums.asp.net/t/1678658.aspx/1> | [
0.43896210193634033,
-0.02691843919456005,
0.5057464838027954,
0.11244688183069229,
0.18001504242420197,
-0.4751627743244171,
0.37142136693000793,
-0.1937662810087204,
-0.32270410656929016,
-0.6558219790458679,
-0.23041097819805145,
0.17167651653289795,
-0.11196604371070862,
-0.12300515919... | |
I have a table with countries, years and amounts for each year. I'm trying to write a query that will sum the total amounts for a given year and give it to me as a column.
For example, to have an output that looks like:
```
Country 1991 1992 1993
France 25 12 38
```
I tried a query like th... | [
0.24608750641345978,
0.1239730566740036,
0.34733346104621887,
0.07833138853311539,
-0.14366310834884644,
0.5430699586868286,
-0.3390090763568878,
0.12782514095306396,
-0.8393213152885437,
-0.09655214846134186,
0.1702614426612854,
-0.11870689690113068,
0.1303379237651825,
0.5402740240097046... | |
AS "1991" WHEN project_year = 1991,
SUM(usd_amount) AS "1992" WHEN project_year = 1992,
SUM(usd_amount) AS "1993" WHEN project_year = 1993
FROM tb1
GROUP BY project_year, country
order by country, project_year
```
Any Suggestions?
Thanks!
Chris
try this
```
<location path="~/stylesheets">
<sys... | [
0.04367794096469879,
0.1409226357936859,
0.2776765525341034,
0.1161796972155571,
-0.12938515841960907,
0.5427653789520264,
-0.05736030638217926,
-0.3943250775337219,
-0.7180719971656799,
-0.16562369465827942,
0.07553855329751968,
-0.0623428039252758,
0.3482934236526489,
0.3349730968475342,... | |
</location>
```
please update the path with your Style sheet path....Refer to this article
<http://forums.asp.net/t/1678658.aspx/1> | [
0.30264145135879517,
-0.014554515480995178,
0.4247756004333496,
0.07840446382761002,
0.19402752816677094,
-0.39075735211372375,
0.4332326352596283,
0.017102837562561035,
-0.331720769405365,
-0.7410410642623901,
-0.2687772810459137,
-0.0064467028714716434,
0.022840028628706932,
-0.028416113... | |
I am new to python and stuck on how to do that.
I have a very large text file about 4GB contains error messages .Each message line in the text file represents one message, i need to filter out several columns and replace the space character with |.
Example:
```
input:
83b14af0-949b-71e0-18d5-0ad781020000 40ba8352-8dd... | [
-0.07701810449361801,
0.2591288387775421,
0.3255451023578644,
-0.12772879004478455,
0.1382187306880951,
-0.05030970275402069,
0.6455070972442627,
-0.05643146485090256,
-0.14529705047607422,
-0.401065468788147,
0.19901885092258453,
0.5513669848442078,
-0.37630724906921387,
-0.18839697539806... | |
Agent Interface Up (linkUp Trap) on interface ATM0 --Sev Normal 372 Generic: 3; Specific: 0; Enterprise: .1.3.6.1.4.1.9.1.569;
output:
83b14af0-949b-71e0-18d5-0ad781020000 | 40ba8352-8dd2-71dc-12b8-0ad781020000 | COLG-GRA-617-RD1.oss | 1307845644 | 1307845647 |1307845918 | Cisco Agent Interface Up (linkUp Trap) on inte... | [
-0.5040512084960938,
-0.1364702731370926,
0.7611216306686401,
-0.18427541851997375,
-0.15475653111934662,
0.08365745842456818,
0.3909868001937866,
-0.33403387665748596,
-0.06034376472234726,
-0.9230562448501587,
-0.12039400637149811,
0.6351466178894043,
-0.7166815996170044,
-0.165481775999... | |
it seems likely that the numbers will vary in number of digits. So the best solution should involve regular expressions.
A single regular expression to parse this whole line would be pretty mind-numbing to write and to understand. But we can build up the pattern from shorter patterns. I think the result is pretty easy... | [
0.4129761755466461,
0.09830071032047272,
-0.06238418072462082,
0.12554965913295746,
-0.01808895915746689,
0.048739925026893616,
0.6810309886932373,
0.23790106177330017,
-0.43567177653312683,
-0.2513357102870941,
-0.14229179918766022,
0.4875960946083069,
-0.5244084596633911,
-0.239570915699... | |
to recognize and capture, we can use `c*2` to repeat the capture pattern twice.
In your example of the desired output, you had some extra white space. I wrote the patterns to not capture any white space, but if you actually want the white space you can edit the patterns as you like.
If you don't know about regular ex... | [
0.5572439432144165,
-0.0008913751807995141,
-0.10069415718317032,
-0.24436752498149872,
0.13585273921489716,
0.04559266194701195,
0.2054043710231781,
-0.3331744074821472,
-0.23266816139221191,
-0.4461686313152313,
-0.19836585223674774,
0.33566659688949585,
-0.737822949886322,
-0.1270674169... | |
a pattern means "1 or more" and `*` means "0 or more". `^` and `$` match beginning and end of the pattern, respectively.
```
import re
# Define patterns we want to recognize.
c = r'(\S+)\s+' # a word we want to capture
s = r'\S+\s+' # a word we want to skip
mesg = r'(\S.*\S)\s+--Sev\s+' # mesg to capture; termina... | [
-0.12026982009410858,
-0.1801140159368515,
0.407207727432251,
-0.19601377844810486,
-0.015032611787319183,
0.01566287688910961,
0.3974647521972656,
0.17774930596351624,
-0.5468093752861023,
-0.6994200944900513,
-0.6683319807052612,
-0.19891966879367828,
-0.5467888116836548,
0.0371737442910... | |
r'^\s*' +
c*2 + s*3 + c*1 + s*10 + c*2 + s*14 + c*1 + s*14 +
mesg + w2 + w2semi*2 + tail +
r'\s*$')
# Pre-compile the pattern for speed.
pat = re.compile(s_pat)
# Test string and the expected output result.
s_input = "83b14af0-949b-71e0-18d5-0ad781020000 40ba8352-8dd2-71dc-12b8-0ad781020000 1 -1407714483... | [
-0.3866322934627533,
0.2742142677307129,
0.8130471706390381,
-0.12384574115276337,
0.37117069959640503,
0.4011681079864502,
0.43969008326530457,
-0.46519967913627625,
-0.37191346287727356,
-0.49226364493370056,
-0.04461025074124336,
0.5338976979255676,
-0.28929322957992554,
-0.171548068523... | |
0 69 Cisco Agent Interface Up (linkUp Trap) on interface ATM0 --Sev Normal 372 Generic: 3; Specific: 0; Enterprise: .1.3.6.1.4.1.9.1.569;"
s_correct = "83b14af0-949b-71e0-18d5-0ad781020000|40ba8352-8dd2-71dc-12b8-0ad781020000|COLG-GRA-617-RD1.oss|1307845644|1307845647|1307845918|Cisco Agent Interface Up (linkUp Trap) ... | [
-0.4329935610294342,
-0.09808976203203201,
1.0805985927581787,
-0.4100445806980133,
0.10722226649522781,
0.11592644453048706,
0.40841570496559143,
-0.4993545711040497,
0.05425390601158142,
-0.6186940670013428,
-0.3957161009311676,
0.5013655424118042,
-0.6389098763465881,
-0.162277191877365... | |
open(output_file, "w") as f_out:
for line_num, line in enumerate(f_in, 1):
try:
m = re.match(pat, line)
s_output = '|'.join(m.groups())
f_out.write(s_output + '\n')
except Exception:
print("unable to parse line %d: %s" % (line_num, line)
```
This wil... | [
-0.3611026704311371,
0.10934946686029434,
0.5864441394805908,
-0.4615289270877838,
0.040604569017887115,
0.18257683515548706,
0.5111556649208069,
-0.24081291258335114,
-0.11537932604551315,
-0.3637683093547821,
-0.7575976848602295,
0.32935672998428345,
-0.42891693115234375,
0.1446642726659... | |
a time, process the line, and write the processed line to the output file.
Note that I'm using multiple `with` statements on one line. This works with any recent Python but doesn't work on 2.5 or 3.0. | [
0.3198908567428589,
-0.28956595063209534,
0.18030287325382233,
-0.14177106320858002,
-0.26979345083236694,
0.01463552936911583,
0.30735599994659424,
-0.0613924115896225,
-0.044974759221076965,
-0.4850092828273773,
-0.02552666701376438,
0.2588950991630554,
-0.22656600177288055,
-0.003932295... | |
I use a `Datagrid`. In that I put a List of `Area` like that:
```
ObservableCollection<Area> areas = new ObservableCollection<Area>();
...
datagrid.ItemsSource = areas;
```
Now I want to set the style of the rows according to a property of an `Area`.
```
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
... | [
0.08897195756435394,
-0.03668185696005821,
0.5194750428199768,
-0.16414819657802582,
-0.11439090967178345,
0.005527740344405174,
-0.06104395166039467,
-0.5269383192062378,
-0.22184552252292633,
-0.8070146441459656,
-0.10881686955690384,
0.4177836775779724,
-0.3798395097255707,
-0.101647324... | |
Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
```
How can I reference to `Area.UseForGroups`?
EDIT
----
I tried the following with `DataTriggers` but nothing happens
```
<DataGrid ...>
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" >
<S... | [
0.2049502581357956,
-0.1631164252758026,
0.40116122364997864,
-0.29916122555732727,
0.14201046526432037,
-0.12850837409496307,
0.15145745873451233,
-0.45970600843429565,
-0.28746697306632996,
-0.5029414296150208,
-0.10837003588676453,
0.435403436422348,
-0.4169960618019104,
0.0438310503959... | |
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
</DataGrid>
```
Here's an example of using a DataTrigger
```
<Page.Resources>
<Style x:Key="RowStyle" TargetType="{x:Type DataGridRow}" >
<Style.Triggers>
... | [
0.1338396519422531,
-0.26927876472473145,
0.31023970246315,
-0.03248704969882965,
-0.008915676735341549,
-0.08938000351190567,
-0.12972401082515717,
-0.49510136246681213,
-0.24837680160999298,
-0.7085333466529846,
-0.21364909410476685,
0.36222341656684875,
-0.49515974521636963,
-0.07433462... | |
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Page.Resources>
<DataGrid RowStyle="{StaticResource RowStyle}" ...>
```
Note that you shouldn't specify 'Area.UseForGroups' just 'UseForGroups' since the DataContext for an individual row is an *Area*. | [
0.0006385203450918198,
-0.1403423696756363,
0.3323538303375244,
-0.1740000993013382,
0.21382686495780945,
-0.22790366411209106,
-0.130342498421669,
-0.33130428194999695,
-0.3734472393989563,
-0.5915153622627258,
-0.4221140742301941,
0.24222524464130402,
-0.39099714159965515,
0.008516893722... | |
I wanna develope Push notification without C2DM. Then I googled and found out some ways to impelements Push notification.
1. Polling - not a good solution
2. SMS - costly solution
3. Persistent Connection - acceptable solution
I know that many programmers implements push service using persistent connection, but I thi... | [
0.15545345842838287,
-0.1829630732536316,
0.6307626366615295,
-0.06078682467341423,
-0.20427416265010834,
0.13140498101711273,
0.1164500042796135,
-0.21262088418006897,
-0.164998859167099,
-0.5967198014259338,
0.31997430324554443,
0.5496599078178406,
-0.19245098531246185,
-0.08534859865903... | |
using a recursive template. It's not the greatest solution since this is subject to stack overflow or out of memory errors (if the date interval you give it is large enough), but it can be a place to start.
First thing you need for the example below is a way to check a generated value and make sure it's a valid date (... | [
0.5731050968170166,
-0.07979302853345871,
-0.036204271018505096,
0.13638290762901306,
0.03132942318916321,
-0.2532414197921753,
0.10277361422777176,
0.009732954204082489,
-0.34600314497947693,
-0.47258424758911133,
0.05684012547135353,
0.2278604805469513,
-0.19117821753025055,
0.0661741569... | |
a day to the previous one, and then a day to the current one on so on. If the day overflows, you add one to the month and start again from day 1. If month overflows you do the same with the year and start from month 1. Theoretically the only one that never overflows is the year (but you will limit that with the end val... | [
0.41668829321861267,
-0.11741206794977188,
0.4915946424007416,
0.1268291026353836,
-0.12758716940879822,
0.1236552894115448,
0.2880242168903351,
-0.011025485582649708,
-0.385518342256546,
-0.3188576102256775,
-0.09461897611618042,
0.053758252412080765,
-0.09101448953151703,
0.5296799540519... | |
happens in block X).
When you get an invalid value, then something overflowed. It can only be the day or the month (as I mentioned above). I first check for the month (block Y). If that's the case I start from day 1 of month 1 but for the next year. If it's the day that overflowed (block Z), then I start from day 1 of... | [
0.14597342908382416,
0.11220944672822952,
0.8296361565589905,
-0.13418136537075043,
-0.11406031250953674,
0.09449552744626999,
0.2615477442741394,
-0.2287287414073944,
-0.3598618507385254,
-0.4453403949737549,
-0.3401913642883301,
-0.002231267048045993,
-0.2358396053314209,
0.3163607716560... | |
-->
<xsl:template match="/">
<values>
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="number(substring($startDate, 3, 2))" />
<xsl:with-param name="month" select="number(substring($startDate, 1, 2))" />
<xsl:with-param name="year" select="number(substring(... | [
-0.1516866534948349,
0.13706213235855103,
0.5897696614265442,
-0.06427714973688126,
-0.408333957195282,
0.3417680859565735,
0.22745104134082794,
-0.6851627230644226,
-0.5998117923736572,
-0.027482617646455765,
-0.24951650202274323,
-0.30316779017448425,
-0.0706278383731842,
0.1443907618522... | |
to the imported file -->
<xsl:variable name="validationResult">
<xsl:call-template name="date-is-valid">
<xsl:with-param name="day" select="$day"/>
<xsl:with-param name="month" select="$month"/>
<xsl:with-param name="year" select="$year"/>
</xsl:call-template>
</xsl:variable>... | [
0.07795129716396332,
0.14231814444065094,
0.6945042610168457,
-0.00714368000626564,
-0.1330292820930481,
0.3256235420703888,
0.13074971735477448,
-0.414562851190567,
-0.4144846796989441,
0.15552112460136414,
-0.368161678314209,
-0.06432201713323593,
0.024578748270869255,
-0.012298794463276... | |
<!-- block Y -->
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="1" />
<xsl:with-param name="month" select="1" />
<xsl:with-param name="year" select="$year + 1" />
</xsl:call-template>
</xsl:when> | [
-0.11119614541530609,
-0.011403013952076435,
0.5513523817062378,
-0.1698528677225113,
-0.24988605082035065,
0.2508731782436371,
0.15360130369663239,
-0.3990793526172638,
-0.6222518682479858,
0.028465213254094124,
-0.241970032453537,
-0.480385422706604,
-0.013697613961994648,
0.187588870525... | |
<xsl:otherwise>
<!-- block Z -->
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="1" />
<xsl:with-param name="month" select="$month + 1" />
<xsl:with-param name="year" select="$year" />
</xsl:call-template> | [
-0.18386150896549225,
-0.04187413677573204,
0.5796533226966858,
-0.21200469136238098,
-0.2636191248893738,
0.15393921732902527,
0.19017930328845978,
-0.27670979499816895,
-0.5753313302993774,
-0.034819573163986206,
-0.3062736690044403,
-0.4275442659854889,
-0.06357771903276443,
0.190181568... | |
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- block X -->
<!-- same MMddyyyy format as the interval values -->
<xsl:variable name="currentDate" select="concat(format-number($month, '00'), format-number($day, '00'), $year)" />
<value>
<xsl:... | [
-0.11778955906629562,
-0.2428320050239563,
0.821097731590271,
0.12421520054340363,
0.24552130699157715,
0.04949098825454712,
-0.2975361943244934,
0.045066628605127335,
-0.13203780353069305,
-0.22126725316047668,
-0.18530090153217316,
0.26937344670295715,
-0.015617054887115955,
0.2735561728... | |
<xsl:if test="not($currentDate = $endDate)">
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="$day + 1" />
<xsl:with-param name="month" select="$month" />
<xsl:with-param name="year" select="$year" />
</xsl:call-template>
</xsl:if... | [
-0.09566061198711395,
-0.06705653667449951,
0.545020341873169,
-0.1816532462835312,
-0.2343868464231491,
0.22093886137008667,
0.18794158101081848,
-0.35417091846466064,
-0.5365369319915771,
-0.14403769373893738,
-0.17143137753009796,
-0.45799553394317627,
0.051568351686000824,
0.2367039620... | |
The following jquery ajax code works fine for the #MerryParentEmail keyup event but it is not working for the #MerryParentState change event. The change event is firing but the city dropdown box is not getting populated.
```
<script type="text/javascript">
$(document).ready(function(){
$("#MerryParentStateI... | [
0.09588174521923065,
-0.31899985671043396,
0.9646323323249817,
0.14811602234840393,
-0.0011663519544526935,
-0.04579097032546997,
0.38704776763916016,
-0.24183084070682526,
-0.2018791139125824,
-0.6834302544593811,
-0.32888540625572205,
0.5687006711959839,
-0.11175370216369629,
0.117216497... | |
function getcities(){
$options = $this->Student->MerryParent->City->getCities($this->data['MerryParent']['state_id']);
print_r($options);
foreach ($options as $k=>$v){
echo '<option value="'.$k.'">'.$v.'</option>';
}
}
```
add.ctp
```
<?php
echo $this->Session->flash();
echo $this->Form->cr... | [
0.213803231716156,
-0.3030097484588623,
0.5493450164794922,
0.11761002987623215,
0.1911829560995102,
0.16200309991836548,
0.4131739139556885,
-0.4535066783428192,
-0.13342314958572388,
-0.3534725308418274,
-0.5726887583732605,
0.38140255212783813,
-0.1728822886943817,
0.04112309589982033,
... | |
'minYear' => (
date('Y') - 5
),
'maxYear' => (
date('Y') - 2 | [
0.25183746218681335,
0.1976224184036255,
0.5413914918899536,
0.08956994861364365,
0.059429019689559937,
0.5186291337013245,
0.24551261961460114,
0.2582448124885559,
-0.0577823668718338,
-0.19277961552143097,
-0.4915499687194824,
0.5055086016654968,
0.30421891808509827,
0.5471083521842957,
... | |
)
));
echo $this->Form->input('Student.merry_class_id',
array(
'label'=>'Enquiry Class for',
'empty'=>'Choose one',
'options'=>array('1'=>'Playgroup','2'=>'Nursery','3'=>'LKG', '4'=>'UKG')
)
);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>Parent In... | [
0.22048060595989227,
0.022912921383976936,
0.4950513243675232,
-0.05811341851949692,
0.1824227124452591,
0.31775963306427,
0.2852189242839813,
-0.33685895800590515,
-0.19480019807815552,
-0.0608433336019516,
-0.5971211194992065,
0.09372690320014954,
-0.12019647657871246,
0.2901935279369354... | |
'Mrs'=>'Mrs',
'Ms'=>'Ms')
)
);
echo $this->Form->input('MerryParent.email');
echo $this->Form->input('MerryParent.name', array('label'=>'Parent/Guardian Name'));
echo $this->Form->input('MerryParent.landline');
echo $this->Form->input('MerryParent.mobile');
echo $this->Form->input('MerryParent.address'... | [
0.0853269025683403,
0.12716177105903625,
0.9693238735198975,
-0.013023649342358112,
0.1622944474220276,
0.16739772260189056,
0.5211411118507385,
-0.5701934695243835,
-0.1420520693063736,
-0.5791454911231995,
-0.29689958691596985,
0.0530829057097435,
-0.29217928647994995,
0.2565443813800812... | |
generated value and make sure it's a valid date (you can find some examples online for that; I just used [a sample from an open source project](http://www.getsymphony.com/download/xslt-utilities/source-code/54294/) and imported the file in the example just to keep it shorter).
Then, the idea is to generate the dates b... | [
0.4556211233139038,
-0.25967904925346375,
0.39322495460510254,
0.3469403088092804,
-0.1670556664466858,
0.07889463752508163,
-0.2355429083108902,
0.02290925197303295,
-0.3116927146911621,
-0.2968975305557251,
0.15112800896167755,
0.2210879921913147,
0.08336859196424484,
0.40451279282569885... | |
that never overflows is the year (but you will limit that with the end value of the interval).
You generate a date and you validate it. If it's valid and haven't reached the end of the interval you try to generate another by adding days to it (that's what happens in block X).
When you get an invalid value, then somet... | [
0.5823653340339661,
0.16967399418354034,
0.5089625120162964,
0.08177033811807632,
-0.05364074558019638,
0.09111560136079788,
0.33278539776802063,
0.10379091650247574,
-0.3727807104587555,
-0.16884805262088776,
0.00020740495529025793,
0.0022733700461685658,
0.037137214094400406,
0.502890825... | |
the day that overflowed (block Z), then I start from day 1 of the next month.
```
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="http://www.getsymphony.com/download/xslt-utilities/source-code/54294/"/>
<xsl:output method="xm... | [
0.04146287590265274,
-0.037115082144737244,
0.8808861970901489,
-0.17099633812904358,
-0.5916737914085388,
0.4217459261417389,
0.094661645591259,
-0.09018620103597641,
-0.3456076681613922,
-0.2567982077598572,
-0.30209314823150635,
-0.03163592517375946,
-0.4420908987522125,
0.4410159289836... | |
/>
</xsl:call-template>
</values>
</xsl:template>
<xsl:template name="GenerateList">
<xsl:param name="day" select="1" />
<xsl:param name="month" select="1" />
<xsl:param name="year" select="1" />
<!-- 1 = valid, 0 = invalid according to the imported file -->
<xsl:variable name="valid... | [
-0.10161629319190979,
0.13331300020217896,
0.6218775510787964,
-0.06394623965024948,
-0.3236273229122162,
0.2647419273853302,
0.2382906973361969,
-0.6102030873298645,
-0.5429489612579346,
0.14379185438156128,
-0.2489650696516037,
-0.3635774254798889,
-0.040254753082990646,
0.04857696220278... | |
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$validationResult = 0">
<xsl:choose>
<xsl:when test="$month > 12">
<!-- block Y -->
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="1" />
... | [
-0.10338481515645981,
-0.054502297192811966,
0.6156150698661804,
0.011099603958427906,
-0.27887216210365295,
0.2649274468421936,
0.17629705369472504,
-0.5085509419441223,
-0.4550735652446747,
-0.018210114911198616,
-0.2630702257156372,
-0.14935611188411713,
-0.11905460804700851,
-0.0348919... | |
/>
<xsl:with-param name="year" select="$year + 1" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<!-- block Z -->
<xsl:call-template name="GenerateList">
<xsl:with-param name="day" select="1" /> | [
0.12661463022232056,
-0.11132585257291794,
0.39843443036079407,
-0.24800854921340942,
-0.17563636600971222,
0.15345096588134766,
0.1180780827999115,
-0.20458407700061798,
-0.47923925518989563,
-0.09675740450620651,
-0.37666788697242737,
-0.4868025779724121,
-0.0930682122707367,
0.178648561... | |
<xsl:with-param name="month" select="$month + 1" />
<xsl:with-param name="year" select="$year" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- block X -->
<!-- same MMddyyyy format as the | [
-0.243519589304924,
0.00024066692276392132,
0.6315568089485168,
-0.035478897392749786,
-0.3644830286502838,
0.2725001275539398,
0.066524438560009,
-0.24992792308330536,
-0.5765287280082703,
-0.08645520359277725,
-0.36696386337280273,
-0.337520569562912,
0.030924934893846512,
0.265405505895... | |
interval values -->
<xsl:variable name="currentDate" select="concat(format-number($month, '00'), format-number($day, '00'), $year)" />
<value>
<xsl:value-of select="$currentDate" />
</value>
<xsl:if test="not($currentDate = $endDate)">
<xsl:call-template name="Generat... | [
-0.028756579384207726,
-0.33892756700515747,
0.45846882462501526,
0.06423912942409515,
0.11208604276180267,
0.19490119814872742,
0.060293350368738174,
-0.40098297595977783,
-0.0723641887307167,
-0.2357153743505478,
-0.09717125445604324,
0.18557307124137878,
0.017734089866280556,
-0.0190972... | |
<xsl:with-param name="year" select="$year" />
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
``` | [
0.11238008737564087,
0.006454160902649164,
0.30414310097694397,
-0.23730121552944183,
0.02485944889485836,
-0.08311060070991516,
0.19900956749916077,
-0.26955756545066833,
-0.3637106120586395,
-0.18040554225444794,
-0.39616858959198,
-0.22090886533260345,
0.10325200110673904,
0.27111151814... | |
I am trying to display `ListView`.
I have created one `activity` , in `onCreate()` method I am launching one `AsyncTask` and in `onPostExecute()` method I am trying display `ListView` in that .
but `listView` object receiving null..
Below is the code snippet.
```
protected void onPostExecute(KpiResponseObject kpiR... | [
0.5202069878578186,
-0.07392513751983643,
0.6679116487503052,
-0.16910320520401,
-0.11122255027294159,
-0.23399531841278076,
0.2708939015865326,
-0.3643035888671875,
-0.12109071016311646,
-0.6768127083778381,
-0.14433081448078156,
0.626879870891571,
-0.5094081163406372,
-0.0408178381621837... | |
I have a question about what I think is an operator or argument passer but google hasn't turned up anything. The script this is contained in is
```
#!/bin/sh
ln mopac.in FOR005
mopac >& FOR006
mv FOR006 mopac.out
```
When I call "mopac mopac.in", the program runs fine, but, for my needs, mopac is called within anoth... | [
0.18735884130001068,
0.32094869017601013,
0.2163395881652832,
-0.1580647975206375,
0.2011713981628418,
-0.21671970188617706,
0.5938224196434021,
-0.05685381963849068,
-0.2568143904209137,
-0.4996931850910187,
-0.012011171318590641,
0.7644982933998108,
-0.32348620891571045,
-0.0223672166466... | |
redirect both standard output and standard error. (If `/bin/sh` is not `bash`, as is true on a number of Linux distributions, this will elicit an error.) Older `bash` (before 3.0) preferred this form, so most newer `bash` still understand it, although possibly very recent `bash` has finally removed it as they seem to f... | [
0.2452876716852188,
-0.07821033149957657,
0.28333789110183716,
-0.34752461314201355,
0.06627296656370163,
-0.32901731133461,
0.5056520104408264,
0.14790426194667816,
-0.26684701442718506,
-0.5879755616188049,
-0.054056428372859955,
0.6717113852500916,
-0.34545189142227173,
0.14359320700168... | |
parameter, just as you're running it directly. | [
0.12355451285839081,
-0.05148373544216156,
0.1444704681634903,
0.3014564514160156,
-0.4118974804878235,
0.19134320318698883,
-0.3519786596298218,
0.049054086208343506,
-0.17611786723136902,
-0.3548685610294342,
0.28922808170318604,
0.6988062858581543,
0.06068570911884308,
0.069368205964565... | |
I am new to web services. Please give suggestions how to insert and retrieve data from database using jersey JAX - RS in java?
Below is an example of a **JAX-RS** service implemented as a session bean using **JPA** for persistence and **JAXB** for messaging might look like.
**CustomerService**
```
package org.exampl... | [
0.568778932094574,
0.07121772319078445,
0.6393283009529114,
-0.1551155149936676,
0.09268476068973541,
-0.14491529762744904,
0.30015987157821655,
-0.38676509261131287,
-0.015855535864830017,
-0.8238120675086975,
-0.13411551713943481,
0.30227911472320557,
-0.020246878266334534,
0.22726635634... | |
public void create(Customer customer) {
entityManager.persist(customer);
}
@GET
@Produces(MediaType.APPLICATION_XML)
@Path("{id}")
public Customer read(@PathParam("id") long id) {
return entityManager.find(Customer.class, id);
}
@PUT
@Consumes(MediaType.APPLICATION_XML)... | [
0.3410090506076813,
-0.11390380561351776,
0.5544406771659851,
-0.056810129433870316,
0.1387818455696106,
0.0915505588054657,
0.0078004286624491215,
-0.2161889672279358,
-0.15886260569095612,
-0.6846740245819092,
-0.23896919190883636,
0.7777912020683289,
-0.41927793622016907,
0.432850480079... | |
Customer customer = read(id);
if(null != customer) {
entityManager.remove(customer);
}
}
@GET
@Produces(MediaType.APPLICATION_XML)
@Path("findCustomersByCity/{city}")
public List<Customer> findCustomersByCity(@PathParam("city") String city) {
Query query = entity... | [
0.2134498953819275,
-0.3136920630931854,
0.9901396036148071,
0.07220613211393356,
-0.07591880112886429,
0.1574939787387848,
0.04250795766711235,
-0.03520439937710762,
-0.24643442034721375,
-0.7553321719169617,
-0.39969825744628906,
0.32904282212257385,
-0.291625440120697,
0.311686426401138... | |
example of one of the entities. It contains both JPA and JAXB annotations.
```
package org.example;
import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Set;
@Entity
@NamedQuery(name = "findCustomersByCity",
query = "SELECT c " +
... | [
0.03970548138022423,
-0.06836351007223129,
0.46271562576293945,
0.08504447340965271,
0.018940193578600883,
0.0762820914387703,
0.08080137521028519,
-0.2855331003665924,
-0.22438006103038788,
-0.49390095472335815,
-0.17425361275672913,
0.2941627502441406,
-0.45376667380332947,
0.45923426747... | |
@Id
private long id;
@Column(name="FIRST_NAME")
private String firstName;
@Column(name="LAST_NAME")
private String lastName;
@OneToOne(mappedBy="customer", cascade={CascadeType.ALL})
private Address address;
@OneToMany(mappedBy="customer", cascade={CascadeType.ALL})
private Set<P... | [
-0.1108926311135292,
0.07997868955135345,
0.4062011241912842,
-0.22927285730838776,
-0.16009193658828735,
0.058461107313632965,
0.3020877242088318,
-0.3240952491760254,
-0.047411952167749405,
-0.3651157319545746,
-0.2980661988258362,
0.6658491492271423,
-0.23184406757354736,
-0.08583869785... | |
server without requiring any additional server set up. Programming the client you can get the JAX-RS APIs from the Jersey (<http://jersey.java.net/>), and the JPA and JAXB APIs from EclipseLink (<http://www.eclipse.org/eclipselink/>).
> and where the database connections is written
**JDBC Resource & Connection Pool**... | [
0.19323232769966125,
-0.12527379393577576,
0.4177526831626892,
-0.10632418841123581,
-0.3031069338321686,
0.05358171835541725,
-0.041129615157842636,
-0.21126596629619598,
-0.27824413776397705,
-0.8277145028114319,
-0.00853139627724886,
0.5140160918235779,
-0.39126208424568176,
0.096652194... | |
database vendor is appropriate to your database)
4. Click Next and fill in the following "Additional Properties":
5. User (e.g. CustomerService)
6. Password (e.g. password)
7. URL (e.g. jdbc:oracle:thin:@localhost:1521:XE)
8. Use the "Ping" button to test your database connection
4. Create a JDBC Resource called "... | [
0.03709337115287781,
0.07098729908466339,
0.4192087650299072,
0.18129251897335052,
0.08828835189342499,
-0.036534927785396576,
-0.16478420794010162,
-0.179010808467865,
-0.12007744610309601,
-0.5203365683555603,
0.12866805493831635,
0.4365236461162567,
-0.021653128787875175,
0.149830251932... | |
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>CustomerService</jta-data-source>
<class>org.example.Customer</class>
<class>org.example.Address</class>
<class>org.example.PhoneNumber</class>
<properties>
<property name="eclipseli... | [
0.4758254289627075,
-0.01276198960840702,
0.09735856205224991,
-0.20946845412254333,
-0.17167584598064423,
0.010132258757948875,
-0.05481036752462387,
-0.28696030378341675,
-0.29177552461624146,
-0.41965386271476746,
-0.06130611523985863,
0.40704062581062317,
-0.023774651810526848,
-0.0815... | |
<property name="eclipselink.logging.timestamp" value="false"/>
<property name="eclipselink.logging.thread" value="false"/>
<property name="eclipselink.logging.session" value="false"/>
<property name="eclipselink.logging.exceptions" value="false"/>
<property name="eclipse... | [
0.5916244983673096,
0.20161555707454681,
0.1134461909532547,
-0.4229850769042969,
-0.2379726767539978,
-0.02279926836490631,
-0.023085447028279305,
-0.15370167791843414,
-0.2905362546443939,
-0.4250025749206543,
-0.01347663626074791,
0.45999929308891296,
-0.22963622212409973,
0.17550981044... | |
Hi i added template field dynamically to gridview by implementing ITemplate interface.
The template field contains some controls like label and textboxes. how do i get these controls in row databound event.
I am not able to get when i do gridviewrow.findcontrol("id") as i do normally when we add templatefield from asp... | [
0.05119418725371361,
-0.25860127806663513,
0.799319863319397,
-0.06945108622312546,
-0.27356505393981934,
0.054757747799158096,
-0.009840604849159718,
-0.6820105910301208,
0.019735336303710938,
-0.4760811924934387,
0.33480751514434814,
0.5360585451126099,
-0.16283348202705383,
0.2116126269... | |
= type;
_columnName = column;
}
void ITemplate.InstantiateIn(System.Web.UI.Control container)
{
switch (_liType)
{
case ListItemType.Header: | [
0.2689037621021271,
-0.3244323134422302,
0.48867902159690857,
0.011295048519968987,
0.05174281448125839,
0.24423281848430634,
-0.14401499927043915,
-0.345859557390213,
-0.35644248127937317,
-0.5725477337837219,
-0.15378127992153168,
0.13881415128707886,
-0.25466349720954895,
0.272896558046... | |
Label lblHeader = new Label();
lblHeader.Text = _columnName;
container.Controls.Add(lblHeader);
break;
case ListItemType.Item: | [
-0.035921379923820496,
-0.2225084900856018,
0.5434247851371765,
-0.09303714334964752,
0.18157564103603363,
0.06597170233726501,
-0.07728751003742218,
-0.5136423707008362,
-0.5750634670257568,
-0.40770190954208374,
-0.32395264506340027,
0.24692107737064362,
-0.43427637219429016,
0.517174720... | |
Label lblItem = new Label();
lblItem.DataBinding += new EventHandler(lbl_DataBinding);
lblItem.ID = "lbl" + _columnName;
lblItem.ClientIDMode = ClientIDMode.Predictable;
container.Controls.Add(lblItem); | [
-0.036771152168512344,
-0.5951032042503357,
0.5035988688468933,
-0.03563104569911957,
0.0943048819899559,
-0.18611331284046173,
-0.1062697246670723,
-0.43227675557136536,
-0.3079661428928375,
-0.5249722599983215,
-0.24572867155075073,
0.4055064618587494,
-0.6751654148101807,
-0.10808178037... | |
DropDownList ddl = new DropDownList();
ddl.DataBinding += new EventHandler(ddl_DataBinding);
ddl.ID = "ddl" + _columnName;
ddl.Visible = false; | [
-0.11873752623796463,
-0.5309392809867859,
0.4969821274280548,
-0.1530194729566574,
-0.12931492924690247,
0.12245970219373703,
0.3090934455394745,
-0.18583793938159943,
-0.39087340235710144,
-0.6681058406829834,
-0.3845537006855011,
0.4763537049293518,
-0.25776758790016174,
0.1340332478284... | |
container.Controls.Add(ddl);
break;
}
}
```
}
Now i want access the label and dropdown which i have added using this code.
when i do gridviewrow.findcontrol("id") i am not getting them.
Can any one please help me.
I am geeting when i go through all the rows and try to find b... | [
0.2648877799510956,
0.1430460810661316,
0.23924143612384796,
0.02309621497988701,
0.11673411726951599,
-0.3367385268211365,
0.11822681874036789,
0.1440436691045761,
-0.30420902371406555,
-0.9625738263130188,
0.2623349726200104,
0.41712337732315063,
-0.23813600838184357,
0.5244122743606567,... | |
a row when i select it all labels should diappear and ddls dhould appear
for this i am using the follwoing code.
`protected void chkEdit_CheckedChanged(object sender, EventArgs e)
{
CheckBox chkEditTest = (CheckBox)sender;
GridViewRow grow = (GridViewRow)chkEditTest.NamingContainer;
DropDownList ddl = (DropDownLis... | [
-0.05029479041695595,
-0.16723942756652832,
0.6940213441848755,
-0.27167272567749023,
-0.0815635621547699,
0.17705759406089783,
0.02988717518746853,
-0.40942510962486267,
-0.21491295099258423,
-0.5889359712600708,
-0.08634555339813232,
0.526634156703949,
-0.4476774334907532,
0.336358219385... | |
public CustomGridViewColumn(ListItemType type, string column)
{
_liType = type;
_columnName = column;
}
void ITemplate.InstantiateIn(Control container)
{
switch (_liType)
{
case ListItemType.Header:
Label lblHeader = new Label(); | [
0.2950063943862915,
-0.42070844769477844,
0.6952635049819946,
-0.14763349294662476,
-0.0020082038827240467,
0.10385049879550934,
-0.0194049384444952,
-0.4747494161128998,
-0.38667088747024536,
-0.37964874505996704,
-0.034163493663072586,
0.6067379713058472,
-0.23957623541355133,
0.53606098... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.