text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
{
var result = [];
var _arrayslen = arraylen(arguments._arrays);
var _size = (_arrayslen) ? 1 : 0;
var _array = '';
var x = 0;
var i = 0;
var j = 0;
var _current = [];
for (x=1; x lte _arrayslen; x++) {
_size = _size * arraylen(arguments._arrays[x]);
_current[x] = 1;... | [
-0.21939364075660706,
-0.39471569657325745,
0.6887527704238892,
-0.4216354787349701,
-0.132545605301857,
0.4219587743282318,
0.4704177975654602,
-0.6131659746170044,
-0.49442991614341736,
-0.16910740733146667,
-0.40981048345565796,
0.4983478784561157,
-0.26340171694755554,
0.11475907266139... | |
for (i=1; i lte _size; i++) {
result[i] = [];
for (j=1; j lte _arrayslen; j++) {
arrayappend(result[i], arguments._arrays[j][_current[j]]);
}
for (j=_arrayslen; j gt 0; j--) {
if (arraylen(arguments._arrays[j]) gt _current[j]) {
_current[j]++; | [
-0.3323324918746948,
-0.5005712509155273,
0.62301105260849,
-0.5872093439102173,
-0.15342460572719574,
0.22667229175567627,
0.4156039357185364,
-0.5672346353530884,
-0.2113143801689148,
-0.16596786677837372,
-0.44115176796913147,
0.5219652056694031,
-0.38973215222358704,
0.0273027792572975... | |
break;
}
else {
_current[j] = 1;
}
}
}
return result;
}
</cfscript>
<cfset arrays = [[129,128,127],[130,131,132],[135,133,134],[137,138,136],[140,139],[141,142]]>
<cfset r = array_cartesian_product(arrays)>
<cfoutput>#arraylen(r)#</cfoutput>
<cfdump ... | [
-0.05351829528808594,
-0.19561058282852173,
0.3761052191257477,
-0.17640696465969086,
0.25681567192077637,
0.34455129504203796,
0.24558599293231964,
-0.6355888247489929,
-0.5233461856842041,
-0.08558561652898788,
-0.1722029596567154,
0.2848196029663086,
-0.2026960253715515,
0.0057428139261... | |
I am trying to make a online photo library where user upload image from their mobile devices like Android to the server and can access it.
Current I am using Grails with Spring Security Plugin Core and I saved all the uploaded image in a folder in /web-app/uploaded-image. The upload part is currently working and I am a... | [
0.23440706729888916,
-0.05869327858090401,
0.5957655906677246,
0.20033049583435059,
-0.1408701241016388,
0.0608808733522892,
0.18225300312042236,
-0.17816174030303955,
-0.4033954441547394,
-0.6545510292053223,
0.1494397222995758,
0.4394599497318268,
-0.23571936786174774,
0.1021480113267898... | |
to a DomainClass called image which will be associate with each user's DomainClass.
My question is that how do I make it so that user that is not the owner of the image would not have permission to view the image?
I tried search google for answer and did not find many useful answer.
Thank you for your time.
You can use... | [
0.3917536735534668,
-0.36082369089126587,
0.5317621231079102,
-0.023712296038866043,
-0.15793192386627197,
-0.1152663454413414,
0.14671631157398224,
-0.27410081028938293,
-0.2637266218662262,
-0.07801607251167297,
-0.139093279838562,
0.7225186228752136,
-0.29756221175193787,
0.117710195481... | |
is trying to access image from ui
User user = User.get(image.userId)
//this is the logged-in user
User logged = User.get(springSecurityService.principal.id)
if (user.id != logged.id) {
{
redirect(action: "accessDenied", controller='access' id: params.long("id"))
//re-direct access... | [
-0.20234118402004242,
-0.3616037964820862,
0.7743905186653137,
0.020337965339422226,
0.12956425547599792,
0.1645185649394989,
0.2965579926967621,
-0.22531920671463013,
-0.29542043805122375,
-0.6120747327804565,
-0.35288310050964355,
0.4879591464996338,
-0.24370691180229187,
0.0756086483597... | |
I have a web application in MVC 3 (3-tier with a Data Access Layer) that I'd like to extend to native iPhone and Android etc... as presentation devices.
Can I just use the same controllers with some modifications or is it better to organize the access logic into a WCF service?
What are you recommendations in terms o... | [
0.3988804519176483,
0.06926493346691132,
0.5331552624702454,
0.11277467757463455,
0.00830793660134077,
-0.16330347955226898,
0.046835996210575104,
-0.1511635035276413,
-0.24691717326641083,
-0.9387515783309937,
0.052419792860746384,
0.5214357972145081,
-0.1279124915599823,
0.15420952439308... | |
I added a beginning page to the opening of my app where it lasts for 5 seconds but when i did that it put a little "x" next to setContentView(R.layout.splash); and there is an xml file for it so i dont know why it isn't working. The line I bolded is the one I am having trouble with.
```
package com.jslsoftware;
impo... | [
0.4406881034374237,
-0.30968141555786133,
0.9310002326965332,
-0.2817836403846741,
0.0951220765709877,
0.17418800294399261,
0.5063718557357788,
-0.4865982234477997,
-0.03307477757334709,
-0.9324348568916321,
-0.24041655659675598,
0.7478938698768616,
-0.7484034895896912,
-0.0659346878528595... | |
public void run(){
try{
sleep(5000);
Intent menuIntent = new Intent("com.jslsoftware.MENU");
startActivity(menuIntent);
}
finally{ | [
0.5845480561256409,
-0.2934446930885315,
0.6515675783157349,
-0.3490181267261505,
0.4325702488422394,
0.2173025906085968,
0.6194413304328918,
-0.30656787753105164,
-0.0948621854186058,
-0.7069997191429138,
-0.2406468242406845,
0.8196249604225159,
-0.20393632352352142,
-0.07688861340284348,... | |
finish();
}
}
};
logoTimer.start();
}
}
```
check your import it should not be
```
android.R;
```
but
```
import com.jslsoftware.R;
``` | [
0.2438545525074005,
0.08166481554508209,
0.5841174125671387,
-0.43284526467323303,
0.3181331753730774,
0.12098751962184906,
0.2638031542301178,
0.10684161633253098,
-0.14245781302452087,
-0.7852556109428406,
-0.4106544852256775,
0.6467392444610596,
-0.3454428017139435,
0.12112849950790405,... | |
I am using
```
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
}
```
for imagepicker
and using
```
[picker dismissModalViewControllerAnimated:YES];
```
in iPad to dismiss the picker.
also i tried using
```
- (void)imagePickerControllerDidCance... | [
0.22424887120723724,
0.11111119389533997,
0.3374779522418976,
-0.06657090783119202,
-0.17956331372261047,
-0.17177839577198029,
0.16234049201011658,
0.30661123991012573,
-0.3834780156612396,
-0.9758402109146118,
0.04656708240509033,
0.4677056074142456,
-0.4231182932853699,
0.23831023275852... | |
for Google Accounts](https://developers.google.com/accounts/docs/OpenID)
It provides all the useful information you need. | [
0.5178844928741455,
0.2656109631061554,
0.3325260877609253,
0.2459096610546112,
0.07785668969154358,
-0.13004228472709656,
0.04247371107339859,
0.253172367811203,
0.032641805708408356,
-0.6646138429641724,
0.20385847985744476,
0.34348738193511963,
0.03063165955245495,
0.05613729730248451,
... | |
I'm considering starting to use this technic of icons as fonts, as it seems pretty awesome. But I can't seem to figure out how make it change colors on hover of the link. Here is a jsfiddle for you to play with:
<http://jsfiddle.net/eNhUf/17/>
As you will see, when you **hover** a text like "caution", the text goes t... | [
-0.10704337805509567,
-0.06136913597583771,
0.41175416111946106,
0.3306111991405487,
-0.061287496238946915,
-0.1696711778640747,
0.16601277887821198,
0.0730658695101738,
-0.3052988052368164,
-0.7967506647109985,
0.2830512225627899,
0.7016896605491638,
-0.14721614122390747,
-0.2091956138610... | |
I am trying to change the menuOption background-color on hover using JQuery. All my code works fine, the only problem I am having seems to be CSS related. When the background color changes it seems to change the background color of text only as opposed to the entire div, which is what I want. What I find weird is when ... | [
0.05191641300916672,
-0.03313753008842468,
0.5389088988304138,
-0.1387867033481598,
-0.23739802837371826,
0.05222553387284279,
0.20236696302890778,
0.17482492327690125,
-0.28217118978500366,
-0.8678712844848633,
-0.07309287786483765,
0.7230303287506104,
-0.2108161896467209,
0.0350559689104... | |
red; float:left; width:180px; height:20px;'>
<a href='index.php/shop/$sub[cat_url]/' style='color:black;'>
<div class='cat_name'>$sub[cat_title]</div>
</a>
<div class='sub_menu' style='display:none; z-index:100; margin-top:-12px; position:absolute; background-color:#ddd; margin-left:182px; box-shadow:3px 3px 6px #444;'... | [
-0.22488127648830414,
0.012998548336327076,
0.7039050459861755,
-0.36164310574531555,
0.12387271225452423,
0.361338347196579,
0.11195100098848343,
-0.3046444356441498,
-0.2206166684627533,
-0.6779805421829224,
-0.5050010085105896,
0.3110666275024414,
-0.3198321759700775,
0.0252224560827016... | |
As per the api docs:
If you wish to disable this emulation (which was the default behavior in versions 0.13.1 and earlier) you can add the following line to your application.rb file:
```
ActiveRecord::ConnectionAdapters::Mysql[2]Adapter.emulate_booleans = false
```
But when I do so, I get:
```
uninitialized consta... | [
0.042922746390104294,
-0.08678916841745377,
0.6143075227737427,
-0.2632412910461426,
0.2340267300605774,
-0.17869584262371063,
0.5593165755271912,
-0.05187509208917618,
-0.06104777380824089,
-0.4589732885360718,
-0.1821005642414093,
0.9073911309242249,
-0.7867379784584045,
0.35307326912879... | |
my designer passed me a look that I would love to be able to replicate, but i am not very sure how to do so.
* the first part is the circular cropping of the avatar (it is a square upload)
* the second part is the speech bubble
I am open to doing the first part in the backend, but would prefer having a CSS/JS soluti... | [
0.5525432229042053,
-0.42120450735092163,
0.26780545711517334,
0.09911293536424637,
-0.19714847207069397,
0.10186973959207535,
0.1093461662530899,
0.055861908942461014,
-0.14305882155895233,
-0.5362703800201416,
0.15194584429264069,
0.3450232148170471,
-0.11256203055381775,
-0.227138236165... | |
to learn how to do it. If you gave me code that needed some help, then I'd give you an answer on how to fix it. Do you have any code for this yet?
Also for the cropping, I think a quick way to do this is make a square wrapper div around your image then give it a border-radius (css) that is half of the length of one of... | [
0.9616151452064514,
-0.29968899488449097,
0.36519676446914673,
0.40779635310173035,
0.10010145604610443,
-0.11276877671480179,
-0.030227595940232277,
-0.02923058718442917,
-0.32678496837615967,
-0.5241895914077759,
0.46758750081062317,
0.5252360701560974,
0.22458955645561218,
-0.3758298158... | |
Anyone have any ideas to clean this up?
```
public string FullName
{
get
{
var fullName = new StringBuilder();
if (FirstName.Length > 0)
fullName.Append(FirstName);
if (LastName.Length > 0) | [
0.03625405579805374,
-0.16747412085533142,
0.5583800673484802,
-0.290255606174469,
0.21483592689037323,
-0.06937456876039505,
0.5638926029205322,
-0.1282649040222168,
-0.22155262529850006,
-0.6474572420120239,
-0.5071232914924622,
0.6332852244377136,
-0.24252839386463165,
0.214864686131477... | |
{
if (fullName.Length > 0)
fullName.Append(" " + LastName);
else
fullName.Append(LastName);
} | [
-0.42309048771858215,
-0.15710808336734772,
0.6531563997268677,
-0.48472318053245544,
0.30067965388298035,
0.23013955354690552,
0.37325361371040344,
-0.30895861983299255,
-0.008307232521474361,
-0.5749735832214355,
-0.49749788641929626,
0.610109806060791,
-0.20560824871063232,
0.2052292525... | |
return fullName.ToString();
}
}
```
```
FullName = string.format("{0} {1}",FirstName,LastName).Trim()
``` | [
-0.3628573715686798,
-0.22142988443374634,
0.49116742610931396,
-0.5064168572425842,
0.34050872921943665,
-0.11734182387590408,
0.09032774716615677,
-0.18529649078845978,
0.1790546327829361,
-0.4746057093143463,
-0.45501431822776794,
0.9160332679748535,
-0.013982431963086128,
0.04992521181... | |
I wanted to use Ajax to make a request, but when I realized that the domains were different, I decided to use JSON instead.
The code:
### Main PHP file (script code)
```
$(".name").click(function(){
//Get information
var id = $(this).attr("id").substring(1);
jQuery.getJSON("https:/otherdomain.com/makere... | [
0.22381575405597687,
-0.0776294618844986,
0.6918933391571045,
-0.22823208570480347,
-0.0036540813744068146,
-0.28061798214912415,
0.3010735511779785,
-0.4908849596977234,
-0.05482087284326553,
-0.4549349546432495,
-0.242398202419281,
0.8275470733642578,
-0.4454200863838196,
-0.336380213499... | |
displays the id sent and received. But in Internet Explorer, a security error appears saying that the content has been blocked and the data is not received. In Chrome, it does not work neither.
Why is that happening or what am I doing wrong? Is there any solution to send and receive data without browser errors/alerts ... | [
0.1566096991300583,
0.1332855522632599,
0.5312563180923462,
0.050184816122055054,
-0.38806819915771484,
-0.06133638322353363,
0.33772820234298706,
0.01957842707633972,
-0.13437841832637787,
-0.8961090445518494,
0.2888442575931549,
0.47557851672172546,
-0.2408597618341446,
-0.24596697092056... | |
I have a web application that allows a user to view family members.
When the user clicks on a family member, it displays the member's basic info. There is also a grid displaying that family member's related family members. (e.g. User can click on the Father link. From that popup, they can then click on the Father's F... | [
0.5201118588447571,
0.20227618515491486,
0.42612597346305847,
-0.03703995421528816,
0.202167809009552,
-0.14582505822181702,
0.014306237921118736,
0.0551949106156826,
-0.2900959551334381,
-0.7573041915893555,
0.13236618041992188,
-0.1525527685880661,
0.13578170537948608,
0.8528768420219421... | |
track on how many data forms have popped up? Or can this reliably be done with a web application?
Yes, as Steve Hall pointed out, using transactional tests solves the problem of database consistency between tests and test runs 100%. Spring offers very elaborate support for this type of tests (see [transaction managemen... | [
0.4808448851108551,
-0.011367475613951683,
-0.019797492772340775,
0.3611951470375061,
-0.10069671273231506,
-0.1543775498867035,
0.015799980610609055,
-0.3033336400985718,
-0.2579672038555145,
-0.18027500808238983,
0.13074901700019836,
0.6767087578773499,
-0.12081097066402435,
-0.247287422... | |
rollback during test tear down eliminates all CRUD effects on the database. | [
-0.016660474240779877,
0.04054691642522812,
0.366841197013855,
0.3255709111690521,
0.3069516718387604,
-0.28868046402931213,
0.05781499296426773,
-0.22675830125808716,
0.13332219421863556,
-0.4137648642063141,
-0.5468764901161194,
0.45104140043258667,
0.005560462363064289,
0.05974840372800... | |
In Java, I'm working with the `BigDecimal` class and part of my code requires me to extract the fractional part from it. `BigDecimal` does not appear to have any built in methods to help me get the number after the decimal point of a `BigDecimal`.
For example:
```
BigDecimal bd = new BigDecimal("23452.4523434");
```... | [
-0.4129878878593445,
0.09540746361017227,
0.16412685811519623,
-0.3925357460975647,
-0.19310332834720612,
0.01878628507256508,
0.02970604971051216,
-0.4585326313972473,
-0.2772986590862274,
-0.161764994263649,
-0.20161399245262146,
0.23009999096393585,
-0.27839431166648865,
-0.154208287596... | |
I'm just looking a big picture idea here; I can google specifics once provided with guidelines.
I want to make a relatively simple file hosting website such as dropbox or skydrive for mainly pedagogical reasons.
Making a multi-user login and registration system with PHP and MySQL is pretty straight forward, but how w... | [
0.04207553341984749,
0.12237084656953812,
0.3466741144657135,
-0.04541900381445885,
-0.19078151881694794,
-0.17599596083164215,
0.10859789699316025,
-0.12211740016937256,
-0.3635004162788391,
-0.4551600217819214,
-0.24753786623477936,
0.5220295786857605,
-0.2631995975971222,
0.065499678254... | |
What is the suggested approach for setting up a subscription to a message published by a remote endpoint using Mass Transit and RabbitMQ?
In our case, most pub/sub is local, but it will be convenient for our developers to all subscribe to a shared publisher on a remote machine.
All the examples I see appear to be loc... | [
0.1845736801624298,
-0.17749615013599396,
0.5386036038398743,
0.12483875453472137,
-0.3450726568698883,
0.06304193288087845,
0.11354558169841766,
-0.06908351182937622,
-0.5021995306015015,
-0.34026312828063965,
0.3169544041156769,
0.034432921558618546,
-0.4116232991218567,
0.17015185952186... | |
local publishers.
The exchanges and bindings on TheRemoteMachine were setup as I expected as well as the exchanges and bindings on localhost.
<http://docs.masstransit-project.com/en/latest/configuration/quickstart.html>
<http://docs.masstransit-project.com/en/latest/overview/keyideas.html#address> | [
0.16980190575122833,
-0.3568429946899414,
0.4509417414665222,
0.2182803899049759,
0.03348708525300026,
-0.08745154738426208,
-0.012097463011741638,
0.05728912353515625,
-0.0697464868426323,
-0.5296615362167358,
-0.12385984510183334,
0.005637777037918568,
-0.07617788016796112,
-0.0225649923... | |
I looked all over on google, I guess I just don't know what to search for because I'm looking to do something relatively simple. I try to only ask questions on here if I am not able to find answers online.
I am looking for the answer in plain javascript. I don't want to use jquery. Thank you so much!
You know how whe... | [
0.8672601580619812,
0.2662016749382019,
0.19666990637779236,
0.23493757843971252,
0.25280073285102844,
-0.21152912080287933,
-0.0005154915270395577,
0.1780659407377243,
-0.13125933706760406,
-0.49326610565185547,
0.21974602341651917,
0.3179321885108948,
0.24589037895202637,
-0.025778893381... | |
the billing information automatically gets populated with the shipping information.
I am able to get all input type texts to work properly, but I can't seem to get the drop down select box for the billing\_state to be the same as the one that has already been selected for the shipping\_state.
I am using all the sta... | [
0.4967438876628876,
0.2603551149368286,
0.7040718197822571,
0.07762108743190765,
0.3707030117511749,
-0.046150028705596924,
0.15687258541584015,
-0.2931419014930725,
-0.08209573477506638,
-0.6511160731315613,
0.19184574484825134,
0.827088475227356,
-0.10020913183689117,
0.08150719851255417... | |
that was set in the shipping\_state to be highlighted in the billing\_state dropdown list (you can only see that it's value was set to the value that was in the shipping\_state dropdown list after you click the dropdown list). I want it so that it preselects and displays the state without having to click "choose state"... | [
0.5436884760856628,
-0.00998777151107788,
0.5062553286552429,
-0.05468570441007614,
0.41867882013320923,
0.19545182585716248,
-0.0334513895213604,
-0.275844007730484,
0.05381441488862038,
-0.44437530636787415,
0.25483807921409607,
0.9000911712646484,
-0.028572339564561844,
0.17789612710475... | |
set.
I have two drop down menus. One named shipping\_state with an id of shipping\_state and the other named billing\_state with an id of billing\_state
Add a "change" event handler on your billing address, and in the handler, set the selected index of the shipping address to match the selected index of the billing ad... | [
0.37805747985839844,
-0.38506588339805603,
0.8855112195014954,
0.13612955808639526,
0.3339381814002991,
0.2161751538515091,
-0.3646141588687897,
-0.2312387079000473,
-0.05510953441262245,
-0.7626369595527649,
0.14388544857501984,
0.4151362180709839,
-0.5109122395515442,
0.2715162932872772,... | |
<option>Arizona</option>
<!-- etc -->
</select>
</div>
<div id="shipping">
<p>Shipping:</p>
<select name="shippingState" id="shippingState">
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<!-- etc -->
</select>
</div>
```
And the Javascript... | [
-0.08948232233524323,
-0.14164011180400848,
0.40666064620018005,
-0.16141605377197266,
0.35766756534576416,
0.5730378031730652,
-0.15256425738334656,
-0.2305317223072052,
0.033010926097631454,
-0.44757482409477234,
-0.3133046329021454,
0.5397683382034302,
-0.3866626024246216,
0.16406755149... | |
= billingState.selectedIndex;
} );
``` | [
0.3878800868988037,
0.08060775697231293,
0.20913608372211456,
-0.13415952026844025,
0.08349262923002243,
-0.07240317761898041,
0.2921983301639557,
-0.2612229585647583,
0.33727455139160156,
-0.24117740988731384,
0.0418635755777359,
0.36779356002807617,
-0.45169755816459656,
0.22217865288257... | |
I am trying to declare an array of pointers each of which points to int arrays of different sizes. Any ideas?
From your description it sounds like you are looking for a pointer to a pointer.
```
int **aofa;
aofa = malloc(sizeof(int*) * NUM_ARRAYS);
for (int i = 0 ; i != NUM_ARRAYS ; i++) {
aofa[i] = malloc(sizeof(... | [
-0.0662025585770607,
0.09411557018756866,
0.33101823925971985,
-0.48881375789642334,
-0.06492886692285538,
0.37799152731895447,
0.335467666387558,
-0.6018293499946594,
-0.10705272108316422,
-0.6433957815170288,
-0.26905396580696106,
0.4515400826931,
-0.5882696509361267,
0.00001396688003296... | |
}
}
```
`NUM_ARRAYS` arrays may have different number of elements, as determined by the value returned by the `getNumItemsInArray(i)` function. | [
-0.09427079558372498,
-0.10070491582155228,
-0.0448845811188221,
0.038894157856702805,
0.12324589490890503,
0.07723452150821686,
-0.014158302918076515,
-0.18382251262664795,
-0.1213679388165474,
-0.33088797330856323,
-0.29533520340919495,
0.5429615378379822,
-0.28561869263648987,
0.0857029... | |
In my code, I have a object whose contents is fully garbage. I guess in other part of code a wrong write happened and by (un)luck it wrote at the address of object I mentioned.
I was wondering if there is some tool that can tell me every write that a memory address receives, so I can track the origin of this bug.
Most... | [
0.23321564495563507,
0.2679148316383362,
-0.09583970159292221,
0.027586765587329865,
0.07394871115684509,
-0.2812159061431885,
0.4141070246696472,
0.05655427649617195,
-0.2687987983226776,
-0.4105305075645447,
-0.4402262270450592,
0.4601427912712097,
-0.42274209856987,
0.11894375085830688,... | |
menu.
In SoftIce you can use BPM command. :) That one can also break on memory access. | [
-0.2264801412820816,
-0.33711498975753784,
0.30947282910346985,
0.16571921110153198,
0.10006196796894073,
-0.050462108105421066,
0.12045709043741226,
0.35060396790504456,
-0.5146267414093018,
-0.7331586480140686,
-0.4603355824947357,
1.060139775276184,
-0.07167629897594452,
0.0465567596256... | |
When I try to subscribe to a product by clicking the link:
```
<%= link_to "Subscribe", :controller => "products", :action => "subscribe_product", :id => product.id, :method => :post %>
```
I get this error and notice the parameters are wrong.
```
ActiveRecord::RecordNotFound in ProductsController#show
Couldn't fi... | [
0.17726558446884155,
0.12331601977348328,
0.8691174983978271,
-0.3229202330112457,
-0.09389040619134903,
-0.12753811478614807,
0.3305739164352417,
-0.33742260932922363,
-0.28058257699012756,
-0.7214662432670593,
-0.1761614829301834,
0.25569936633110046,
-0.40354791283607483,
0.410306155681... | |
:polymorphic => true
```
Users subscribe in another controller:
```
PagesController
def index
@product_history = current_user.products
end
end
pages/index.html.erb
<% for product in @product_history %>
<%= product.name %>
<%= product.price %>
<%= link_to "Subscribe", :controller => "products", :action... | [
-0.001823525526560843,
-0.2577306628227234,
0.7558573484420776,
0.009981365874409676,
0.007685353048145771,
-0.04440968483686447,
-0.03800523653626442,
-0.48386669158935547,
-0.5048377513885498,
-0.5515214800834656,
-0.14815881848335266,
0.028166769072413445,
-0.4409196078777313,
0.3750464... | |
subscribe_product
@product = Product.find(params[:id])
subscription = Subscription.new
subscription.subscriber_id = current_user.id
@product.subscriptions << subscription
end
``` | [
0.3133811056613922,
-0.06282656639814377,
0.6884115934371948,
-0.04241928085684776,
-0.10593380033969879,
0.0049314070492982864,
-0.04338201507925987,
-0.07980266213417053,
-0.4647890031337738,
-0.34065040946006775,
-0.34865283966064453,
-0.06420791894197464,
-0.1919626146554947,
0.6522717... | |
So I'm kind of unsure about something. What I want is one class to know about the data through all my different view controllers. This one class should have an array of my objects so that if I have a detailViewController, I would just be looking at one instance in my array that the DataManager would hold. I thought tha... | [
0.0867331475019455,
-0.15431050956249237,
0.292761892080307,
0.1569162756204605,
-0.029545940458774567,
-0.005831288639456034,
0.04596150666475296,
-0.027230219915509224,
-0.38916149735450745,
-0.7820988893508911,
0.34159955382347107,
0.5957397818565369,
-0.23285126686096191,
0.39378470182... | |
sharedDmgr = [[super allocWithZone:NULL] init];
}
return sharedDmgr;
}
```
If I want an NSMutableArray property, what is the proper way to initialize it? Do I do something like
```
+ (id)sharedInstance {
if (sharedDmgr == nil) {
sharedDmgr = [[super allocWithZone:NULL] init];
[self shared... | [
-0.2937489151954651,
-0.1665668934583664,
0.2991127371788025,
0.05814342573285103,
-0.23185765743255615,
-0.1519070565700531,
0.33562344312667847,
-0.33313801884651184,
-0.2532772421836853,
-0.7045589685440063,
0.05232609435915947,
0.4492124915122986,
-0.0860150158405304,
0.319497227668762... | |
attribute named "array", then your objective is to be able to do [DataManager sharedDataManager].array in all your code.
The way to do it would be to:
* Declare the NSMutableArray \*array as an attribute on the DataManager.h @interface block.
* Declare a @property for that attribute.
* On the - [DataManager init] met... | [
0.03555557131767273,
-0.19166606664657593,
0.3270646631717682,
0.07625387609004974,
-0.2731209993362427,
-0.16792236268520355,
0.16623665392398834,
-0.5653753876686096,
-0.3498481810092926,
-0.6656531691551208,
0.11909867823123932,
0.5519675016403198,
-0.25772395730018616,
0.38312095403671... | |
Let me know if you need some example code. | [
0.6789342164993286,
0.2029913365840912,
-0.4065398871898651,
0.19360025227069855,
0.01896516978740692,
-0.20881076157093048,
0.47157061100006104,
0.7706881165504456,
0.07910221815109253,
-0.5109230279922485,
0.19275517761707306,
0.19333210587501526,
-0.010812470689415932,
-0.07641710340976... | |
Why does gcc allow extern declarations of type void? Is this an extension or
standard C? Are there acceptable uses for this?
I am guessing it is an extension, but I don't find it mentioned at:
<http://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/C-Extensions.html>
```
$ cat extern_void.c
extern void foo; /* ok in gcc 4.3,... | [
0.05067861080169678,
0.2823975086212158,
0.4045301675796509,
-0.34534159302711487,
-0.4169681668281555,
-0.0010310375364497304,
0.23884305357933044,
-0.2692977786064148,
-0.3628612756729126,
0.07370719313621521,
-0.24214594066143036,
0.7431831955909729,
-0.714275062084198,
0.10517651587724... | |
error on the extern declaration:
```
$ cl /c extern_void.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
extern_void.c
extern_void.c(1) : error C2182: 'foo' : illegal use of type 'void'
```
Strangely enough (or perhaps not ... | [
0.1695099174976349,
0.2856360375881195,
0.33349305391311646,
-0.1477295458316803,
-0.020034104585647583,
-0.19959378242492676,
0.43177708983421326,
0.040962304919958115,
-0.12238284200429916,
0.13481944799423218,
-0.19969883561134338,
0.5759618282318115,
-0.7179251313209534,
0.500120520591... | |
storage class (`extern`, in this case), then §6.7/7 would apply:
> If an identifier for an object is declared with no linkage, the type for the object shall be complete by the end of its declarator, or by the end of its init-declarator if it has an
> initializer; in the case of function arguments (including in protot... | [
-0.06903037428855896,
0.06565593928098679,
0.11693694442510605,
0.10120818763971329,
0.2620317339897156,
-0.11033838987350464,
0.22888660430908203,
0.019474273547530174,
0.0919603481888771,
-0.34768199920654297,
-0.45552605390548706,
0.4058103859424591,
-0.11076004803180695,
0.357958614826... | |
only the requirements of §6.7.2/2, which seems to allow a declaration of a name with type `void`:
> At least one type specifier shall be given in the declaration specifiers in each declaration,
> and in the specifier-qualifier list in each struct declaration and type name. Each list of
> type specifiers shall be one... | [
0.27534276247024536,
0.04979504272341728,
0.47141939401626587,
0.02884450927376747,
-0.014307653531432152,
-0.04298420995473862,
0.08594006299972534,
-0.48480409383773804,
-0.005773173179477453,
-0.387028306722641,
-0.576778769493103,
0.34734880924224854,
-0.2669594883918762,
-0.1239923387... | |
... more types elided]
I'm not sure that's really intentional -- I suspect the `void` is really intended for things like derived types (e.g., pointer to void) or the return type from a function, but I can't find anything that directly specifies that restriction. | [
0.3017570972442627,
0.04807431623339653,
-0.17717531323432922,
0.11754678189754486,
-0.07875633984804153,
-0.3197728395462036,
0.06894170492887497,
0.32587504386901855,
-0.16021043062210083,
-0.14697691798210144,
-0.17192652821540833,
0.5757624506950378,
-0.4474108815193176,
0.299076408147... | |
I have this right now:
```
<%= f.select :credit, (0..500) %>
```
This will result in this:
```
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">... | [
0.10748885571956635,
-0.138962522149086,
0.6381387710571289,
-0.13741670548915863,
0.5387417674064636,
0.2855168282985687,
-0.22004392743110657,
-0.37863901257514954,
-0.30091896653175354,
-0.761673092842102,
-0.2329455465078354,
0.9197809100151062,
0.12889374792575836,
-0.1071972176432609... | |
`map` above turns `(0..500)` into an array like this, where the option displayed is identical to the form value. Then one last option is added.
Note that this will produce a value of "" (an empty string) for the parameter if "Unlimited" is selected - if you put a select field into a form and the form is submitted, the... | [
0.17300888895988464,
-0.3945935070514679,
0.41402098536491394,
0.11611218750476837,
-0.18448597192764282,
-0.050886932760477066,
0.20070157945156097,
-0.24445928633213043,
-0.1694602072238922,
-0.7956637144088745,
0.13532674312591553,
0.5094150304794312,
-0.3061944246292114,
0.078300595283... | |
at all, but that would be more work than simply adding:
```
param[:credit] == "" and param[:credit] = nil
```
to your controller action. | [
0.05442339554429054,
-0.08425728231668472,
0.20798110961914062,
0.29318010807037354,
0.1899271458387375,
-0.05372052639722824,
-0.00893363542854786,
-0.4167197644710541,
-0.21976090967655182,
0.15731370449066162,
-0.20246043801307678,
0.5457682609558105,
0.061431657522916794,
-0.1994932144... | |
I am trying to use jQuery.one on ajax loaded element. It is working if element is loaded already but not when element is being loaded using ajax.
Here is what I am trying to do.
```
$("#selector").one('mouseenter', selMouseEnter);
function selMouseEnter() {
Some code....
}
```
Thx in advance.
Shashi
EDIT:
```
$... | [
-0.165652796626091,
-0.10914584994316101,
0.4850682020187378,
-0.394523561000824,
0.24077779054641724,
0.06238178536295891,
0.48841145634651184,
-0.28688517212867737,
0.032802365720272064,
-0.8855082988739014,
-0.29332804679870605,
0.6582368612289429,
-0.29164043068885803,
-0.1141864061355... | |
}
}
```
Now conflict is when I click on button in tooltip it is calling mouseenter event again and not the one specific to the button.
Note: #PY comes using ajax
Because it is dynamically loaded element you need to use [.live()](http://api.jquery.com/live/) or [.on()](http://api.jquery.com/on/) or [livequery()](http... | [
0.08067766577005386,
-0.14541788399219513,
0.36373910307884216,
0.033108893781900406,
-0.09084824472665787,
-0.03633442521095276,
0.27645376324653625,
0.11938893049955368,
-0.1869277060031891,
-0.530587375164032,
-0.018629545345902443,
1.0681720972061157,
-0.45101305842399597,
-0.016244737... | |
Google offers a charting / graphing API and has a graph that I would like to use to present change over time, and the graph / chart is called the "[Annotated Timeline](https://developers.google.com/chart/interactive/docs/gallery/annotatedtimeline#Example)", and an example of it is here:
[Picture.png http://img198.imag... | [
0.08541492372751236,
-0.18031372129917145,
0.6791793704032898,
0.31913721561431885,
0.10928696393966675,
-0.04559539258480072,
-0.02409827709197998,
0.12015305459499359,
-0.3791581094264984,
-0.6896224617958069,
0.2821436822414398,
0.1569276750087738,
-0.1440931260585785,
-0.13083216547966... | |
this out without taking a screenshot of it because this particular Google Visualization is flash based.
What tool can I use to plot data with different x values for the y data points that is HTML5 compatible / not flash?
ps: Google also offers the [line chart api](https://developers.google.com/chart/interactive/docs/... | [
0.3816942572593689,
-0.47272777557373047,
0.6596954464912415,
0.1888715624809265,
-0.2845483422279358,
-0.01994282752275467,
0.042862217873334885,
0.013030675239861012,
-0.23618459701538086,
-0.38271471858024597,
0.11435271799564362,
0.5686498284339905,
-0.3192249834537506,
-0.022831629961... | |
I just did an update of my SDK and now eclipse is giving me all sorts of totally unwanted warnings in my xml... for example I have a RelativeLayout that doesn't have an id or a background (it's actually a transparent button) and eclipse is warning me that it's a useless element. Is there a way to turn this idiocy off?
... | [
0.2800222635269165,
0.26538601517677307,
0.36872950196266174,
-0.0937463715672493,
-0.06438363343477249,
-0.27250024676322937,
0.44043463468551636,
-0.1882518231868744,
-0.261990487575531,
-0.5954400300979614,
0.21022209525108337,
0.6976525187492371,
-0.4026193916797638,
0.1873534321784973... | |
,you need to go
Window-->Preferences-->Android-->Lint Error Checking
in this Dialog you will find all Issue for Xml in android and you can make disable it ,if you want to disable.And Make sure you will not disable usefull lint warning because it's help us to find there are multiple ID assign in xml and lot more.. | [
0.17282190918922424,
-0.14862723648548126,
0.3995113968849182,
0.27930721640586853,
0.08340778946876526,
-0.2737619876861572,
0.1534624546766281,
0.039569731801748276,
-0.15282824635505676,
-0.8015135526657104,
-0.14479826390743256,
0.603534996509552,
-0.3931127190589905,
-0.23542805016040... | |
I need to populate one datatable using database dynamically in which i need to call a retieveData() method and pass a id to criteria my result inside the method. The parameter that is to be passed is coming from another bean by #{anotherBean.id}. My question is how to pass this parameter inside the method...?
Following... | [
-0.1410076767206192,
-0.011666015721857548,
0.6496109366416931,
0.002174786292016506,
-0.08406386524438858,
-0.1457340121269226,
-0.12140700966119766,
-0.2910386621952057,
-0.10939906537532806,
-0.7588822841644287,
-0.039624858647584915,
0.43886539340019226,
-0.3589005768299103,
0.25855287... | |
as follow:
```
public void retrieveData(ComponentSystemEvent event) {
String id = (String) event.getComponent().getAttributes().get("myid");
}
```
Make sure not to use '()' when calling the managed bean's method on listener of f:event tag. | [
-0.020126448944211006,
-0.09080035239458084,
0.15214432775974274,
-0.2398069053888321,
0.0020623744931071997,
-0.09287318587303162,
0.2557140290737152,
-0.15417306125164032,
0.021428778767585754,
-0.4862353503704071,
-0.2924085855484009,
0.6425653100013733,
-0.40123260021209717,
0.09850444... | |
I am using MISRA C 2004 standards in [Code Composer Studio](http://en.wikipedia.org/wiki/Code_Composer_Studio). I am always getting errors with respect to bitwise operations during initialization of the peripherals.
In the compiler .h file, the definition is like this.
```
#define SFR_8BIT(addr) extern volatile unsi... | [
-0.19144436717033386,
0.38741418719291687,
0.12015040218830109,
-0.23082438111305237,
0.029672028496861458,
-0.04365969076752663,
0.108794204890728,
-0.3914981484413147,
-0.06502820551395416,
-0.10249222069978714,
0.0699220821261406,
0.6726163625717163,
-0.26701265573501587,
-0.16882924735... | |
not a conversion to a integer type of the same signedness.
I don't want to change the compiler .h file, and I want to eradicate these warnings.
You can pass it through attribute.
Here is what I do on JSF:
```
<f:metadata>
<f:event listener="#{myBean.retrieveData}" type="preRenderView" id="fevent"/>
<f:attrib... | [
-0.06732714921236038,
0.05341539904475212,
0.40761908888816833,
-0.2816416919231415,
-0.17004625499248505,
-0.11865770816802979,
0.3247468173503876,
-0.26610302925109863,
0.07082371413707733,
-0.7491535544395447,
-0.07117194682359695,
0.724320650100708,
-0.44735005497932434,
0.257102370262... | |
I'm going to implement a searching function for a sms managing system, where the user can enter a name(keyword) and get relevant information.
This is the code that i wrote in "InstantSMS.jsp"
---
```
$("#search").click(function() {
var keyword = $("#customerName").val();
$.ajax({
ty... | [
-0.04687190800905228,
0.0701664611697197,
0.668743908405304,
-0.15605822205543518,
0.36541157960891724,
0.06340686976909637,
0.3333134949207306,
0.05907606706023216,
-0.0012093664845451713,
-0.4439471662044525,
0.07958377152681351,
0.6404914855957031,
-0.3280787467956543,
-0.15508167445659... | |
key : keyword
}
}).success(function() {
$.getJSON('SearchingClass', function(data) {
$("#resultTable").html(data.messageRes);
});
})
.error(function(request, error) { | [
-0.4763706922531128,
-0.11766877770423889,
0.38311055302619934,
-0.20771464705467224,
0.027014194056391716,
0.15347276628017426,
0.6778228878974915,
-0.3975929915904999,
-0.14458122849464417,
-0.47078096866607666,
-0.5616421103477478,
0.6621825098991394,
-0.25484222173690796,
0.04876229912... | |
$().toastmessage('showWarningToast', "Error! ");
});
});
```
---
Here the 'SearchingClass' is the name of the servlet.
this is the code of 'SearchingClass.java'
---
```
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String key... | [
-0.10531915724277496,
0.07665830105543137,
0.8075999021530151,
-0.3008415400981903,
-0.1001453548669815,
0.19252023100852966,
0.5207134485244751,
-0.5988965630531311,
-0.27522122859954834,
-0.6541659235954285,
-0.5093507170677185,
0.38545459508895874,
-0.4415428042411804,
0.009657624177634... | |
Map<String, Object> data = new HashMap<String, Object>();
data.put("messageRes", table);
// Write response data as JSON.
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.getWriter().write(new Gson().toJson(data));
}
protected void doPost(HttpSer... | [
-0.12320354580879211,
-0.12143036723136902,
0.6244160532951355,
-0.2960556149482727,
0.031434349715709686,
0.0615161694586277,
0.5714280009269714,
-0.47126415371894836,
-0.14604704082012177,
-0.9903481006622314,
-0.31059756875038147,
0.6188443303108215,
-0.34487733244895935,
-0.03669963032... | |
method.
How to avoid this ?
How can i use $.getJSON() method only to get the "String table" but not to run the "doGet()" method ?
Is there another way to get a string from servlet to jsp using ajax ?
Can i pass this keyword using $.getJSON() method ?
Thank you !
You can use shorthand AJAX call.
```
var keyword... | [
0.06323851644992828,
-0.050591181963682175,
0.5900922417640686,
0.06796462833881378,
-0.045508552342653275,
-0.14204154908657074,
0.319398432970047,
-0.31436148285865784,
-0.1082611009478569,
-0.5983521938323975,
-0.13599365949630737,
0.6425909399986267,
-0.446491003036499,
0.1335622072219... | |
I'm applying UnitTest just for a while, and today I met something very strange. Considering the following code:
```
TestObject alo = null;
assert alo != null; // Pass!!!
Assert.assertNotNull(alo); // Fail, as expected.
```
I googled around and find that assert is java-built-in, while assertNotNull is JUnit supported... | [
0.1843944787979126,
0.1453011929988861,
0.23181681334972382,
-0.09102269262075424,
-0.576913058757782,
0.0028819949366152287,
0.5329662561416626,
-0.4916066825389862,
0.056472502648830414,
-0.4541449546813965,
0.11723021417856216,
0.68568354845047,
-0.14497235417366028,
-0.0114731648936867... | |
methods to test program invariants. When an assert fails, a java.lang.AssertionError is thrown and is generally not intended to be caught. The idea was they could be enabled during debugging and disabled in production code (which is the default), but frankly, I don't think they ever really caught on. I haven't seen the... | [
0.32134145498275757,
0.08620110899209976,
-0.012197264470160007,
0.33973896503448486,
-0.29901760816574097,
-0.16903497278690338,
0.45380663871765137,
-0.3099808394908905,
-0.03671785816550255,
-0.16829432547092438,
-0.06260749697685242,
0.4566024839878082,
-0.24927176535129547,
-0.0021097... | |
errors and to generate a report of all failures at the end of the test run. This is the more common usage of asserts, IMO.
You can obviously use either one, but the JUnit asserts are far more expressive, and you don't have to worry about enabling or disabling them. On the other hand, they aren't really for use in busi... | [
0.4723062217235565,
0.28237709403038025,
-0.20124302804470062,
0.09891507029533386,
-0.257121205329895,
0.16813309490680695,
0.5135321021080017,
-0.28071165084838867,
0.18517643213272095,
-0.4923251271247864,
0.07595294713973999,
0.7371509075164795,
-0.1350952535867691,
0.11135523021221161... | |
// Line 9
Assert.assertNotNull(alo); // Line 10
}
}
```
Here's the output from a run with Java assertions disabled (the default):
```
c:\workspace\test>java -cp bin;lib\junit-4.8.1.jar org.junit.runner.JUnitCore MyTest
JUnit version 4.8.1
.E
Time: 0.064
There was 1 failure:
1) test(MyTest)
java.lang.AssertionE... | [
-0.1991882473230362,
0.10267194360494614,
0.5990816950798035,
-0.3820977509021759,
-0.06612460315227509,
0.27594661712646484,
0.5961735844612122,
-0.49111077189445496,
0.125316321849823,
-0.5126121640205383,
-0.3425438106060028,
0.6281883120536804,
-0.3022488057613373,
-0.03164117038249969... | |
The code below displays either "M" or "F" in the GridView column after evaluating Gender.
> ```
> <asp:TemplateField HeaderText="Gender">
> <ItemTemplate>
> <%# Eval("Gender") %>
> </ItemTemplate>
> </asp:TemplateField>
>
> ```
When it's "M" I want to use textc... | [
-0.14734989404678345,
-0.03397374972701073,
0.2570854723453522,
-0.25426948070526123,
0.03972318395972252,
0.5528914332389832,
0.20945002138614655,
-0.3262180685997009,
-0.13075704872608185,
-0.7183837890625,
-0.20621554553508759,
0.4695931673049927,
-0.11527486890554428,
-0.32052546739578... | |
the aspx file or in code behind is fine. I'd like to know both ways of doing so if possible.
To do it via markup you'll have to wrap item template content into e.g. `<div>`, and apply the necessary styles to it like this:
```
<asp:TemplateField HeaderText="Gender">
<ItemTemplate>
<div style='color: <%# Eva... | [
0.252050518989563,
-0.09848697483539581,
0.2814350724220276,
0.01681715063750744,
-0.1418178528547287,
0.22584660351276398,
0.07753713428974152,
-0.2755785882472992,
-0.31348559260368347,
-0.7828563451766968,
-0.5049192905426025,
0.3425765633583069,
-0.209995299577713,
-0.17859776318073273... | |
I am using a function in two sites but when I want to implement it to third site it does not work. When I look into firebug console it says its not a function. My function is in a separate file called profilter.js look like this:
```
jQuery.fn.sfProductFilter = function (options) {
options = options || {};
ret... | [
0.3190389573574066,
0.16828283667564392,
0.7297303080558777,
-0.5504037737846375,
0.1505797803401947,
-0.021105598658323288,
0.24452486634254456,
-0.4925994277000427,
-0.07081768661737442,
-0.6412035822868347,
-0.15289366245269775,
0.7111697793006897,
-0.39073115587234497,
-0.1284225583076... | |
console.log($("ul.productSmall"));
$('ul.productSmall').sfProductFilter(); //says not a function.
});
```
I have checked through console.log followings
1- jQuery is included already
2- If I console.log from the js file it works but inside any code block it does not
3- ul.productSmall shows right results i... | [
-0.05510381609201431,
-0.0014563057338818908,
0.6187734007835388,
-0.2003435641527176,
-0.1044704020023346,
-0.19446516036987305,
0.3448150157928467,
-0.14116160571575165,
-0.19889064133167267,
-0.7591599225997925,
-0.24181003868579865,
0.8222184181213379,
-0.0676952674984932,
-0.036848772... | |
the inclusion of profilter.js and destroys your custom function. | [
0.18655769526958466,
0.10160301625728607,
0.24934925138950348,
0.0826612263917923,
0.014029876329004765,
-0.5209420323371887,
0.7737228274345398,
0.11888814717531204,
0.20479710400104523,
-0.2805781364440918,
-0.12052544951438904,
0.2869235575199127,
-0.5560069680213928,
0.4275681674480438... | |
I have a number of questions users answer. An unanswered question will have a blank source like shown below:
```
<img src="" id="joinEmailResponse" class="joinResponse" alt="...">
```
I need to be update all empty src tags with 'images/redcross.jpg' and make them visible .show();
I'm toying with the following code... | [
0.3317810297012329,
0.056144461035728455,
0.5207382440567017,
-0.070716492831707,
-0.007378420792520046,
-0.2803005278110504,
0.3903614580631256,
-0.45460161566734314,
-0.2632342576980591,
-0.580193042755127,
0.019031360745429993,
0.5982893705368042,
-0.36825188994407654,
-0.09977317601442... | |
I am trying to port an simple operating system for teaching to android virtual device. The final goal is to boot the OS and make some basic hardware, including the character output and touch screen, work. In order to do that I need some details information about the "hardware" of the AVD, like where the bootloader will... | [
0.2518015503883362,
0.24613185226917267,
0.13596542179584503,
0.27332472801208496,
0.10020531713962555,
0.42607346177101135,
0.09919028729200363,
0.2080325335264206,
0.21228067576885223,
-0.8970617651939392,
-0.0870949923992157,
0.825965404510498,
0.057571299374103546,
-0.07460889965295792... | |
this
```
$('img.joinResponse[src=""]').attr("src", "images/redcross.jpg").show();
``` | [
0.05689023435115814,
0.09097470343112946,
0.7894704937934875,
-0.14548707008361816,
0.016742300242185593,
-0.29023051261901855,
-0.03389597311615944,
-0.3800943195819855,
-0.2718493938446045,
-0.24559509754180908,
-0.44483375549316406,
0.3362111449241638,
-0.5902372002601624,
0.14749006927... | |
I am in early stage of Mobile Device Management implementation. I am in process to get iOS Enterprise developer account.I have already started exploring MDM Server implementation.
I need some iOS sample Check-in data which is received from iOS device. These samples are required to understand to write APIs in server si... | [
0.4166395366191864,
0.32391881942749023,
0.4965887665748596,
-0.21966956555843353,
0.007454198785126209,
0.029556315392255783,
0.3100893497467041,
-0.5124542713165283,
-0.11470812559127808,
-0.4789198637008667,
0.03537507727742195,
0.18312422931194305,
-0.0021505458280444145,
-0.0959558114... | |
as below sample plist format.
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Status</key>
<string>Idle</string>
<key>UDID</key>
<string> [ redacted ] </string>
</di... | [
-0.17355597019195557,
-0.17926789820194244,
0.21467408537864685,
-0.15762962400913239,
-0.18467018008232117,
0.4319864809513092,
-0.3312295377254486,
-0.44624343514442444,
-0.17358028888702393,
-0.7665568590164185,
-0.4603797495365143,
0.12040460854768753,
-0.362072616815567,
-0.3485406339... | |
I'm writing a program that listens to the System Clipboard for changes. The listener runs on a separate thread and performs some action (say, write to file) when the contents of the Clipboard changes.
I'm polling the clipboard using the [ClipboardOwner interface](http://www.javapractices.com/topic/TopicAction.do?Id=82... | [
0.18434323370456696,
0.11367041617631912,
0.4669943153858185,
-0.13070087134838104,
0.15400224924087524,
0.00029401981737464666,
0.1519433856010437,
-0.5248312950134277,
-0.02678474597632885,
-0.7168279886245728,
0.11755199730396271,
0.6761200428009033,
-0.3493623435497284,
0.0088350018486... | |
/* Initialize ClipboardListener and gain ownership of clipboard */
}
@Override
public void lostOwnership(Clipboard clipboard, Transferable transferable)
{
/* Auto-fired when I lose Clipboard ownership.
Can do processing and regaining ownership here */
}
}
```
The problem is... | [
0.22497741878032684,
0.30070164799690247,
0.674371063709259,
-0.07493111491203308,
0.6352940797805786,
-0.07208448648452759,
0.024943087249994278,
0.1778038889169693,
-0.18339189887046814,
-0.508294939994812,
-0.06863174587488174,
0.7536083459854126,
0.004069916903972626,
0.326744765043258... | |
the dock. So if there multiple clipboard operations before I switch to the dock icon, only the last one has any effect. I don't face this issue on Linux or Windows.
It's like the thread goes to sleep when the program loses focus, but the last Event trigger still fires when it wakes up. Is there any way I can prevent t... | [
0.19802677631378174,
0.16931280493736267,
0.5771914124488831,
-0.46726399660110474,
0.06805089116096497,
-0.11805365979671478,
0.26366886496543884,
0.13201908767223358,
-0.854046642780304,
-0.9387384653091431,
0.1324833184480667,
0.8466500043869019,
-0.12248202413320541,
0.0618123076856136... | |
particular. It says "You can therefore record the change count at the time that you take ownership of the pasteboard and later compare it with the value returned from changeCount to determine whether you still have ownership." No mention of using an event to detect changes. | [
0.013406648300588131,
-0.24715465307235718,
0.2991698086261749,
0.1508488953113556,
0.08851365745067596,
-0.10535340756177902,
-0.05504060164093971,
0.22206145524978638,
-0.24214576184749603,
-0.04883420467376709,
0.07767372578382492,
0.3084048330783844,
-0.07505745440721512,
0.04741533100... | |
I have the following structure for my jQuery Accordion:
```
<ul id='accordion'>
<li class='header'>
<a href='#'>Click me</a>
</li>
<li class='content'>
<div>blah blah</div>
</li>
<li class='header'>
<a href='#'>Click me too</a>
</li>
<li class='content'>
<div... | [
-0.1717126965522766,
-0.15046803653240204,
0.7906744480133057,
-0.13258962333202362,
-0.21803660690784454,
0.5782874822616577,
-0.29914265871047974,
0.01813354901969433,
-0.31545305252075195,
-0.7872862219810486,
-0.03158889710903168,
0.47720596194267273,
-0.33920684456825256,
0.0695959553... | |
as well</a>
</li>
<li class='content'>
<div>blah blah</div>
</li>
</ul>
```
I want to put some other links in the header li, but the problem is, the entire li is clickable and activates the li below it. I just want the link text in the header li to be clickable. I have set the header as li.header,... | [
-0.2935996353626251,
0.028613224625587463,
0.7419061660766602,
-0.18087412416934967,
-0.12587615847587585,
-0.06985850632190704,
0.12707172334194183,
0.0823822021484375,
-0.3025064170360565,
-0.843062162399292,
-0.2886776626110077,
0.6169949173927307,
-0.5350635051727295,
0.193797856569290... | |
header: 'li.header',
collapsible: true,
active: false,
autoHeight: false
});
jQuery('li.header a').live('click', function(){
var i = jQuery(this).parent().next().index();
jQuery('#accordion').accordion('activate', i);
});
```
I hope I'm clear with my question! Or advice me if I should code my own... | [
-0.36629924178123474,
-0.19555489718914032,
0.9556233882904053,
-0.1903444230556488,
0.3242078721523285,
0.2729608416557312,
0.1570473462343216,
-0.3247063457965851,
-0.36179256439208984,
-0.9887797832489014,
-0.35135331749916077,
0.7523868083953857,
-0.3887636363506317,
0.0932004004716873... | |
Assume you are given a large number of variables that need to be initialized to None. A naive way to do this would be to count the number of variables on the left, and create a list of the same size on the right:
```
a, b, c, d, e, f, g, h, i, j = [None]*10
```
Is there a way to do this without having to count the v... | [
0.1111593022942543,
0.09691423922777176,
-0.14661158621311188,
-0.08176273107528687,
0.07516319304704666,
0.1970188468694687,
0.24501267075538635,
-0.32890579104423523,
-0.33927756547927856,
-0.6105763912200928,
-0.23912851512432098,
0.5403936505317688,
-0.3773769438266754,
-0.082312002778... | |
i = j = None
```
Note: don't use this for mutable types. If you're curious why, this demonstrates:
```
>>> a = b = []
>>> a.append(1)
>>> a
[1]
>>> b
[1]
``` | [
-0.30276355147361755,
0.27453842759132385,
-0.028201136738061905,
-0.3287447690963745,
-0.08678224682807922,
-0.06400224566459656,
0.34842732548713684,
-0.31671053171157837,
-0.12696422636508942,
-0.5422152280807495,
-0.2406318187713623,
0.474785178899765,
-0.5998358726501465,
0.4336731433... | |
How can I get the supported screen resolutions in XNA? Like when you change the screen resolution in windows, and instead of giving you a list of all the possible choices, it gives you just a few of them.
Just use this:
```
foreach (DisplayMode mode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) {
//mode... | [
0.17648513615131378,
-0.1911296546459198,
0.5073896646499634,
0.006432642228901386,
0.014420490711927414,
-0.11369970440864563,
0.022717813029885292,
0.040005091577768326,
-0.2887750267982483,
-0.9589391350746155,
0.21799059212207794,
0.724590003490448,
-0.24522094428539276,
0.129887491464... | |
How do I find out the sdk version of my blackberry ?
I have a Blackberry 8520 device.
Go to `Options - About` on your device.
Operating system version is equal to the SDK version. | [
0.01228911429643631,
0.08216153085231781,
0.3442018926143646,
0.20735928416252136,
0.29607367515563965,
0.0748356357216835,
0.3232634365558624,
0.32476338744163513,
0.053084325045347214,
-0.6534896492958069,
0.2703302502632141,
0.6640225648880005,
0.10874160379171371,
-0.09483572095632553,... | |
I am making a page in which there will be array of images. I need the images to be zoomed when the mouse is hovered and i got it successfully through java script. But the problem is when the image gets enlarged the position of the other images is also getting changed.
I want such that the zoomed image does not change ... | [
0.22302158176898956,
-0.12869185209274292,
0.7384306788444519,
-0.040653668344020844,
-0.0992172509431839,
0.09279428422451019,
0.12136203050613403,
-0.08330311626195908,
-0.15438486635684967,
-0.8799389004707336,
0.0605866014957428,
0.7791718244552612,
-0.22350701689720154,
0.020582575350... | |
/></div>
```
CSS
```
.container {
position: relative;
}
.container img {
position: absolute;
z-index: 0;
}
.container img:hover {
position: absolute;
z-index: 1;
}
``` | [
-0.6305443644523621,
0.07123693078756332,
0.5459665656089783,
-0.007071042899042368,
0.05073682218790054,
0.2186652421951294,
-0.24588939547538757,
0.1832742542028427,
-0.2515678405761719,
-0.8138424754142761,
-0.4712710380554199,
0.164890319108963,
0.07310962677001953,
0.41086146235466003... | |
I've made a menu strip that I would like fixed to the bottom center of the page. I've tried everything. Is there a way to do this in CSS? I've gotten the menu to be fixed at the bottom of the page with
bottom: 0px
position: fixed
but using
margin: auto auto 0px auto or margin-left: auto
doesn't seem to center th... | [
0.10615377128124237,
0.03957762569189072,
0.6043330430984497,
0.07003677636384964,
-0.022546151652932167,
0.27379509806632996,
-0.12397650629281998,
0.24483254551887512,
-0.2634277045726776,
-0.6992276906967163,
-0.07855383306741714,
0.3715019226074219,
0.008976554498076439,
-0.20355558395... | |
bottom of the page you need to wrap it in another element which has fixed width, say 100% and is positioned on the bottom. And yes, css you can.
```
<section style="position: fixed; bottom: 0px; width: 100%;">
<p style="margin: 0 auto; width: 300px;">Blah blah</p>
</section>
``` | [
-0.17150428891181946,
0.014061863534152508,
0.5731099843978882,
0.14431262016296387,
-0.20777757465839386,
0.08383484929800034,
0.012216467410326004,
0.08992210030555725,
-0.4620504677295685,
-0.6788368225097656,
-0.5267316102981567,
0.025512047111988068,
-0.10509411990642548,
-0.310828417... | |
I've an example sencha touch2 application. It is working fine in my localhost browser(http://localhost/sencha/examples/navigationview/index.html).
Now i need to integrate this sencha applicaiton to android using phonegap 1.5.0.
i've downloaded phonegap libraries from [phonegap](http://phonegap.com/download-thankyou... | [
-0.24165306985378265,
-0.04281691834330559,
0.43149393796920776,
-0.20052658021450043,
-0.20979590713977814,
0.11231106519699097,
0.34677931666374207,
-0.09066063910722733,
-0.02104516141116619,
-0.819744348526001,
0.17774030566215515,
0.7023059725761414,
-0.1554991602897644,
-0.1140461489... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.