unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
ASPxGridView - The width of columns are not equal if ColumnResizeMode is set to Control or NextColumn
===
I added ASPxGridView with Customization window to hide/show columns , and two buttons to save and load client layout , i hide a column and save layout to session variable , after that i reload the layout from session and restore the hidden column but the previous column's width is set to zero.
is There any idea? | 0 | [
2,
28,
306,
396,
16375,
4725,
13,
8,
14,
9456,
16,
7498,
50,
52,
2747,
100,
4698,
99,
10454,
15570,
25,
309,
20,
569,
54,
328,
716,
4404,
103,
800,
3726,
3726,
31,
905,
28,
306,
396,
16375,
4725,
29,
5816,
1829,
1463,
20,
3077,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 use dynamic to redirect HttpContext.Current.Request?
===
I'm using RhinoMocks for testing. It's not good at redirecting statics; I've considered using another library like the successor to Moles or TypeMock, but would prefer not to.
I have a 3rd party library that takes in an HttpRequest object. My first stab at it was to use:
public void GetSamlResponseFromHttpPost(out XmlElement samlResponse,
out string relayState, HttpContextBase httpContext = null)
{
var wrapper = httpContext ?? new HttpContextWrapper(HttpContext.Current);
// signature of the next line cannot be changed
ServiceProvider.ReceiveSAMLResponseByHTTPPost(
wrapper.ApplicationInstance.Context.Request, out samlResponse, out relayState);
All looked fine, until I went to test it. The real issue here is that I need to stub out `wrapper.ApplicationInstance.Context.Request`. Which leads into a whole host of old school 'ASP.NET don't like testing' pain.
I have heard that you can use `dynamic` magic in C# to redirect static methods. Can't find any examples of doing this with something like HttpContext though. Is this possible? | 0 | [
2,
92,
31,
275,
7782,
20,
302,
14706,
7775,
1126,
11969,
9,
17657,
9,
99,
10351,
60,
800,
3726,
3726,
31,
22,
79,
568,
18642,
79,
5668,
18,
26,
4431,
9,
32,
22,
18,
52,
254,
35,
302,
14706,
68,
12038,
18,
73,
31,
22,
195,
72... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Having trouble just getting the Highchart to show
===
I'm pretty new to Javascript, Rails and JQuery all working together.
I'm going through this tutorial (http://www.highcharts.com/documentation/how-to-use#installation) on Highcharts and just trying to get a base graph to show. It's not happening.
In my home.html.erb file I have:
> `<div id="container" style="width: 100%; height: 400px"></div>`
In `app/views/layouts/application.html.erb` I have this in my `head` tag:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="/public/highcharts.js" type="text/javascript"></script>
And this is the code in /public/highcharts.js:
var chart1; // globally available
$(document).ready(function() {
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: 'Jane',
data: [1, 0, 4]
}, {
name: 'John',
data: [5, 7, 3]
}]
});
});
Nothing is showing up when I load the page and I have no idea why. I've done the tutorial 3 or 4 times and Googled around for the answer to no avail. Any help would be hugely appreciated. | 0 | [
2,
452,
2572,
114,
1017,
14,
183,
5433,
38,
20,
298,
800,
3726,
3726,
31,
22,
79,
1772,
78,
20,
8247,
8741,
15,
2240,
18,
17,
487,
8190,
93,
65,
638,
429,
9,
31,
22,
79,
228,
120,
48,
29724,
13,
5,
21127,
6903,
6483,
9,
4542... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Convert Matlab Code to Python
===
Hi I am trying to convert the following code from Trefethen's Spectral Methods in MATLAB to Python.
% p6.m - variable coefficient wave equation
% Grid, variable coefficient, and initial data:
N = 128; h = 2*pi/N; x = h*(1:N); t = 0; dt = h/4;
c = .2 + sin(x-1).^2;
v = exp(-100*(x-1).^2); vold = exp(-100*(x-.2*dt-1).^2);
% Time-stepping by leap frog formula:
tmax = 8; tplot = .15; clf, drawnow, set(gcf,'renderer','zbuffer')
plotgap = round(tplot/dt); dt = tplot/plotgap;
nplots = round(tmax/tplot);
data = [v; zeros(nplots,N)]; tdata = t;
for i = 1:nplots
for n = 1:plotgap
t = t+dt;
v_hat = fft(v);
w_hat = 1i*[0:N/2-1 0 -N/2+1:-1] .* v_hat;
w = real(ifft(w_hat));
vnew = vold - 2*dt*c.*w; vold = v; v = vnew;
end
data(i+1,:) = v; tdata = [tdata; t];
end
waterfall(x,tdata,data), view(10,70), colormap(1e-6*[1 1 1]);
axis([0 2*pi 0 tmax 0 5]), ylabel t, zlabel u, grid off
For the most part it is going smoothly except for this line of code
data = [v; zeros(nplots,N)]
After reading how to convert between Numpy and Matlab here http://www.scipy.org/NumPy_for_Matlab_Users#head-e9a492daa18afcd86e84e07cd2824a9b1b651935 I tried to convert it by doing the following
data = np.array(v,zeros(nplots,N))
but I get this error
data = np.array(v,zeros(nplots,N));
TypeError: data type not understood
Which I assume is because a numpy arrry has this structure
numpy.array(object,dtype=none)
I would appreciate any help with converting that line. Thank you in advance!
| 0 | [
2,
8406,
4277,
9086,
1797,
20,
20059,
800,
3726,
3726,
4148,
31,
589,
749,
20,
8406,
14,
249,
1797,
37,
4607,
3739,
2504,
22,
18,
20703,
3195,
19,
4277,
9086,
20,
20059,
9,
13,
11881,
351,
379,
9,
79,
13,
8,
7612,
14612,
2367,
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... |
Why did bundle create the bundle in directory X?
===
I ran
bundle install
and it completed without error, except that at the very last line, it printed:
Your bundle is complete! It was installed into ./linecache
There's no mention of linecache in the Gemfile. I even tried the extreme measure of deleting my Gemfile.lock and calling `bundle install` again. Same result.
What's going on? | 0 | [
2,
483,
144,
10194,
1600,
14,
10194,
19,
16755,
993,
60,
800,
3726,
3726,
31,
717,
10194,
16146,
17,
32,
1066,
366,
7019,
15,
1613,
30,
35,
14,
253,
236,
293,
15,
32,
5317,
45,
154,
10194,
25,
1279,
187,
32,
23,
4066,
77,
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... |
Google Maps API V3: Simple Marker Cluster Not Showing Up
===
I am developing a Web Based Application using PHP, MongoDB, Javascript, and Google Maps API V3.
I was able to easily generate and display markers on a google map by converting the MongoDB array using json_encode.
However, when I try to implement the Google Maps MarkerClusterer method, the markers does not show up. I followed Google Map's "[A Simple MarkerClusterer Example][1]" as a guide.
It seems pretty simple but somehow, it is not displaying the markers. I also tried commenting out the whole infoWindow/OnClick event section so I don't think its related to that. Any help is greatly appreciated.
PHP MongoDB Query:
<?php
// Connect to Mongo and set DB and Collection
try
{
$mongo = new Mongo();
$db = $mongo->selectDB('twitter');
$collection = $db->selectCollection('tweets');
}
catch(MongoConnectionException $e)
{
die("Failed to connect to Twitter Database ". $e->getMessage());
}
// The hotspots array will contain the data that will be returned
$tweets = array();
// Return a cursor of tweets from MongoDB
$cursor = $collection->find();
// Try catch for catching whether there are tweets to display
$count = 0;
try
{
$count = $cursor->count();
}
catch (MongoCursorException $e)
{
die(json_encode(array('error'=>'error message:' .$e->getMessage())));
}
// Loops through the cursor again specifically for querying all geo locations
// Unlike table display of tweets, this cursor is not limited by pages.
foreach($cursor as $id => $value)
{
$mapLocations[] = array
(
'id'=>$value['_id'],
'screen_name'=>$value['screen_name'],
'name'=>$value['name'],
'tweet'=>$value['tweet'],
'hashtags'=>$value['hashtags'],
'lat'=>$value['geo']['lat'],
'long'=>$value['geo']['long'],
'date'=>$value['date'],
'img'=>$value['img'],
'specImg'=>$value['specImg']
);
}
// var_dump($mapLocations);
?>
Javascript Function:
function initialize()
{
// Converts MongoDB information to JSON, ready for Javascript
var tweets = <?php echo json_encode($mapLocations); ?>;
// Sets google maps options
var myOptions =
{
// Centers on Maui...
center: new google.maps.LatLng(20.80362, -156.321716),
zoom: 7,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
// Sets Marker Clusterer Options
var mcOptions =
{
gridSize: 50, maxZoom: 15
};
// Generates Google Map and applies the defined options above.
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
// Infowindow for displaying information for onClick event
// Content must be inside the google.maps.event function
// Otherwise the same content will be entered on all markers
var infoWindow = new google.maps.InfoWindow({});
var markerCluster = null; // Initializes markerCluster
var markers = []; //Array needed to pass to MarkerClusterer
// Loops through each tweet and draws the marker on the map.
for (var i = 0; i < tweets.length; i++)
{
var tweet = tweets[i];
if(tweet.lat != null || tweet.long != null)
{
var myLatLng = new google.maps.LatLng(tweet.lat, tweet.long);
//document.write(" Latitude: " + tweet.lat + " Longitude: " + tweet.long + " <br> ");
var marker = new google.maps.Marker({
position: myLatLng,
//icon: "markers/flag.png",
//map: map,
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', (function(marker, i)
{
return function()
{
// Generates a table for infoWindow
var content = "<table class='popup'>";
// Check if image exits, otherwise show no image icon
if(tweets[i].specImg != null)
{
content += "<tr><th width=75 ><a href=" + tweets[i].specImg + ">";
content += "<img height=75 width=75 src=" + tweets[i].specImg + "></a>";
}
else
{
content += "<tr><th width=75><img height=75 width=75 src=images/noimage.jpg>";
}
// Concatanate screen name and tweet
// Will work on trimming information
content += "</th><td>" + tweets[i].screen_name + " says...<br>";
content += "''" + tweets[i].tweet + "''<br>";
content += "on " + tweets[i].date + "</td>";
content += "</table>";
// Zoom into marker on click
map.setZoom(15);
map.setCenter(marker.getPosition());
// Sets the infoWindow content to the marker
infoWindow.setContent(content);
infoWindow.open(map, marker);
}
})(marker, i));
}
}
var markerCluster = new MarkerClusterer(map, markers);
}
[1]: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html "A Simple MarkerClusterer Example" | 0 | [
2,
8144,
6867,
21,
2159,
566,
240,
45,
1935,
13289,
7460,
52,
3187,
71,
800,
3726,
3726,
31,
589,
3561,
21,
2741,
432,
3010,
568,
13,
26120,
15,
3521,
5474,
220,
15,
8247,
8741,
15,
17,
8144,
6867,
21,
2159,
566,
240,
9,
31,
23,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 reproduce undefined method error for NilClass
===
I want to find out how to reproduce the following error in Ruby 1.9:
NoMethodError (undefined method `[]' for nil:NilClass):
It's my own interest. The following doesn't work for me:
a = nil
a[:key]
| 0 | [
2,
184,
20,
21509,
367,
13439,
2109,
7019,
26,
1781,
255,
1898,
800,
3726,
3726,
31,
259,
20,
477,
70,
184,
20,
21509,
14,
249,
7019,
19,
10811,
137,
9,
518,
45,
90,
5909,
1807,
43,
29992,
13,
5,
1020,
13439,
2109,
13,
1,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
LSF -- Giving multiple options for acceptable resource types?
===
I'm running some jobs on a cluster that uses the [LSF](http://en.wikipedia.org/wiki/Platform_LSF) batch scheduling tool. A typical batch request looks like this:
bsub -q someQueue -R someResourceType /home/user/myProgram
In the cluster that I'm using, there are approximately ten different types of resources. (In other words, ten different types of nodes in the cluster.) There are three resource types that would be acceptable for the batch jobs that I'm running. Therefore, I'd like to make a request that says "use whichever resource type is available out of `resourceType1`, `resourceType2`, or `resourceType3`."
I'm guessing such a request would look something like this:
bsub -q someQueue -R {resourceType1 or resourceType2 or resourceType3} /home/user/myProgram
Is there a way to do this in LSF? | 0 | [
2,
644,
18,
410,
13,
8,
8,
1438,
1886,
6368,
26,
12513,
6577,
2551,
60,
800,
3726,
3726,
31,
22,
79,
946,
109,
4844,
27,
21,
7460,
30,
2027,
14,
636,
7532,
410,
500,
5,
21127,
6903,
219,
9,
17375,
26132,
9,
5583,
118,
17375,
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... |
HBase completebulkload returns exception
===
I am trying to bulk-populate an HBase table quickly from a text file (several GB) by using the bulk loading method [described][1] in the Hadoop docs.
I have created an HFile which I now want to push to my HBase table.
When I use this command:
hadoop jar /home/hxcaine/hadoop/lib/hbase.jar completebulkload /user/hxcaine/dbpopulate/output/cf1 my_hbase_table
The job starts and then I get this exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/util/concurrent/ThreadFactoryBuilder
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.doBulkLoad(LoadIncrementalHFiles.java:195)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.run(LoadIncrementalHFiles.java:696)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.main(LoadIncrementalHFiles.java:701)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.ThreadFactoryBuilder
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 17 more
However, I can see that the Guava jar is in my classpath and when I check inside the jar I can see `ThreadFactoryBuilder.class`.
I am using these versions (and stuck with them):
- Hadoop 0.20.2-cdh3u3
- HBase 0.90.4-cdh3u3
- Guava jar: /usr/lib/hadoop-0.20/lib/guava-r09-jarjar.jar
I do have an older Guava jar in my classpath but I don't know where it came from, I don't suppose it should have an effect.
Any ideas?
[1]: http://hbase.apache.org/book.html#arch.bulk.load | 0 | [
2,
746,
8436,
1279,
9077,
197,
8294,
4815,
5391,
800,
3726,
3726,
31,
589,
749,
20,
7238,
8,
6057,
12383,
40,
746,
8436,
859,
976,
37,
21,
1854,
3893,
13,
5,
29807,
14857,
6,
34,
568,
14,
7238,
12797,
2109,
636,
27701,
500,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 turn our PC to a webserver that uses tomcat
===
I'm trying to make my PC become a webserver using tomcat. The last time I did it was 6 months ago, and I totally did it. However, I couldn't do it this time. my steps are:
- set static IP by go to Local area network properties and go to TCP/IP 4, check use the following IP address and input :
[static IP picture][1]
- open browser and type 192.168.1.1 to access DSL router, to NAT and input like following
[Router config picture][2]
- go to ip2location.com to see my router ip address. Then on my phone browser (using 3G, not the same line with my computer), I enter the ip address + port 8080 + / + myproject name. It displays not found.(picture below)
**i182.photobucket.com/albums/x38/DNK90/Capture2.jpg**
I also have xampp, and I usually turn it off to access to tomcat server except this time.
:(
[1]: http://i182.photobucket.com/albums/x38/DNK90/Capture-3.jpg
[2]: http://i182.photobucket.com/albums/x38/DNK90/Capture1.jpg | 2 | [
2,
184,
20,
805,
318,
5168,
20,
21,
2741,
10321,
106,
30,
2027,
2067,
5782,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
51,
5168,
533,
21,
2741,
10321,
106,
568,
2067,
5782,
9,
14,
236,
85,
31,
144,
32,
23,
400,
818,
1464,
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... |
Colons in Drupal db_query being stripped
===
I have a long SQL Select query that I am using in Drupal in place of a bunch of PHP functions to speed up a cron job. I won't post the whole thing, but I should say that the whole query works perfectly when pasted into phpMyAdmin. The crucial part looks like this:
@startstamp := UNIX_TIMESTAMP( CONCAT('2001-01-01 ', @starttime)),
@endstamp := UNIX_TIMESTAMP(CONCAT('2001-01-01 ', @endtime))
I am using MySQL user defined variables to hold temporary information during the query, which is later returned. Unfortunately, when I run this through Drupal's db_query(), it seems that the := assignment operator is being turned into just an '=', as my query always returns null.
Does anyone have any idea how to escape the : before the =? Or how to bypass the prepared statement mechanism in Drupal?
Many thanks in advance. | 0 | [
2,
10766,
18,
19,
15708,
6720,
13,
9007,
1,
8190,
93,
142,
10841,
800,
3726,
3726,
31,
57,
21,
175,
4444,
255,
5407,
25597,
30,
31,
589,
568,
19,
15708,
6720,
19,
209,
16,
21,
7653,
16,
13,
26120,
3719,
20,
1362,
71,
21,
13,
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... |
Connecting to RESTful web services in JBoss 7.1 over HTTPS gives handshake_failure
===
I have RESTful web services deployed in JBoss 7.1. They all work over http. I can access a web service with a GET over https through a browser so my SSL is working for browsers. When I try to access any of the RESTful web services (including the same GET web service) over https through Java code I get this exception
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I have the jssecacerts file deployed in my `JAVA_HOME/jre/lib/security` directory and the Java code finds it. This jssecacerts file was created from and works with our certificate which was deployed on JBoss 6.1, so the jssecacerts works with our certificate (.jks file).
I have SSL handshake debugging turned on like this
systemProps.put("javax.net.debug","ssl:handshake");
The output shows that it found my jssecacerts file as a trustStore of type jks.
Just before the handshake_failure exception I see this
main, WRITE: TLSv1 Handshake, length = 75
main, WRITE: SSLv2 client hello message, length = 101
main, READ: TLSv1 Alert, length = 2
main, RECV TLSv1 ALERT: fatal, handshake_failure
I'm not sure if this indicates that TLSv1 and SSLv2 are causing a problem or not.
Since these certificates work on JBoss 6.1 and through the browser on JBoss 7.1 I'm thinking that I
have SSL configured differently or incorrectly on JBoss 7.1. Here's my JBoss 7.1 SSL configuration:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
<ssl name="xyz" key-alias="1" password="secret" certificate-key-file="../standalone/configuration/ourcert.jks" protocol="TLSv1"/>
</connector>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
My Java code looks like this
URL url = null;
HttpsURLConnection connection = null;
String urlStrGet = urlStr + "/acctservice/isalive/1234";
try {
url = new URL(urlStrGet);
connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
if (connection.getResponseCode() != 200) {
throw new RuntimeException("Operation failed: "
+ connection.getResponseCode());
}
....
The exception is thrown by connection.getResponseCode().
Any suggestions as to what I need to do the get Java code to work with my RESTful web services over https?
| 0 | [
2,
6440,
20,
760,
1566,
2741,
687,
19,
487,
10349,
18,
453,
9,
165,
84,
7775,
18,
2352,
224,
17248,
1,
24910,
4221,
800,
3726,
3726,
31,
57,
760,
1566,
2741,
687,
6698,
19,
487,
10349,
18,
453,
9,
165,
9,
59,
65,
170,
84,
7775... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Scrollview + scaling images = doesn't scroll properly, why not?
===
I have an image that I scale to the width of the phone/tablet. It is 224x1632. The imageview is within the scrollview, and I need to be able to scroll up and down on that image.
The issue is that the scrollview sets according to the image size (1632 in length) on create, but when the image scales/stretches it is 3x taller than the original. Now the scroll-view is too small to scroll the entire image.
Any way to make the scrollview fit the image?
Note: the image length will differ per phone, so I can't set it to a predetermined size.
XML Code:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" android:scrollbars="vertical" android:src="@drawable/tiles" /> </ScrollView>
| 0 | [
2,
12159,
4725,
2754,
26829,
3502,
800,
1437,
22,
38,
12159,
7428,
15,
483,
52,
60,
800,
3726,
3726,
31,
57,
40,
1961,
30,
31,
3464,
20,
14,
9456,
16,
14,
1132,
118,
5924,
38,
9,
32,
25,
13,
19236,
396,
1091,
3125,
9,
14,
1961... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Configure Sharepoint 2010 profile synchronization for sync with Custom claims provider?
===
I'm using a Sharepoint web application with a custom claims provider as the only authentication method.
I want to sync sharepoint 2010 user profile data with some particular claim.
i.e:
The user email on the sharepoint user profile with the "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" claim on my provider.
(I'm not using that value as a principal)
So far from what I've been researching, one possibility could be using the Sharepoint profile sync service.
I could eventually set up the sync but I can't create a synchronization connection with a custom claims provider.
I tried to do a Synchronization Connections but it just have options for AD and some other repositories, but not to a particular claim on custom claims provider.
Any tip regarding how to do that?
Eventually, any other idea of how to acomplish this?
Thanks in advance!
PnP | 0 | [
2,
1065,
15951,
1891,
3132,
498,
5296,
13,
16023,
1829,
26,
6063,
150,
29,
5816,
2810,
11747,
60,
800,
3726,
3726,
31,
22,
79,
568,
21,
1891,
3132,
2741,
3010,
29,
21,
5816,
2810,
11747,
28,
14,
104,
27963,
2109,
9,
31,
259,
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... |
python byRef // copy
===
I am new to Python (and dont know much about programming anyway), but I remember reading that python generally does not copy values so any statement a = b makes b point to a. If I run
a = 1
b = a
a = 2
print(b)
gives the result 1. Should that not be 2? | 0 | [
2,
20059,
34,
14057,
12894,
4344,
800,
3726,
3726,
31,
589,
78,
20,
20059,
13,
5,
290,
1049,
143,
212,
88,
3143,
2774,
6,
15,
47,
31,
1518,
1876,
30,
20059,
1469,
630,
52,
4344,
4070,
86,
186,
3331,
21,
800,
334,
1364,
334,
454,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Define an array/vector property type in Add Property Wizard of VS2010
===
I am trying to add an array/vector property type in the Add Property Wizard of VS2010. There seems to be no such array/vector relaed property type. I also tried setting my own property type, vector, this gives me an error ," Property type must be a variant- compatible type from the list" .
But I dont see any array/vector supported property type in the list.Is there a way this could be done? | 0 | [
2,
9267,
40,
7718,
118,
28033,
1354,
1001,
19,
3547,
1354,
10276,
16,
4611,
2751,
800,
3726,
3726,
31,
589,
749,
20,
3547,
40,
7718,
118,
28033,
1354,
1001,
19,
14,
3547,
1354,
10276,
16,
4611,
2751,
9,
80,
2206,
20,
44,
90,
145,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
View's testing indicates 'No rounte matches' for nested resource
===
I have a `Training` model that's nested under a `devise` `User` model.
**/config/routes.rb**
devise_for :users, path: 'u'
resources :users, only: ['index','show'], shallow: true do
resources :trainings
end
**> rake routes**
new_user_session GET /u/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"}
user_session POST /u/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"}
destroy_user_session DELETE /u/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"}
user_password POST /u/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_user_password GET /u/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET /u/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /u/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET /u/cancel(.:format) {:action=>"cancel", :controller=>"devise/registrations"}
user_registration POST /u(.:format) {:action=>"create", :controller=>"devise/registrations"}
new_user_registration GET /u/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"}
edit_user_registration GET /u/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"}
PUT /u(.:format) {:action=>"update", :controller=>"devise/registrations"}
DELETE /u(.:format) {:action=>"destroy", :controller=>"devise/registrations"}
user_trainings GET /users/:user_id/trainings(.:format) {:action=>"index", :controller=>"trainings"}
POST /users/:user_id/trainings(.:format) {:action=>"create", :controller=>"trainings"}
new_user_training GET /users/:user_id/trainings/new(.:format) {:action=>"new", :controller=>"trainings"}
edit_training GET /trainings/:id/edit(.:format) {:action=>"edit", :controller=>"trainings"}
training GET /trainings/:id(.:format) {:action=>"show", :controller=>"trainings"}
PUT /trainings/:id(.:format) {:action=>"update", :controller=>"trainings"}
DELETE /trainings/:id(.:format) {:action=>"destroy", :controller=>"trainings"}
users GET /users(.:format) {:action=>"index", :controller=>"users"}
user GET /users/:id(.:format) {:action=>"show", :controller=>"users"}
root / {:controller=>"team", :action=>"index"}
teams GET /teams(.:format) {:action=>"index", :controller=>"teams"}
POST /teams(.:format) {:action=>"create", :controller=>"teams"}
new_team GET /teams/new(.:format) {:action=>"new", :controller=>"teams"}
edit_team GET /teams/:id/edit(.:format) {:action=>"edit", :controller=>"teams"}
team GET /teams/:id(.:format) {:action=>"show", :controller=>"teams"}
PUT /teams/:id(.:format) {:action=>"update", :controller=>"teams"}
DELETE /teams/:id(.:format) {:action=>"destroy", :controller=>"teams"}
I'm having the following outputs when testing views:
Failures:
1) trainings/edit renders the edit training form
Failure/Error: render
ActionView::Template::Error:
No route matches {:controller=>"trainings"}
# ./app/views/trainings/edit.html.erb:6:in `_app_views_trainings_edit_html_erb___268980906337666865_45435220'
# ./spec/views/trainings/edit.html.erb_spec.rb:12:in `block (2 levels) in <top (required)>'
2) trainings/index renders a list of trainings
Failure/Error: render
ActionView::Template::Error:
No route matches {:action=>"new", :controller=>"trainings"}
# ./app/views/trainings/index.html.erb:25:in `_app_views_trainings_index_html_erb___2979006340799666900_47907140'
# ./spec/views/trainings/index.html.erb_spec.rb:18:in `block (2 levels) in <top (required)>'
3) trainings/show renders attributes in <p>
Failure/Error: render
ActionView::Template::Error:
No route matches {:controller=>"trainings"}
# ./app/views/trainings/show.html.erb:10:in `_app_views_trainings_show_html_erb__2049701071134787176_46584480'
# ./spec/views/trainings/show.html.erb_spec.rb:12:in `block (2 levels) in <top (required)>'
4) trainings/new renders new training form
Failure/Error: render
ActionView::Template::Error:
undefined method `trainings_path' for #<#<Class:0x00000004a54688>:0x0000000686bec8>
# ./app/views/trainings/_form.html.erb:1:in `_app_views_trainings__form_html_erb__4221989810981841567_45123700'
# ./app/views/trainings/new.html.erb:3:in `_app_views_trainings_new_html_erb__472203814357098165_54200400'
# ./spec/views/trainings/new.html.erb_spec.rb:12:in `block (2 levels) in <top (required)>'
I won't post all tests and all layout files because it would get too big. Instead I'll post test and layout file for one view, and try to extend the correction to the others.
The test for `training#index` is
**/spec/views/trainings/index.html.erb_spec.rb**
require 'spec_helper'
describe "trainings/index" do
before(:each) do
assign(:trainings, [
stub_model(Training,
:user_id => 1,
:training => "MyText"
),
stub_model(Training,
:user_id => 1,
:training => "MyText"
)
])
end
it "renders a list of trainings" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => 1.to_s, :count => 2
assert_select "tr>td", :text => "MyText".to_s, :count => 2
end
end
**/app/views/index.html.rb**
<h1>Listing trainings</h1>
<table>
<tr>
<th>User</th>
<th>Training</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @trainings.each do |training| %>
<tr>
<td><%= training.user_id %></td>
<td><%= training.training %></td>
<td><%= link_to 'Show', training %></td>
<td><%= link_to 'Edit', edit_training_path(training) %></td>
<td><%= link_to 'Destroy', training, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Training', new_user_training_path(@user) %>
It indicates that routes doens't match, but they are there. Why is it happening?! | 0 | [
2,
1418,
22,
18,
4431,
6475,
13,
22,
251,
8341,
103,
591,
1717,
22,
26,
5618,
69,
6577,
800,
3726,
3726,
31,
57,
21,
13,
1,
24400,
1,
1061,
30,
22,
18,
5618,
69,
131,
21,
13,
1,
14438,
2628,
1,
13,
1,
16704,
1,
1061,
9,
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... |
wso2 products and alfresco integration
===
I've found this tutorial about installing Alfresco on WSO2 Appserver.
http://sanjeewamalalgoda.blogspot.com/2011/09/how-to-install-alfresco-on-wso2.html
Does this mean I can delegate authentication to the wso2 security configuration also? I wouldn't want to have to manage security in both places separately.
If I were to deploy Alfresco in wso2 I would want to use the wso2 Identity Server for authentication. I was thinking about Alfresco running in wso2 Appserver using identity server for authentication and ESB for the Alfresco services. Is this approach suitable for other apps as well?
Is that possible? | 0 | [
2,
619,
656,
135,
1985,
17,
14307,
99,
8328,
8078,
800,
3726,
3726,
31,
22,
195,
216,
48,
29724,
88,
25429,
14307,
99,
8328,
27,
619,
656,
135,
4865,
10321,
106,
9,
7775,
6903,
2729,
13412,
1608,
11149,
10641,
7716,
9,
7091,
5447,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 plot arrow onto a figure in Matlab?
===
I know there is a function named annotation can plot arrows or double arrows. But annotation can only plot in normalized unit. For example:
annotation('arrows',[x1 x2],[y1 y2])
Here, [x1, x2] should be a ratio number less than one.
So, my question is how can I plot arrows with a true value rather than a normalized value?
I wonder if there is any other function can approach this or is there any function I can get the axis value of the figure so that I can adjust the true value into a normalized value. | 0 | [
2,
184,
20,
3798,
7409,
1204,
21,
1465,
19,
4277,
9086,
60,
800,
3726,
3726,
31,
143,
80,
25,
21,
1990,
377,
40,
1270,
857,
92,
3798,
13912,
54,
1494,
13912,
9,
47,
40,
1270,
857,
92,
104,
3798,
19,
1826,
1333,
1237,
9,
26,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Return key acting like Enter in Xcode
===
At some point in the last 24 hours my return key has stopped behaving properly in Xcode. For example, in the console if I type in:
po someObject
And then hit the return key, previously this would run the command. Now, it just enters a newline. If I hit function-return though, it runs the command as expected.
I get the same sort of behaviour in the Find pane.
I don't believe I've made any recent updates to either Xcode or OS X.
Any ideas what I might have done? | 0 | [
2,
788,
1246,
2180,
101,
2830,
19,
993,
9375,
800,
3726,
3726,
35,
109,
454,
19,
14,
236,
937,
974,
51,
788,
1246,
63,
1175,
44,
13693,
7428,
19,
993,
9375,
9,
26,
823,
15,
19,
14,
8650,
100,
31,
1001,
19,
45,
2353,
109,
23793... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
c# cannot play wav file
===
Trying to create software which has textbox where user can type word or phrases and program will use google translate to "speak" those words and download that speech to wav or mp3 file and then play that file.
Everything works fine, except playback. File will be loaded to computer but when playing it, Visual Studio gives an error that file is not valid wav file.
When playing file manually from computer, media player plays it fine!
private void Puhu(string Sana) {
WebClient web = new WebClient();
web.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 9.0; Windows;)");
string encstr = string.Empty;
string filename = "tts.wav";
string s = Sana;
encstr = Uri.EscapeDataString(s);
web.DownloadFile("http://translate.google.com/translate_tts?tl=fi&q=" + encstr, ".\\" + filename);
(new SoundPlayer(@"tts.wav")).Play(); // this line wont work!! Audio format is wrong!
} | 0 | [
2,
272,
5910,
1967,
418,
3142,
710,
3893,
800,
3726,
3726,
749,
20,
1600,
2306,
56,
63,
1854,
5309,
113,
4155,
92,
1001,
833,
54,
18492,
17,
625,
129,
275,
8144,
20628,
20,
13,
7,
18,
7081,
197,
7,
273,
715,
17,
7121,
30,
2974,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 the look of android options menu
===
I would like to create android options menu (left button on android device) looking like this one:
![screen1][1]
but using onPrepareOptionsMenu creates the menu which looks like this one:
![screen2][2]
Could you please point me how to change the look of the menu? Is there anything I can set in menu XML to change it's look or maybe I should use: onPrepareContextMenu?
Thanks in advance for your reply.
[1]: http://i.stack.imgur.com/fcwA7.png
[2]: http://i.stack.imgur.com/zcU0R.png | 0 | [
2,
753,
14,
361,
16,
13005,
6368,
11379,
800,
3726,
3726,
31,
83,
101,
20,
1600,
13005,
6368,
11379,
13,
5,
9742,
5167,
27,
13005,
3646,
6,
699,
101,
48,
53,
45,
13,
187,
2558,
7187,
165,
500,
2558,
165,
500,
47,
568,
27,
3515,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
FORMAT function not working in sql server 2008 R2
===
DECLARE @d DATETIME = '01/01/2011';
SELECT FORMAT ( @d, 'd', 'en-US' ) AS US_Result;
I am using above code in SQL Server 2008 R2 but it is encountering error **'FORMAT' is not a recognized built-in function name**.
How can i use **FORMAT** funciton??? | 0 | [
2,
2595,
1990,
52,
638,
19,
4444,
255,
8128,
570,
761,
135,
800,
3726,
3726,
10123,
13,
1,
43,
1231,
891,
800,
13,
22,
3026,
118,
3026,
118,
3097,
22,
73,
5407,
2595,
13,
5,
13,
1,
43,
15,
13,
22,
43,
22,
15,
13,
22,
219,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
reading new line char using java
===
Help guys, i've just seen this example in the web. i would like to use this to print exactly the contents of a text file in the same format containing new lines, but it just prints out the first line. thanks
import java.util.*;
import java.io.*;
public class Program
{
public static void main(String[] args)throws Exception
{
Scanner scanner = new Scanner(new FileReader("B:\\input.txt"));
String str = scanner.nextLine();
// Convert the above string to a char array.
char[] arr = str.toCharArray();
// Display the contents of the char array.
System.out.println(arr);
}
} | 0 | [
2,
1876,
78,
293,
4892,
568,
8247,
800,
3726,
3726,
448,
2776,
15,
31,
22,
195,
114,
541,
48,
823,
19,
14,
2741,
9,
31,
83,
101,
20,
275,
48,
20,
4793,
1890,
14,
8478,
16,
21,
1854,
3893,
19,
14,
205,
2595,
3503,
78,
1560,
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 do I write cout value to a text file?
===
the for loop is to randomize 65 - 90 and using (char) to display them in alphabet A-Z
I can have the display in alphabet A-Z in the console but I am not able to write them in text file.
for(i=0; i<26; i++)
cout<<(char) (letter[i]+'A'-1)<<" ";
cout<<endl;
ofstream output;
output.open("output.txt");
output <<(char)letter[i]+'A'-1<<endl;
output.close();
| 0 | [
2,
184,
107,
31,
2757,
272,
1320,
1923,
20,
21,
1854,
3893,
60,
800,
3726,
3726,
14,
26,
5293,
25,
20,
5477,
2952,
2074,
13,
8,
3151,
17,
568,
13,
5,
5433,
6,
20,
3042,
105,
19,
11844,
21,
8,
380,
31,
92,
57,
14,
3042,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Grab two parts of a single, short short
===
I'm looking to fill a python `dict` with `TAG`:`definition` pairs, and I'm using RegExr http://gskinner.com/RegExr/ to write the regex
My first step is to parse a line, from http://www.id3.org/id3v2.3.0, or http://pastebin.com/VJEBGauL and pull out the ID3 tag and the associated definition. For example the first line:
4.20 AENC [#sec4.20 Audio encryption]
would look like this `myDict = {'AENC' : 'Audio encryption'}`
To grab the tag name, I've got it looking for at least 3 spaces, then 4 characters, then 4 spaces: ` {3}[a-zA-Z0-9]{4} {4}` That part is easy enough.
The second part, the definition, is not working out for me. So far, I've got `(?<=(\[#.+?)) A` Which should find, but not include the `[#` as well as an indeterminded set of characters until it finds: `_A`, but it's failing. If I remove `.+?` and replace `_A` with `s` it works out alright. What is going wrong? *The underscores represent spaces, which don't show up on SO.
**How do I grab the definition, ie,`(Audio encryption)` of the ID3v2 tag from the line, using RegEx?** | 0 | [
2,
4931,
81,
1341,
16,
21,
345,
15,
502,
502,
800,
3726,
3726,
31,
22,
79,
699,
20,
3509,
21,
20059,
13,
1,
16315,
1,
29,
13,
1,
8628,
1,
45,
1,
28643,
1,
7473,
15,
17,
31,
22,
79,
568,
7953,
1706,
139,
7775,
6903,
5447,
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... |
Taking picture with LinkSprite JPEG Color Camera
===
I am using LinkSprite JPEG Color Camera to take picture. I am getting hex values of the picture data as string in C Sharp from UART. User manual of the camera explains the data structure of the picture as starting with hex FFD8 ans ends with FFD9. The values I am getting fits this description. When I save this hex values to a file using ByteWriter but output file is invalid and I can not see the picture.How can I convert these values to JPEG file?
Camera information:<br>
[http://www.sparkfun.com/products/10061][1]
[1]: http://www.sparkfun.com/products/10061 | 0 | [
2,
741,
2151,
29,
6271,
306,
8011,
487,
20427,
1665,
3336,
800,
3726,
3726,
31,
589,
568,
6271,
306,
8011,
487,
20427,
1665,
3336,
20,
247,
2151,
9,
31,
589,
1017,
24,
396,
4070,
16,
14,
2151,
1054,
28,
3724,
19,
272,
2641,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
iOS app Update and Core Data model total overwrite
===
I'm working on a new version of an Application, the previous version of this app was created by other developers.
Now I want to create a totally new app using a new CoraData model.
My doubt is: The core data model is permanent through updates, and i want to be sure that the previous CoreData model doesn't create problem with the new version of the App.
Have I to follow some Best practices to be sure that all goes right ? | 0 | [
2,
13,
7760,
4865,
11100,
17,
2884,
1054,
1061,
600,
84,
23716,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
78,
615,
16,
40,
3010,
15,
14,
1158,
615,
16,
48,
4865,
23,
679,
34,
89,
10168,
9,
130,
31,
259,
20,
1600,
21,
5139,
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... |
Is it bad practice to use multiple location tags for authorization?
===
I am wondering if it is bad practice to add a whole bunch of location tags for individual .aspx page authorizations?
<location path="mypage.aspx" >
<system.web>
<authorization>
<allow users="User1,User5"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
I realize that you are able to specify the path as a directory, and then all of the pages within that directory use the authorization rules, however I would like the pages to stay in the root. | 0 | [
2,
25,
32,
896,
1345,
20,
275,
1886,
1474,
3383,
18,
26,
22677,
60,
800,
3726,
3726,
31,
589,
5712,
100,
32,
25,
896,
1345,
20,
3547,
21,
979,
7653,
16,
1474,
3383,
18,
26,
1359,
13,
9,
472,
306,
396,
2478,
22677,
18,
60,
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 UI issue
===
What should i do if i want to setup this type of layout... the red part is FrameLayout, while the brown part are the buttons..
![enter image description here][1]
[1]: http://i.stack.imgur.com/9N2Ly.jpg
i've tried following but the buttons are not adjusting what i wanted.. here is my code..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/background"
android:layout_width="fill_parent"
android:layout_height="51dp" >
<Button
android:id="@+id/previous_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/takepicture"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_toRightOf="@+id/next_btn"
android:layout_weight="0.52" />
<Button
android:id="@+id/next_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/previous_btn" />
</LinearLayout>
<LinearLayout
android:id="@+id/ghostframe"
android:layout_width="fill_parent"
android:layout_height="148dp"
android:layout_below="@+id/save"
android:layout_weight="0.94" >
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="matrix"
android:src="@drawable/pik" />
</FrameLayout>
</LinearLayout>
</LinearLayout> | 0 | [
2,
13005,
13,
5661,
1513,
800,
3726,
3726,
98,
378,
31,
107,
100,
31,
259,
20,
18161,
48,
1001,
16,
9106,
9,
9,
9,
14,
402,
141,
25,
3523,
4414,
1320,
15,
133,
14,
886,
141,
50,
14,
12861,
9,
9,
13,
187,
2558,
13679,
1961,
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... |
Change speed depending on angular velocity
===
I scroll my background at a speed value of `float speed = 50;` I want to change this speed value depending on the angle of my sprite on the background, so it looks like the sprite is slowing down when it turns corners. All my accessors and mutators are set up, I just can't work out the formula which alters the background speed depending on the sprites angular velocity.
Any ideas? | 0 | [
2,
753,
1362,
4758,
27,
18270,
10700,
800,
3726,
3726,
31,
12159,
51,
2395,
35,
21,
1362,
1923,
16,
13,
1,
14712,
721,
1362,
800,
1222,
73,
1,
31,
259,
20,
753,
48,
1362,
1923,
4758,
27,
14,
5334,
16,
51,
27902,
27,
14,
2395,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 it possible to make a linked html pop out in a new window and not a new tab despite the browser settings
===
I have mozzilla firefox (technically Aurora 15) browser and I have the browser set so all new windows open in a new tab. Till recently I though it was impossible to make the link pop up in a new window with any sort of javascript or anything similar like that.
But i was surprised that my router's 'site' has managed to do that. (the thing you access with 192.168.0.1)
I have a Netgear modem router (DG834G).
When i go to `Basic Settings` at the bottom of the page I have `Test` button and when i click it a new window pops up which refreshes every couple of seconds telling you about connection status etc and if connection is successful it directs you to the netgear website.
What i dont understand is how the website pops up in a new window. From what i see the router is using javascript to do this.
Is it possible to accomplish this with javascript or do routers receive special treatment??
| 0 | [
2,
25,
32,
938,
20,
233,
21,
4727,
13,
15895,
1675,
70,
19,
21,
78,
1463,
17,
52,
21,
78,
6523,
869,
14,
16495,
12410,
800,
3726,
3726,
31,
57,
1873,
5092,
3247,
535,
18219,
13,
5,
22307,
102,
14610,
357,
6,
16495,
17,
31,
57,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 use the table names from a select Query in the from clause of another select Query in Oracle
===
I need the following output
Queue Name - Name of the queue
State - 0 Ready,1 Waiting, 2 Processed, 3 Expired - of the queue table
Count - count the number of records in the queue table of that state.
Example
Queue Name State Count
---------------------------------------
Email_Q Processed 5939
Email_response_Q Waiting 133
I constructed the following SQL
SELECT 'select ''' || owner || '.' || name || ''' queue_name,
decode(state,0,''Ready'',1,''Waiting'',2,''Processed'',3,''Expired'',''?'') state,
count(*) count
from ' || owner || '.' || queue_table ||
' where q_name = ''' || name || ''' group by state' cmd
FROM all_queues
WHERE owner IN ('AMADEUS')
ORDER BY owner, name;
I am able to construct all the selects for the Queue tables. But I would like to get the output using a select statement.
I was thinking of pipeline functions or use of a global temporary tables.
Any help will be much appreciated.
Thanks,
RV | 0 | [
2,
184,
20,
275,
14,
859,
1817,
37,
21,
5407,
25597,
19,
14,
37,
9040,
16,
226,
5407,
25597,
19,
15759,
800,
3726,
3726,
31,
376,
14,
249,
5196,
22521,
204,
13,
8,
204,
16,
14,
22521,
146,
13,
8,
713,
1451,
15,
165,
1672,
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 do I make Android's Singleton object persistent
===
In my app, I have a singleton class which communicates with all the activities and has all the app data.
All of a sudden the object has started becoming null.
It seems to be happening when i change top level activity (using intent).
Is there a simple method the make sure that as long as my activity is visible the object persists. | 0 | [
2,
184,
107,
31,
233,
13005,
22,
18,
345,
444,
3095,
15348,
800,
3726,
3726,
19,
51,
4865,
15,
31,
57,
21,
345,
444,
718,
56,
8709,
18,
29,
65,
14,
1648,
17,
63,
65,
14,
4865,
1054,
9,
65,
16,
21,
4224,
14,
3095,
63,
373,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
dos batch file find missing sequential filenames
===
Here is the situation, I have directories that have 10,000 files in each directory named like this:
FileName.XX0000.csv
FileName.XX9999.csv
The Size of the filename itself can change ie:
FileName.XXX0000.csv
FileName.XXX9999.csv
FileName.XXXX0000.csv
FileName.XXXX9999.csv
Where the X's are yet another parent number, but these ones should be ignored anyway.
Regardless though all directories are supposed to have exactly 10,000 files no more and no less. The trouble is some are missing and I need to know which ones are missing.
I tried the scripts in this post:
http://stackoverflow.com/questions/11454701/batch-script-to-find-missing-sequence-no
I even messed around with the string sequnce for several hours to no avail. Neither of these options works very well the 2nd script comes close but ends up in an endless loop, or spits out files that do exist.
I need to come up with a solution that will easily tell me which numbers or file names are missing. In my Dream world I would love a script where I can place it inside a parent directory and it would crawl through all the sub directories and print a single file of the missing ones.
It would be nice to not have to tell the script what the beginning part of the file name is, since in theory it should only be looking to see if the last four numbers are in existance from 0000-9999.
Since this is my first post I am hoping I doing this correctly by creating a new topic, I was going to ADD my question to the previous topic until I saw the "But avoid …" in the post box!
| 0 | [
2,
107,
18,
13064,
3893,
477,
2863,
1353,
5495,
10107,
3893,
7259,
18,
800,
3726,
3726,
235,
25,
14,
1858,
15,
31,
57,
559,
1596,
30,
57,
6693,
6488,
19,
206,
16755,
377,
101,
48,
45,
3893,
7259,
9,
8962,
21903,
9,
6824,
710,
38... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 merge pdf files with itextsharp in ASP.NET
===
I am trying to merge pdf files with using itexsharp library in ASP.NET ,ı get this error in here before closing the document
finally { document.Close(); }
The document has no pages. | 0 | [
2,
184,
20,
12666,
13,
11124,
6488,
29,
31,
11969,
23646,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
589,
749,
20,
12666,
13,
11124,
6488,
29,
568,
32,
1706,
23646,
1248,
19,
28,
306,
9,
2328,
13,
15,
1,
164,
48,
7019,
19,
235... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 , want to remove some words from array?
===
**hi, i have a small question** ,
- here is my page: http://talk2me.eu5.org/cms2/test1.php
- i wanna remove extra letters and keep only the name like "El
Ismullah"
- Array ( [0] => Array ( [name] => El Ismullah ) )
- Array ( [0] => Array ( [name] => Kemo Aly ) )
$fql3 = 'SELECT name FROM user WHERE uid = '. $key .'';
$likers_name = $facebook->api(array(
'method' => 'fql.query',
'query' => $fql3,
));
print_r($likers_name);
| 0 | [
2,
13,
26120,
13,
15,
259,
20,
4681,
109,
715,
37,
7718,
60,
800,
3726,
3726,
13,
1409,
1822,
15,
31,
57,
21,
284,
1301,
1409,
13,
15,
13,
8,
235,
25,
51,
2478,
45,
7775,
6903,
9718,
135,
790,
9,
5770,
264,
9,
5583,
118,
909... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Using gtest in jenkins
===
I successfully run my unit test with goolge test in Jenkins, but I don't know how to show the .xml file genereated by gtest. It is said that gtest satisfies the JUnit format, so what I set is as follows:
![enter image description here][1]
[1]: http://i.stack.imgur.com/Zzzrx.png
But it ends up with errors. | 0 | [
2,
568,
489,
10543,
19,
11420,
800,
3726,
3726,
31,
3673,
485,
51,
1237,
1289,
29,
162,
1823,
834,
1289,
19,
11420,
15,
47,
31,
221,
22,
38,
143,
184,
20,
298,
14,
13,
9,
396,
8184,
3893,
3194,
99,
1669,
34,
489,
10543,
9,
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... |
Checking deadlocks in CUDA code
===
if we use __syncthread() inside a branch (divergent), this will give rise to deadlock, as [discussed here][1]
There are cases where detection of such deadlocks manually is easy, but there can be other cases where this may be difficult.
So I want to know what are the general guidelines to avoid such deadlines, in addition to what is generally advised: Avoid using __syncthread() inside a branch and are only allowed inside a non-divergent branch .
Are there any tools that can report deadlocks in the code?
[1]: http://stackoverflow.com/questions/6476613/syncthreads-deadlock | 0 | [
2,
9886,
828,
3966,
18,
19,
272,
5729,
1797,
800,
3726,
3726,
100,
95,
275,
13,
1,
9507,
150,
96,
10647,
5,
6,
572,
21,
1686,
13,
5,
43,
19737,
7685,
6,
15,
48,
129,
590,
2529,
20,
828,
3966,
15,
28,
636,
43,
20563,
18,
69,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Changing HTML code with Javascript . not quite working
===
I have a fairly long form on a page with various checkboxes and text boxes. There is one point where I want a text box to become available if a corresponding checkbox is ticked. I almost have it working with this code:
<tr class= "formspace">
<td class="formleft" valign="top" style="line-height:22px">Extra bed(s)?</td>
<td colspan="2"><input name="extrabed" type="checkbox" value="1" onChange="jsextrabed()"><?php echo $lang["extraadultx"]." ".$lang["notsingleoccx"];?>
<div id="extrabednumber"></div>
<script type="text/javascript">
function jsextrabed() {
if(document.roomnew.extrabed.checked == 1) {
document.getElementById("extrabednumber").innerHTML=' Max number of extra beds <input name="extrabed" type="text" id="extrabed" size="1" maxlength="1" value="1">';
}else{
document.getElementById("extrabednumber").innerHTML=' Max number of extra beds <input name="extrabed" type="text" id="extrabed" size="1" maxlength="1" value="0">';
}
}
</script>
</td>
</tr>
When the page first opens, only the checkbox shows.
When I tick the checkbox, the text box opens with a value of 1. So far, so good.
When I click again the checkbox is unticked and the value in the text box changes to 0. Still good.
When I click yet again the checkbox is ticked (good) but the value in the text box stays at 0 (bad!).
Further clicking toggles the checkbox but has no effect on the value in the text box.
What have I done wrong? | 0 | [
2,
4226,
13,
15895,
1797,
29,
8247,
8741,
13,
9,
52,
1450,
638,
800,
3726,
3726,
31,
57,
21,
6647,
175,
505,
27,
21,
2478,
29,
617,
2631,
5309,
160,
17,
1854,
8120,
9,
80,
25,
53,
454,
113,
31,
259,
21,
1854,
1649,
20,
533,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
html5 checker compilation
===
I would like to use html5 validator from LiipFunctionalTestBundle in my Symfony2 project.
So, I followed instructions on bundle's github page, but I got this error during python build:
IOError: [Errno 2] No such file or directory: './syntax/relaxng/datatype/java/dist/html5-datatypes.jar'
indeed, there is a "dist" folder under that path, but it's empty (no files inside).
I also tried to download file from daisy-pipeline, but it's deleted after running python build again
I'm using Java 1.7.0_04 on Ubuntu x64 | 0 | [
2,
13,
15895,
264,
2631,
106,
4868,
800,
3726,
3726,
31,
83,
101,
20,
275,
13,
15895,
264,
7394,
3457,
37,
2093,
4307,
27983,
10543,
9930,
413,
19,
51,
13,
7261,
10229,
93,
135,
669,
9,
86,
15,
31,
709,
7650,
27,
10194,
22,
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... |
On InMobi Addtracker My application is not getting reported
===
I am using inmobi in my android application.
For that i am using InMobiAdTrackerAndroid.jar with this jar i am following documentation.
1: We are using following codes inmy application Launcher class
IMAdTrackerUtil.setLogLevel(LOG_LEVEL.VERBOSE);
IMAdTrackerAnalytics.getInstance().startSession(getApplicationContext(),Constants.INMOBI_APP_ID);
2: We are using this constants in place of above bold text
public static final String INMOBI_APP_ID = "5cd90875-04c7-476d-aa6e-ee7cf0ac70f6";
3: In AndroidManifest.xml class we add following code
<activity android:name="com.inmobi.adtracker.androidsdk.IMAdTrackerOverlayActivity" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sdt-5cd90875-04c7-476d-aa6e-ee7cf0ac70f6" />
<category android:name="android.intent.category.BROWSABLE" >
</category>
</intent-filter>
</activity>
<receiver
android:name="com.inmobi.adtracker.androidsdk.IMAdTrackerInstallRefererReciever"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
4: InMobiAdTrackerAndroid.jar is the library which we are using for inmobi and this library is added in build path.
On InMobi site in Reporting i am not getting an Application's name.(Application is present in DashBoard not present in Reporting)
I tested application using qrcode of my application and it forwarded me to google play where my application is present.
So what is the reason my application is not showing on Reportings.
here i a using samsung Tablet with sdk version 11. | 0 | [
2,
27,
19,
79,
14398,
3547,
4792,
106,
51,
3010,
25,
52,
1017,
1117,
800,
3726,
3726,
31,
589,
568,
19,
79,
14398,
19,
51,
13005,
3010,
9,
26,
30,
31,
589,
568,
19,
1293,
5732,
43,
4792,
106,
290,
18524,
9,
6300,
29,
48,
5112,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 virtual servers in Glassfish?
===
I have created new server as myapp.com in glassfish. Deployed my web application with the selection of that new server and tried the url: http://myapp.com:8080/sample,
its showing error message as
"could not connect to myapp.com:8080" in my browser.
so anyone please help to solve this issue.Thanks in advance. | 0 | [
2,
184,
20,
1600,
6599,
17595,
19,
1350,
4934,
60,
800,
3726,
3726,
31,
57,
679,
78,
8128,
28,
51,
7753,
9,
960,
19,
1350,
4934,
9,
6698,
51,
2741,
3010,
29,
14,
3155,
16,
30,
78,
8128,
17,
794,
14,
287,
6362,
45,
7775,
6903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 assign a vale for variable to thread
===
I'm new to dealing with multi-threadings. I'm confused in one point & seek clarification pleaset.
I have the following in the main program:
String hostname=null;
ExecutorService threadExecutor = Executors.newFixedThreadPool(10);
ExtractCertThread worker=null;
while(resultSet.next())
{
hostname=resultSet.getString("hostName");
worker = new ExtractCertThread(hostname);
threadExecutor.execute( worker );
}
threadExecutor.shutdown();
while (! threadExecutor.isTerminated()) {
threadExecutor.awaitTermination(1, TimeUnit.SECONDS);
}
The class that implements runnable is:
public class MyThread implements Runnable{
String hostname=null;
MyThread (String hostname) {
this.hostname=hostname;
System.out.println("New thread created");
}
public void run()
{
Class1 Obj1=new Class1 ();
try {
Class1.Myfunction(hostname);
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println("Got an Exception: "+e.getMessage());
}
}
I have a variable called hostname. Everythread needs to get this variable as it must be passed to the function `Myfunction` that every thread needs to execute.
I defined a variable called hostname inside `MyThread` class. Then I sent the variable `hostname` to `Mfunction(hostname).` Since `hostname` is defined inside class `MyThread`, Then the hostname that it has been sent as an argument to `Myfunction` is the thread's hostname. I don't know if there is a need for me to do the assignment `this.hostname=hostname` ?? When do I need to write the word `this.` ?? Do I need to send the hostname to Myfunction with the word `this.` ?? | 0 | [
2,
184,
20,
13952,
21,
6749,
26,
7612,
20,
9322,
800,
3726,
3726,
31,
22,
79,
78,
20,
5746,
29,
1889,
8,
96,
22883,
18,
9,
31,
22,
79,
4230,
19,
53,
454,
279,
5048,
13,
12078,
4634,
2247,
38,
9,
31,
57,
14,
249,
19,
14,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
iOS Custom Gesture Recognizer works only first time
===
I'm trying to use the checkmark gesture recognizer example in the [documentation][1] but it only works the first time I make the gesture. After recognized it, it doesn't work again.
I'm using the following code:
CheckmarkGestureRecognizer.h
#import <UIKit/UIKit.h>
#import <UIKit/UIGestureRecognizerSubclass.h>
@interface Checkmark2GestureRecognizer : UIGestureRecognizer {
BOOL strokeUp ;
}
- (void)reset;
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
@property (nonatomic,readwrite) UIGestureRecognizerState state;
@property (nonatomic,assign) CGPoint midPoint;
@end
CheckmarkGestureRecognizer.m
#import "Checkmark2GestureRecognizer.h"
@implementation Checkmark2GestureRecognizer
@synthesize state;
@synthesize midPoint;
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
NSLog(@"began");
strokeUp = NO;
if ([touches count] != 1) {
self.state = UIGestureRecognizerStateFailed;
return;
}
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesMoved:touches withEvent:event];
if (self.state == UIGestureRecognizerStateFailed) return;
CGPoint nowPoint = [[touches anyObject] locationInView:self.view];
CGPoint prevPoint = [[touches anyObject] previousLocationInView:self.view];
if (!strokeUp) {
// on downstroke, both x and y increase in positive direction
if (nowPoint.x >= prevPoint.x && nowPoint.y >= prevPoint.y) {
self.midPoint = nowPoint;
// upstroke has increasing x value but decreasing y value
} else if (nowPoint.x >= prevPoint.x && nowPoint.y <= prevPoint.y) {
strokeUp = YES;
} else {
self.state = UIGestureRecognizerStateFailed;
}
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesEnded:touches withEvent:event];
if ((self.state == UIGestureRecognizerStatePossible) && strokeUp) {
self.state = UIGestureRecognizerStateRecognized;
NSLog(@"Ended");
}
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesCancelled:touches withEvent:event];
self.midPoint = CGPointZero;
strokeUp = NO;
self.state = UIGestureRecognizerStateFailed;
NSLog(@"cancelled");
}
- (void)reset {
[super reset];
NSLog(@"reset");
self.midPoint = CGPointZero;
strokeUp = NO;
}
@end
Any idea about what am I doing wrong?
Thanks
[1]: http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizers/GestureRecognizers.html#//apple_ref/doc/uid/TP40009541-CH6-SW2
| 0 | [
2,
13,
7760,
5816,
7222,
5844,
139,
693,
104,
64,
85,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
14,
2631,
4527,
7222,
5844,
139,
823,
19,
14,
636,
28132,
857,
500,
2558,
165,
500,
47,
32,
104,
693,
14,
64,
85,
31,
233,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 - media player null pointer exception
===
I have a really weird error that I just can't figure out what's going on. In my code, I use media player through SoundsClass like this:
public class SoundsClass {
private int sound;
private Context mContext;
public SoundsClass(int sound, Context mContext) {
this.sound=sound;
this.mContext=mContext;
}
public void clickOnAndroid() {
switch(this.sound) {
case R.raw.sound1:
MediaPlayer mediaPlayer = MediaPlayer.create(mContext, R.raw.sound1);
mediaPlayer.start();
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
mp.release();
}
});
break;
case R.raw.sound2:
mediaPlayer = MediaPlayer.create(mContext, R.raw.sound2);
mediaPlayer.start();
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
mp.release();
}
});
break;
case R.raw.sound3:
mediaPlayer = MediaPlayer.create(mContext, R.raw.sound3);
mediaPlayer.start();
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
mp.release();
}
});
break;
}
}
}
So, I use this class in my main activity like this:
new SoundsClass(R.raw.sound1, getBaseContext()).clickOnAndroid();
On 2 places in this activity it works fine, but the third one gives a NullPointerException, caused by line in SoundsClass pointing to:
mediaPlayer.start();
Any idea why? Am I using MediaPlayer in a wrong way?
Maybe I'm missing something obvious, so please point this out for me.
Thanks! | 0 | [
2,
13005,
13,
8,
941,
517,
16203,
454,
106,
5391,
800,
3726,
3726,
31,
57,
21,
510,
5455,
7019,
30,
31,
114,
92,
22,
38,
1465,
70,
98,
22,
18,
228,
27,
9,
19,
51,
1797,
15,
31,
275,
941,
517,
120,
2795,
1898,
101,
48,
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... |
Does Safari support Objective-C app?
===
I'm wondering it there is a way to build an Objective-C applications and then integrate into an HTML page so it can be open from iPhone, Safari. Is that possible?
I'm thinking to be something similar with Flash application embedded on HTML pages by using a Flash Player plugin.
Cheers,
Codrin | 0 | [
2,
630,
25055,
555,
7038,
8,
150,
4865,
60,
800,
3726,
3726,
31,
22,
79,
5712,
32,
80,
25,
21,
161,
20,
1895,
40,
7038,
8,
150,
3767,
17,
94,
18399,
77,
40,
13,
15895,
2478,
86,
32,
92,
44,
368,
37,
21024,
15,
25055,
9,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
white spaces in form with tables
===
I have this code:
.fr1 {background:url(images/02_07.jpg) no-repeat;width:291px;height:46px;border:0; padding:3px; font-size:12px;text-align:center;font-weight:bold;}
<center>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><img src="images/enteryourname.jpg"></td>
</tr>
<tr>
<td background="images/02_06.jpg" width=291 height=52>
<div class=tet style="padding:00px 20px; padding-top:0px; padding-bottom:0px;">Get instant access to the amazing report <B>"Dreams Come True"</B> ($47 value)<BR> </div>
</td>
</tr>
<tr>
<td>
<form name="orderForm" method="POST" id="orderForm" class="af-form-wrapper" action="http://www.aweber.com/scripts/addlead.pl" >
<input style="#padding-top: 16px;" type="text" class=fr1 id=fr1 name="name" onfocus="this.value=''" value=">> Enter Your Name Here <<">
</td>
</tr>
<tr>
<td><input type="text" class=fr1 name="email" onfocus="this.value=''" style="#padding-top: 16px;" value=">> Enter Your Email Here <<"></td>
</tr>
<TR>
<td><input type="image" src="images/02_09.jpg" style="border:0px;" value=""></form></td>
</TR>
<tr>
<td><img src="images/02_10.jpg"></td>
</tr>
</table>
</center>
</td>
</tr>
It creates white spaces between input=text forms with backgrounds only in IE, how can i fix it?
Here how it looks like: http://postimage.org/image/d83h0br7p/
| 0 | [
2,
359,
7644,
19,
505,
29,
7484,
800,
3726,
3726,
31,
57,
48,
1797,
45,
13,
9,
6177,
165,
13,
1,
1958,
8810,
45,
911,
255,
5,
22039,
18,
118,
3564,
1,
2984,
9,
12851,
263,
6,
90,
8,
99,
7081,
38,
73,
3976,
43,
96,
45,
2411... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
C# MongoDB - BatchInsert not adding all documents
===
I'm having trouble using InsertBatch with my MongoDB instance.
I query another data store, to get a load of objects, and I'm trying to store them in Mongo.
When I do something like:
//comes from sql database, via nhibernate
var result = _otherRepository.AsQueriable()
.Take(5000)
.ToList();
_db.GetCollection("myCollection").InsertBatch(result);
The value of `result` is indeed 5000 objects.
However, after the `.InsertBatch` has been called, `myCollection` doesn't contain 5000 documents as I would expect, it only contains 386 of them?!
Another time it runs, (from fresh) it only contains 473 - so the number of docs inserted changes each time.
How can I find out what's going wrong? | 0 | [
2,
272,
5910,
3521,
5474,
220,
13,
8,
13064,
108,
18,
6767,
52,
4721,
65,
4374,
800,
3726,
3726,
31,
22,
79,
452,
2572,
568,
14692,
4900,
673,
29,
51,
3521,
5474,
220,
4851,
9,
31,
25597,
226,
1054,
1718,
15,
20,
164,
21,
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... |
google maps v3: can you set a map by bounds only?
===
With just the SW and NE coordinates, can you set a google maps view, or are zoom and/or a center coordinate mandatory?
I've been looking and
a) can't find a definitive answer.
b) any constructs that i have tried dont work.
If anyone knows that it is possible, how would i go about defining the bounds options to create the map?
Thanks! | 0 | [
2,
8144,
6867,
566,
240,
45,
92,
42,
309,
21,
2942,
34,
4138,
18,
104,
60,
800,
3726,
3726,
29,
114,
14,
8783,
17,
2836,
13714,
15,
92,
42,
309,
21,
8144,
6867,
1418,
15,
54,
50,
19469,
17,
118,
248,
21,
459,
15154,
12605,
60,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Push notification in PHP
===
I get this error after trying to execute my php script to send a push notifcation to my iphone.
I have tried everything and nothing works. I believe that this means my `ck.pem` is wrong but im not sure if its the key.pem or the cert.pem that is wrong.
Please help
**Script**
// This this a fake device id:
$deviceToken = '9870h8v088bj29u080af894jj67klfgcv9mmm79k8e4l23456h908743n093e359';
// fake password:
$passphrase = '123456';
// Put your alert message here:
$message = 'New Message';
////////////////////////////////////////////////////////////////////////////////
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
// Open a connection to the APNS server
$fp = stream_socket_client(
'ssl://gateway.sandbox.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
if (!$fp)
exit("Failed to connect: $err $errstr" . PHP_EOL);
echo 'Connected to APNS' . PHP_EOL;
// Create the payload body
$body['aps'] = array(
'alert' => $message,
'sound' => 'default',
'badge' => '1'
);
// Encode the payload as JSON
$payload = json_encode($body);
// Build the binary notification
$msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;
// Send it to the server
$result = fwrite($fp, $msg, strlen($msg));
if (!$result)
echo 'Message not delivered' . PHP_EOL;
else
echo 'Message successfully delivered' . PHP_EOL;
// Close the connection to the server
fclose($fp);
?>
**Error**
Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown in /Users/daveking/Desktop/App Certificates/simplepush.php on line 21
Warning: stream_socket_client(): Failed to enable crypto in /Users/daveking/Desktop/App Certificates/simplepush.php on line 21
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Users/daveking/Desktop/App Certificates/simplepush.php on line 21
Failed to connect: 0 | 0 | [
2,
3250,
52,
4634,
19,
13,
26120,
800,
3726,
3726,
31,
164,
48,
7019,
75,
749,
20,
15644,
51,
13,
26120,
3884,
20,
2660,
21,
3250,
52,
821,
16893,
20,
51,
21024,
9,
31,
57,
794,
796,
17,
626,
693,
9,
31,
985,
30,
48,
1108,
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... |
Displaying multiple images with patches overlayed in the same figure in matlab
===
I have an image I overlay with a patch and I want to be able to display multiple images on the same figure all with different over-layed patches. I tried using the subplot command but it did not work. I defined my axes and parent figure below.
hFig = figure;
hAx = axes('Parent',hFig);
hAx2 = axes('Parent',hFig);
fh = figure('units','pixels',...
'position',[300 300 440 500],...
'menubar','none',...
'name','SliderTool',...
'numbertitle','off',...
'resize','off');
subplot(1,2,1) mshow(image1);
patch(....,'parent', 'hAx');
subplot(1,2,2) imshow(image2);
patch(....,'parent', 'hAx2');
This is the basic idea for what I want to do but for some reason I cannot get it to work. Am I using the handles incorrectly?
| 0 | [
2,
17418,
1886,
3502,
29,
16359,
84,
4414,
69,
19,
14,
205,
1465,
19,
4277,
9086,
800,
3726,
3726,
31,
57,
40,
1961,
31,
84,
4414,
29,
21,
7331,
17,
31,
259,
20,
44,
777,
20,
3042,
1886,
3502,
27,
14,
205,
1465,
65,
29,
421,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
IE 8 document mode breaks my css or javascript
===
I am using this [library][1] to inline edit the and this css
.editableText:hover {
outline: 1px dashed grey;
}
.editableToolbar:hover + * {
outline: 1px dashed grey;
}
.editableToolbar {
}
.editableToolbar a {
display: block;
float: left;
height: 15px;
margin: 2px;
width: 17px;
}
.editableToolbar .edit {
background: url("icons.png") repeat scroll 0 0 transparent;
}
.editableToolbar .save {
background: url("icons.png") repeat scroll -16px 0 transparent;
}
.editableToolbar .cancel {
background: url("icons.png") repeat scroll 25px 0 transparent;
}
here is the generated html
<div class="editableToolbar">
<a href="#" class="edit" style=""></a>
<a href="#" class="save" style="display: none; "></a>
<a href="#" class="cancel" style="display: none; "></a>
</div>
and here is my jquery
$('.admin .playlist_name').editableText({
newlinesEnabled: false
});
And all works well in all browsers but IE8....i looked at the Document mode and changed it from IE8 to IE7 and the javascript and css to edit worked.....Any idea on what the different mode is doing to cause this not to work
[1]: http://code.google.com/p/exsited/source/browse/trunk/code/scripts/jquery.editableText.js?spec=svn7&r=7 | 0 | [
2,
13,
660,
469,
4492,
3740,
7947,
51,
272,
18,
18,
54,
8247,
8741,
800,
3726,
3726,
31,
589,
568,
48,
636,
1210,
2559,
622,
500,
2558,
165,
500,
20,
19,
1143,
9392,
14,
17,
48,
272,
18,
18,
13,
9,
69,
242,
579,
11969,
45,
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... |
Google OAuth 2.0 for Web Server Applications
===
My asp.net site need to ingrate with Google authentication (OAuth 2.0) ,so i have read this link: https://developers.google.com/accounts/docs/OAuth2WebServer
I have implement it in my site and it work fine.
But after that i have tried to implement the same thing using Google APIs Client Library for.NET https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2 ,but i could not find a good documentation about it,also i have downloaded the samples solution and i managed the "tasks web project" to run, but also it does not contain any good explanations.
so i realized that i have to analyze the "tasks.cs" file which is 2234 lines of code to
understand this library(actually this part only) and all i need is to authenticate the
user and after that get his basic information as explained in the first link.
Does i miss something cause Google says in her site "Given the security implications of getting the implementation correct, we strongly encourage developers to use OAuth 2.0 libraries when interacting with Google's OAuth 2.0 endpoints. Over time, more features will be added to these libraries."
if not, any help implementing this rather than analyze Google samples,or creating my own library(a small helper to be used in multiple projects)
| 0 | [
2,
8144,
635,
1346,
96,
172,
9,
387,
26,
2741,
8128,
3767,
800,
3726,
3726,
51,
28,
306,
9,
2328,
689,
376,
20,
13,
68,
5487,
29,
8144,
27963,
13,
5,
111,
1346,
96,
172,
9,
387,
6,
13,
15,
656,
31,
57,
1302,
48,
3508,
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... |
Are tables still considered good practice for a layout arrangement like this [IMG inside]?
===
![enter image description here][1]
[1]: http://i.stack.imgur.com/bHeIt.png
What is a good way to arrange images in the footer as shown in this mockup with HTML/CSS? Are tables still considered good practice ? | 0 | [
2,
50,
7484,
174,
724,
254,
1345,
26,
21,
9106,
5497,
101,
48,
636,
1660,
263,
572,
500,
60,
800,
3726,
3726,
13,
187,
2558,
13679,
1961,
5318,
235,
500,
2558,
165,
500,
636,
165,
500,
45,
7775,
6903,
49,
9,
25325,
9,
1660,
1114... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Wait for ASPX page to render before releasing thread?
===
I am writing a library which writes something into the database for temporary use (use only once) and then gets removed (its strange, but there is a certain implementation necessary for this ). For this I am trying to execute a thread which writes in the data into the database, waits for the page to finish loading and then releases to finish executing, removing the record. I am not sure how to apprach this. One way is to make the thread sleep but then I am risking either not allowing enough time or the thread might still be running after the page has finished doing everything else. Is there a way to tie this into the page thread so I can release my thread right after it finishes? What are some, if any, approaches to something like this? Because this is a library I would much rather not have another programmer call a function at the end of his page code to remove the record; its messy and easily forgotten. | 0 | [
2,
1760,
26,
28,
306,
396,
2478,
20,
16535,
115,
8054,
9322,
60,
800,
3726,
3726,
31,
589,
1174,
21,
1248,
56,
6215,
301,
77,
14,
6018,
26,
4700,
275,
13,
5,
3699,
104,
382,
6,
17,
94,
3049,
1974,
13,
5,
7363,
2578,
15,
47,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Using UserPrincipal to check if local admin
===
I am trying to have a method that takes in a username and will return true if that user is a local administrator (not on the entire domain, just the local machine) and false otherwise. I've tried to change the technique found at http://stackoverflow.com/questions/1089046/in-net-c-test-if-user-is-an-administrative-user to work, but it did not. I have tried using the NetUserGetInfo way, but could not get that to work. Now I'm trying to use UserPrincipal. The below code is all that I have...mainly just testing that the basics worked and they do.
PrincipalContext ctx = new PrincipalContext(ContextType.Machine);
UserPrincipal usr = UserPrincipal.FindByIdentity(ctx, IdentityType.SamAccountName, userId);
if(usr == null)
{
Console.WriteLine("usr is null");
}
else
{
Console.WriteLine(usr.Enabled);
Console.WriteLine(usr.IsAccountLockedOut());
foreach (Principal p in usr.GetAuthorizationGroups())
{
Console.WriteLine(p.ToString());
}
}
It looks like I should be able to use the isMemberOf method, but how do I make a Group for the local administrators? Or is there a better way than the isMemborOf method? Any help is appreciated. | 0 | [
2,
568,
4155,
27921,
20,
2631,
100,
375,
21,
43,
2160,
800,
3726,
3726,
31,
589,
749,
20,
57,
21,
2109,
30,
1384,
19,
21,
4155,
7259,
17,
129,
788,
1151,
100,
30,
4155,
25,
21,
375,
8890,
13,
5,
1270,
27,
14,
1078,
4603,
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... |
converting full alphabet to numbers in OBJ-C
===
I am trying to convert the alphabet to a string of number or integers. I can do it this way but I want to know if there is a better way of doing it? I have to convert 4 letters to the corrosponding number so I have created a NSMutableArray with the alphabet and then done this it is reading a string then pulling the string apart one piece at a time.
alphabetArray = [[NSMutableArray alloc] init];
[alphabetArray insertObject:@"0" atIndex:0];
[alphabetArray insertObject:@"A" atIndex:1];
[alphabetArray insertObject:@"B" atIndex:2];
[alphabetArray insertObject:@"C" atIndex:3];
[alphabetArray insertObject:@"D" atIndex:4];
[alphabetArray insertObject:@"E" atIndex:5];
[alphabetArray insertObject:@"F" atIndex:6];
[alphabetArray insertObject:@"G" atIndex:7];
[alphabetArray insertObject:@"H" atIndex:8];
[alphabetArray insertObject:@"I" atIndex:9];
[alphabetArray insertObject:@"J" atIndex:10];
[alphabetArray insertObject:@"K" atIndex:11];
[alphabetArray insertObject:@"L" atIndex:12];
[alphabetArray insertObject:@"M" atIndex:13];
[alphabetArray insertObject:@"N" atIndex:14];
[alphabetArray insertObject:@"O" atIndex:15];
[alphabetArray insertObject:@"P" atIndex:16];
[alphabetArray insertObject:@"Q" atIndex:17];
[alphabetArray insertObject:@"R" atIndex:18];
[alphabetArray insertObject:@"S" atIndex:19];
[alphabetArray insertObject:@"T" atIndex:20];
[alphabetArray insertObject:@"U" atIndex:21];
[alphabetArray insertObject:@"V" atIndex:22];
[alphabetArray insertObject:@"W" atIndex:23];
[alphabetArray insertObject:@"X" atIndex:24];
[alphabetArray insertObject:@"Y" atIndex:25];
[alphabetArray insertObject:@"Z" atIndex:26];
NSRange range1 = NSMakeRange(0, 1);
NSRange range2 = NSMakeRange(1, 1);
NSRange range3 = NSMakeRange(2, 1);
NSRange range4 = NSMakeRange(3, 1);
NSString *letter1 = [msg substringWithRange:range1];
NSString *letter2 = [msg substringWithRange:range2];
NSString *letter3 = [msg substringWithRange:range3];
NSString *letter4 = [msg substringWithRange:range4];
NSString *msgAsInt = [[NSString alloc]
initWithFormat:@"%d%d%d%d",
[alphabetArray indexOfObject:letter1 ],
[alphabetArray indexOfObject:letter2 ],
[alphabetArray indexOfObject:letter3 ],
[alphabetArray indexOfObject:letter4 ]];
Any advice would be great. I havent tested this yet but it looks ok
Thanks,
Nick | 0 | [
2,
19583,
503,
11844,
20,
2116,
19,
5122,
728,
8,
150,
800,
3726,
3726,
31,
589,
749,
20,
8406,
14,
11844,
20,
21,
3724,
16,
234,
54,
13820,
18,
9,
31,
92,
107,
32,
48,
161,
47,
31,
259,
20,
143,
100,
80,
25,
21,
574,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
javascript animation slowed by elements over it
===
I have come across a very mystifying problem in one of my animation loops. basically i have an animation running behind a PNG mask to create a glowing effect. the animation runs endlessly, as it is supposed to. But, after a short time, the animation slows down and eventually grinds to a halt.
here is the mystifying part: without the png mask (and the div its in), ***the animation runs smoothly.***
what is going on here?
--here is the page without the mask: http://chrismorga.com/rainnav/closed.html
--with the mask (reload and immediately watch the glow for slowdown): http://chrismorga.com/rainnav/open.html
for reference, here is the javascript. function runs after page load:
function StartMove() {
var cssBGImage=new Image();
cssBGImage.src="img/blueshifter.jpg";
window.cssMaxWidth=cssBGImage.width;
window.cssXPos=0;
setInterval("MoveBackGround()",10);
}
function MoveBackGround () {
window.cssXPos=window.cssXPos+1;
if (window.cssXPos>=window.cssMaxWidth) {
window.cssXPos=0;
}
toMove=document.getElementById("scroller");
toMove.style.backgroundPosition=window.cssXPos+"px 0px";
}
Is my javascript utilizing some bad practice? any insight would help at this point.
| 0 | [
2,
8247,
8741,
6236,
10024,
34,
2065,
84,
32,
800,
3726,
3726,
31,
57,
340,
464,
21,
253,
51,
384,
10874,
1448,
19,
53,
16,
51,
6236,
19661,
9,
11374,
31,
57,
40,
6236,
946,
439,
21,
351,
2723,
5983,
20,
1600,
21,
11051,
1590,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Redirect to custom schedule from jasper scheduler
===
I want to navigate to my custom scheduler whenever user tries to schedule report from jasper server | 0 | [
2,
302,
14706,
20,
5816,
4345,
37,
16750,
4345,
139,
800,
3726,
3726,
31,
259,
20,
20782,
20,
51,
5816,
4345,
139,
6634,
4155,
3919,
20,
4345,
1330,
37,
16750,
8128,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Export data from one database to another WITHOUT x fields?
===
I would like to move data from one table (_table1_) to another (_table2_). They have almost the same fields but table1 has some extra fields (with data) that I don't need in table2.
So i can't just do a CSV export & import because I end up with erros. So my question; how do I create an export of a database field without field X, Y and Z? | 0 | [
2,
7487,
1054,
37,
53,
6018,
20,
226,
366,
993,
2861,
60,
800,
3726,
3726,
31,
83,
101,
20,
780,
1054,
37,
53,
859,
13,
5,
1,
5924,
165,
1,
6,
20,
226,
13,
5,
1,
5924,
135,
1,
6,
9,
59,
57,
557,
14,
205,
2861,
47,
859,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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's wrong with the ads api of batch requests?
===
when I use the batch requests api,it always throw 2 exceptions.Below:
1, Error:Could not save creative;
2,Error:(#100) Must include the ["creative"]["title"] index.
But,this is not true.
One of my request, as below:
[{"method":"post","relative_url":"act_106484946133250\/adgroups?campaign_id=6004478797423&image_url=http:\/\/creative.ak.fbcdn.net\/v565063\/flyers\/126\/19\/1341555017466213197_1_333871bd.jpg&name=43578-\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14&bid_type=1&max_bid=20&targeting={\"countries\":[\"TH\"],\"age_min\":\"16\",\"age_max\":\"55\",\"broad_age\":\"1\",\"genders\":[\"1\"],\"locales\":[\"35\"],\"excluded_connections\":[\"105575936179054\"],\"friends_of_connections\":[\"105575936179054\"]}&creative={\"title\":\"\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14\",\"body\":\"\u0e21\u0e32\u0e40\u0e25\u0e48\u0e19\u0e40\u0e01\u0e21\u0e44\u0e1e\u0e48\u0e40\u0e17\u0e47\u0e01\u0e0b\u0e31\u0e2a\u0e08\u0e30\u0e21\u0e35\u0e42\u0e2d\u0e01\u0e32\u0e2a\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e23\u0e32\u0e27\u0e31\u0e25\u0e43\u0e2b\u0e0d\u0e48 \u0e23\u0e35\u0e1a\u0e21\u0e32\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e2a\u0e34\",\"link_url\":\"http:\/\/apps.facebook.com\/tltexas\/\",\"image_hash\":\"21b899bef10d9419bcefdf5953a7bb2f\"}&redownload=1"},{"method":"post","relative_url":"act_106484946133250\/adgroups?campaign_id=6004478797423&image_url=http:\/\/creative.ak.fbcdn.net\/v565063\/flyers\/22\/23\/1340964659954184399_1_a68e4ea3.jpg&name=43579-\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14&bid_type=1&max_bid=20&targeting={\"countries\":[\"TH\"],\"age_min\":\"16\",\"age_max\":\"55\",\"broad_age\":\"1\",\"genders\":[\"1\"],\"locales\":[\"35\"],\"excluded_connections\":[\"105575936179054\"],\"friends_of_connections\":[\"105575936179054\"]}&creative={\"title\":\"\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14\",\"body\":\"\u0e21\u0e32\u0e40\u0e25\u0e48\u0e19\u0e40\u0e01\u0e21\u0e44\u0e1e\u0e48\u0e40\u0e17\u0e47\u0e01\u0e0b\u0e31\u0e2a\u0e08\u0e30\u0e21\u0e35\u0e42\u0e2d\u0e01\u0e32\u0e2a\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e23\u0e32\u0e27\u0e31\u0e25\u0e43\u0e2b\u0e0d\u0e48 \u0e23\u0e35\u0e1a\u0e21\u0e32\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e2a\u0e34\",\"link_url\":\"http:\/\/apps.facebook.com\/tltexas\/\",\"image_hash\":\"24895cc29abf58e3a20171996c0073ce\"}&redownload=1"},{"method":"post","relative_url":"act_106484946133250\/adgroups?campaign_id=6004478797423&image_url=http:\/\/creative.ak.fbcdn.net\/v565063\/flyers\/70\/38\/13413835292042284781_1_8416f26b.jpg&name=43580-\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14&bid_type=1&max_bid=20&targeting={\"countries\":[\"TH\"],\"age_min\":\"16\",\"age_max\":\"55\",\"broad_age\":\"1\",\"genders\":[\"1\"],\"locales\":[\"35\"],\"excluded_connections\":[\"105575936179054\"],\"friends_of_connections\":[\"105575936179054\"]}&creative={\"title\":\"\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14\",\"body\":\"\u0e21\u0e32\u0e40\u0e25\u0e48\u0e19\u0e40\u0e01\u0e21\u0e44\u0e1e\u0e48\u0e40\u0e17\u0e47\u0e01\u0e0b\u0e31\u0e2a\u0e08\u0e30\u0e21\u0e35\u0e42\u0e2d\u0e01\u0e32\u0e2a\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e23\u0e32\u0e27\u0e31\u0e25\u0e43\u0e2b\u0e0d\u0e48 \u0e23\u0e35\u0e1a\u0e21\u0e32\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e2a\u0e34\",\"link_url\":\"http:\/\/apps.facebook.com\/tltexas\/\",\"image_hash\":\"723d64ebb36b0f9065daae47abfdc291\"}&redownload=1"},{"method":"post","relative_url":"act_106484946133250\/adgroups?campaign_id=6004478797423&image_url=http:\/\/creative.ak.fbcdn.net\/v565063\/flyers\/68\/19\/13415550131813395470_1_f817b18c.jpg&name=43581-\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14&bid_type=1&max_bid=20&targeting={\"countries\":[\"TH\"],\"age_min\":\"16\",\"age_max\":\"55\",\"broad_age\":\"1\",\"genders\":[\"1\"],\"locales\":[\"35\"],\"excluded_connections\":[\"105575936179054\"],\"friends_of_connections\":[\"105575936179054\"]}&creative={\"title\":\"\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14\",\"body\":\"\u0e21\u0e32\u0e40\u0e25\u0e48\u0e19\u0e40\u0e01\u0e21\u0e44\u0e1e\u0e48\u0e40\u0e17\u0e47\u0e01\u0e0b\u0e31\u0e2a\u0e08\u0e30\u0e21\u0e35\u0e42\u0e2d\u0e01\u0e32\u0e2a\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e23\u0e32\u0e27\u0e31\u0e25\u0e43\u0e2b\u0e0d\u0e48 \u0e23\u0e35\u0e1a\u0e21\u0e32\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e2a\u0e34\",\"link_url\":\"http:\/\/apps.facebook.com\/tltexas\/\",\"image_hash\":\"03ea1b165af2aaad0c8f8a721bd15556\"}&redownload=1"},{"method":"post","relative_url":"act_106484946133250\/adgroups?campaign_id=6004478797423&image_url=http:\/\/creative.ak.fbcdn.net\/v565063\/flyers\/57\/48\/13383766491249552929_1_806ed961.jpg&name=43582-\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14&bid_type=1&max_bid=20&targeting={\"countries\":[\"TH\"],\"age_min\":\"16\",\"age_max\":\"55\",\"broad_age\":\"1\",\"genders\":[\"1\"],\"locales\":[\"35\"],\"excluded_connections\":[\"105575936179054\"],\"friends_of_connections\":[\"105575936179054\"]}&creative={\"title\":\"\u0e21\u0e35\u0e40\u0e27\u0e25\u0e32\u0e08\u0e33\u0e01\u0e31\u0e14\",\"body\":\"\u0e21\u0e32\u0e40\u0e25\u0e48\u0e19\u0e40\u0e01\u0e21\u0e44\u0e1e\u0e48\u0e40\u0e17\u0e47\u0e01\u0e0b\u0e31\u0e2a\u0e08\u0e30\u0e21\u0e35\u0e42\u0e2d\u0e01\u0e32\u0e2a\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e23\u0e32\u0e27\u0e31\u0e25\u0e43\u0e2b\u0e0d\u0e48 \u0e23\u0e35\u0e1a\u0e21\u0e32\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e2a\u0e34\",\"link_url\":\"http:\/\/apps.facebook.com\/tltexas\/\",\"image_hash\":\"22ccf286432e0b38bb647098b7cd32e6\"}&redownload=1"}]
It throws the exception of 'Error:Could not save creative' twice! But I use the same creative.Are there any strictly limits for batch requests? Wait for your answer!Thanks!
| 0 | [
2,
98,
22,
18,
1389,
29,
14,
16236,
21,
2159,
16,
13064,
12279,
60,
800,
3726,
3726,
76,
31,
275,
14,
13064,
12279,
21,
2159,
15,
242,
550,
3814,
172,
13392,
9,
863,
4121,
45,
137,
15,
7019,
45,
13431,
52,
2079,
4231,
73,
172,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Show span element when mouseover parent span
===
When I mouseover a `span.label` element I want to show a children `span.dM` element. Which is perfectly happening in the fiddle below.
Here is the [fiddle](http://jsfiddle.net/ashwyn/rVLpq/)
What I am trying to achieve is when I hover in the place of where `span.dM` appears then I should get a gray background for `span.label`. Currently I have to hover on the text "some text" to see the `span.dM` element.
I want to fix this without using any width. Any suggestions ? Thanks in advance. | 0 | [
2,
298,
6289,
4520,
76,
7567,
2549,
4766,
6289,
800,
3726,
3726,
76,
31,
7567,
2549,
21,
13,
1,
18,
3206,
9,
21018,
1,
4520,
31,
259,
20,
298,
21,
391,
13,
1,
18,
3206,
9,
43,
79,
1,
4520,
9,
56,
25,
5759,
4942,
19,
14,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Audio to text conversion in java
===
i'm currently working on a project to retrieve multimedia data from a multimedia database!! can ny1 suggest me a way to convert my audio files to text formats which would greatly help in the data retrieval! thanks in advance | 0 | [
2,
4023,
20,
1854,
6263,
19,
8247,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
21,
669,
20,
11917,
17090,
1054,
37,
21,
17090,
6018,
19015,
92,
3071,
165,
5601,
55,
21,
161,
20,
8406,
51,
4023,
6488,
20,
1854,
13767,
56,
83,
5629... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
jquery image gallery fadeIn
===
Got an annoying problem and cannot seem to rectify...
The following will fade and image out, the callback will then remove the image and insert a new one, on load of the new image it should fade back in... but it seems to be fading back in super fast or rather just showing the new image..
if($('#gallery-image img').css('opacity') == 1){
$('#gallery-image').children('img').fadeOut(sawdays.gallery.transitionTime , function(){
$(this).remove();
$('#gallery-image').append(newImg);
$('#gallery-image img').load(function(){
$(this).fadeIn(sawdays.gallery.transitionTime);
});
});
}
I was wondering if anyone could see anything i was doing wrong with it... i've already spent too much time on this :S | 0 | [
2,
487,
8190,
93,
1961,
2246,
11381,
108,
800,
3726,
3726,
330,
40,
17610,
1448,
17,
1967,
2260,
20,
6042,
38,
8612,
9,
9,
9,
14,
249,
129,
11381,
17,
1961,
70,
15,
14,
645,
1958,
129,
94,
4681,
14,
1961,
17,
14692,
21,
78,
53... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Slow inserts with bq + Backend Error
===
We are experiencing trouble with inserting our data into BigQuery.
We are located in The Netherlands.
**The command:**
adm@la478 ads_csv $ time bq load --debug_mode --skip_leading_rows 1 --max_bad_records 100 --project_id 197553342340 ad_monitoring.ad ad_bd9a6230-2d34-4cf1-8553-04d9c2f8c52b.csv.gz
BigQuery error in load operation: Backend Error
**The metrics:**
real 4m35.997s
user 0m0.963s
sys 0m0.169s
**The filesize:**
-rw-rw-rw- 1 adm admin 39M Jul 10 17:02 ad_bd9a6230-2d34-4cf1-8553-04d9c2f8c52b.csv.gz
200MB uncompressed
Can you please advice use what to do? | 0 | [
2,
2276,
14692,
18,
29,
334,
1251,
2754,
97,
2451,
7019,
800,
3726,
3726,
95,
50,
15138,
2572,
29,
14692,
68,
318,
1054,
77,
580,
8190,
93,
9,
95,
50,
335,
19,
14,
3046,
9,
13,
1409,
124,
1202,
45,
1409,
21,
43,
79,
1,
531,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Return values from cross server sprocs
===
I have a stored procedure on server A. Server B is a linked server, the connection is fine and permissions are all good. The last line of the proc on server A uses EXEC to call the proc on server B. I would like if possible to be able to return a value from the proc on server A that is a return value in the proc being called on server B. Is this possible? The code looks something like:
proc foo(outputFromB INT OUTPUT)
...
EXEC [someserver].[db].[dbo].[ProcB]
@inputA
@inputB
@outputA
I would like the value of output A to be returned from proc foo in outputFromB. Any help is appreciated. | 0 | [
2,
788,
4070,
37,
919,
8128,
13,
18,
15617,
18,
800,
3726,
3726,
31,
57,
21,
8214,
7004,
27,
8128,
21,
9,
8128,
334,
25,
21,
4727,
8128,
15,
14,
2760,
25,
1123,
17,
5572,
18,
50,
65,
254,
9,
14,
236,
293,
16,
14,
13,
15617,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Match fulltext exclude html , urls
===
I want to match in a html code all Text.
But only text with all punctuation characters, but without html like </div> or urls etc.
example:
<div class="description">Girls loving girls</div>
match result:
Girls loving girls
my try:
(?!.*(?:http:\/\/))^[a-z0-9():+,\-.@;\$_\!*\'%\?\säüöß%]+ | 0 | [
2,
730,
503,
11969,
21077,
13,
15895,
13,
15,
13,
911,
7532,
800,
3726,
3726,
31,
259,
20,
730,
19,
21,
13,
15895,
1797,
65,
1854,
9,
47,
104,
1854,
29,
65,
13,
17359,
291,
857,
1766,
15,
47,
366,
13,
15895,
101,
13,
1,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
WSO2 ESB - Data Services Server Feature - How to use Data Sources to swap data source on fly
===
I am using WSO2 ESB 4.0.3. I have installed WSO2 Data Services Feature on it and I have created DS.
There is feature in the ESB under "Configure" tab under admin UI where you can define the "Data Source".
My question is while creating new Data Service I am not able to use this "Data Source" which I have configured in ESB. We have different environments DEV / TEST / UAT / PROD. Each environment has different data base for same data service.
Currently I have manually change the DS XML file to point to new DB and then deploy.
Is there a way to point to the DB configured in ESB and change the DB for DS on the fly?
thanks
ABhijit | 0 | [
2,
619,
656,
135,
13,
160,
220,
13,
8,
1054,
687,
8128,
1580,
13,
8,
184,
20,
275,
1054,
2662,
20,
17150,
1054,
1267,
27,
2855,
800,
3726,
3726,
31,
589,
568,
619,
656,
135,
13,
160,
220,
268,
9,
387,
9,
240,
9,
31,
57,
4066... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 perspective that is always relative to the screen
===
I want to ask a question about the perspective that is achieved through `CATransform3D`.
I know that if you have a view that is 320x480 and then apply this:
CATransform3D perspective = CATransform3DIdentity;
CGFloat zDistance = 1000;
perspective.m34 = 1.0 / -zDistance;
view.layer.sublayerTransform = perspective;
you create a perspective that makes it look like the observer is looking straight at the center of the screen and therefore the same transformation looks different, depending on where the subview that is being transformed is located on the screen. For example, tilting a view looks like this when the view is in the middle of the screen:
![enter image description here][1]
And it looks like this if it's in the lower left corner:
![enter image description here][2]
[1]: http://i.stack.imgur.com/7YDvB.png
[2]: http://i.stack.imgur.com/omBiY.png
Now, my problem is that making the perspective relative to the screen only works if the view I'm transforming is a subview of another view that is 320x480px big. But what if the view I want to transform is a subview of a view that is only 100x100px? Is there a way to make the perspective relative to the whole screen if the superview isn't the size of the screen?
Thanks in advance! | 0 | [
2,
11989,
6531,
30,
25,
550,
4543,
20,
14,
2324,
800,
3726,
3726,
31,
259,
20,
1349,
21,
1301,
88,
14,
6531,
30,
25,
3153,
120,
13,
1,
793,
7028,
4190,
240,
43,
1,
9,
31,
143,
30,
100,
42,
57,
21,
1418,
30,
25,
13,
12402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
missing commands in except
===
I have been playing with except/TCL today and I was hoping some one can tell me why this script below fails with
: command not found
./expect3: line 3: send: command not found
***********Script****************
#!/usr/bin/expect -f
send " we are going to open up a file for reading, ok? \n"
expect "ok"
set fileopen [open "/home/aaron/text.txt" "r"]
set a [read $fileopen]
send "i am expecting to see a string from the file here $fileopen"
close $fileopen
both the send and close commands fail, yet other scripts I had written with a Spawn command seem to work fine?
any pointers would be great.
Aaron | 0 | [
2,
2863,
14294,
19,
1613,
800,
3726,
3726,
31,
57,
74,
791,
29,
1613,
118,
38,
5316,
786,
17,
31,
23,
3935,
109,
53,
92,
494,
55,
483,
48,
3884,
1021,
13614,
29,
13,
45,
1202,
52,
216,
13,
9,
118,
6899,
11557,
240,
45,
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... |
Resize a dynamically generated iframe
===
I have a report generated by Oracle Apex (A UI tool operating against the Oracle database). I have customized it to have a hyperlink on each record, which when clicked opens a detail report in an iframe right under the current record. This, I am doing by using the Javascript insertRow method on the html table element (Condensed Javascript code below. Oracle APEX allows use of JS/Jquery)
var pTable= html_CascadeUpTill(t,'TABLE');
var myNewRow = pTable.insertRow(pTR.rowIndex+1);
var myNewCell = myNewRow.insertCell(0);
myNewCell.innerHTML = '<iframe src="detail report url" height="0"></iframe>';
In order to resize the height of the iFrame that is different for different detail records, I have the following code in the document).ready(function() of the page
$('iframe').load(function()
{
setTimeout(iResize, 1000);
}
function iResize()
{
// Iterate through all iframes in the page.
for (var i = 0, j = iFrames.length; i < j; i++)
{
var y=(iFrames[i].contentWindow || iFrames[i].contentDocument);
if (y.document)y=y.document;
var docHt = getDocHeight(y);
if (docHt) iFrames[i].height = docHt + "px";
}
}
);
Without the setTimeout call to iResize function, the iframe resize is not happening. But this setTimeout is adding a delay in the resized iframe to appear which I want to avoid. Is there a way to do this? All the related posts/articles I have seen online deal with iframes that are built into the page but not generated on-the-fly as in my case.
Let me know if you need more information. Please help. Thank you. | 0 | [
2,
302,
10454,
21,
7782,
1326,
6756,
31,
8361,
800,
3726,
3726,
31,
57,
21,
1330,
6756,
34,
15759,
15452,
13,
5,
58,
13,
5661,
5607,
2455,
149,
14,
15759,
6018,
6,
9,
31,
57,
28779,
32,
20,
57,
21,
5443,
6258,
27,
206,
571,
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... |
Error Creating JavaDocs for Android Linter - cannot access com.android.tools.lint.detector.api.Severity
===
Trying to generate JavaDocs for the Android lint-cli project on Mac 10.7
Keep getting the follow errors.
> Loading source files for package com.android.tools.lint...
> Constructing Javadoc information...
> /Volumes/android/sdk/lint/cli/src/com/android/tools/lint/HtmlReporter.java:30:
> cannot access com.android.tools.lint.detector.api.Severity bad class
> file:
> /Volumes/android/sdk/lint/libs/lint_api/bin/com/android/tools/lint/detector/api/Severity.class
> bad signature: ?2Q Please remove or make sure it appears in the
> correct subdirectory of the classpath. import
> com.android.tools.lint.detector.api.Severity;
Tried removing the Severity.class, in hopes that it would regenerate but that made things worst. Also tried a clean from eclipse and that didn't work either.
Any ideas? | 0 | [
2,
7019,
2936,
8247,
13799,
18,
26,
13005,
644,
6280,
13,
8,
1967,
1381,
13,
960,
9,
290,
18524,
9,
20799,
18,
9,
1226,
38,
9,
28262,
248,
9,
2552,
49,
9,
18,
5221,
856,
800,
3726,
3726,
749,
20,
7920,
8247,
13799,
18,
26,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 Implement Bayeux protocol on top of Curl
===
I'm currently working on a project which uses libcurl to fetch data from the server. What my job is to make it work with bayeux protocol.
Libcurl has HTTP implementation, and Bayeux is a protocol build on top of HTTP, theoretically this should be possible. With a few days' research, I think that all I need to do is to send additional Bayeux protocol values to server when we create sessions, make requests, and disconnects.
I actually have no experience or knowledge about server/client development or protocols. Is my understanding right? If so, how do I send those message. I spent a long time but couldn't figure it out.
Thanks in advance. | 0 | [
2,
184,
20,
8713,
899,
14564,
8494,
27,
371,
16,
14320,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
21,
669,
56,
2027,
13,
8326,
4734,
255,
20,
18312,
1054,
37,
14,
8128,
9,
98,
51,
1205,
25,
20,
233,
32,
170,
29,
899,
14564,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Unable to restore from Snapshot
===
I've successfully created a snapshot of database SCPT_Pandora named SCPT_Pandora_snap. When I try to restore SCPT_Pandora from this snapshot, I get an error ("'DATABASE_SHAPSHOT' is not a recognized Device Type option"). I've tried this on two servers (2005 & 2008 Enterprise editions) and received the same error on both. Here's the code:
IF EXISTS ( SELECT name
FROM sys.databases
WHERE name = N'SCPT_Pandora_snap' )
DROP DATABASE SCPT_Pandora_snap
GO
CREATE DATABASE SCPT_Pandora_snap ON
(
NAME = SCPT_Pandora,
FILENAME = 'D:\SQL2008_data\SCPT_Pandora_snap.ss'
) AS SNAPSHOT OF SCPT_Pandora
GO
RESTORE DATABASE SCPT_Pandora FROM DATABASE_SHAPSHOT = 'SCPT_Pandora_snap';
GO
Thanks! | 3 | [
2,
2343,
20,
8454,
37,
29946,
800,
3726,
3726,
31,
22,
195,
3673,
679,
21,
29946,
16,
6018,
4729,
4417,
1,
3206,
12578,
377,
4729,
4417,
1,
3206,
12578,
1,
18,
325,
306,
9,
76,
31,
1131,
20,
8454,
4729,
4417,
1,
3206,
12578,
37,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 stock update with csv
===
I am using following script
http://www.sonassi.com/knowledge-base/magento-kb/mass-update-stock-levels-in-magento-fast/
It works beautifully with test CSV file.
However, my POS creates CSV file but it puts different heading so script does not work. I want to automate the process so is there any way to change the names of headers?
Script requires the headers to be
“sku”,”qty”
my CSV is
“ITEM”,”STOCK”
Is there any way for these to different names to be linked within the script so that script sees ITEM as sku and STOCK as qty? | 0 | [
2,
4723,
17050,
2070,
11100,
29,
272,
18,
710,
800,
3726,
3726,
31,
589,
568,
249,
3884,
7775,
6903,
6483,
9,
528,
11464,
9,
960,
118,
28774,
8,
8436,
118,
9473,
17050,
8,
18167,
118,
11749,
8,
576,
8209,
8,
7576,
8,
3906,
18,
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... |
Inject Keystroke to different process using Bash
===
I have a process that runs indefinitely until a key is pressed. I would like to use bash to inject a keystroke into this process to have it terminate. Based on this post, http://stackoverflow.com/questions/10376251/linux-write-commands-from-one-terminal-to-another I have tried to use
echo -e "b" > /proc/[pid]/fd/0
(The letter "b" in this case is just arbitrary) The letter "b" will show up in the terminal of the process that is running indefinitely, but it doesn't trigger the termination of the program like it does if I actually type "b" into the window.
I have also seen the recommendation for xdotools, but I couldn't get it to work and am trying to stay away from relying on GUI for implementing this.
I am running Ubuntu 10.04, and I don't have much experience in bash. Thanks in advance! | 0 | [
2,
20316,
1246,
12962,
20,
421,
953,
568,
13158,
800,
3726,
3726,
31,
57,
21,
953,
30,
1461,
19,
19185,
163,
21,
1246,
25,
2931,
9,
31,
83,
101,
20,
275,
13158,
20,
20316,
21,
1246,
12962,
77,
48,
953,
20,
57,
32,
17952,
9,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
C - split string into an array of strings
===
I'm not completely sure how to do this in C:
char* curToken = strtok(string, ";");
//curToken = "ls -l" we will say
//I need a array of strings containing "ls", "-l", and NULL for execvp()
How would I go about doing this? | 0 | [
2,
272,
13,
8,
2132,
3724,
77,
40,
7718,
16,
7887,
800,
3726,
3726,
31,
22,
79,
52,
1524,
562,
184,
20,
107,
48,
19,
272,
45,
4892,
2483,
5087,
262,
2853,
800,
13,
9729,
17168,
5,
11130,
15,
13,
7,
73,
7,
6,
73,
12894,
4734,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Open source PDF renderer for .net
===
Is there an open source .net library that can render PDFs to images (for server-side processing)? I know of PdfSharp, AFAIK it can only create and process PDFs, not render them. | 0 | [
2,
368,
1267,
13,
11124,
16535,
106,
26,
13,
9,
2328,
800,
3726,
3726,
25,
80,
40,
368,
1267,
13,
9,
2328,
1248,
30,
92,
16535,
13,
11124,
18,
20,
3502,
13,
5,
1106,
8128,
8,
1416,
5511,
6,
60,
31,
143,
16,
13,
11124,
23646,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 can I encrypt CoreData contents on an iPhone
===
I have some information I'd like to store statically encrypted on an iPhone application. I'm new to iPhone development, some I'm not terribly familiar with CoreData and how it integrates with the views. I have the data as JSON, though I can easily put it into a SQLITE3 database or any other backing data format. I'll take whatever is easiest (a) to encrypt and (b) to integrate with the iPhone view layer.
The user will need to enter the password to decrypt the data each time the app is launched. The purpose of the encryption is to keep the data from being accessible if the user loses the phone.
For speed reasons, I would prefer to encrypt and decrypt the entire file at once rather than encrypting each individual field in each row of the database.
Note: this *isn't* the same idea as [Question 929744][1], in which the purpose is to keep the user from messing with or seeing the data. The data should be perfectly transparent when in use.
Also note: I'm willing to use [SQLCipher][2] to store the data, but would prefer to use things that already exist on the iPhone/CoreData framework rather than go through the lengthy build/integration process involved.
[1]: http://stackoverflow.com/questions/929744/encrypting-sqlite-database-file-in-iphone-os
[2]: http://www.mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/ | 0 | [
2,
184,
92,
31,
1957,
11435,
2884,
18768,
8478,
27,
40,
21024,
800,
3726,
3726,
31,
57,
109,
676,
31,
22,
43,
101,
20,
1718,
12038,
1326,
29403,
27,
40,
21024,
3010,
9,
31,
22,
79,
78,
20,
21024,
522,
15,
109,
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... |
Can a SQL query join to tables that aren't known under execution time?
===
I need to write a query that is going to extract a huge amount of data from a system on a regular basis.
The problem I have is there are ~100 tables that have gibberish names that are created by the application as new projects are started. The name of the table for a specific project is held in the project table.
So I need to join between the project table, a handful of others, then each of the tables listed in a column from the project table.
Is this possible, if so any pointers?
Regards
Tom | 0 | [
2,
92,
21,
4444,
255,
25597,
1865,
20,
7484,
30,
4847,
22,
38,
167,
131,
5769,
85,
60,
800,
3726,
3726,
31,
376,
20,
2757,
21,
25597,
30,
25,
228,
20,
10962,
21,
2329,
2006,
16,
1054,
37,
21,
329,
27,
21,
1290,
2239,
9,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Custom Map View
===
Here is the scenario...
I have a image of a map in jpeg format... I want to add it to my iPhone application and mark the coordinates in certain places (just like annotation in map kit ) and also when i move from one place to another place the current location should change and the new location should be marked in the image.
Is that possible ? How to achieve this instead of using the mkmapview ? | 0 | [
2,
5816,
2942,
1418,
800,
3726,
3726,
235,
25,
14,
12705,
9,
9,
9,
31,
57,
21,
1961,
16,
21,
2942,
19,
487,
20427,
2595,
9,
9,
9,
31,
259,
20,
3547,
32,
20,
51,
21024,
3010,
17,
943,
14,
13714,
19,
1200,
1489,
13,
5,
2759,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Viewport meta tag not working
===
I am testing an app on iphone. When it's in portrait, the resize is perfect. But when switching to landscape its zooming.
I have put <meta name="viewport" content="width=device-width,initial-scale=1.0"/> but it seems to be not working
I have also tried <meta name="viewport" content="width=device-width,initial-scale=1.0;maximum-scale=1.0"/> but of no help
Please help me
| 0 | [
2,
1418,
1993,
7618,
3383,
52,
638,
800,
3726,
3726,
31,
589,
4431,
40,
4865,
27,
21024,
9,
76,
32,
22,
18,
19,
5548,
15,
14,
302,
10454,
25,
2107,
9,
47,
76,
13027,
20,
4453,
82,
19469,
68,
9,
31,
57,
442,
13,
1,
5909,
58,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Qt drawPixmap doesn't draw properly
===
I'm trying to make a Paint application in C++ with Qt. Everytime i click or click & drag the mouse, the program will draw something on a pixmap. After that, it updates the window calling paintEvent(), which will draw the pixmap onto the window.
void QPaintArea::mousePressEvent(QMouseEvent *event){
startpoint = event->pos();
drawPoint(startpoint);
is_pressed = true;
}
void QPaintArea::mouseReleaseEvent(QMouseEvent *event){
is_pressed = false;
}
void QPaintArea::mouseMoveEvent(QMouseEvent *event){
if(is_pressed == true){
endpoint = event->pos();
drawLine(startpoint, endpoint);
startpoint = endpoint;
}
else{
return;
}
}
void QPaintArea::paintEvent(QPaintEvent *event){
QDesktopWidget *desktop = QApplication::desktop();
int x = (desktop->width() - 800) / 2;
int y = (desktop->height() - 600) / 2;
QPainter painter(this);
QRect target(QPoint(x, y - 35), QSize(800, 600));
QRect dirtyrect(QPoint(0,0), QSize(800, 600));
painter.drawPixmap(target, *pixmap, dirtyrect);
}
The problem is that, the program is not printing the pixmap onto the window as expected. For example, I press the mouse at x: 17, y: 82 trying to draw something. The program will print what i drew but at another location, like x + 20, y.
Maybe i didn't fully understand how QRect or drawPixmap works, but the pixmap is 800x600. "dirtyrect" is supposed to save the entire pixmap(starting a x: 0, y: 0, and the size 800x600). | 0 | [
2,
2593,
38,
2003,
18321,
15022,
1437,
22,
38,
2003,
7428,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
21,
5107,
3010,
19,
272,
20512,
29,
2593,
38,
9,
352,
891,
31,
10840,
54,
10840,
279,
5501,
14,
7567,
15,
14,
625,
129,
2003,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Application_Error firing even for handled exceptions
===
I have some code to display a button if a URL exists:
try
{
string dashboardURL = Config.RootUrl + "/Dashboard/Default.aspx";
WebRequest req = WebRequest.Create(dashboardURL);
WebResponse response = req.GetResponse();
btnDashboard.Visible = true;
}
catch (Exception)
{
btnDashboard.Visible = false;
}
However, when debugging, req.getResponse() causes Application_Error to fire. I checked the exception being caught here and it is a System.Net.WebException. My understanding was that Application_Error is fired for unhandled exceptions.
Can anybody help?
Thanks | 0 | [
2,
3010,
1,
29992,
7139,
166,
26,
9006,
13392,
800,
3726,
3726,
31,
57,
109,
1797,
20,
3042,
21,
5167,
100,
21,
287,
6362,
5636,
45,
1131,
13,
1,
3724,
26478,
911,
255,
800,
13,
14093,
2816,
9,
14032,
911,
255,
2754,
13,
7,
118,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 want to draw a rectangle like shape with drag-able corners in IOS
===
I want to overlay a a box shape over a photograph and allow the user to select each corner, and drag the corners to where they want.
I could use 4 invisible buttons(to represent each corner) that respond to drag events to get the x,y points for each corner, but is there some line drawing functionality available in xcode without touching any of the game api classes? I guess I want to draw lines onto a UIView.
Many Thanks,
-Code | 0 | [
2,
31,
259,
20,
2003,
21,
27181,
101,
2539,
29,
5501,
8,
579,
8894,
19,
13,
7760,
800,
3726,
3726,
31,
259,
20,
84,
4414,
21,
21,
1649,
2539,
84,
21,
9128,
17,
1655,
14,
4155,
20,
5407,
206,
1531,
15,
17,
5501,
14,
8894,
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... |
Best data structure/ container in c++ for insertion and deletion
===
I am looking for the best data structure for C++ in which insertion and deletion can take place very efficiently and fast.
Traversal should also be very easy for this data structure. Which one should i go with?
What about SET in C++?? | 0 | [
2,
246,
1054,
1411,
118,
12147,
19,
272,
20512,
26,
24245,
17,
28916,
800,
3726,
3726,
31,
589,
699,
26,
14,
246,
1054,
1411,
26,
272,
20512,
19,
56,
24245,
17,
28916,
92,
247,
209,
253,
20519,
17,
1512,
9,
19501,
192,
378,
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... |
ASP.NET: How to make linkbutton with databinder open in new window?
===
I have a pdf file I get from a DataGrid and want to open it in a new window. Here is my code:
<ItemTemplate><asp:LinkButton runat="server" CssClass="linkbutton1" id="TiedostoLB" text='<%# DataBinder.Eval(Container.DataItem, "Tiedosto") %>' /></ItemTemplate>
The text-partition renders in to
href="javascript:__doPostBack('ctl00$ContentPH$LiitetiedotDG$ctl03$TiedostoLB','')"> file.pdf</a>
I tried making it a HyperLink, but NavigateUrl="<%# DataBinder.Eval(Container.DataItem, "Tiedosto") %>" renders to just the filename and not the path. How do I either fix the LinkButton to open in a new window (with some javascript:window.open() I presume) or get the HyperLink to function (which I would prefer) | 0 | [
2,
28,
306,
9,
2328,
45,
184,
20,
233,
3508,
811,
444,
29,
1054,
24200,
368,
19,
78,
1463,
60,
800,
3726,
3726,
31,
57,
21,
13,
11124,
3893,
31,
164,
37,
21,
1054,
16375,
17,
259,
20,
368,
32,
19,
21,
78,
1463,
9,
235,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Sending data to servlet from html
===
This is a more can I, then a how to question. When I send data to a servlet, and they are both on the same domain, I use :
$.post('action.do', {arrayData:myArray, mode:"insert"});
or something similar. If, for example, I have html running within an android app on my device and I have a server in the cloud, can I perform something such as :
$.post('http://www.example.com/action.do', {arrayData:myArray, mode:"insert"});
Where example.com is the domain I have the server on, is this possible? Thanks
| 0 | [
2,
4907,
1054,
20,
13,
10321,
1336,
37,
13,
15895,
800,
3726,
3726,
48,
25,
21,
91,
92,
31,
15,
94,
21,
184,
20,
1301,
9,
76,
31,
2660,
1054,
20,
21,
13,
10321,
1336,
15,
17,
59,
50,
156,
27,
14,
205,
4603,
15,
31,
275,
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... |
Silverlight 4 Getting Datacontext for ObservableCollection<T> Types
===
I have a DataContext for a grid that is basically an ObservableCollection<T>. In the code behind I want to iterate through the grid's Datacontext and store each line item into an sharepoint point list. The problem I'm encountering is that I can't seem to access that Datacontext's ObservableCollection<T>. The ObservableCollection<T> was defined in the viewmodel and has been passed to a childwindow which adds to it. Now back in the parent window's code behind I want to access it. I can see that it has values during debug. Just not sure how to cast the Datacontext into an ObservableCollection again.
gridNominees.DataContext
![enter image description here][1]
Here's basically the application
![enter image description here][2]
[1]: http://i.stack.imgur.com/8uu9L.jpg
[2]: http://i.stack.imgur.com/LyuaO.jpg | 0 | [
2,
1172,
3130,
268,
1017,
1054,
1126,
11969,
26,
5122,
10321,
579,
15015,
872,
1,
38,
1,
2551,
800,
3726,
3726,
31,
57,
21,
1054,
1126,
11969,
26,
21,
7354,
30,
25,
11374,
40,
5122,
10321,
579,
15015,
872,
1,
38,
1,
9,
19,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
MySQLi query to MySQL query
===
I am trying do multi-driver support for my Framework, which basically means I can use MySQL, MySQLi or PDO(MySQL) with ease.
So, let's say I have an array of values I want to insert.
array('Manuel', 'StackOverflow');
and I have this query..
mysql_query("INSERT INTO users(name, fav_site) VALUES(?, ?)");
So, I'd like to replace the question marks with those values in order, so Manuel goes first and then goes StackOverflow. Remembering that I need to add -> ' <- at the sides of these values so MySQL doesn't throw an error.
I have tried searching if someone has asked this and had no luck.
Any help is appreciated!
NOTE: I know I shouldn't even bother with MySQL, but hey! A feature is a feature. | 0 | [
2,
51,
18,
1251,
1210,
25597,
20,
51,
18,
22402,
25597,
800,
3726,
3726,
31,
589,
749,
107,
1889,
8,
21752,
555,
26,
51,
6596,
15,
56,
11374,
1108,
31,
92,
275,
51,
18,
22402,
15,
51,
18,
1251,
1210,
54,
351,
537,
5,
915,
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... |
use S3 as MapReduce job input
===
i have a MR job to read file on amazon S3 and process the data on local hdfs. the files are zipped text file as .gz. i tried to setup the job as below but it won't work, anyone know what might be wrong? do i need to add extra step to unzip the file first?
thanks!
String S3_LOCATION = "s3n://access_key:private_key@bucket_name"
protected void prepareHadoopJob() throws Exception {
this.getHadoopJob().setMapperClass(Mapper1.class);
this.getHadoopJob().setInputFormatClass(TextInputFormat.class);
FileInputFormat.addInputPath(this.getHadoopJob(), new Path(S3_LOCATION));
this.getHadoopJob().setNumReduceTasks(0);
this.getHadoopJob().setOutputFormatClass(TableOutputFormat.class);
this.getHadoopJob().getConfiguration().set(TableOutputFormat.OUTPUT_TABLE, myTable.getTableName());
this.getHadoopJob().setOutputKeyClass(ImmutableBytesWritable.class);
this.getHadoopJob().setOutputValueClass(Put.class);
}
| 0 | [
2,
275,
13,
18,
240,
28,
2942,
99,
16041,
1205,
6367,
800,
3726,
3726,
31,
57,
21,
820,
1205,
20,
1302,
3893,
27,
8059,
13,
18,
240,
17,
953,
14,
1054,
27,
375,
8590,
11754,
9,
14,
6488,
50,
28693,
1854,
3893,
28,
13,
9,
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... |
Do any iOS analytics packages report deeper location data than "city"?
===
I've recently installed Flurry Analytics into my iOS app, and it works great. I submitted with the location data enabled, and the information I get lets me drill down through continent, country, city, and state to see what city each user is in when the app reports. However, it does not let me go any further, and the Flurry team is unwilling to report whether any other analytics packages report deeper data.
All of the users of this app are within one city, so the city data does me no good. When the location event is called, it's reporting exact latitude and longitude, so I know the information is being sent.
Do any iOS analytics packages offer the ability to drill down to see where within a city the users were located when the app was used? | 0 | [
2,
107,
186,
13,
7760,
26320,
16875,
1330,
5891,
1474,
1054,
119,
13,
7,
5788,
7,
60,
800,
3726,
3726,
31,
22,
195,
1989,
4066,
29471,
26320,
77,
51,
13,
7760,
4865,
15,
17,
32,
693,
374,
9,
31,
7368,
29,
14,
1474,
1054,
9338,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Custom tab bar for both iOS 4 and 5; removing white gloss
===
I'm looking to create a custom tab bar that is compatible in both iOS4 and iOS5. iOS5, thankfully, is easy and I've got that part working, but iOS4 has been giving me problems. I subclassed UITabBar and modified its drawRect to get the right background image and size, but I can't seem to get rid of that white gloss that appears on selected tab items. I tried the Private API hack with selectedImage but it doesn't seem to do anything.
Any ideas? | 0 | [
2,
5816,
6523,
748,
26,
156,
13,
7760,
268,
17,
331,
73,
9096,
359,
13,
12456,
800,
3726,
3726,
31,
22,
79,
699,
20,
1600,
21,
5816,
6523,
748,
30,
25,
14961,
19,
156,
13,
7760,
300,
17,
13,
7760,
264,
9,
13,
7760,
264,
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 fix centerOffset on KineticJs on Rotation
===
Im having trouble with centerOffset on KineticJs, when I rotate the object (a rectangle) the center gets way off and I cant find a way to correct it. | 0 | [
2,
184,
20,
6098,
459,
1299,
3554,
27,
13,
16905,
728,
18,
27,
9431,
800,
3726,
3726,
797,
452,
2572,
29,
459,
1299,
3554,
27,
13,
16905,
728,
18,
15,
76,
31,
21448,
14,
3095,
13,
5,
58,
27181,
6,
14,
459,
3049,
161,
168,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
Truth Tables in Javascript
===
I'm currently implementing a Master Save behaviour for a master layout that holds 7 tabs.
Essentially, when the Save button on the master layout is clicked, I want it so that each tab saves itself (complete), and then reports to the master layout that it has saved (again, complete)
What I am stuck on is, I'd like to have a truth table in the corresponding JS file for the master layout, which keeps track of which of the 7 tabs have been saved so it can report back to the user that the save has completed.
**To generalise: Truth tables/2D arrays in Javascript, where they at?**
Thanks in advance. | 0 | [
2,
1770,
7484,
19,
8247,
8741,
800,
3726,
3726,
31,
22,
79,
871,
17333,
21,
1129,
2079,
7727,
26,
21,
1129,
9106,
30,
2763,
453,
6523,
18,
9,
7398,
15,
76,
14,
2079,
5167,
27,
14,
1129,
9106,
25,
15802,
15,
31,
259,
32,
86,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 fetch the result of a query inside a trigger
===
Is it possible to return more than one rows and column in a single query inside a stored procedure or a trrigger? and how can i fetch the data being return? do i need to use loop or some thing?
here is what i want:
DROP TRIGGER IF EXISTS `trgg`;
DELIMITER ;;
CREATE TRIGGER `trgg` AFTER INSERT ON tbl
FOR EACH ROW BEGIN
SET @result = (SELECT * FROM tbl2 WHERE field = 1 );
// i want to fetch the values return @result, is that possible?
// or atleast only the column only, not necessarily all the rows,
#### rest of the codes goes here #####
END ;;
i been researching this for about a day, but still i cant find the answer,
is anybody here can help me on this | 0 | [
2,
184,
20,
18312,
14,
829,
16,
21,
25597,
572,
21,
7286,
800,
3726,
3726,
25,
32,
938,
20,
788,
91,
119,
53,
11295,
17,
4698,
19,
21,
345,
25597,
572,
21,
8214,
7004,
54,
21,
9235,
11507,
106,
60,
17,
184,
92,
31,
18312,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Grails one to one relation
===
I tried to define one to one relation in 2 different way:
Grails 2.0.3
Case 1:
class Car {
String model
Engine eng
static constraints = {
eng unique: true
}
}
class Engine {
Double capacity
static belongsTo = [car : Car]
}
Case 2:
class Car {
String model
static hasOne = [eng : Engine]
static constraints = {
eng unique: true
}
}
class Engine {
Double capacity
static belongsTo = [car : Car]
}
looks similar, and both provide one to one bidirectional mapping. Unfortunately DB has different structure in both cases.
Case 1:
![enter image description here][1]
Case 2:
![enter image description here][2]
Why once Car and once Engine keeps link to second table.
Where is my problem? When I am looking at the code, from DDD perspective, both cases suggest that Car class is more important and Car aggregates Engine. Unfortunately when I look from DB side on case 2 I would rather said that it is opposite - Engine aggregate Car. Of course I can use first approach, but most of publication I saw about grails, present second way for defining relation. Maybe I misunderstood something and I use hasOne in wrong way?
[1]: http://i.stack.imgur.com/jD2Y5.png
[2]: http://i.stack.imgur.com/OAjCY.png | 0 | [
2,
489,
7301,
18,
53,
20,
53,
5827,
800,
3726,
3726,
31,
794,
20,
9267,
53,
20,
53,
5827,
19,
172,
421,
161,
45,
489,
7301,
18,
172,
9,
387,
9,
240,
610,
6352,
718,
349,
13,
1,
3724,
1061,
1406,
13,
4367,
12038,
16747,
800,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
double tap listener stops responding after zoom in map
===
I implemented onDoubleTap listener to listen for double clicks on google maps, and it worked fine with the map, but when I do a zoom on the map -even for one level only- my double Tap listener stops working and does not response.
the scenario is lik that, when I double click the a location in the map just after launching the activity it works fine .. when I do a zoom, it does not response to double clicking any more.
here is my onDoubleTap impl. to see if some thing is wrong.
public class MYMapActivity extends MapActivity implements
GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener{
GestureDetector gestureDetector;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mymapview);
//get the MapView
MapView mapView = (MapView) findViewById(R.id.mapview);
// enable zoom controls in the map view
mapView.setBuiltInZoomControls(true);
gestureDetector = new GestureDetector(this, this);
//register the double tap listener to this object
gestureDetector.setOnDoubleTapListener(this);
mapView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return gestureDetector.onTouchEvent(event);
}
});
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
@Override
public boolean onDoubleTap(MotionEvent mev) {
System.out.println("******onDoubleTap*******");
//do what ever you want here
return true;
}
@Override
public boolean onDoubleTapEvent(MotionEvent e) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onDown(MotionEvent e) {
//must return true so that onDoubleTap method fires
return true;
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2,
float velocityX, float velocityY) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onLongPress(MotionEvent e) {
// TODO Auto-generated method stub
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
// TODO Auto-generated method stub
return false;
}
@Override
public void onShowPress(MotionEvent e) {
// TODO Auto-generated method stub
}
@Override
public boolean onSingleTapUp(MotionEvent e) {
// TODO Auto-generated method stub
return false;
}
}
| 0 | [
2,
1494,
5526,
21772,
6604,
15887,
75,
19469,
19,
2942,
800,
3726,
3726,
31,
6807,
27,
14368,
38,
2552,
21772,
20,
3834,
26,
1494,
10840,
18,
27,
8144,
6867,
15,
17,
32,
577,
1123,
29,
14,
2942,
15,
47,
76,
31,
107,
21,
19469,
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... |
In Mongo what is the difference between sharding and replication?
===
Replication seems to be a lot simple than sharding, unless I am missing the benefits of what sharding is actually trying to achieve? Don't they move give horizontal scaling? | 0 | [
2,
19,
3521,
839,
98,
25,
14,
2841,
128,
18723,
68,
17,
23841,
60,
800,
3726,
3726,
23841,
2206,
20,
44,
21,
865,
1935,
119,
18723,
68,
15,
4003,
31,
589,
2863,
14,
5800,
16,
98,
18723,
68,
25,
1121,
749,
20,
4689,
60,
221,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.