unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Java GUI application framework
===
This may be a stupid question, but I am quite frustareted and want to make sure:
I am writing a tool, which has to have a really nice GUI (gradients, colors, rounded colors,custom tool tip....)
Is there is no option to gain it easily?
must I use SWT, Swing, awt, and try unsuccessfully to apply gradients and to remove all the ugly remaining gray pieces .etc????
Thanks. | 0 | [
2,
8247,
9457,
3010,
6596,
800,
3726,
3726,
48,
123,
44,
21,
3553,
1301,
15,
47,
31,
589,
1450,
13394,
2265,
1198,
69,
17,
259,
20,
233,
562,
45,
31,
589,
1174,
21,
5607,
15,
56,
63,
20,
57,
21,
510,
2210,
9457,
13,
5,
7691,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Whats different in this code?
===
What different in this code at the typedef?
I mean what different bewteen
`typedef A<B<T>::c> C;` and `typedef A<c> C;` See line of code where placed commen.
template <const char *N> struct A {
static const char *p;
};
template <class T> struct B {
static const char c[1];
typedef A<B<T>::c> C;
// typedef A<c> C; // what different between this and previous line
};
#define AS(X) if (!(X)) return 1;
int main()
{
return 0;
}
| 0 | [
2,
98,
18,
421,
19,
48,
1797,
60,
800,
3726,
3726,
98,
421,
19,
48,
1797,
35,
14,
1001,
13862,
60,
31,
884,
98,
421,
44,
499,
11256,
13,
1,
4474,
13862,
21,
1,
220,
1,
38,
1,
45,
45,
150,
1,
272,
73,
1,
17,
13,
1,
4474,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Hover state when entering site
===
I'm having a problem with hover on images.
When entering the site the hover-state is active, but it shouldn't be until a mouseover-event.
When moving the mouse over the images the hover effect disappears and functions properly.
Here's the code-snippet:
http://jsfiddle.net/JwztH/
I hope my question is understandable. | 0 | [
2,
21350,
146,
76,
4604,
689,
800,
3726,
3726,
31,
22,
79,
452,
21,
1448,
29,
21350,
27,
3502,
9,
76,
4604,
14,
689,
14,
21350,
8,
3859,
25,
1348,
15,
47,
32,
5714,
22,
38,
44,
163,
21,
7567,
2549,
8,
4943,
38,
9,
76,
1219,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 get the specflow to create a template for new step?
===
I am a novice tester and work with a bunch of specflow and VS 2010.
When I select a step and hit the "go to step definition" dialog box appears that says "No matching step binding found".
Is it possible that method of step is automatically created when he is miss? | 0 | [
2,
184,
107,
31,
164,
14,
12737,
9990,
20,
1600,
21,
22894,
26,
78,
1424,
60,
800,
3726,
3726,
31,
589,
21,
21999,
1289,
106,
17,
170,
29,
21,
7653,
16,
12737,
9990,
17,
4611,
498,
9,
76,
31,
5407,
21,
1424,
17,
770,
14,
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... |
info plist seems outdated and cannot validate App with App Store
===
I took a project I did recently where the app was universal and I copy-pasted the project. With the copy, I've done a Lite version where I don't support iPad.
I've changed everything I think necessary to make this project as unique, independently that it was a copy from another project: changed the bundleID (matches with the first version on the store), project name, display name, etc. I've removed the iPad storyboard and all the iPad icons. I've also removed the iPad icons from the plist.
Now the App is ready to go and i'm trying to validate it with Apple. Then it gives me the following error:
Icon specified in the Info.plist not found under the top level app wrapper: Icon-72@2x.png (-19007)
but for all the "missing" icons. Before I tried to validate, the debugger said nothing but after the validation attempt, it now give me 6 warnings, which say the same as the error above. One warning per "missing Icon".
I've tried to delete derived data from xcode, clean the project, restart Xcode, etc. But it keeps telling me the same.
Any idea? Thanks in advance!
| 0 | [
2,
15404,
351,
5739,
2206,
70,
43,
1669,
17,
1967,
7394,
1373,
4865,
29,
4865,
1718,
800,
3726,
3726,
31,
199,
21,
669,
31,
144,
1989,
113,
14,
4865,
23,
4172,
17,
31,
4344,
8,
19802,
69,
14,
669,
9,
29,
14,
4344,
15,
31,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MYSQL Query in Database View
===
select `aversio`.`module`.`module` AS `module` from ((`projectmodule` join `module` on((`aversio`.`projectmodule`.`moduleID` = `aversio`.`module`.`moduleID`))) join `project` on((`aversio`.`project`.`projectID` = `aversio`.`projectmodule`.`projectID`))) where ((`aversio`.`module`.`actief` = _utf8'1') and (`aversio`.`projectmodule`.`verwijderd` = _utf8'0') and (`aversio`.`projectmodule`.`verwijderd` = _utf8'0'))
MYSQL Error : There is no 'aversio'@'%' registered
What this error mean | 0 | [
2,
51,
18,
22402,
25597,
19,
6018,
1418,
800,
3726,
3726,
5407,
13,
1,
11937,
11076,
1,
9,
1,
19673,
62,
1,
9,
1,
19673,
62,
1,
28,
13,
1,
19673,
62,
1,
37,
13,
5,
5,
1,
21011,
19673,
62,
1,
1865,
13,
1,
19673,
62,
1,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Exit Andriod Application button - really
===
I am writing a GPS based application for Android. I want a button to exit the application which will turn GPS off but I do not want back arrorw or home to turn the processes off.
I have read [This][1] thread and many others that do a great job of explaining why I don't want to do what I want to do. The issue is that there are background processes and GPS is left running if I just back arrow out of the application. I understand that I can turn these off with OnStop() or OnPause() but I don't want back arrow or home to stop anything. I want all the GPS and handlers to continue running no matter what the user does unless he hits EXIT on my main screen which takes him to another screen that is to confirm the exit and do the cleanup. That way the user can back arrow out of the exit screen without actually exiting if it was hit by mistake.
Please understand that this application will be used in bright sunlight in adverse conditions with gloves on. It is very difficult to read anything so I use high contrast fonts 100 high. It cannot stop unless the user really wants it to stop. But just letting it run will kill the battery. I have no problem with the behavior of the system if I just let it run, just with the idea that the battery will run down and I don't want any simple button push, which may be accidental, to stop the services. I want it just as hard to kill this apps background processes as it is to turn the phone off, but I want to be able to do it.
I have tried finish(), which is just a back arrow, and every other method I have seen over the last three hours of Googling. I have thought of changing my EXIT button to a Turn GPS off button but then if the user uses back arrow to exit he gets to the main page and that turns GPS back on.
Just to be clear. My app has a menu based main screen. Any useful page will return to that menu if back arrow is hit. One of the menu items is EXIT. Hitting that menu item takes you to an exit screen that has a button that says EXIT. If the user got here by accident, he can back arrow back to the menu. If he hits the EXIT button on the exit page, I can turn off all the handlers and GPS and go to the phone or tablet home screen. At least that is what I want and can't figure out how to do.
I have used similar apps that use OnStop() or OnPause() to turn off the GPS and they are a pain. That is not what I want. Please don't tell me that is what I want to do. I know how to do that. That is not what I am asking.
Thanks.
[1]: http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon | 0 | [
2,
4350,
17,
5741,
43,
3010,
5167,
13,
8,
510,
800,
3726,
3726,
31,
589,
1174,
21,
18298,
432,
3010,
26,
13005,
9,
31,
259,
21,
5167,
20,
4350,
14,
3010,
56,
129,
805,
18298,
168,
47,
31,
107,
52,
259,
97,
13,
14238,
20393,
54... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 $_SESSION variable saving issue
===
I'm a relative php newbie, so I'm not sure where I'm going wrong, I am trying to build a protected area in my site, with a login that saves the user name in a session variable and redirects to the protected page where the session variable is checked on page load.
The issue I am having is that when someone logs in for the first time (or all borwsing data has been cleared) it logs in and redirects the user back to the login (index.html), but if another login attempt is done without clearing browering data it logs in fine, and I know the session variable is there because I am able to print the value onto the page.
I have checked the session save path is writable, using:
if (!is_writable(session_save_path()))
{
echo "writable";
}
My login function and check login function (used to check the session variable) are both stored in a seperate class file.
class file:
public function login($uname, $pword)
{
/* Do all the work here.. and this is the final bit*/
if (strcmp($userpw, $dbpword) == 0)
{
$_SESSION['uname'] = $uname;
echo "sucess";
}
else
{
echo "Wrong password";
return false;
}
$home->disconnectDB($con);
}
public function checkLogin()
{
if (!isset($_SESSION['uname']))
{
header("location:index.html");
}
else
{
/*DB stuff here*/
$uname = $_SESSION['uname'];
$sql = "SELECT user FROM users WHERE user = '" . $uname . "'";
$result = mysql_query($sql, $con);
$rows = mysql_num_rows($result);
if ($rows != 1)
{
header("location:index.html");
}
$home->disconnectDB($con);
}
}
The actual login file that is called from my index.html using ajax when logging in is:
session_start();
include "User_Management.php";
$admin = new User_Management();
$uname = $_POST['uname'];
$pword = $_POST['pword'];
if (isset($uname) && isset($pword))
{
$admin->login($uname, $pword);
}
else
{
echo "please enter a username and password";
return false;
}
This is the code that checks the login at the top of my protected page:
session_start();
include "User_Management.php";
$admin = new User_Management();
$admin->checkLogin();
Any help with this would be greatly appriciated | 0 | [
2,
13,
26120,
5579,
1,
7202,
5991,
7612,
7599,
1513,
800,
3726,
3726,
31,
22,
79,
21,
4543,
13,
26120,
78,
5893,
15,
86,
31,
22,
79,
52,
562,
113,
31,
22,
79,
228,
1389,
15,
31,
589,
749,
20,
1895,
21,
3803,
217,
19,
51,
689... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
WaTiN - Page Refresh Problems
===
I'm trying to get a page to autorefresh using a for loop using C# and WaTin:
for (int i = 0; i < 5; i++)
{
browser.GoTo("www.example.com");
}
The browser loads the page the first time but doesn't refresh any more times. What am I doing wrong? | 0 | [
2,
15553,
108,
13,
8,
2478,
24905,
1716,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
21,
2478,
20,
3108,
99,
22373,
568,
21,
26,
5293,
568,
272,
5910,
17,
15553,
108,
45,
26,
13,
5,
6391,
31,
800,
713,
73,
31,
13,
1,
331,
73,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
IE9 HTML 5 Geolocation Gets Poor Results
===
We're building an html 5 geolocation project. In Chrome and FF the results are outstanding. Through IE9, absolutely rotten. We learned both Chrome and FF use the Google Location service and IE, the Microsoft Location service. So, the Microsoft location service appears to be the culprit. Since we don't have any control over what browser people use, can anyone think of a workaround to force IE users to the Google Location service? | 0 | [
2,
13,
660,
518,
13,
15895,
331,
6389,
19032,
3049,
1696,
1736,
800,
3726,
3726,
95,
22,
99,
353,
40,
13,
15895,
331,
6389,
19032,
669,
9,
19,
13,
12985,
17,
13,
2460,
14,
1736,
50,
4012,
9,
120,
13,
660,
518,
15,
6916,
11573,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 hibernate application?
===
my question may seem too weird but i thought about the windows hibernation thing and i was wondering if there is a way to hibernate a specific process or application.
i.e : when windows start up from a normal shutdown/restart it will load all startup programs normally but in addition of that it will load a specific program with it`s previous status before shutting down the computer.
I have though about reserving the memory location and retrieve it back when computer start up , but is there any application that does that in windows environment ? | 0 | [
2,
184,
20,
4148,
2102,
8820,
3010,
60,
800,
3726,
3726,
51,
1301,
123,
2260,
266,
5455,
47,
31,
289,
88,
14,
1936,
4148,
2102,
7914,
584,
17,
31,
23,
5712,
100,
80,
25,
21,
161,
20,
4148,
2102,
8820,
21,
1903,
953,
54,
3010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 cntrol mouse pointer with Matlab or C?
===
I need to run a C or Matlab program at the bottom of windows running programs to move mouse, like using image processing to move mouse pointer.
how can i move mouse with a set of codes and how can i click right and left??? | 0 | [
2,
184,
20,
272,
2877,
7133,
7567,
454,
106,
29,
4277,
9086,
54,
272,
60,
800,
3726,
3726,
31,
376,
20,
485,
21,
272,
54,
4277,
9086,
625,
35,
14,
2129,
16,
1936,
946,
1726,
20,
780,
7567,
15,
101,
568,
1961,
5511,
20,
780,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
printf implementation: how do the implementation konws the output string size?
===
printf("%s%d%c", s, a, c);<br>
The string would be printed on the stdout; but how the implementation knows to define what
size of char array to hold result?<br>
Or the alternative way is: use the fixed size buffer, handle each variable argument behind the format string, if the interpreted string size exceed the buffer size, then output it to output stream. <br>
Is that true?<br>
By the way, I think, the string type in C++, its implementation uses the heap memory, dynamic memory allocator, just as new, or delete. <br>Am I right? | 0 | [
2,
4793,
410,
6123,
45,
184,
107,
14,
6123,
5191,
10268,
14,
5196,
3724,
1072,
60,
800,
3726,
3726,
4793,
410,
5,
7,
11881,
18,
11881,
43,
11881,
150,
7,
15,
13,
18,
15,
21,
15,
272,
6,
73,
1,
5145,
1,
14,
3724,
83,
44,
5317... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 i need an apache servername setup?
===
I'm no really sure if SO is the place to ask this question - let me know if not. I thought about superuser, but it didn't seem to fit into their faq specs much.
Anyway - the question! Do i need to put in the ServerName value in my apache2.conf file if i'm just using the server to service a single website? If so, what should i set it to?
I'm following this guide:
http://meppum.com/2009/jan/17/installing-django-ubuntu-intrepid/
and it suggests i set the "SeverName" setting in my apache2.conf file. I checked about and found this article, that discusses "ServerName"
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch20_:_The_Apache_Web_Server
.
Which is interesting and all, but it doesn't really tell me *when* i need to set the ServerName. 'Far as i can judge, i only need it when i'm doing some sort of something.domainname.com, like, say, answers.yahoo.com
Is this the case? If not, what is servername (for, say, a domain called www.yahoo.com at, say, 192.0.0.1) meant to be?
| 0 | [
2,
107,
31,
376,
40,
17140,
8128,
7259,
18161,
60,
800,
3726,
3726,
31,
22,
79,
90,
510,
562,
100,
86,
25,
14,
209,
20,
1349,
48,
1301,
13,
8,
408,
55,
143,
100,
52,
9,
31,
289,
88,
1026,
16704,
15,
47,
32,
223,
22,
38,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How To Center This Div Vertically Within Another Div?
===
I am trying to setup something that looks like this with the arrow that is centered vertically:
![enter image description here][1]
[1]: http://i.stack.imgur.com/DETDg.jpg
CSS:
#arrowdiv {
width:282px;
height:61px;
background-image:url('http://i.imgur.com/RV80I.png');
margin: 0 auto;
}
#optin {
height:110px;
width:960px;
background-color:#FFFFBF;
border:1px solid black;
-moz-border-radius: 15px;
border-radius: 15px;
-moz-box-shadow: 3px 3px 4px #000;
-webkit-box-shadow: 3px 3px 4px #000;
box-shadow: 3px 3px 4px #000;
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');
margin: 0 auto;
}
#leftdiv {
width:340px;
height:108px;
}
HTML:
<div id="optin">
<div id="leftdiv">
<div id="arrowdiv"></div>
</div>
</div>
http://jsfiddle.net/NzMLd/1/
Right now, it is only centered horizontally, as you can see in my jsfiddle. | 0 | [
2,
184,
20,
459,
48,
13,
12916,
23300,
363,
226,
13,
12916,
60,
800,
3726,
3726,
31,
589,
749,
20,
18161,
301,
30,
1879,
101,
48,
29,
14,
7409,
30,
25,
10583,
23300,
45,
13,
187,
2558,
13679,
1961,
5318,
235,
500,
2558,
165,
500... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What makes rails never outputs `Set-Cookie` header?
===
This is my `config/application.rb` file and somehow I made my Rails never outputs the `Set-Cookie` header anymore, failing all the session mechanisms.
What's wrong?
module KAPP
class Application < Rails::Application
config.cache_store = :dalli_store, 'localhost'
{ :namespace => 'fxs', :expires_in => 1.day, :compress => true }
config.action_mailer.default_url_options = {:host => "k.tv"}
config.action_controller.default_url_options = {:host => "k.tv"}
config.time_zone = 'Beijing'
config.i18n.default_locale = 'zh-CN'
config.i18n.available_locales = ['zh-CN', :en]
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.active_record.schema_format = :sql
config.active_record.whitelist_attributes = true
config.assets.enabled = true
config.assets.version = '1.0'
config.assets.prefix = ""
config.action_controller.asset_host = nil
config.active_support.escape_html_entities_in_json = true
end
end
| 0 | [
2,
98,
1364,
2240,
18,
243,
5196,
18,
13,
1,
3554,
8,
716,
17391,
1,
157,
106,
60,
800,
3726,
3726,
48,
25,
51,
13,
1,
14093,
2816,
118,
2552,
20669,
9,
7549,
1,
3893,
17,
3625,
31,
117,
51,
2240,
18,
243,
5196,
18,
14,
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... |
onDrawFrame not being called Android
===
I am having a problem were the renderer object doesn't seem to get its onDrawFrame called at all. The debugger never hits a breakpoint inside the function. Thus, my square isn't drawing. Here is the the code, let me know if you need anything else:
public class renderer implements GLSurfaceView.Renderer {
Square square;
public void onDrawFrame(GL10 unused) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
square.Draw();
}
public void onSurfaceChanged(GL10 gl, int width, int height) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
}
public void onSurfaceCreated(GL10 unused, int width, int height) {
GLES20.glViewport(0, 0, width, height);
}
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
square = new Square(5, 5);
}
The main activity is:
public class gameActivity extends Activity {
/** Called when the activity is first created. */
private GLSurfaceView mGLView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
staticHolder.context = getApplicationContext();
mGLView = new GLSurface(this);
setContentView(mGLView);
}
@Override
protected void onPause() {
super.onPause();
// The following call pauses the rendering thread.
// If your OpenGL application is memory intensive,
// you should consider de-allocating objects that
// consume significant memory here.
mGLView.onPause();
}
@Override
protected void onResume() {
mGLView.onResume();
}
class GLSurface extends GLSurfaceView
{
renderer r = new renderer();
public GLSurface(Context context)
{
super(context);
setEGLContextClientVersion(2);
setRenderer(r);
setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
}
}
}
currently the screen is just black. Is there any idea of why the openGL is not rendering properly? I am new to openGL/graphics programming. | 0 | [
2,
27,
43,
12404,
8361,
52,
142,
227,
13005,
800,
3726,
3726,
31,
589,
452,
21,
1448,
46,
14,
16535,
106,
3095,
1437,
22,
38,
2260,
20,
164,
82,
27,
43,
12404,
8361,
227,
35,
65,
9,
14,
121,
2345,
11356,
243,
3858,
21,
1442,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 found - too many arguments to method call expected 1 have 2 - in app email
===
There seems to be an error with my coding, and it says that there are to many nils or something
I need help
MFMailComposeViewController *composer = [[MFMailComposeViewController alloc]init];
if ([MFMailComposeViewController canSendMail]) {
[composer setToRecipients:[NSArray arrayWithObject:@"nicole@aandtlegal.com", nil]];
[composer setSubject:nil];[composer setMailComposeDelegate:self];
[composer setMessageBody:nil isHTML:YES];
[composer setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
| 0 | [
2,
7019,
216,
13,
8,
266,
151,
10553,
20,
2109,
645,
1727,
137,
57,
172,
13,
8,
19,
4865,
8517,
800,
3726,
3726,
80,
2206,
20,
44,
40,
7019,
29,
51,
13,
15458,
15,
17,
32,
898,
30,
80,
50,
20,
151,
24057,
54,
301,
31,
376,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Replicating the rotation transition of iPhone's music app (Table View to Coverflow View)
===
I would like to replicate the rotation transition of Apple's music app on the iPhone when going from the table view listing your songs to the coverflow view:
Instead of adjusting the interface elements to fit the landscape mode (e. g. resizing the navigation bar and table view) they stay as they are until the coverflow view smoothly fades in.
Usually the interface elements adjust themselves while rotating the device to fit the new dimensions.
This is what I have:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
// Coming from portrait orientation so the next orientation will be landscape
if (fromInterfaceOrientation == UIInterfaceOrientationPortrait) {
TimePickerViewController *timePickerViewController = [[UIStoryboard storyboardWithName:@"Storyboard_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"alarmTimePickerViewController"];
timePickerViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self.navigationController presentModalViewController:timePickerViewController animated:YES];
}
}
Obviously this does not prevent the interface element from rotating. It only presents another view controller when the rotation has finished by doing a crossover transition. This is working fine, but I don't know how to prevent the interface elements from adjusting when the rotation begins. | 0 | [
2,
13426,
1203,
14,
9431,
4513,
16,
21024,
22,
18,
232,
4865,
13,
5,
5924,
1418,
20,
1227,
9990,
1418,
6,
800,
3726,
3726,
31,
83,
101,
20,
22156,
14,
9431,
4513,
16,
4037,
22,
18,
232,
4865,
27,
14,
21024,
76,
228,
37,
14,
85... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Capistrano failing to "git ls-remote ..." with "no returned status code..."
===
Can anyone help me understand what is going on here? Jenkins has been working perfectly for a while now and all of a sudden I keep getting this problem. Yes, I did try searching for the issue but it seems I am the only one who has ever had it because I can not find any info on it anywhere.
Please note, some of the info below has been changed for privacy issues, but my main concern is the message "no returned status code pid 74937 exit 2" that keeps being added to the git ls-remote command. I have no idea where that is coming from, or what it means.
I should note that I CAN "**cap deploy**" just fine from my local machine. I do not get any errors and the app is deployed to the remote server.
Any info would help, thanks.
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:private/repo.git (no"
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `git ls-remote git@github.com:private/repo.git (no'
*** [deploy:update_code] rolling back
* executing "rm -rf /rails_apps/private/releases/20120624130104; true"
servers: ["SERVER_IP"]
[SERVER_IP] executing command
command finished in 529ms
Command git ls-remote git@github.com:private/repo.git (no returned status code pid 74937 exit 2 | 0 | [
2,
2605,
702,
17555,
7250,
20,
13,
7,
10404,
644,
18,
8,
99,
20209,
13,
9,
9,
9,
7,
29,
13,
7,
251,
587,
1782,
1797,
9,
9,
9,
7,
800,
3726,
3726,
92,
1276,
448,
55,
1369,
98,
25,
228,
27,
235,
60,
11420,
63,
74,
638,
575... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
MFC - communication between two CDialog
===
I have a MFC dialog based application.
The main dialog contain a child dialog (used in a CTabCtrl control).
- CDialog mainDlgClass;
- CMyChildDialog childDlgClass;
How I can be able to modify the controls of the child dialog from the main dialog
or
the possibility to send a message, eg: via PostMessage and using RegisterWindowMessage so I can modify the child dialog's controls ?
I dont know howto retrieve a handle of the child dialog.
void mainDlgClass::check()
{
if(condition)
PostMessage_to_the_child_dialog(***);
OR
if(condition)
Modify_CStatic_text_on_the_child_dialog(***);
}
| 0 | [
2,
307,
7061,
13,
8,
3291,
128,
81,
1745,
549,
5567,
800,
3726,
3726,
31,
57,
21,
307,
7061,
28223,
432,
3010,
9,
14,
407,
28223,
3717,
21,
850,
28223,
13,
5,
8795,
19,
21,
272,
15783,
4812,
6362,
569,
6,
9,
13,
8,
1745,
549,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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++ : Restrict the number of object creations of a class to a given number
===
Given a class. The objective is to restrict the number of object creations of this class to a given number, say 4. Does there exist a method to achieve this ? | 0 | [
2,
272,
20512,
13,
45,
15436,
14,
234,
16,
3095,
2502,
18,
16,
21,
718,
20,
21,
504,
234,
800,
3726,
3726,
504,
21,
718,
9,
14,
7038,
25,
20,
15436,
14,
234,
16,
3095,
2502,
18,
16,
48,
718,
20,
21,
504,
234,
15,
395,
268,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0... |
Matching Two Array Indexes - c# / Windows Phone 7
===
I am trying to create a program which will substitute a character in place of another. I have created two arrays, odd and even as follows:
char[] odd = { 'a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y' };
char[] even = { 'b', 'd', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z' };
Now, if the input is 'a', it has to put 'b' and if the input is 'b', it has to print 'a'.
So i thought it is best to match the index of both the arrays since they have equal count. the basic idea is this :
the input is 'a', so the compiler takes the index of 'a' - 0 into account and substitutes the value at even with the index 0 - 'b'.
so I thought of assigning a spare character 'j', which will find the index of the input and outputs the corresponding character from the array - Even[].
I tried few times but could not get a solution. Kindly help me in this... | 0 | [
2,
10120,
81,
7718,
4348,
160,
13,
8,
272,
5910,
13,
118,
1936,
1132,
453,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
625,
56,
129,
6558,
21,
925,
19,
209,
16,
226,
9,
31,
57,
679,
81,
7718,
18,
15,
4210,
17,
166,
28,
2415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
CodeIgniter - return values after DB's insert
===
I have an form which works with my model:
> public function addGame($data, $parent_id = '0') {
// passing variables from POST
...
// insert array
$ins = array(
...
);
$q = $this->db->insert('games',$ins);
$last = $this->db->insert_id();
return site_url().'/'.$last.'/'.$slug;
}
Controller:
> public function addGame() {
$this->load->model('contrib_model');
if ($this->form_validation->run()) {
$this->contrib_model->addGame($this->input->post()); //submits data
} else {
$this->layout->view('contribute/addGame', $data); //loads view
}
}
My point is - to want this last `return` value... returned. I use compression, so I can't `echo` it (it wouldn't be apropriate anyway).
How can I solve this? | 0 | [
2,
1797,
9693,
242,
106,
13,
8,
788,
4070,
75,
13,
9007,
22,
18,
14692,
800,
3726,
3726,
31,
57,
40,
505,
56,
693,
29,
51,
1061,
45,
13,
1,
317,
1990,
3547,
5128,
5,
4403,
18768,
15,
5579,
18908,
1,
1340,
800,
13,
22,
387,
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... |
Refreshing ListView after Inserting New Item into MySQ
===
I have attempted so many way and recommendations but my code is just not going right. Here is what I have done. What code needs to be added so that after I new item is added the, item shows up in the list?
Here is the context:
In the Action Bar, there is an "Add Item" Button. The dialog opens, and in the onclick in the dialog, it inserts a word that you have typed in a single field into a database (MySQL), dismisses the dialog, then ... this is where my troubles are .... nothing.
(Yes, my code is a mess in some ways...)
public class Items extends ListActivity {
List<String> items = null;
ArrayList<NameValuePair> param;
ArrayList<NameValuePair> insertParam;
String cat_id, NewItem;
ArrayAdapter<String> adapter;
ListView listView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
cat_id = getIntent().getExtras().getString("category_id");
items = new ArrayList<String>();
new task().execute();
}
class task extends AsyncTask<String, String, Void> {
private ProgressDialog progressDialog = new ProgressDialog(Items.this);
@Override
protected Void doInBackground(String... params) {
String url_select = "http://www.---.com/---/items.php";
// HttpPost ... etc
// BufferRedReader .. etc
}
protected void onPostExecute(Void v) {
String item;
try {
// JSON Stuff
}
} catch (JSONException e1) {
// Here is where ListView is set up when Activity/page first starts
listView = getListView();
listView.setTextFilterEnabled(true);
listView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1,
int arg2, long id) {
Intent i = new Intent(getApplicationContext(), Rate.class);
i.putExtra("name", items.get(arg2));
i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(i);
}
});
progressDialog.dismiss();
adapter = new ArrayAdapter<String>(Items.this, R.layout.list, items);
setListAdapter(adapter);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.Add_Item:
final Dialog dialog = new Dialog(Items.this);
dialog.setContentView(R.layout.insert_dialog);
dialog.setTitle("Insert Item");
dialog.setCancelable(true);
dialog.show();
final EditText etInsert = (EditText) dialog
.findViewById(R.id.etInsertItem);
Button bInsert = (Button) dialog.findViewById(R.id.bInsert);
bInsert.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
NewItem = etInsert.getText().toString();
new insertTask().execute();
dialog.dismiss();
}
});
return true;
case R.id.About:
return true;
default:
return super.onOptionsItemSelected(item);
}
}
// This Class is the "inserting item" task inside the dialog
class insertTask extends AsyncTask<String, String, Void> {
@Override
protected Void doInBackground(String... params) {
String url_select = "http://www.---.com/---/insert_item.php";
cat_id = getIntent().getExtras().getString("category_id");
insertParam = new ArrayList<NameValuePair>();
insertParam.add(new BasicNameValuePair("Cat_Id", cat_id));
insertParam.add(new BasicNameValuePair("New_Item", NewItem));
try {
// HTTPPost Stuff ....
}
}
protected void onPostExecute(Void v) {
// Add ListView Refresh Here????
}
}
}
| 0 | [
2,
27134,
968,
4725,
75,
14692,
68,
78,
9101,
77,
51,
18,
1251,
800,
3726,
3726,
31,
57,
3066,
86,
151,
161,
17,
12121,
47,
51,
1797,
25,
114,
52,
228,
193,
9,
235,
25,
98,
31,
57,
677,
9,
98,
1797,
2274,
20,
44,
905,
86,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I, using current web tech, generate a hexagonal, interactive map
===
I want to learn html5/current web techs, specifically to create a game.
Initially I want to be able to generate a top down, 2d map, made up of hexagonal tiles.
These tiles will be randomly generated with the usual environmental tiles (grass, plains, snow, lake, ocean etc...)
I want to be able to zoom in/out.
I will later want to have avatars represent the player(s)/AIs and assets on the tiles etc...
Where can I find a good starting place to learn the basics? | 0 | [
2,
184,
92,
31,
15,
568,
866,
2741,
6145,
15,
7920,
21,
29677,
15,
9194,
2942,
800,
3726,
3726,
31,
259,
20,
2484,
13,
15895,
10551,
17657,
2741,
6145,
18,
15,
3524,
20,
1600,
21,
250,
9,
1537,
31,
259,
20,
44,
777,
20,
7920,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 create a virtual gamepad?
===
How would I go about creating a "gamepad" which appears to DirectInput applications as a normal game controller but the state of its controls is actually defined by software? | 0 | [
2,
184,
107,
31,
1600,
21,
6599,
250,
8240,
60,
800,
3726,
3726,
184,
83,
31,
162,
88,
2936,
21,
13,
7,
5128,
8240,
7,
56,
1780,
20,
1744,
108,
4881,
3767,
28,
21,
1826,
250,
9919,
47,
14,
146,
16,
82,
8671,
25,
1121,
2811,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Rails model with inspectable virtual columns
===
I'm trying to create a model with a "virtual" (calculated) column that will converted to json, xml and all other formats automaticaly.
Class Home < ActiveRecord::Base
has_many :images, :as => :imageable
def images_ids
i_ids = []
images.each do |i|
i_ids.push(i.id)
end
i_ids
end
...
some code
...
end
We need some code for configure class so that the value of images displayed in the console and was converted to json and xml.
I found [this solution][1] for convert to json.
Is it any universal solution without rewriting core functions?
[1]: http://stackoverflow.com/a/6493424/1283224 | 0 | [
2,
2240,
18,
1061,
29,
19,
7350,
579,
6599,
7498,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
1061,
29,
21,
13,
7,
8145,
38,
6948,
7,
13,
5,
16304,
13045,
6,
4698,
30,
129,
3494,
20,
487,
528,
15,
23504,
17,
65,
89,
1376... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
overlapping key events javascript
===
Hi i am working on a little html/javascript/css3 project for fun. I'm basically trying to make a wheel that rolls around in the browser window. To control the wheel im using keyup and keydown events for the cursor keys(left and right turn the wheel and up and down roll it forward or backward). I've got it working pretty well so far but there are two major glitches. Say i want to roll the wheel forward and without stopping i want to turn it a little to the right, well i keep the up key pressed and press the right cursor key. When i do this theres a pause in the movement before it registers both events and keeps rolling. Thats one of the problems, the main problem is that, once i've performed the previous action and then wheel is at a desirable angle, if i let go of the right cursor key the browser registers both keys as released and the wheel comes to a stand still. Here is a jsfiddle link to what it looks like: http://jsfiddle.net/UKqwu/1/ , the code is a mess i know but its a work in progress/learning experience and i've only been programming for a month or so. Anyways thanks for any help. | 0 | [
2,
23854,
1246,
963,
8247,
8741,
800,
3726,
3726,
4148,
31,
589,
638,
27,
21,
265,
13,
15895,
118,
1004,
1385,
8741,
118,
6824,
18,
240,
669,
26,
2414,
9,
31,
22,
79,
11374,
749,
20,
233,
21,
3556,
30,
10081,
140,
19,
14,
16495,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Mule Message Redelivery
===
Does anyone know what is the difference between maxRedelivery attribute on a connector and defining idempotent-redelivery-policy on an endpoint? Are they both same?
One difference I know is in idempotent-redelivery-policy you can define dead-letter-queue to direct error messages on error queue. What happens when you define maxRedelivery on a connector? After max attempts is message discarded?
Please help | 0 | [
2,
17857,
2802,
302,
29731,
93,
800,
3726,
3726,
630,
1276,
143,
98,
25,
14,
2841,
128,
2049,
99,
29731,
93,
35,
14755,
27,
21,
17991,
17,
14684,
31,
11546,
4296,
2291,
8,
99,
29731,
93,
8,
8147,
2731,
27,
40,
241,
3132,
60,
50,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Most efficient way to store a 40 cards deck
===
I'm building a simulator for a 40 card's deck game. The deck is divided into 4 seeds, each one with 10 cards. Since there's only 1 seed that's different from the others ( let's say, hearts ) , I've thinked of a quite convinient way to store the whole deck in 3 bits: the first two indicate how many cards of a given value are left, and the last one is a marker that tells if the heart card of that value is still in the deck.
So,
**{7h 7c 7s} = 101**
That allows me to store the whole deck on 30 bits of memory instead of 40. Now, when i was programming in C, I'd have allocated 3 chars ( 1 byte each = 32 bits), and played with the values with bit operations.
In C# I can't do that, since chars are 2 bytes each and playing with bits is much more of a pain, so, the question is : what's the smallest amount of memory I'll have to use to store the data required?
PS: Keep in mind that i may have to allocate 100k+ of those decks in system's memory, so saving 10 bits is quite a lot | 0 | [
2,
127,
8243,
161,
20,
1718,
21,
1417,
4092,
4061,
800,
3726,
3726,
31,
22,
79,
353,
21,
24565,
26,
21,
1417,
2056,
22,
18,
4061,
250,
9,
14,
4061,
25,
2350,
77,
268,
7945,
15,
206,
53,
29,
332,
4092,
9,
179,
80,
22,
18,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
pgcrypto Postgresql PGP pgp_pub_decrypt with password
===
I have been experiencing few problems with data encryption over pgcrypto with Postgresql 8.4.
First case : works fine :
> select pgp_pub_decrypt(pgp_pub_encrypt('fuck',
> dearmor(pubkey),'compress-algo=1,
> cipher-algo=aes256'),dearmor(seckey)) from keytbl where keytbl.id=1
>
> -> returns "fuck"
key 1 is pgp with no password
Second case : doesn't work
> select pgp_pub_decrypt(pgp_pub_encrypt('fuck',
> dearmor(pubkey),'compress-algo=1,
> cipher-algo=aes256'),dearmor(seckey),'password') from keytbl where
> keytbl.id=2
>
> -> returns ERREUR: Corrupt data
When i generate keys with **password** pgcrypto doesn't want to decrypt the message crypted with the public key ....
Anyone got a guess ? This is driving me mad... | 0 | [
2,
13,
9623,
11435,
111,
678,
6879,
18,
22402,
351,
13321,
351,
13321,
1,
17848,
1,
546,
11435,
29,
20884,
800,
3726,
3726,
31,
57,
74,
15138,
310,
1716,
29,
1054,
24420,
84,
13,
9623,
11435,
111,
29,
678,
6879,
18,
22402,
469,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET MVC4: Register generic page base class
===
I create my own generic page base class:
public abstract class ViewPageBase<TModel> : WebViewPage<TModel>
{
public ParamBuilder<TModel> Param { get { return new ParamBuilder<TModel>(Model); } }
}
Web.config:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="ViewPageBase">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
This entry causes the following errors:
> INCORRECT_TYPE_PARAMETER_NUMBER
And
> An expression tree may not contain a dynamic operation
How do I register a generic page base class with ASP.NET MVC4 without using the `@inherits` keyword in each Razor view? | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
300,
45,
2243,
12733,
2478,
1000,
718,
800,
3726,
3726,
31,
1600,
51,
258,
12733,
2478,
1000,
718,
45,
317,
8502,
718,
1418,
6486,
8436,
1,
38,
13998,
1,
13,
45,
2741,
4725,
6486,
1,
38,
13998,
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... |
database schema design for a movie theater
===
i have designed the following schema for a movie theater.Please provide pointers to make this schema a better one.
movie: id, release_date, name
actor: id, oscars_won, name
movie_actor (link table): movie_id, actor_id
screen: screen_id, total_no_of_seats
showtime: id, start_time, end_time
movie_screen_showtime (link table): movie_id, screen_id, showtime_id, tickets_available, price
customer: id, name, payment_info_id
ticket: id, customer_id, movie_id, screen_id, showtime_id, purchase_date
i want to be able to answer questions like
1. what are all the movies being shown
2. ticket availability for a particular movie/screen/showtime
3. actors in a movie
4. total sales for the day or by movie or by showtime or by screen
| 0 | [
2,
6018,
23874,
704,
26,
21,
1308,
2547,
800,
3726,
3726,
31,
57,
1006,
14,
249,
23874,
26,
21,
1308,
2547,
9,
6744,
1181,
454,
445,
20,
233,
48,
23874,
21,
574,
53,
9,
1308,
45,
4924,
15,
830,
1,
8209,
15,
204,
1574,
45,
4924... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Arrays constness discarding during implicit functions instantiation
===
D discards top level array's const during implicit functions instantiation and leaves it in case of explicit one.
Consider code:
<pre><code>// main.d
import std.stdio;
void foo( T )( T val )
{
writeln( typeid( T ) );
}
void main()
{
const int[] arr;
writeln( typeid( arr ) ); // actual type
foo( arr ); // implicit instantiation
foo!( typeof( arr ) )( arr ); // explicit instantiation
}</code></pre>...and output:<code><pre>$ dmd main.d && ./main
const(const(int)[])
const(int)[]
const(const(int)[])
</code></pre>
As you can see, top level const was lost in case of implicit instantiation. Is this bug, feature or my misunderstanding ?
| 0 | [
2,
7718,
18,
11608,
38,
720,
26251,
68,
112,
20290,
3719,
6322,
49,
857,
800,
3726,
3726,
13,
43,
26251,
18,
371,
662,
7718,
22,
18,
11608,
38,
112,
20290,
3719,
6322,
49,
857,
17,
2084,
32,
19,
610,
16,
14990,
53,
9,
3563,
1797... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 on Windows - Run as Ant Build
===
Ok, I'm an android newbie - totally. But I am trying to run a project provided by someone else that I know works.
I'm running on a Windows install of Eclipse that seems to be working fine.
When I run this project I get a dialog box asking which Ant to Run as and my choices are Ant Build and Ant Build with Allowed Configuration changes.
Since I don't know about Ant, I pick Ant Build and get this error: Unable to find Ant file to run.
So my question is, how to I either get rid of this requirement to have an Ant file for this project or how do I create an Ant file for this as there doesn't seem to be one included in the project, or how do I install Ant - I'm on Windows.
Please help by answering above or pointing to documentation.
Thanks! | 0 | [
2,
13005,
27,
1936,
13,
8,
485,
28,
40,
38,
1895,
800,
3726,
3726,
5854,
15,
31,
22,
79,
40,
13005,
78,
5893,
13,
8,
5139,
9,
47,
31,
589,
749,
20,
485,
21,
669,
1173,
34,
737,
962,
30,
31,
143,
693,
9,
31,
22,
79,
946,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Fatal exception main : nable to start the activity component
===
I am parsing the data and displaying it on the textview.
Though i have initialized all the variables and necessary permissions to be made in manifest file.Still iam getting the fatal error.Please have a look at code. Thanks in advance
Main Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
View layout = findViewById(R.id.layout);
TextView id[];
TextView Name[];
TextView Email[];
TextView Address[];
try{
SAXParserFactory saxPF= SAXParserFactory.newInstance();
SAXParser saxP = saxPF.newSAXParser();
XMLReader xmlR = saxP.getXMLReader();
URL url = new URL("http://exareceipts.exa.com.au/request_queue/invoice_request/get_test_data");
XMLHandler myXMLHandler = new XMLHandler();
xmlR.setContentHandler(myXMLHandler);
xmlR.parse(new InputSource(url.openStream()));
}catch(Exception e){
e.printStackTrace();
}
data= XMLHandler.data;
id = new TextView[data.getId().size()];
Name = new TextView[data.getName().size()];
Email = new TextView[data.getEmail().size()];
for(int i=0 ; i <data.getName().size(); i++)
{
id[i] = new TextView (this);
id[i].setText("Id : " + data.getId().get(i));
Name[i] = new TextView(this);
Name[i].setText("Name : " + data.getName().get(i));
Email[i] = new TextView(this);
Email[i].setText("Email : " + data.getEmail().get(i));
((ViewGroup)layout).addView(id[i]);
((ViewGroup)layout).addView(Name[i]);
((ViewGroup)layout).addView(Email[i]);
}
XMLGettersSetters Class
public class XMLGettersSetters {
private ArrayList<String> id = new ArrayList<String>();
private ArrayList<String> Name = new ArrayList<String>();
private ArrayList<String> Email = new ArrayList<String>();
public ArrayList<String> getId(){
return id;
}
public void setId(String id){
this.id.add(id);
}
public ArrayList<String> getName(){
return Name;
}
public void setName(String name)
{
this.Name.add(name);
}
public ArrayList<String> getEmail(){
return Email;
}
public void setEmail(String email){
this.Email.add(email);
}
}
XMLHandler class
public class XMLHandler extends DefaultHandler {
String elementValue= null;
Boolean elementOn = false;
public static XMLGettersSetters data = null;
public static XMLGettersSetters getXMLData(){
return data;
}
public static void setXMLData(XMLGettersSetters data)
{
XMLHandler.data=data;
}
public void startElement(String uri,String localName,String qName,Attributes attributes) throws SAXException{
elementOn=true;
if(localName.equals("ExaReceipts")){
data = new XMLGettersSetters();
}else if(localName.equals("Organisation")){
}
}
public void endElement(String uri,String localName,String qName)throws SAXException
{
elementOn = false;
if(localName.equalsIgnoreCase("id"))
data.setId(elementValue);
else if(localName.equalsIgnoreCase("Name"))
data.setName(elementValue);
else if(localName.equalsIgnoreCase("Email"))
data.setEmail(elementValue);
}
public void characters (char[] ch , int start , int length)throws SAXException
{
if(elementOn){
elementValue= new String(ch,start,length);
elementOn=false;
}
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spinnertest1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />"
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".SpinnerTest1Activity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
| 0 | [
2,
8773,
5391,
407,
13,
45,
13,
103,
579,
20,
799,
14,
2358,
5912,
800,
3726,
3726,
31,
589,
2017,
18,
68,
14,
1054,
17,
17418,
32,
27,
14,
1854,
4725,
9,
362,
31,
57,
2104,
1333,
65,
14,
12157,
17,
2378,
5572,
18,
20,
44,
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... |
jQuery's each function and array inside of it
===
Having trouble with each function... Will try to explain by example...
In my code, there is DIV with id "media-type-container-1", with content that changes "live", in runtime:
<div style="border:2px red solid;float:left;overflow-y:scroll;overflow-x:hidden;width:100%;height:180px;font-weight:normal;font-size:10px" id="media-type-container-1">
<div style="width: 100%; clear: both;"><input type="checkbox">Media 11<span id="media-stations-id-11" class="media-stations-id" style="visibility: hidden;">11</span></div>
<div style="width: 100%; clear: both;"><input type="checkbox">Media 12<span id="media-stations-id-12" class="media-stations-id" style="visibility: hidden;">12</span></div>
</div>
If it changes, it can be chnanged to ie:
<div style="border:2px red solid;float:left;overflow-y:scroll;overflow-x:hidden;width:100%;height:180px;font-weight:normal;font-size:10px" id="media-type-container-1">
<div style="width: 100%; clear: both;"><input type="checkbox">Media 13<span id="media-stations-id-13" class="media-stations-id" style="visibility: hidden;">13</span></div>
<div style="width: 100%; clear: both;"><input type="checkbox">Media 14<span id="media-stations-id-14" class="media-stations-id" style="visibility: hidden;">14</span></div>
</div>
To get a list of all "media-stations-id" I use following code:
$("#add-to-filter-stations").live("click", function() {
var selectedMediaStations = new Array();
selectedMediaStations.length = 0;
$('#media-type-container-1').each(function(){
$('.media-stations-id').each(function(){
selectedMediaStations.push($(this).attr('id').replace("media-stations-id-", ""));
})
});
}
In mentioned example, array selectedMediaStations get elements 11, 12, 13 and 14, instead of only 13 and 14.
What I'm doing wrong, so I cannot "start" with empty array every time with live function?
| 0 | [
2,
487,
8190,
93,
22,
18,
206,
1990,
17,
7718,
572,
16,
32,
800,
3726,
3726,
452,
2572,
29,
206,
1990,
9,
9,
9,
129,
1131,
20,
3271,
34,
823,
9,
9,
9,
19,
51,
1797,
15,
80,
25,
13,
12916,
29,
4924,
13,
7,
8260,
8,
4474,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a good database backend in Django for Amazon DynamoDB?
===
I would like to use DynamoDB for my next Django project. I have found implentation to store session data into DynamoDB, but is there backend implementation for Django to store all the database data?
| 0 | [
2,
25,
80,
21,
254,
6018,
97,
2451,
19,
3857,
14541,
26,
8059,
18120,
9007,
60,
800,
3726,
3726,
31,
83,
101,
20,
275,
18120,
9007,
26,
51,
328,
3857,
14541,
669,
9,
31,
57,
216,
5420,
13465,
857,
20,
1718,
3723,
1054,
77,
18120... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Equivalent of GETDATE() BETWEEN Two Date Fields where Both can be NULL
===
Is
SELECT [Id]
,[DateOnline] --Nullable
,[DateOffline] --Nullable
,[PageId]
,[DownloadId]
,[Weight]
FROM [DownloadPage]
WHERE GETDATE() BETWEEN [DateOnline] AND [DateOffline]
Equivalent to:
SELECT [Id]
,[DateOnline] --Nullable
,[DateOffline] --Nullable
,[PageId]
,[DownloadId]
,[Weight]
FROM [DownloadPage]
WHERE ([DateOnline] IS NULL OR [DateOnline] <= GETDATE())
AND ([DateOffline] IS NULL OR [DateOffline] > GETDATE())
But with also catering for NULLs?
Or is there a more elegant way of doing it?
Where are parentheses needed here?
Thanks. | 0 | [
2,
4602,
16,
164,
8209,
5,
6,
128,
81,
1231,
2861,
113,
156,
92,
44,
16203,
800,
3726,
3726,
25,
5407,
636,
1340,
500,
13,
15,
2558,
8209,
218,
1143,
500,
13,
8,
8,
4215,
211,
579,
13,
15,
2558,
8209,
1299,
1143,
500,
13,
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... |
HTML <select> JQuery .change NOT WORKING
===
Alright I don't see why this isnt working. It seems pretty simple.
Here is my drop-down menu:
<div>
<form>
<select id= 'yearDropdown'>
<c:forEach var="years" items="${parkYears}">
<option value=/events.html?display_year=${years}<c:if test="${currentYear == years}"> selected="selected"</c:if>>${years}</option>
</c:forEach>
</select>
</form>
</div>
and here is the JavaScript
$("#yearDropdown").change(function() {
alert('The option with value ' + $(this).val());
});
Right now I just want to get it working so I can add functionality. Thanks! | 0 | [
2,
13,
15895,
13,
1,
18,
16964,
1,
487,
8190,
93,
13,
9,
16229,
52,
638,
800,
3726,
3726,
11885,
31,
221,
22,
38,
196,
483,
48,
8441,
638,
9,
32,
2206,
1772,
1935,
9,
235,
25,
51,
2804,
8,
2968,
11379,
45,
13,
1,
12916,
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... |
Struts2 -- NullPointerException from radio button
===
I have the following form in a Struts2 JSP that contains some radio buttons. There are 2 other forms on the page that work correctly, but this one doesn't. I have determined that the value selected is somehow not being passed, and that that is the reason I'm getting a NullPointerException, but I can't figure out why it's happening. Can anyone help me? Here is my JSP form.
<s:form action="ProcessPoll3">
<table>
<tr>
<td><b><i>Poll #3</i></b></td>
<td>How many kids do you have?</td>
<td><s:radio name="poll3"
list="#{'1':'0.', '2':'1.', '3':'2.',
'4':'3.', '5':'More than 3.'}" />
<s:submit value="Vote Poll #3" align="left" /></td>
</tr>
</table>
</s:form>
My DAO class gets called with this line (and it is being called, for sure):
String poll3;
private HttpServletResponse response;
public String getPoll3() {
return poll3;
}
public void setPoll2(String poll3) {
this.poll3 = poll3;
}
public String execute() {
Poll3DAO poll3DAO = new Poll3DAO();
if (poll3DAO.tallyVote(poll3).equals("success")) {
// Processing goes on here, not relevant to this problem
}
Here is the method in the DAO class, with the breakdown point marked because the parameter that was supposed to be passed was null.
public String tallyVote(String vote) {
String successfulWrite;
request = ServletActionContext.getRequest();
SessionFactory sessionFactory = (SessionFactory) request.getSession()
.getServletContext().getAttribute("sessionFactory");
Session session = sessionFactory.openSession();
try {
// Get previous results
Transaction tx1 = session.beginTransaction();
Query myQuery = session.createQuery("from Poll3");
tx1.commit();
// Update results
Iterator<Poll3> iterate = myQuery.iterate();
Poll3 poll3 = iterate.next();
// NullPointerException occurs on next line
if (vote.equals("1")) {
poll3.setZero(poll3.getZero() + 1);
} else if (vote.equals("2")) {
poll3.setOne(poll3.getOne() + 1);
} else if (vote.equals("3")) {
poll3.setTwo(poll3.getTwo() + 1);
} else if (vote.equals("4")) {
poll3.setThree(poll3.getThree() + 1);
} else if (vote.equals("5")) {
poll3.setMoreThanThree(poll3.getMoreThanThree() + 1);
}
// Write new results back to database;
Transaction tx2 = session.beginTransaction();
session.update(poll3);
tx2.commit();
successfulWrite = "success";
} catch (Exception e) {
System.out.println(e.toString());
successfulWrite = "failure";
}
return successfulWrite;
}
| 0 | [
2,
18316,
18,
135,
13,
8,
8,
16203,
3132,
106,
10066,
872,
37,
603,
5167,
800,
3726,
3726,
31,
57,
14,
249,
505,
19,
21,
18316,
18,
135,
487,
3401,
30,
1588,
109,
603,
12861,
9,
80,
50,
172,
89,
1997,
27,
14,
2478,
30,
170,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Break up long words in a UTF-8 text, with PHP
===
Horrible title, I know.
I want to have some kind of wordwrap, but obviously can not use wordwrap() as it messes up UTF-8.. not to mention markup.
My issue is that I want to get rid of stuff like this "eeeeeeeeeeeeeeeeeeeeeeeeeeee" .. but then longer of course. Some jokesters find it funny to put that stuff on my site.
So when I have a string like this "Hello how areeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee you doing?" I want to break up the 'areeee'-thing with the zero width space (​) character.
Strings aren't always the same letter, and strings are always inside larger strings.. so str_len, substr, wordwrap all don't really fit the description.
Who can help me out? | 0 | [
2,
1442,
71,
175,
715,
19,
21,
287,
11720,
8,
457,
1854,
15,
29,
13,
26120,
800,
3726,
3726,
9244,
581,
15,
31,
143,
9,
31,
259,
20,
57,
109,
825,
16,
833,
499,
10817,
15,
47,
4409,
92,
52,
275,
833,
499,
10817,
5,
6,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to plot two inequalities
===
I would like to plot the following inequalities:
`y < p2(1-p1)` and `x < p1(1-(y/(1-p1)))`
Given that the first is satisfied, I want to plot the region in which both are satisfied. p1 and p2 can vary in [0,1].
I would appreciate any help!
| 0 | [
2,
184,
20,
3798,
81,
19,
62,
14512,
3808,
800,
3726,
3726,
31,
83,
101,
20,
3798,
14,
249,
19,
62,
14512,
3808,
45,
13,
1,
93,
13,
1,
351,
135,
5,
165,
8,
306,
165,
6,
1,
17,
13,
1,
396,
13,
1,
351,
165,
5,
165,
8,
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... |
SQL Server Lock Release
===
Suppose I have a process that is updating a record and encounters a record lock, preventing it from continuing. I assume the process normally blocks (as opposed to failing and requiring the application to implement its own retry logic).
Assuming this is so, how exactly does this block/lock get released? I see two general alternatives: (1) the driver polls MSSQL every N milliseconds; (2) MSSQL signals the driver when the lock is released.
I'm sure there is some variability between drivers and configuration, etc., I'm looking for a general idea. | 0 | [
2,
4444,
255,
8128,
3991,
830,
800,
3726,
3726,
5787,
31,
57,
21,
953,
30,
25,
71,
43,
1880,
21,
571,
17,
12550,
21,
571,
3991,
15,
11520,
32,
37,
4489,
9,
31,
7158,
14,
953,
4147,
5198,
13,
5,
472,
3499,
20,
7250,
17,
9052,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
tcp connect fails randomly under high load
===
Our application uses a non-blocking socket usage with connect and select operations (c code). The pusedo code is as below:
unsigned int ConnectToServer(struct sockaddr_in *pSelfAddr,struct sockaddr_in *pDestAddr)
{
int sktConnect = -1;
sktConnect = socket(AF_INET,SOCK_STREAM,0);
if(sktConnect == INVALID_SOCKET)
return -1;
fcntl(sktConnect,F_SETFL,fcntl(sktConnect,F_GETFL) | O_NONBLOCK);
if(pSelfAddr != 0)
{
if(bind(sktConnect,(const struct sockaddr*)(void *)pSelfAddr,sizeof(*pSelfAddr)) != 0)
{
closesocket(sktConnect);
return -1;
}
}
errno = 0;
int nRc = connect(sktConnect,(const struct sockaddr*)(void *)pDestAddr, sizeof(*pDestAddr));
if(nrC != -1)
{
return sktConnect;
}
if(errno != EINPROGRESS)
{
int savedError = errno;
closesocket(sktConnect);
return -1;
}
fd_set scanSet;
FD_ZERO(&scanSet);
FD_SET(sktConnect,&scanSet);
struct timeval waitTime;
waitTime.tv_sec = 2;
waitTime.tv_usec = 0;
int tmp;
tmp = select(sktConnect +1, (fd_set*)0, &scanSet, (fd_set*)0,&waitTime);
if(tmp == -1 || !FD_ISSET(sktConnect,&scanSet))
{
int savedErrorNo = errno;
writeLog("Connect %s failed after select, cause %d, error %s",inet_ntoa(pDestAddr->sin_addr),savedErrorNo,strerror(savedErrorNo));
closesocket(sktConnect);
return -1;
}
. . . . .}
There are 80 such nodes and the application connects to all its peer in round-robin fashion.
In this phase, some of the nodes are not able to connect (api – connect + select) with error number 115.
> In the below logs (of tcpdump output) for success scenario, we can
> see (SYN, SYN+ACK, ACK) but no entry of even SYN is present for failed
> node in tcpdump logs.
The tcpdump logs are:
387937 2012-07-05 07:45:30.646514 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [SYN] Seq=0 Ack=0 Win=5792 Len=0 MSS=1460 TSV=1414450402 TSER=912308224 WS=8
387947 2012-07-05 07:45:30.780762 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=912309754 TSER=1414450402 WS=8
387948 2012-07-05 07:45:30.780773 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=1414450435 TSER=912309754
All the above three events indicate the success information.
387949 2012-07-05 07:45:30.782652 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [PSH, ACK] Seq=1 Ack=1 Win=5888 Len=320 TSV=1414450436 TSER=912309754
387967 2012-07-05 07:45:30.915615 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [ACK] Seq=1 Ack=321 Win=6912 Len=0 TSV=912309788 TSER=1414450436
388011 2012-07-05 07:45:31.362712 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [PSH, ACK] Seq=321 Ack=1 Win=5888 Len=320 TSV=1414450581 TSER=912309788
388055 2012-07-05 07:45:31.495558 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [ACK] Seq=1 Ack=641 Win=7936 Len=0 TSV=912309933 TSER=1414450581
388080 2012-07-05 07:45:31.702336 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [PSH, ACK] Seq=1 Ack=641 Win=7936 Len=712 TSV=912309985 TSER=1414450581
388081 2012-07-05 07:45:31.702350 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [ACK] Seq=641 Ack=713 Win=7424 Len=0 TSV=1414450666 TSER=912309985
388142 2012-07-05 07:45:32.185612 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [PSH, ACK] Seq=713 Ack=641 Win=7936 Len=320 TSV=912310106 TSER=1414450666
388143 2012-07-05 07:45:32.185629 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [ACK] Seq=641 Ack=1033 Win=8704 Len=0 TSV=1414450786 TSER=912310106
388169 2012-07-05 07:45:32.362622 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [PSH, ACK] Seq=641 Ack=1033 Win=8704 Len=320 TSV=1414450831 TSER=912310106
388212 2012-07-05 07:45:32.494833 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [ACK] Seq=1033 Ack=961 Win=9216 Len=0 TSV=912310183 TSER=1414450831
388219 2012-07-05 07:45:32.501613 10.137.165.136 10.18.92.173 TCP 8441 > 33728 [PSH, ACK] Seq=1033 Ack=961 Win=9216 Len=356 TSV=912310185 TSER=1414450831
388220 2012-07-05 07:45:32.501624 10.18.92.173 10.137.165.136 TCP 33728 > 8441 [ACK] Seq=961 Ack=1389 Win=10240 Len=0 TSV=1414450865 TSER=912310185
Application Logs informing error on connect (i.e api - connect + select)
[5258: 2012-07-05 07:45:30]Connect [10.137.165.136 <- 10.18.92.173] success.
[5258: 2012-07-05 07:45:32]Connect 10.137.165.137 fail after select, cause:115, error Operation now in progress. Check whether remote machine exist and the network is normal or not.
[5258: 2012-07-05 07:45:32]Connect to server([10.137.165.137 <- 10.18.92.173], port=8441) Failed!
Success logs corresponding to first 3 entries of tcpdump. And failure log where there are no events in the tcpdump
> My question is : When client initiates “connect” api for failed case,
> i am not able to see any event in the tcpdump at client side (even
> initial SYN). What can be the reason of this randomness.
| 0 | [
2,
13,
38,
7439,
6379,
13614,
21324,
131,
183,
6305,
800,
3726,
3726,
318,
3010,
2027,
21,
538,
8,
12048,
68,
18482,
7514,
29,
6379,
17,
5407,
1311,
13,
5,
150,
1797,
6,
9,
14,
351,
8795,
111,
1797,
25,
28,
1021,
45,
28839,
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... |
ALSA equivalent to /dev/audio dump?
===
This will be my poorest question ever...
On an old netbook, I installed an even older version of Debian, and toyed around a bit. One of the rather pleasing results was a very basic MP3 player (using libmpg123), integrated for adding background music to a little application doing something completely different. I grew rather fond of this little solution.
In that program, I dumped the decoded audio (from `mpg123_decode()`) to `/dev/audio` via a simple `fwrite()`.
This worked fine - on the netbook.
Now, I came to understand that `/dev/audio` was something done by OSS, and is no longer supported on newer (ALSA) machines. Sure enough, my laptop (running a current Linux Mint) does not have this device.
So apparently I have to use ALSA instead. Searching the web, I've found a couple of tutorials, and they pretty much blow my mind. Modes, parameters, capabilities, access type, sample format, sample rate, number of channels, number of periods, period size... I understand that ALSA is a powerful API for the ambitious, but that's not what I am looking for (or have the time to grok). All I am looking for is how to play the output of `mpg123_decode` (the format of which I don't even know, not being an audio geek by a long shot).
Can anybody give me some hints on what needs to be done? | 0 | [
2,
493,
1229,
4602,
20,
13,
118,
14438,
118,
1346,
6921,
11424,
60,
800,
3726,
3726,
48,
129,
44,
51,
1696,
1430,
1301,
462,
9,
9,
9,
27,
40,
315,
4275,
5199,
15,
31,
4066,
40,
166,
1234,
615,
16,
121,
10035,
15,
17,
20,
93,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Get a low/median-cost estimation of the distance camera-surface
===
Here is my situation : I've a scene made of objects (an high level structure constructed from a mesh of triangles. The meshes are displayed normaly). By construction I've centroids and bounding boxes for those objects. My object are huge but have little details. As the final user are surgeons, and they have to provide diagnosis from my 3D, they need to explore little details. It doesn't really matter for that question, but I'm rendering it with a WebGL framework and I've a function to pick objects from the camera's image.
My objectives :
- If possible, find a way approximate the distance from the camera to the surface without too many calculations (i.e. in real time). For that I can add, for example, a few more things during the object creation (from a set of triangles). With that I could slow the translations as much as I'm near the surface and modify my rotations.
- If not possible, get ideas to design an alternative.
- If nothing is possible, I still can offer the user to change the translation and rotation speed..
I know it's not Xmas today, but I wonder maybe somebody else met the same issue before me ^^
Cheers,
Ricola3D | 0 | [
2,
164,
21,
708,
118,
8260,
103,
8,
15155,
25390,
16,
14,
1583,
3336,
8,
18830,
800,
3726,
3726,
235,
25,
51,
1858,
13,
45,
31,
22,
195,
21,
1691,
117,
16,
3916,
13,
5,
210,
183,
662,
1411,
2096,
37,
21,
55,
1635,
16,
8676,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
The name 'Installers' does not exist in the current context
===
I'm a total noob in developing windows services and I found a tutorial about implementing a standard windows service. This is the code that I found:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
namespace ReviewsSvc
{
[RunInstaller(true)]
public class ReviewsSvcInstaller
{
private ServiceProcessInstaller processInstaller;
private ServiceInstaller serviceInstaller;
public ReviewsSvcInstaller()
{
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller();
processInstaller.Account = ServiceAccount.LocalSystem;
serviceInstaller.StartType = ServiceStartMode.Manual;
serviceInstaller.ServiceName = "Reviews Updater";
Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
}
}
}
I've added the necessary references but I still get an error about 'Installers' not found. What am I missing? | 0 | [
2,
14,
204,
13,
22,
108,
21300,
445,
22,
630,
52,
3182,
19,
14,
866,
4141,
800,
3726,
3726,
31,
22,
79,
21,
600,
90,
4995,
19,
3561,
1936,
687,
17,
31,
216,
21,
29724,
88,
17333,
21,
1236,
1936,
365,
9,
48,
25,
14,
1797,
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... |
"Main type not specified" with GWT and Eclipse Juno 4.2
===
After upgrading to Eclipse Juno 4.2 (through a fresh install) and installing GWT Plugin (3.0.0v201206271046-rel-r42) from http://dl.google.com/eclipse/plugin/4.2, I can't start my GWT application.
I configure the GWT nature of my project just like with Eclipse 3.7 but when I run my application, after selecting my entry point, the start fails with: "Main type not specified"
It appears gwt-dev.jar is not included. GWT referenced library are not added in my project. So I needed to reselect GWT 2.4 in my project configuration. Then, gwt-dev.jar is added correctly in the "Referenced Library" section. But I still get the same error at startup.
Any idea? | 0 | [
2,
13,
7,
6232,
1001,
52,
9931,
7,
29,
14094,
38,
17,
11652,
21715,
268,
9,
135,
800,
3726,
3726,
75,
26939,
20,
11652,
21715,
268,
9,
135,
13,
5,
11639,
21,
3180,
16146,
6,
17,
25429,
14094,
38,
10922,
108,
13,
5,
240,
9,
387... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 to a php handler page using htaccess
===
My attempt to do this is...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule \.js$ js.php [L] ## This line is the one I tried to add
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
If I use a tag `<script type='text/javascript' src='http://www.domain.net/myfile.js'></script>` I would like it to go through `js.php`.
**js.php**
Will handle the file using `header('....'); echo file_get_contents('myfile.js');`
I have tried so many things to do this, I had done this before on a project but I can't remember where now as I have to redo it :)
Hope it makes sense... | 0 | [
2,
8247,
8741,
20,
21,
13,
26120,
24641,
2478,
568,
13,
9020,
20604,
800,
3726,
3726,
51,
1735,
20,
107,
48,
25,
9,
9,
9,
13,
1,
821,
19673,
62,
7226,
1,
99,
23716,
9,
150,
1,
27891,
16847,
27,
27891,
8436,
13,
118,
27891,
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... |
Ideal pattern for opencv detection
===
Well, maybe not "ideal" but "best I can do with simple shapes."
I have an application where I'm using a camera attached to a moving robot actuator and need to detect it's location in the world (using the onboard camera). My research isn't in vision processing so I like like to generate an "easy" pattern to allow for fast and relatively accurate position and rotation detection. The pattern will be printed out and taped to a flat surface (note that this can cause occasional lighting gradients across the paper) and the camera axis will usually be roughly perpendicular.
Consistency of finding the pattern is actually more important than precision of measurement; i.e. I'd rather have something that almost always gives a useful less accurate result than something that gives very accurate and precise results but fails to find anything 10% of the time.
Lastly, this will be used inside of a control loop so speed is quite important.
For all the opencv/vision experts out there, what would be good choices for pattern selection (and associated opencv algorithms) for this? | 0 | [
2,
5628,
3732,
26,
368,
12732,
11643,
800,
3726,
3726,
134,
15,
913,
52,
13,
7,
3448,
192,
7,
47,
13,
7,
4936,
31,
92,
107,
29,
1935,
12129,
9,
7,
31,
57,
40,
3010,
113,
31,
22,
79,
568,
21,
3336,
3638,
20,
21,
1219,
8288,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Waiting for threads of another process using waitpid
===
I am trying to use `waitpid()` for waiting for individual threads instead of processes. I know that `pthread_join()` or `std::thead::join()` are the typical ways for waiting for a thread. In my case, however, I am developing a monitoring application that forks and executes (via `execv`) a program which in turn, spawns some threads. So, I cannot join the threads from the monitoring application, since they belong to a different process and I do not have access to the source code. Still, I want to be able to wait for these individual threads to finish.
Everyhing works fine when I use processes, but `waitpid` does not wait for threads. Basically, `waitpid` returns `-1` right after it is called (the thread is still running at that time for some more seconds).
Documentation for `waitpid` states:
> In the Linux kernel, a kernel-scheduled thread is not a distinct construct from a process. Instead, a thread is simply a process that is created using the Linux-unique clone(2) system call; other routines such as the portable pthread_create(3) call are implemented using clone(2). Before Linux 2.4, a thread was just a special case of a process, and as a consequence one thread could not wait on the children of another thread, even when the latter belongs to the same thread group. However, POSIX prescribes such functionality, and since Linux 2.4 a thread can, and by default will, wait on children of other threads in the same thread group.
That description only considers waiting from a thread to children of other threads (in my case I want to wait for threads children of another process). But, at least, it shows that `waitpid` is thread-aware.
This is what I am using for waiting for the threads:
std::vector<pid_t> pids;
/* fill vectors with thread IDs (LWP IDs) */
for (pid_t pid : pids) {
int status;
pid_t res = waitpid(pid, &status, __WALL);
std::cout << "waitpid rc: " << res << std::endl;
}
This code works for waiting for processes, but it fails for waiting for threads (even if `__WALL` flag is used).
I am wondering whether it is actually possible to wait for a thread by using `waitpid`. Is there any other flag that I need to use? Could you point me to any document where it is explained how to wait for threads of another process?
For reference, the code that I am using for creating the threads is:
static void foo(int seconds) {
int tid;
{
std::lock_guard<std::mutex> lock(mutex);
tid = syscall(__NR_gettid);
std::cout << "Thread " << tid << " is running\n";
pids.push_back(tid);
pids_ready.notify_all();
}
for (int i = 0; i < seconds; i++)
std::this_thread::sleep_for(std::chrono::seconds(1));
}
static void create_thread(int seconds) {
std::thread t(foo, seconds);
threads.push_back(std::move(t));
}
std::vector<pid_t> create_threads(int num, int seconds) {
for (int i = 0; i < num; i++)
create_thread(seconds);
std::unique_lock<std::mutex> lock(mutex);
pids_ready.wait(lock, [num]() { return pids.size() == num; });
return pids;
}
I am using GCC 4.6 and Ubuntu 12.04. | 0 | [
2,
1672,
26,
20396,
16,
226,
953,
568,
1760,
11031,
800,
3726,
3726,
31,
589,
749,
20,
275,
13,
1,
8195,
11031,
5,
6,
1,
26,
1672,
26,
1359,
20396,
700,
16,
5102,
9,
31,
143,
30,
13,
1,
306,
96,
10647,
1,
1636,
108,
5,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.NET DeflateStream Usage
===
I am trying to utilize the INFLATE compression stream in .NET using a `DeflateStream`. My code throws an `InvalidDataException` although I know that the data I am passing has been correctly processed by the DEFLATE algorithm (it has been tested). Am I using the `DeflateStream` incorrectly? My code is as follows:
public byte[] Inflate(byte[] deflateArr)
{
MemoryStream ms;
// try to create a MemoryStream from a byte array
try
{
ms = new MemoryStream(deflateArr);
}
catch (ArgumentNullException)
{
return null;
}
// create a deflatestream and pass it the memory stream
DeflateStream ds;
try
{
ds = new DeflateStream(ms, CompressionMode.Decompress);
}
catch (ArgumentNullException)
{
return null;
}
catch (ArgumentException)
{
return null;
}
// create a bytes array and read into it
byte[] bytes = new byte[4096];
try
{
ds.Read(bytes, 0, 4096);
}
catch (ArgumentNullException)
{
return null;
}
catch (InvalidOperationException)
{
return null;
}
catch (ArgumentOutOfRangeException)
{
return null;
}
catch (InvalidDataException)
{
return null;
}
// close the memory stream
ms.Close();
// close the deflate stream
ds.Close();
return bytes;
} | 0 | [
2,
13,
9,
2328,
6312,
6554,
11260,
7514,
800,
3726,
3726,
31,
589,
749,
20,
13151,
14,
19,
13830,
62,
14864,
3766,
19,
13,
9,
2328,
568,
21,
13,
1,
13862,
6554,
11260,
1,
9,
51,
1797,
13566,
40,
13,
1,
108,
18506,
43,
18768,
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... |
Ext JS Gannt adding links between tasks
===
Adding link with XML works, but I want to use JS variable for it:
var dependencyStore = Ext.create("Gnt.data.DependencyStore", {
autoLoad: true,
proxy: {
type : 'ajax',
url: 'dependencies.xml',
method: 'GET',
reader: {
type : 'xml',
root : 'Links',
record: 'Link' // records will have a 'Link' tag
}
}
});
dependancies.xml
<Links>
<Link>
<From>3</From>
<To>4</To>
<Type>2</Type>
</Link>
</Links>
Now this is the new code, with new dependancy store and JS variable:
My dependancy store instance looks like this at the moment:
var dependencyStore = Ext.create("Gnt.data.DependencyStore", {
autoLoad : true,
proxy : {
type : 'memory',
reader : {
type: 'json'
},
data: [ assign ]
}
});
my assign variable looks like this
var assign = [{
"From" : 3,
"To" : 4,
"Type" : 2
}
]
**Problem it is, that is is not creating a link.** | 0 | [
2,
1396,
38,
487,
18,
7890,
2877,
4721,
6271,
128,
8674,
800,
3726,
3726,
4721,
3508,
29,
23504,
693,
15,
47,
31,
259,
20,
275,
487,
18,
7612,
26,
32,
45,
4033,
26835,
16828,
800,
1396,
38,
9,
6037,
1373,
5,
7,
9776,
38,
9,
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... |
To create new File extension and launch silverlight App using that
===
I am creating Silverlight App, at one point I am in need to create new custom File extension , when the user clicks that particulat extension say .xxx , silverlight app should be lauched in browser. This is similar to opening a text document when we click .txt file.
Can any one suggest me .
Thanks | 0 | [
2,
20,
1600,
78,
3893,
3896,
17,
3394,
1172,
3130,
4865,
568,
30,
800,
3726,
3726,
31,
589,
2936,
1172,
3130,
4865,
15,
35,
53,
454,
31,
589,
19,
376,
20,
1600,
78,
5816,
3893,
3896,
13,
15,
76,
14,
4155,
10840,
18,
30,
141,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Expression Engine how to find customer type and show relevent data
===
I am developing a site for shopping using EE. There are two different types of customers, Retail and Wholesale.
Customer can select customer type (Retail or Wholesale) at the first page. I want to use customer choice and show customer relevant data in following pages.
I tried with Session variables and POST method without success, because whenever I use back button I received "Document Expired" message.
I am a new user for EE. Do you experts have good suggestions to achieve this task?
Thank you very much
| 0 | [
2,
1803,
1406,
184,
20,
477,
7705,
1001,
17,
298,
302,
413,
6645,
1054,
800,
3726,
3726,
31,
589,
3561,
21,
689,
26,
4884,
568,
13,
2851,
9,
80,
50,
81,
421,
2551,
16,
5279,
15,
5881,
17,
17988,
9,
7705,
92,
5407,
7705,
1001,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 Suppress first try of ProcessPostData
===
I got the following problem.
We got a some webcontrols in our framework which have a property IsMustField. If this property is set, the CreateChildControls method changes some CSS and adds a JS Validator to the control. So far so good.
Now I'm trying to implement a slighlty generic control. Some of it's textfield are mustfields when used in one case, but not in the others. The decision, if a field is a must field is done in the OnLoad method of the Control.
When I first open the page, everything is OK. As soon as I hit save and postback is done, the page gets loaded. The initial value for the IsMustField Field is set with the value in the ascx (in this case true). Then it calls the ProcessPostData for the first time. This calls the EnsureChildControls method and therefore the CreateChildControls method of our controls.
Since the CSS and the JS Validator are attached in this method, those will be added, as if the control is a must field. Afterwards, the OnLoad Method of my generic control gets called and the IsMustField gets set to false.
But since it already called the CreateChildControls method, this has not the desired effect anymore.
Now my question would be: Is it possible to somehow suppress the ProcessPostData first try and only call it the second time, so it would load the controls, after my generic control has set the IsMustField to false? Or do I have to search for another solution.
Btw: I know the implementation is quite crappy... but I must not change the framework, so I have no other choice :)
I hope you guys can help me
regards,
crazy_crank | 0 | [
2,
28,
306,
9,
2328,
12451,
64,
1131,
16,
953,
6962,
18768,
800,
3726,
3726,
31,
330,
14,
249,
1448,
9,
95,
330,
21,
109,
2741,
12898,
18,
19,
318,
6596,
56,
57,
21,
1354,
25,
3605,
38,
1109,
9,
100,
48,
1354,
25,
309,
15,
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... |
PHP data to xml
===
I have the following code that creates and downloads an xml formatted page.
My issue is when this is viewed in a browser etc I get the xml tree view that i am after, but when i open the page in notepad etc i get it all on one line.
How can i get this to output the file so that it is done as a proper xml tree within notepad etc
header('Content-Disposition: attachment; filename="itunes_' . $_SESSION['xmlfilename'] . '.xml"');
header('Content-Transfer-Encoding: binary');
header("Content-type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
require_once 'inc/config.php';
require 'class.itunesxmlcls.php';
$d = new iTunesXML();
echo $d->CreateItunesXML($_SESSION['update']['id']);
Many Thanks
| 0 | [
2,
13,
26120,
1054,
20,
23504,
800,
3726,
3726,
31,
57,
14,
249,
1797,
30,
9695,
17,
7121,
18,
40,
23504,
13,
29850,
2478,
9,
51,
1513,
25,
76,
48,
25,
6084,
19,
21,
16495,
2722,
31,
164,
14,
23504,
1541,
1418,
30,
31,
589,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a form email to a .cc email
===
I am working on an email form.
I wondered if there was a restriction on sending php emails to email addresses such as info@domain.cc emails? The .cc is the ending url. Will this affect it?
Any help would be great.
Cheers,
mark | 0 | [
2,
4907,
21,
505,
8517,
20,
21,
13,
9,
3384,
8517,
800,
3726,
3726,
31,
589,
638,
27,
40,
8517,
505,
9,
31,
3519,
100,
80,
23,
21,
18732,
27,
4907,
13,
26120,
8517,
18,
20,
8517,
12636,
145,
28,
15404,
1,
537,
6232,
9,
3384,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 get eshell working correctly in emacs?
===
For some reason, when I type in commands I'm used to on linux, it works perfectly, as it does in bash... But in eshell, it doesn't work.
I've narrowed the problem to a trivial and small sample, as follows:
$ du
c:/Program: command not found
$ which bash
c:/Program Files (x86)/Git/bin/bash.exe
How do I get this working? (du is whatever it is by default... It's implemented in elisp, I haven't made any unusual changes there, that is, it's a compiled lisp function in `em-unix.el')
I would've expected something along the lines of "You have used 1.3 GiB of disk space", rather than that command not found error. | 0 | [
2,
184,
107,
31,
164,
13,
62,
15984,
638,
12044,
19,
13,
62,
6893,
18,
60,
800,
3726,
3726,
26,
109,
1215,
15,
76,
31,
1001,
19,
14294,
31,
22,
79,
147,
20,
27,
13024,
15,
32,
693,
5759,
15,
28,
32,
630,
19,
13158,
9,
9,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Interrupt a thread while is on socket.receive(packet); throws an error
===
I'm developing an Android 3.1 Tablet application that runs a service with this thread:
public class UDPServerThread extends Thread
{
[ ... ]
public void run()
{
while (!end)
{
try
{
byte[] buf = new byte[MESSAGE_SIZE];
// Wait an incoming message.
DatagramPacket packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
// TODO: Notify Service with packet received
Message msg = new Message();
msg.obj = packet;
mServiceHandler.sendMessage(msg);
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
public void stopServer()
{
Log.v("UDPServerThread", "stopServer");
if (socket != null)
socket.close();
end = true;
}
}
When I call `stopServer()` method from service I get the following error:
java.net.SocketException: Interrupted system call
Which is the right way to stop this thread while it is on `socket.receive(packet);`? | 0 | [
2,
15811,
21,
9322,
133,
25,
27,
18482,
9,
99,
1105,
1284,
5,
8573,
1198,
6,
73,
13566,
40,
7019,
800,
3726,
3726,
31,
22,
79,
3561,
40,
13005,
203,
9,
165,
16394,
3010,
30,
1461,
21,
365,
29,
48,
9322,
45,
317,
718,
287,
7431... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 practice to push to GCM/APN from php
===
I am currently building a SNS for both web and iphone/android applications.
When an user writes on the wall or leaves a message, the server needs to push notifications to all related users. Users who are logged in on PC will receive it via Socket.io and those who are logged in on iPhone or android apps will get it via GCM/APN.
What is the best way to send push notification(GET) to all these users from a php web server?
cURL seems to do the right work but is extremely slow on my server.
The web server will need to send notifications to at least 3 different servers at once at unnoticeable speed.
Any suggestions? | 0 | [
2,
246,
1345,
20,
3250,
20,
489,
9095,
118,
2552,
103,
37,
13,
26120,
800,
3726,
3726,
31,
589,
871,
353,
21,
8912,
18,
26,
156,
2741,
17,
21024,
118,
290,
18524,
3767,
9,
76,
40,
4155,
6215,
27,
14,
769,
54,
2084,
21,
2802,
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... |
Text Label inside QT EllipseItem
===
just started with QT today and already got a problem. I want to place a text inside a QGraphicsEllipseItem but there seems to be no setText() or setLabel() function. It should be just one word in the middle of the ellipse. The ellipse is movable, so the text should move aswell when the ellipse gets moved. Is there an easy way to do this? Or do I have to create a separate text and update its position after moving the ellipse? Hope there is an easier way. | 0 | [
2,
1854,
1899,
572,
2593,
38,
13,
4223,
1919,
62,
2119,
79,
800,
3726,
3726,
114,
373,
29,
2593,
38,
786,
17,
614,
330,
21,
1448,
9,
31,
259,
20,
209,
21,
1854,
572,
21,
2593,
12084,
3434,
6013,
870,
2119,
79,
47,
80,
2206,
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... |
Extending knockout viewmodes with prototype
===
If a viewmodel is already defined, either manually or automatically with mapping plugin, is there any problem to "extend" (add properties/functions) the viewmodel later in the code by using prototype?
I'm aware of the create callback of mapping plugin, I just want to know if there are any implications of using prototype instead? The reason I'm asking is because I'm generating large parts of the viewmodels from server side code, but sometimes need to extend the viewmodel later than at initial generation. | 0 | [
2,
8176,
11676,
1418,
15570,
18,
29,
7063,
800,
3726,
3726,
100,
21,
1418,
13998,
25,
614,
2811,
15,
694,
23671,
54,
7499,
29,
13305,
10922,
108,
15,
25,
80,
186,
1448,
20,
13,
7,
1706,
1316,
43,
7,
13,
5,
14854,
3704,
118,
2235... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
.PNG not copying to device bundle
===
I've been stuck with a huge problem for a few days now and it is very frustrating. Everything was working perfectly until I messed around with target settings/provisioning a few days ago. Essentially no images are being copied from the project to be included in the app bundle.
I have:
• Double checked their case consistency
• Made sure they are all included in copy resource bundle section of build phases
• Performed multiple cleans and manual clean outs of the derived data folder
And the images appear fine in the simulator.
I really don't know where else to turn or what else to try. Any help in solving this would be HUGELY appreciate as I am trying to release an update for an app but am unable to do so before getting this fixed. | 0 | [
2,
13,
9,
306,
2723,
52,
4344,
68,
20,
3646,
10194,
800,
3726,
3726,
31,
22,
195,
74,
4549,
29,
21,
2329,
1448,
26,
21,
310,
509,
130,
17,
32,
25,
253,
25568,
9,
796,
23,
638,
5759,
163,
31,
21537,
140,
29,
2935,
12410,
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... |
eclipse debug: Source not found for
===
I know this is a frequently asked question, but i have been searching for a solution for my problem online since yesterday and have not been able to find any!
I am using Eclipse Helios with Tomcat 6.0.2, when ever I try to debug my code using the tomcat and eclipse i am getting the error `Source not found`, I am also using jdk1.6.0 and have this set up correctly as well so that is not the problem, this is the case for even the code that i have wrote myself and not just all the jar files
I have the java build path set up correctly, it does show the code when i am debugging if i right click on the debug console and go to `Edit Source Lookup...`. Because this will show the source code just for that run of the debugger, I when into `Run -> Debug Configurations` and in the `Java Application` window i set it up to work with Tomcat and in the `source` tab I added my project and all the jar files but this does not work either! when i debug again and go into the `Edit Source Lookup...` it does not show me the project and jar files that I have saved in there
Does anybody have any ideas what might be happening? | 0 | [
2,
11652,
121,
16254,
45,
1267,
52,
216,
26,
800,
3726,
3726,
31,
143,
48,
25,
21,
3086,
411,
1301,
15,
47,
31,
57,
74,
5792,
26,
21,
4295,
26,
51,
1448,
2087,
179,
7124,
17,
57,
52,
74,
777,
20,
477,
186,
187,
31,
589,
568,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Console based menu in bash
===
can anyone tell me how can i build console based menu in which i can navigate by direction keys to select options. Code should be in bash or shell script.
| 1 | [
2,
8650,
432,
11379,
19,
13158,
800,
3726,
3726,
92,
1276,
494,
55,
184,
92,
31,
1895,
8650,
432,
11379,
19,
56,
31,
92,
20782,
34,
1400,
5534,
20,
5407,
6368,
9,
1797,
378,
44,
19,
13158,
54,
3593,
3884,
9,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Python error: OSCServer: KeyError on request from
===
I hope someone can help me out?
I'm getting this error from python 2.7.3
OSCServer: KeyError on request from home.gateway:56197:
Any ideas on how I can solve this?
Thanks! | 0 | [
2,
20059,
7019,
45,
13,
759,
150,
10321,
106,
45,
1246,
29992,
27,
3772,
37,
800,
3726,
3726,
31,
1376,
737,
92,
448,
55,
70,
60,
31,
22,
79,
1017,
48,
7019,
37,
20059,
172,
9,
465,
9,
240,
13,
759,
150,
10321,
106,
45,
1246,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Cannot Write On Micro SDCard On BlackBerry
===
I am trying to save some files on micro SDCard. To check the availability of SDCard, I am using the following method;
private boolean isSdCardReady() {
Enumeration e = FileSystemRegistry.listRoots();
while (e.hasMoreElements()) {
if (e.nextElement().toString().equalsIgnoreCase("sdcard/")) {
return true;
}
}
return false;
}
Even if this method returns true, when I try to save files, it gives exception `net.rim.device.api.io.file.FileIOException: File system is not ready`.
What does this means? If SDCard is not available, then why its listed in `FileSystemRegistry.listRoots()`?
How can I make sure that SDCard is available for writing? | 0 | [
2,
1967,
2757,
27,
2899,
13,
18,
43,
6648,
27,
27367,
800,
3726,
3726,
31,
589,
749,
20,
2079,
109,
6488,
27,
2899,
13,
18,
43,
6648,
9,
20,
2631,
14,
11886,
16,
13,
18,
43,
6648,
15,
31,
589,
568,
14,
249,
2109,
73,
932,
98... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Extending scala case class without constantly duplicating contructors vals?
===
is there a way to extend a case class without constantly picking up new vals along the way? For example this doesn't work
case class Edge(a:Strl, b:Strl)
case class EdgeQA(a:Strl, b:Strl, right:Int, asked:Int ) extends Edge(a,b)
"a" conflicts with "a" , so I'm forced to rename to a1. But I don't want all kinds of extra public copies of "a" so I made it private.
case class Edge(a:Strl, b:Strl)
case class EdgeQA(private val a1:Strl, private val b1:Strl, right:Int, asked:Int ) extends Edge(a,b)
This just doesn't seem clean to me.. am I missing something? Thanks! | 0 | [
2,
8176,
25975,
610,
718,
366,
7545,
1052,
25971,
1203,
1065,
8989,
150,
10778,
3347,
18,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
7206,
21,
610,
718,
366,
7545,
7833,
71,
78,
3347,
18,
303,
14,
161,
60,
26,
823,
48,
1437,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Twitter bootstrap: how to add side margins?
===
I have a page with centered Twitter Bootstrap container <div class="container">.
This container has a header that spans the entire width (span12) and below the header is a gallery of pictures, which is a bunch of rows with 4 cells (containing pictures) in each row.
I would like to add side margins to each row so that the first and last picture are not completely snug with container borders and pictures are spaced equally. I don't want to use offset1 for the margin because it is way too big.
Thoughts? | 0 | [
2,
10623,
5894,
16514,
45,
184,
20,
3547,
270,
5440,
18,
60,
800,
3726,
3726,
31,
57,
21,
2478,
29,
10583,
10623,
5894,
16514,
12147,
13,
1,
12916,
718,
3726,
7,
1126,
5851,
106,
7,
1,
9,
48,
12147,
63,
21,
157,
106,
30,
16967,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Cursor movement while writing VBA code
===
I am facing a very frustrating situation where I'm writing some VBA code in excel and the cursor keeps shifting a space to the left for ever word i write.
I just cant seem to control it. As I keep writing code cursor keeps moving 1 space backwards and it all becomes a long word. and I have to manually go to the code and seperate the code with a space.
Is this a bug in MS Excel 2010 and is there any fix for this? | 0 | [
2,
29588,
1018,
133,
1174,
566,
969,
1797,
800,
3726,
3726,
31,
589,
4325,
21,
253,
25568,
1858,
113,
31,
22,
79,
1174,
109,
566,
969,
1797,
19,
20700,
17,
14,
29588,
8968,
10255,
21,
726,
20,
14,
225,
26,
462,
833,
31,
2757,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Depressed UITableView like twitter app
===
I'm trying to replicate cells like the following image of the Twitter app. Could somebody provide insight into how you might do this, including an explanation of how you might create a custom view of the image in Photoshop if that were necessary and if this could not be done programmatically. Thanks in advance.
![enter image description here][1]
[1]: http://i.stack.imgur.com/oIgnC.png | 0 | [
2,
17369,
13,
11193,
579,
4725,
101,
10623,
4865,
800,
3726,
3726,
31,
22,
79,
749,
20,
22156,
2934,
101,
14,
249,
1961,
16,
14,
10623,
4865,
9,
110,
8861,
1181,
9239,
77,
184,
42,
530,
107,
48,
15,
215,
40,
5764,
16,
184,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Postgresql: Store common query as column?
===
Using postgresql, I have a a number of queries that looks like
SELECT <col 1>,<col 2>, (SELECT sum(<col x>) FROM <otherTable>
WHERE <other table foreignkeyCol>=<this table keycol>) AS <col 3> ...
given that the sub-select will be identical in every case, is there a way to store that sub-select as a pseudo-column in the table? Essentially, I want to be able to select a column from table A that is a sum of a specific column from table B where the records are related. Is this possible? | 0 | [
2,
678,
6879,
18,
22402,
45,
1718,
757,
25597,
28,
4698,
60,
800,
3726,
3726,
568,
678,
6879,
18,
22402,
15,
31,
57,
21,
21,
234,
16,
9386,
2829,
30,
1879,
101,
5407,
13,
1,
7771,
137,
1,
15,
1,
7771,
172,
1,
15,
13,
5,
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... |
How to correctly use renderInContext in a completion block?
===
My view/layer hierarchy looks like this:
CustomUIView [A]
|
+--- UIImageView [B]
When the UI is first displayed, view [B] shows a default image (a game board).
In reaction to a user event I create a few `CALayer` objects and add them as sublayers to view `[A]`'s backing layer. I then use them to render an animation, optically changing parts of the game board, because hierarchically they are on top of the image view. This works just fine.
Once the animation completes, I want to take a screenshot of the resulting layer state, set that as the new image of `[B]` and then discard the temporary sublayers before the next move in the game.
My code looks like this:
[CATransaction begin];
[CATransaction setCompletionBlock:^{
UIImage *snapshot = [self.view snapshot];
self.snapshotVIew.image = snapshot;
for (CALayer *tileLayer in tempLayers)
{
[tileLayer removeFromSuperlayer];
}
}];
CAAnimationGroup *animGroup = [CAAnimationGroup animation];
animGroup.animations =@[contentAnimation, zoom];
animGroup.duration = 0.5f;
animGroup.removedOnCompletion = NO;
animGroup.fillMode = kCAFillModeForwards;
for (CALayer* tileLayer in tempLayers)
{
[tileLayer addAnimation:animGroup forKey:nil];
}
[CATransaction commit];
The snapshot method of my custom view is pretty standard:
- (UIImage*) snapshot {
UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, [[UIScreen mainScreen] scale]);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
The problem seems to be that `renderInContext`'s documentation says:
> Renders the receiver and its sublayers into the specified context.
This method renders directly from the layer tree, _ignoring any animations added to the render tree_.
Because of that last highlighted sentence, once the layers have been removed, everything looks as it did before. Apparently, when the completion block runs, the layer tree does not seem to have been updated with the finished animation state, so my screenshot does not take that into account.
How would I go about doing this?
| 0 | [
2,
184,
20,
12044,
275,
16535,
108,
1126,
11969,
19,
21,
5392,
1921,
60,
800,
3726,
3726,
51,
1418,
118,
15187,
14417,
1879,
101,
48,
45,
5816,
5661,
4725,
636,
58,
500,
13,
1,
2754,
8,
8,
8,
13,
5661,
22039,
4725,
636,
220,
500... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pootle, how to disable automatic translation suggestions
===
I am using Pootle as localisation software for big project. My problem is, that every time we change something, some words are automatically translated to wrong texts.
Like we had texts: Ping, Chat, bet.... and those were new texts, and Pootle automatically translated it to all languages, of course completly wrong way. How can I disable this insane translations? I do not want any stupid software to translate, or even suggest wrong texts to well paid human translators.
We tried today to create new project, and we imported all language translations. In export files it is now ok, but when translator wants to translate, it shows him this wrong automatic translation text and in the comment box there is displayed --> Translator comment: 75%.
Now problem is, that translator simply change 1 word and then clicks export. And wualaa.... all texts are automatically corrupted.
Please, help me, which stupid tool is doing such think? how to disable it forever?
| 0 | [
2,
16223,
5866,
15,
184,
20,
1460,
579,
6715,
4064,
18389,
800,
3726,
3726,
31,
589,
568,
16223,
5866,
28,
375,
4330,
2306,
26,
580,
669,
9,
51,
1448,
25,
15,
30,
352,
85,
95,
753,
301,
15,
109,
715,
50,
7499,
4331,
20,
1389,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 play video in java?
===
I want to play a video in java. I have all my videos in encrypted format and whenever I open a webpage it should display list of videos. upto this part it is done I have all the list of videos. but Whatever video I select Should be decrypted first and then it should be played. but i want to decrypt some of the bytes of the video and play it then again next some amount of bytes and play it like video streaming. Can anybody help me with that.. Thanks in advance | 1 | [
2,
184,
20,
418,
763,
19,
8247,
60,
800,
3726,
3726,
31,
259,
20,
418,
21,
763,
19,
8247,
9,
31,
57,
65,
51,
6610,
19,
29403,
2595,
17,
6634,
31,
368,
21,
2741,
6486,
32,
378,
3042,
968,
16,
6610,
9,
71,
262,
48,
141,
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... |
pickled my dictionary but i got a less in size one?
===
here is the thing>>>
i use ZODB and i want to copy my 'database_1.fs' file to another 'database_2.fs'
so i opened the root dictionary of that 'database_1.fs' and i (pickle.dump) it in a Text file
then i (pickle.load) it in a dictionary-variable ,in the end i update the root dictionary of the other 'database_2.fs'with the dictionary-variable.
it works
But
i wonder
why the size of the 'database_1.fs' not equal to the size of the other 'database_2.fs' >>they are still copies of each other
Note:(!) there are persistent dictionaries and lists in the original 'database_1.fs'
(2) both of them have the same length and the same indexes.
| 0 | [
2,
24509,
43,
51,
9186,
47,
31,
330,
21,
787,
19,
1072,
53,
60,
800,
3726,
3726,
235,
25,
14,
584,
1,
31,
275,
9017,
9007,
17,
31,
259,
20,
4344,
51,
13,
22,
18768,
8436,
1,
165,
9,
11754,
22,
3893,
20,
226,
13,
22,
18768,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 build: the file dx.jar was not loaded from the SDK folder
===
i noticed in the "console" box it said "C:\Program Files\Android\android-sdk\\platform-tools\lib" , so it has 2 back slashes \\platform-tools\lib, this was caused by incomplete installation on my part, so it cannot find the "dx.jar" so when i go to export and compile the project app i now get this error that unable to build: the file dx.jar was not loaded from the SDK folder!
Please can anybody help | 0 | [
2,
2343,
20,
1895,
45,
14,
3893,
13,
43,
396,
9,
6300,
23,
52,
8572,
37,
14,
13,
18,
43,
197,
19294,
800,
3726,
3726,
31,
2711,
19,
14,
13,
7,
12124,
6069,
7,
1649,
32,
87,
13,
7,
150,
45,
1,
19746,
6488,
1,
290,
18524,
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... |
Backbone.js Can we not have any tagName?
===
I just started with backbone.js, and one thing that I noticed is that sometimes I do not want any `tagName` to contain/encapsulate my view's template code. If I leave it at `''` or `'span'`, I get unneccessary `div` and `span` in my code.
The alternative that I found is to remove the containing tag from my template (`<div class="photo_box">` in my example as shown below), and use that as the `tagName` in my view. Most of the time, this tag will contain a class (`.photo_box`), and I still have to perform an `addClass` to (this.el). I dont really like scattering up my template code.
Is there another way?
**JS**
// Views
PhotoListView = Backbone.View.extend({
tagName: 'span',
render: function() {
_.each(this.model.models, function(photo) {
$(this.el).append(new PhotoListItemView({ model: photo }).render().el);
}, this);
return this;
}
});
PhotoListItemView = Backbone.View.extend({
tagName: 'span',
template: _.template($('#tpl-PhotoListItemView').html()),
render: function() {
$(this.el).html(this.template( this.model.toJSON() ));
return this;
}
});
**HTML**
<!-- Templates -->
<script type="text/template" id="tpl-PhotoListItemView">
<div class="photo_box">
<div class="photo_container">
<img src="img/profiling/<%= photo_id %>.jpg" class='photo' />
</div>
</div>
</script>
**Result**
<div id="photo_list">
<span>
<span>
<div class="photo_box">
<div class="photo_container">
<img src="img/profiling/f_001.jpg" class="photo">
</div>
</div>
</span>
<span>
<div class="photo_box">
<div class="photo_container">
<img src="img/profiling/f_002.jpg" class="photo">
</div>
</div>
</span>
</span>
</div> | 0 | [
2,
24036,
9,
728,
18,
92,
95,
52,
57,
186,
3383,
7259,
60,
800,
3726,
3726,
31,
114,
373,
29,
24036,
9,
728,
18,
15,
17,
53,
584,
30,
31,
2711,
25,
30,
1030,
31,
107,
52,
259,
186,
13,
1,
8628,
7259,
1,
20,
3717,
118,
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... |
Database Structure for Inconsistent Data
===
I have taken a database class before but have not ran into this kind of problem. I am creating a database for my company that will store many different types of information. The categories are Brightness, Contrast, Chromaticity, ect. Each category has a number of data points which my company would like to start storing. Normally, I would create a table for each category which would store the corresponding data. (This is how I learned to do it). However, Sometimes these categories have "sub-data" which would change the number of fields required in each table. My question is then how do people handle the inconsistency of data when structuring their databases? Do they just keep adding more tables for extra data or is it something else altogether? Thanks | 0 | [
2,
6018,
1411,
26,
22380,
1054,
800,
3726,
3726,
31,
57,
658,
21,
6018,
718,
115,
47,
57,
52,
717,
77,
48,
825,
16,
1448,
9,
31,
589,
2936,
21,
6018,
26,
51,
237,
30,
129,
1718,
151,
421,
2551,
16,
676,
9,
14,
6422,
50,
2113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a production-ready desktop HTML5 runtime?
===
Sometimes I think I want to develop a standalone (needing neither a web server nor a browser to run) desktop GUI application for Windows and Linux using HTML5, CSS and JavaScript to form the GUI.
But as far as I know, both Adobe AIR and Mozilla Prism are deprecated. What are other options for this task? | 0 | [
2,
25,
80,
21,
637,
8,
15193,
17404,
13,
15895,
264,
485,
891,
60,
800,
3726,
3726,
1030,
31,
277,
31,
259,
20,
2803,
21,
26986,
13,
5,
4356,
3258,
3028,
21,
2741,
8128,
2127,
21,
16495,
20,
485,
6,
17404,
9457,
3010,
26,
1936,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
FLEX AS3: Does removing an element/child also remove componets created as part of the skin?
===
General wisdom is when you remove a component from the stage you also need to manually remove all children so they are not floating in memory. Because they are just none visible since the parent container was removed.
Example of this would be a `Label` component inside of a `BorderContainer`. My understanding is you need to remove the `Label` first then the `BorderContainer`.
When you create a component such as `TitleWindow` the default skin for it adds a `closeButton` to the title bar / header.
I added an event listener to the close button. `TitleWindow.closeButton.addEventListener();` In the function called by the close button event i want to close/remove the window.
My question is this. Do i need to manually remove the `closeButton` as a child of the `TitleWindow`? Or do i just remove the listener then remove the `TitleWindow` from the stage and the components created by the skin are automatically removed / garbage collected?
| 0 | [
2,
14409,
28,
240,
45,
630,
9096,
40,
4520,
118,
11287,
67,
4681,
6479,
849,
38,
18,
679,
28,
141,
16,
14,
1188,
60,
800,
3726,
3726,
297,
10482,
25,
76,
42,
4681,
21,
5912,
37,
14,
876,
42,
67,
376,
20,
23671,
4681,
65,
391,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 check if if a UIView is still there?
===
i have to set some custom size parameters to a UIView according to the device orientation. i load the UIView which **has NOT an own viewcontroller** as follows:
in main.h
@property (nonatomic, retain) IBOutlet UIView *socialActionView;
in main.m
@synthesize socialActionView;
.
.
.
socialActionView = [[[NSBundle mainBundle] loadNibNamed:@"SocialActionViewController" owner:self options:nil] objectAtIndex:0];
[self.view addSubview:socialActionView];
if not needed anymore i remove it from the superview with
[self.socialActionView removeFromSuperview];
NSLog(@"%@",self.socialActionView.superview);
the log says (null) after removal
the size adjustments i do like this
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
if ((self.interfaceOrientation == UIDeviceOrientationPortrait) || (self.interfaceOrientation == UIDeviceOrientationPortraitUpsideDown)){
if (self.socialActionView != NULL) {
[self.socialActionView setBounds:CGRectMake(0, 0, 320, 480)];
[self.socialActionView setCenter:CGPointMake(160, 240)];
[self.scroll1 setContentSize:CGSizeMake(320, 600)];
[self.scroll1 setBounds:CGRectMake(0, 0, 320, 428)];
[self.scroll1 setCenter:CGPointMake(160, 266)];
}
} else if((self.interfaceOrientation == UIDeviceOrientationLandscapeLeft) || (self.interfaceOrientation == UIDeviceOrientationLandscapeRight)){
if (self.socialActionView != NULL) {
[self.socialActionView setBounds:CGRectMake(0, 0, 480, 320)];
[self.socialActionView setCenter:CGPointMake(240, 160)];
[self.scroll1 setContentSize:CGSizeMake(480, 600)];
[self.scroll1 setBounds:CGRectMake(0, 0, 480, 268)];
[self.scroll1 setCenter:CGPointMake(240, 186)];
}
}
}
works ok so far until i don´t remove the subview (socialAcitonView) from my main view. cause after that the self.socialActionView is not accessable anymore. i´ve seen a lot of examples here on stackoverflow like
-(IBAction)showPopup:(id)sender {
if(![[self myView] isDescendantOfView:[self view]]) {
[self.view addSubview:[self myView]];
} else {
[[self myView] removeFromSuperview];
}
or
-(IBAction)showPopup:(id)sender
{
if (!myView.superview)
[self.view addSubview:myView];
else
[myView removeFromSuperview];
}
or
if (!([rootView subviews] containsObject:[self popoverView])) {
[rootView addSubview:[self popoverView]];
} else {
[[self popoverView] removeFromSuperview];
}
or
-(IBAction)showPopup:(id)sender {
if([[self myView] superview] == self.view) {
[[self myView] removeFromSuperview];
} else {
[self.view addSubview:[self myView]];
}
}
but none of them works. the debugger always throws an exception cause of bad access. what (from my point of view) means the object does not exist any more. but how can the logger access it after i´ve removed it from the superview and say (null)?
i know it would have been better to give the view an dedicated view controller and put didRotateFromInterfaceOrientation there so i don´t have to check if the socialActionView is there. anyhow i´d like to ask if there is a way how i can check of the UIView is (null) nor not. before i change all my code to a view/viewcontroller couple.
any hints appreciated!
| 0 | [
2,
184,
20,
2631,
100,
100,
21,
13,
5661,
4725,
25,
174,
80,
60,
800,
3726,
3726,
31,
57,
20,
309,
109,
5816,
1072,
12905,
20,
21,
13,
5661,
4725,
496,
20,
14,
3646,
10245,
9,
31,
6305,
14,
13,
5661,
4725,
56,
13,
1409,
6482,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
.NET WebClient 400 error
===
I am doing a HTTP "PUT" using the WebClient class for a JSON string to an Elastic Search. This code works in 95% of the cases but fails for the rest. The error I get is 400 bad protocol in my code. When I post the same JSON using jQuery AJAX or a Chrome extension called Postman, it works flawlessly. I am not sure how to get around this error. My code is below -
string json = "{some json}";
WebClient client = new WebClient();
client.Headers["Content-Type"] = "application/json;charset=UTF-8";
try
{
json = client.UploadString(URL, "PUT", json);
}
catch (WebException ex)
{
//catch exception
} | 0 | [
2,
13,
9,
2328,
2741,
150,
18513,
38,
4353,
7019,
800,
3726,
3726,
31,
589,
845,
21,
7775,
13,
7,
4881,
7,
568,
14,
2741,
150,
18513,
38,
718,
26,
21,
487,
528,
3724,
20,
40,
931,
9428,
2122,
9,
48,
1797,
693,
19,
13,
20371,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
scheduleLocalNotification doesn't work for jailbreak apps?
===
I have an app that calls scheduleLocalNotification, but it doesn't work when I install it to /Applications instead of /var/mobile/Applications:
- (void) doNotify
{
// this doesn't work when app is in /Applications but does in /var/mobile/Applications
UILocalNotification * theNotification = [[UILocalNotification alloc] init];
theNotification.alertBody = @"Finished processing.";
theNotification.alertAction = @"Ok";
theNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:1];
[[UIApplication sharedApplication] scheduleLocalNotification:theNotification];
NSLog(@"notification scheduled: %@", theNotification);
}
I tried presentLocalNotification instead in case it was a timing issue.
I implemented didReceiveLocalNotification in app delegate to see if that was being called instead, but it wasn't, it was only called when app is in foreground like it should.
If I put the app back in /var/mobile/Applications, it works as it should.
I'm using Xcode 4.2.1 and running iOS 5.1.1 on an iPhone 4S and iPod Touch 4g | 0 | [
2,
4345,
15580,
1270,
4634,
1437,
22,
38,
170,
26,
5734,
12008,
4865,
18,
60,
800,
3726,
3726,
31,
57,
40,
4865,
30,
3029,
4345,
15580,
1270,
4634,
15,
47,
32,
1437,
22,
38,
170,
76,
31,
16146,
32,
20,
13,
118,
2552,
20669,
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... |
jQuery UI chained select-menu. Form resets when button is clicked
===
I am using a chained select-menu to guide the visitor trough some questions. This works like a charm, however, in the end the user has to click a button to send all values to a PHP-script. This also works without a problem, however, when the page reloads (because the button sends the form to the same page), all fields are hidden again and this is not what i want.
I would like the chained selection menu's to be shown when items in them are "selected" when the page reloads. Using PHP i simply test if a field was selected and add that status to the select-menu. But they remain hidden until you manually select everything again.
I think it's just a minor adjustment in the JS-part. But my limited knowledge of JS leaves me without a solution.
**Sources**
- [jsFiddle][1]
- [Chainedselection script][2]
- [jQuery UI and selectmenu][3]
[1]: http://jsfiddle.net/XkCsU/
[2]: https://github.com/fnagel/jquery-ui/blob/selectmenu/demos/selectmenu/dependency.html
[3]: https://github.com/fnagel/jquery-ui | 0 | [
2,
487,
8190,
93,
13,
5661,
2858,
69,
5407,
8,
755,
291,
9,
505,
23422,
18,
76,
5167,
25,
15802,
800,
3726,
3726,
31,
589,
568,
21,
2858,
69,
5407,
8,
755,
291,
20,
3378,
14,
10875,
22032,
109,
2346,
9,
48,
693,
101,
21,
7533,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 append lists in prolog?
===
How do I append lists in prolog? I've searched in the internet and I found this (from http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_7.html)
append([X|Y],Z,[X|W]) :- append(Y,Z,W).
append([],X,X).
So it gets the Z by removing the elements of [X|Y] in [X|W]. But how do I append two lists together?
Example,
**appendlist([1,2],[3,4,5],X).** The result will be **X = [1,2,3,4,5].**
Also I don't know what happening in the recursion. (I traced it but didn't understand) | 0 | [
2,
184,
107,
31,
4865,
2451,
7227,
19,
895,
5567,
60,
800,
3726,
3726,
184,
107,
31,
4865,
2451,
7227,
19,
895,
5567,
60,
31,
22,
195,
9036,
19,
14,
2620,
17,
31,
216,
48,
13,
5,
2665,
7775,
6903,
6483,
9,
150,
1666,
1638,
139... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Azure role configuration management
===
I don't see how Windows Azure lets you vary the configuration of an application when you have no choice but to hold configuration settings in web.config (or app.config).
For example...
Quite often projects will make use of a 3rd party library that makes heavy use of web.config. The use of web.config may involve connection strings, app settings or custom configuration sections. A good example of this is ELMAH. A web.config file for ELMAH might look like the following:
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
</sectionGroup>
</configSections>
<connectionStrings>
<add
name="MyElmahDatabase"
providerName="System.Data.SqlClient"
connectionString="Server=tcp:myServer.database.windows.net,1433;Database=myDB;User ID=user@myServer;Password=password;Trusted_Connection=False;Encrypt=True;Connection Timeout=30" />
</connectionStrings>
<elmah>
<security allowRemoteAccess="1" />
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="MyElmahDatabase" />
</elmah>
</configuration>
There are a couple of problems here:
- There is no way for me to update or vary whether remote access is enabled between Service Configurations.
- There is no way for me to update or vary the ELMAH connection string between Service Configurations.
This is because the web.config is packaged as is into the .cspkg file and ELMAH will not look at the Service Configuration settings (which are the only way I can vary configuration settings between Service Configurations).
I can think of many other examples where this is a problem...
- Any data access frameworks that look directly at the connection strings section.
- Any custom configuration settings I need to create.
...to name just two.
Am I missing something or is this a significant gap in the configuration management offered by Windows Azure? | 0 | [
2,
25715,
597,
8091,
1097,
800,
3726,
3726,
31,
221,
22,
38,
196,
184,
1936,
25715,
6884,
42,
7392,
14,
8091,
16,
40,
3010,
76,
42,
57,
90,
1837,
47,
20,
1027,
8091,
12410,
19,
2741,
9,
14093,
2816,
13,
5,
248,
4865,
9,
14093,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
The security protocol cannot verify the incoming message?
===
i develop a application security wcf use Message mode:
<security mode="Message">
<message clientCredentialType="UserName" negotiateServiceCredential="true"/>
</security>
it's run on local machine good, but when i run it to a pc other it notifice error:
> The security protocol cannot verify the incoming message
use tracing i see:
> <Message>The security timestamp is invalid because its creation time
> ('2012-07-17T21:08:43.211Z') is in the future. Current time is
> '2012-07-17T07:08:48.769Z' and allowed clock skew is
> '00:05:00'.</Message>
what is problem? thanks
| 0 | [
2,
14,
1221,
8494,
1967,
21012,
14,
17126,
2802,
60,
800,
3726,
3726,
31,
2803,
21,
3010,
1221,
11801,
410,
275,
2802,
3740,
45,
13,
1,
17749,
3740,
3726,
7,
3845,
18,
1303,
7,
1,
13,
1,
3845,
18,
1303,
6819,
6037,
43,
10107,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
TinyMCE stripping spans
===
TinyMCE is stripping out spans using the following configuration:
tinyMCE.init({
mode : "specific_textareas",
theme_advanced_resizing_min_width : 550,
editor_selector : /(tiny_mce|image_mce)/,
theme : "advanced",
editor_deselector : "mceNoEditor",
body_class : "cms",
content_css : "/css/content.css",
plugins : "safari, inlinepopups, paste, table",
file_browser_callback : "tinyBrowser",
width : 640,
height : 500,
paste_auto_cleanup_on_paste : true,
theme_advanced_buttons1 : "bold, italic, underline, justifyleft,justifycenter, justifyright, justifyfull , formatselect, |, pasteword ,pastetext, code ",
theme_advanced_buttons2 : "undo,redo,|,bullist, numlist,| , outdent,indent, |, link, unlink, image, forecolor",
theme_advanced_buttons3 : "tablecontrols",
theme_advanced_resizing : true,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_statusbar_location : "bottom",
theme_advanced_blockformats : "p,h2,h4",
convert_urls : false,
verify_html : true,
valid_elements : "@[class|style|title],br,h2,h3,h4,-p[align],-strong/b,a[name|href|target]," +
"img[src|border=0|alt|width|height|align],hr[width|size|noshade],-em/i,-span" +
"table[border|cellspacing|cellpadding|width],tr[rowspan],td[colspan],th[colspan],-ul,-ol,-li"
});
The spans in question are created with the 'forecolor' button and look like this `<span style="color: rgb(0, 255, 0); ">foo</span>`.
Any ideas would be great. | 0 | [
2,
3228,
79,
1105,
25105,
16967,
800,
3726,
3726,
3228,
79,
1105,
25,
25105,
70,
16967,
568,
14,
249,
8091,
45,
3228,
79,
1105,
9,
108,
242,
5,
1,
3740,
13,
45,
13,
7,
9219,
1,
11969,
17760,
18,
7,
15,
3184,
1,
1283,
2686,
110... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Specifying Roles in web.config of an asp.net MVC application
===
I am creating an MVC application with forms auth. I am authenticating against active directory and so have created a custom RoleProvider. My application is only concerned with a small set of roles which up until now I have been defining in the appSettings section of my web.config:
<appSettings>
<add key="DirectorRole" value="Domain\Directors" />
<add key="ManagementRole" value="Domain\Managers" />
...
</appSettings>
However I have run into a couple of problems with this approach:
1. I cannot reference these setting in my contoller data annotations: `[Authorize(Roles = ConfigurationManager.AppSettings["DirectorRole"])]` as it wont compile so I have to specify the name of the group again: `[Authorize(Roles = "Domain\\Directors")]`.
2. In my web.config, I would like to specify the groupsToUse for my role provider and just reference a pre-existing list, rather than maintain two seperate lists of the same set of roles.
It seems that there must be a better/reusable way to define the roles in the web.config, can someone point me in the right direction please? | 0 | [
2,
19077,
68,
2954,
19,
2741,
9,
14093,
2816,
16,
40,
28,
306,
9,
2328,
307,
8990,
3010,
800,
3726,
3726,
31,
589,
2936,
40,
307,
8990,
3010,
29,
1997,
10343,
96,
9,
31,
589,
14351,
1880,
149,
1348,
16755,
17,
86,
57,
679,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery: Selecting a option value and make the checkbox name follow
===
This is my goal, this is only static though:
http://jsfiddle.net/ySu7q/
I wish to make this dynamic, so the related checkbox below follow what value you have chosen in the select box.
I would like to do when you select in the current '18:00' select box, and change it to another e.g 19:00 - then the checkbox below should follow and change to 1900 both the display text and the name should be changed from `copyTime[1][1800]` to `copyTime[1][1900]`
How can I do this? I have no clue where to start, maybe the structure of the current code should be rewritten to make it possible?
Thanks alot | 0 | [
2,
487,
8190,
93,
45,
20764,
21,
4255,
1923,
17,
233,
14,
2631,
5309,
204,
1740,
800,
3726,
3726,
48,
25,
51,
1195,
15,
48,
25,
104,
12038,
362,
45,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
93,
1666,
465,
1251,
118,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Nslog imagename in iphone
===
i have an NSArray with images. Image names is A,B,C,D. I need to NSlog the names of these images from the array
NSLog(@"Name== %@", [Array Objectatindex:1]);
What i have to use instead of this. Thanks in advance. | 0 | [
2,
13,
2172,
5567,
1961,
7259,
19,
21024,
800,
3726,
3726,
31,
57,
40,
13,
103,
4964,
2787,
29,
3502,
9,
1961,
1817,
25,
21,
15,
220,
15,
150,
15,
43,
9,
31,
376,
20,
13,
2172,
5567,
14,
1817,
16,
158,
3502,
37,
14,
7718,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to Capture and Upload Video in windows phone?
===
My application requirement is Capture camera video and upload to (Facebook , Youtube) simultaneously.
My question is can we get the camera stream and buffer and then upload while capturing is still in progress ?
I am now able to get capture video and store in isolated storage, but with out saving to isolated storage can we upload directly ?
If yes then how ?
-Romesh | 0 | [
2,
184,
20,
3683,
17,
71,
8294,
763,
19,
1936,
1132,
60,
800,
3726,
3726,
51,
3010,
8981,
25,
3683,
3336,
763,
17,
71,
8294,
20,
13,
5,
6413,
5199,
13,
15,
7330,
6,
6888,
9,
51,
1301,
25,
92,
95,
164,
14,
3336,
3766,
17,
174... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 prevent a static domain serving non static content?
===
I have set up a static domain alias to serve static content without cookies, however as this is just an alias of the main domain I'm concerned that if it gets linked to inadvertently then it might be indexed. I would like to prevent the static domain alias from serving anything but CSS, JS, JPG, GIF files etc by way of a conditional in the main site .htaccess file.
i.e. something like:
If domain name includes the term 'static' then redirect all requests for files 'not' ending with .css, .js etc to the parent domain.
Any ideas? | 0 | [
2,
184,
20,
2501,
21,
12038,
4603,
1799,
538,
12038,
2331,
60,
800,
3726,
3726,
31,
57,
309,
71,
21,
12038,
4603,
15794,
20,
1884,
12038,
2331,
366,
19396,
15,
207,
28,
48,
25,
114,
40,
15794,
16,
14,
407,
4603,
31,
22,
79,
3518... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Generate a log file from Perforce to use with Gourse
===
I am trying to generate a perforce log file using awk, which can then in turn be used with [Gource][1].
Gource allows you to generate an animation of a file/project revision history.
I tried following the examples [here][2] but they will not work for my depot (although they work for the adobe one!)
I also tried the script on the page [here][3] which says,
p4 changes //depot/path_to_files/|awk '{print $2}'|p4 -x - describe -s|awk '(/^Change / || /^... /) {if ($1 == "Change") {u=substr($4,1,index($4,"@")-1); t = $(NF-1) " " $NF; gsub("/"," ",t); gsub(":"," ",t);mktime(t);} else {if ($NF=="add") {c="A";} else if ($NF=="delete") {c="D";} else {c="M";};f=substr($2,3,index($2,"#")-3);print time "|" u "|" c "|" f;}}'|sort -n
but I get an
"**awk: line 0(NR=1): variable "mktime" cannot be used as a function**"
error.
If anybody has an idea what's going wrong I'd like to hear from you !
[1]: http://code.google.com/p/gource/
[2]: http://blog.ruslans.com/2010/01/code-opera-using-gource-to-watch-story.html
[3]: http://code.google.com/p/gource/wiki/CustomLogFormat
| 0 | [
2,
7920,
21,
6738,
3893,
37,
416,
8774,
20,
275,
29,
12775,
21245,
800,
3726,
3726,
31,
589,
749,
20,
7920,
21,
416,
8774,
6738,
3893,
568,
13,
3885,
197,
15,
56,
92,
94,
19,
805,
44,
147,
29,
636,
839,
911,
1105,
500,
2558,
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... |
getHttpResponseCode() returns -1 in android 2.2
===
In my android app, I am trying to pull data from server by doing a POST request.
I'm using `HttpURLConnection` class to make the requests as Apache's `HttpClient` is no longer maintained by android.
Here's what I'm doing.
private boolean callWS() {
try {
// To avoid the bug in httpurlconnection prior froyo which
// causes the getInputStream to return headers along with response
if (Build.VERSION.SDK_INT < 8)
System.setProperty("http.keepAlive", "false");
mHttpResponseCode = 0;
mErrorMessage = "";
// Initialize connection
URL connectURL = new URL(mServerUrl);
HttpURLConnection conn = (HttpURLConnection) connectURL.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setInstanceFollowRedirects(true);
conn.setReadTimeout(30000);
conn.setConnectTimeout(15000);
conn.setRequestMethod("POST");
// Set some headers
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestProperty("Accept-Encoding", "deflate, gzip");
connection.setRequestProperty("Content-Length", mParameters.length() + "");
// Connect to host
conn.connect();
// Write parameters to connection
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(mParameters);
writer.flush();
writer.close();
// Wait for http response code
mHttpResponseCode = conn.getResponseCode();
// Read response from connection
BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
ByteArrayBuffer baf = new ByteArrayBuffer(50);
int read = 0;
int bufSize = 1024;
byte[] buffer = new byte[bufSize];
while (true) {
read = bis.read(buffer);
if (read == -1)
break;
baf.append(buffer, 0, read);
}
// Decompress gzipped response
if (conn.getHeaderField("Content-Encoding") != null && conn.getHeaderField("Content-Encoding").contains("gzip"))
mResponseString = decompress(baf.toByteArray());
else
mResponseString = new String(baf.toByteArray());
mResponse.setResponse(mResponseString);
isWSCallSuccessfull = true;
}
catch(UnknownHostException unknownHostException) {
isWSCallSuccessfull = false;
mErrorMessage = "Unknown host exception";
unknownHostException.printStackTrace();
mLogger.putStacktrace(unknownHostException);
}
catch(SocketException socketException) {
isWSCallSuccessfull = false;
mErrorMessage = "Socket Exception";
socketException.printStackTrace();
mLogger.putStacktrace(socketException);
}
catch(SocketTimeoutException socketTimeOutException) {
isWSCallSuccessfull = false;
mErrorMessage = "Socket Timeout Exception";
socketTimeOutException.printStackTrace();
mLogger.putStacktrace(socketTimeOutException);
}
catch(SSLException sslException) {
isWSCallSuccessfull = false;
mErrorMessage = "SSL Exception";
sslException.printStackTrace();
mLogger.putStacktrace(sslException);
}
catch(IOException ioException) {
isWSCallSuccessfull = false;
mErrorMessage = "IO Exception " + ioException.getMessage();
ioException.printStackTrace();
mLogger.putStacktrace(ioException);
}
mResponse.setHttpResponseCode(mHttpResponseCode);
mResponse.setErrorMessage(mErrorMessage);
mResponse.isWSCallSuccessful(isWSCallSuccessfull);
return isWSCallSuccessfull;
}
This works fine on every device except devices running 2.2 (did not try it on 2.1).
In 2.2, it works fine. But if I leave this part of code idle for more than 30s, it returns me with -1 as http response code the very next time.
Another thing to note is that this happens only with HTTPS urls and not with HTTP Urls. I do not want to use HttpsURLConnection class because at times I may want to use http as well. (I'm not sure what I'm saying is right).
I'm not closing the connection just to keep the connection alive. What am I doing wrong? | 0 | [
2,
164,
21127,
99,
18,
8782,
870,
9375,
5,
6,
4815,
13,
8,
165,
19,
13005,
172,
9,
135,
800,
3726,
3726,
19,
51,
13005,
4865,
15,
31,
589,
749,
20,
2201,
1054,
37,
8128,
34,
845,
21,
678,
3772,
9,
31,
22,
79,
568,
13,
1,
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... |
Pentaho ETL vs Jasper ETL
===
Well, thinking to use ETL tool for data migration as there are many available but currently looking at Pentaho and Jasper but confused that which ETL tool to choose between two and why? Does anyone knows the advantages and disadvantages of both? | 4 | [
2,
11734,
58,
1807,
2133,
255,
4611,
16750,
2133,
255,
800,
3726,
3726,
134,
15,
1440,
20,
275,
2133,
255,
5607,
26,
1054,
8443,
28,
80,
50,
151,
904,
47,
871,
699,
35,
11734,
58,
1807,
17,
16750,
47,
4230,
30,
56,
2133,
255,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.