unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Magic fields form elements to front end
===
I'm building a site with wordpress and extending their post type elements with "Magic Fields 2", but I need to allow all 'forms elements' provided for magic fields on a front end view, because I can not change the user's scenario (move the user from the site scenario to a CMS scenario), so I wrote a new front end form but now I need to link it with the magic fields elements. And that's my question
Thanks for your time. | 0 | [
2,
2154,
2861,
505,
2065,
20,
431,
241,
800,
3726,
3726,
31,
22,
79,
353,
21,
689,
29,
833,
5890,
17,
8176,
66,
678,
1001,
2065,
29,
13,
7,
21200,
2861,
172,
7,
15,
47,
31,
376,
20,
1655,
65,
13,
22,
4190,
18,
2065,
22,
1173... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
org.xml.sax.SAXParseException: White spaces are required between publicId and systemId
===
I am trying to get Sematic Extraction working on my web page.
http://inproduction.katwilson.co.uk/
via
http://www.w3.org/2003/12/semantic-extractor.html
Well it worked last week, now nothing.
Any idea please. I get this error
Using org.apache.xerces.parsers.SAXParser
Exception net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
but i can not seem to track it down. I have even striped the page right back and nothing.
Is my error in the docutype. not sure.
Thanks Pat.
PS. The page is fully valid and there are no BOM errors.
| 0 | [
2,
13,
5583,
9,
396,
8184,
9,
18,
7522,
9,
18,
7522,
3574,
870,
10066,
872,
45,
359,
7644,
50,
1390,
128,
317,
1340,
17,
329,
1340,
800,
3726,
3726,
31,
589,
749,
20,
164,
1353,
6732,
16748,
638,
27,
51,
2741,
2478,
9,
7775,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IXmlSerializable and xsi:type for derived class
===
I have base class named Point which implements IXmlSerializable interface with ReadXML and WriteXML methods as virtual.These methods have code to store Point information in Point class.
Another class DerivedPoint which is derived from Point also overrides ReadXML and WriteXMl methods.
I have object of type Point which refers Derived Point, eg:
Point pt = new DerivedPoint();
Now when I try to serialize my datastructures which have these points there is no entry for xsi:type="DerivedPoint" in resultant xml. As below
<Point xsi:type="DerivedPoint">
Therefore while Deserialing I face issue to get back DerivedPoint object.
Please help me to solve this issue. | 0 | [
2,
17053,
8184,
4104,
2815,
3186,
579,
17,
993,
18,
49,
45,
4474,
26,
3981,
718,
800,
3726,
3726,
31,
57,
1000,
718,
377,
454,
56,
8713,
18,
17053,
8184,
4104,
2815,
3186,
579,
6573,
29,
1302,
396,
8184,
17,
2757,
396,
8184,
3195,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VBA - newb attempt at Excel function
===
I'm trying to pick up some basic VBA in order to tackle an Excel problem at work, but am woefully out of my C++ comfort zone. I'm assuming some of the syntax is similar to its C counterpart, but I'm falling down somewhat and can't really determine where. I've spent a couple of hours trawling the internet trying to familiarise myself with the general ideas behind what I'm trying to do, but I figured asking people vastly more experienced than myself might be a good idea.
Basically, I need a function that can determine whether a student is in their first, second or third year of study, or whether they are have graduated based on a) the certificate they're studying for and b) the date on which they started.
Here's my first effort - any feedback would be greatly appreciated:
Function YearCalc(start, course)
'Introduce length - the course length in years
Dim length As Integer
'Define length corresponding to specific courses
If course = "Msc" Then
length = 3
ElseIf course = "Adv Dip" Then
length = 2
ElseIf course = "PG Cert" Then
length = 1
End If
Dim lengthm As Integer
lengthm = (length * 12)
'Define diff as the month difference between two dates;
'today's date and the date the course was started.
diff = DateDiff(m, start, Date, vbMonday)
'Compare the date difference to the length of the course,
'such that if the difference is larger than length of the specific course
'the student is marked as 'Past':
If diff >= (lengthm) Then
YearCalc = "Past"
'If the difference is less than the length of the course, determine which
'year they fall into:
Else
If 0 <= (diff - lengthm) < 1 Then
YearCalc = 1
ElseIf 1 <= (diff - lengthm) < 2 Then
YearCalc = 2
ElseIf 2 <= (diff - lengthm) < 3 Then
YearCalc = 3
End If
End If
End Function
Thanks in advance! | 0 | [
2,
566,
969,
13,
8,
78,
220,
1735,
35,
20700,
1990,
800,
3726,
3726,
31,
22,
79,
749,
20,
2036,
71,
109,
2125,
566,
969,
19,
389,
20,
9723,
40,
20700,
1448,
35,
170,
15,
47,
589,
4808,
62,
5655,
70,
16,
51,
272,
20512,
5295,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I reset latlng coordinates for a custom map type?
===
I have made my own map using the google maps api. It is a custom map type based on a really big image.
Is there anyway I can reset the latlng coordinates so they are relative to my image and not the earth's default latlng coordinates?
I.E. Make the top left corner of the image (0,0).
Thanks.
| 0 | [
2,
92,
31,
23422,
333,
7786,
2723,
13714,
26,
21,
5816,
2942,
1001,
60,
800,
3726,
3726,
31,
57,
117,
51,
258,
2942,
568,
14,
8144,
6867,
21,
2159,
9,
32,
25,
21,
5816,
2942,
1001,
432,
27,
21,
510,
580,
1961,
9,
25,
80,
2774,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
three.js - Creating mesh from .obj file using geometry.vertices and geometry.faces
===
I am trying to create a mesh from an .obj file. I am doing this rather than using the obj loader because I meed to morph the shape using different sliders, select specific faces/vertices and draw a path between vertices.
I am currently getting errors when I try to render the scene and it seems to be something to do with the faces from the obj file. When I manually enter the faces I can create a triangle no problem.
Here is my code
var camera, scene, renderer,
geometry, material, mesh;
init();
animate();
function init() {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/img/originalMeanModel.obj', false);
xhr.send(null);
var text = xhr.responseText;
var lines = text.split("\n");
for (i=0; i<19343; i++){
lines[i] = lines[i].split(" ");
}
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 1, window.innerWidth / window.innerHeight, 1, 2000 );
camera.position.z = 20;
scene.add( camera );
var geometry = new THREE.Geometry()
/*
geometry.vertices.push( new THREE.Vector3( -0.01, 0.01, 0 ) );
geometry.vertices.push( new THREE.Vector3( -0.01, -0.01, 0 ) );
geometry.vertices.push( new THREE.Vector3( 0.01, -0.01, 0 ) );
*/
geometry.faces.push( new THREE.Face3( 0, 1, 2 ) );
for(i=0; i<6449; i++){
geometry.vertices.push(
new THREE.Vector3(
parseFloat(lines[i][1]),
parseFloat(lines[i][2]),
parseFloat(lines[i][3])) );
}
/*
geometry.faces.push( new THREE.Face3( 0, 1, 2 ) );
geometry.faces.push( new THREE.Face3( 600, 1, 3000 ) );
geometry.faces.push( new THREE.Face3( 3000, 6400, 70 ) );
*/
for(i=6449; i<19343; i++){
geometry.faces.push( new THREE.Face3( parseInt(lines[i][1]), parseInt(lines[i][2]), parseInt(lines[i][3]) ) );
}
console.log(geometry.faces);
console.log(geometry.vertices);
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: false } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
renderer = new THREE.CanvasRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
}
function animate() {
// note: three.js includes requestAnimationFrame shim
requestAnimationFrame( animate );
render();
}
function render() {
renderer.render( scene, camera );
}
When I inspect the console the faces and vertices have been printed out as expected. I also have this error printed out 5700+ times
Uncaught TypeError: Cannot read property 'visible' of undefined Three.js:71
projectScene Three.js:71
render Three.js:245
render threeDemo.php:115
animate threeDemo.php:106
threeDemo.php:106 is this line of the animate function
render();
threeDemo.php:115 is this line of the render function
renderer.render( scene, camera );
Here is a link the the obj file that I am trying to create a mesh for. https://dl.dropbox.com/u/23384412/originalMeanModel.obj
Is anyone could point me in the right direction it would be really appreciated.
Thanks in advance.
| 0 | [
2,
132,
9,
728,
18,
13,
8,
2936,
55,
1635,
37,
13,
9,
111,
11741,
3893,
568,
11689,
9,
8122,
3568,
18,
17,
11689,
9,
6413,
18,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
55,
1635,
37,
40,
13,
9,
111,
11741,
3893,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Plotting discrete predictions with probability intervals - ggplot2
===
I need to plot some discrete predictions with probability intervals in ggplot2, but I'm having some problems.
I have the following data.frame
city pred min.80 max.80
BH 100 50 150
RJ 120 80 140
SP 90 80 100
I want a plot with the cities on y-axis and the predicted values on x-axis. For each discrete value of y, there should be a horizontal bar with its range being the min.80 and max.80 values. My idea is to use `geom_rect` from `ggplot2` for doing it.
I've tried the following code, but the problem is that I'm converting the discrete variable to continuous in order to plot it, and I lose their values on the label.
> ggplot(df) + geom_rect(aes(xmin=min.80, xmax=max.80, ymin=as.numeric(city)-0.4,
+ ymax=as.numeric(city)+0.4))
Is there another way to do it? | 0 | [
2,
22716,
18563,
13823,
18,
29,
10177,
15899,
13,
8,
13,
4572,
13221,
38,
135,
800,
3726,
3726,
31,
376,
20,
3798,
109,
18563,
13823,
18,
29,
10177,
15899,
19,
13,
4572,
13221,
38,
135,
15,
47,
31,
22,
79,
452,
109,
1716,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Trying to make Web Method Asynchronous
===
The project I am currently working on involves MS SQL Server and ASP.net Web Services that use Session variables. Apparently this causes a client's calls to execute in a sequential manner. I want to make sure that these methods execute asynchronously.
After doing some research it appears to me the choicest method is to persist the session state in the database using a table that tracks sessions ( using guids say ) and separate tables for each session.
Before I dive directly into this I need to know if I can gain the same sense of asynchronous operations for the web service if I configure SQL Server to store the session.
Can I ? | 0 | [
2,
749,
20,
233,
2741,
2109,
21,
16023,
1291,
800,
3726,
3726,
14,
669,
31,
589,
871,
638,
27,
6569,
4235,
4444,
255,
8128,
17,
28,
306,
9,
2328,
2741,
687,
30,
275,
3723,
12157,
9,
3083,
48,
4047,
21,
6819,
22,
18,
3029,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Know an online tool for dumping HTTP request information?
===
Does anyone know of an online tool to which I can send an HTTP request and it would display information about the received request such as HTTP headers, URL parameters, etc.?
This would be simple to implement in a script, of course, except that it requires some place to host it and I figured a site like this must exist out there, but can't seem to google one.
If you've seen something like this, thanks in advance. | 0 | [
2,
143,
40,
2087,
5607,
26,
26523,
7775,
3772,
676,
60,
800,
3726,
3726,
630,
1276,
143,
16,
40,
2087,
5607,
20,
56,
31,
92,
2660,
40,
7775,
3772,
17,
32,
83,
3042,
676,
88,
14,
420,
3772,
145,
28,
7775,
157,
445,
15,
287,
636... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to read data in python when sent from ajax?
===
I'm sending data using AJAX request to a python file. I need to read the data that is sent from AJAX in python.
I'm not able to read data in the python file. Please let me know how to read the data. | 1 | [
2,
184,
20,
1302,
1054,
19,
20059,
76,
795,
37,
20624,
60,
800,
3726,
3726,
31,
22,
79,
4907,
1054,
568,
20624,
3772,
20,
21,
20059,
3893,
9,
31,
376,
20,
1302,
14,
1054,
30,
25,
795,
37,
20624,
19,
20059,
9,
31,
22,
79,
52,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
data type double bug visual studio (need urgent solution)
===
on running the following code (environment = MS Visual Studio 11 beta, C# console app)...
static void Main(string[] args)
{
double value = 0.25;
value = value - 0.2;
value = value - 0.05;
Console.WriteLine(value);
Console.ReadKey();
}
... the variable "value" becomes = -1.38777878078145E-17 `enter code here` | 1 | [
2,
1054,
1001,
1494,
6256,
3458,
1120,
13,
5,
556,
69,
15639,
4295,
6,
800,
3726,
3726,
27,
946,
14,
249,
1797,
13,
5,
28976,
800,
4235,
3458,
1120,
547,
8434,
15,
272,
5910,
8650,
4865,
6,
9,
9,
9,
12038,
11364,
407,
5,
11130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Displaying a Widget in a new Window in GWT
===
I have a requirement wherein I need to display a drag n drop cell table in a new window.
I have checked for answers and I have googled about this, but I did not get appropriate answers.
I am able to open a new window on click of a button. Following is the code which I am using:
@UiHandler(value = { "buttonReleaseView" })
void onReleaseViewClick(ClickEvent clickEvent) {
String winUrl = GWT.getModuleBaseURL() + "releaseView/";
String winName = "Release View";
openNewWindow (winName, winUrl); /* spawn a new window - not popup */
}
/**
* Opens a new windows with a specified URL..
*
* @param name String with the name of the window.
* @param url String with your URL.
*/
public static void openNewWindow(String name, String url) {
com.google.gwt.user.client.Window.open(url, name.replace(" ", "_"),
"menubar=no," +
"location=false," +
"resizable=yes," +
"scrollbars=yes," +
"status=no," +
"dependent=true");
}
Now, how should I display cell Table in this new window?
Please help me out.
Thanks in advance
Richa | 0 | [
2,
17418,
21,
4807,
43,
3060,
19,
21,
78,
1463,
19,
14094,
38,
800,
3726,
3726,
31,
57,
21,
8981,
113,
108,
31,
376,
20,
3042,
21,
5501,
13,
103,
2804,
1667,
859,
19,
21,
78,
1463,
9,
31,
57,
6505,
26,
6709,
17,
31,
57,
8144... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
About to solve simulating click on Href anchor?
===
I was looking for a way to simulate a click on `<a>` tag
as you all know , no success ( the only workaround is by `window.open`...)
however i found some peaces of code in the net and managed to make it work in :
http://jsbin.com/itujek/2/edit
Chrome
IE
the problem is with FF.
I'll be glad to share the code with you , and towards a solution which will wrk in FF.
what should i do in this code in order for this code wo work with FF ?
<script>
function doClick(event, myA)
{
if (myA.click)
{
myA.click()
}
else if (document.createEvent)
{
if (e.target !== myA)
{
var tmpEvent = document.createEvent("MouseEvents");
tmpEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
var allowDefault = myA.dispatchEvent(tmpEvent);
}
}
}
$(document).ready(function(){
$(".myBtn").on('click',function (event)
{ doClick(event, $("#link")[0]); });
});
</script>
</head>
<body>
<a id="link" href="http://www.msdn.com">Normal link</a>
<button type="button" class="myBtn" >
do click</button>
<br />
<br />
</body>
[1]: http://jsbin.com/itujek/edit#source | 0 | [
2,
88,
20,
8402,
4861,
10038,
10840,
27,
746,
14057,
6265,
60,
800,
3726,
3726,
31,
23,
699,
26,
21,
161,
20,
24969,
21,
10840,
27,
13,
1,
58,
1,
3383,
28,
42,
65,
143,
13,
15,
90,
1280,
13,
5,
14,
104,
170,
10037,
25,
34,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Start a thread inside a cpp file of a header file in C++ <process.h>
===
I have a `class A` with a function`void runThread()` to call new thread. This is my `A.cpp` with `struct SendInfo` and function `void thread(...)` are not included in header file `A.h`:
//A.cpp
struct SendInfo{
int a;
std::string mess;
SendInfo(int _a, std::string _mess){
a = _a;
mess = _mess;
}
};
void thread(SendInfo* args){
std::cout << args->mess << std::endl; // Result here is nothing :-?
}
void A::runThread(){
SendInfo info(10,"dump_string");
std::cout << info.mess << std::endl; // Result here is "dump_string"
_beginthread((void(*)(void*))thread, 0, &info);
}
When in main function, i call `runThread()` of `A object`, the result of `info.mess` is good, but `args->mess` have no string. So what's my problem? and how to solve it? | 0 | [
2,
799,
21,
9322,
572,
21,
272,
3421,
3893,
16,
21,
157,
106,
3893,
19,
272,
20512,
13,
1,
16835,
9,
252,
1,
800,
3726,
3726,
31,
57,
21,
13,
1,
1898,
21,
1,
29,
21,
1990,
1,
2625,
1340,
485,
96,
10647,
5,
6,
1,
20,
645,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to create such a php script so that it can take same argument from other php script and command line both
===
the scenario is like i am creating php script which is taking arguments from command line right now but after sometime it may change to simply including my php script. So how can i prepare my script for both scenarios means, Can I create such php script so that it can take argument from command line and from other script which is simply including my script. | 0 | [
2,
184,
20,
1600,
145,
21,
13,
26120,
3884,
86,
30,
32,
92,
247,
205,
5476,
37,
89,
13,
26120,
3884,
17,
1202,
293,
156,
800,
3726,
3726,
14,
12705,
25,
101,
31,
589,
2936,
13,
26120,
3884,
56,
25,
741,
10553,
37,
1202,
293,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set two ajax event for one click action in JSF 2.0
===
i have to implement a scenerio Like To change an image and display Text correspondingly. means two ajax at same time ... so i am writing a code like this but image is changing and it is working but Text is not displaying .
TEXT is coming after refresh of that page i.e Text is replaced but it is not displaying .....
**Code is:**
<h:commandLink class="SampleImageCSS">
<h:graphicImage id="sample2" alt="No iamge to display"
value="#{carDetails.carUrl2}" height="100" width="100"
title="Car For Beeding" />
<f:setPropertyActionListener target="#{carDetails.rootImage}"
value="#{carDetails.carUrl2}" />
<f:setPropertyActionListener target="#{carDetails.view}"
value="#{carDetails.viewDetails['carUrl2']}" />
<f:ajax event="action" render="rootImage">
</f:ajax>
<f:ajax event="action" render="ViewId">
</f:ajax>
</h:commandLink>
how to fire ajax request to do two job at same time ??
please Help.
| 0 | [
2,
184,
20,
309,
81,
20624,
807,
26,
53,
10840,
1028,
19,
487,
18,
410,
172,
9,
387,
800,
3726,
3726,
31,
57,
20,
8713,
21,
1691,
5741,
101,
20,
753,
40,
1961,
17,
3042,
1854,
7265,
102,
9,
1108,
81,
20624,
35,
205,
85,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Windows media player cannot play rtsp and mms stream urls in Session 0 of Win7 and Win Server 2008
===
In Windows Server 2003, we developed a program. The architecture is:
(1)There is a Service (called ServA),
(2)There is a process (called ProcB), it is an override Windows Media Player by implementing some necessary WMP interfaces.
(3)ServA will start up ProcB through CreateProcess to play stream urls. ServA and ProcB are all in Session 0.
In Server 2003, it works well.
Now we are transferring it to Windows Server 2008. In Server 2008, it works normally with http protocol urls (like http: //xx/xx.wmv). For rtsp and mms protocol urls (like rtsp://xx/xx.wmv, mms://xx/xx.asf), it cannot play successfully, and return the error code: 0xC00D11B1, error description: “Windows Media Player encountered a problem while playing the file.”
If we donnot start ServA as a service, but just double clicked to start up it. Then ServA and ProcB are all in Session 1. At this time the rtsp and mms protocol urls can play successfully.
In Win 7, the phenomenon is the same with that in Server 2008. We have checked our display and sound devices, and we can assure there is no problem with them.
You can link this url http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/0317c921-dc9c-4e95-9800-77a34f9f516a for more details. | 0 | [
2,
1936,
941,
517,
1967,
418,
13,
5256,
3401,
17,
1620,
18,
3766,
13,
911,
7532,
19,
3723,
713,
16,
628,
465,
17,
628,
8128,
570,
800,
3726,
3726,
19,
1936,
8128,
973,
15,
95,
885,
21,
625,
9,
14,
2607,
25,
45,
13,
5,
165,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
why facebook wall post graph api is not working for AMD processor system?
===
Hello expert i got one issue in facebook wall post. I am using graph api for posting an image on user wall but it's not working for AMD processor system.
The code is as follows:
var postableImage = 'http://i.imgur.com/JdIOE.png';
var message = "Hello track my birthday";
FB.api(data+'/photos', 'post', {
message: message,
url: postableImage
}, function(response){
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id);
$('#postMsg').html('');
window.location.reload();
}
}); | 1 | [
2,
483,
9090,
769,
678,
7210,
21,
2159,
25,
52,
638,
26,
589,
43,
14762,
329,
60,
800,
3726,
3726,
10975,
5390,
31,
330,
53,
1513,
19,
9090,
769,
678,
9,
31,
589,
568,
7210,
21,
2159,
26,
15669,
40,
1961,
27,
4155,
769,
47,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to find a socket's ip address c++/c
===
I want to know how to get the IP address of a client who connects to a socket on a server using accept. How would I do this? getpeername returns a wrong IP address, and I can't seem to find another way to do it. | 0 | [
2,
184,
20,
477,
21,
18482,
22,
18,
15735,
3218,
272,
20512,
118,
150,
800,
3726,
3726,
31,
259,
20,
143,
184,
20,
164,
14,
15735,
3218,
16,
21,
6819,
72,
8534,
20,
21,
18482,
27,
21,
8128,
568,
3440,
9,
184,
83,
31,
107,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
data types error in Arduino
===
I was working on a project for a teacher when i encountered this error:
two or more data type in declaration of 'timer16_Sequence_t'
It happened on this piece of code:
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
I know this error is normally caused when forgetting the semicolon, but can it also have another cause? The same piece of code works fine when I dont use a custom library, but when I do this error pops up, and i cant figure out why. The language I use to program this is Arduino C. | 0 | [
2,
1054,
2551,
7019,
19,
13,
1514,
291,
3252,
800,
3726,
3726,
31,
23,
638,
27,
21,
669,
26,
21,
2197,
76,
31,
8208,
48,
7019,
45,
81,
54,
91,
1054,
1001,
19,
7098,
16,
13,
22,
891,
139,
1091,
1,
29413,
1,
38,
22,
32,
1190,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
flask-sqlalchemy with dynamic database connections
===
I have one main db, in which each client's own db connection is stored.
So every client works with 2 db: main and its own db, connection of which must be decided
for each http call. How can I do this using flask-sqlalchemy extension, or may be
purely in sqlalchemy?
| 0 | [
2,
28972,
8,
18,
22402,
192,
2569,
915,
29,
7782,
6018,
6760,
800,
3726,
3726,
31,
57,
53,
407,
13,
9007,
15,
19,
56,
206,
6819,
22,
18,
258,
13,
9007,
2760,
25,
8214,
9,
86,
352,
6819,
693,
29,
172,
13,
9007,
45,
407,
17,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sorting data with content both alphaNumeric
===
I hava a alpha numeric data like
1
1a
1b
2
2b
10
10a
If i sort this data out put will be like :
1
1a
10
10a
2
2b
But i want output as:
1
1a
2
2b
10
10a
How to get this output with Oracle command ?
| 0 | [
2,
2058,
68,
1054,
29,
2331,
156,
5705,
6336,
14744,
800,
3726,
3726,
31,
13,
20648,
21,
5705,
15764,
596,
1054,
101,
137,
137,
58,
137,
220,
172,
172,
220,
332,
332,
58,
100,
31,
2058,
48,
1054,
70,
442,
129,
44,
101,
13,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What value puts Jam in its builtin variable $(OS) on QNX Neutrino hosts?
===
I have to configure my compilation depending on build hosts. Windows and Linux are easy and I have access to the build hosts to test it myself anyway.
What I have so far completely failed to find are the values of $(OS) and, just to check my expectations, $(OSPLAT). I assume OSPLAT to be X86 on x86 machines, similar to other QNX supported SDP packages
If anyone has access to a QNX/Neutrino system with installed QNX SDP, the Jam script below can produce the result:
Echo $(OS) $(OSPLAT) ;
| 0 | [
2,
98,
1923,
11179,
4001,
19,
82,
392,
108,
7612,
5579,
5,
759,
6,
27,
2593,
103,
396,
29700,
5397,
60,
800,
3726,
3726,
31,
57,
20,
1065,
15951,
51,
4868,
4758,
27,
1895,
5397,
9,
1936,
17,
13024,
50,
2010,
17,
31,
57,
1381,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Storing a session with Spring Security
===
I just read ["5.4.4 Storing the SecurityContext between requests"][1] and now I would like an example of it. A simple project where one can submit a username and password and receive a user object in return. I know this works for a non-web service:
`User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();`
[1]: http://static.springsource.org/spring-security/site/docs/3.0.x/reference/technical-overview.html#tech-intro-sec-context-persistence | 0 | [
2,
25615,
21,
3723,
29,
1573,
1221,
800,
3726,
3726,
31,
114,
1302,
636,
7,
264,
9,
300,
9,
300,
25615,
14,
1221,
1126,
11969,
128,
12279,
7,
500,
2558,
165,
500,
17,
130,
31,
83,
101,
40,
823,
16,
32,
9,
21,
1935,
669,
113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
string comparison in selenium ide?
===
<tr>
<td>store</td>
<td>inline-block </td>
<td>blank</td>
</tr>
<tr>
<td>store</td>
<td>none </td>
<td>blank</td>
</tr>
<tr>
<td>gotoIf</td>
<td>${a}==${blank}</td>
<td>labelA</td>
</tr>
<tr>
<td>gotoIf</td>
<td>storedVars['a']==storedVars['blank']</td>
<td>ddddd</td>
</tr>
I want to compare strings variables, i tried both the scenarios i mentioned above. This both scenarios are not working for string comparison | 0 | [
2,
3724,
6050,
19,
23027,
14311,
13,
3448,
60,
800,
3726,
3726,
13,
1,
6384,
1,
13,
1,
38,
43,
1,
16828,
1,
118,
38,
43,
1,
13,
1,
38,
43,
1,
108,
1143,
8,
12048,
13,
1,
118,
38,
43,
1,
13,
1,
38,
43,
1,
10754,
5719,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Run unit tests in IntelliJ IDEA from multiple modules together
===
How can I run all tests from two or more IDEA modules at once?
I'm using many modules and it is important to run all of the unit tests often and when I choose more than one folder to run, there's no 'run' option on the context menu any more.
| 0 | [
2,
485,
1237,
4894,
19,
19,
4213,
9999,
882,
37,
1886,
17113,
429,
800,
3726,
3726,
184,
92,
31,
485,
65,
4894,
37,
81,
54,
91,
882,
17113,
35,
382,
60,
31,
22,
79,
568,
151,
17113,
17,
32,
25,
681,
20,
485,
65,
16,
14,
1237... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ClearCase UCM plugin in Jenkins unable to find baseline
===
I'm trying to set up Jenkins (v1.47) to build a project using the ClearCase UCM (v1.1.2) plugin (https://wiki.jenkins-ci.org/display/JENKINS/ClearCase+UCM+Plugin).
With the following config (names changed to protect the innocent):<br/>
Stream: project_dev_build@\company_pvob<br/>
Component: project_tools@\company_pvob<br/>
Promotion level: INITIAL
I get the following output:<br/>
[CCUCM] * Stream: project_dev_build@\company_pvob<br/>
[CCUCM] * Component: project_tools@\company_pvob<br/>
[CCUCM] * Promotion level: INITIAL<br/>
[CCUCM] Removed 45 of 45 Baselines.<br/>
[CCUCM] No valid baselines found
I can see in my ClearCase client that there are exactly 45 baselines, all in the INITIAL promotion level, for that stream and component. So the plugin obviously finds and then discards them.
But why? I expected the latest one to be picked up, why are they all rejected? | 0 | [
2,
1207,
10325,
12669,
79,
10922,
108,
19,
11420,
2343,
20,
477,
27150,
800,
3726,
3726,
31,
22,
79,
749,
20,
309,
71,
11420,
13,
5,
710,
165,
9,
2918,
6,
20,
1895,
21,
669,
568,
14,
1207,
10325,
12669,
79,
13,
5,
710,
165,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
strange behavior of NSString
===
I have a NSString that will be passed as a parameter to my library's function, the NSString is passed by another library. The strange thing is, if I pass the NSString * to the library call, the call will fail, but if I convert the NSString * to int and then convert the int back to NSString, every thing is fine.
But by printing it out using NSLog("%@") the two string are identical. What may cause this? Encoding? | 0 | [
2,
2578,
3257,
16,
13,
2172,
11130,
800,
3726,
3726,
31,
57,
21,
13,
2172,
11130,
30,
129,
44,
1100,
28,
21,
18906,
20,
51,
1248,
22,
18,
1990,
15,
14,
13,
2172,
11130,
25,
1100,
34,
226,
1248,
9,
14,
2578,
584,
25,
15,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any performance gain by including columns with default values in insert statements?
===
If I have a table like
CREATE TABLE [FooTable](
[foo] [varchar](50) NOT NULL,
[foo_boo] [bit] NOT NULL DEFAULT ((0)),
[foo_date] [datetime] NOT NULL DEFAULT (getdate())
)
Is there any performance gain to include the defaults for an insert, like this
INSERT INTO [FooTable]
([foo],[foo_boo],[foo_date])
VALUES
('FooBar', 0, GETDATE())
Over letting the defaults do their thing
INSERT INTO [FooTable] ([foo])
VALUES ('FooCooYoo')
I assume it's negligible, but was just wondering.
Thanks! | 0 | [
2,
25,
80,
186,
956,
3288,
34,
215,
7498,
29,
12838,
4070,
19,
14692,
9015,
60,
800,
3726,
3726,
100,
31,
57,
21,
859,
101,
1600,
859,
636,
3670,
579,
500,
5,
636,
4120,
111,
500,
636,
3311,
5433,
500,
5,
2290,
6,
52,
16203,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mysql : combining multiple integer fields into one?
===
Let's say I have a table with millions of rows in which I have 3 integral variables: x,y and z against which I do my searching in a SELECT... WHERE x=a and y=b and z=c
Which would be faster / more efficient?
- combining the 3 fields into a string "x_y_z" (e.g. 1231_3242_6864) and indexing it
- Making a 3 column index against the three integers? | 0 | [
2,
51,
18,
22402,
13,
45,
12803,
1886,
13820,
2861,
77,
53,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
21,
859,
29,
11999,
16,
11295,
19,
56,
31,
57,
203,
9315,
12157,
45,
993,
15,
93,
17,
2052,
149,
56,
31,
107,
51,
579... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android: Blocking RPC with progress dialog
===
I have an Android App that uses an RPC mechanism to set/get information to/from a server. I call the RPCs from whithin the main thread (blocking) and I want them to be blocking. However, sometimes a call can last for some seconds and I'd like to display an indeterminate progress dialog after some specified time (e.g. 1 second).
I tried to spawn a new thread that makes the call and the main thread waits in a loop (with sleeps) until the call has been finished. Inside this loope I show the progress dialog but this is not working.
Is it possible to show and update the progress dialog inside another Thread or does anybody know a better solution that allows me to use blocking calls?
| 0 | [
2,
13005,
45,
11828,
761,
5779,
29,
3455,
28223,
800,
3726,
3726,
31,
57,
40,
13005,
4865,
30,
2027,
40,
761,
5779,
6534,
20,
309,
118,
3060,
676,
20,
118,
2665,
21,
8128,
9,
31,
645,
14,
761,
5779,
18,
37,
5558,
7359,
14,
407,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rspec failing in rails
===
I am receiving the following errors for my Rspec test in rails
1) MoviesController searching for similar movies should find the similar movies by director
Failure/Error: get :similar, {:id => "1"}
ActiveRecord::RecordNotFound:
Couldn't find Movie with id=1
# ./app/controllers/movies_controller.rb:63:in `similar'
# ./spec/controllers/movies_controller_spec.rb:16:in `block (3 levels) in <top (required)>'
2) MoviesController searching for similar movies should select the Similiar Movies template for rendering
Failure/Error: get :similar, {:id => "1"}
ActiveRecord::RecordNotFound:
Couldn't find Movie with id=1
# ./app/controllers/movies_controller.rb:63:in `similar'
# ./spec/controllers/movies_controller_spec.rb:22:in `block (3 levels) in <top (required)>'
3) MoviesController searching for similar movies it should make the results available to the template
Failure/Error: get :similar, {:id => "1"}
ActiveRecord::RecordNotFound:
Couldn't find Movie with id=1
# ./app/controllers/movies_controller.rb:63:in `similar'
# ./spec/controllers/movies_controller_spec.rb:29:in `block (3 levels) in <top (required)>'
And this is my controller method that is causing it to fail:
def similar
@movie = Movie.find(params[:id])
@movies = Movie.find_all_by_director(Movie.find_by_id(params[:id])[:director])
if @movies.count <= 1
redirect_to movies_path
flash[:notice] = "'#{@movie.title}' has no director info"
end
I can't understand why this test keeps failing with the same error. Any help would be much appreciated
| 0 | [
2,
13,
1224,
12610,
7250,
19,
2240,
18,
800,
3726,
3726,
31,
589,
3396,
14,
249,
11908,
26,
51,
13,
1224,
12610,
1289,
19,
2240,
18,
137,
6,
4795,
12898,
1252,
5792,
26,
835,
4795,
378,
477,
14,
835,
4795,
34,
559,
2990,
118,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
POST request using QWebkit in Qt / C++
===
I would like to automate the process of filling out a form on the web, sending a request, and processing the resulting page over and over again (with different inputs). (I realize this is typically done with perl or python, but I'm using C++ / Qt for now for other things)
I'm able to access the page using QWebPage / connect (with a method that waits for the loadFinished signal). I can traverse the fields and fill in values using QWebPage, QWebElement's firstChild, nextSibling, and setPlainText methods.
However, I'm kind of stuck as to how to submit the information and retrieve the response to the post request. From online tutorials, it looks like I can use evaluateJavaScript() to click a submit button, but I don't see how to get/refresh the page resulting from the post submission. (note the content type is multipart/form-data, and the post request is sent to a php script). It also looks like using the QNetworkRequest class might have the functionality to do this, but I'm unclear on how. | 0 | [
2,
678,
3772,
568,
2593,
14113,
13703,
19,
2593,
38,
13,
118,
272,
20512,
800,
3726,
3726,
31,
83,
101,
20,
3108,
5281,
14,
953,
16,
7702,
70,
21,
505,
27,
14,
2741,
15,
4907,
21,
3772,
15,
17,
5511,
14,
2927,
2478,
84,
17,
84... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a Java library for calculating elapsed time?
===
I am wondering if there is a library one can use that calculates elapsed time? Something like... if you pass it a `long` of milliseconds, you get a result like "2d 5h 12m 55s" (possibly even more formats similarly to `SimpleDateFormatter`).
I've heard of jodatime, but I've never used it. Can it be used for such calculations, or are there other more appropriate libraries?
It's not like I can't knock up a few methods myself, but I find myself doing this every now and then and that's why I'm wondering if something like this already exists. | 0 | [
2,
25,
80,
21,
8247,
1248,
26,
22937,
13,
62,
17057,
43,
85,
60,
800,
3726,
3726,
31,
589,
5712,
100,
80,
25,
21,
1248,
53,
92,
275,
30,
18469,
18,
13,
62,
17057,
43,
85,
60,
301,
101,
9,
9,
9,
100,
42,
1477,
32,
21,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sentences division
===
I have to divide text for separated sentences.
Ok. It seem be very simple.
Just search for the "." or "?" or "!" and add next sentence to the array.
But unfortunately is not so great and simple.
How can I avoid situation when:
Washington, D.C.
will be splitted for: "Washington, D" and "C".
Maybe is the database with acronyms which contains "." ?
Thanks for tips in advance!
| 0 | [
2,
13453,
460,
800,
3726,
3726,
31,
57,
20,
8918,
1854,
26,
4196,
13453,
9,
5854,
9,
32,
2260,
44,
253,
1935,
9,
114,
2122,
26,
14,
13,
7,
9,
7,
54,
13,
7,
60,
7,
54,
13,
7,
187,
7,
17,
3547,
328,
5123,
20,
14,
7718,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iTunesConnect GameCenter LeaderBoard new feature move to group
===
There is a new feature in game center, iTunes Connect.It says:
> To share leaderboards and achievements of this app with other apps you have provided, move this app to a Game Center group
My question is about datas. I have an app in app store. I will have another app too. If I use this share feature, will my first app leaderboard scores be deleted or do you know anything about this feature | 0 | [
2,
12952,
25996,
250,
12641,
1156,
2806,
78,
1580,
780,
20,
214,
800,
3726,
3726,
80,
25,
21,
78,
1580,
19,
250,
459,
15,
12952,
6379,
9,
242,
898,
45,
13,
1,
20,
1891,
1156,
2806,
18,
17,
10446,
16,
48,
4865,
29,
89,
4865,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Matlab saving file as name defined within other variable
===
I want to load multiple variables into one .mat file at the end of a process loop. I have a simple line of code :
save draw.mat Output
but I cannot work out a way to code 'use the name given by variable X' instead of 'Output', so that I can loop the process and save multiple variables in draw.mat
So then
X = 'Chocolate'
and the Variable name is saved as Chocolate .
I am sure it is simple but I cannot find a solution on here! | 0 | [
2,
4277,
9086,
7599,
3893,
28,
204,
2811,
363,
89,
7612,
800,
3726,
3726,
31,
259,
20,
6305,
1886,
12157,
77,
53,
13,
9,
5146,
3893,
35,
14,
241,
16,
21,
953,
5293,
9,
31,
57,
21,
1935,
293,
16,
1797,
13,
45,
2079,
2003,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Passing multiple custom object to objective c method
===
I am new in ios devlopment . I want to pass custom object to objective c method.
Here is my code:
In GroupClass.h:
-(RestaurantGuide) initRestaurant:(Restaurant *)restaurant resType:(RestaurantType *)resTypes;
In GroupClass.m:
-(RestaurantGuide) initRestaurant:(Restaurant *)restaurant resType:(RestaurantType *)resTypes
{
self.res = restaurant;
self.resType = resTypes;
return self;ss
}
I got error . I can't solve this . Please help how to write this method and how to call this.
| 0 | [
2,
2848,
1886,
5816,
3095,
20,
7038,
272,
2109,
800,
3726,
3726,
31,
589,
78,
19,
13,
7760,
9664,
11362,
1130,
13,
9,
31,
259,
20,
1477,
5816,
3095,
20,
7038,
272,
2109,
9,
235,
25,
51,
1797,
45,
19,
214,
1898,
9,
252,
45,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ANDROID : Share session between Webview and httpclient
===
I have actually a logged session in my WebView.
But i use also httpclient to send and get data from the web. I saw on the internet that it's impossible to get the content of a WebView, so i needed to use my httpclient to get data from a webservice.
The problem is that this webservice use session... and my session is in my WebView, so the httpclient don't have it and i can't access to the content of the webservice.
I see many post about this problem but i didn't understand the solution.
Here is what i did on my onPageStarted :
CookieManager mgr = CookieManager.getInstance();
Log.i( "URL", url );
Log.i("Cookie",mgr.getCookie("mywebsite.com"));
String cookie_string = mgr.getCookie("mywebsite.com");
if(cookie_string.length() > 1) {
Data.instance().getPref().edit().putString("cookie",cookie_string).commit();
}
I saw that i have this kind of things, so i hope that it's include session too :
(i remove the number)
__utma=......(number)......;
__utmc=number;
__utmz=number.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
wt3_eid=%number%number;
wt3_sid=%number
Then i don't know how to do in order to set this cookie in my httpclient. I try that, with no success :
HttpClient client = new DefaultHttpClient();
BasicCookieStore cookieStore = new BasicCookieStore();
String login_cookie_string = Data.instance().getPref().getString("cookie", "");
String[] cookie_parts = null;
if(login_cookie_string.length()> 0)
{
//debug_view.setText(login_cookie_string);
Log.d("COOKIE", login_cookie_string);
cookie_parts = login_cookie_string.split(";");
for(int t=0;t < cookie_parts.length;t++)
{
String[] cookieContent = cookie_parts[t].split("=");
Cookie login_cookie = new BasicClientCookie(cookieContent[0],cookieContent[1]);
((BasicClientCookie) login_cookie).setDomain("mywebsite.com");
cookieStore.addCookie(login_cookie);
}
}
((AbstractHttpClient) client).setCookieStore(cookieStore);
I don't understand what's wrong so if you can help me, thank you very much !!! | 0 | [
2,
13005,
13,
45,
1891,
3723,
128,
2741,
4725,
17,
7775,
150,
18513,
38,
800,
3726,
3726,
31,
57,
1121,
21,
13,
19287,
3723,
19,
51,
2741,
4725,
9,
47,
31,
275,
67,
7775,
150,
18513,
38,
20,
2660,
17,
164,
1054,
37,
14,
2741,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Editable area disappears when sorting item in a jquery UI sortable
===
The title may sound weird. Well, it is.
Here's an approximation of my code (it lacks some useless ajax calls for this example, and simplifies some other stuff): http://jsfiddle.net/pKNAz/3/
Suppose you have a list of draggable items (in this case, there's only a draggable called "Add a Wysiwyg") which you can move into a drop zone (a grey rectangle in my example), and it appends a textarea, which then, after dropping, I convert into a wysiwyg using the jwysiwyg library (i couldn't add all the images and css this plugin uses, but the textarea basic behaviors (ctrl+b, ctrl+i, ctrl+u) work, so we can assume it's working).
It works particularly well at drop time. However it turns to break the jwysiwyg when sorting. You can try it by yourself dragging the dark grey handle after having two jwysiwyg's. You'll see the jwysiwyg you sorted has lost its jwysiwyg. You can still get the correct value you previously wrote inside the textarea by searching `$('textarea.overflow').val()`, but you cannot use jwysiwyg anymore.
Has anybody an idea on how to solve this problem? Thanks in advance | 0 | [
2,
9392,
579,
217,
20341,
76,
2058,
68,
9101,
19,
21,
487,
8190,
93,
13,
5661,
2058,
579,
800,
3726,
3726,
14,
581,
123,
646,
5455,
9,
134,
15,
32,
25,
9,
235,
22,
18,
40,
20289,
16,
51,
1797,
13,
5,
242,
1792,
18,
109,
1285... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
finding closest pair sum in two arrays?
===
Given two sorted arrays of integers, and an integer sum,
you have to find i,j such that
a[i] + b[j] <= n
and a[i] + b[j] is large as possible.
the best solution i can think of is O(nlogn) taking every integer from first array and finding the lower bound of "sum-a[i]" .
can anyone suggest me a better way to do this (may be O(n))
thanks in advance.
| 0 | [
2,
3007,
6993,
2146,
3907,
19,
81,
7718,
18,
60,
800,
3726,
3726,
504,
81,
22554,
7718,
18,
16,
13820,
18,
15,
17,
40,
13820,
3907,
15,
42,
57,
20,
477,
31,
15,
728,
145,
30,
21,
2558,
49,
500,
2754,
334,
2558,
728,
500,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to remove error "The remote server returned an error: NotFound."?
===
I have developed silverlight web part for sharepoint 2010. I have developed nearly 5 web part in sharepoint 2010. All the web parts was working fine upto last night on development machine as well as on server. Now today I started my computer. I have tried to run my web part in vs 2010. I was not working. It is giving error as e.Message - `The remote server returned an error: NotFound.` and e.StackTrace - at
System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryGetResponseAsyncCallback(IAsyncResult asyncResult)
The following is my code
public void GetAllCompanies(ListItemCollectionDelegate populateMethod)
{
CompaniesListItemCollectionDelegate = populateMethod;
ClientContext clientContext = ClientContext.Current;
List list = clientContext.Web.Lists.GetByTitle("Companies");
companiesListItemCollection = list.GetItems(CamlQuery.CreateAllItemsQuery());
//clientContext.Load(list);
clientContext.Load(companiesListItemCollection);
clientContext.ExecuteQueryAsync(handleAllCompaniesRequestSucceeded, handleAllCompaniesRequestFailed);
}
private void handleAllCompaniesRequestSucceeded(object sender, ClientRequestSucceededEventArgs e)
{
////call back on the UI thread
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
{
CompaniesListItemCollectionDelegate(companiesListItemCollection);
});
}
private void handleAllCompaniesRequestFailed(object sender, ClientRequestFailedEventArgs e)
{
System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("GetAllCompanies Method Error : " + e.Exception);
});
}
In the above code breakpoints in method `handleAllCompaniesRequestFailed` gets hit. It executes all statement within `GetAllCompanies`. I checked that the the development machine is able to access the local sharepoint site in browser. Can you please tell me why this web part is not working today ? Can you please provide me any code or link through which I can resolve the above issue ? | 0 | [
2,
184,
20,
4681,
7019,
13,
7,
124,
5388,
8128,
587,
40,
7019,
45,
52,
12235,
9,
7,
60,
800,
3726,
3726,
31,
57,
885,
1172,
3130,
2741,
141,
26,
1891,
3132,
498,
9,
31,
57,
885,
1212,
331,
2741,
141,
19,
1891,
3132,
498,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I unbind another jQuery function on .click()?
===
Okay, so here's the deal. Fairly notice with jQuery...hoping you guys can help.
I have this script that run to fix my menu bar to the browser on scroll. Nothing really needs to change here (works as it should). However, you may need it...
var div = $('#wizMenuWrap');
var editor = $('#main_wrapper');
var start = $(div).offset().top;
$(function fixedPackage(){
$.event.add(window, "scroll", function() {
var p = $(window).scrollTop();
$(div).css('position',((p)>start) ? 'fixed' : 'static');
$(div).css('top',((p)>start) ? '0px' : '');
//Adds TOP margin to #main_wrapper (required)
$(editor).css('position',((p)>start) ? 'relative' : 'static');
$(editor).css('top',((p)>start) ? '88px' : '');
});
});
Now for the issue at hand. I have another script function that calls a modal pop-up (which again works as it should). However, it's not slick from a UI perspective when I scroll the page when the modals open. So I want to disable the script above when the modal script below is called. So in other words, when i click to open the modal pop-up, the script above shouldn't work. You dig?
$(function () {
var setUp = $('.setupButton');
// SHOWS SPECIFIED VIEW
$(setUp).click(function () {
$('#setupPanel').modal('show');
//PREVENTS PACKAGE SELECT FIXED POSITION ON SCROLL
$(setUp).unbind('click',fixedPackage);
});
})
As you can see above, I tried to unbind the scroll function (the first code snippet), but this is not correct - nor am I even close I don't think.
BTW - these two scripts are in two separate js libraries.
Help?
| 0 | [
2,
184,
107,
31,
367,
4772,
43,
226,
487,
8190,
93,
1990,
27,
13,
9,
150,
10129,
5,
6,
60,
800,
3726,
3726,
1705,
15,
86,
235,
22,
18,
14,
1183,
9,
6647,
3551,
29,
487,
8190,
93,
9,
9,
9,
5347,
68,
42,
2776,
92,
448,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python equivalent of Java's compareTo()
===
I'm doing a project in Python (3.2) for which I need to compare user defined objects. I'm used to OOP in Java, where one would define a `compareTo()` method in the class that specifies the natural ordering of that class, as in the example below:
public class Foo {
int a, b;
public Foo(int aa, int bb) {
a = aa;
b = bb;
}
public int compareTo(Foo that) {
// return a negative number if this < that
// return 0 if this == that
// return a positive number if this > that
if (this.a == that.a) return this.b - that.b;
else return this.a - that.a;
}
}
I'm fairly new to classes/objects in Python, so I'd like to know what is the "pythonic" way to define the natural ordering of a class? | 0 | [
2,
20059,
4602,
16,
8247,
22,
18,
11590,
262,
5,
6,
800,
3726,
3726,
31,
22,
79,
845,
21,
669,
19,
20059,
13,
5,
240,
9,
135,
6,
26,
56,
31,
376,
20,
11590,
4155,
2811,
3916,
9,
31,
22,
79,
147,
20,
13,
21709,
19,
8247,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
layered PSD or TIFF creation from webpage (either PHP or JS)
===
Does anybody know which programming library I should use to throw a transparent PNG on top of a JPG and export a layered file for photoshop ? like a TIF or PSD or anything that can be loaded in photoshop.
I know the GD library can be used to output to screen or a non-layered file, but I'm wondering is there any format I can output to with proper intact layers...
Preferably something clientside with JS but I can do PHP serverside if that's my only option. I've done a bit of googling on the subject, hard to format the search really.
Any ideas would be really appreciated.
Thanks ! | 0 | [
2,
5385,
69,
8613,
43,
54,
13,
38,
6021,
2502,
37,
2741,
6486,
13,
5,
18840,
13,
26120,
54,
487,
18,
6,
800,
3726,
3726,
630,
11181,
143,
56,
3143,
1248,
31,
378,
275,
20,
3814,
21,
14862,
351,
2723,
27,
371,
16,
21,
487,
9623... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Create "duplicate copy" of github repository
===
I see answers to similar questions and I'm sure I may just not be familiar enough with Git and Github terminology to know if they apply to my question. What I need to do is to clone an existing Github remote repository (a private repo under another person's username that I have contributor access to) and create a new private remote repo under my account. The existing repo user is going to make significant alterations to the repo, delete, and re-push, before they do that they want me to clone and create a duplicate so we can continue working from the repo under my user. I want to preserve the commit history with the repo if possible.
I've cloned locally but don't can't seem to figure out how to push it to a new remote that isn't origined to the original user. | 0 | [
2,
1600,
13,
7,
2323,
26811,
4344,
7,
16,
13,
10404,
20926,
24869,
800,
3726,
3726,
31,
196,
6709,
20,
835,
2346,
17,
31,
22,
79,
562,
31,
123,
114,
52,
44,
3694,
511,
29,
13,
10404,
17,
13,
10404,
20926,
20513,
20,
143,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error with google appengine using pyramid
===
Using pyramid_appengine my project works fine but, when i deploy to GAE i have this error:
>
Traceback (most recent call last):
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 225, in _LoadHandler
handler = __import__(path[0])
File "/base/data/home/apps/s~muncompy/v3.359898035587494190/muncompy/__init__.py", line 36, in <module>
application = make_app()
File "/base/data/home/apps/s~muncompy/v3.359898035587494190/muncompy/__init__.py", line 32, in make_app
config.scan()
File "/base/data/home/apps/s~muncompy/v3.359898035587494190/pyramid/config/__init__.py", line 912, in scan
ignore=ignore)
File "/base/data/home/apps/s~muncompy/v3.359898035587494190/venusian/__init__.py", line 189, in scan
__import__(modname)
File "/base/data/home/apps/s~muncompy/v3.359898035587494190/muncompy/conftest.py", line 6, in <module>
from google.appengine.tools import dev_appserver_index
ImportError: No module named tools
Any ideas for why module tools from google.appengine is missing??
| 0 | [
2,
7019,
29,
8144,
4865,
16847,
568,
9565,
800,
3726,
3726,
568,
9565,
1,
7753,
16847,
51,
669,
693,
1123,
47,
15,
76,
31,
17617,
20,
13,
17721,
31,
57,
48,
7019,
45,
13,
1,
5565,
1958,
13,
5,
4630,
1764,
645,
236,
6,
45,
3893... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
R - predicting simple dyn model with one lag term
===
I'm trying to predict a simple lagged time series regression with the dyn library in R. [This question][1] was a helpful starting point, but I'm getting some weird behaviour that I'm hoping someone can explain.
Here's a minimum working example.
library(dyn)
# Initial data
y.orig <- arima.sim(model=list(ar=c(.9)),n=10)
x1.orig <- rnorm(10)
data <- cbind(y=y.orig, x1=x1.orig)
# This model, with a single lag term, predicts from t=2
mod1 <- dyn$lm(y ~ lag(y, -1), data)
y.new <- window(y.orig, end=end(y.orig) + c(5,0), extend=TRUE)
newdata1 <- cbind(y=y.new)
predict(mod1, newdata1)
# This one, with a lag plus another predictor, predicts from t=1 on
mod2 <- dyn$lm(y ~ lag(y, -1) + x1, data)
y.new <- window(y.orig, end=end(y.orig) + c(5,0), extend=TRUE)
x1.new <- c(x1.orig, rnorm(5))
newdata2 <- cbind(y=y.new, x1=x1.new)
predict(mod2, newdata2)
Why is there the difference between the two? Can anyone suggest how to predict my ''mod1'' using dyn? Thanks in advance.
[1]: http://stackoverflow.com/questions/4856555/iteratively-forecasting-dyn-models "This question" | 0 | [
2,
761,
13,
8,
9584,
68,
1935,
13,
21664,
1061,
29,
53,
13,
6828,
981,
800,
3726,
3726,
31,
22,
79,
749,
20,
9584,
21,
1935,
333,
15186,
85,
231,
27369,
29,
14,
13,
21664,
1248,
19,
761,
9,
636,
1565,
1301,
500,
2558,
165,
500... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android App - Droid Pro won't play video
===
I created a simple app that has an option to play some remotely hosted videos. I used the code from the Android developer docs samples, and it works fine on a variety of devices, but on Droid Pro there's an error "Sorry, we can't play that video". I've tried several other videos from other sources in case there was an encoding or compression issue, but all seem to produce the same error.
We've tried this on 2 different Droid Pro devices, and both have the same error.
All videos are mp4, and as mentioned above all work fine in various other devices (Samsung Galaxy SII, Nexus S, Droid 3, an HTC, etc).
Additionally, I used the 2 samples in the ApiDemos that come with the SDK (MediaPlayer_VideoDemo and VideoViewDemo), again with a few different videos, and these show the same error.
The YouTube app does play videos, so I assume there's a way to do it.
Here's the abbreviated code (minus error handling, progress feedback, etc):
import android.app.Activity;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
public class VideoActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
VideoView videoView = new VideoView(this);
setContentView(videoView);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
Bundle extras = getIntent().getExtras();
if (extras != null) {
String path = extras.getString("url");
Uri video = Uri.parse(path);
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
}
}
}
Any suggestions? TYIA.
| 0 | [
2,
13005,
4865,
13,
8,
744,
6516,
895,
230,
22,
38,
418,
763,
800,
3726,
3726,
31,
679,
21,
1935,
4865,
30,
63,
40,
4255,
20,
418,
109,
23288,
2812,
6610,
9,
31,
147,
14,
1797,
37,
14,
13005,
10058,
9765,
18,
7855,
15,
17,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why, in Model.full_clean, is clean_fields called before clean?
===
Is there a reason, in Model.full_clean, for clean_fields be called before clean?
In my project, it would be more reasonable if I could first do my validations to then validate clean_fields stuff. | 0 | [
2,
483,
15,
19,
1061,
9,
13727,
1,
20254,
15,
25,
2745,
1,
1109,
18,
227,
115,
2745,
60,
800,
3726,
3726,
25,
80,
21,
1215,
15,
19,
1061,
9,
13727,
1,
20254,
15,
26,
2745,
1,
1109,
18,
44,
227,
115,
2745,
60,
19,
51,
669,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Magento Product_List_Crosssell
===
The Crosssells do not seem to be working on my Magento EE install, for the product view page.
Ive debugged the product list crosssells block, but seems to crash out somewhere on its way through the various code, whilst collecting the collection. Cant work out why (whitescreens when debug to a certain level...and item collection thus not being set. Hard to figure out. No exceptions being logged).
I have no errors on the install...and sure i should not need to edit any logic, as the functionality is provided by default.
Ive followed this example:
http://www.magentocommerce.com/boards/viewthread/51529/
My crossells show on the cart page, as they usually do...but i cant get them to display on my product view page.
Heres my bits of code:
Catalog.xml:
<block type="catalog/product_list_crosssell" name="product.info.crosssell" as="crosssell_products" template="catalog/product/list/crosssell.phtml"/>
product/list/crosssell.phtml:
if(count($this->getItems())): ?>
<div id="also_bought_productslist" class="inner">
<?php $i=0;
foreach ($this->getItems() as $product):
Anyone know what i may be missing. And has anyone added crossells to their product view page?
Just to clarify...THIS IS USING THE DEFAULT PRODUCT_LIST_CROSSELL block...and im NOT trying to utilise the checkout/cart/crossell code (i know this relies on cart functionality/data to work correctly. I did attempt this though, and still get no crossell items....but they DO show in the cart page.)
many thanks | 0 | [
2,
4723,
17050,
2374,
1,
5739,
1,
7703,
11322,
800,
3726,
3726,
14,
919,
11322,
18,
107,
52,
2260,
20,
44,
638,
27,
51,
4723,
17050,
13,
2851,
16146,
15,
26,
14,
2374,
1418,
2478,
9,
5568,
121,
2345,
15186,
14,
2374,
968,
919,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Applying CSS to the correctly placed letters
===
At the moment this code applies the CSS style to the word once it is complete. I need it to apply the style to the individual letters to determine whether they are correctly placed or not.
$(".drop").droppable({
drop: function(event, ui) {
word = $(this).data('word');
guesses[word].push($(ui.draggable).attr('data-letter'));
console.log(guesses);
if (guesses[word].length == 3) {
if (guesses[word].join('') == word) {
$('td[data-word=' + word + ']').addClass("wordglow2").fadeOut(1300);
} else {
$('td[data-word=' + word + ']').addClass("wordglow");
}
}
}
});
The CSS is...
.wordglow {
-webkit-box-shadow: inset 2px 2px 20px 7px #ff0000;
box-shadow: inset 2px 2px 20px 7px #ff0000;
}
.wordglow2 {
-webkit-box-shadow: inset 2px 2px 20px 7px #22ff22;
box-shadow: inset 2px 2px 20px 7px #22ff22;
}
I have tried this but have had no joy...
$(".drop").droppable({
drop: function(event, ui) {
word = $(this).data('word');
guesses[word].push($(ui.draggable).attr('data-letter'));
console.log(guesses);
if (guesses[word].length == 3) {
if (guesses[word].join('') == word) {
$('td[data-letter=' + word + ']').addClass("wordglow2").fadeOut(1300);
} else {
$('td[data-letter=' + word + ']').addClass("wordglow");
}
}
}
});
| 0 | [
2,
11989,
272,
18,
18,
20,
14,
12044,
1037,
2516,
800,
3726,
3726,
35,
14,
688,
48,
1797,
13169,
14,
272,
18,
18,
1034,
20,
14,
833,
382,
32,
25,
1279,
9,
31,
376,
32,
20,
5645,
14,
1034,
20,
14,
1359,
2516,
20,
3746,
1472,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get cisco each ethernet port's arp flow use snmp?
===
These oid(locIfarpInPkts、locIfarpOutPkts、locIfarpInOctets、locIfarpOutOctets) works but it just return vlan's arp flow,is there other method,thks. | 0 | [
2,
184,
20,
164,
28184,
206,
27820,
1295,
22,
18,
21,
6952,
3312,
275,
8912,
2554,
60,
800,
3726,
3726,
158,
13,
6516,
5,
10799,
49,
3700,
3489,
17244,
38,
18,
1,
10799,
49,
3700,
306,
1320,
17244,
38,
18,
1,
10799,
49,
3700,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Split data frame, apply function, and return results in a nested list
===
My question's title almost matches the `dlply` (`plyr` package) description, except for the "nested" part.
Let me explain with an example:
library(plyr)
res <- dlply(mtcars, c("gear", "carb"), identity)
head(res, 2)
# $`3.1`
# mpg cyl disp hp drat wt qsec vs am gear carb
# Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1
# Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1
# Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1
#
# $`3.2`
# mpg cyl disp hp drat wt qsec vs am gear carb
# Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
# Dodge Challenger 15.5 8 318 150 2.76 3.520 16.87 0 0 3 2
# AMC Javelin 15.2 8 304 150 3.15 3.435 17.30 0 0 3 2
# Pontiac Firebird 19.2 8 400 175 3.08 3.845 17.05 0 0 3 2
As you can see, the output is a list where the names (keys) are the concatenation of the two variables I used for splitting the data, e.g. `"3.1"` is the key for `(gear = 3, carb = 1)`.
Instead, I would like my result to be a nested list so the elements can be accessed through two sets of keys, one for each of my splitting variables: `res[["3"][["1"]]`.
Is there something around, not necessarily from the `plyr` package, that can achieve this? I'd like the answer to be generalizable to any number of splitting variables. Also, it is important that I can apply any function although my example used the `identity` function, resulting in a mere split of the data. Thank you for your suggestions.
| 0 | [
2,
2132,
1054,
3523,
15,
5645,
1990,
15,
17,
788,
1736,
19,
21,
5618,
69,
968,
800,
3726,
3726,
51,
1301,
22,
18,
581,
557,
1717,
14,
13,
1,
43,
5478,
102,
1,
13,
5,
1,
5727,
8040,
1,
6030,
6,
5318,
15,
1613,
26,
14,
13,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replacing Depth Data with a Static image - C# / Kinect
===
I need to replace the background pixels which are not players with an Image,
I can successfully replace the user pixel with the ColorFrameImage, but as soon as i try to replace the rest of the depth bits with the image pixels . . I get a XamlParseError exception
I maybe doing the Bitmap image to pixel conversion wrong. .
Here is the code:
public partial class MainWindow : Window
{
Byte[] pixels;
Byte[] pix;
Byte[] pixy;
BitmapImage ims;
public MainWindow()
{
InitializeComponent();
ims = new BitmapImage();
ims.BeginInit();
ims.UriSource = new Uri(@"/autumn_scene.jpg", UriKind.RelativeOrAbsolute);
//int height = ims.PixelHeight;
// int width = ims.PixelWidth;
//int nStride = (ims.PixelWidth * ims.Format.BitsPerPixel + 7) / 8;
// pixy = new byte[(ims.PixelHeight* 4+1)];
// MessageBox.Show("Pixel Height" + ims.PixelHeight);
MessageBox.Show("I hate Exceptions");
//System.Console.WriteLine("Pixel Height" + ims.PixelHeight);
// ims.CopyPixels(pixy, nStride, 0);
// ims.EndInit();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
kinectSensorChooser1.KinectSensorChanged += new DependencyPropertyChangedEventHandler(kinectSensorChooser1_KinectSensorChanged);
}
void kinectSensorChooser1_KinectSensorChanged(object sender, DependencyPropertyChangedEventArgs e)
{
KinectSensor oldSensor = (KinectSensor)e.OldValue;
StopKinect(oldSensor);
KinectSensor newSensor = (KinectSensor)e.NewValue;
//NOTE: Add this check for a null sensor
if (newSensor == null)
{
return;
}
newSensor.ColorStream.Enable();
newSensor.DepthStream.Enable();
newSensor.SkeletonStream.Enable();
newSensor.AllFramesReady += new EventHandler<AllFramesReadyEventArgs>(newSensor_AllFramesReady);
try
{
newSensor.Start();
}
catch (System.IO.IOException)
{
kinectSensorChooser1.AppConflictOccurred();
}
}
void newSensor_AllFramesReady(object sender, AllFramesReadyEventArgs e)
{
using (DepthImageFrame depthFrame = e.OpenDepthImageFrame())
using (ColorImageFrame colorFrame = e.OpenColorImageFrame())
{
if (depthFrame == null)
{
return;
}
if (colorFrame == null)
{
return;
}
pixels = GenerateColoredBytes(depthFrame,colorFrame);
//pix = new byte[colorFrame.PixelDataLength];
//colorFrame.CopyPixelDataTo(pix);
int stride2 = colorFrame.Width * 4;
image1.Source = BitmapSource.Create(colorFrame.Width, colorFrame.Height, 96, 96, PixelFormats.Bgr32, null, pixels, stride2);
//Number of bytes per row
int stride = depthFrame.Width * 4;
image2.Source = BitmapSource.Create(depthFrame.Width, depthFrame.Height, 96, 96, PixelFormats.Bgr32, null, pixels, stride);
// image2.Source = ims;
}
}
private byte[] GenerateColoredBytes(DepthImageFrame depthFrame, ColorImageFrame colorFrame)
{
//Getting raw depth data
short[] rawDepthData = new short[depthFrame.PixelDataLength];
depthFrame.CopyPixelDataTo(rawDepthData);
pixels = new byte[depthFrame.Width * depthFrame.Height * 4];
pix = new byte[colorFrame.Width * colorFrame.Height * 4];
colorFrame.CopyPixelDataTo(pix);
// ColorImagePoint mapval = depthFrame.MapToColorImagePoint(depthFrame.Width,depthFrame.Height,
//Getting & Setting the BGR values
const int BlueIndex = 0;
const int GreenIndex = 1;
const int RedIndex = 2;
// const int alpha = 3;
// int nStride = (ims.PixelWidth * ims.Format.BitsPerPixel + 7) / 8;
//byte[] pixy = new byte[ims.PixelHeight * nStride];
// ims.CopyPixels(pixy,nStride,0);
for (int depthIndex = 0, colorIndex = 0; depthIndex < rawDepthData.Length && colorIndex < pixels.Length; depthIndex++, colorIndex += 4) {
//Player formula
int player = rawDepthData[depthIndex] & DepthImageFrame.PlayerIndexBitmask;
//Depth / Distance formula
int depth = rawDepthData[depthIndex] >> DepthImageFrame.PlayerIndexBitmaskWidth;
if (player > 0)
{
pixels[colorIndex + BlueIndex] = pix[colorIndex + BlueIndex];
pixels[colorIndex + GreenIndex] = pix[colorIndex + GreenIndex];
pixels[colorIndex + RedIndex] = pix[colorIndex + RedIndex];
// pixels[colorIndex + BlueIndex] =
}else{
//if (colorIndex + RedIndex < pixy.Length)
//{
// pixels[colorIndex + BlueIndex] = pixy[colorIndex + BlueIndex];
// pixels[colorIndex + GreenIndex] = pixy[colorIndex + GreenIndex];
// pixels[colorIndex + RedIndex] = pixy[colorIndex + RedIndex];
//}
//else
{
pixels[colorIndex + BlueIndex] = 255;
pixels[colorIndex + GreenIndex] = 0;
pixels[colorIndex + RedIndex] = 0;
// pixels[colorIndex + alpha] = 0;
}
}
}
return pixels;
}
void StopKinect(KinectSensor sensor){
if (sensor != null)
{
//NOTE: Add this code
if (sensor.IsRunning)
{
sensor.Stop();
if (sensor.AudioSource != null)
{
sensor.AudioSource.Stop();
}
}
}
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
StopKinect(kinectSensorChooser1.Kinect);
}
} | 0 | [
2,
5496,
5204,
1054,
29,
21,
12038,
1961,
13,
8,
272,
5910,
13,
118,
6399,
11557,
800,
3726,
3726,
31,
376,
20,
3934,
14,
2395,
18146,
18,
56,
50,
52,
1007,
29,
40,
1961,
15,
31,
92,
3673,
3934,
14,
4155,
18146,
29,
14,
1665,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jquery plugin options array, preventing array overwrite
===
I am writing a plugin for jquery, and I have used a code like this to allow users to specify options for the plugin:
var settings = $.extend({
url : 'error.json',
slotWidth : 100,
slotHeight : 100,
gridWidth : 6,
gridHeight : 3,
basketLayers : 1,
layerDirection : "vertical",
classNames : {
productPanelParent : '.products-panel-parent',
productPanelTabs : '.products-panel-tabs',
productPanelGroup : '.products-panel-container',
productPanel : '.products-panel',
productBasketParent : '.products-basket-parent',
productBasketGroup : '.products-basket-container',
productBasket : '.products-basket',
productBasketMenu : '.products-basket-menu',
basketSlot : '.basket-slot',
basketSlotFull : '.basket-slot-full',
basketSlotHelper : '.basket-slot-highlight',
product : '.product',
resetBasket : '.clearBasket',
resetLayer : '.clearLayer',
viewLayer : '.viewLayer'
}
}, options);
The problem is that when I try to override one of the classNames, the whole array is written over with `null` values wherever a property wasn't specificed.
So for example, I'll do something like this:
$('#somediv').myPlugin({
gridWidth : 4,
gridHeight : 2,
classNames : {
productBasket : '.small_basket'
}
});
And the `settings.classNames.productBasket` property will be the correct value, but everything is in settings.classNames will be null.
How do I get around this?
*(without writing a custom function to handle default values in the array?)* | 0 | [
2,
487,
8190,
93,
10922,
108,
6368,
7718,
15,
11520,
7718,
84,
23716,
800,
3726,
3726,
31,
589,
1174,
21,
10922,
108,
26,
487,
8190,
93,
15,
17,
31,
57,
147,
21,
1797,
101,
48,
20,
1655,
3878,
20,
19077,
6368,
26,
14,
10922,
108... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
facing comparision issue in javascript
===
this is what is my java script function :
function issueOrReturn(){
var functiontype = document.getElementById("functiontype").value;
alert("functiontype : "+functiontype);
if(functiontype=="issueTempcard"){
alert("1111111111111111111111111");
var empid = document.getElementById("empid").value;
var tempcardnumber = document.getElementById("tempcardnumber").value;
var dateofissue = document.getElementById("dateofissue").value;
if(empid.length==0){
alert("Please enter Employee ID ");
return false;
}
if(tempcardnumber.length==0){
alert("Please enter Card Number ");
return false;
}
if(dateofissue.length==0){
alert("Please enter Date of issue ");
return false;
}
if(empid.length > 0 && tempcardnumber.length > 0 && dateofissue.length > 0){
document.forms["frmTempcard"].submit();
}else{
alert("Please enter Employee ID and and Card Number and Date of issue ");
return false;
}
}
if(functiontype=="returnTempCard"){
alert("222222222222222222222222222222");
var empid = document.getElementById("empid").value;
var dateofreturn = document.getElementById("dateofreturn").value;
if(empid.length==0){
alert("Please enter Employee ID ");
return false;
}
if(dateofreturn.length==0){
alert("Please enter Date of return ");
return false;
}
if(empid.length > 0 && dateofreturn.length > 0){
document.forms["frmTempcard"].submit();
}else{
alert("Please enter Employee ID and Date of return ");
return false;
}
}
here the functiontype is : `issueTempcard` the alert is printed but it is not getting in the if loop of `issueTempcard` hence the form is not submitted,
also please advise me whether the following way is correct to submit the form :
if(empid.length > 0 && tempcardnumber.length > 0 && dateofissue.length > 0){
document.forms["frmTempcard"].submit();
}else{
alert("Please enter Employee ID and and Card Number and Date of issue ");
kindly provide me some help so that i can do it.
Regards, | 0 | [
2,
4325,
6479,
14688,
872,
1513,
19,
8247,
8741,
800,
3726,
3726,
48,
25,
98,
25,
51,
8247,
3884,
1990,
13,
45,
1990,
1513,
248,
24632,
5,
6,
1,
4033,
1990,
4474,
800,
4492,
9,
3060,
27567,
779,
1340,
5,
7,
22359,
4474,
7,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Jquery Ajax error after loading intoa div
===
Suppose I have a page called index.php, it contains one div element name divContent which contain a button called "msg" and another button called "show".
When i load index.php two buttons show well. I have added jquery on my page. When click on my "msg" button it will show "successful" msg by
> alert("successful");
. Its work like when i click on show button (outside the divContent) it will load another page content to my divContent by ajax technique.
$('#msg').click(
function(e)
{
alert("successful");
}
);
}
$('#show').click(
function(e)
{
$.ajax({
type: "GET",
url: "test.php",
success: function(msg){
$('#divContent').html(msg);
}
});
e.preventDefault();
}
);
test.php
--------
<input type="button" id="msg" />
test.php contain a button same as msg button present in index.php. My prob is when load index.php, click on the msg button it shows the successful msg but when click on show button it loads test.php's contains into divContent and click on msg button it does not shows "successful" message. What is the prob lem | 0 | [
2,
487,
8190,
93,
20624,
7019,
75,
12797,
77,
58,
13,
12916,
800,
3726,
3726,
5787,
31,
57,
21,
2478,
227,
4348,
9,
26120,
15,
32,
1588,
53,
13,
12916,
4520,
204,
13,
12916,
25424,
56,
3717,
21,
5167,
227,
13,
7,
79,
18,
263,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating a prepackaged AIR app
===
I'm building an AIR applicatiopn to render videos from youtube and upload them to social website to increase my traffic... I just want to know how can IHow can I create a prepackaged AIR application with Flash Professional CS6? | 0 | [
2,
2936,
21,
782,
8573,
8030,
282,
4865,
800,
3726,
3726,
31,
22,
79,
353,
40,
282,
4865,
16904,
15752,
17479,
20,
16535,
6610,
37,
7330,
17,
71,
8294,
105,
20,
668,
2271,
20,
1839,
51,
2227,
9,
9,
9,
31,
114,
259,
20,
143,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Start loop from the 15th of the month
===
I'm trying to create a loop that shows me all the posts starting the 15th of the month.
$current_year = date('Y');
$current_month = date('m');
query_posts( "cat=22&year=$current_year&monthnum=$current_month&order=ASC" );
This doesn't work because it starts the posts from the 1st of the current month. Thank you!
P.S. Not the posts FROM the 15th, but starting with the 15th of the month. | 0 | [
2,
799,
5293,
37,
14,
357,
96,
16,
14,
1617,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
5293,
30,
1285,
55,
65,
14,
9868,
1422,
14,
357,
96,
16,
14,
1617,
9,
5579,
17657,
1,
731,
800,
1231,
5,
22,
93,
22,
6,
73,
5579,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to specify procedures to be executed depending on data type of variable
===
I'm writing a module that access images and reads pixel values. The values in the images are usually of different data types (`integer(2)`, `integer(4)`, ...). Up to now, type `image` is defined in the following way:
type, public :: image
logical :: initialized = .false.
character(256) :: path = "" ! Path to image
integer :: dimensions(3) = -1 ! Dimensions of image
integer :: datatype = 0 ! Datatype
contains
procedure :: initialize
procedure :: pxvalues
procedure :: getMeta
end type image
My question now: Is there a possibility that the program automatically finds the corresponding procedures depending on the data type of the image (stored in variable `image%datatype`)? E.g. if the data type is integer, the subroutine `pxvalues_integer` is called during the execution of `image%pxvalues`.
Thanks! | 0 | [
2,
184,
20,
19077,
8876,
20,
44,
5557,
4758,
27,
1054,
1001,
16,
7612,
800,
3726,
3726,
31,
22,
79,
1174,
21,
12613,
30,
1381,
3502,
17,
11137,
18146,
4070,
9,
14,
4070,
19,
14,
3502,
50,
951,
16,
421,
1054,
2551,
13,
5,
1,
63... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to send POST request and get response correctly?
===
<p>I need to send different request with headers and body to PayPal. I want to use standatd class NET::HTTP, so here is my code:
require "net/http"
require "uri"
header = {...}
body = {...}
url = "https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus"
uri = URI.parse(url)
args = { 'header' => header,'body' => body }
res = Net::HTTP.post_form(uri, args)
//here I want to get response with code or errors or get some data
puts res.body or puts res.code
Thanks for help in advance !
| 0 | [
2,
184,
20,
2660,
678,
3772,
17,
164,
1627,
12044,
60,
800,
3726,
3726,
13,
1,
306,
1,
49,
376,
20,
2660,
421,
3772,
29,
157,
445,
17,
358,
20,
1372,
6720,
9,
31,
259,
20,
275,
1261,
721,
43,
718,
4275,
45,
45,
21127,
15,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Autocomplete function not working in meteor
===
I have an autocomplete textbox function which I am using in meteor.
It works fine for the following hardcoded data like..:
$(document).ready(function() {
$("#demo-input-facebook-theme").tokenInput(
[{id: 7, name: "Ruby"},{id: 11, name: "Python"},{id: 13, name: "JavaScript"}]
,{theme: "facebook"
});
});
Now , I had fetched data from database MongoDB, when I pass this data as parameter to the autocomplete function it does not work... I have also used the method JSON.stringify()..
The returned data looks like,
[{"_id":"ab170916-a44b-49f9-85ef-a34c90fb815d","Namelist_name":"Badminton"},{"_id":"f768e4ba-b628-4d3f-8da6-0bad31346dcc","Namelist_name":"Biking"},{"_id":"0bee086b-1785-40c9-9c5d-a39331c875e1","Namelist_name":"Chess"},{"_id":"4eae1e54-ec60-4578-8052-0bf1bccf13b1","Namelist_name":"Golf"},{"_id":"a0d2b89e-a2d6-4b30-8e38-779c5a886d49","Namelist_name":"Hiking"},{"_id":"f3a05456-38d4-40f2-86b1-eddea061fdf0","Namelist_name":"Tennis"},{"_id":"3669b9a2-3f87-4579-8064-82d627196fcb","Namelist_name":"Walking"},{"_id":"6ac6497e-82b2-40fe-8b24-152e9f42750d","Namelist_name":"Wine Tasting"},{"_id":"15a7ca87-aef7-43ab-945b-168647bb59aa","Namelist_name":"Yoga"},{"_id":"bc40d166-64ef-4e61-85cd-60064dc037cd","Namelist_name":"Zumba"}]
| 0 | [
2,
3108,
15990,
1990,
52,
638,
19,
17522,
800,
3726,
3726,
31,
57,
40,
3108,
15990,
1854,
5309,
1990,
56,
31,
589,
568,
19,
17522,
9,
32,
693,
1123,
26,
14,
249,
552,
22254,
1054,
101,
9,
9,
45,
5579,
5,
28132,
6,
9,
15193,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting allows airplay to no still sends sound over airplay
===
I am working with a media player, some media does not have the right to be played over Airplay, don't ask why :). So when I get that media, I set
movieplayerController.allowsAirplay = NO;
If you were playing with airplay before, it is then on by default next time. By doing the code above, you will get the movie playing on your device, but the sound audio route is still sent over airplay. I have tried to overwrite the audio route, but it doesn't budge, seems like Airplay trumps all.
If I could just disable airplay, my problem would be solved, but I can't find anywhere a way to do that. | 0 | [
2,
2697,
2965,
17690,
20,
90,
174,
11350,
646,
84,
17690,
800,
3726,
3726,
31,
589,
638,
29,
21,
941,
517,
15,
109,
941,
630,
52,
57,
14,
193,
20,
44,
257,
84,
17690,
15,
221,
22,
38,
1349,
483,
13,
45,
6,
9,
86,
76,
31,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to tell "dpkg" to NOT to download / install a broken source?
===
Whenever I try to use apt-get/dpkg, it tries a to install a broken source.
How can I tell it to NOT do so ?
here is its error:
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
| 0 | [
2,
184,
20,
494,
13,
7,
7431,
16901,
7,
20,
52,
20,
7121,
13,
118,
16146,
21,
2023,
1267,
60,
800,
3726,
3726,
6634,
31,
1131,
20,
275,
21,
4417,
8,
3060,
118,
7431,
16901,
15,
32,
3919,
21,
20,
16146,
21,
2023,
1267,
9,
184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
python webpage mod_wsgi
===
Before I used mod_python for python websites. Unfortunately mod_python is not up to date any more so I looked for another framework and found mod_wsgi.
In mod_python it was possible to have an index method and also other methods. I would like to have more than one page that will be called.
Something like this:
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
def test(environ, start_response):
status = '200 OK'
output = 'Hello test!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
Is that possible with mod_wsgi?
| 0 | [
2,
20059,
2741,
6486,
7226,
1,
10268,
2234,
800,
3726,
3726,
115,
31,
147,
7226,
1,
6448,
11570,
26,
20059,
13931,
9,
6200,
7226,
1,
6448,
11570,
25,
52,
71,
20,
1231,
186,
91,
86,
31,
292,
26,
226,
6596,
17,
216,
7226,
1,
10268... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Exception during startup with Tomcat, Spring and Weaver (BcelClassWeaver)
===
since today im facing a strange problem. When i start my app in my tomcat (7.0.28) i get hundrets of exceptions shown below. Yesterday before i switched off my computer everyting was working fine and i had no problems at all deploying and starting the application).
For weaving in general i put the spring-instrument-tomcat-3.1.1.RELEASE.jar into the lib folder of my tomcat. As is said before, i never had any problems with that in the past and everything worked fine. I didn't update any components like my jdk (1.7), tomcat or eclipse.
I tried to delete the work folder and the app in the webapp folder, tried to delete caches and made several redeployments; everything without success. I tried tomcat standalone and eclipse wtp (what i usually use); no difference.
Does anybody have a clue what i could try?
Here is a small part of the stacktrace i get at tomcat startup:
Jun 29, 2012 10:55:16 AM org.aspectj.weaver.tools.Jdk14Trace info
INFO: Dumping to /home/xxx/./ajcore.20120629.105516.091.txt
[TomcatInstrumentableClassLoader@77b7a0] abort trouble in:
public class org.springframework.expression.spel.support.ReflectivePropertyAccessor extends java.lang.Object implements org.springframework.expression.PropertyAccessor:
protected final java.util.Map readerCache [Signature(Ljava/util/Map<Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey;Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair;>;)]
protected final java.util.Map writerCache [Signature(Ljava/util/Map<Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey;Ljava/lang/reflect/Member;>;)]
protected final java.util.Map typeDescriptorCache [Signature(Ljava/util/Map<Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey;Lorg/springframework/core/convert/TypeDescriptor;>;)]
public void <init>():
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 46)
INVOKESPECIAL java.lang.Object.<init> ()V
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 48)
NEW java.util.concurrent.ConcurrentHashMap
DUP
INVOKESPECIAL java.util.concurrent.ConcurrentHashMap.<init> ()V
PUTFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 50)
NEW java.util.concurrent.ConcurrentHashMap
DUP
INVOKESPECIAL java.util.concurrent.ConcurrentHashMap.<init> ()V
PUTFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.writerCache Ljava/util/Map;
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 52)
NEW java.util.concurrent.ConcurrentHashMap
DUP
INVOKESPECIAL java.util.concurrent.ConcurrentHashMap.<init> ()V
PUTFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.typeDescriptorCache Ljava/util/Map;
RETURN (line 46)
end public void <init>()
public Class[] getSpecificTargetClasses():
ACONST_NULL (line 59)
ARETURN
end public Class[] getSpecificTargetClasses()
public boolean canRead(org.springframework.expression.EvaluationContext, Object, String) throws org.springframework.expression.AccessException:
ALOAD_2 // Ljava/lang/Object; target (line 63)
IFNONNULL L0
ICONST_0 (line 64)
IRETURN
L0: ALOAD_2 // Ljava/lang/Object; target (line 66)
INSTANCEOF java.lang.Class
IFEQ L1
ALOAD_2 // Ljava/lang/Object; target
CHECKCAST java.lang.Class
GOTO L2
L1: ALOAD_2 // Ljava/lang/Object; target
INVOKEVIRTUAL java.lang.Object.getClass ()Ljava/lang/Class;
L2: ASTORE 4
ALOAD 4 // Ljava/lang/Class; type (line 67)
INVOKEVIRTUAL java.lang.Class.isArray ()Z
IFEQ L3
ALOAD_3 // Ljava/lang/String; name
LDC "length"
INVOKEVIRTUAL java.lang.String.equals (Ljava/lang/Object;)Z
IFEQ L3
ICONST_1 (line 68)
IRETURN
L3: NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$CacheKey (line 70)
DUP
ALOAD 4 // Ljava/lang/Class; type
ALOAD_3 // Ljava/lang/String; name
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$CacheKey.<init> (Ljava/lang/Class;Ljava/lang/String;)V
ASTORE 5
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 71)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
INVOKEINTERFACE java.util.Map.containsKey (Ljava/lang/Object;)Z
IFEQ L4
ICONST_1 (line 72)
IRETURN
L4: ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 74)
ALOAD_3 // Ljava/lang/String; name
ALOAD 4 // Ljava/lang/Class; type
ALOAD_2 // Ljava/lang/Object; target
INSTANCEOF java.lang.Class
INVOKEVIRTUAL org.springframework.expression.spel.support.ReflectivePropertyAccessor.findGetterForProperty (Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/reflect/Method;
ASTORE 6
ALOAD 6 // Ljava/lang/reflect/Method; method (line 75)
IFNULL L5
NEW org.springframework.core.convert.Property (line 78)
DUP
ALOAD 4 // Ljava/lang/Class; type
ALOAD 6 // Ljava/lang/reflect/Method; method
ACONST_NULL
INVOKESPECIAL org.springframework.core.convert.Property.<init> (Ljava/lang/Class;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
ASTORE 7
NEW org.springframework.core.convert.TypeDescriptor (line 79)
DUP
ALOAD 7 // Lorg/springframework/core/convert/Property; property
INVOKESPECIAL org.springframework.core.convert.TypeDescriptor.<init> (Lorg/springframework/core/convert/Property;)V
ASTORE 8
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 80)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair
DUP
ALOAD 6 // Ljava/lang/reflect/Method; method
ALOAD 8 // Lorg/springframework/core/convert/TypeDescriptor; typeDescriptor
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.<init> (Ljava/lang/reflect/Member;Lorg/springframework/core/convert/TypeDescriptor;)V
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 81)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.typeDescriptorCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
ALOAD 8 // Lorg/springframework/core/convert/TypeDescriptor; typeDescriptor
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
ICONST_1 (line 82)
IRETURN
L5: ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 85)
ALOAD_3 // Ljava/lang/String; name
ALOAD 4 // Ljava/lang/Class; type
ALOAD_2 // Ljava/lang/Object; target
INSTANCEOF java.lang.Class
INVOKEVIRTUAL org.springframework.expression.spel.support.ReflectivePropertyAccessor.findField (Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/reflect/Field;
ASTORE 7
ALOAD 7 // Ljava/lang/reflect/Field; field (line 86)
IFNULL L6
NEW org.springframework.core.convert.TypeDescriptor (line 87)
DUP
ALOAD 7 // Ljava/lang/reflect/Field; field
INVOKESPECIAL org.springframework.core.convert.TypeDescriptor.<init> (Ljava/lang/reflect/Field;)V
ASTORE 8
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 88)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair
DUP
ALOAD 7 // Ljava/lang/reflect/Field; field
ALOAD 8 // Lorg/springframework/core/convert/TypeDescriptor; typeDescriptor
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.<init> (Ljava/lang/reflect/Member;Lorg/springframework/core/convert/TypeDescriptor;)V
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 89)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.typeDescriptorCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
ALOAD 8 // Lorg/springframework/core/convert/TypeDescriptor; typeDescriptor
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
ICONST_1 (line 90)
IRETURN
L6: ICONST_0 (line 93)
IRETURN
end public boolean canRead(org.springframework.expression.EvaluationContext, Object, String) throws org.springframework.expression.AccessException
public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext, Object, String) throws org.springframework.expression.AccessException:
ALOAD_2 // Ljava/lang/Object; target (line 97)
IFNONNULL L0
NEW org.springframework.expression.AccessException (line 98)
DUP
LDC "Cannot read property of null target"
INVOKESPECIAL org.springframework.expression.AccessException.<init> (Ljava/lang/String;)V
ATHROW
L0: ALOAD_2 // Ljava/lang/Object; target (line 100)
INSTANCEOF java.lang.Class
IFEQ L1
ALOAD_2 // Ljava/lang/Object; target
CHECKCAST java.lang.Class
GOTO L2
L1: ALOAD_2 // Ljava/lang/Object; target
INVOKEVIRTUAL java.lang.Object.getClass ()Ljava/lang/Class;
L2: ASTORE 4
ALOAD 4 // Ljava/lang/Class; type (line 102)
INVOKEVIRTUAL java.lang.Class.isArray ()Z
IFEQ L4
ALOAD_3 // Ljava/lang/String; name
LDC "length"
INVOKEVIRTUAL java.lang.String.equals (Ljava/lang/Object;)Z
IFEQ L4
ALOAD_2 // Ljava/lang/Object; target (line 103)
INSTANCEOF java.lang.Class
IFEQ L3
NEW org.springframework.expression.AccessException (line 104)
DUP
LDC "Cannot access length on array class itself"
INVOKESPECIAL org.springframework.expression.AccessException.<init> (Ljava/lang/String;)V
ATHROW
L3: NEW org.springframework.expression.TypedValue (line 106)
DUP
ALOAD_2 // Ljava/lang/Object; target
INVOKESTATIC java.lang.reflect.Array.getLength (Ljava/lang/Object;)I
INVOKESTATIC java.lang.Integer.valueOf (I)Ljava/lang/Integer;
INVOKESPECIAL org.springframework.expression.TypedValue.<init> (Ljava/lang/Object;)V
ARETURN
L4: NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$CacheKey (line 109)
DUP
ALOAD 4 // Ljava/lang/Class; type
ALOAD_3 // Ljava/lang/String; name
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$CacheKey.<init> (Ljava/lang/Class;Ljava/lang/String;)V
ASTORE 5
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 110)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
INVOKEINTERFACE java.util.Map.get (Ljava/lang/Object;)Ljava/lang/Object;
CHECKCAST org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair
ASTORE 6
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker (line 112)
IFNULL L5
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.member Ljava/lang/reflect/Member;
INSTANCEOF java.lang.reflect.Method
IFEQ L9
L5: ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker (line 113)
IFNULL L6
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.member Ljava/lang/reflect/Member;
GOTO L7
L6: ACONST_NULL
L7: CHECKCAST java.lang.reflect.Method
ASTORE 7
ALOAD 7 // Ljava/lang/reflect/Method; method (line 114)
IFNONNULL L8
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 115)
ALOAD_3 // Ljava/lang/String; name
ALOAD 4 // Ljava/lang/Class; type
ALOAD_2 // Ljava/lang/Object; target
INSTANCEOF java.lang.Class
INVOKEVIRTUAL org.springframework.expression.spel.support.ReflectivePropertyAccessor.findGetterForProperty (Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/reflect/Method;
ASTORE 7 // Ljava/lang/reflect/Method; method
ALOAD 7 // Ljava/lang/reflect/Method; method (line 116)
IFNULL L8
NEW org.springframework.core.convert.Property (line 120)
DUP
ALOAD 4 // Ljava/lang/Class; type
ALOAD 7 // Ljava/lang/reflect/Method; method
ACONST_NULL
INVOKESPECIAL org.springframework.core.convert.Property.<init> (Ljava/lang/Class;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
ASTORE 8
NEW org.springframework.core.convert.TypeDescriptor (line 121)
DUP
ALOAD 8 // Lorg/springframework/core/convert/Property; property
INVOKESPECIAL org.springframework.core.convert.TypeDescriptor.<init> (Lorg/springframework/core/convert/Property;)V
ASTORE 9
NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair (line 122)
DUP
ALOAD 7 // Ljava/lang/reflect/Method; method
ALOAD 9 // Lorg/springframework/core/convert/TypeDescriptor; typeDescriptor
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.<init> (Ljava/lang/reflect/Member;Lorg/springframework/core/convert/TypeDescriptor;)V
ASTORE 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 123)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
L8: ALOAD 7 // Ljava/lang/reflect/Method; method (line 126)
IFNULL L9
catch java.lang.Exception -> E0
| ALOAD 7 // Ljava/lang/reflect/Method; method (line 128)
| INVOKESTATIC org.springframework.util.ReflectionUtils.makeAccessible (Ljava/lang/reflect/Method;)V
| ALOAD 7 // Ljava/lang/reflect/Method; method (line 129)
| ALOAD_2 // Ljava/lang/Object; target
| ICONST_0
| ANEWARRAY java.lang.Object
| INVOKEVIRTUAL java.lang.reflect.Method.invoke (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
| ASTORE 8
| NEW org.springframework.expression.TypedValue (line 130)
| DUP
| ALOAD 8 // Ljava/lang/Object; value
| ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
| GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.typeDescriptor Lorg/springframework/core/convert/TypeDescriptor;
| ALOAD 8 // Ljava/lang/Object; value
| INVOKEVIRTUAL org.springframework.core.convert.TypeDescriptor.narrow (Ljava/lang/Object;)Lorg/springframework/core/convert/TypeDescriptor;
| INVOKESPECIAL org.springframework.expression.TypedValue.<init> (Ljava/lang/Object;Lorg/springframework/core/convert/TypeDescriptor;)V
catch java.lang.Exception -> E0
ARETURN
E0: ASTORE 8 (line 132)
NEW org.springframework.expression.AccessException (line 133)
DUP
NEW java.lang.StringBuilder
DUP
LDC "Unable to access property '"
INVOKESPECIAL java.lang.StringBuilder.<init> (Ljava/lang/String;)V
ALOAD_3 // Ljava/lang/String; name
INVOKEVIRTUAL java.lang.StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;
LDC "' through getter"
INVOKEVIRTUAL java.lang.StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;
INVOKEVIRTUAL java.lang.StringBuilder.toString ()Ljava/lang/String;
ALOAD 8 // Ljava/lang/Exception; ex
INVOKESPECIAL org.springframework.expression.AccessException.<init> (Ljava/lang/String;Ljava/lang/Exception;)V
ATHROW
L9: ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker (line 138)
IFNULL L10
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.member Ljava/lang/reflect/Member;
INSTANCEOF java.lang.reflect.Field
IFEQ L14
L10: ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker (line 139)
IFNONNULL L11
ACONST_NULL
GOTO L12
L11: ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.member Ljava/lang/reflect/Member;
L12: CHECKCAST java.lang.reflect.Field
ASTORE 7
ALOAD 7 // Ljava/lang/reflect/Field; field (line 140)
IFNONNULL L13
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 141)
ALOAD_3 // Ljava/lang/String; name
ALOAD 4 // Ljava/lang/Class; type
ALOAD_2 // Ljava/lang/Object; target
INSTANCEOF java.lang.Class
INVOKEVIRTUAL org.springframework.expression.spel.support.ReflectivePropertyAccessor.findField (Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/reflect/Field;
ASTORE 7 // Ljava/lang/reflect/Field; field
ALOAD 7 // Ljava/lang/reflect/Field; field (line 142)
IFNULL L13
NEW org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair (line 143)
DUP
ALOAD 7 // Ljava/lang/reflect/Field; field
NEW org.springframework.core.convert.TypeDescriptor
DUP
ALOAD 7 // Ljava/lang/reflect/Field; field
INVOKESPECIAL org.springframework.core.convert.TypeDescriptor.<init> (Ljava/lang/reflect/Field;)V
INVOKESPECIAL org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.<init> (Ljava/lang/reflect/Member;Lorg/springframework/core/convert/TypeDescriptor;)V
ASTORE 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
ALOAD_0 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor; this (line 144)
GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor.readerCache Ljava/util/Map;
ALOAD 5 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$CacheKey; cacheKey
ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
INVOKEINTERFACE java.util.Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
POP
L13: ALOAD 7 // Ljava/lang/reflect/Field; field (line 147)
IFNULL L14
catch java.lang.Exception -> E1
| ALOAD 7 // Ljava/lang/reflect/Field; field (line 149)
| INVOKESTATIC org.springframework.util.ReflectionUtils.makeAccessible (Ljava/lang/reflect/Field;)V
| ALOAD 7 // Ljava/lang/reflect/Field; field (line 150)
| ALOAD_2 // Ljava/lang/Object; target
| INVOKEVIRTUAL java.lang.reflect.Field.get (Ljava/lang/Object;)Ljava/lang/Object;
| ASTORE 8
| NEW org.springframework.expression.TypedValue (line 151)
| DUP
| ALOAD 8 // Ljava/lang/Object; value
| ALOAD 6 // Lorg/springframework/expression/spel/support/ReflectivePropertyAccessor$InvokerPair; invoker
| GETFIELD org.springframework.expression.spel.support.ReflectivePropertyAccessor$InvokerPair.typeDescriptor Lorg/springframework/core/convert/TypeDescriptor;
| ALOAD 8 // Ljava/lang/Object; value
| INVOKEVIRTUAL org.springframework.core.convert.TypeDescriptor.narrow (Ljava/lang/Object;)Lorg/springframework/core/convert/TypeDescriptor;
| INVOKESPECIAL org.springframework.expression.TypedValue.<init> (Ljava/lang/Object;Lorg/springframework/core/convert/TypeDescriptor;)V
catch java.lang.Exception -> E1
ARETURN
E1: ASTORE 8 (line 153)
NEW org.springframework.expression.AccessException (line 154)
DUP
NEW java.lang.StringBuilder
DUP
LDC "Unable to access field: "
INVOKESPECIAL java.lang.StringBuilder.<init> (Ljava/lang/String;)V
ALOAD_3 // Ljava/lang/String; name
INVOKEVIRTUAL java.lang.StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;
INVOKEVIRTUAL java.lang.StringBuilder.toString ()Ljava/lang/String;
ALOAD 8 // Ljava/lang/Exception; ex
INVOKESPECIAL org.springframework.expression.AccessException.<init> (Ljava/lang/String;Ljava/lang/Exception;)V
ATHROW
L14: NEW org.springframework.expression.AccessException (line 159)
DUP
NEW java.lang.StringBuilder
DUP
LDC "Neither getter nor field found for property '"
INVOKESPECIAL java.lang.StringBuilder.<init> (Ljava/lang/String;)V
ALOAD_3 // Ljava/lang/String; name
INVOKEVIRTUAL java. | 3 | [
2,
5391,
112,
20205,
29,
2067,
5782,
15,
1573,
17,
13104,
13,
5,
220,
11040,
1898,
458,
11937,
6,
800,
3726,
3726,
179,
786,
797,
4325,
21,
2578,
1448,
9,
76,
31,
799,
51,
4865,
19,
51,
2067,
5782,
13,
5,
465,
9,
387,
9,
2714,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Colour formatting according the type of the item in Excel 2010
===
I started building an excel spreadsheet with a database of items in Microsoft Excel 2010. Those items have some fixed max values on its properties according the type of them. Those values are stored in another hidden table according the type of the item and of course are different in each of them. For example the hidden table its something like this:
Type | Price | Warranty
------------------------
TV | 1683 | 4
PC | 1210 | 1
A/C | 1234 | 2
So now whenever i create a new item in my main table those properties will get a data bar color formatting compared to the other hidden table! Like:
TV | Sony Bravia RT219 | 1293 | 2
...and those "1293" and "2" values needs to get a data bar "comparing" the "1293" value with the max "1683" and so on...
I wish that you can understand me. Which formula i have to use so i can make this possible in ms excel 2010? | 0 | [
2,
4609,
2595,
1203,
496,
14,
1001,
16,
14,
9101,
19,
20700,
498,
800,
3726,
3726,
31,
373,
353,
40,
20700,
1789,
17627,
29,
21,
6018,
16,
3755,
19,
7099,
20700,
498,
9,
273,
3755,
57,
109,
3535,
2049,
4070,
27,
82,
3704,
496,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Database for remote sensor data logging
===
I need to choose a Database for storing data remotely from a big number (thousands to tens of thousands) of sensors that would generate around one entry per minute each.
The said data needs to be queried in a variety of ways from counting data with certain characteristics for statistics to simple outputting for plotting.
I am looking around for the right tool, I started with MySQL but I feel like it lacks the scalability needed for this project, and this lead me to noSQL databases which I don't know much about.
Which Database, either relational or not would be a good choice?
Thanks.
| 0 | [
2,
246,
6018,
26,
5388,
14865,
1054,
13,
13919,
800,
3726,
3726,
31,
376,
20,
3538,
21,
6018,
26,
25615,
1054,
23288,
37,
21,
580,
234,
13,
5,
27904,
18,
20,
652,
18,
16,
3805,
6,
16,
15529,
30,
83,
7920,
140,
53,
2792,
416,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to rotate embedded youtube video to landscape mode
===
I am using the following embed code to embed my youtube videos on IOS
- (NSString*)embedYouTube:(NSString*)youtube_id frame:(CGRect)frame {
NSString* embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: white;\
}\
</style>\
</head><body style=\"margin:0\">\
<iframe src=\"http://www.youtube.com/embed/%@?rel=0\" frameborder=\"0\" allowfullscreen width=\"%0.0f\" height=\"%0.0f\"></iframe>\
</body></html>";
NSString *html = [NSString stringWithFormat:embedHTML, youtube_id, frame.size.width, frame.size.height];
return html;
}
//code to embed video
NSString *contentHTML;
if (currentAnswer.youtube_id != nil) {
contentHTML = [self embedYouTube:currentAnswer.youtube_id frame:CGRectMake(CELL_TEXT_LEFT_MARGIN + CELL_AVATAR_WIDTH + CELL_SPACING, currentYAxisValue, CELL_YOUTUBEVIEW_WIDTH, CELL_YOUTUBEVIEW_HEIGHT)];
}
When I play the video, it only plays in potrait mode and not landscape mode. Is this a restriction due to the 'iframes', is there any way around this? | 0 | [
2,
184,
20,
21448,
12138,
7330,
763,
20,
4453,
3740,
800,
3726,
3726,
31,
589,
568,
14,
249,
11911,
69,
1797,
20,
11911,
69,
51,
7330,
6610,
27,
13,
7760,
13,
8,
13,
5,
2172,
11130,
2483,
6,
1503,
4283,
245,
19302,
45,
5,
2172,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replacing I-frame in MP4 video with ffmpeg
===
I'd like to replace I-frame with another picture in order to achieve ghost-effect. (So P- and B-frames remain the same)
How can I do this via ffmpeg (or any other soft)? | 0 | [
2,
5496,
31,
8,
8361,
19,
4628,
300,
763,
29,
13,
2460,
79,
20427,
800,
3726,
3726,
31,
22,
43,
101,
20,
3934,
31,
8,
8361,
29,
226,
2151,
19,
389,
20,
4689,
3995,
8,
21295,
9,
13,
5,
656,
351,
8,
17,
334,
8,
8361,
18,
216... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
#2038 while trying to close localconnection
===
I am trying to close() localconnection when connect() fails. But while closing connection it giving me '#2038 close failed because object is not connected'.
Thanks in advance.
try{
connServer2Client.connect("_" + clientConnectionName);
}catch (error:ArgumentError) {
trace("in catch connection established");
connServer2Client.close();
connServer2Client.connect("_" + clientConnectionName);
}
| 0 | [
2,
7921,
387,
3665,
133,
749,
20,
543,
375,
25996,
872,
800,
3726,
3726,
31,
589,
749,
20,
543,
5,
6,
375,
25996,
872,
76,
6379,
5,
6,
13614,
9,
47,
133,
4239,
2760,
32,
1438,
55,
13,
22,
5910,
1323,
3665,
543,
1702,
185,
3095... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Upload open xml SpreadsheetML and allow user to edit in asp.net
===
I start learning open xml now.But I can't find any resources about allow user to edit open xml files(word,spreadsheet,and other file) in asp.net and user can download again.Anyone knows these resources and help me,please. | 0 | [
2,
71,
8294,
368,
23504,
1789,
17627,
8184,
17,
1655,
4155,
20,
9392,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
799,
2477,
368,
23504,
130,
9,
811,
31,
92,
22,
38,
477,
186,
2566,
88,
1655,
4155,
20,
9392,
368,
23504,
6488,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
android-maven-plugin, instrumentation testing and testSize
===
I'm using maven for building, running and instrumentation testing my Android applications. Android testing framework has three different test scopes [@SmallTest][1], [@MediumTest][2] and [@LargeTest][3] and android-maven-plugin has ability to select test scope via [testTestSize][4] or [test/testSize][5] parameter. This parameter can be one of `small|medium|large` and can run your tests from related scope.
But what can i do if i want to run small and medium tests simultaneously, not only small or not only medium? Any solution for this problem exists?
[1]: http://developer.android.com/reference/android/test/suitebuilder/annotation/SmallTest.html
[2]: http://developer.android.com/reference/android/test/suitebuilder/annotation/MediumTest.html
[3]: http://developer.android.com/reference/android/test/suitebuilder/annotation/LargeTest.html
[4]: http://maven-android-plugin-m2site.googlecode.com/svn/instrument-mojo.html#testTestSize
[5]: http://maven-android-plugin-m2site.googlecode.com/svn/instrument-mojo.html#test | 0 | [
2,
13005,
8,
540,
3124,
8,
18527,
5831,
15,
18235,
4431,
17,
4894,
2952,
800,
3726,
3726,
31,
22,
79,
568,
1216,
3124,
26,
353,
15,
946,
17,
18235,
4431,
51,
13005,
3767,
9,
13005,
4431,
6596,
63,
132,
421,
1289,
9914,
18,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
dereferencing a pointer when passing by reference
===
What does a compiler call when you dereferencing a pointer when passing by reference to a function?
I am using the gcc compiler. if that helps...
Here is a simple example
int& returnSame( int &example ) { return example: }
int main()
{
int inum = 3;
int *pinum = & inum;
std::cout << "inum: " << returnSame(*pinum) << std::endl;
return 0;
}
My Guess.
When we dereference pinum we would expect the copy constructor to be called, but since the function is passed by value this will not be called?
If pinum copy constructor was called then a temporary object would be produced and the reference of that would be used, which would be very bad news in the form of undefined behaivour...
So what does happen...undefined behavior?
| 0 | [
2,
121,
29254,
21,
454,
106,
76,
2848,
34,
2801,
800,
3726,
3726,
98,
630,
21,
21486,
645,
76,
42,
121,
29254,
21,
454,
106,
76,
2848,
34,
2801,
20,
21,
1990,
60,
31,
589,
568,
14,
489,
3384,
21486,
9,
100,
30,
7778,
9,
9,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ensure android service Execution
===
I have a Android service, I start it from the main activity. The service is really simple, it has a simple timetask, which each 10-15 minutes check update about some informations.
The question is, when the android device is connected to USB, the task is perfectly executed.
If I unplug the USB cable, the task isn't executed.
How can I fix? | 0 | [
2,
4062,
13005,
365,
5769,
800,
3726,
3726,
31,
57,
21,
13005,
365,
15,
31,
799,
32,
37,
14,
407,
2358,
9,
14,
365,
25,
510,
1935,
15,
32,
63,
21,
1935,
85,
38,
20310,
15,
56,
206,
332,
8,
1193,
902,
2631,
11100,
88,
109,
67... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I can remove list bullets
===
Everyone,
I am am having trouble removing list bullets on my on line resume. I have tried the following :
Everyone,
I am am having trouble removing list bullets on my on line resume. I have tried the following :
<pre><code>
.nobull{
list-style: none;
list-style-type: none;
}
</code></pre>
And clearing my browser cache. Here in a link to the resume. <a href="http://smithdesign.us/tims-resume/">http://smithdesign.us/tims-resume/</a>
And clearing my browser cache. Here in a link to the resume. <a href="http://smithdesign.us/tims-resume/">http://smithdesign.us/tims-resume/</a> | 0 | [
2,
31,
92,
4681,
968,
11366,
800,
3726,
3726,
1266,
15,
31,
589,
589,
452,
2572,
9096,
968,
11366,
27,
51,
27,
293,
13113,
9,
31,
57,
794,
14,
249,
13,
45,
1266,
15,
31,
589,
589,
452,
2572,
9096,
968,
11366,
27,
51,
27,
293,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are my options for linking to a podcast from my iPhone app?
===
Using the [iTunes Link Maker][1], and with reference to [this answer][2], I've created a test app that can launch the iTunes app and list the episodes of a given podcast:
NSString *address = @"itms://itunes.apple.com/<country code>/podcast/<podcast name>/id<numeric ID>?uo=4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:address]];
But what else is possible?
1. From my app, can I launch the iTunes app to start downloading a particular podcast episode?
2. From my app, can I launch the iTunes app to start streaming a particular podcast episode?
3. From my app, can I launch Apple's new [Podcasts app][3] if the user has it installed?
[1]: http://itunes.apple.com/linkmaker?
[2]: http://stackoverflow.com/a/8709719/11575
[3]: http://itunes.apple.com/us/app/podcasts/id525463029?mt=8 | 0 | [
2,
98,
50,
51,
6368,
26,
12585,
20,
21,
15124,
37,
51,
21024,
4865,
60,
800,
3726,
3726,
568,
14,
636,
12866,
2696,
3508,
11767,
500,
2558,
165,
500,
15,
17,
29,
2801,
20,
636,
1565,
1623,
500,
2558,
135,
500,
15,
31,
22,
195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Server 2012 - Always On
===
I am in the process of setting up always on high availability clusters for the first time. Can anyone explain to me from the networking perspective after configuring the group and testing to make sure it is functioning properly, how does SQL know when to fail over, and how would my application connecting to the SQL server know where it is pointing. So for example I have application foo connecting to a named instance DB01.FOO when foo fails and is rolled over to DB02.FOO how would my application know it should be talking to DB02.FOO? DB02.FOO is in the same domain but a different server? I am just trying to wrap my head around all aspects of this before attempting it. If there are any links someone would recommend that would be awesome as well.
Thanks for the help in advance. | 2 | [
2,
4444,
255,
8128,
563,
13,
8,
550,
27,
800,
3726,
3726,
31,
589,
19,
14,
953,
16,
2697,
71,
550,
27,
183,
11886,
14497,
26,
14,
64,
85,
9,
92,
1276,
3271,
20,
55,
37,
14,
16230,
6531,
75,
1065,
13549,
68,
14,
214,
17,
4431... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple entry point for single RMI service?
===
I have several services which export an RMI interface.
They used to offer this by creating their own registry (with `LocateRegistry.createRegistry`) and binding it there. However, that became impossible when the services were moved to run as separate applications in the same VM (Tomcat), because for some reason only one registry can be present there.
I worked around this by using a central registry for all the services. Even then, I'm not really interested in the multi-object registry role of a registry, just its entry point facilities. A central registry, however, introduces more complexity (e.g. it must be started first, it must have the interfaces of services it registers).
Is there a way to bring back the situation where each service indepently offers an entry point to its RMI interface, while having them run in the same VM (which is a hosting detail, not part of the design)? | 0 | [
2,
1935,
2792,
454,
26,
345,
761,
1435,
365,
60,
800,
3726,
3726,
31,
57,
238,
687,
56,
7487,
40,
761,
1435,
6573,
9,
59,
147,
20,
1994,
48,
34,
2936,
66,
258,
18269,
13,
5,
1410,
13,
1,
1415,
9530,
12463,
702,
622,
9,
14946,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bind JSON object to asp.net gridview control using javascript
===
My jquery ajax called my codebehing static WebMethod and I used `System.Web.Script.Serialization.JavaScriptSerializer` to get JSON object and the output is something like this.
[{"ProductId":"9","Category":"TV","Products":"Discovery","Price":15.97},{"ProductId":"25","Category":"TV","Products":"HBO","Price":15.97}]
I have GridView(asp.net control) which has ProductId, Category, Products, Price columns. I should pass the result back to call back, loop and parse this and bind it to the gridview using the JavaScript.
I dont know even how to apply for loop on the above Json string. Please show some light on this. | 0 | [
2,
10193,
487,
528,
3095,
20,
28,
306,
9,
2328,
7354,
4725,
569,
568,
8247,
8741,
800,
3726,
3726,
51,
487,
8190,
93,
20624,
227,
51,
1797,
863,
252,
68,
12038,
2741,
5909,
1807,
43,
17,
31,
147,
13,
1,
10724,
9,
14113,
9,
8741,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change cursor of selected tab in a QTabWidget
===
I wonder if it's possible to change the cursor of the selected tab of a `QTabWidget`. I mean : I would like to have an arrow for the selected tab and the "hand" for the others. I was able to set the "hand" for the 4 tabs of the widget, but not individually.
Can I do that?
Thanks
---EDIT---
I have access to the `QTabBar`of the `QTabWidget` | 0 | [
2,
753,
29588,
16,
1704,
6523,
19,
21,
2593,
15783,
3976,
43,
3060,
800,
3726,
3726,
31,
2666,
100,
32,
22,
18,
938,
20,
753,
14,
29588,
16,
14,
1704,
6523,
16,
21,
13,
1,
1251,
15783,
3976,
43,
3060,
1,
9,
31,
884,
13,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
404 Error when opening a link in the "Site Pages" list in SharePoint 2010
===
I am VERY new to SharePoint development and am kind of pushing my way thorugh with my ASP.NET Webforms background. Everything seems very different with "packages" and "modules" and all so this may be a very simple configuration issue or something(I hope).
I have inherited a SharePoint Server site/server(?) installed on a VMWare Image. The pages that are experiencing the issue are in the SharePoint "Site Pages" list. I can see links to them there when I go to "Site Actions -> View All Site Content -> Site Pages", however when I click on them I get 404 erros. I am not sure how they can be in the list but not accessible. There are site pages that have been added by the system ("Home" & "How to use this library") that ARE working but the ones that were added are not.
Any direction or help would be greatly appreciated!
- G
| 0 | [
2,
13,
23397,
7019,
76,
1214,
21,
3508,
19,
14,
13,
7,
9097,
4434,
7,
968,
19,
1891,
3132,
498,
800,
3726,
3726,
31,
589,
253,
78,
20,
1891,
3132,
522,
17,
589,
825,
16,
5076,
51,
161,
7189,
9294,
29,
51,
28,
306,
9,
2328,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error in App Metro with DevDefined.OAuth
===
I am developing an app metro for windows 8. I use DevDefined.Oauth for authenticate but gives the following error:
Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system can not find the file specified. | 0 | [
2,
7019,
19,
4865,
3986,
29,
9664,
13439,
9,
111,
1346,
96,
800,
3726,
3726,
31,
589,
3561,
40,
4865,
3986,
26,
1936,
469,
9,
31,
275,
9664,
13439,
9,
111,
1346,
96,
26,
14351,
1373,
47,
2352,
14,
249,
7019,
45,
110,
52,
6305,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sonata user bundle creates 4 tables
===
I have had FosUser bundle before and today installed SonataUserBundle. When I --dump-sql, Symfony wants to install 4 new tables:
fos_user_user
fos_user_group
for_user_user_group
notification_message
First 3 are confusing because admin already works using existing ...Entity\User class for which I even set relations.
namespace Rent\ProgramBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="tbl_user")
*/
class User extends BaseUser
...
Why these 3 tables are installed and how to prevent that? Is there any use for them because admin section is working even without them.
| 0 | [
2,
13959,
4155,
10194,
9695,
268,
7484,
800,
3726,
3726,
31,
57,
41,
4310,
18,
16704,
10194,
115,
17,
786,
4066,
13959,
16704,
9930,
413,
9,
76,
31,
13,
8,
8,
43,
11134,
8,
18,
22402,
15,
13,
7261,
10229,
93,
2846,
20,
16146,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIActionSheet, get the clickedButtonIndex before proceeding?
===
What I want to do is on a UITableView, the user swipes a row to bring up the option to delete, once they press delete, then a UIActionSheet pops up to make sure they want to delete the row since it's more important than a typical row in a table. Depending on what they press, then I can delete the data in that row from the database. How do I get the indexPath for that row into the UIActionSheet though? Is the only way to assign a tag to the ActionSheet and in the delegate method, get the action sheet that showed it, and from there create an NSIndexPath to delete from the table? It seems like there could be a better way by having a categoroy or something so in my
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
method, I can just delete the row in there. Or is there a way to pass back the information from the UIActionSheet? Thanks! | 0 | [
2,
13,
5661,
8645,
17627,
15,
164,
14,
15802,
811,
444,
25671,
115,
20459,
60,
800,
3726,
3726,
98,
31,
259,
20,
107,
25,
27,
21,
13,
11193,
579,
4725,
15,
14,
4155,
27246,
18,
21,
3131,
20,
1499,
71,
14,
4255,
20,
27448,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to set accuracy when using csv writer in python
===
I have a float variable, obj["time"], which represents the unix time, previously I write the result to a text file, so I could use
fd_out.write("%.6f\n" %(obj["time"]))
to force the result to have 6 decimal. But now I want to print the result into csv file instead, so I used:
writer.writerow((obj["time"]))
the result only have 2 decimal by default, how could I change it? | 0 | [
2,
184,
20,
309,
11270,
76,
568,
272,
18,
710,
1462,
19,
20059,
800,
3726,
3726,
31,
57,
21,
11510,
7612,
15,
5122,
728,
2558,
7,
891,
7,
500,
15,
56,
4719,
14,
22540,
85,
15,
1343,
31,
2757,
14,
829,
20,
21,
1854,
3893,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rails asset pipeline - how to include asset not in asset path?
===
Ok so I've converted this multi skinned app of mine to make use of the assets pipeline introduced in Rails 3.1. For the most part it's been surprisingly easy and I'm in love with the preprocessing ability which allows you to use inline Ruby in your CSS/JS files. I have run into a major problem though, which despite the power of Sprockets seems tricky to solve. My app can be run with any number of skins (or "identities" rather) which is chosen at runtime. This "identity" parameter sets up stuff like cache directory, database connection, view paths - and indeed asset paths. While all "identities" can have their own stylesheet there is also a shared one which is used across all instances. So the assets folder structure looks something like this:
In /app/assets/stylesheets/aplication.css.erb:
<% require_asset("shared.css") %>
<% require_asset("overrides.css") %>
This loads two stylesheets, and crucially it uses the configured asset paths to resolve them (that's why i use `require_assets` instead of the standard `require` and `include` directives, as they don't hit the resolver). It returns the first matches found and allows me to very easily override part or whole of the default styling. So
/app/assets/stylesheets/shared.css
can be overridden by putting a file with the same name in the instance assets folder
/app/assets/[identity]/stylesheets/shared.css
and if no such file exists it silently falls back to the default shared.css.
It all works brilliantly - I use the same technique for Javascripts, images and fonts and everything gets neatly processed and packaged during precompilation. BUT. There is a type of (sideways) inheritance that I'm unable to achieve; *sometimes* the skin for an identity is so similar to another one that only a few dosen lines differ (e.g. identical layout but with a different colour scheme) and I really want to be able to do something like this:
assets/stylesheets/application.css.erb:
<% require_asset("shared.css") %>
<% require_asset("overrides.css") %>
assets/current_identity/stylesheets/overrides.css:
<% require_asset("../../some_other_identity/stylesheets/overrides.css") %>
/* followed by the dosen or so lines that differ for this skin */
...
This FAILS because in the current context "some_other_identity" is not in the asset paths - Rails does not find the file in dev mode, and of course it's not included during precompilation either. And if I do include it in the assets path it loads the wrong overrides.css (*there can be only one*). So I've been experimenting with putting something like this at the top of overrides.css:
<%= File.read(Rails.root.join("app/assets/some_other_identity/stylesheets/overrides.css")) %>
/* rest of CSS */
...
And indeed that works just as expected. BUT. Because I'm now using the assets pipeline to serve all assets I can no longer reference images in the CSS with a fixed path - I have to use <%= asset_path("some_image.png") %> so that the path resolver can work its magic. This means my overrides.css is really overrides.css.erb, and of course the ERB preprocessing doesn't happen when you do `File.read()`. So, I'm stuck! Help! Anyone? | 0 | [
2,
2240,
18,
12146,
12250,
13,
8,
184,
20,
468,
12146,
52,
19,
12146,
2013,
60,
800,
3726,
3726,
5854,
86,
31,
22,
195,
3494,
48,
1889,
13,
22531,
4865,
16,
1114,
20,
233,
275,
16,
14,
6223,
12250,
1277,
19,
2240,
18,
203,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
TextPad: multiple installations, one per UI language?
===
I would like to run two versions of the TextPad code
editor under Windows 7, one version in English and
one in Italian. However when I install one of these
and then try to install the other one a popup displays
an error message saying that it is not possible to have
two TextPad versions installed at the same time. Too bad
TextPad does not have a built-in menu allowing you to
choose the language used to edit text (which I think
would have been a more versatile solution).
Anyways, anyone having any suggestions concerning how
to have both versions installed concurrently would be
appreciated,
Regards,
John Goche | 0 | [
2,
1854,
8240,
45,
1886,
16885,
15,
53,
416,
13,
5661,
816,
60,
800,
3726,
3726,
31,
83,
101,
20,
485,
81,
3281,
16,
14,
1854,
8240,
1797,
1835,
131,
1936,
453,
15,
53,
615,
19,
486,
17,
53,
19,
1186,
9,
207,
76,
31,
16146,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
django edit user and userprofile object
===
so i'm making a generic "accounts" page in django. I've used the django-registration plugin, and currently have a (djang-standard) User object, as well as a UserProfile and UserProfileForm object.
This is a question of style, or best-practices, i suppose. Is what i'm planning "right" or is there a "better/recommended/standard way" to do this?
What i'm planning on doing is creating the UserProfile from the request.user ie:
form = UserProfileForm(instance=User)
(and sending that form to the view), and in the UserProfileForm:
class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
def __init__(self,*args,**kwargs):
super(UserProfileForm, self).__init__(*args, **kwargs)
if kwargs.has_key('instance'):
self.user = kwargs['instance']
where my UserProfile is pretty much like so:
class UserProfile(models.Model):
user = models.OneToOneField(User)
points = models.IntegerField(default=0) #how is the user going with scores?
and where User is of the `django.contrib.auth.models` variety.
Ok! The handling of the editing and saving will either be done via the `mixin` django stuff or, more likely because i haven't read up on mixins my own user-defined view that handles post and gets. But ignoring that - because i'm sure i should be using the mixins - is the above "right?" or are there suggestions?
cheers! | 0 | [
2,
3857,
14541,
9392,
4155,
17,
4155,
14503,
3095,
800,
3726,
3726,
86,
31,
22,
79,
544,
21,
12733,
13,
7,
29148,
18,
7,
2478,
19,
3857,
14541,
9,
31,
22,
195,
147,
14,
3857,
14541,
8,
12463,
702,
5946,
10922,
108,
15,
17,
871,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java How to improve reading of 50 Gigabit file
===
I am reading a 50G file containing millions of rows separated by newline character. Presently I am using following syntax to read the file
String line = null;
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("FileName")));
while ((line = br.readLine()) != null)
{
// Processing each line here
// All processing is done in memory. No IO required here.
}
Since the file is too big, it is taking 2 Hrs to process the whole file. Can I improve the reading of file from the harddisk so that the IO(Reading) operation takes minimal time. The restriction with my code is that I have to process each line sequential order. | 0 | [
2,
8247,
184,
20,
3545,
1876,
16,
1222,
7175,
58,
3326,
3893,
800,
3726,
3726,
31,
589,
1876,
21,
1222,
263,
3893,
3503,
11999,
16,
11295,
4196,
34,
78,
1143,
925,
9,
14431,
31,
589,
568,
249,
22649,
20,
1302,
14,
3893,
3724,
293,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android app method profiling generates error "java.lang.IllegalMonitorStateException: unlock of unowned monitor"
===
Our app works fine without any problem. Whenever I click "Start Method Profiling" on the Devices tab of the DDMS perspective in Eclipse, the following error is generated and the app crashes:
06-24 12:32:48.161: E/AndroidRuntime(3043): FATAL EXCEPTION: AsyncTask #4
06-24 12:32:48.161: E/AndroidRuntime(3043): java.lang.RuntimeException: An error occured while executing doInBackground()
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.AsyncTask$3.done(AsyncTask.java:200)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
06-24 12:32:48.161: E/AndroidRuntime(3043): at java.lang.Thread.run(Thread.java:1019)
06-24 12:32:48.161: E/AndroidRuntime(3043): Caused by: java.lang.IllegalMonitorStateException: unlock of unowned monitor
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:221)
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.Handler.sendMessageAtTime(Handler.java:457)
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.Handler.sendMessageDelayed(Handler.java:430)
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.Handler.sendMessage(Handler.java:367)
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.Message.sendToTarget(Message.java:349)
06-24 12:32:48.161: E/AndroidRuntime(3043): at android.os.AsyncTask.publishProgress(AsyncTask.java:411)
...
Could anyone offer some tips about how to remedy this?
Thanks in advance.
| 0 | [
2,
13005,
4865,
2109,
8721,
49,
802,
7920,
18,
7019,
13,
7,
1004,
1385,
9,
9949,
9,
5564,
4941,
2111,
242,
248,
3859,
10066,
872,
45,
16497,
16,
367,
6863,
7626,
7,
800,
3726,
3726,
318,
4865,
693,
1123,
366,
186,
1448,
9,
6634,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Performance testing with RSpec
===
I'm trying to incorporate performance tests into a test suite for *non-Rails* app and have a couple problems.
1. I don't need to run perf tests every time, how can I exclude them? Commenting and uncommenting `config.filter_run_excluding :perf => true` seems like a bad idea.
2. How do I report benchmark results? I think RSpec has some mechanism for that. | 0 | [
2,
956,
4431,
29,
13,
1224,
12610,
800,
3726,
3726,
31,
22,
79,
749,
20,
14710,
956,
4894,
77,
21,
1289,
6160,
26,
1637,
3951,
8,
7301,
18,
2483,
4865,
17,
57,
21,
1335,
1716,
9,
137,
9,
31,
221,
22,
38,
376,
20,
485,
416,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to skip image tag in html data in android?
===
My data in db is stored in html format along with image tags in it. So when I am getting the data from database I am removing the html tags and setting it to textview. My problem is even after removing the html tags, there is a small square box displaying in the emulator indicating that there is some image. How can I remove those square box in emulator which is an indication of image in that html data? Help me regarding this...
Thanks in advance
My Code:
textView.setText(Html.fromHtml(htmlString)); | 0 | [
2,
184,
20,
12532,
1961,
3383,
19,
13,
15895,
1054,
19,
13005,
60,
800,
3726,
3726,
51,
1054,
19,
13,
9007,
25,
8214,
19,
13,
15895,
2595,
303,
29,
1961,
3383,
18,
19,
32,
9,
86,
76,
31,
589,
1017,
14,
1054,
37,
6018,
31,
589,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
opengl 3d texture issue
===
Hi i'm trying to use a 3d texture in opengl to implement volume rendering. Each voxel has an rgba colour value and is currently rendered as a screen facing quad.(for testing purposes). I just can't seem to get the sampler to give me a colour value in the shader. The quads always end up black. When I change the shader to generate a colour (based on xyz coords) then it works fine. I'm loading the texture with the following code:
glGenTextures(1, &tex3D);
glBindTexture(GL_TEXTURE_3D, tex3D);
unsigned int colours[8];
colours[0] = Colour::AsBytes<unsigned int>(Colour::Blue);
colours[1] = Colour::AsBytes<unsigned int>(Colour::Red);
colours[2] = Colour::AsBytes<unsigned int>(Colour::Green);
colours[3] = Colour::AsBytes<unsigned int>(Colour::Magenta);
colours[4] = Colour::AsBytes<unsigned int>(Colour::Cyan);
colours[5] = Colour::AsBytes<unsigned int>(Colour::Yellow);
colours[6] = Colour::AsBytes<unsigned int>(Colour::White);
colours[7] = Colour::AsBytes<unsigned int>(Colour::Black);
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 2, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, colours);
The colours array contains the correct data, i.e. the first four bytes have values 0, 0, 255, 255 for blue. Before rendering I bind the texture to the 2nd texture unit like so:
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_3D, tex3D);
And render with the following code:
shaders["DVR"]->Use();
shaders["DVR"]->Uniforms["volTex"].SetValue(1);
shaders["DVR"]->Uniforms["World"].SetValue(Mat4(vl_one));
shaders["DVR"]->Uniforms["viewProj"].SetValue(cam->GetViewTransform() * cam->GetProjectionMatrix());
QuadDrawer::DrawQuads(8);
I have used these classes for setting shader params before and they work fine. The quaddrawer draws eight instanced quads. The vertex shader code looks like this:
#version 330
layout(location = 0) in vec2 position;
layout(location = 1) in vec2 texCoord;
uniform sampler3D volTex;
ivec3 size = ivec3(2, 2, 2);
uniform mat4 World;
uniform mat4 viewProj;
smooth out vec4 colour;
void main()
{
vec3 texCoord3D;
int num = gl_InstanceID;
texCoord3D.x = num % size.x;
texCoord3D.y = (num / size.x) % size.y;
texCoord3D.z = (num / (size.x * size.y));
texCoord3D /= size;
texCoord3D *= 2.0;
texCoord3D -= 1.0;
colour = texture(volTex, texCoord3D);
//colour = vec4(texCoord3D, 1.0);
gl_Position = viewProj * World * vec4(texCoord3D, 1.0) + (vec4(position.x, position.y, 0.0, 0.0) * 0.05);
}
uncommenting the line where I set the colour value equal to the texcoord works fine, and makes the quads coloured. The fragment shader is simply:
#version 330
smooth in vec4 colour;
out vec4 outColour;
void main()
{
outColour = colour;
}
So my question is, what am I doing wrong, why is the sampler not getting any colour values from the 3d texture? | 0 | [
2,
368,
8430,
203,
43,
12714,
1513,
800,
3726,
3726,
4148,
31,
22,
79,
749,
20,
275,
21,
203,
43,
12714,
19,
368,
8430,
20,
8713,
2310,
15307,
9,
206,
13,
22611,
532,
63,
40,
13,
8911,
969,
4609,
1923,
17,
25,
871,
10877,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
php chain calling static non objects
===
I can make infinite calling by returning `$this` in class body functions after creating as object.
Is it possible to make the same without creating object?
Something like `myclass::func1()::func2()::func3()`
i was trying with reflection and stored new class in parent variable, but it returning also object, which couldnt be called by `::`
Ps is a late static binding is so important that i must use it when it possible? | 0 | [
2,
13,
26120,
2858,
2555,
12038,
538,
3916,
800,
3726,
3726,
31,
92,
233,
9698,
2555,
34,
2485,
13,
1,
4403,
1565,
1,
19,
718,
358,
3719,
75,
2936,
28,
3095,
9,
25,
32,
938,
20,
233,
14,
205,
366,
2936,
3095,
60,
301,
101,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to start over a count
===
I am trying to keep a 1-10 count and if the count goes over 10 it starts back at 1
Tick := 5;
currentTick := 8;
Now `FinalTick` is going to be CurrentTick + Tick but once the value is 10 it should stat over at 1 thus in this case
5 + 8 = 3
How do I do this? | 0 | [
2,
184,
20,
799,
84,
21,
2468,
800,
3726,
3726,
31,
589,
749,
20,
643,
21,
137,
8,
1036,
2468,
17,
100,
14,
2468,
1852,
84,
332,
32,
3244,
97,
35,
137,
8809,
13,
45,
3726,
331,
73,
866,
38,
7030,
13,
45,
3726,
469,
73,
130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Deleting every eclipse plugin in Galileo
===
My eclipse runs horribly slow because I have thousands of plugins installed on it. I spoke with another friend who uses eclipse but he has none. I feel like none of these are necessary and I didn't even install so many. I have thousands of plugins and I tried reinstaling eclipse but I need to find a way to remove every single eclipse plugin.
Attempting to delete a plugin manually takes up to 5 minutes per plugin, so it could take me months or years before actually deleting all of these by hand.
Is there a feature in eclipse to delete all the plugins? | 0 | [
2,
121,
1336,
68,
352,
11652,
10922,
108,
19,
24129,
800,
3726,
3726,
51,
11652,
1461,
28441,
2276,
185,
31,
57,
3805,
16,
10922,
108,
18,
4066,
27,
32,
9,
31,
1977,
29,
226,
860,
72,
2027,
11652,
47,
24,
63,
2369,
9,
31,
583,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Use $.get() or this.model.save() (Backbone.js)
===
I have a list of images each with a 'Like' button. When the 'Like' button is clicked, an AJAX request (containing the `item_id` and `user_id`) will be sent to the serverside to record the Like (by adding a new row in the table `likes` with values for `item_id` and `user_id`).
The model `Photo` is used for the images displayed on the page. If I understand correctly, `this.model.save()` is used if I want to update/add a new `Photo`, so it is not suitable for recording 'Likes'. Therefore, I have to use something like `$.get()` or `$.post()`. Is this the conventional way?
Or do I create a new model called `Like` as shown below, which seems to make it messier to have a View just for a Like button.
Like = Backbone.Model.extend({
url: 'likes'
});
LikeView = Backbone.View.extend({
events: {
'click .btn_like': 'like'
},
like: function() {
this.model.save({
user_id: 1234,
post_ud: 10000
})
}
}); | 0 | [
2,
275,
5579,
9,
3060,
5,
6,
54,
48,
9,
13998,
9,
19863,
5,
6,
13,
5,
1958,
8640,
9,
728,
18,
6,
800,
3726,
3726,
31,
57,
21,
968,
16,
3502,
206,
29,
21,
13,
22,
1403,
22,
5167,
9,
76,
14,
13,
22,
1403,
22,
5167,
25,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is C# truly viable for a modern web-socket server?
===
I need to develop a fairly scalable socket server for an HTML5 / Mobile based turn-based type game.
Time is a real factor in this as I need to prototype out something in 3 months. I have extensive (years) of experience in C# and zero experience in Node or Erlang which I've singled out as the perfect languages for this project. Unfortunately, both of those languages will have a lot of learning curve associated with them and things such as code quality, unit tests, maintainability I will have no experience with so I imagine the code will be of a poor quality.
How bad of a decision will it be to choose to go with C# for this project to save development time as I will have a lot more headaches with scalability and things down the line.
Is C# seriously considered viable for a modern web-app socket server? | 4 | [
2,
25,
272,
5910,
4574,
17347,
26,
21,
773,
2741,
8,
18,
5668,
1198,
8128,
60,
800,
3726,
3726,
31,
376,
20,
2803,
21,
6647,
18957,
579,
18482,
8128,
26,
40,
13,
15895,
264,
13,
118,
3241,
432,
805,
8,
1281,
1001,
250,
9,
85,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.