unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Powershell and HtmlAgilityPack
===
I have some screen scraping I need to do using Powershell and ran across this article
http://www.leeholmes.com/blog/2010/03/05/html-agility-pack-rocks-your-screen-scraping-world/
And wanted to get a quick demo up and running. However, I'm running into a snag right away and not sure why it's failing.
The code is below:
add-type -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
Right away, I get the following error:
PS C:\TEMP\HtmlAgilityPack\Net20> add-type -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
Add-Type : Could not load file or assembly 'file:///C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cann
ot be loaded.
At line:1 char:9
+ add-type <<<< -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand
| 0 | [
2,
414,
15984,
17,
13,
15895,
3302,
20901,
8573,
800,
3726,
3726,
31,
57,
109,
2324,
25611,
31,
376,
20,
107,
568,
414,
15984,
17,
717,
464,
48,
2002,
7775,
6903,
6483,
9,
4716,
25300,
18,
9,
960,
118,
220,
5567,
118,
2751,
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... |
catch UnicodeDecodeError
===
very often I have the following problem: I write a program that processes many files which it assumes to be encoded in utf-8. Then, some day, I there is a non-utf-8 character in one of several hundred or thousand (new) files. The program exits with an error message like this:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 60: invalid continuation byte
I usually solve the problem by moving files around and by recoding them.
What I really want to do is use something like
try:
# open file, read line, or do something else, I don't care
except UnicodeDecodeError:
sys.exit("Found a bad char in file " + file + " line " + str(line_number)
Yet, no matter where I put this try-except, it doesn't work.
How should I use try-except with UnicodeDecodeError?
| 0 | [
2,
2949,
28010,
546,
9375,
29992,
800,
3726,
3726,
253,
478,
31,
57,
14,
249,
1448,
45,
31,
2757,
21,
625,
30,
5102,
151,
6488,
56,
32,
18719,
20,
44,
13665,
19,
287,
11720,
8,
457,
9,
94,
15,
109,
208,
15,
31,
80,
25,
21,
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... |
Event Receiver for lookup column value added should be updated in another column in same Sharepoint list
===
I am having the list named "XXX". In that list i have two columns named Status, which is the choice column and StatusLookup, which is lookup column. The both column should have the same choices values namely Open, Pending Approval, Cancelled. If add new item in sharepoint list, if i choose "Open" in Status column it should be automatically updated in StatusLookup column without any manual entry.
I need to know whether there is any way to update the StatusLookup column by choosing the value in Status column in Sharepoint list by using Event Receivers?
Can you please reply me as soon as possible?
Thanks,
Sugu..... | 0 | [
2,
807,
6264,
26,
361,
576,
4698,
1923,
905,
378,
44,
6372,
19,
226,
4698,
19,
205,
1891,
3132,
968,
800,
3726,
3726,
31,
589,
452,
14,
968,
377,
13,
7,
13290,
7,
9,
19,
30,
968,
31,
57,
81,
7498,
377,
1782,
15,
56,
25,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to getItmes from sqlite data base calling the method in any other class instead of appDelegate in iphone
===
I have getQuestions method in QuestionData like the following signature i want that
user may call this function in other class except appDelagate how to call this there becuase getDBPath is declared in appDelegate..
how to access this method in any other class
[QuestionData getQuestions:[self getDBPath]];
+ (void)getQuestions:(NSString*)dbPath{
| 0 | [
2,
184,
20,
164,
242,
3845,
37,
4444,
10601,
1054,
1000,
2555,
14,
2109,
19,
186,
89,
718,
700,
16,
4865,
24249,
3322,
19,
21024,
800,
3726,
3726,
31,
57,
164,
24652,
18,
2109,
19,
1301,
18768,
101,
14,
249,
7810,
31,
259,
30,
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... |
documentcookie + escape + space
===
Am setting a cookie like below, in one jsp page.
document.cookie = cookieName+"="+escape("#{myBean.cookieValue}");
And am retrieving cookie value in my target jsp page using request.getCookies();
Am getting the value of cookie in my target jsp page. But, the value being set in the cookie contains Space like 31st July 2012. So, when I print this cookie value in my target JSP page, am getting 31st%20July%202012.
In my target JSP page I just want to show the exact initial value like 31st July 2012.
How can I achieve this?
Regards,
Vikas | 0 | [
2,
4492,
716,
17391,
2754,
2220,
2754,
726,
800,
3726,
3726,
589,
2697,
21,
19980,
101,
1021,
15,
19,
53,
487,
3401,
2478,
9,
4492,
9,
716,
17391,
800,
19980,
7259,
2430,
7,
3726,
7,
2430,
62,
13109,
5,
7,
5910,
1,
915,
863,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
FB Open Graph multiple objects
===
i try work with Open Graph api but i have a problem. I need to post next message to FB timeline: User watching [TV Show] and commented [Comment] via [AppName]. Is it possible do that with graph api? Any one already implement multiple objects for same action? | 0 | [
2,
13,
13478,
368,
7210,
1886,
3916,
800,
3726,
3726,
31,
1131,
170,
29,
368,
7210,
21,
2159,
47,
31,
57,
21,
1448,
9,
31,
376,
20,
678,
328,
2802,
20,
13,
13478,
18398,
45,
4155,
1953,
636,
1709,
298,
500,
17,
5973,
636,
960,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Service Bus Free Trial
===
I have registered, a week ago, for trying windows azure free for 3 months. However I cannot seem to find a menu option for Service Bus or Access Control to create service bus queues and topics. Are these not offered as part of the free trial? I read somewhere that service bus was part of the free trial only upto May 31st, 2012. Is this true?
Is there any other way to test for free using service bus queues and topics. | 2 | [
2,
25715,
365,
1683,
551,
2178,
800,
3726,
3726,
31,
57,
3801,
15,
21,
877,
1464,
15,
26,
749,
1936,
25715,
551,
26,
203,
818,
9,
207,
31,
1967,
2260,
20,
477,
21,
11379,
4255,
26,
365,
1683,
54,
1381,
569,
20,
1600,
365,
1683,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 cahnge the color of the text of the default ListView in android?
===
I have a default ListView from android say **android.R.layout.simple_list_item_1**.In which ListView having the background color black and text of the list is white.
Now i have changed the background color of the ListView to White. So the text poputating on the listView are also of white color by default. That's why the data of the ListView are not visible.
The text which are populating on the ListView is the arraylist. So where I set the color of the text of ListView?? I want to change the **Text color** populated on the **ListView**.
Can anybody tell whether it is possible without custom ListView. | 0 | [
2,
184,
20,
1658,
5905,
834,
14,
1665,
16,
14,
1854,
16,
14,
12838,
968,
4725,
19,
13005,
60,
800,
3726,
3726,
31,
57,
21,
12838,
968,
4725,
37,
13005,
395,
13,
1409,
290,
18524,
9,
139,
9,
4414,
1320,
9,
24629,
1,
5739,
1,
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... |
Maintaining iOS app for different countries in one Git repository
===
Our team released an app in China and right now we are going to add lot's of new features and release it in many other countries too.
The problem is that it's hardly possible to localize it inside of one app - it's a language learning app, with a language-dependent pre-populated database, different social networks and other stuff, so we decided to release different apps for different countries. Is this a right(or at least possible - i mean, will Apple approve it) approach?
If it is, then how can we maintain different version of app for different countries in one repository, while working on the core features?
What kind of branching will do?
Thanks! | 0 | [
2,
8215,
13,
7760,
4865,
26,
421,
1166,
19,
53,
13,
10404,
24869,
800,
3726,
3726,
318,
173,
261,
40,
4865,
19,
998,
17,
193,
130,
95,
50,
228,
20,
3547,
865,
22,
18,
16,
78,
967,
17,
830,
32,
19,
151,
89,
1166,
266,
9,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to use selectionListener="#{bindings.Products.collectionModel. makeCurrent}" programmatically?
===
i am using custom selection listener in a adf table component.so how can i invoke `selectionListener="#{bindings.Products.collectionModel. makeCurrent}"` programmatically to get selected rows/keys? | 0 | [
2,
184,
20,
275,
3155,
13891,
106,
3726,
7,
5910,
1,
22260,
18,
9,
14086,
18,
9,
15015,
872,
13998,
9,
233,
17657,
1,
7,
625,
6732,
1326,
60,
800,
3726,
3726,
31,
589,
568,
5816,
3155,
21772,
19,
21,
21,
8736,
859,
5912,
9,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting rid of version from JAR file in Maven POM?
===
In pom.xml, I've below entry which I'm using to create a JAR
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>se.sigma.educational</groupId>
<artifactId>my-jar</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>Executable jar example</name>
....
Here, everything works fine & JAR gets created with name "my-jar-1.0.jar". Is there a way that I can create the JAR file name as "my-jar.jar" instead of having version within the name??? I tried removing <version> attribute but then the pom.xml fails to run.
Any help is much appreciated, how do I get rid of version from the JAR file name?
Thanks! | 0 | [
2,
1017,
6681,
16,
615,
37,
5112,
3893,
19,
1216,
3124,
16214,
60,
800,
3726,
3726,
19,
16214,
9,
396,
8184,
15,
31,
22,
195,
1021,
2792,
56,
31,
22,
79,
568,
20,
1600,
21,
5112,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Haskell: Partial type signature
===
Consider the following:
import Network.HTTP.Conduit
main = do
print ((parseUrl "http://stackoverflow.com") :: Maybe a)
[`parseUrl`][1] returns `Failure HttpException m => m (Request m')`
It's documentation says:
> Since this function uses `Failure`, the return monad can be anything
> that is an instance of `Failure`, such as `IO` or `Maybe`.
However, when I try to force `parseUrl` to use `Maybe`, I get the following error:
main.hs:9:11:
Couldn't match type `a' with `Request m'0'
`a' is a rigid type variable bound by
an expression type signature: Maybe a at main.hs:9:10
Expected type: Maybe a
Actual type: Maybe (Request m'0)
In the return type of a call of `parseUrl'
In the first argument of `print', namely
`((parseUrl "http://stackoverflow.com") :: Maybe a)'
Is there anyway to force the type to `Maybe` without specifying the full exact type? Answers including GHC extensions are fine.
[1]: http://hackage.haskell.org/packages/archive/http-conduit/1.5.0.3/doc/html/Network-HTTP-Conduit.html#v:parseUrl
| 0 | [
2,
63,
16507,
45,
7284,
1001,
7810,
800,
3726,
3726,
3563,
14,
249,
45,
9010,
982,
9,
21127,
9,
1126,
43,
11193,
407,
800,
107,
4793,
13,
5,
5,
3574,
18,
5630,
255,
13,
7,
21127,
6903,
25325,
2549,
9990,
9,
960,
7,
6,
13,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Updating Windows C# Program with installer
===
I created a small simple Windows program in Visual Studio, the i added a Setup project to the solution.
Now i can install my program, and when i update something in the Windows program i can quickly build a new installer, however i got 1 problem.
My windows program contains a settings file and when i Uodate/Reinstall my settings file is reset, How can this be avoided, i want to be able to update my program from a setup file without resetting the settings file ?
So anyone plz help me or point the right direction :) | 0 | [
2,
71,
43,
1880,
1936,
272,
5910,
625,
29,
16146,
106,
800,
3726,
3726,
31,
679,
21,
284,
1935,
1936,
625,
19,
3458,
1120,
15,
14,
31,
905,
21,
18161,
669,
20,
14,
4295,
9,
130,
31,
92,
16146,
51,
625,
15,
17,
76,
31,
11100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which adapter choose?
===
I have two methods which read the same data from database, the first returns cursor and the second returns List of objects.Now I show my items in activity using SimpleCursorAdapter and the first method, byt I can also use the second method and appropriate adapter.
Which of these two ways is beter to use and in the second way which adapter I should use?
P.S sorry for poor english | 0 | [
2,
56,
9924,
106,
3538,
60,
800,
3726,
3726,
31,
57,
81,
3195,
56,
1302,
14,
205,
1054,
37,
6018,
15,
14,
64,
4815,
29588,
17,
14,
153,
4815,
968,
16,
3916,
9,
1387,
31,
298,
51,
3755,
19,
2358,
568,
1935,
4734,
18,
248,
27576... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RESTful Service not working for multiple calls
===
I have created a Restful Service which accepts input xml and outputs response xml. Before giving output xml it calls Web Service and gets the xml from it. I do some modifications to the xml and output it.
The client reports that when they do load testing, sometimes the response comes properly and sometimes does not from RESTful Service.
How can I do load testing with JMeter and find the loophole in it. This happens for multiple calls. | 0 | [
2,
760,
1566,
365,
52,
638,
26,
1886,
3029,
800,
3726,
3726,
31,
57,
679,
21,
760,
1566,
365,
56,
16548,
6367,
23504,
17,
5196,
18,
1627,
23504,
9,
115,
1438,
5196,
23504,
32,
3029,
2741,
365,
17,
3049,
14,
23504,
37,
32,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Efficient conversion from SDL_Surface to QPixmap
===
I need to extract pixel information and populate a QPixmap to be used in my Qt program.
I am currently doing this in a 2-step process.
- SDL_Surface to Windows .bmp using `SDL_SaveBMP()`
- .bmp to QImage
- QImage to QPixmap
I am storing the intermediate .bmp in memory. But overall, I am not happy with this approach because it involves file-format conversion overheads related to .bmp
Any better suggestion? | 0 | [
2,
8243,
6263,
37,
13,
18,
8643,
1,
18830,
20,
2593,
18321,
15022,
800,
3726,
3726,
31,
376,
20,
10962,
18146,
676,
17,
1675,
12383,
21,
2593,
18321,
15022,
20,
44,
147,
19,
51,
2593,
38,
625,
9,
31,
589,
871,
845,
48,
19,
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... |
Disabling Client Side Validation For Disabled Input Controls In ASP.NET MVC using MicrosoftMVCJqueryValidation.js
===
I am using MicrosoftMVCJqueryValidation.js and want to
Disable Client Side Validation For Disabled Input Controls. | 0 | [
2,
1460,
58,
8599,
6819,
270,
27999,
26,
10154,
6367,
8671,
19,
28,
306,
9,
2328,
307,
8990,
568,
7099,
79,
8990,
728,
8190,
93,
18506,
43,
857,
9,
728,
18,
800,
3726,
3726,
31,
589,
568,
7099,
79,
8990,
728,
8190,
93,
18506,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
How to see facebook API logs
===
Some users cant log in and I want to access the `logs` files and see why, but how to do that ?
I'm using the **javascript SDK**.
| 0 | [
2,
184,
20,
196,
9090,
21,
2159,
18893,
800,
3726,
3726,
109,
3878,
2973,
6738,
19,
17,
31,
259,
20,
1381,
14,
13,
1,
5567,
18,
1,
6488,
17,
196,
483,
15,
47,
184,
20,
107,
30,
13,
60,
31,
22,
79,
568,
14,
13,
1409,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Inherit backbone attributes from parent model
===
If i have this model:
var myParentModel = Backbone.Model.extend({
defaults:{ parent1: null,
parent2: null}
)};
and i have another model:
var myModel = myParentModel.extend({
defaults: {child1: null,
child2: null}
)};
if i instanciate a new myModel:
var mymodel = new myModel({child1: 'mychild1'});
In the attributes property i only have set to default the child2 property, how is the implementation to inherit the parents property of the parent model?
| 0 | [
2,
17569,
24036,
13422,
37,
4766,
1061,
800,
3726,
3726,
100,
31,
57,
48,
1061,
45,
4033,
51,
18908,
13998,
800,
24036,
9,
13998,
9,
1706,
1316,
43,
5,
1,
12838,
18,
45,
1,
4766,
165,
45,
16203,
15,
4766,
135,
45,
16203,
1,
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... |
Grails params encoding
===
I have 1 problem with params encoding, when i try request (method get) with param like q
example:
q=%31%1223%123%
when i render it a get:
�V�▒č
how to fix it ?
Thanks & bb | 0 | [
2,
489,
7301,
18,
2258,
79,
18,
19608,
800,
3726,
3726,
31,
57,
137,
1448,
29,
2258,
79,
18,
19608,
15,
76,
31,
1131,
3772,
13,
5,
5909,
1807,
43,
164,
6,
29,
2258,
79,
101,
2593,
823,
45,
2593,
3726,
11881,
240,
2339,
918,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can anyone help to figure out how to upload a file to window azure server using objective c.
===
I want to upload a file to window azure storage using accountkey and account name. Can anyone help me to achieve this in objective c.
Thanks RCJ | 0 | [
2,
92,
1276,
448,
20,
1465,
70,
184,
20,
71,
8294,
21,
3893,
20,
1463,
25715,
8128,
568,
7038,
272,
9,
800,
3726,
3726,
31,
259,
20,
71,
8294,
21,
3893,
20,
1463,
25715,
4326,
568,
2176,
4237,
17,
2176,
204,
9,
92,
1276,
448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
CFBuilder 2 insert closing tag does not work
===
I am using CFBuilder 2 (free version) and the insert closing tag functionality does not seem to work.
Here are my settings:-
<img src="http://content.screencast.com/users/sbaynes/folders/Jing/media/03d38e00-e03e-4b3b-a511-4c4143d778e8/2012-06-29_1249.png" />
Now if I type in a new openning tag e.g. `<cfscript>` I never get the closing tag. Am I misunderstanding what it is supposed to do or is there some other setting I should be changing?
This worked well in cfeclipse and so is incredibly frustrating.
Thanks. | 0 | [
2,
10084,
20904,
172,
14692,
4239,
3383,
630,
52,
170,
800,
3726,
3726,
31,
589,
568,
10084,
20904,
172,
13,
5,
4639,
615,
6,
17,
14,
14692,
4239,
3383,
18548,
630,
52,
2260,
20,
170,
9,
235,
50,
51,
12410,
45,
8,
13,
1,
1660,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Example to use xmltodict module in python
===
I have downloaded the xmltodict module in python
Now I have no idea as to how to use it. The thing is I have a text file which has all the data in xml format. Now I need to convert this into json format.
How do i do it?
Any example for this? | 0 | [
2,
823,
20,
275,
23504,
262,
16315,
12613,
19,
20059,
800,
3726,
3726,
31,
57,
23887,
14,
23504,
262,
16315,
12613,
19,
20059,
130,
31,
57,
90,
882,
28,
20,
184,
20,
275,
32,
9,
14,
584,
25,
31,
57,
21,
1854,
3893,
56,
63,
65,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom adapter view not updating correctly
===
Ok, I have a custom AdapterView. Whenever I detect a long click, I call a method to change a custom editable status.
public void setEditing(boolean editing) {
this.editing = editing;
//Set editing to children
for (int i=0; i < getChildCount(); i++){
((PresentationPickerGalleryCellView)getChildAt(i)).setEditing(editing);
if (editing == true)
getChildAt(i).setVisibility(View.INVISIBLE);
//((PresentationPickerGalleryCellView)getChildAt(i)).deleteImageButton.setVisibility(View.VISIBLE);
}
}
It's executed in the main thread as far as I am concerned.
Now, if I call:
getChildAt(i).setVisibility(View.INVISIBLE);
It hides the whole view **correctly** when editing==true. But if I call:
((PresentationPickerGalleryCellView)getChildAt(i)).deleteImageButton.setVisibility(View.VISIBLE);
The deleteImageButton is a button inside the cell. **It won't show the deleteImageButton at all**. I tried invalidate, postInvalidate, layout, requestLayout, refreshDrawableState, but nothing...
Any ideas?
| 0 | [
2,
5816,
9924,
106,
1418,
52,
71,
43,
1880,
12044,
800,
3726,
3726,
5854,
15,
31,
57,
21,
5816,
9924,
106,
4725,
9,
6634,
31,
9092,
21,
175,
10840,
15,
31,
645,
21,
2109,
20,
753,
21,
5816,
9392,
579,
1782,
9,
317,
11364,
309,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple user input sanitization
===
I am using Server.HttpEncode(), and HttpDecode() in order to sanitize user form input, as well as having the server throw an exception when a "potentially dangerous" input is detected.
(Data is then saved to an MSSQL database)
Is this considered enough to stop SQL / Javascript injection and similar? | 0 | [
2,
1935,
4155,
6367,
523,
242,
1829,
800,
3726,
3726,
31,
589,
568,
8128,
9,
21127,
219,
9375,
5,
6,
15,
17,
7775,
546,
9375,
5,
6,
19,
389,
20,
523,
242,
2952,
4155,
505,
6367,
15,
28,
134,
28,
452,
14,
8128,
3814,
40,
5391,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why should I indicate System.Web before HttpContext.Current?
===
#Context
I'm in a controller.
I use the namespace `System.Web` :
using System.Web;
When I call `HttpContext.Current`, VS alerts me that `Current` isn't defined in `HttpContextBase` :
HttpContext.Current.Session["currentUser"];
If I indicate `System.Web` before `HttpContext.Current`, it works :
System.Web.HttpContext.Current.Session["currentUser"];
#Question
Why should I indicate `System.Web` before `HttpContext.Current`?
| 0 | [
2,
483,
378,
31,
4342,
329,
9,
14113,
115,
7775,
1126,
11969,
9,
17657,
60,
800,
3726,
3726,
6926,
1126,
11969,
31,
22,
79,
19,
21,
9919,
9,
31,
275,
14,
204,
5582,
13,
1,
10724,
9,
14113,
1,
13,
45,
568,
329,
9,
14113,
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... |
Objective C animation
===
Dear stack users :)
I would like to make an effect like in [Deal in][1] application.
It shows us an effect of left side animation. You can watch images at itunes.
I hope to get its name from you. Thank you.
If you can, pleas, give me its name or its code.
Sincerely yours Valeriy Zinchnko!
[1]: http://itunes.apple.com/app/deal-in/id525016531?mt=8 | 1 | [
2,
7038,
272,
6236,
800,
3726,
3726,
4483,
7566,
3878,
13,
45,
6,
31,
83,
101,
20,
233,
40,
1590,
101,
19,
636,
546,
192,
19,
500,
2558,
165,
500,
3010,
9,
32,
1285,
182,
40,
1590,
16,
225,
270,
6236,
9,
42,
92,
1455,
3502,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why JSON does not need setXXX method?
===
As question mention, I am very curious, why when the deserialization happen, it does not need setter for the fields? Only getter is needed?
I am using Jackson's JSON. | 0 | [
2,
483,
487,
528,
630,
52,
376,
309,
13290,
2109,
60,
800,
3726,
3726,
28,
1301,
3794,
15,
31,
589,
253,
7686,
15,
483,
76,
14,
1746,
106,
2815,
1829,
2384,
15,
32,
630,
52,
376,
309,
815,
26,
14,
2861,
60,
104,
164,
815,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
Data from all the dynamically generated input fields doesn't go to database
===
I regenerate the input fields by calling an external php function which generates those fields with the help an ajax function, but the save function doesn't save data from all the fields but only the data from last row is saved to database..
code for ajax function to regenerate these fields looks like this
var counter = 0;
function loadfields_addmore(checked)
{
$jd.ajax({
url: "<?php echo JURI::root(); ?>",
type: "POST",
data: {'option':'com_joomd', 'view':'itempanel', 'task':'loadfields', 'typeid':<?php echo $this->cparams->typeid; ?>, 'catid[]':checked, 'id':<?php echo (int)$this->item->id; ?>, "<?php echo jutility::getToken(); ?>":1, 'abase':1}
});
}
For save button that triggers the save process
function save(task) {
var data = $jd("form[name='<?php echo $array['editform']; ?>']").serializeArray();
$jd.ajax({
url: "<?php echo $url; ?>",
type: "POST",
dataType:"json",
data: data
});
}
The actual save function is like this :
function store()
{
foreach($post['cats'] as $cat) {
$query = 'insert into #__joomd_item_cat values('.$cat.', '.$row->id.')';
$this->_db->setQuery( $query );
}
}
The image shows the form..![As shown in the attachment..][1]
The data from all the fields is not going to the database..
[1]: http://i.stack.imgur.com/Bq8JI.png | 0 | [
2,
1054,
37,
65,
14,
7782,
1326,
6756,
6367,
2861,
1437,
22,
38,
162,
20,
6018,
800,
3726,
3726,
31,
29608,
14,
6367,
2861,
34,
2555,
40,
4886,
13,
26120,
1990,
56,
7920,
18,
273,
2861,
29,
14,
448,
40,
20624,
1990,
15,
47,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to convert javascript array to function
===
I have an array of arbitrary values. I Wrote a function that transforms the array to an array of functions that return the original values, so instead of calling a[3], I will call a[3]().
Here is my code which does not work? [code][1]. It gives this error `Cannot call method '1' of undefined`.
[1]: http://jsfiddle.net/cYss7/ | 0 | [
2,
184,
20,
8406,
8247,
8741,
7718,
20,
1990,
800,
3726,
3726,
31,
57,
40,
7718,
16,
17237,
4070,
9,
31,
738,
21,
1990,
30,
8007,
18,
14,
7718,
20,
40,
7718,
16,
3719,
30,
788,
14,
501,
4070,
15,
86,
700,
16,
2555,
21,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Geocoder is undefined?
===
> I'm trying to get user location using GPS, but i need to convert the lat and long to address but Geocoder keep giving a error gc is undefined.
public class MyLocationListener implements LocationListener{
public void onLocationChanged(Location loc){
try{
Geocoder gc = new Geocoder(this, Locale.ENGLISH);
List <Address> addr = gc.getFromLocation(loc.getLatitude(),loc.getLongitude(),1);
if (addr != null && addr.size() > 0){
Address address = addr.get(0);
String results = address.getAddressLine(0);
Toast.makeText(getApplicationContext(),results,Toast.LENGTH_LONG).show();
}
}catch(Exception e){
}
} | 0 | [
2,
6389,
716,
1157,
25,
367,
13439,
60,
800,
3726,
3726,
13,
1,
31,
22,
79,
749,
20,
164,
4155,
1474,
568,
18298,
15,
47,
31,
376,
20,
8406,
14,
14303,
17,
175,
20,
3218,
47,
6389,
716,
1157,
643,
1438,
21,
7019,
13,
10362,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Possible to add a checkBox to SWT Group Border
===
I want a SWT Border with radio Button, so using Group with some text name.
But I want to provide a radio button prefix to the group name border.
Is it possible?
![Radio Button infront Group][1]
[1]: http://i.stack.imgur.com/zQ0af.png | 0 | [
2,
938,
20,
3547,
21,
2631,
5309,
20,
8783,
38,
214,
1862,
800,
3726,
3726,
31,
259,
21,
8783,
38,
1862,
29,
603,
5167,
15,
86,
568,
214,
29,
109,
1854,
204,
9,
47,
31,
259,
20,
1181,
21,
603,
5167,
14315,
20,
14,
214,
204,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Migrate Database to oracle using c#
===
I want to automate the Migration of an ms sql server DB to oracle in an C# Console Program.
Are there any libraries i can use to make this easier?
I already have the connections.
I have to:
create the Repository,
capture
and move the data
Thanks for the help/ideas and input
| 0 | [
2,
22985,
6018,
20,
15759,
568,
272,
5910,
800,
3726,
3726,
31,
259,
20,
3108,
5281,
14,
8443,
16,
40,
4235,
4444,
255,
8128,
13,
9007,
20,
15759,
19,
40,
272,
5910,
8650,
625,
9,
50,
80,
186,
8649,
31,
92,
275,
20,
233,
48,
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... |
android how to keep large List<String[]> while application runs
===
What is the best way to keep a `List<String[]>` while my application runs? I am having problems with my approach. It most of the time gives me an OutOfMemory Error since the list is too big.
The `List<String[]>` is the result of parsing a csv file that I have downloaded online. What I do is parse the csv in an activity then save its result in a static class member like:
String url = "http://www.meralco.com.ph/pdf/pms/pms_test.csv";
try {
InputStream input = new URL(url).openStream();
CSVReader reader = new CSVReader(new InputStreamReader(input));
SchedController.sched = reader.readAll();
input.close();
}
...then access `ClassName.sched` on different activities.
I am doing this so that the parsed data will be available in every activity... And I don't have to parse again. What can I do to improve it? | 0 | [
2,
13005,
184,
20,
643,
370,
968,
1,
11130,
2558,
500,
1,
133,
3010,
1461,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
643,
21,
13,
1,
5739,
1,
11130,
2558,
500,
1,
133,
51,
3010,
1461,
60,
31,
589,
452,
1716,
29,
51,
2141,
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... |
tweeter resource on wordpress
===
there is a widgets on wordpress, and I add a tweeter penal using <from> like this
<form id="dmROI" class="tb-widget-configuration" action="#">
<input type="hidden" name="sources" value="@dmROI" />
<input type="hidden" name="refreshRate" value="60" />
<input type="hidden" name="tweetsNum" value="1" />
<input type="hidden" name="viewMoreUrl" value="http://twitter.com/dmROI" />
<input type="hidden" name="viewMoreText" value="Follow Us!" />
</form>
the problem is, it seems can't work in dmroi which is a new tweeter, but it works find if I change the source value to others' user name. How to solve this? | 0 | [
2,
20224,
106,
6577,
27,
833,
5890,
800,
3726,
3726,
80,
25,
21,
4807,
43,
3060,
18,
27,
833,
5890,
15,
17,
31,
3547,
21,
20224,
106,
16197,
568,
13,
1,
2665,
1,
101,
48,
13,
1,
4190,
4924,
3726,
7,
43,
79,
661,
49,
7,
718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Read Keyboard events in Android WebView
===
I'm trying to listen to key events in android web view. Example when user is filling a form, I should receive the key events. This is my WebView code
public class MyWebView extends WebView implements OnKeyListener
{
.....
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
Log.i("PcWebView", "onKeyDown keyCode=" + keyCode);
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
Log.i("PcWebView", "onKeyUp keyCode=" + keyCode);
return super.onKeyUp(keyCode, event);
}
@Override // Listener is initialized in the constructor
public boolean onKey(View v, int keyCode, KeyEvent event)
{
Log.i("PcWebView", "onKey keyCode=" + keyCode);
return false;
}
.....
}
neither of the methods `onKeyDown`, `onKeyUp` and `onKey` are being called when user types into the textboxes or textareas. Is it possible to achieve this or has Android restricted this b'cos of a possible privacy breach? | 0 | [
2,
1302,
8896,
963,
19,
13005,
2741,
4725,
800,
3726,
3726,
31,
22,
79,
749,
20,
3834,
20,
1246,
963,
19,
13005,
2741,
1418,
9,
823,
76,
4155,
25,
7702,
21,
505,
15,
31,
378,
2588,
14,
1246,
963,
9,
48,
25,
51,
2741,
4725,
179... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python, Tkinter: Scrollbar on canvas with entry widgets
===
I'm trying to add a canvas to a Tkinter GUI, where entry widgets with text from a file is added to a grid. The amount of text in the file tends to be a big, so I need to add a scrollbar.
The entry widgets is added to the canvas the way they're supposed to, and I've independently tested the scrollbar, and it works fine - except when the entry widgets are added. When I do that, the scrollbar disappears.
Here is the code for the canvas and scrollbar:
groupfr = Frame(self.labelll, width = 200, height = 1000)
groupfr.pack_propagate(0)
groupfr.pack(fill='both', side='left')
canvasgroup = Pmw.Group(groupfr, tag_text= 'canvasgroup')
canvasgroup.pack(fill = 'both', expand = 1, padx = 1, pady = 1)
self.canvas = Tkinter.Canvas(canvasgroup.interior(), width = 200,
height = 1000, bg = 'white')
self.canvas.config(scrollregion=(0,0,20,1000))
self.sbar = Tkinter.Scrollbar(self.canvas)
self.sbar.config(command=self.canvas.yview)
self.canvas.config(yscrollcommand=self.sbar.set)
self.sbar.pack(side='right', fill='y')
self.canvas.pack_propagate(0)
self.canvas.pack(side = 'left', fill = 'y', expand = 'no')
My apologies for the terrible code. This, however, is where the real problems begin:
for items in linematch:
items = items.split('=')
list_of_lists.append(items)
columncount = 0
rowcount = 0
for items in list_of_lists:
rowcount = rowcount + 1
columncount = 0
for idx, (words) in enumerate(zip(items)):
self.canvas.pack_propagate(0)
colcnt = colcnt + 1
idx = Tkinter.Entry(self.canvas)
idx.grid(row=rowcount, column=columncount)
idx.insert(0, words)
The code takes the file input and makes each line into a list of two items, which is itself appended to another list. This list of lists is used put into entry widgets like this, with each word (and translation) in their own entry widget:
word translation
word translation
etc. (Don't know how important this info is.)
Does anyone get why the scrollbar disappears when the entry widgets is added?
Thanks
| 0 | [
2,
20059,
15,
13,
38,
1767,
815,
45,
12159,
1850,
27,
9696,
29,
2792,
4807,
43,
3060,
18,
800,
3726,
3726,
31,
22,
79,
749,
20,
3547,
21,
9696,
20,
21,
13,
38,
1767,
815,
9457,
15,
113,
2792,
4807,
43,
3060,
18,
29,
1854,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
can any please tell which one is the in the following method?
===
can any please tell which one is the in the following method?
@implementation Person
@synthesize name;
- (void)dealloc { [self.name release]; [super dealloc]; }
@end
@implementation Person
@synthesize name;
- (void)dealloc { [name release]; [super dealloc]; }
@end
@implementation Person
@synthesize name;
- (void)dealloc { [name release]; name = nil;[super dealloc]; }
@end | 0 | [
2,
92,
186,
2247,
494,
56,
53,
25,
14,
19,
14,
249,
2109,
60,
800,
3726,
3726,
92,
186,
2247,
494,
56,
53,
25,
14,
19,
14,
249,
2109,
60,
13,
1,
8983,
413,
1130,
857,
840,
13,
1,
9507,
124,
10454,
204,
73,
13,
8,
13,
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... |
i want the textbox's who were filled by user to be filled again after her returns
===
I'm looking for an answer or perhabes an idea to solve this problem ..
i have a form to be filled and the code checks after submmiting if there's empty textbox's it'll print an error message, however when it returns to the form page all previous user entry will be gone
and then he has to fill them all again .. which i believ is annoying !
how can i reserve the entry .. please i want i short solution bcause i have so many forms with so many fildes .
You can check my work so far :
this is to check in the formExcution.php
if( $jobn==""||$jobc==""||$salaryn==""||$salaryc==""||$transportn||$transportc==""||$residencen ==""||$residencec==""||$benifitn==""||$benifitc==""||$packagen=="")
{
header("location: editsalaryform.php?msg=empty");
exit();
}
and here in the form page where the message will shown:
<?php
if(isset($_GET['msg'])){
print "<h4 style='color:#700000;'> you have to fill all the fildes </h4>";}
?>
Thank you ,
| 0 | [
2,
31,
259,
14,
1854,
5309,
22,
18,
72,
46,
1943,
34,
4155,
20,
44,
1943,
188,
75,
36,
4815,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
1623,
54,
416,
9075,
160,
40,
882,
20,
8402,
48,
1448,
13,
9,
9,
31,
57,
21,
505,
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... |
Getting the prime numbers
===
Please have a look at the following code
public class Prime
{
public static void main(String[]args)
{
int i = 2;
int counter = 0;
while(true)
{
if(counter==6)//Count still 6
{
break;
}
else
{
if(getPrimes(i)==true)
{
i++;
counter++;
System.out.println("Counter: "+counter);
}
else
{
System.out.println("No");
}
}
}
}
static boolean getPrimes(int num)
{
boolean result = false;
int i = 2;
while(true)
{
if((num%i) != 0) //if the number cannot be divided by any other number (except 1 and it self) it is prime
{
result = true;
System.out.println(num);
System.out.println("I is: "+i);
i=2;
break;
}
else //Not a prime. Repeat the process
{
result = false;
i++;
}
}
return result;
}
}
In here, I am trying to get all the prime numbers between 0-6. This is the test case to get thousands of prime numbers from a really big number. However, it is not showing the only primes, it is showing each and every number!
What am I doing here wrong? Please help! | 0 | [
2,
1017,
14,
1621,
2116,
800,
3726,
3726,
2247,
57,
21,
361,
35,
14,
249,
1797,
317,
718,
1621,
13,
1,
317,
12038,
11364,
407,
5,
11130,
2558,
500,
10663,
18,
6,
13,
1,
19,
38,
31,
800,
172,
73,
19,
38,
2105,
800,
713,
73,
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... |
Contiguous Memory Allocation on GPU
===
Does cudaMalloc allocate contiguous chunks of memory (i.e., physical bytes next to each other)?
I have a piece of CUDA code that simply copies 128 bytes from global device memory to shared memory, using 32 threads. I am trying to find a way to guarantee that this transfer can be completed in one memory transaction of 128 byes. If cudaMalloc allocates contiguous memory blocks, then it can be easily done.
Following is the code:
#include <iostream>
using namespace std;
#define SIZE 32 //SIZE of the array to store in shared memory
#define NUMTHREADS 32
__global__ void copy(uint* memPointer){
extern __shared__ uint bits[];
int tid = threadIdx.x;
bits[tid] = memPointer[tid];
}
int main(){
uint inputData[SIZE];
uint* storedData;
for(int i=0;i<SIZE;i++){
inputData[i] = i;
}
cudaError_t e1=cudaMalloc((void**) &storedData, sizeof(uint)*SIZE);
if(e1 == cudaSuccess){
cudaError_t e3= cudaMemcpy(storedData, inputData, sizeof(uint)*SIZE, cudaMemcpyHostToDevice);
if(e3==cudaSuccess){
copy<<<1,NUMTHREADS, SIZE*4>>>(storedData);
cudaError_t e6 = cudaFree(storedData);
if(e6==cudaSuccess){
}
else{
cout << "Error freeing memory storedData" << e6 << endl;
}
}
else{
cout << "Failed to copy" << " " << e3 << endl;
}
}
else{
cout << "Failed to allocate memory" << " " << e1 << endl;
}
return 0;
}
| 0 | [
2,
1065,
8407,
9627,
1912,
16840,
27,
489,
4201,
800,
3726,
3726,
630,
3141,
19349,
211,
2499,
65,
111,
9530,
1065,
8407,
9627,
15009,
18,
16,
1912,
13,
5,
49,
9,
62,
9,
15,
1825,
34,
3231,
328,
20,
206,
89,
6,
60,
31,
57,
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... |
Update UIElement from AsycTask
===
I want to Update Text View ,spinner from AsycTask.Actually what i am doing
I Take the data from server and result return in json form then i parse JSON and populate the data in two Spinner and one textview.How can i update data when i am using Asyctask beacuse Textview Does not update..Here is my code sniped
TAG_CONFIG="xyz"
TAG_CONFIG1="yyy"
JSONParser jParser=null;
JSONObject json=null;
jParser = new JSONParser();
json = jParser.getJSONFromUrl(url);
try {
// Getting Array of Contacts
contacts = json.getJSONArray(TAG_CONFIG);
for(int i = 0; i < contacts.length(); i++)
{
JSONArray c = contacts.getJSONArray(i);
CompanyName=new String[c.length()];
for(int j=0;j<c.length();j++)
{
CompanyName[j]=c.getString(j);
}
}
similar for tab_confg1...
| 0 | [
2,
11100,
13,
5661,
27567,
37,
28,
93,
20255,
3656,
800,
3726,
3726,
31,
259,
20,
11100,
1854,
1418,
13,
15,
3401,
18005,
37,
28,
93,
20255,
3656,
9,
15661,
98,
31,
589,
845,
31,
247,
14,
1054,
37,
8128,
17,
829,
788,
19,
487,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In Gtk, is it possible to have one cell renderer per treeview row?
===
In Gtk+ it is possible to have several cell renderers per column, however I want to have different cell renderers in different rows. For example, I'd like to list the properties of an object in a tree view. For boolean properties a toggle button would be much simpler to use than editing the `GtkCellRendererText` and type in `TRUE` or `FALSE`.
I know that I can react to the row data by setting a callback via `gtk_tree_view_column_set_cell_data_func()`. But in the callback, the cell renderer is already fixed and I can only change its appearance. | 0 | [
2,
19,
9509,
197,
15,
25,
32,
938,
20,
57,
53,
1667,
16535,
106,
416,
1541,
4725,
3131,
60,
800,
3726,
3726,
19,
9509,
197,
2430,
32,
25,
938,
20,
57,
238,
1667,
16535,
445,
416,
4698,
15,
207,
31,
259,
20,
57,
421,
1667,
1653... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use an external javascript file in asp.net
===
I wrote a script to hide and show a loader for my asp.net web application. The script works great when placed inline. I tried to extract the script to an external file and received the following error:
**Error:** The value of the property 'Pausing' is null or undefined, not a Function object
I tried to look up the error, but I was unable to find a solution to the problem. I am new to asp.net so it may be that I'm not sure how to search for the right question.
My inline code that works is:
<script type="text/javascript">
function Pausing() {
window.setTimeout(ShowLoader, 1);
}
function ShowLoader() {
if ((typeof Page_IsValid === 'undefined') ||
(Page_IsValid != null && Page_IsValid)) {
var i = document.getElementById("loader");
var img = document.getElementById("img");
i.style.display = "block";
setTimeout("document.images['img'].src=document.images['img'].src", 10);
Endpausing();
}
}
function HideLoader() {
var i = document.getElementById("loader");
i.style.display = "none";
}
function Endpausing() {
window.setTimeout(HideLoader, 4000);
}
</script>
The event call is attached to an asp:button control below:
<asp:Button ID="btnGetReport" runat="server" OnClick="btnGetReport_Click" OnClientClick="Pausing();" />
I removed the inline script and replaced with this...
<script type="text/javascript" src="../../Scripts/Loader.js"></script>
Added script to external file:
window.onload = initAll;
function initAll() {
function Pausing() {
window.setTimeout(ShowLoader, 1);
}
function ShowLoader() {
if ((typeof Page_IsValid === 'undefined') || // asp page has no validator
(Page_IsValid != null && Page_IsValid)) {
var i = document.getElementById("loader");
var img = document.getElementById("img");
i.style.display = "block";
setTimeout("document.images['img'].src=document.images['img'].src", 10);
Endpausing();
}
}
function HideLoader() {
var i = document.getElementById("loader");
i.style.display = "none";
}
function Endpausing() {
window.setTimeout(HideLoader, 4000);
}
}
Then I receive the previously mentioned error.
Any help would be greatly appreciated!
| 0 | [
2,
184,
20,
275,
40,
4886,
8247,
8741,
3893,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
738,
21,
3884,
20,
3077,
17,
298,
21,
6305,
106,
26,
51,
28,
306,
9,
2328,
2741,
3010,
9,
14,
3884,
693,
374,
76,
1037,
19,
1143,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Correct way to reference a Session / Global user variable in MVC3
===
So I have a Session variable which is set during the first user login
Session["ClientID"]
Basically this is used for theming (so the ClientID sets the theme/brand to appear on a website). Looking at the code applying
(Guid)Session["ClientID"]
All over the place just seems dirty and error prone, what the best design pattern to use to get the variable globally recognized. So I can do
this.CurrentClientID
or something similar on all MVC Pages. In theory I could overload the `Controller` class with a Custom class providing this ID, but I'm not sure how I would expose this to the View as well.
Any pointers to the best solution would be gratefully received!
| 0 | [
2,
4456,
161,
20,
2801,
21,
3723,
13,
118,
2062,
4155,
7612,
19,
307,
8990,
240,
800,
3726,
3726,
86,
31,
57,
21,
3723,
7612,
56,
25,
309,
112,
14,
64,
4155,
6738,
108,
3723,
2558,
7,
150,
18513,
13647,
7,
500,
11374,
48,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The quantization parameter codec vlc H264
===
I have just installed the codec vlc compilation mode.my OS is ubuntu. I documented the process of video compression and I found that video compression goes through several stages. The step of quantization step is the most impotant because it is there where we decide the rate of compression. The quantization step manipulates a parameter called: The quantization parameter. I would like to extract this parameter from the vlc code.
However, i could not find the part of the code where it is implemented.
I would be grateful to give me ideas on which part pf the code i can manipulate this quantifucation parameter.
Toufik
| 2 | [
2,
14,
9836,
38,
1829,
18906,
1797,
150,
566,
6109,
746,
20470,
800,
3726,
3726,
31,
57,
114,
4066,
14,
1797,
150,
566,
6109,
4868,
3740,
9,
915,
13,
759,
25,
287,
12968,
2473,
9,
31,
8926,
14,
953,
16,
763,
14864,
17,
31,
216,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
string to byte array and array of bytes to file
===
I need to implement in Delphi 2006 an algoritm that work in .net
Basicaly I need to do the next steps:
1. Create an XML and validate aganist the XSD
2. Serialize the XML string into an array of bytes UTF-8 encoded and compress it with zip
3. The compressed info must be stored again into a array of bytes using base256 format
4. Create an image using Datamatrix 2D BarCode from this array of bytes and put this image on a report
For step 1, I create the XML using NativeXML library that work ok. In this library exist a metod SaveToBinaryFile but don't work ok. In my tests I used this function to create a binary file.
I was forced to use a binary file becouse my Zip component work only with files not with strings or aray of bytes from memory.
I compressed this binary file with the Zip component and loaded this compresed file into a blob file.
At the moment when I need to create the DataMatrix image I load this blob file into an ansistring and I create the image
After many tests I found that my fault is when I save my XML into the binary file.
Now I need to found another way to save my xml (utf-8) string to a binarry file.
Please sorry for my english.
Can anyone help me? | 0 | [
2,
3724,
20,
34,
591,
7718,
17,
7718,
16,
34,
3231,
20,
3893,
800,
3726,
3726,
31,
376,
20,
8713,
19,
23030,
592,
40,
493,
6979,
242,
79,
30,
170,
19,
13,
9,
2328,
2125,
58,
102,
31,
376,
20,
107,
14,
328,
2382,
45,
137,
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... |
BackgroundAgent trying to do updates to my AdControl?
===
I tried to run the Marketplace Test Kit and it failed at Capability Validation with a bunch of calls that Microsoft.Advertising.Mobile.dll was trying to make. This is understandable, but in no instance am I attempting to update the AdControl from the BackgroundAgent. The closest thing I can think of is in this:
public ScheduledAgent()
{
if (!_classInitialized)
{
_classInitialized = true;
// Subscribe to the managed exception handler
Deployment.Current.Dispatcher.BeginInvoke(delegate
{
Application.Current.UnhandledException += ScheduledAgent_UnhandledException;
});
}
}
Is the Application.Current call what is trying to engage the ad control? If so, how can I prevent it from doing so? | 0 | [
2,
2395,
58,
7685,
749,
20,
107,
16779,
20,
51,
21,
43,
12898,
60,
800,
3726,
3726,
31,
794,
20,
485,
14,
19408,
1289,
6346,
17,
32,
1702,
35,
11480,
27999,
29,
21,
7653,
16,
3029,
30,
7099,
9,
22898,
7552,
9,
12571,
9,
43,
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... |
Values from hiddenfield shows very slowly
===
I have a question. How can I improve speed of getting values in this script below?
My script sets a 170 markers, later gets a values lng and lat of map bounds when map is in change (idle event) and send this values into hiddenfield. For 10-20-30 markers, this values are showing very fast, but for +100 markers, this function is very slow, and it takes a 5-6 sec to show all values when map is change.. I'm using marker clusterer, but there is no effect in speed. How to improve this?
greetings !
(..) // map options
var map = new google.maps.Map(document.getElementById("mapka"), mapOptions);
var markers = [];
var lngstring = <%=lngstring %>
var latstring = <%=latstring %>
//alert(latstring);
//alert(lngstring);
var arraylat = latstring.split("#");
var arraylng = lngstring.split("#");
for (var i = 0; i < arraylng.length-1; i++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(arraylng[i], arraylat[i])
});
markers.push(marker);
}
var markerCluster = new MarkerClusterer(map, markers);
google.maps.event.addListener(map, 'idle', function () {
var bounds = map.getBounds();
var nelat = bounds.getNorthEast().lat();
var nelng = bounds.getNorthEast().lng();
var swlat = bounds.getSouthWest().lat();
var swlng = bounds.getSouthWest().lng();
var c1 = map.getCenter().lat();
var c2 = map.getCenter().lng();
var zoom1 = map.getZoom();
document.getElementById("<%=hfNelat.ClientID%>").value = nelat;
document.getElementById("<%=hfNelng.ClientID%>").value = nelng;
document.getElementById("<%=hfSwlat.ClientID%>").value = swlat;
document.getElementById("<%=hfSwlng.ClientID%>").value = swlng;
document.getElementById("<%=UpdateButton1.ClientID %>").click();
});
Code "behind":
protected void UpdateButton_Click(object sender, EventArgs e)
{
lNelat.Text = hfNelat.Value;
lNelng.Text = hfNelng.Value;
lSwlat.Text = hfSwlat.Value;
lSwlng.Text = hfSwlng.Value;
} | 0 | [
2,
4070,
37,
3689,
1109,
1285,
253,
1447,
800,
3726,
3726,
31,
57,
21,
1301,
9,
184,
92,
31,
3545,
1362,
16,
1017,
4070,
19,
48,
3884,
1021,
60,
51,
3884,
3415,
21,
11850,
19482,
15,
138,
3049,
21,
4070,
644,
2723,
17,
14303,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Show IP camera using c# windows forms
===
i'm developing software to display ip camera "Acti", i tried to use axnvUnifiedControl but i cannot find any information about it.
my goal is to connect to the camera using IP, username, and password and display the camera image in windows form.
i'm using c# .net 4.0 | 0 | [
2,
298,
15735,
3336,
568,
272,
5910,
1936,
1997,
800,
3726,
3726,
31,
22,
79,
3561,
2306,
20,
3042,
15735,
3336,
13,
7,
5183,
49,
7,
15,
31,
794,
20,
275,
21,
396,
20763,
1020,
4462,
12898,
47,
31,
1967,
477,
186,
676,
88,
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... |
"The system cannot find the file specified" when starting process using ChildProcess
===
When I run the following code:
require 'childprocess'
process = ChildProcess.build("cucumber")
process.start
(It seem that any other gem can be instead cucumber)
I get error:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/childprocess-0.3.3/lib/childprocess/windows/process_builder.rb:87:in `create_process': The system cannot
find the file specified. (2) (ChildProcess::LaunchError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/childprocess-0.3.3/lib/childprocess/windows/process_builder.rb:34:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/childprocess-0.3.3/lib/childprocess/windows/process.rb:63:in `launch_process'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/childprocess-0.3.3/lib/childprocess/abstract_process.rb:67:in `start'
from env.rb:4:in `<main>'
When I run it in Windows cmd using e.g. `cucumber`, process starts normally.
How can I solve it? Why it occurs? | 0 | [
2,
13,
7,
124,
329,
1967,
477,
14,
3893,
9931,
7,
76,
1422,
953,
568,
850,
16835,
800,
3726,
3726,
76,
31,
485,
14,
249,
1797,
45,
4077,
13,
22,
11287,
16835,
22,
953,
800,
850,
16835,
9,
29361,
5,
7,
3987,
8086,
2102,
7,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIAlertView Show Once
===
I know this might sound strange, ive had this working in a previous app and now in my present app cant get it to work using the same code. Im trying to show an Alert View just once when the app is launched uisng:
if (![@"1" isEqualToString:[[NSUserDefaults standardUserDefaults] objectForKey:@"alert"]]){
[[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:@"alert"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"title" message:@"Text here" delegate:nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[alert show];
Would someone mind checking incase I have done something silly here, I have cross checked it against my app where this is working and all seems the same. | 0 | [
2,
287,
2815,
6767,
4725,
298,
382,
800,
3726,
3726,
31,
143,
48,
530,
646,
2578,
15,
5568,
41,
48,
638,
19,
21,
1158,
4865,
17,
130,
19,
51,
734,
4865,
2973,
164,
32,
20,
170,
568,
14,
205,
1797,
9,
797,
749,
20,
298,
40,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding initial content to Plone CMS
===
I'm looking for the best way to import initial content into Plone 4.2. Requirements:
- being able to use the initial content in tests
- being able to import initial content TTW
- supports content, users and groups
- easy way to modify initial content population
Does such product exist? | 0 | [
2,
4721,
2104,
2331,
20,
351,
16285,
2390,
18,
800,
3726,
3726,
31,
22,
79,
699,
26,
14,
246,
161,
20,
9010,
2104,
2331,
77,
351,
16285,
268,
9,
135,
9,
4786,
45,
13,
8,
142,
777,
20,
275,
14,
2104,
2331,
19,
4894,
13,
8,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scala style: how far to nest functions?
===
One of the advantages of Scala is that it gives you great control over scope. You can nest
functions like this:
def fn1 = {
def fn11 = {
...
}
def fn12 = {
...
def fn121 = {
...
}
}
...
def fn13 = {
...
}
}
The problem here is that fn1 may start to look a bit intimidating. Coming from a Java background, we are advised to keep functions small enough to be viewed on a single "page" in the IDE.
What would you think about taking fn12 out of fn1 based on the reasoning: "It's only used in fn1 right now, but it <i>might</i> come in useful somewhere else in the class later on..."
Also, would you have a preference as to where to place the nested functions - before or after the code that calls them? | 0 | [
2,
25975,
1034,
45,
184,
463,
20,
5618,
3719,
60,
800,
3726,
3726,
53,
16,
14,
14683,
16,
25975,
25,
30,
32,
2352,
42,
374,
569,
84,
9914,
9,
42,
92,
5618,
3719,
101,
48,
45,
6312,
13,
19035,
165,
800,
13,
1,
6312,
13,
19035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Minimum datetime and maximum datetime
===
I am receiving as a parameter a date, this date is in the format 04/24/2012, so in sql i need to be able to do something like
SELECT * FROM MYTABLE WHERE OrderDate BETWEEN (04/24/2012 at 12 am (StartDate)) AND (04/24/2012 at 11:59 pm (EndDate))
I have two parameters StartDate and EndDate
@StartDate nvarchar(50),
@EndDate nvarchar(50),
Sometimes StartDate and EndDate are not the same date so it could be 4/24/2012 - 4/27/2012, this is working fine... the problem is when they are doing the same day.
Any help would be appreciated | 0 | [
2,
5187,
1231,
891,
17,
2979,
1231,
891,
800,
3726,
3726,
31,
589,
3396,
28,
21,
18906,
21,
1231,
15,
48,
1231,
25,
19,
14,
2595,
13,
3277,
15718,
12918,
3212,
15,
86,
19,
4444,
255,
31,
376,
20,
44,
777,
20,
107,
301,
101,
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... |
IF statement in Objective-C in Xcode
===
In Xcode, I'm trying to make a button that changes it's text, relative to what the text currently is. For example: If the button says "1" and it is pressed, I want the text to change to "2" and "2" to "3" and so forth, here's the snippet of code that's giving me trouble:
if (magicButton.titleLabel = @"1") {
[magicButton setTitle:@"2" forState:UIControlStateNormal];
}
Xcode gives me this error "Assignment to readonly property" on line one of the snippet. I'm pretty new to Objective-C and iPhone App development, so maybe it's something crazily obvious and simple. Please don't mind if that's the case.
Here's a <a href="http://pastebin.com/vNFB5Xb0">paste of my implementation file</a> if it would help at all.
Thanks in advance. | 0 | [
2,
100,
3331,
19,
7038,
8,
150,
19,
993,
9375,
800,
3726,
3726,
19,
993,
9375,
15,
31,
22,
79,
749,
20,
233,
21,
5167,
30,
1693,
32,
22,
18,
1854,
15,
4543,
20,
98,
14,
1854,
871,
25,
9,
26,
823,
45,
100,
14,
5167,
898,
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... |
Error in curl when authenticating into JIRA
===
curl -H "Content-Type: application/json; charset=UTF-8" -d '{"username":"admin","password":"admin"}' http://localhost:2990/jira/rest/auth/1/session
I used the above query in DOS and I always get the following error :
> {"errorMessages":["Unexpected character (''' (code 39)): expected a
> valid value (number, String, array, object, 'true', 'false' or
> 'null')\n at [Source:
> org.apache.catalina.connector.CoyoteInputStream@1fd9611; line: 1,
> column: 2]"]}
I tried many permutations and combinations .. Still it did not work ..
| 0 | [
2,
7019,
19,
14320,
76,
14351,
1880,
77,
487,
3517,
800,
3726,
3726,
14320,
13,
8,
252,
13,
7,
25424,
8,
4474,
45,
3010,
118,
728,
528,
73,
4892,
3554,
3726,
1982,
410,
8,
457,
7,
13,
8,
43,
13,
22,
1,
7,
16704,
7259,
7,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Raphaël.js animation resume() fails on set
===
I have this piece of code ([**on jsfiddle**](http://jsfiddle.net/7nGcR/1/))
var paper = new Raphael('holder', 400, 100);
var set = paper.set();
for(var i = 0; i < 10; i++) {
var circle = paper.circle((i * 30) + 30, 20, 5);
circle.attr({ fill: '#ff0' });
circle.animate(Raphael.animation({ transform: 's2,2' }, 2000).repeat('Infinity'));
set.push(circle);
}
set.hover(function() {
set.pause();
}, function() {
set.resume(); // <- things get nasty here
});
---
Now when the mouse enters the set, `set.pause()` is called correctly and all animations stop.
But when leaving the hover area it doesn't resume the animation(s), instead I get following error in the console:
> Uncaught TypeError: Cannot read property 'transform' of undefined
I have no idea why this happens; is anybody able to help? | 0 | [
2,
13874,
9,
728,
18,
6236,
13113,
5,
6,
13614,
27,
309,
800,
3726,
3726,
31,
57,
48,
1855,
16,
1797,
13,
5,
2558,
1409,
218,
487,
18,
1707,
12312,
1409,
500,
5,
21127,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
465,
2723,
6711,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Zend Cluster Manager default server
===
I recently deployed my first application with zend cluster manager; however, i am unsure as to what my default server should be when I am trying to access my application via the base url.
For example, the current base url is http://<default server>/bamp
I think the default server should be the application server's IP address, but I am not too sure on that. Using that Ip gives me a page not found.
Also I see that there isa vhosts option when deploying my application. is there anyone that could shed some light on how I can utilize a virtual host to see my application?
Thank you in advance for any help that you may be able to provide. | 0 | [
2,
10526,
43,
7460,
1382,
12838,
8128,
800,
3726,
3726,
31,
1989,
6698,
51,
64,
3010,
29,
10526,
43,
7460,
1382,
73,
207,
15,
31,
589,
13815,
28,
20,
98,
51,
12838,
8128,
378,
44,
76,
31,
589,
749,
20,
1381,
51,
3010,
1197,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Animated infography JQuery or not JQuery
===
Hi I am kind of lost in this subject, is not my area of expertise. I am trying to make a animation through JS. Just an arrow going up to the sky and showing trending something like an animated infographic.
But I don't know how exactly start if I do it with canvas or do it animating images in JQuery? try to loop a Background vertical to mimic the effect of the arrow going up.
If anyone can suggest a good approach for this. It will be great. | 0 | [
2,
5784,
19,
410,
10112,
487,
8190,
93,
54,
52,
487,
8190,
93,
800,
3726,
3726,
4148,
31,
589,
825,
16,
529,
19,
48,
1550,
15,
25,
52,
51,
217,
16,
12303,
9,
31,
589,
749,
20,
233,
21,
6236,
120,
487,
18,
9,
114,
40,
7409,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Notes not updated in Visio 2010 reverse engineer with SQL server 2008
===
I am using ms sql server as the driver to construct a datasource when I do the reverse engineering in the visio 2010. Only tables are imported. E-R diagram generated is fine although only part of tables are automatically added but it's fine. The problem is the notes of tables and specific fields are not "updated" even after manually refersh the data. It just keeps what it was when they are created.
The only way to "update" I find is to delete all components and redo the reverse engineering, which obviously should not be called "refresh".
Anyone encounter this issue before?
PS: the "refresh" button always shows strange "confliction" between visio model and DB. For instance, it may detect changes even when I have not done anything in the DB at all. And there is an "Update databse" radio button (although it is always gray when I test) in the refresh model wizard dialog makes me wonder can it update the changes on the visio model to DB somehow? | 0 | [
2,
2434,
52,
6372,
19,
9060,
1963,
498,
7006,
2335,
29,
4444,
255,
8128,
570,
800,
3726,
3726,
31,
589,
568,
4235,
4444,
255,
8128,
28,
14,
2425,
20,
6960,
21,
1054,
12097,
76,
31,
107,
14,
7006,
1552,
19,
14,
9060,
1963,
498,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding web based app in Google marketplace
===
How can I list our web based application (not installable application)in google apps marketplace. The users are company based. Please let me know the steps and how can I test it before submiting | 0 | [
2,
4721,
2741,
432,
4865,
19,
8144,
19408,
800,
3726,
3726,
184,
92,
31,
968,
318,
2741,
432,
3010,
13,
5,
1270,
16146,
579,
3010,
6,
108,
8144,
4865,
18,
19408,
9,
14,
3878,
50,
237,
432,
9,
2247,
408,
55,
143,
14,
2382,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Styling dynamic elements using jQuery
===
I'm using load() to insert content into a div container and some of this content needs to be styled using jQuery; is there any way to load in the content with an external script without having to place `<script>` tags into the content itself? | 0 | [
2,
23020,
7782,
2065,
568,
487,
8190,
93,
800,
3726,
3726,
31,
22,
79,
568,
6305,
5,
6,
20,
14692,
2331,
77,
21,
13,
12916,
12147,
17,
109,
16,
48,
2331,
2274,
20,
44,
1034,
43,
568,
487,
8190,
93,
73,
25,
80,
186,
161,
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... |
Workaround around broken by design Powershell gci -exclude
===
this will sound like a bad joke, but apparently geniuses from MS arent capable of making uber complicated -exclude gci parameter work. By "genious" design it only works on files, not on entire path. So how to make it work.
For example how to exclude all files whose path contains "Windows" substring?
naive
`gci -exclude "*Windows*" -rec`
doesnt work | 0 | [
2,
170,
10037,
140,
2023,
34,
704,
414,
15984,
489,
1892,
13,
8,
1706,
150,
17405,
800,
3726,
3726,
48,
129,
646,
101,
21,
896,
8186,
15,
47,
3083,
11831,
160,
37,
4235,
14144,
3868,
16,
544,
13,
8866,
8343,
13,
8,
1706,
150,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use wxreactor with twisted Perspective Broker [PB] to write a chat client
===
I am learning wxPython and twisted's Perspective Broker. I've been assigned to use them together to produce a chat client (I've already written the server, and a console based client.)
This is what's stumping me: PB has it's own 'flow' with callbacks and such, which doesn't intuitively mesh with the event driven flow of wxpython. What kind of program structure should I be using to get the two cooperating?
I've tried using the twisted pb client part of the program to get and store info from the server in local methods that the wxpython gui can then call in response to certain events, and use at the start to set up a list of online users and groups. I think I'm running into issues with the sequence--not storing the necessary variables before the wx code calls for them, because both are started at the same time. Perhaps inserting a time delay for the frame creation and such would help, but that feels like a clumsy solution, if a solution at all.
Another approach would be to pass the server reference directly to the wxPython frame (and sub-panels/notebooks). Here I'm running into issues because the callbacks need a different class, and wx needs the info in the same class...and perhaps there's a way to force them into the same mold, but again, it feels very clumsy (plus I haven't managed to make it work yet.
Is there a resource that addresses this problem? A standard approach?
In case these might illuminate a problem with my approach...
Here's my server code: http://pastebin.com/84fmhsRV
GUI client code: http://pastebin.com/UimXe4RY
Thank you for your help. | 0 | [
2,
184,
20,
275,
619,
396,
99,
20908,
29,
5308,
6531,
14930,
636,
13390,
500,
20,
2757,
21,
6615,
6819,
800,
3726,
3726,
31,
589,
2477,
619,
396,
6448,
11570,
17,
5308,
22,
18,
6531,
14930,
9,
31,
22,
195,
74,
2467,
20,
275,
105... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Xml attribute as array indices in php
===
I have some XML which contains a lot of information in the attributes, here is a small example.
<?xml version="1.0" encoding="UTF-8"?>
<record>
<leader>04170npc a22003613u 4500</leader>
<datafield tag="040" ind1=" " ind2=" ">
<subfield code="a">WlAbNL</subfield>
<subfield code="b">eng</subfield>
<subfield code="c">WlAbNL</subfield>
</datafield>
<datafield tag="245" ind1="0" ind2="0">
<subfield code="a">Scott Blair Collection,</subfield>
<subfield code="f">1910 -</subfield>
</datafield>
Currently I have a php script which just loads the entire document
$xml = simplexml_load_file("Mapping_coll_wales.xml");
$records = $xml->record;
This creates a records array which looks something like this
SimpleXMLElement Object
(
[leader] => 04170npc a22003613u 4500
[datafield] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[tag] => 040
[ind1] =>
[ind2] =>
)
[subfield] => Array
(
[0] => WlAbNL
[1] => eng
[2] => WlAbNL
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[tag] => 245
[ind1] => 0
[ind2] => 0
)
[subfield] => Array
(
[0] => Scott Blair Collection,
[1] => 1910 -
)
)
)
Currently im just pulling the field I need by doing something like this
echo '<strong>Title</strong> = : ' . $records[$i]->datafield[1]->subfield . '<br />';
This loads the title, however its possible that the xml may contain other tags, so I dont want to rely on it being the subfield of indices 1. Ideally I would like to be able to call it using something like
echo '<strong>Title</strong> = : ' . $records[$i]->datafield[245][a] . '<br />';
Im sure its fairly straight forward and im just missing something, but it would be good to be able to either load the tags as the array indices or have some way of directly getting datafield by its tag and the subfield by its code, as that wont change.
Hope that makes sense.
Paul | 0 | [
2,
23504,
35,
14755,
28,
7718,
19,
8779,
18,
19,
13,
26120,
800,
3726,
3726,
31,
57,
109,
23504,
56,
1588,
21,
865,
16,
676,
19,
14,
13422,
15,
235,
25,
21,
284,
823,
9,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using getChildByName to find a button using a variable
===
Quick question.. I think :)
I am trying to chance the hue of a button inside af movieclip. The movieclip is called 'container' and the button is named 'traps' (which I get from another variable elsewhere).
This is my code
function get_muscle(muscle:String, tension:String):void {
if (tension == 'primary') {
var getChild:MovieClip = MovieClip(container.getChildByName(muscle));
greenHue(getChild);
}
}
Sadly it does not work. If i type in greenHue(container.traps) manually it works fine, but when I try to do it like this, it does not work. I have also tried to just use greenHue(container.muscle) but that does not work either.
Thanks in advance! | 0 | [
2,
568,
164,
11287,
779,
7259,
20,
477,
21,
5167,
568,
21,
7612,
800,
3726,
3726,
2231,
1301,
9,
9,
31,
277,
13,
45,
6,
31,
589,
749,
20,
1504,
14,
11542,
16,
21,
5167,
572,
13,
2565,
1308,
150,
6013,
9,
14,
1308,
150,
6013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Typo 3 installation ended with URL Not Found
===
I installed Typo 3 version 4.7.2 and in the last step I selected the example system called "Introduction package" (not the "Blank" one). After clicking "Go to your website" it redirected me to URL `BASE/get-started/` which said:
> Not Found
>
> The requested URL BASE/index.php was not found on this server.
Can you please help me?
| 0 | [
2,
22550,
203,
7758,
1272,
29,
287,
6362,
52,
216,
800,
3726,
3726,
31,
4066,
22550,
203,
615,
268,
9,
465,
9,
135,
17,
19,
14,
236,
1424,
31,
1704,
14,
823,
329,
227,
13,
7,
26123,
6030,
7,
13,
5,
1270,
14,
13,
7,
10754,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I need the seekbar thumb in center of seekbar height
===
I am using the one seek bar In my Application and I set the one custom drawable (shape) to set thumb.
Following is my drawable(seekbar_circle_normal.xml) code snippet :
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<solid android:color="#FDC300" />
<size
android:height="16dp"
android:width="16dp" />
<padding
/>
<corners
android:bottomLeftRadius="23dp"
android:bottomRightRadius="23dp"
android:topLeftRadius="23dp"
android:topRightRadius="23dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<corners
android:bottomLeftRadius="23dp"
android:bottomRightRadius="23dp"
android:topLeftRadius="23dp"
android:topRightRadius="23dp" />
<gradient
android:angle="270"
android:endColor="#33B7E7"
android:gradientRadius="1"
android:startColor="#33B7E7" >
</gradient>
<size
android:height="3dp"
android:width="3dp" />
<stroke
android:width="0.5dp"
android:color="#1DA6AE" />
</shape>
</item>
</layer-list>
My xml file code as follows :
<SeekBar android:id="@+id/SeekBarScale_Cm" android:layout_width="fill_parent" android:layout_height="10dp" android:max="230" android:secondaryProgress="0" android:thumb="@drawable/seekbar_circle_normal" android:clickable="false" android:progressDrawable="@drawable/seek_bar_bg"/>
I wants to display the thumb in to the center of seek bar. How I can show this.
Thanks in advance. | 0 | [
2,
31,
376,
14,
5048,
1850,
5078,
19,
459,
16,
5048,
1850,
2947,
800,
3726,
3726,
31,
589,
568,
14,
53,
5048,
748,
19,
51,
3010,
17,
31,
309,
14,
53,
5816,
2003,
579,
13,
5,
25096,
6,
20,
309,
5078,
9,
249,
25,
51,
2003,
579... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding a UISegmentedControl in UITableView's header
===
I am using the following code to add a UISegmentedControl in UITableView. Everything works fine except that the UISegmentedControl is not responding to user interaction at all. What could be the matter?
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
if(section == 2) {
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0,0, 320, 44)]; // x,y,width,height
NSArray *itemArray = [NSArray arrayWithObjects: @"One", @"Two", nil];
UISegmentedControl *control = [[UISegmentedControl alloc] initWithItems:itemArray];
[control setFrame:CGRectMake(60.0, 0, 200.0, 40.0)];
[control setSegmentedControlStyle:UISegmentedControlStylePlain];
[control setSelectedSegmentIndex:0];
[control setEnabled:YES];
[headerView addSubview:control];
return headerView;
}
}
| 0 | [
2,
4721,
21,
13,
5661,
28857,
69,
12898,
19,
13,
11193,
579,
4725,
22,
18,
157,
106,
800,
3726,
3726,
31,
589,
568,
14,
249,
1797,
20,
3547,
21,
13,
5661,
28857,
69,
12898,
19,
13,
11193,
579,
4725,
9,
796,
693,
1123,
1613,
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... |
Custom Shop-ability for user to customize image of what they are buying
===
I am creating a custom shop where shopper can pick colors/types/sizes. I want an image to change as these are picked and then upon submit the customer is able to purchase the item they have created in the browser. Would this just involve a form and jquery to change what the images look like on the screen? Any suggestions or tutorials you know of?
thanks | 0 | [
2,
5816,
2546,
8,
4091,
26,
4155,
20,
5816,
2952,
1961,
16,
98,
59,
50,
9459,
800,
3726,
3726,
31,
589,
2936,
21,
5816,
2546,
113,
13,
18,
16700,
92,
2036,
5268,
118,
4474,
18,
118,
10454,
18,
9,
31,
259,
40,
1961,
20,
753,
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... |
Using dbx debugger in net beans
===
I have a C++ project created using Netbeans 7.0 on a Solaris Machine.
I have modified the Netbeans compiler options to choose Sun compiler/dbx instead of gcc/gdb.
Yet while debugging, Netbeans tries to find gdb. Any idea why? Here is the screen shot of the tools menu.
![enter image description here][1]
[1]: http://i.stack.imgur.com/qaIuB.png | 0 | [
2,
568,
13,
9007,
396,
121,
2345,
11356,
19,
4275,
14685,
800,
3726,
3726,
31,
57,
21,
272,
20512,
669,
679,
568,
4275,
863,
5950,
453,
9,
387,
27,
21,
4535,
403,
1940,
9,
31,
57,
5372,
14,
4275,
863,
5950,
21486,
6368,
20,
3538... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Use ifconfig to turn on network in Android but it doesn't work
===
I have tried to use adb shell to operate the network interface of my phone(HTC Desire Z).
You can see in the image ,I ping a site first,then turn 3G network down ,and ping it again ,it said Network is unreachable .
But when I turn it on ,and use ifconfig and confirm that it is really on .But when I ping it it always said that Net work is unreachable .
Who can help me ?!!?
This is my console content :(btw ,I am a new user and not allowed to post image)
ping 211.69.198.222
PING 211.69.198.222 (211.69.198.222) 56(84) bytes of data.
64 bytes from 211.69.198.222: icmp_seq=1 ttl=46 time=356 ms
64 bytes from 211.69.198.222: icmp_seq=2 ttl=46 time=294 ms
64 bytes from 211.69.198.222: icmp_seq=5 ttl=46 time=342 ms
64 bytes from 211.69.198.222: icmp_seq=6 ttl=46 time=341 ms
64 bytes from 211.69.198.222: icmp_seq=8 ttl=46 time=342 ms
64 bytes from 211.69.198.222: icmp_seq=9 ttl=46 time=330 ms
^C
--- 211.69.198.222 ping statistics ---
9 packets transmitted, 6 received, 33% packet loss, time 8025ms
rtt min/avg/max/mdev = 294.831/334.533/356.018/19.263 ms
# ifconfig rmnet0
rmnet0: ip 172.22.39.243 mask 255.255.255.248 flags [up broadcast running multicast]
# ifconfig rmnet0 down
# ping 211.69.198.222
connect: Network is unreachable
# ifconfig rmnet0 up
# ping 211.69.198.222
connect: Network is unreachable
# ping 211.69.198.222
connect: Network is unreachable
# ifconfig rmnet0
rmnet0: ip 172.22.39.243 mask 255.255.255.248 flags [up broadcast running multicast]
| 0 | [
2,
275,
100,
14093,
2816,
20,
805,
27,
982,
19,
13005,
47,
32,
1437,
22,
38,
170,
800,
3726,
3726,
31,
57,
794,
20,
275,
21,
9007,
3593,
20,
4055,
14,
982,
6573,
16,
51,
1132,
5,
9020,
150,
3150,
2052,
6,
9,
42,
92,
196,
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... |
how to change background of overflow menuitem
===
i try to change the blue background of e focussed/pressed menuitem in the overflow menu.
i'm talking about this: http://tinypic.com/r/2j104l0/6
i think i've overwritten every possible attribute from the `Theme`and `Theme.Holo` in Themes.xml, and went to each style in Styles.xml but couldn't change the blue background. | 0 | [
2,
184,
20,
753,
2395,
16,
20285,
11379,
2119,
79,
800,
3726,
3726,
31,
1131,
20,
753,
14,
705,
2395,
16,
13,
62,
1776,
18,
69,
118,
5890,
69,
11379,
2119,
79,
19,
14,
20285,
11379,
9,
31,
22,
79,
1582,
88,
48,
45,
7775,
6903,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating User for a single contained databasee in MSSQL 2012
===
I am pretty new working with MSSQL and have 2012 version at the moment. What i try to do is, creating a user for a contained database with SQL and have that user to have access only to that database.
I will invoke this SQL from JAVA using a prepared statment.
Any one has any pointers?
thanks in advance | 2 | [
2,
2936,
4155,
26,
21,
345,
3437,
6018,
62,
19,
4235,
18,
22402,
563,
800,
3726,
3726,
31,
589,
1772,
78,
638,
29,
4235,
18,
22402,
17,
57,
563,
615,
35,
14,
688,
9,
98,
31,
1131,
20,
107,
25,
15,
2936,
21,
4155,
26,
21,
343... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ispconfig 3 mail password encrypting
===
What type of encryption used to create custom mail password?
I have a clear password phrase about 300 users and I need to convert the hash for adding of these users for mysql database. I will be grateful to those who show an example of passwd encryption for ispconfig 3 in php... | 0 | [
2,
25,
306,
14093,
2816,
203,
4216,
20884,
1957,
11435,
68,
800,
3726,
3726,
98,
1001,
16,
24420,
147,
20,
1600,
5816,
4216,
20884,
60,
31,
57,
21,
1207,
20884,
6845,
88,
3565,
3878,
17,
31,
376,
20,
8406,
14,
19170,
26,
4721,
16,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
AUTO_INCREMENT in composite key
===
I have table as below
**personalInfo**
CREATE TABLE personalInfo(userid BIGINT AUTO_INCREMENT PRIMARY KEY)
**patentInfo**
CREATE TABLE patentInfo
(
userid BIGINT,
patentId BIGINT AUTO_INCREMENT,
FOREIGN KEY (userid) REFERENCES personalInfo(userid),
PRIMARY KEY (userid,patentId)
)
While creating table `patentInfo`, I am getting error as
Incorrect table definition; there can be only one auto column and it must be defined as a key.
What I want to do is add patent for Users. So I was trying to use `patentId` as `AUTO_INCREMENT` and keep compiste primary key as combination of `patentId` & `userid`.
Any idea how can I get this done?
Update 1:
-
My AIM is, I don't want to insert `patentId` in mysql query. mysql itself will create next number. | 0 | [
2,
3108,
1,
28461,
19,
12639,
1246,
800,
3726,
3726,
31,
57,
859,
28,
1021,
13,
1409,
18160,
108,
4120,
1409,
1600,
859,
1319,
108,
4120,
5,
3699,
5175,
580,
6391,
3108,
1,
28461,
1256,
1246,
6,
13,
1409,
5972,
2291,
108,
4120,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Memory leak while plotting and removing multiple paths every second
===
We are plotting a set of points to draw a Polyline in raphael by parsing an array of points and creating a path.
Here is example of what we are doing:
We have array of points as follows:
var points = [{10,20},{20,30},{25,34},{28,40},{30,35},{40,50},{50,70},.........] // Array may contain more than 50 points.
We are calculating the path using the above array as follows:
var pathString = "M 10,20 L 20,30 L 25,34 L28,40 L 30,35 ..... "
Now we use this path element to draw path in the selected panel/div/control as follows:
var tempPath = control.paper.path(pathString).attr('stroke-width', 2);
tempPath.attr( { stroke: "#008000" } );
pathString = null;
tempPath.remove();
tempPath = null;
This process is repeated after every 2 to 3 seconds with a different array of points.
Doing this in IE9 increases the memory consumption at every redraw and the browser hangs after 10 to 15 minutes and we need to kill the process from the taskbar. | 0 | [
2,
1912,
11724,
133,
22716,
17,
9096,
1886,
12074,
352,
153,
800,
3726,
3726,
95,
50,
22716,
21,
309,
16,
819,
20,
2003,
21,
3446,
1143,
19,
13874,
34,
2017,
18,
68,
40,
7718,
16,
819,
17,
2936,
21,
2013,
9,
235,
25,
823,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to create google docs using api in app scope instead of user scope
===
I want to create an app which will use google drive to create and store documents. However I have a custom authentication module and will not use gmail authentication.
The documents that are crated need to be in the application scope, and not user scope.
What I mean is that the app should login into google drive and create docs, instead of the user.
How do I do this ?
Thanks,
Murtaza | 0 | [
2,
184,
20,
1600,
8144,
9765,
18,
568,
21,
2159,
19,
4865,
9914,
700,
16,
4155,
9914,
800,
3726,
3726,
31,
259,
20,
1600,
40,
4865,
56,
129,
275,
8144,
1493,
20,
1600,
17,
1718,
4374,
9,
207,
31,
57,
21,
5816,
27963,
12613,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Share variables among functions in Javascript
===
I have code like:
MyClass = {
init: function(){
marker = 0;
//I call foo() and bar() from here
},
foo: function(){
//I want to access & update marker here
},
bar: function(){
//This function also accesses updates marker
}
};
I can access the `marker` by passing it as a parameter to functions but I will not be able to update it.
So, how do I manage creating a variable `marker` such that all three functions can share it? I don't want to write any code outside `MyClass`. | 0 | [
2,
1891,
12157,
497,
3719,
19,
8247,
8741,
800,
3726,
3726,
31,
57,
1797,
101,
45,
51,
1898,
800,
13,
1,
19,
242,
45,
1990,
5,
6,
1,
13289,
800,
713,
73,
12894,
49,
645,
4310,
111,
5,
6,
17,
748,
5,
6,
37,
235,
13,
1,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
click the button then pop up a dialogthen submit the button
===
<button onclick="productAddToCartForm.submit(this)" class="button btn-cart" title="Add to Cart" type="button"><span><span>Add to Cart</span></span></button>
js code:
var productAddToCartForm = new VarienForm('product_addtocart_form');
productAddToCartForm.submit = function(){
if (this.validator.validate()) {
this.form.submit();
}
}.bind(productAddToCartForm);
The above is the normal step. click the button, then submit the form. now, i want to add one step before the form is submitted. the step is. when click the button, it will pop up a dialog. when close the dialog. then submit the form.
1, i want to use jquery in `productAddToCartForm.submit = function(){....}` .if the page have loaded the jquery library.but i don't know how to use. thank you | 0 | [
2,
10840,
14,
5167,
94,
1675,
71,
21,
28223,
2504,
12298,
14,
5167,
800,
3726,
3726,
13,
1,
811,
444,
27,
150,
10129,
3726,
7,
14086,
14854,
262,
1367,
38,
4190,
9,
7563,
5130,
5,
1565,
6,
7,
718,
3726,
7,
811,
444,
334,
38,
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... |
Android type mismatch in readFromParcel method
===
< want to make a parcelable from an Object that contains an Arraylist<Object>, But in my readFromParcel method I get the error Type Mismatch: cannot convert from void to ArrayList<Stone>. What can I do to read my ArrayList<Object> properly from my parcel?
Here's my code
public class Game implements Parcelable{
private ArrayList<Stone> allStones;
public Game(){
allStones = new ArrayList<Stone>();
for(int x=0; x<10; x++) {
for(int y=0; y<10; y++) {
if((x+y)%2 == 1 && y<4){
Stone stone = new Stone(x, y, Stone.WHITE);
allStones.add(stone);
} else if((x+y)%2 == 1 && y>5){
Stone stone = new Stone(x, y, Stone.BLACK);
allStones.add(stone);
}
}
}
}
public Game(Parcel in) {
allStones = new ArrayList<Stone>();
readFromParcel(in);
}
public ArrayList<Stone> getAllStones() {
return allStones;
}
public void removeFromStones(Stone stone) {
allStones.remove(stone);
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeTypedList(allStones);
}
private void readFromParcel(Parcel in) {
allStones = in.readTypedList(allStones, Stone.CREATOR); //This line has the error in it
}
}
And the Stone class
public class Stone implements Parcelable{
private int x, y, color;
private Boolean king;
public static final int BLACK = 0;
public static final int WHITE = 1;
public Stone(int x, int y, int color) {
this.x = x;
this.y = y;
this.color = color;
this.king = false;
}
public Stone(Parcel in) {
readFromParcel(in);
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getColor() {
return color;
}
public boolean getKing() {
return king;
}
public void setKing() {
king = true;
}
public void setXY(int x, int y) {
this.x = x;
this.y = y;
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(x);
dest.writeInt(y);
dest.writeInt(color);
dest.writeByte((byte) (king ? 1:0));
}
public void readFromParcel(Parcel in) {
x = in.readInt();
y = in.readInt();
color = in.readInt();
king = in.readByte() == 1;
}
public final static Creator<Stone> CREATOR = new Parcelable.Creator<Stone>() {
public Stone createFromParcel(Parcel source) {
return new Stone(source);
}
public Stone[] newArray(int size) {
return new Stone[size];
}
};
} | 0 | [
2,
13005,
1001,
2462,
12280,
19,
1302,
2665,
22773,
532,
2109,
800,
3726,
3726,
13,
1,
259,
20,
233,
21,
16554,
579,
37,
40,
3095,
30,
1588,
40,
7718,
5739,
1,
23793,
1,
15,
47,
19,
51,
1302,
2665,
22773,
532,
2109,
31,
164,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
predefined static routing /omnet++
===
I want to simulate a switched ethernet network with a predefined static routes:
for example: from A to C I have to go through 2 switchs switch1 and switch2, from B to D through switch1.
The switch's role is to route messages according to a static routing table.
I can not seem to realize this operation by OMNeT + +. is this possible?
I need your help, I am beginner.
thank you in advance.
| 0 | [
2,
782,
13439,
12038,
19880,
13,
118,
2636,
2328,
20512,
800,
3726,
3726,
31,
259,
20,
24969,
21,
6667,
27820,
982,
29,
21,
782,
13439,
12038,
5050,
45,
26,
823,
45,
37,
21,
20,
272,
31,
57,
20,
162,
120,
172,
5521,
18,
5521,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 wrap a c++ class in php extension?
===
I created 4 files to wrap a c++ class in php Extension.Now I want to run the code for wrapping.But I have no idea about that.How can I run the code?
I'm following the tutorial over at http://devzone.zend.com/article/4486, and here's the Graph code I have so far:
**vehicles.cc**
#include "php_vehicles.h"
#include "car.h"
zend_object_handlers car_object_handlers;
struct car_object {
zend_object std;
Car *car;
};
zend_class_entry *car_ce;
void car_free_storage(void *object TSRMLS_DC)
{
car_object *obj = (car_object *)object;
delete obj->car;
zend_hash_destroy(obj->std.properties);
FREE_HASHTABLE(obj->std.properties);
efree(obj);
}
zend_object_value car_create_handler(zend_class_entry *type TSRMLS_DC)
{
zval *tmp;
zend_object_value retval;
car_object *obj = (car_object *)emalloc(sizeof(car_object));
memset(obj, 0, sizeof(car_object));
obj->std.ce = type;
ALLOC_HASHTABLE(obj->std.properties);
zend_hash_init(obj->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(obj->std.properties, &type->default_properties,
(copy_ctor_func_t)zval_add_ref, (void *)&tmp, sizeof(zval *));
retval.handle = zend_objects_store_put(obj, NULL,
car_free_storage, NULL TSRMLS_CC);
retval.handlers = &car_object_handlers;
return retval;
}
PHP_METHOD(Car, __construct)
{
long maxGear;
Car *car = NULL;
zval *object = getThis();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &maxGear) == FAILURE) {
RETURN_NULL();
}
car = new Car(maxGear);
car_object *obj = (car_object *)zend_object_store_get_object(object TSRMLS_CC);
obj->car = car;
}
PHP_METHOD(Car, shift)
{
}
PHP_METHOD(Car, accelerate)
{
Car *car;
car_object *obj = (car_object *)zend_object_store_get_object(
getThis() TSRMLS_CC);
car = obj->car;
if (car != NULL) {
car->accelerate();
}
}
PHP_METHOD(Car, brake)
{
}
PHP_METHOD(Car, getCurrentSpeed)
{
Car *car;
car_object *obj = (car_object *)zend_object_store_get_object(
getThis() TSRMLS_CC);
car = obj->car;
if (car != NULL) {
RETURN_LONG(car->getCurrentSpeed());
}
RETURN_NULL();
}
PHP_METHOD(Car, getCurrentGear)
{
}
function_entry car_methods[] = {
PHP_ME(Car, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(Car, shift, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Car, accelerate, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Car, brake, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Car, getCurrentSpeed, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Car, getCurrentGear, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
PHP_MINIT_FUNCTION(vehicles)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "Car", car_methods);
car_ce = zend_register_internal_class(&ce TSRMLS_CC);
car_ce->create_object = car_create_handler;
memcpy(&car_object_handlers,
zend_get_std_object_handlers(), sizeof(zend_object_handlers));
car_object_handlers.clone_obj = NULL;
return SUCCESS;
}
zend_module_entry vehicles_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
PHP_VEHICLES_EXTNAME,
NULL, /* Functions */
PHP_MINIT(vehicles), /* MINIT */
NULL, /* MSHUTDOWN */
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
NULL, /* MINFO */
#if ZEND_MODULE_API_NO >= 20010901
PHP_VEHICLES_EXTVER,
#endif
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_VEHICLES
extern "C" {
ZEND_GET_MODULE(vehicles)
}
#endif
**php_vehicles.h**
#ifndef PHP_VEHICLES_H
#define PHP_VEHICLES_H
#define PHP_VEHICLES_EXTNAME "vehicles"
#define PHP_VEHICLES_EXTVER "0.1"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h"
}
extern zend_module_entry vehicles_module_entry;
#define phpext_vehicles_ptr &vehicles_module_entry;
#endif /* PHP_VEHICLES_H */
**config.m4**
PHP_ARG_ENABLE(vehicles,
[Whether to enable the "vehicles" extension],
[ --enable-vehicles Enable "vehicles" extension support])
if test $PHP_VEHICLES != "no"; then
PHP_REQUIRE_CXX()
PHP_SUBST(VEHICLES_SHARED_LIBADD)
PHP_ADD_LIBRARY(stdc++, 1, VEHICLES_SHARED_LIBADD)
PHP_NEW_EXTENSION(vehicles, vehicles.cc car.cc, $ext_shared)
fi
**car.h**
#ifndef VEHICLES_CAR_H
#define VEHICLES_CAR_H
// A very simple car class
class Car {
public:
Car(int maxGear);
void shift(int gear);
void accelerate();
void brake();
int getCurrentSpeed();
int getCurrentGear();
private:
int maxGear;
int currentGear;
int speed;
};
#endif /* VEHICLES_CAR_H */
**car.cc**
#include "car.h"
Car::Car(int maxGear) {
this->maxGear = maxGear;
this->currentGear = 1;
this->speed = 0;
}
void Car::shift(int gear) {
if (gear < 1 || gear > maxGear) {
return;
}
currentGear = gear;
}
void Car::accelerate() {
speed += (5 * this->getCurrentGear());
}
void Car::brake() {
speed -= (5 * this->getCurrentGear());
}
int Car::getCurrentSpeed() {
return speed;
}
int Car::getCurrentGear() {
return currentGear;
}
| 0 | [
2,
184,
92,
31,
8118,
21,
272,
20512,
718,
19,
13,
26120,
3896,
60,
800,
3726,
3726,
31,
679,
268,
6488,
20,
8118,
21,
272,
20512,
718,
19,
13,
26120,
3896,
9,
1387,
31,
259,
20,
485,
14,
1797,
26,
13437,
9,
811,
31,
57,
90,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get TimeZone value in the Java 1.6 through OsloneTimeZone Database
===
How to get TimeZone value in the Java 1.6 through OsloneTimeZone Database.
I am passing base64 string of timeZone lyk. "Asia/Kolkata". After that I have to get this Tiezone value in numerical format like + 5.5.
How to do this please suggest. | 0 | [
2,
184,
20,
164,
85,
11661,
1923,
19,
14,
8247,
137,
9,
379,
120,
10111,
556,
891,
11661,
6018,
800,
3726,
3726,
184,
20,
164,
85,
11661,
1923,
19,
14,
8247,
137,
9,
379,
120,
10111,
556,
891,
11661,
6018,
9,
31,
589,
2848,
1000... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CRM 2011 - Update child entity / Attach entity to context
===
I am creating a pre event plugin for CRM 2011 that sets the account owner and updates all the child contacts with the same owner. The plugin is installed correctly and updates the main account record correctly but the child contact owner does not change . I have pushed the owner name into another field of the contact to check I have the correct details and that field is updating.
I'm sure its something to do with attaching the child contacts to the correct context but so far I have drawn a blank.
//Set new account owner - Works fine
account.OwnerId = new EntityReference(SystemUser.EntityLogicalName, ownerId);
//Pass the same owner into the contacts - Does not get updated
UpdateContacts(account.Id, ownerId, service, tracingService);
The system is successfully updating the account owner and the description label of the child record.
public static void UpdateContacts(Guid parentCustomerId, Guid ownerId, IOrganizationService service, ITracingService tracingService)
{
// Create the FilterExpression.
FilterExpression filter = new FilterExpression();
// Set the properties of the filter.
filter.FilterOperator = LogicalOperator.And;
filter.AddCondition(new ConditionExpression("parentcustomerid", ConditionOperator.Equal, parentCustomerId));
// Create the QueryExpression object.
QueryExpression query = new QueryExpression();
// Set the properties of the QueryExpression object.
query.EntityName = Contact.EntityLogicalName;
query.ColumnSet = new ColumnSet(true);
query.Criteria = filter;
// Retrieve the contacts.
EntityCollection results = service.RetrieveMultiple(query);
tracingService.Trace("Results : " + results.Entities.Count);
SystemUser systemUser = (SystemUser)service.Retrieve(SystemUser.EntityLogicalName, ownerId, new ColumnSet(true));
tracingService.Trace("System User : " + systemUser.FullName);
XrmServiceContext xrmServiceContext = new XrmServiceContext(service);
for (int i = 0; i < results.Entities.Count; i++)
{
Contact contact = (Contact)results.Entities[i];
contact.OwnerId = new EntityReference(SystemUser.EntityLogicalName, systemUser.Id);
contact.Description = systemUser.FullName;
xrmServiceContext.Attach(contact);
xrmServiceContext.UpdateObject(contact);
xrmServiceContext.SaveChanges();
tracingService.Trace("Updating : " + contact.FullName);
}
}
The tracing service prints out everything I would expect. Do I need to also attach the system user and somehow attach the entity reference to the context?
Any help appreciated.
| 0 | [
2,
6186,
79,
542,
13,
8,
11100,
850,
9252,
13,
118,
19514,
9252,
20,
4141,
800,
3726,
3726,
31,
589,
2936,
21,
782,
807,
10922,
108,
26,
6186,
79,
542,
30,
3415,
14,
2176,
2410,
17,
16779,
65,
14,
850,
11894,
29,
14,
205,
2410,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Programatically, how do I change the default document content type of a Document Library in SP2007?
===
I have 40 document library lists and I have to change the default document content type for these document libraries.
In UI, this is possible by
1. On the document library, go to Settings > Document Library Settings
2. Under `content type` heading, select `Change new button order and default content type`
3. Move the desired document content type on first order, making it the default content type.
Programatically, so far I got document library instance as `SPList`, casted to `SPDocumentLibrary`, then pull the content type through the `ContentTypes` property. However, I couldn't see any property or method in the document library or content type that will do what I need.
A sample code or a reference will be greatly appreciated ;-).
| 2 | [
2,
625,
721,
8438,
15,
184,
107,
31,
753,
14,
12838,
4492,
2331,
1001,
16,
21,
4492,
1248,
19,
3782,
2727,
60,
800,
3726,
3726,
31,
57,
1417,
4492,
1248,
7227,
17,
31,
57,
20,
753,
14,
12838,
4492,
2331,
1001,
26,
158,
4492,
864... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GtkTreeView Unset Cursor
===
When a new `GtkTreeView` is exposed, one finds it in a state without any cursor displayed. Once focused, the cursor is there, even when the focus is lost. I am looking for a method to get rid of the cursor on demand.
The GTK+ reference claims, that the function `gtk_tree_view_set_cursor` does the job whenever the `GtkTreePath*` argument is invalid for the `GtkTreeView*`. The term "invalid" can be interpreted in many ways. I experimented with many possibilities with results ranging between segfault and no effect at all. Therefore I would like ask:
> Q1: Is it even possible to unset a cursor on a GtkTreeView?
> Q2: If so, would you please provide a simple example, preferably in plain C?
| 0 | [
2,
9509,
197,
8101,
4725,
367,
3554,
29588,
800,
3726,
3726,
76,
21,
78,
13,
1,
263,
38,
197,
8101,
4725,
1,
25,
5043,
15,
53,
3797,
32,
19,
21,
146,
366,
186,
29588,
6115,
9,
382,
2604,
15,
14,
29588,
25,
80,
15,
166,
76,
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... |
More pythonic way to pick multiple element types from tagged data
===
I have some tagged data that I am processing using lxml. When I open a file I do not know before the file is opened if I have one or more of three types of elements (I could have one, two or three different elements and multiple instances of any type I have)
I need some information about these elements that is contained in child tags of the element
<element_type_1>
<name>joe smith</name>
</element_type_1>
<element_type_2>
<name>mary smith</name>
</element_type_2>
<element_type_3>
<name>patrick smith</name>
</element_type_3>
So in this case I have all three types but only one of each type however there could be up to some arbitrary large number of any type.
I am getting the elements by using cssselect 3 times in my function
def get_types(myTree):
type_dict=defaultdict(list)
type_dict['type_1']=myTree.cssselect('element_type_1')
type_dict['type_1']=myTree.cssselect('element_type_2')
type_dict['type_1']=myTree.cssselect('element_type_3')
ret type_dict
This seems overly redundant
Am I missing something that would clean up this a bit
FYI I am doing this because for each type I have to match some other data from a related document
| 0 | [
2,
91,
20059,
596,
161,
20,
2036,
1886,
4520,
2551,
37,
27945,
1054,
800,
3726,
3726,
31,
57,
109,
27945,
1054,
30,
31,
589,
5511,
568,
13,
24560,
8184,
9,
76,
31,
368,
21,
3893,
31,
107,
52,
143,
115,
14,
3893,
25,
520,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
default font when sending html email with php, viewing in outlook
===
I am trying to figure out a way to specify a default font for my outgoing HTML emails.
The reason for this is because outlook's default font is in Times New Roman, and I would like it to be in Arial instead.
I tried doing
< body style="font-family: Arial, Helvetica, sans-serif;">
but a href link in my email, for example, still shows up in Times in Outlook.
I also tried doing a global css declaration, like
< style>
body {
font-family:Arial, Helvetica, sans-serif; }
< /style>
and this didn't do it as well.
Is there a way to specify a default font for my HTML, without having to hardcode the font face in each link?
This will work obviously in outlook < a href=# style="font-family: Arial, Helvetica, sans-serif;"> | 0 | [
2,
12838,
9978,
76,
4907,
13,
15895,
8517,
29,
13,
26120,
15,
11244,
19,
19837,
800,
3726,
3726,
31,
589,
749,
20,
1465,
70,
21,
161,
20,
19077,
21,
12838,
9978,
26,
51,
25193,
13,
15895,
8517,
18,
9,
14,
1215,
26,
48,
25,
185,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Serilaization of Pointers (Boost), Dangling Pointer
===
I have the following problem:
I want to serialize an class `serialTestClass` with a Pointer inside.
The strange thing is, which the normal boost approach as described in the Doc, the pointer `ptr` in the class `serialTestClass` gets Replaced without deleting the initialized object, which is after wards dangling in memory, why is that behaviour in boost like this, do I miss something?? Thanks a lot for any help!
<!-- language: lang-cpp -->
struct Obj{
Obj(){}
~Obj(){
std::cout << "Destructing Obj: @" << this << std::endl;
}
};
class serialTestClass
{
public:
BOOST_SERIALIZATION_SPLIT_MEMBER();
serialTestClass(){
ptr1 = new Obj(10);
}
template<class Archive>
void save(Archive & ar, const unsigned int version) const
{
ar & ptr1
//ar & *ptr1; //Works
}
template<class Archive>
void load(Archive & ar, const unsigned int version)
{
ar & ptr;
/*if(ptr1!=0){
ar & *ptr1;
}else{
ptr1 = new Obj();
ar & *ptr1;
}*/
}
void print(std::ostream & f=std::cout){
f << "ptr1 @" << ptr1<<std::endl;
}
Obj * ptr1;
};
void serializationTestDouble(){
std::ofstream ofs("filename");
serialTestClass b();
std::cout<<"Marshalling TestClass: size"<< sizeof(b) << std::endl;
b.print();
// save data
{
boost::archive::binary_oarchive oa(ofs);
oa << b;
}
// ... some time later restore the class instance to its orginal state
std::cout<<"Unmarshalling Body:"<<std::endl;
serialTestClass b2(); // INITIALIZE (POINTER IS NOT ZERO!)
b2.print();
{
std::ifstream ifs("filename");
boost::archive::binary_iarchive ia(ifs);
ia >> b2;
}
b2.print();
}
| 0 | [
2,
4245,
6048,
1829,
16,
454,
445,
13,
5,
10858,
384,
6,
15,
21849,
454,
106,
800,
3726,
3726,
31,
57,
14,
249,
1448,
45,
31,
259,
20,
5956,
2952,
40,
718,
13,
1,
4104,
2815,
10543,
1898,
1,
29,
21,
454,
106,
572,
9,
14,
257... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Matching a string to a regex from html input
===
I'm having a little trouble figuring out what to do.
Basically using java I'm trying to:
- Reading in the html from a website
- I want to find the content after a certain string in this case being
title="
- Store that in a string.
The first and last steps are simple for me but I'm having no luck (and never had with regex).
I believe this is the beginning of what I need:
String regex = "(?<=title=\")\\S+";
Pattern name = Pattern.compile(regex);
After that I have no clue. Any help?
| 0 | [
2,
10120,
21,
3724,
20,
21,
7953,
1706,
37,
13,
15895,
6367,
800,
3726,
3726,
31,
22,
79,
452,
21,
265,
2572,
25379,
70,
98,
20,
107,
9,
11374,
568,
8247,
31,
22,
79,
749,
20,
45,
13,
8,
1876,
19,
14,
13,
15895,
37,
21,
2271... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Random job scheduling in CMake/Make parallel build to debug dependencies
===
I manage for work a complex C++ project, whose build definitions are written in `CMake` and the build itself is obtained by invoking `make`. The source tree is composed by many modules and it is highly parallelizable.
A linear build always succeeds, while a parallel build is successful most of the times. When a dependency problem is encountered during such a build, I usually go and fix it, but I would like to test dependencies programmatically, instead of fixing problems as they occur.
The first solution would be to go through all dependencies in `CMake` and fix them, but this is not always possible in practice, because we make heavy use of custom macros for some kind of dependencies that are specific to our source tree (I cannot go into details, sorry). I was thinking of injecting some kind of "randomness" in the `Make` job scheduling, so a building machine could try indefinitely to rebuild the tree until a failure is encountered, but another question [(here)][1] pointed out that this feature is not available in `Make`.
What do you think? Could I achieve my goal by working at the `CMake` level instead?
Thanks.
[1]: http://stackoverflow.com/questions/9437459/trigger-missing-dependencies-in-parallel-gnu-make-by-changing-order-of-executi | 0 | [
2,
5477,
1205,
23096,
19,
272,
11115,
118,
11115,
3821,
1895,
20,
121,
16254,
29411,
800,
3726,
3726,
31,
4705,
26,
170,
21,
1502,
272,
20512,
669,
15,
1196,
1895,
18544,
50,
642,
19,
13,
1,
150,
11115,
1,
17,
14,
1895,
1145,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to pass variable in mysqli_multi_query?
===
well, the condition given below is just an example.
i'm trying to set a variable `colour` as `red`. And use the variable in the next query. I tried the following quey, but in vain. What is the right way?
mysqli_multi_query($mysqli, "SET @colour = 'red'; UPDATE fruits SET apple = @colour ") or die('</br>mySqli Error</br>');
| 0 | [
2,
184,
20,
1477,
7612,
19,
51,
18,
1251,
1210,
1,
21531,
1,
8190,
93,
60,
800,
3726,
3726,
134,
15,
14,
2874,
504,
1021,
25,
114,
40,
823,
9,
31,
22,
79,
749,
20,
309,
21,
7612,
13,
1,
26723,
1,
28,
13,
1,
2095,
1,
9,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to evaluate the performance of a ANFIS?
===
I'm doing a project about NIDS classification using ANFIS , but i didn't know how to evaluate the performance of a ANFIS (true positive , false negative , ..... ) ...?
i fined method name classperf() used to evaluate the performance of SVM , but this method not working with me ....
Please if any one have any information ,answer this question
with my respect | 0 | [
2,
184,
20,
13,
15599,
14,
956,
16,
21,
40,
1707,
18,
60,
800,
3726,
3726,
31,
22,
79,
845,
21,
669,
88,
1781,
43,
18,
4039,
568,
40,
1707,
18,
13,
15,
47,
31,
223,
22,
38,
143,
184,
20,
13,
15599,
14,
956,
16,
21,
40,
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... |
return only column name values from mysql table
===
sorry but i didn't knew how to explain the question in on sentence...
actually i have code like this when i do mysql_fetch_array...
[0] => 10
[id] => 10
[1] => 58393
[iid] => 58393
[2] => 0
[ilocationid] => 0
[3] => 38389
[iapptid] => 38389
[4] => 2012-06-30T00:00:00
[ddate] => 2012-06-30T00:00:00
[5] => 1000
[ctimeofday] => 1000
but i want to return something like this
[id] => 10
[iid] => 58393
[ilocationid] => 0
[iapptid] => 38389
[ddate] => 2012-06-30T00:00:00
[ctimeofday] => 1000
i mean without the numeric representatives of the columns. how do i do it...please help... | 0 | [
2,
788,
104,
4698,
204,
4070,
37,
51,
18,
22402,
859,
800,
3726,
3726,
1875,
47,
31,
223,
22,
38,
404,
184,
20,
3271,
14,
1301,
19,
27,
5123,
9,
9,
9,
1121,
31,
57,
1797,
101,
48,
76,
31,
107,
51,
18,
22402,
1,
410,
19913,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
After orientation change, optionsmenu of fragment doesn't disappear
===
I implemented my layout based on this tutorial: android-developers.blogspot.hu/2011/02/android-30-fragments-api.html
The differences are:
- I have different fragments to show, based on the choice in the left
list
- The "details fragments" (those that come to the right) have different options menus
My problem is that if I have already selected something from the left and then rotate the phone to portrait, the last optionsmenu is still there and is visible.
I think the problem comes from the last active "details" fragment is recreated after the orientation change. to test it I created these two methods:
@Override
public void onStart() {
super.onStart();
setHasOptionsMenu(true);
}
@Override
public void onStop() {
super.onStop();
setHasOptionsMenu(false);
}
And I'm showing the right fragment like this:
case R.id.prefs_medicines:
if (mDualPane) {
// Check what fragment is shown, replace if needed.
View prefsFrame = getActivity().findViewById(R.id.preferences);
if (prefsFrame != null) {
// Make new fragment to show this selection.
MedicineListF prefF = new MedicineListF();
// Execute a transaction, replacing any existing
// fragment with this one inside the frame.
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.preferences, prefF);
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
ft.commit();
}
} else {
// Otherwise we need to launch a new activity to display
// the dialog fragment with selected text.
Intent intent = new Intent();
intent.setClass(getActivity(), MedicinePrefsActivity.class);
startActivity(intent);
}
break;
in one of my "details" fragment. when I debugged it, the onstart was called after the rotation.
The problem in pictures:
1: in landscape it's OK
http://img834.imageshack.us/img834/8918/error1d.png
2: in portrait: optionsmenu not needed
http://img860.imageshack.us/img860/8636/error2r.png
**How can I get rid of the optionsmenu in portrait mode?** | 0 | [
2,
75,
10245,
753,
15,
6368,
755,
291,
16,
14847,
1437,
22,
38,
10866,
800,
3726,
3726,
31,
6807,
51,
9106,
432,
27,
48,
29724,
45,
13005,
8,
26051,
445,
9,
7091,
5447,
4296,
9,
2242,
118,
3097,
118,
3564,
118,
290,
18524,
8,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can i get current layout language in firefox extension with Linux/Mac?
===
This can be done with user32.dll on Windows. But how can i get it on Mac/Linux? | 0 | [
2,
184,
92,
31,
164,
866,
9106,
816,
19,
535,
18219,
3896,
29,
13024,
118,
6893,
60,
800,
3726,
3726,
48,
92,
44,
677,
29,
4155,
3125,
9,
43,
211,
27,
1936,
9,
47,
184,
92,
31,
164,
32,
27,
1572,
118,
1226,
7147,
60,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Action on self created View
===
If I've a simple template with a Button which has an Action, and create a ember View using this template, how can I let the action target the function on teh View.
Example:
http://jsfiddle.net/Krutius/DxsXz/ | 0 | [
2,
1028,
27,
1119,
679,
1418,
800,
3726,
3726,
100,
31,
22,
195,
21,
1935,
22894,
29,
21,
5167,
56,
63,
40,
1028,
15,
17,
1600,
21,
13,
19603,
1418,
568,
48,
22894,
15,
184,
92,
31,
408,
14,
1028,
2935,
14,
1990,
27,
13,
22314... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ruby get and set in one method
===
I'm wondering what's the canonical way in Ruby to create custom setter and getter methods. Normally, I'd do this via `attr_accessor` but I'm in the context of creating a DSL. In a DSL, setters are called like this (using the `=` sign will create local variables):
work do
duration 15
priority 5
end
Therefore, they must be implemented like this:
def duration(dur)
@duration = dur
end
However this makes implementing a getter a bit tricky: creating a method with the same name but with no arguments will just overwrite the setter.
So I wrote custom methods that do both the setting and the getting:
def duration(dur=nil)
return @duration = dur if dur
return @duration if @duration
raise AttributeNotDefinedException, "Attribute '#{__method__}' hasn't been set"
end
Is this a good way to go about it? Here's a gist with test cases:
[Ruby Custom Getters & Setters][1]
[1]: https://gist.github.com/3033911
Thanks! | 0 | [
2,
10811,
164,
17,
309,
19,
53,
2109,
800,
3726,
3726,
31,
22,
79,
5712,
98,
22,
18,
14,
5742,
4272,
161,
19,
10811,
20,
1600,
5816,
309,
815,
17,
164,
815,
3195,
9,
4147,
15,
31,
22,
43,
107,
48,
1197,
13,
1,
10303,
139,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.