unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
how to call event listener from the function which is in another scope?
===
I want to call a google event listener which looks like this:
google.maps.event.addListener(trucks[data.results[i].id], 'click', function() {}
from the function which is not defined in the same scope:
function is like this:
function checkData(){}
How can I do that? Can I somehow send the value so it can be the same as the click value? I mean it needs to work on the click event but I want to call it as normal as well. | 0 | [
2,
184,
20,
645,
807,
21772,
37,
14,
1990,
56,
25,
19,
226,
9914,
60,
800,
3726,
3726,
31,
259,
20,
645,
21,
8144,
807,
21772,
56,
1879,
101,
48,
45,
8144,
9,
15022,
18,
9,
4943,
38,
9,
14854,
13891,
106,
5,
20640,
18,
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... |
phpbb - paid membership mod
===
Ok I've searched for the last couple days for a paid membership mod/hack for phpbb3. It seems that everyone starts it and then falls off the face of the earth. I don't know enough about the paypal and phpbb coding (just enough to get done what I need) to want to even try it.
Has anyone seen anything like this that uses paypal?
I know how I would do it on a from scratch script but not how I would do it in conjunction with phpbb. Any help greatly appreciated. | 2 | [
2,
13,
26120,
3490,
13,
8,
2192,
4363,
7226,
800,
3726,
3726,
5854,
31,
22,
195,
9036,
26,
14,
236,
1335,
509,
26,
21,
2192,
4363,
7226,
118,
22983,
26,
13,
26120,
3490,
240,
9,
32,
2206,
30,
1266,
3244,
32,
17,
94,
2564,
168,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Steps to add Selenium Webdriver binaries to CLASSPATH
===
I am a newbie in selenium. I was reading the article from "https://code.google.com/p/selenium/wiki/GettingStarted". As described over there i have downloaded all the binaries and and unzip them into a folder '$WEBDRIVER_HOME'. Now i want to add all the binaries (jars) to CLASSPATH. I just want to know how the selenium binaries can be added to CLASSPATH.
I think classpath is the path we usually define in 'Environment Variables'. If so then what would be the 'variable name' and 'variable value'. Can i add all the downloaded jars to classpath in a single go. I have saved my folder '$WEBDRIVER_HOME' at location "D:\$WEBDRIVER_HOME".
| 0 | [
2,
2382,
20,
3547,
23027,
14311,
2741,
21752,
4511,
11301,
20,
718,
8353,
800,
3726,
3726,
31,
589,
21,
78,
5893,
19,
23027,
14311,
9,
31,
23,
1876,
14,
2002,
37,
13,
7,
21127,
18,
6903,
9375,
9,
16111,
4875,
9,
960,
118,
306,
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... |
RestKit, many to many relationship between questions and tags like Stackoverflow api
===
We're using RestKit to cache data from a remote web-service, similar to Stackoverflows API.
In the API has questions and tags, but instead of getting the tag in text we get the tag id.
The questions resource looks like this:
{
"items": [
{
"question_id": 11260172,
"tags": [
{ "tag_id" : 1},
{ "tag_id" : 2},
{ "tag_id" : 3}
],
"view_count": 1,
[...]
}
The tags resource looks like this:
{
"items": [
{
"id": 1,
"name": "c#",
},
{
"id": 2,
"name": "java",
},
{
"id": 3,
"name": "php",
}]
}
We would like to create a join table between questions and tags, so that the question can have many tags and the tag has many questions.
We have got one to many working but not the join table many to many. We therefore wonder how the RestKit many to many mapping should look for a relationship like this, and how the data model should look.
We have tried the following mapping, but it isn't many-to-many.
[tagMapping mapKeyPath:@"id" toRelationship:@"questions" withMapping:tagsQuestionsMappingMapping];
[questionMapping mapKeyPath:@"tags" toRelationship:@"tags" withMapping:tagsQuestionsMappingMapping];
| 0 | [
2,
760,
13703,
15,
151,
20,
151,
1429,
128,
2346,
17,
3383,
18,
101,
7566,
2549,
9990,
21,
2159,
800,
3726,
3726,
95,
22,
99,
568,
760,
13703,
20,
16522,
1054,
37,
21,
5388,
2741,
8,
11449,
15,
835,
20,
7566,
2549,
9990,
18,
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... |
Windows Authentication pops up multiple times for asp.net app with asp.net app in IFrame for Ipad
===
This is the scenario:
An intranet application built with ASP.NET using integrated windows authentication.
On the start page of this application there is another ASP.NET application embedded in an IFrame which also uses integrated windows authentication. This is no problem for IE users but when iPad users connect to the site with Safari, the authentication pops up two times which is pretty annoying for the users. Is it possible to "share" the first authentication attempt with the other app so that iPad users only need to authenticate once? | 0 | [
2,
1936,
27963,
1675,
18,
71,
1886,
436,
26,
28,
306,
9,
2328,
4865,
29,
28,
306,
9,
2328,
4865,
19,
31,
8361,
26,
31,
8240,
800,
3726,
3726,
48,
25,
14,
12705,
45,
40,
14369,
2328,
3010,
392,
29,
28,
306,
9,
2328,
568,
5547,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Debugging Stopping a Windows Service
===
I'm debugging a windows service in VS2010 with:
static void Main() {
#if(DEBUG)
//ConfigurationManager.Configure();
var s1 = new Service1();
s1.Start();
Thread.Sleep(System.Threading.Timeout.Infinite);
#else
ServiceBase.Run(new ServiceBase[]
{
new Service1()
});
#endif
}
This lets me run the service in the debugger. The problem is that on starting, the service opens a WCF channel which seems to tie up a socket after I kill the process by stopping debugging. How do I close this socket when I stop debugging or if the service is stopped. I tried setting breakpoints in the service destructor, and both the `OnStop` and `OnShutdown` methods, but these aren't called. | 0 | [
2,
121,
16254,
2762,
7048,
21,
1936,
365,
800,
3726,
3726,
31,
22,
79,
121,
16254,
2762,
21,
1936,
365,
19,
4611,
2751,
29,
45,
12038,
11364,
407,
5,
6,
13,
1,
6926,
821,
5,
546,
16254,
6,
12894,
1126,
13549,
857,
22256,
9,
1126... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 download .msi file in Java
===
I want to download .msi file using Java. I have tried to download file with content type below. File can be downloaded but it's corrupted.
response.setContentType("application/x-msi");
response.setContentType("application/msi");
response.setContentType("octet-stream");
Thanks | 0 | [
2,
184,
20,
7121,
13,
9,
79,
18,
49,
3893,
19,
8247,
800,
3726,
3726,
31,
259,
20,
7121,
13,
9,
79,
18,
49,
3893,
568,
8247,
9,
31,
57,
794,
20,
7121,
3893,
29,
2331,
1001,
1021,
9,
3893,
92,
44,
23887,
47,
32,
22,
18,
113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delphi XE2 64-bit extremelly slow binaries
===
I'm porting some applications from 32 to 64 bits delphi, which do a lot of text processing, and noticed an extreme change in processing speed. Did some tests with a few procedures, for example, this takes already more than 200% the time in 64bits than compiling to 32 (2000+ ms compared to ~900)
Is this normal?
function IsStrANumber(const S: AnsiString): Boolean;
var P: PAnsiChar;
begin
Result := False;
P := PAnsiChar(S);
while P^ <> #0 do begin
if not (P^ in ['0'..'9']) then Exit;
Inc(P);
end;
Result := True;
end;
procedure TForm11.Button1Click(Sender: TObject);
Const x = '1234567890';
Var a: Integer;
z: Boolean;
y: Integer;
begin
DebugStuff.PerfTimerInit;
for a := 1 to 99999999 do begin
if IsStrANumber(x) then y := 0;//StrToInt(x);
end;
Caption := IntToStr(DebugStuff.PerfTimerStopMS);
end;
| 0 | [
2,
23030,
13,
13012,
135,
4384,
8,
3326,
4750,
211,
93,
2276,
4511,
11301,
800,
3726,
3726,
31,
22,
79,
1295,
68,
109,
3767,
37,
2512,
20,
4384,
10181,
23030,
15,
56,
107,
21,
865,
16,
1854,
5511,
15,
17,
2711,
40,
4750,
753,
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... |
J2ME Bouncy Castle get AES encryption result as String
===
I'm developing some app in J2ME which send and receives encrypted messages, I found the code below to encrypt it and convert to String but it doesn't work and throw exception, how should I do this? and how should I convert String to byte[] when I want to do decryption? thanks
byte[] plainArray = message.getBytes();
try {
byte[] keyBytes = "SECRET_1SECRET_2SECRET_3".getBytes();
// key = new KeyParameter(keyBytes);
AESEngine engine = new AESEngine();
PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(engine);
cipher.init(true, new KeyParameter(keyBytes));
byte[] cipherBytes = new byte[cipher.getOutputSize(plainArray.length)];
int cipherLength = cipher.processBytes(plainArray, 0, plainArray.length, cipherBytes, 0);
cipher.doFinal(cipherBytes, cipherLength);
String result2 = org.apache.commons.codec.binary.Base64.encodeBase64String(cipherBytes);
formSender.append(result2);
} catch (Exception e) {
}
Exception :
> TRACE: <at java.lang.Error: ClassFormatError: 56>, Exception caught
> in Display class java.lang.Error: ClassFormatError: 56 at
> SSMS.EncShow(), bci=173 at SSMS.commandAction(), bci=16 at
> javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(),
> bci=44 at
> com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=80
> at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=31 at
> com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=48 at
> com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at
> javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(),
> bci=32 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=294
> at com.sun.midp.events.EventQueue.run(), bci=177 at
> java.lang.Thread.run(Thread.java:722) | 0 | [
2,
487,
135,
790,
5963,
14386,
1339,
164,
21,
160,
24420,
829,
28,
3724,
800,
3726,
3726,
31,
22,
79,
3561,
109,
4865,
19,
487,
135,
790,
56,
2660,
17,
8359,
29403,
7561,
15,
31,
216,
14,
1797,
1021,
20,
1957,
11435,
32,
17,
840... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 microsoft ace.oledb.12.0 clustered environment
===
Has any one successfully used MicroSoft's ace.oledb.12.0 provider (installed via either "2007 Office System Driver: Data Connectivity Components" or "Microsoft Access Database Engine 2010 Redistributable" in a clustered environment? We have SQL Server 2005 on a 64bit server.
I could do with using it to load an Excel spreadsheet from SQL server table data, but our Technical Services team have advised me that our SQL servers run in a clustered environment.
Any advice appreciated. Thank you.
Best regards,
Duane. | 0 | [
2,
568,
7099,
7878,
9,
6069,
9007,
9,
918,
9,
387,
7460,
69,
2307,
800,
3726,
3726,
63,
186,
53,
3673,
147,
7099,
22,
18,
7878,
9,
6069,
9007,
9,
918,
9,
387,
11747,
13,
5,
108,
21300,
69,
1197,
694,
13,
7,
2727,
488,
329,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Optimize insert and delete Operation large indexed mssql table
===
Actually my problem is, I have table which is having 20 crore records,Every week i am going to delete around 50lac old records and inserting 40 to 50 new records into the table,then daily basis clients using my table extracting records based on some condition,
My requirement is how to optimize insert operation,Delete operation,and also select operation,
I created index also my table even though some of above operation taking to much time,
When insert,delete,select records it took around 4 to 5 hours, | 1 | [
2,
22864,
14692,
17,
27448,
1453,
370,
4348,
69,
4235,
18,
22402,
859,
800,
3726,
3726,
1121,
51,
1448,
25,
15,
31,
57,
859,
56,
25,
452,
434,
21693,
742,
15,
12068,
877,
31,
589,
228,
20,
27448,
140,
1222,
9439,
315,
742,
17,
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... |
file_get_contents() takes time, is there a workaround?
===
this script runs at cron and is used to send message to a certain user and it triggers an api to pass the message. the problem now is it takes time waiting for reply from the api, is there any way to skip it for a moment and will return after the rest are done.
#!/usr/bin/php
<?php
$api = new database('sql://user:pass@00.000.000.000/sender');
define('VERBOSE', true);
// prepare messages to send...
//"START"
$pid = getmypid();
//"CHECKING FOR MESSAGES TO BE SEND"
$messages = $api->read("SELECT mid,message,url,name FROM sender_msg WHERE sent=0",true);
if (empty($messages)) {
//"NO MESSAGE FOUND"
exit();
}
//"MESSAGE FOUND NOW SENDING..."
foreach ($messages as $m)
{
$m['name'] = urlencode($m['name']);
$sqlPath = $api->read("SELECT src,dst FROM config WHERE url='{$m['url']}' LIMIT 1");
$sSrc = $sqlPath[0][0];
$sDst = $sqlPath[0][1];
$sql = $api->query("UPDATE sender.sender_msisdn SET pid='{$pid}' WHERE status='pending' AND mid={$m['mid']} LIMIT 500");
//"UPDATE PID"
if (mysql_affected_rows() == 0){
//"none affected"
continue;
}
$qry = $api->query("SELECT id,msisdn FROM sender.sender_msisdn WHERE pid='{$pid}' AND status='pending' LIMIT 500");
//"SELECT PID"
echo mysql_num_rows($qry)."\n\n";
$i = '';
while($i = mysql_fetch_row($qry)) {
//"SENDING MESSAGE TO ".$i[1].""
$bRet = @file_get_contents("http://api.apisender.com{$m['url']}?to={$i[1]}&from={$m['name']}&msg=".urlencode($m['message']));
if($bRet === false) {
//"MESSAGE SENDING FAILED"
$oUpdateMsisdn = $api->query("UPDATE sender_msisdn SET status='failed' WHERE id={$i[0]}");
} else {
//"MESSAGE SENT"
$oUpdateMsisdn = $api->query("UPDATE sender_msisdn SET status='success' WHERE id={$i[0]}");
if($oUpdateMsisdn) {
$sql = $api->query("SELECT COUNT(*) as mobilecount FROM sender.sender_msisdn WHERE status='pending' AND mid={$m['mid']}");
$oRec = mysql_fetch_row($sql);
echo $nCountOfMobileNo = $oRec[0];
if($nCountOfMobileNo > 0) {
//"THERE'S MORE"
} else {
//"UPDATING MESSAGE"
$sql = $api->query("UPDATE sender_msg SET sent=1 WHERE mid={$m['mid']}");
if(!$sql) {
echo "error";
} else {
echo "ok";
}
}
}
}
}
//"--END --"
exit();
}
?> | 0 | [
2,
3893,
1,
3060,
1,
25424,
18,
5,
6,
1384,
85,
15,
25,
80,
21,
170,
10037,
60,
800,
3726,
3726,
48,
3884,
1461,
35,
13,
19587,
17,
25,
147,
20,
2660,
2802,
20,
21,
1200,
4155,
17,
32,
7286,
18,
40,
21,
2159,
20,
1477,
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... |
weird quirk: pushState and/or hashChange clear the title from the browser tab
===
I have an ASP.NET MVC 3 app that I have built as a single page app that following the example(s) in the [BigShelf SPA][1] using Knockout.js and History.js to handle user interaction and navigation. Everything works fine, but I'm noticing a weird quirk with the title being displayed in the browser tab:
1. When the app loads, the browser tab title properly displays the content of the `<title>` tag, i.e., `My Single Page App`
3. When History.js uses either `pushState` or `hashChange` (depending on the capability of the browser) to modify the URL, the browser's tab title is set to the newly modified URL, i.e., the browser tab now reads `http://www.mysinglepageapp.com/modified/url`
Again, functionally there's no problem, but it's odd to me that the tab title is also modified. This is happening in all browsers that I've tested (IE6+, FF, Chrome, Safari).
Is their anyway to change or control this behavior?
[1]: http://code.msdn.microsoft.com/ASPNET-Single-Page-d6d7172c | 0 | [
2,
5455,
19321,
45,
3250,
3859,
17,
118,
248,
19170,
16229,
1207,
14,
581,
37,
14,
16495,
6523,
800,
3726,
3726,
31,
57,
40,
28,
306,
9,
2328,
307,
8990,
203,
4865,
30,
31,
57,
392,
28,
21,
345,
2478,
4865,
30,
249,
14,
823,
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... |
Can someone help explain some of the new SSIS 2012 properties?
===
As someone who's learning SSIS, there are some new properties in **SSIS 2012** that I can't find any documentation/explanations for. Thus, I'm hoping someone can explain them:
In the Maintenance Cleanup Task, the BIDS property grid has a DeleteFromAllBricks property. What does that property control?
In the Back Up Database Task, I see the CopyOnlyBackup, IgnoreReplicaType, and UseExpiration (which is also present in 2008) properties. What are these properties for?
In one of my dtsx files, there's a Rebuild Index task with a SkipUnsupported property. What does SkipUnsupported do?
Note that none of these properties have their description fields set in BIDS and when searching online, I can't find any definitions. | 0 | [
2,
92,
737,
448,
3271,
109,
16,
14,
78,
13,
18,
4557,
563,
3704,
60,
800,
3726,
3726,
28,
737,
72,
22,
18,
2477,
13,
18,
4557,
15,
80,
50,
109,
78,
3704,
19,
13,
1409,
18,
4557,
563,
1409,
30,
31,
92,
22,
38,
477,
186,
139... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bring up keyboard when cell pressed?
===
Is there a way to bring up the keyboard when I click on a cell in a UITableView?
I tried to find some way to connect one of the outlets of a cell to a declared IBAction but that doesn't seem to work.
Thanks! | 0 | [
2,
1499,
71,
8896,
76,
1667,
2931,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
1499,
71,
14,
8896,
76,
31,
10840,
27,
21,
1667,
19,
21,
13,
11193,
579,
4725,
60,
31,
794,
20,
477,
109,
161,
20,
6379,
53,
16,
14,
13071,
16,
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... |
detecting a change in the page including refresh
===
so i am working in a .tpl file meaning i am open to js, html and php answers. what i want to do is whenever a person refreshes the page, experience a change in the url or exits the browser, my site would take an action based on this change of state. so basically, when they leave that specific page of mines in any way, i would call a function. the reason i want this is because i am saving this editable image on my site. but whenever they leave the page, i want the image the created to be autosaved. | 0 | [
2,
9092,
68,
21,
753,
19,
14,
2478,
215,
24905,
800,
3726,
3726,
86,
31,
589,
638,
19,
21,
13,
9,
38,
5727,
3893,
1813,
31,
589,
368,
20,
487,
18,
15,
13,
15895,
17,
13,
26120,
6709,
9,
98,
31,
259,
20,
107,
25,
6634,
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... |
NumberFormatException Error Mapreduce
===
I am running a Mapreduce Job using Hadoop through Cygwin. I am getting the following NumberFormatException Error... any idea how i can fix this outside of try & catch because i think the try & catch is bypassing the error but not allowing me to get the results i expect.
Error:
12/07/19 17:10:31 INFO mapred.JobClient: Task Id : attempt_201207190234_0010_m_000000_2, Status : FAILED
java.lang.NumberFormatException: For input string: "MAX"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at Node.<init>(Node.java:48)
at GraphJob$SearchMapper.map(GraphJob.java:18)
Here is my Mapper and Reduce..
public class GraphJob {
public static class SearchMapper extends Mapper<Object, Text, Text, Text>{
public void map(Object key, Text value, Context context)
throws IOException, InterruptedException{
try{
Node inNode = new Node(value.toString());
if(inNode.getColor() == Node.Color.GRAY) {
for(String neighbor : inNode.getEdges()) {
Node adjacentNode = new Node();
adjacentNode.setId(neighbor);
int distance = inNode.getDistance() + 1;
adjacentNode.setDistance(distance);
if (distance < 2){
adjacentNode.setColor(Node.Color.GRAY);
}
else{
adjacentNode.setColor(Node.Color.BLACK);
}
adjacentNode.setParent(inNode.getId());
context.write(new Text(adjacentNode.getId()), adjacentNode.getNodeInfo());
}
inNode.setColor(Node.Color.BLACK);
}
context.write(new Text(inNode.getId()), inNode.getNodeInfo());
}catch(Exception e){
}
}
}
public static class SearchReducer extends Reducer<Text, Text, Text, Text> {
public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
Node outNode = new Node();
outNode.setId(key.toString());
for (Text value : values) {
Node inNode = new Node(key.toString() + "\t" + value.toString());
if(inNode.getEdges().size() >0) {
outNode.setEdges(inNode.getEdges());
}
if (inNode.getDistance() < outNode.getDistance()) {
outNode.setDistance(inNode.getDistance());
outNode.setParent(inNode.getParent());
}
if (inNode.getColor().ordinal() > outNode.getColor().ordinal()) {
outNode.setColor(inNode.getColor());
}
}
context.write(key, new Text(outNode.getNodeInfo()));
}
}
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
String[] otherargs = new GenericOptionsParser(conf, args).getRemainingArgs();
Job job = new Job(conf, "GraphJob");
job.setJarByClass(GraphJob.class);
job.setMapperClass(SearchMapper.class);
job.setReducerClass(SearchReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(Text.class);
FileInputFormat.addInputPath(job, new Path(otherargs[0]));
FileOutputFormat.setOutputPath(job, new Path(otherargs[1]));
System.out.println("start the job");
System.exit(job.waitForCompletion(true) ? 0 : 1);
}
}
Here is a sample of my text file..
1 2,7|0|GRAY|NULL
2 3,6,8|MAX|WHITE|NULL
3 2,4,5,6,8|MAX|WHITE|NULL
4 3,5,9|MAX|WHITE|NULL
5 3,4,8|MAX|WHITE|NULL
6 2,3|MAX|WHITE|NULL
7 1,8|MAX|WHITE|NULL
8 2,3,5,7,9|MAX|WHITE|NULL
9 4,8|MAX|WHITE|NULL | 0 | [
2,
234,
23588,
10066,
872,
7019,
2942,
99,
16041,
800,
3726,
3726,
31,
589,
946,
21,
2942,
99,
16041,
1205,
568,
41,
21709,
120,
6728,
263,
4181,
9,
31,
589,
1017,
14,
249,
234,
23588,
10066,
872,
7019,
9,
9,
9,
186,
882,
184,
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... |
Qt No matching function for call to mainWindow::connect()
===
I'm trying to connect a combo box value and a label such that when the combo box changes the label reflects that. I have googled my heart out trying to find an answer but, as of yet, nothing has worked; I still get the error:`no matching function for call to mainWindow::connect(QComboBox*&, const char [38], QString*, const char [26])`
I have tried `QObject::connect`, `QWidget::connect` and anything else dealing with Qt, but to no avail.
Creating a label that says the combo box value is not the express intention of the program. Rather, I wish to get it working with a simple label then change it to what I want it to display (thus the `tempLabel`).
Here is my mainWindow.h:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QComboBox>
#include <QLabel>
#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QCheckBox>
class QAction;
class QMenu;
class mainWindow : public QMainWindow{
Q_OBJECT
public:
mainWindow(QWidget *parent=0);
private slots:
QString getClass(QComboBox *box);
private:
//void generate();
QComboBox *mathClassCombo; //drop down menu with all the math classes
QLabel *mathClass; //label that says Math Class
QLabel *examTitle; //label that says Title for Exam
QWidget *win; //main window
QVBoxLayout *mainLayout; //main layout to paste the other layouts to
QHBoxLayout *topLayout; //layout containing math class selection and add class button
QHBoxLayout *middleLayout; //where all the check boxes for the selected class go
QHBoxLayout *bottomLayout; //where title for exam and generate button go
QPushButton *addClass; //button for adding a class
QLineEdit *examName; //line edit for entering exam name
QPushButton *generate; //button for generating exam
QCheckBox **mathClassCheck; //array for all the check boxes
QLineEdit **mathClassLine; //array for all the line edits for the quantity of questions
QLabel *tempLabel;
};
#endif
And here is my mainWindow.cpp:
#include <QtGui>
#include <QString>
#include <fstream>
#include <string>
#include "mainWindow.h"
mainWindow::mainWindow(QWidget *parent){
win = new QWidget;
mainLayout = new QVBoxLayout;
//start top
topLayout = new QHBoxLayout;
mathClassCombo = new QComboBox();
std::string mathClassName; //fill combo box with math classes
std::ifstream myFile("mathClasses.txt");
if(myFile.is_open()){
while(myFile.good()){
getline(myFile,mathClassName);
mathClassCombo->addItem(mathClassName.c_str());
}
}
myFile.close();
mathClass = new QLabel("Math Class:");
mathClass->setBuddy(mathClassCombo);
addClass = new QPushButton("Add Class");
//end top
//start middle
middleLayout = new QHBoxLayout;
QString QmathClassName;
tempLabel = new QLabel(QmathClassName);
//end middle
//start bottom
bottomLayout = new QHBoxLayout;
examName = new QLineEdit;
examTitle = new QLabel("Title For Exam:");
examTitle->setBuddy(examName);
generate = new QPushButton("Generate Exam!");
//end bottom
//connections
QObject::connect( mathClassCombo, SIGNAL(currentIndexChanged(const QString &)), &QmathClassName, SLOT(getClass(mathClassCombo)) );
//add stuff to top
topLayout->addWidget(mathClass);
topLayout->addWidget(mathClassCombo);
topLayout->addWidget(addClass);
topLayout->addStretch();
//add stuff to middle
middleLayout->addWidget(tempLabel);
//add stuff to bottom
bottomLayout->addWidget(examTitle);
bottomLayout->addWidget(examName);
bottomLayout->addWidget(generate);
//add stuff to main
mainLayout->addLayout(topLayout);
mainLayout->addLayout(middleLayout);
mainLayout->addLayout(bottomLayout);
//setting it to main window
win->setLayout(mainLayout);
win->setWindowTitle("Math Exam Creator");
win->show();
}
//gets name from combo box
QString mainWindow::getClass(QComboBox *box){
return box->currentText();
}
Any help would be greatly appreciated! | 0 | [
2,
2593,
38,
90,
10120,
1990,
26,
645,
20,
407,
27508,
45,
45,
25996,
5,
6,
800,
3726,
3726,
31,
22,
79,
749,
20,
6379,
21,
22621,
1649,
1923,
17,
21,
1899,
145,
30,
76,
14,
22621,
1649,
1693,
14,
1899,
11967,
30,
9,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Validate radio button, and make sure text field is not blank - Javascript - SMF Forum
===
I have a SMF forum, and was to check a field is complete, if a radio button is dotted/checked on the registration form.
Here is the part of the code
<input type="radio" name="customfield[cust_platfo]" class="input_radio" id="customfield_cust_platfo_0" value="0" >
<input type="radio" name="customfield[cust_platfo]" class="input_radio" id="customfield_cust_platfo_1" value="1" >
<input type="radio" name="customfield[cust_platfo]" class="input_radio" id="customfield_cust_platfo_2" value="2" >
Now if value="0" is dotted/selected I want the following text field to be completed
<input type="text" name="customfield[cust_playst]" maxlength="255" size="50" value="" class="input_text" />
Also I am going to need the full code, to give out a javascript error, when they click on the register button, as in what do I put in the form code etc...
Thanks | 0 | [
2,
7394,
1373,
603,
5167,
15,
17,
233,
562,
1854,
575,
25,
52,
6463,
13,
8,
8247,
8741,
13,
8,
13,
18,
13235,
5691,
800,
3726,
3726,
31,
57,
21,
13,
18,
13235,
5691,
15,
17,
23,
20,
2631,
21,
575,
25,
1279,
15,
100,
21,
603,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does memory leak checkers like Valgrind identify free
===
I want to understand how does memory leak checkers identify if a free has been called for a given malloc.
malloc can easily be identified by brk system calls, so if i am writing a profiler and do a single stepping on a process which breaks at system calls i can easily understand that malloc has been done.
How can i find if a free has been called for this malloc? | 0 | [
2,
184,
630,
1912,
11724,
2631,
445,
101,
3347,
23244,
43,
5808,
551,
800,
3726,
3726,
31,
259,
20,
1369,
184,
630,
1912,
11724,
2631,
445,
5808,
100,
21,
551,
63,
74,
227,
26,
21,
504,
3668,
2499,
9,
3668,
2499,
92,
2351,
44,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to run and get document stats from boilerpipe article extractor?
===
There's something I'm not quite understanding about the use of boilerpipe's ArticleExtractor class. Albeit, I am also very new to java, so perhaps my basic knowledge of this enviornemnt is at fault.
anyhow, I'm trying to use boilerpipe to extract the main article from some raw html source I have collected. The html source text is stored in a java.lang.String variable (let's call it htmlstr) variable that has the raw HTML contents of a webpage.
I know how to run boilerpipe to print the extracted text to the output window as follows:
java.lang.String htmlstr = "<!DOCTYPE.... ****html source**** ... </html>";
java.lang.String article = ArticleExtractor.INSTANCE.getText(htmlstr);
System.out.println(article);
However, I'm not sure how to run BP by first instantiating an instance of the ArticleExtractor class, then calling it with the 'TextDocument' input datatype. The TextDocument datatype is itself somehow constructed from BP's 'TextBlock' datatype, and perhaps I am not doing this correctly...
What is the proper way to construct a TextDocument type variable from my htmlstr string variable?
So my problem is then in using the processing method of BP's Article Extractor class aside from calling the ArticleExtractor getText method as per the example above. In other words, I'm not sure how to use the
ArticleExtractor.process(TextDocument doc);
method.
It is my understanding that one is required to run this ArticleExtractor process method to then be able to use the same "TextDocument doc" variable for getting document stats, using BP's
TextDocumentStatistics(TextDocument doc, boolean contentOnly)
method? I would like to use the stats to determine how good the filtering was estimated to be.
Any code examples someone could help me out with?
Thanks,
Brian
| 0 | [
2,
184,
20,
485,
17,
164,
4492,
12819,
18,
37,
11755,
15185,
2002,
10962,
248,
60,
800,
3726,
3726,
80,
22,
18,
301,
31,
22,
79,
52,
1450,
3260,
88,
14,
275,
16,
11755,
15185,
22,
18,
2002,
1706,
19915,
248,
718,
9,
15080,
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... |
Switching to SQL Server 2012 with Entity Framework
===
Does anyone of you has any experience with switching from SQL Server 2008 to SQL Server 2012 with Entity Framework?
How do I accomplish that? Do I only need to change the ConnectionString in the app.config or will I face any difficulties? | 0 | [
2,
13027,
20,
4444,
255,
8128,
563,
29,
9252,
6596,
800,
3726,
3726,
630,
1276,
16,
42,
63,
186,
1496,
29,
13027,
37,
4444,
255,
8128,
570,
20,
4444,
255,
8128,
563,
29,
9252,
6596,
60,
184,
107,
31,
14570,
30,
60,
107,
31,
104,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Django - Template traversing models
===
I have _users_, _videos_, _topics_, _criterias_ and _ratings_
- A _video_ has a _topic_
- A _topic_ has _criterias_
- A _user_ can create a _video_ for a given _topic_
- A _user_ can rate a _video_ on each _criterias_ given for the _concerned_ topic.
You can see my original post http://stackoverflow.com/questions/6388259/django-rating-model-example-detailview-template to get details on the model used
I have extended a `DetailView` template based on the _video_ model to put the list of _ratings_ for the selected _video_ for a given _user_ as extra context.
class VideoFileDetailView(DetailView):
model = VideoFile
def get_context_data(self, **kwargs):
context = super(VideoFileDetailView, self).get_context_data(**kwargs)
context['rates'] = VideoRate.objects.filter(video=self.object, user=self.request.user)
return context
In the template pointed by the `DetailView`, I'd like to list the _criterias_ of the _video_, and for each _criteria_ display the current **rating value** form the _user_.
<div id="rating">
<ul>
{% for crit in videofile.topic.crits.all %}
<li>
{% for rate in rates %}
{% if rate.crit.id == crit.id %}
{{ rate.rate }}
{% endif %}
{% endfor %}
<div class="rateit"
data-rateit-value="{# The rating value #}"
data-rateit-ispreset="true"
crit-id="{{ crit.id }}"></div>
{{ crit }}
</li>
{% endfor %}
</ul>
</div>
([rateit][1] is a jquery plugin that I use to draw pretty stars rating controls)
Actually I get my rating values here within the 2nd `for`s but I'm sure there is a better way to do that. In fact, I'm still not sure about my [model][2] correctness.
[1]: http://www.radioactivethinking.com/rateit/example/example.htm
[2]: http://stackoverflow.com/questions/6388259/django-rating-model-example-detailview-template | 0 | [
2,
3857,
14541,
13,
8,
22894,
19501,
68,
2761,
800,
3726,
3726,
31,
57,
13,
1,
16704,
18,
1,
15,
13,
1,
14785,
18,
1,
15,
13,
1,
3880,
8354,
1,
15,
13,
1,
16063,
9605,
18,
1,
17,
13,
1,
15073,
18,
1,
13,
8,
21,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python UTF-16 encoding hex representation
===
I have a string in Python 2.7.2 say u"\u0638".
When I write it to file:
f = open("J:\\111.txt", "w+")
f.write(u"\u0638".encode('utf-16'))
f.close()
In hex it looks like: FF FE 38 06
When i print such a string to stdout i will see: '\xff\xfe8\x06'.
*The querstion:* **Where is \x38 in the string output to stdout?** In other words why the string output to stdout is not '\xff\xfe\x38\x06'?
If I write the string to file twice:
f = open("J:\\111.txt", "w+")
f.write(u"\u0638".encode('utf-16'))
f.write(u"\u0638".encode('utf-16'))
f.close()
The hex representation in file contains byte order mark (BOM) \xff\xfe *twice*: FF FE 38 06 FF FE 38 06
**I wonder what is the techique to avoid writting BOM in UTF-16 encoded strings?** | 0 | [
2,
20059,
287,
11720,
8,
1091,
19608,
24,
396,
5442,
800,
3726,
3726,
31,
57,
21,
3724,
19,
20059,
172,
9,
465,
9,
135,
395,
287,
7,
1,
291,
3370,
3665,
7,
9,
76,
31,
2757,
32,
20,
3893,
45,
398,
800,
368,
5,
7,
728,
45,
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 receive userinfo with google adwords api libraries
===
I'm using the Google Adwords API libraries and I would like to receive the userinfo of the logged in user. I added the userinfo scope as followed:
googleAdwordsUser = new AdWordsUser();
string oauth_callback_url = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path);
googleAdwordsUser.OAuthProvider = new AdsOAuthNetProvider("https://adwords-sandbox.google.com/api/adwords/ https://www.googleapis.com/auth/userinfo.email",
oauth_callback_url,
Session.SessionID);
When the callback url is called, I'm trying to get the users emailaddress, but it isn't working, the error 'The remote server returned an error: (401) Unauthorized.' is thrown.
string url = @"https://www.googleapis.com/oauth2/v2/userinfo?access_token=" + token;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "GET";
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
string result = string.Empty;
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
{
result = sr.ReadToEnd();
}
Does somebody knows how to fix this?
Thanks. | 0 | [
2,
184,
20,
2588,
4155,
108,
4120,
29,
8144,
21,
43,
12827,
21,
2159,
8649,
800,
3726,
3726,
31,
22,
79,
568,
14,
8144,
21,
43,
12827,
21,
2159,
8649,
17,
31,
83,
101,
20,
2588,
14,
4155,
108,
4120,
16,
14,
13,
19287,
19,
4155... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Will a ScheduledExecutorService create new threads as needed?
===
I'm using [`Executors.newScheduledThreadPool()`][1] to create a [`ScheduledExecutorService`][2], specifying the number of threads like so:
int corePoolSize = 42;
ScheduledExecutorService foo = Executors.newScheduledThreadPool(corePoolSize);
According to the JavaDocs, the `corePoolSize` argument sets
> the number of threads to keep in the pool, even if they are idle.
Does this mean that this `ExecutorService` implementation may create more than `corePoolSize` threads as needed, similar to a [cached thread pool][3]?
[1]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newScheduledThreadPool%28int%29
[2]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html
[3]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool%28%29 | 0 | [
2,
129,
21,
3758,
1706,
17194,
2153,
11449,
1600,
78,
20396,
28,
851,
60,
800,
3726,
3726,
31,
22,
79,
568,
636,
1,
1706,
17194,
10778,
9,
14962,
6261,
1287,
69,
96,
10647,
13378,
5,
6,
1,
500,
2558,
165,
500,
20,
1600,
21,
636,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to detect if a new Wlan/Lan connection is established? PC
===
how can i detect if my PC or Laptop has receive a new Ip?
My Programm read all local IPs ober DNS.GetHostAddresses and bind a socket on every IP. But after a standby of my laptop i cannot connect to my programm. Is there a way or a event in the System.net to notice if the PC receive a new Ip?
A extra thread that check the current interfaces is my work around :/
Thanks for any answers!
| 0 | [
2,
184,
20,
9092,
100,
21,
78,
619,
1804,
118,
1804,
2760,
25,
613,
60,
5168,
800,
3726,
3726,
184,
92,
31,
9092,
100,
51,
5168,
54,
12294,
63,
2588,
21,
78,
15735,
60,
51,
625,
79,
1302,
65,
375,
31,
1919,
8578,
13,
43,
2172,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I pass a callback function to sqlite3_exec on iOS 5.1?
===
I am new to both xcode/iOS/Objective-C and sqlite. I am trying to teach myself the basics - and I would like to use the sqlite3 wrapper "sqlite3_exec" for a select query. For some reason, I can't find a simple example anywhere of someone doing this.
Basically, the method has a parameter (the third one) for a callback function:
int sqlite3_exec(
sqlite3*, /* An open database */
const char *sql, /* SQL to be evaluated */
int (*callback)(void*,int,char**,char**), /* Callback function */
void *, /* 1st argument to callback */
char **errmsg /* Error msg written here */
);
That's fine. I'm no stranger to callbacks. However, I just can't seem to get the syntax down right. I took over one of the view controllers in my iPad (iOS 5.1) xcode (4.3) project, and made the changes shown below:
#import "SecondViewController.h"
#import "sqlite3.h"
#import "AppState.h"
@interface SecondViewController ()
@end
@implementation SecondViewController
- (int)myCallback:(void *)a_parm argc:(int)argc argv:(char **)argv column:(char **)column
{
return 0;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//grab questionnaire names
char *sql = "select * from QST2Main order by [Name]";
char *err = nil;
sqlite3 *db = [[AppState sharedManager] getgCn];
sqlite3_exec(db, sql, myCallback, nil, &err);
}
Essentially, I want to run a query when this view first loads, to store some data for later use. But, XCode doesn't like the "myCallback" usage at the bottom there. It says:
Undeclared Use of Identifier 'myCallback.'
That method is declared in the header file, and I've even tried making it static. Nothing seems to make this error go away. I know I must be doing something fundamentally wrong here, but for the life of me I can't figure out what - I can't even find other code samples in this area that could help me figure out what I'm missing.
Many thanks! | 0 | [
2,
184,
107,
31,
1477,
21,
645,
1958,
1990,
20,
4444,
10601,
240,
1,
1706,
3319,
27,
13,
7760,
331,
9,
165,
60,
800,
3726,
3726,
31,
589,
78,
20,
156,
993,
9375,
118,
7760,
118,
23793,
1284,
8,
150,
17,
4444,
10601,
9,
31,
589... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mismatch of 'this' address when base class is not polymorphic but derived is
===
There is this code:
#include <iostream>
class Base
{
public:
Base() {
std::cout << "Base: " << this << std::endl;
}
int x;
int y;
int z;
};
class Derived : Base
{
public:
Derived() {
std::cout << "Derived: " << this << std::endl;
}
void fun(){}
};
int main() {
Derived d;
return 0;
}
The output:
Base: 0xbfdb81d4
Derived: 0xbfdb81d4
However when function 'fun' is changed to virtual in Derived class:
virtual void fun(){} // changed in Derived
Then address of 'this' is not the same in both constructors:
Base: 0xbf93d6a4
Derived: 0xbf93d6a0
The other thing is if class Base is polymorphic, for example I added there some other virtual function:
virtual void funOther(){} // added to Base
then addresses of both 'this' match again:
Base: 0xbfcceda0
Derived: 0xbfcceda0
The question is - why 'this' address is different in Base and Derived class when Base class is not polymorphic and Derived class is? | 0 | [
2,
2462,
12280,
16,
13,
22,
1565,
22,
3218,
76,
1000,
718,
25,
52,
3446,
12498,
596,
47,
3981,
25,
800,
3726,
3726,
80,
25,
48,
1797,
45,
6926,
22640,
13,
1,
1963,
11260,
1,
718,
1000,
13,
1,
317,
45,
1000,
5,
6,
13,
1,
354,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Meteor on Windows XP / fiber.node failed
===
Hy ..
I have installed Meteor successful on Windows XP. Creating a new project works, but running the project doesn't work. Application crashes with following error:
module.js:485
process.dlopen(filename, module.exports);
^
Error: no errorC:\Programme\Meteor\lib\node_modules\fibers\bin\win32-ia32\fibers.node
at Object.Module._extensions..node (module.js:485:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\Programme\Meteor\lib\node_modules\fibers\fibers.js:13:1)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
Exited with code: 1
Your application is crashing. Waiting for file change.
**Environment:**
- Windows XP (SP3)
- node.js v0.8.3
- meteor v0.3.7
- npm v1.1.43
I'm very thankful for every tip. | 0 | [
2,
17522,
27,
1936,
23045,
13,
118,
13197,
9,
251,
546,
1702,
800,
3726,
3726,
4085,
13,
9,
9,
31,
57,
4066,
17522,
1300,
27,
1936,
23045,
9,
2936,
21,
78,
669,
693,
15,
47,
946,
14,
669,
1437,
22,
38,
170,
9,
3010,
21563,
29,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
google app engine (python27) fetch request url
===
I have been trying to get the request url as follows
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
print self.request.get('url')
app = webapp2.WSGIApplication([('/.*', MainPage)], debug=True)
when the request is
http://localhost:8080/index.html
it gives me something like
Status: 200 Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Content-Length: 70
what I need to get is something like
index.html
I have already checked [Request documentation](https://developers.google.com/appengine/docs/python/tools/webapp/requestclass) and tried many alternatives yet I can't seem to find a solution. I'm quite new to web development. What am I missing? | 0 | [
2,
8144,
4865,
1406,
13,
5,
6448,
11570,
2567,
6,
18312,
3772,
287,
6362,
800,
3726,
3726,
31,
57,
74,
749,
20,
164,
14,
3772,
287,
6362,
28,
2415,
9010,
2741,
7753,
135,
718,
407,
6486,
5,
14113,
7753,
135,
9,
99,
10351,
3203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Easiest way to play SOUND with MONO on OSX
===
Play Sound MONO OSX
I am writing a simple timer app for OSX10.6 using Mono.
How can I play an alarm sound (it may be a wav/mp3 file or something else)?
I tried several ways, unfortunately none did work.
I)
<pre>MonoMac.AppKit.NSSound alarm = new MonoMac.AppKit.NSSound("alarm.wav") ;
alarm.Play();</pre>
[NSSOUND][1] seems to be not supported by Mono yet.
II)
<pre>System.Media.SoundPlayer player = new System.Media.SoundPlayer("alarm.wav");
player.PlaySync();</pre>
Did not work either.
III)
I was able to play a sound by opening a System.Diagnostics.Process and then use the OSX command line command afplay.
Unfortunately, this command open a new terminal window, which is quite annoying in a gui app.
I realize there are CoreAudio bindings in Mono. But I have not figured out how to use them to play a sound.
Thanks a lot for helping.
[1]: http://docs.go-mono.com/?link=C:MonoMac.AppKit.NSSound%28System.String,System.Boolean%29 | 0 | [
2,
27237,
161,
20,
418,
646,
29,
4129,
27,
13,
759,
396,
800,
3726,
3726,
418,
646,
4129,
13,
759,
396,
31,
589,
1174,
21,
1935,
85,
139,
4865,
26,
13,
759,
396,
1036,
9,
379,
568,
4129,
9,
184,
92,
31,
418,
40,
6490,
646,
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... |
Quirks mode and standard mode
===
When web site is created using HTML 5 and CSS 3 and of course “<!DOCTYPE html>” -doctye
is it mean that my code should match to the html 5 and css 3 standard. But how to handle Quirks mode? | 0 | [
2,
19321,
18,
3740,
17,
1236,
3740,
800,
3726,
3726,
76,
2741,
689,
25,
679,
568,
13,
15895,
331,
17,
272,
18,
18,
203,
17,
16,
674,
13,
1,
187,
13799,
4474,
13,
15895,
1,
13,
8,
13799,
1084,
62,
25,
32,
884,
30,
51,
1797,
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... |
Text searching in Array
===
<<
Array
(
[0] => Array
(
[0] => Array
(
[0] => soccer player
[1] => soccer player athlete who play soccer
[2] => sport
[3] => soccer
[4] => soccer football game in which two team of 11 player try to kick or head ball into opponent goal
)
[1] => Array
(
[0] => soccer player
[1] => soccer player athlete who play soccer
[2] => play
[3] => activity
[4] => actor
)
[2] => Array
(
[0] => soccer player
[1] => soccer player athlete who play soccer
[2] => player
[3] => commercial enterprise activity of provide good and service involve financial and commercial and industrial aspect
[4] => player person who participate in or be skilled at some game
)
[3] => Array
(
[0] => soccer player
[1] => soccer player athlete who play soccer
[2] => athlete person train to compete in sport
[3] => athlete person train to compete in sport
[4] => athlete person train to compete in sport
)
)
[1] => Array
(
[0] => Array
(
[0] => athlete
[1] => athlete person train to compete in sport
[2] => sport
[3] => sport
[4] => sport
)
[1] => Array
(
[0] => athlete
[1] => athlete person train to compete in sport
[2] => compete compete for something
[3] => compete compete for something
[4] => compete compete for something
)
[2] => Array
(
[0] => athlete
[1] => athlete person train to compete in sport
[2] => train
[3] => train create by train and teach
[4] => train public transport provide by line of railway car couple together and draw by locomotive
)
[3] => Array
(
[0] => athlete
[1] => athlete person train to compete in sport
[2] => person
[3] => person
[4] => person
)
[4] => Array
(
[0] => athlete
[1] => athlete person train to compete in sport
[2] => athlete person train to compete in sport
[3] => athlete person train to compete in sport
[4] => athlete person train to compete in sport
)
)
>>
Hi
I need a php searching code for an Array shown above .But the search shouldn't be an exact string match
like for instance i am searching for "11 player" it should give me result Array[0] as it is mentioned in Array[0][0][4]...
| 0 | [
2,
1854,
5792,
19,
7718,
800,
3726,
3726,
13,
1,
7718,
13,
5,
636,
387,
500,
800,
1,
7718,
13,
5,
636,
387,
500,
800,
1,
7718,
13,
5,
636,
387,
500,
800,
1,
3173,
517,
636,
165,
500,
800,
1,
3173,
517,
8123,
72,
418,
3173,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 invoking ContextMenu, the click event bound to datatable TD does not work
===
I am using [DataTable](http://datatables.net) for listing rows. Recently, I implemented [ContextMenu](http://www.abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin) plugin on datatable to enable user to right click on any row and select the context options such as editing row, deleting row and many more.
Following is the code used for implementing ContextMenu on DataTable:
$('#dtPOL').dataTable({
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$(nRow).contextMenu({
menu: 'cntxtmnuDataTable'
},
function (action, el, pos) {
if (action != '') {
alert('You selected: ' + action);
}
return true;
});
}
});
Along with this, I have also implemented the drill down functionality on DataTable as given and explained in [Drill-down rows](http://datatables.net/blog/Drill-down_rows), which works very well without any glitches. Following is the code:
$('#dtPOL tbody td').live('click', function () {
var nTr = this.parentNode;
var i = $.inArray(nTr, anOpen);
if (i === -1) {
$('img', this).attr('src', gImageURL + "b-qv-hide.png");
var nDetailsRow = oTable.fnOpen(nTr, fnQuickView(oTable, nTr), 'quickView');
$('div.innerDetails', nDetailsRow).slideDown();
anOpen.push(nTr);
}
else {
$('img', this).attr('src', gImageURL + "b-qv-show.png");
$('div.innerDetails', $(nTr).next()[0]).slideUp(function () {
oTable.fnClose(nTr);
anOpen.splice(i, 1);
});
}
});
The function that is called in the above code snippet is as follows:
function fnQuickView(oTable, nTr) {
var aData = oTable.fnGetData(nTr);
var sOut = '<div class="innerDetails">';
sOut += '<table cellpadding="5" cellspacing="0" border="0">';
sOut += '<tr><td>Detailed Description:</td><td>:</td><td>' + aData[2] + '</td></tr>';
sOut += '</table>';
sOut += '</div>';
return sOut;
}
Now, the issue gets started once I invoke ContextMenu. As I have done it, the drill-down functionality stops working. On debugging, I found out that the click event on the TD.control does not fire at all, after the ContextMenu has been invoked.
Have tried searching on DataTable forum as well as Google but nothing helpful. Am sure, I am missing something. Request you to kindly help me as I have already spent more than 4 days and still no success. Thank you all in advance. | 0 | [
2,
75,
19,
2625,
1581,
4141,
755,
291,
15,
14,
10840,
807,
4138,
20,
1054,
5924,
15596,
630,
52,
170,
800,
3726,
3726,
31,
589,
568,
636,
18768,
5924,
500,
5,
21127,
6903,
18768,
5924,
18,
9,
2328,
6,
26,
9554,
11295,
9,
1989,
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... |
What's the most efficient way to sync the SQLite Database .db-File?
===
I'm looking for a method that requires small amount of overhead. I was trying to use the Unix command "diff" in an effort to create a patch file, which I can send to a host. I wasn't able to utilize Runtime.exec for this so I ended up ditching this idea.
Even though my Database is small at the moment, I need to find a solution that is as efficient as possible in terms of data usage.
I am aware that I could store my entries as JSON and I might do it like that, but I was hoping there are other methods of transferring the Database changes. A concept or an idea would be fine, any help is appreciated. | 0 | [
2,
98,
22,
18,
14,
127,
8243,
161,
20,
6063,
150,
14,
4444,
10601,
6018,
13,
9,
9007,
8,
16877,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
2109,
30,
4781,
284,
2006,
16,
8860,
9,
31,
23,
749,
20,
275,
14,
22540,
1202,
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... |
Update ListView without data beiing changed
===
In my app I have a ListView that contains times of different timezones. With a seekbar the user can change the current time of a timezone and the other zones are supposed to update their times as well.
In my onCreate() method I iniciate the ListView and set a Time variable to the current time of my previously selected location. In addition I set a OnSeekBarChangeListener to my seekbar.
private ArrayList<Welt> welts;
private SimpleArrayAdapter arrayAdapter;
public void onCreate(Bundle savedInstanceState) {
...
arrayAdapter = new SimpleArrayAdapter(this, R.layout.listwelt, welts);
showwelt();
...
now.setToNow();
now.set(now.toMillis(false));
pos = extras.getInt("weltcompare");
now.switchTimezone(welts.get(pos).zone);
...
seek.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
offset = seekBar.getProgress()*5 - start;
arrayAdapter.notifyDataSetChanged();
//showwelt();
}
public void onStartTrackingTouch(SeekBar seekBar) {
}
public void onStopTrackingTouch(SeekBar seekBar) {
offset = seekBar.getProgress()*5 - start;
arrayAdapter.notifyDataSetChanged();
//showwelt();
}
});
...
}
public void showwelt() {
ListView listTest = (ListView)findViewById(R.id.mylistwelt);
listTest.setAdapter(arrayAdapter);
listTest.setDivider(null);
listTest.setDividerHeight(0);
}
At last my ArrayAdapter class:
public class SimpleArrayAdapter extends ArrayAdapter<Welt> {
private final int resource;
public SimpleArrayAdapter(Context context, int resource, ArrayList<Welt> arrays) {
super(context, resource, arrays);
this.resource = resource;
}
public View getView(int position, View convertView, ViewGroup parent) {
Welt cobject = getItem(position);
RelativeLayout listView;
if(convertView==null) {
listView = new RelativeLayout(getContext());
String inflater = Context.LAYOUT_INFLATER_SERVICE;
LayoutInflater vi;
vi = (LayoutInflater)getContext().getSystemService(inflater);
vi.inflate(resource, listView, true);
}else{
listView = (RelativeLayout) convertView;
}
TextView tv1 = (TextView)listView.findViewById(R.id.listwelt1);
tv1.setText(cobject.ort);
TextView tv2 = (TextView)listView.findViewById(R.id.listwelt2);
tv2.setText(cobject.land);
TextView tv3 = (TextView)listView.findViewById(R.id.listwelt3);
now.set(base);
now.minute = now.minute + offset;
now.normalize(false);
now.set(now.toMillis(false));
now.switchTimezone(cobject.zone);
tv3.setText(TimeMateActivity.formatDateTime(0, 0, 0, now.hour, now.minute));
TextView tv4 = (TextView)listView.findViewById(R.id.listwelt4);
tv4.setText(TimeMateActivity.formatDateTime(now.monthDay, now.month, now.year, 24, 0));
if(position == pos) {
tv1.setTypeface(null, Typeface.BOLD);
tv2.setTypeface(null, Typeface.BOLD);
tv3.setTypeface(null, Typeface.BOLD);
}
return listView;
}
}
So the only data that is changed while the activity is running is the variable offset.
I think that's the reason why arrayAdapter.notifyDataSetChanged() doesn't work, while calling showwelt() in the OnSeekBarChangeListener does the job, but resets the ListView to the top.
I read a couple of posts, but none of them helped.
I tried to clear the adapter and add all items again before calling notifyDataSetChanged().
I tried saving the current scrollposition of the list and restore it.
What is the right for me to solve my problem? | 0 | [
2,
11100,
968,
4725,
366,
1054,
44,
49,
68,
1015,
800,
3726,
3726,
19,
51,
4865,
31,
57,
21,
968,
4725,
30,
1588,
436,
16,
421,
85,
11661,
18,
9,
29,
21,
5048,
1850,
14,
4155,
92,
753,
14,
866,
85,
16,
21,
85,
11661,
17,
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... |
What are the best wwdc videos to watch regarding performance optimization?
===
As there are plenty of videos in Apple WWDC page touching various topics of iOS, Mac OSX,Safari etc
i've seen some Apple WWDC video. But i want them category wise, like all in-app purchase videos in a particular section etc.
is there any way i can find a list of the videos for Performance Optimization in iOS only
as right ow that's what ifeel the most important part of iOS development.
Please share if you know anything about it | 2 | [
2,
98,
50,
14,
246,
13,
14178,
7201,
6610,
20,
1455,
3467,
956,
21597,
60,
800,
3726,
3726,
28,
80,
50,
7062,
16,
6610,
19,
4037,
13,
14178,
7201,
2478,
6652,
617,
7569,
16,
13,
7760,
15,
1572,
13,
759,
396,
15,
18,
2565,
2905,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
result with windows SDK debugging
===
I developed a purcharse order software for my work, which consist in adding a microsoft word objetcs so i can output data into a word document, my developing machine has windows 7 ultimate and office 2007, my target machine is windows 2008 server with office 2003(it has the 2007 compatibility app), where it supposes to work, but when i try to run the program it just crash before it could load, the error is this
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: ordenes de comprar.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 5009d2fa
Problem Signature 04: ordenes de comprar
Problem Signature 05: 1.0.0.0
Problem Signature 06: 5009d2fa
Problem Signature 07: 2f
Problem Signature 08: 22
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7600.2.0.0.16.7
Locale ID: 1033
i did a lot of research to figured out what its causing this, and i found someone who explained how to find the code line that is causing the problem, using windows SDK and hes tools, after some research the result was this particular method:
.method assembly newslot specialname strict virtual
instance void set_cot(class [System.Windows.Forms]System.Windows.Forms.Label WithEventsValue) cil managed synchronized
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld class [System.Windows.Forms]System.Windows.Forms.Label WindowsApplication1.Form1::_cot
IL_0007: nop
IL_0008: ret
} // end of method Form1::set_cot
but this is where im "stuck", i am not capable of finding the real problem after all, any help?, i will really appreciate
ps: sorry for my terrible english, is not my native language... thanks
| 0 | [
2,
829,
29,
1936,
13,
18,
43,
197,
121,
16254,
2762,
800,
3726,
3726,
31,
885,
21,
6771,
5433,
870,
389,
2306,
26,
51,
170,
15,
56,
7929,
19,
4721,
21,
7099,
833,
5122,
10307,
6824,
86,
31,
92,
5196,
1054,
77,
21,
833,
4492,
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 resize an image with the binary data
===
I would like to avoid using a 3rd party function, and do not want to render the browser `<img>` tag (width), but would like to grab the binary data of the image file with the `filesystemobject` and resize it on the fly. Is it possible like this? Otherwise, What is the best method for this? I wasn't able to find any info online about it. Thanks in advance. | 0 | [
2,
184,
20,
302,
10454,
40,
1961,
29,
14,
14171,
1054,
800,
3726,
3726,
31,
83,
101,
20,
2658,
568,
21,
203,
897,
346,
1990,
15,
17,
107,
52,
259,
20,
16535,
14,
16495,
13,
1,
1660,
263,
1,
3383,
13,
5,
3976,
43,
96,
6,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to I adapt this RegEx to allow dashes?
===
I currently have this:
`^(\w+)[/]*$` as my RegEx for URL rewriting in IIS.
Which won't allow...
.com/1st-source-capital-corporation
How can I adapt it to allow the above URL?
| 0 | [
2,
184,
20,
31,
9924,
48,
7953,
1706,
20,
1655,
8405,
160,
60,
800,
3726,
3726,
31,
871,
57,
48,
45,
13,
1,
5,
1,
499,
2430,
6,
2558,
118,
500,
2483,
4403,
1,
28,
51,
7953,
1706,
26,
287,
6362,
302,
12646,
19,
595,
18,
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... |
NSTimer not working while dragging a UITableView
===
I have an application with a countdown timer. I've made it with a label that is updated with a function called from a timer this way:
...
int timeCount = 300; // Time in seconds
...
NSTimer *myTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(actualizarTiempo:) userInfo:nil repeats:YES];
...
- (void)actualizaTiempo:(NSTimer *)timer {
timeCount -= 1;
if (timeCount <= 0) {
[timer invalidate];
} else {
[labelTime setText:[self formatTime:timeCount]];
}
}
Note: formatTime is a function which receive an integer (number of seconds) and returns a NSString with format mm:ss
Everything works ok, that is, the time counts down but the problem is that I have a UITableView in the application and if I touch the table and drag it (to move along the cells) the timer stops until I release my finger from the screen...
Is this behavior normal? If it is, is there any way to avoid it and make the timer work while dragging the table?
| 0 | [
2,
13,
2172,
891,
139,
52,
638,
133,
13052,
21,
13,
11193,
579,
4725,
800,
3726,
3726,
31,
57,
40,
3010,
29,
21,
22566,
85,
139,
9,
31,
22,
195,
117,
32,
29,
21,
1899,
30,
25,
6372,
29,
21,
1990,
227,
37,
21,
85,
139,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding/removing subview (labels) from scrollview
===
I first load 3 labels into scrollview, then as I scroll I remove one on the end and add a new one so I always has a label on each side of the one being viewed. Works scrolling left and adding labels on the end. When i remove beginning label it adjusts all label subviews to the left, is this correct ans suppose to do that? But when I scroll back to the right and need to add the new label to the beginning of the scrollview, I try adjust the existing labels over to the right and insert new label at beginning (0,0) and it seems to work. But then in a layout function I need to loop thru label subviews and adjust size for orientation, iPad and it puts the new label at the end of the scrollview! Do subviews location get adjusted when removing one from beginning? How should I add the label to the beginning and adjust others over? When adding a new subviews does it get an auto umber of when it was added so that it adds it to the end and not where I set it? I'm new and still working on getting use to coding, samples I've found don't seen to address adding subviews at beginning of scrollview. Any help would be great. Thanks in advance. | 0 | [
2,
4721,
118,
99,
17847,
972,
4725,
13,
5,
21018,
18,
6,
37,
12159,
4725,
800,
3726,
3726,
31,
64,
6305,
203,
13173,
77,
12159,
4725,
15,
94,
28,
31,
12159,
31,
4681,
53,
27,
14,
241,
17,
3547,
21,
78,
53,
86,
31,
550,
63,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to remove duplicates in mysql
===
i am having a mysql table named list which contains only one column named word. In this name column i am having english words. There are around 1 lakh records. I formed these column by joining different tables.
Now the problem is i am having some duplicate words and i need to delete it.
I tried
insert into new_table select distinct word from list;
contents are being copied to another table but still the duplicate exits
Then i tried to print length of the word using php.. 'aardvark' is present two times in my table. printing the length of this word in php, for one record it is showing that length is 8 and for another record of 'aardvark' is of length 9.
i used
update list set word = trim(word);
no word contained blank spaces in front or end.. How the same word 'aardvark' is of two different length. how to avoid duplicates | 0 | [
2,
184,
20,
4681,
19429,
18,
19,
51,
18,
22402,
800,
3726,
3726,
31,
589,
452,
21,
51,
18,
22402,
859,
377,
968,
56,
1588,
104,
53,
4698,
377,
833,
9,
19,
48,
204,
4698,
31,
589,
452,
486,
715,
9,
80,
50,
140,
137,
23505,
74... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JKS, CER, SignCode issue
===
Currently, I've got an intresting problem about signing an EXE file using the SignCode tool from Microsoft and a certificate (from GlobalSign)...
So, we've bought a new certificate as the current one will expire in short time. The original format is JKS. I exported this certificate from .JKS to .CER so I can install on local machine in the Root Trusted Certificates section. I've installed it and if I open the certmgr.msc I can see it, but if I open the Control Panel -> Internet Options -> Content -> Certificates -> Root Trusted Certificates etc then I can't see it... I thought it should be here as well.
When I run the signcode.exe tool I get the "unable to open a csp provider with the correct private key" error message.
Note! The signcode.exe command is correct, because it works if I test with the old certificate.
Please advise.
Thank you in advance!
Serge | 0 | [
2,
13,
16455,
18,
15,
6173,
15,
1676,
9375,
1513,
800,
3726,
3726,
871,
15,
31,
22,
195,
330,
40,
19,
8722,
1203,
1448,
88,
5479,
40,
1396,
62,
3893,
568,
14,
1676,
9375,
5607,
37,
7099,
17,
21,
6259,
13,
5,
2665,
2062,
11255,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Will it be possible to install an app to the Surface without passing from Microsoft App Store?
===
I am planning to realize apps to be used from Surface Win8 new tablet.
Will it be necessary to pass from the new Windows App Store (as it happens for IOS) or will i be able to distribute the .exe without passing from Microsoft? | 0 | [
2,
129,
32,
44,
938,
20,
16146,
40,
4865,
20,
14,
1490,
366,
2848,
37,
7099,
4865,
1718,
60,
800,
3726,
3726,
31,
589,
2334,
20,
4007,
4865,
18,
20,
44,
147,
37,
1490,
628,
457,
78,
16394,
9,
129,
32,
44,
2378,
20,
1477,
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... |
Cant Uninstall apk because it doesn't show up
===
He there,
My problem is that i have a signed apk that i installed after making it in eclipse. It has no errors when i test it in the emulator but when i transfer it to my real device (rooted kindle fire with ICS) i cant find the app. It doesn't show up in the launcher or in Settings>Apps in any category.
I want to install a new unsigned version but i cant because i cant uninstall the first one and it gives me a certificate error.
Using Eclipse Juno on Windows 7 building as android version 2.1 and running on 4.0.5
| 0 | [
2,
2973,
367,
108,
21300,
21,
17244,
185,
32,
1437,
22,
38,
298,
71,
800,
3726,
3726,
24,
80,
15,
51,
1448,
25,
30,
31,
57,
21,
908,
21,
17244,
30,
31,
4066,
75,
544,
32,
19,
11652,
9,
32,
63,
90,
11908,
76,
31,
1289,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to call a function from hash in perl
===
i trying yo doing the the following pseudocode in perl
#!/usr/bin/perl -w
#App.pm
use strict;
use OtherModule;
use Other2Module;
sub App::hashF
{
my $hash_funtion = {
'login' => OtherModule::login,
'logout' => Other2Module::logout
};
my($module, $params) = @_;
return $hash->{$module}($params);
}
but i get error like:
- Can't use string ("login") as a subroutine ref while "strict refs"
- Can't use bareword ("OtherModelo") as a HASH ref while "strict refs" | 0 | [
2,
184,
20,
645,
21,
1990,
37,
19170,
19,
416,
255,
800,
3726,
3726,
31,
749,
3727,
845,
14,
14,
249,
8452,
9375,
19,
416,
255,
6926,
187,
118,
267,
139,
118,
4772,
118,
1432,
255,
13,
8,
499,
6926,
7753,
9,
5576,
275,
8170,
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... |
what is the mechanism of listeners in GUI Programming using Threads?
===
what is the mechanism of listeners in GUI Programming using Threads. For example, are there any threads involved in ActionListener/actionPerformed method while a GUI runs? What is the effect of these threads (if they do exist) on any user-defined Threads? Do they alter the behavior of user-defined threads? | 0 | [
2,
98,
25,
14,
6534,
16,
15672,
19,
9457,
3143,
568,
20396,
60,
800,
3726,
3726,
98,
25,
14,
6534,
16,
15672,
19,
9457,
3143,
568,
20396,
9,
26,
823,
15,
50,
80,
186,
20396,
1013,
19,
1028,
13891,
106,
118,
8645,
24915,
2109,
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... |
Disable scrolling in Konzept Slideshow
===
I recently installed Daisho theme. It comes with different scrolling techniques. Such as with trackpad. Whenever I try to scroll down the page, the trackpad scrolling scrolls Slideshow so fast and messy. Is there a way to disable this scrolling?
My website: http://www.waavinetwork.com | 0 | [
2,
1460,
579,
13,
28166,
19,
5191,
1734,
4417,
18066,
1544,
800,
3726,
3726,
31,
1989,
4066,
7655,
9468,
3184,
9,
32,
1624,
29,
421,
13,
28166,
4212,
9,
145,
28,
29,
792,
8240,
9,
6634,
31,
1131,
20,
12159,
125,
14,
2478,
15,
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 manage Nodejitst created MongoDB
===
I've created a new MongoDB using the command:
jitsu databases create mongodb my_datbase
Now I'm not sure how to manage this newly created database. When I try to use the given details in my app, I end up with "An error has occurred: {"code":"ECONNRESET"}".
How do I check the db is running ok? | 0 | [
2,
184,
20,
4705,
15421,
13803,
384,
679,
3521,
5474,
220,
800,
3726,
3726,
31,
22,
195,
679,
21,
78,
3521,
5474,
220,
568,
14,
1202,
45,
13,
27381,
6018,
18,
1600,
3521,
5474,
220,
51,
1,
593,
38,
8436,
130,
31,
22,
79,
52,
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... |
Google Celebrity Search Result API?
===
I found that in Google, when you type a celebrity's name in the search bar, there is a side bar with a portrait photo of that celebrity, a brief description and some other related information and related people.
I am wondering if this is already wrapped in some API provided by Google, since my app really need to collect this sort of information (we currently use wiki API). Could anyone give me a link or suggestion about it? And/Or maybe some other API gives similar information?(I would like to compare those result)
Thanks in advance. | 0 | [
2,
8144,
9541,
2122,
829,
21,
2159,
60,
800,
3726,
3726,
31,
216,
30,
19,
8144,
15,
76,
42,
1001,
21,
9541,
22,
18,
204,
19,
14,
2122,
748,
15,
80,
25,
21,
270,
748,
29,
21,
5548,
3056,
16,
30,
9541,
15,
21,
2698,
5318,
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... |
Create file JSON online and get URL
===
From string JSON,I want to create a URL to display that string JSON..Do you know website that support that work! | 0 | [
2,
1600,
3893,
487,
528,
2087,
17,
164,
287,
6362,
800,
3726,
3726,
37,
3724,
487,
528,
15,
49,
259,
20,
1600,
21,
287,
6362,
20,
3042,
30,
3724,
487,
528,
9,
9,
537,
42,
143,
2271,
30,
555,
30,
170,
187,
3,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
OpenVZ - Proxmox - IP/net passthrough
===
I have several Proxmox nodes running and I am trying to get net traffic to passthrough the host to a VM.
Want to happen:
VM created on xx.xx.xx.156 proxmox node with a hostname of (test.domain.com)
VM does not have an IP address assigned, instead, users can access this VM by visiting test.domain.com (A record added to point to xx.xx.xx.156).
Basically: I want to access VMs outside of the network without having to assign each one an IP address.
Any help or info would be greatly appreciated!
Thanks! | 0 | [
2,
368,
710,
380,
13,
8,
895,
396,
79,
6326,
13,
8,
15735,
118,
2328,
1477,
11639,
800,
3726,
3726,
31,
57,
238,
895,
396,
79,
6326,
16272,
946,
17,
31,
589,
749,
20,
164,
4275,
2227,
20,
1477,
11639,
14,
2015,
20,
21,
13,
201... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Parent child combo box
===
I want to implement child parent combo box(country state like if we select any country the state combo box should be populated according to selected country) in my form with jquery.
Please give any suggestion how to implement this
Thanks
| 0 | [
2,
4766,
850,
22621,
1649,
800,
3726,
3726,
31,
259,
20,
8713,
850,
4766,
22621,
1649,
5,
10741,
146,
101,
100,
95,
5407,
186,
475,
14,
146,
22621,
1649,
378,
44,
11111,
496,
20,
1704,
475,
6,
19,
51,
505,
29,
487,
8190,
93,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
preview image before uploading
===
I'm looking for some flash based plug-in which allows me to display an image as soon as the user selects it in the file dialog.
I looked at swfupload but couldn't find any way to display the image selected.. no handle on file path or contents as far as I could find.
Anyone knows how to do this? Or some other plug-in which does this? | 0 | [
2,
16121,
1961,
115,
71,
16866,
800,
3726,
3726,
31,
22,
79,
699,
26,
109,
4433,
432,
10922,
8,
108,
56,
2965,
55,
20,
3042,
40,
1961,
28,
651,
28,
14,
4155,
5407,
18,
32,
19,
14,
3893,
28223,
9,
31,
292,
35,
13,
18,
15263,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
need mbsuild task to combine app.config files
===
does anyone know of a solution here? Combine select app.config files into one
app.exe.config file. | 0 | [
2,
376,
14023,
18,
21442,
43,
3005,
20,
12287,
4865,
9,
14093,
2816,
6488,
800,
3726,
3726,
630,
1276,
143,
16,
21,
4295,
235,
60,
12287,
5407,
4865,
9,
14093,
2816,
6488,
77,
53,
4865,
9,
1706,
62,
9,
14093,
2816,
3893,
9,
3,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Content Script tracking with Google Analytics
===
I am working on a Google Chrome Extension that modifies certain pages with a content script. In order to understand when and where those changes are applied we were looking into google analytics since we use it for other web properties already.
We include the ga.js library via the manifest file, and trigger _trackPageview with a synchronous page call when we apply a change to a page.
var pageTracker = _gat._getTracker("UA-our-UA");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview(window.location.href);
Trouble here is that each pageView in a different domain counts as a new visit and visitor. Its there a way to circumvent that? For example it use a chrome extension sqlite database or key value store in the browser to store unique user id and visit id domain independent. Is this possible?
Thanks | 0 | [
2,
2331,
3884,
10353,
29,
8144,
26320,
800,
3726,
3726,
31,
589,
638,
27,
21,
8144,
13,
12985,
3896,
30,
7226,
12970,
1200,
4434,
29,
21,
2331,
3884,
9,
19,
389,
20,
1369,
76,
17,
113,
273,
1693,
50,
2435,
95,
46,
699,
77,
8144,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How would I maintain a large amount of code used in two different programs (using git)?
===
Let's say I have a lot of Javascript code that will be deployed inside a desktop application and used as a web application (deployed to a server).
The only method that is obvious to me is to have the desktop application pull the source code when it builds.
Is there a better way to handle this? | 0 | [
2,
184,
83,
31,
4027,
21,
370,
2006,
16,
1797,
147,
19,
81,
421,
1726,
13,
5,
12655,
13,
10404,
6,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
21,
865,
16,
8247,
8741,
1797,
30,
129,
44,
6698,
572,
21,
17404,
3010,
17,
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 control an LED using C# over the USB
===
I would like to control an led strip through the usb port. I have the schematics for using a PIC microcontroller(18f series) and interfacing it with the usb port. I understand that Microchip libraries will make it easier for me to do this. The only problem is I can't find them. The functions performed by the interface are ..
>The LED glows when I click a button on the screen.
>The LEd stops glowing when I click another button.
Here , I'm planning to replace the one LED with an LED strip.
Like there are libraries for programming for android I need a link to the libraries that provide me with methods that can send data over the usb port . | 0 | [
2,
184,
20,
569,
40,
481,
568,
272,
5910,
84,
14,
182,
220,
800,
3726,
3726,
31,
83,
101,
20,
569,
40,
481,
4998,
120,
14,
182,
220,
1295,
9,
31,
57,
14,
23874,
11677,
26,
568,
21,
9327,
2899,
12898,
1252,
5,
1087,
410,
231,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Discussion about whether or not respect OOP/MVC Data Model Design when working with SQL-Based Database
===
I'd like peoples opinion about the concept on Data Modeling Vs SQL (OOP Vs Select Statement) on the following matter:
When studying MVC and OOP concepts, it's easy to see a natural form of things like in the follow:
<php? | <% | <#
Class Country{
_name:String;
_language:String;
}
Class Estate{
_name:String;
_country:Country;
}
?> | % | #>
The point that I'm trying to get is a simple parent-child relation. Now, as I've seen working on ExtJS + PHP and JSF 2.0 (Java using Converter), it's quite common to see a DAO (Data Access Object) being defined sort of like this:
Abstract class CountryDAO{
public function getCountry();//This function returns an ArrayList.
public function getCountryById(countryId:Integer);//This function returns a Country Object;
...
}
Class EstateDAO{
public function getEstate(){
$sql = "SELECT * FROM tbl_estate";
//[your favorite way to comunicate with the database here]
//Declare an ArrayList or something to store the result:
$arrayList;
while($result = $ResultSet.next()){
$obj = new Estate();
$obj->name = $result['name'];
$obj->Country = new CountryDAO().getCountryById($result['country_id']);
$arrayList->addItem($obj);
}
}
}
*Sorry for mixing language syntaxes, I'm trying not to get too attached to language, just the concept*
Now to finalize my thoughts: That is the right concept, according to theory. Personally, I don't think it's right to disagree with it since it's the logic of the thing. But as in practice, the real world don't ever shine as you want, what I see from that:
**If I have 10 Estates, I'll have 11 SQL Statements being executed on a Hard Disk level (which according to Operational System's theory, it's the slowest of all sorts of stored memory).**
**If I have 100 Estates, I'll have 101 SQL Statements being executed.**
**If I have *n* Estates, I'll have *n+1* SQL Statements being executed.**
My final point: I think that can be a real pain if you're modeling a data entity that might have thousands of records. Because of that line of thought, I refused to use this kind of design logic while working with Flex + PHP. But now that I'm trying to build an application that will have both Flex and ExtJS as viewers and PHP as Server-Side, I just wanna be sure that I'm not choosing the hardest path for insignificant reason. Is it safer not to respect this MVC/OOP logic? Am I exaggerating? What do you think about SQL Vs Data Model on OOP?
Thanks. | 0 | [
2,
5460,
88,
1472,
54,
52,
2873,
13,
21709,
118,
79,
8990,
1054,
1061,
704,
76,
638,
29,
4444,
255,
8,
1281,
6018,
800,
3726,
3726,
31,
22,
43,
101,
148,
18,
4052,
88,
14,
2420,
27,
1054,
12807,
4611,
4444,
255,
13,
5,
21709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
css not loading in codeigniter
===
I have this code
< link href = " < ? php echo base_url() ; ? > css/style.css” rel=”stylesheet" type="text/css"/>
which supposed to load the style.css from the css folder. The echo base_url() itself works.
I also have autoloaded the url helper, so i really don't see the problem here, but it still doesn't load. | 0 | [
2,
272,
18,
18,
52,
12797,
19,
1797,
9693,
242,
106,
800,
3726,
3726,
31,
57,
48,
1797,
13,
1,
3508,
746,
14057,
800,
13,
7,
13,
1,
13,
60,
13,
26120,
8117,
1000,
1,
911,
255,
5,
6,
13,
73,
13,
60,
13,
1,
272,
18,
18,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"No need to update index.yaml" floods console
===
At the moment as I debug my App Engine server, I'm often starting it up with the instruction to clear the datastore and then firing a couple of KB of data at it in the hope of figuring out why some of the reports I've written aren't generating properly.
However one thing that's getting in the way of the development and also raising some slight concern is that the console floods with the following output:
DEBUG 2012-07-13 11:44:34,033 datastore_stub_index.py:181] No need to update index.yaml
DEBUG 2012-07-13 11:44:34,221 datastore_stub_index.py:181] No need to update index.yaml
DEBUG 2012-07-13 11:44:34,406 datastore_stub_index.py:181] No need to update index.yaml
DEBUG 2012-07-13 11:44:34,601 datastore_stub_index.py:181] No need to update index.yaml
I've got two questions: should I be concerned about the flood of messages that are indicating that index.yaml does not need to be changed, and if not, is there a way to surpress the warning? If I should be concerned, could someone point me in the right direction?
Thanks, | 0 | [
2,
13,
7,
251,
376,
20,
11100,
4348,
9,
8580,
255,
7,
17015,
8650,
800,
3726,
3726,
35,
14,
688,
28,
31,
121,
16254,
51,
4865,
1406,
8128,
15,
31,
22,
79,
478,
1422,
32,
71,
29,
14,
7304,
20,
1207,
14,
1054,
16828,
17,
94,
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... |
Check if valid path in PHP
===
I need to check if the path is valid before exploding it and write things to it:
The path may only contain the following characters:
A-Z
a-z
0-9
-
-
/
Furthermore, it cannot start or end with a slash, and cannot contain two following slashes.
Thanks in advance! | 1 | [
2,
2631,
100,
7394,
2013,
19,
13,
26120,
800,
3726,
3726,
31,
376,
20,
2631,
100,
14,
2013,
25,
7394,
115,
22978,
32,
17,
2757,
564,
20,
32,
45,
14,
2013,
123,
104,
3717,
14,
249,
1766,
45,
21,
8,
380,
21,
8,
380,
713,
8,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 "#define" this variable?
===
I have one integer value in 0x102 adress and i need to create "#define ABC ..." macro.
ABC is veriable or something (with access to 0x102 cell).
It must be possible to do operations like this :
<i>
ABC = 666;
int x = ABC*2 + 4;
int *p = &ABC;
</i>
Can you help me ?
John | 0 | [
2,
184,
20,
13,
7,
5910,
546,
7509,
7,
48,
7612,
60,
800,
3726,
3726,
31,
57,
53,
13820,
1923,
19,
713,
396,
16284,
21,
19137,
18,
17,
31,
376,
20,
1600,
13,
7,
5910,
546,
7509,
5079,
13,
9,
9,
9,
7,
9069,
9,
5079,
25,
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... |
Tab content 'sticking' when clicked fast?
===
http://jsfiddle.net/RwPps/25/ -the script
Hi guys, just a quick question (I feel bad for asking although I'm really stuck). The issue with the tabs that I'm using here is that if you spam each tab really quick you can end up with content staying on the same tab when viewing the next, I think I need to add some kind of stop to prevent the script from been spammed repeatably,
Anyone have any idea how I can go about doing this?
Thanks
Phil. | 0 | [
2,
6523,
2331,
13,
22,
10277,
68,
22,
76,
15802,
1512,
60,
800,
3726,
3726,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
20393,
3421,
18,
15718,
10551,
13,
8,
124,
3884,
4148,
2776,
15,
114,
21,
2231,
1301,
13,
5,
49,
583,
89... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 setInterval in for loop
===
I'm currently facing a little Problem in AS3. What I want to achieve is to fade images in a for loop. The problem is that the loop is not waiting for the setInterval function to be finished.
for(var i in imageClips){
setInterval(function(){
fade(imageClips[i]);
}, 6000);
}
The behavior is clear once the setInterval function is called the loop just goes on. My question now is, is there a way to make the loop wait to be done with the things happening in the setInterval function?
Thanks in advance,
Thomas | 0 | [
2,
568,
309,
6280,
3377,
19,
26,
5293,
800,
3726,
3726,
31,
22,
79,
871,
4325,
21,
265,
1448,
19,
28,
240,
9,
98,
31,
259,
20,
4689,
25,
20,
11381,
3502,
19,
21,
26,
5293,
9,
14,
1448,
25,
30,
14,
5293,
25,
52,
1672,
26,
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... |
AS3/AIR device landscape or portrait?
===
On startup I want to check whether the device is in portrait or landcape mode, so far I have:
var startOrientation:String = stage.orientation;
trace('startOrientation: '+ startOrientation);
if (startOrientation == "default")
{
}
if (startOrientation == "upsideDown")
{
}
But this doesnt tell me if its landscape or portrait. | 0 | [
2,
28,
9280,
2642,
3646,
4453,
54,
5548,
60,
800,
3726,
3726,
27,
20205,
31,
259,
20,
2631,
1472,
14,
3646,
25,
19,
5548,
54,
476,
4666,
62,
3740,
15,
86,
463,
31,
57,
45,
4033,
799,
9712,
857,
45,
11130,
800,
876,
9,
9712,
85... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mobile Safari on iPhone/iPod CSS hack
===
Does anyone know a good modern CSS hack to target only mobile safari on iPhone and iPod Touch?
I keep seeing `@media screen and (max-device-width: 480px)`, but that's from 3 years ago and matches Nexus S among others now.
(This is to fix a subtle layout issue. I realise browser sniffing is evil etc.) | 0 | [
2,
3241,
25055,
27,
21024,
118,
49,
10670,
272,
18,
18,
11835,
800,
3726,
3726,
630,
1276,
143,
21,
254,
773,
272,
18,
18,
11835,
20,
2935,
104,
3241,
25055,
27,
21024,
17,
31,
10670,
1723,
60,
31,
643,
2078,
13,
1,
8260,
2324,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mahout recommender return empty result
===
I have a table with estimates of the users. There are about 1000 entries. From these data, I want to build a recommendation, but returns an empty list Mahout. In what may be the problem?
JDBCDataModel dataModel = new MySQLJDBCDataModel(source, "rate", "userId", "eventId", "rate", null);
dataModel.refresh(null);
try {
UserSimilarity userSimilarity = new PearsonCorrelationSimilarity(dataModel);
userSimilarity.setPreferenceInferrer(new AveragingPreferenceInferrer(dataModel));
UserNeighborhood neighborhood =
new NearestNUserNeighborhood(10, userSimilarity, dataModel);
Recommender recommender =
new GenericUserBasedRecommender(dataModel, neighborhood, userSimilarity);
Recommender cachingRecommender = new CachingRecommender(recommender);
List<RecommendedItem> recommendations =
cachingRecommender.recommend(user.id, 10);
} catch (TasteException e) {
e.printStackTrace();
} | 0 | [
2,
6330,
1320,
12360,
106,
788,
2424,
829,
800,
3726,
3726,
31,
57,
21,
859,
29,
10527,
16,
14,
3878,
9,
80,
50,
88,
6150,
11399,
9,
37,
158,
1054,
15,
31,
259,
20,
1895,
21,
14066,
15,
47,
4815,
40,
2424,
968,
6330,
1320,
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... |
null value passed from a iphone view to another
===
when I pass a string to another view I have a null values.
My code is:
In view AddBarView.m, where I have the string:
nameAdded = nameField.text; //nameAdded is defined as NSString in AddBarView.h
Now in other view AddLocationController.m
@synthesize nameAdded;
- (void)addViewControllerDidFinish:(AddBarView *)controller{
AddBarView *controllerAdd;
NSLog(@"namefrom addbarview: %@", controller.nameAdded); //here
[self dismissModalViewControllerAnimated:YES];
}
the NSLog return a (null) value. Whre is my foult?
tx in advance!
| 0 | [
2,
16203,
1923,
1100,
37,
21,
21024,
1418,
20,
226,
800,
3726,
3726,
76,
31,
1477,
21,
3724,
20,
226,
1418,
31,
57,
21,
16203,
4070,
9,
51,
1797,
25,
45,
19,
1418,
3547,
1850,
4725,
9,
79,
15,
113,
31,
57,
14,
3724,
45,
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... |
How can I pass data from a .Net Web Application to my Java Applet
===
How can I pass and recover an ID from my .Net Web Application to my Java Applet that runs in this Web Application ? | 0 | [
2,
184,
92,
31,
1477,
1054,
37,
21,
13,
9,
2328,
2741,
3010,
20,
51,
8247,
4037,
38,
800,
3726,
3726,
184,
92,
31,
1477,
17,
7635,
40,
4924,
37,
51,
13,
9,
2328,
2741,
3010,
20,
51,
8247,
4037,
38,
30,
1461,
19,
48,
2741,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
GTK TextView cursor alway on center line
===
I have a Gtk TextView, where I would like to be able to center the cursor vertically in the center.
If the cursor is moved, the text should scroll up (or down), but the cursor should still stay in center position.
I tried several things: Adding a margin on the first and last character of the textview, but that makes problems when adding text behind the first and last character. Also its not nice if one selects the first line, the selection color expands into the "empty" room.
In short, I need to:
1. Add a margin before the first line
2. Add a margin after the last line
3. Scroll text to center on `cursor_move` or `text_changed` (I currently solved this with <br>
`cursor_iter = self.TextBuffer.get_iter_at_mark(cursor)`<br>
`fflines = round(self.window_height/(2*20))`<br>
`cursor_iter.forward_visible_lines(fflines)`<br>
`self.TextEditor.scroll_to_iter(cursor_iter, 0.0, True, 0, 0.5)`<bR>
however, with this approach I would need several newlines at the end of my textview. So if someone knows a better solution to that, I'd be happy to hear it)
I was thinking about doing pixelbased scrolling, but I don't know how to go about this.
I'd be happy to hear some suggestions!
-wolfv
| 0 | [
2,
9509,
197,
1854,
4725,
29588,
493,
1443,
27,
459,
293,
800,
3726,
3726,
31,
57,
21,
9509,
197,
1854,
4725,
15,
113,
31,
83,
101,
20,
44,
777,
20,
459,
14,
29588,
23300,
19,
14,
459,
9,
100,
14,
29588,
25,
385,
15,
14,
1854,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery Mobile - NO CSS applied on Android browsers
===
i have tried to prepare some "demo" site using jquery mobile.
Everything works perfect on my iPhone with Safari, Google Chrome, Dolphin Browser.
On my desktop it also works great 1 : 1 like on iPhone.
If i want to test it on my collegue's Samsung Galaxy Ace with Android, there are no CSS styles
in native android browser, also in Dolphin browser.
I have also tested several web emulators like: http://www.howtogomo.com/en/d/test-your-site/#gomo-meter
And the result was the same.. the site has all the elements, but no CSS styles have been applied.
I use this stylesheet definition in the <head> element: <link rel="stylesheet" href="http://www.soundart.cz/mobile/jquery.mobile-1.1.0.css" />
I had to add some other styles so i copied them in the end of this file.
Here is my demo site: [http://soundart.cz/mobile/index.php][1]
Thanks a lot for your help!
Btw. i have tested some sites from your jqmgallery.com and it works fine with CSS on the same android browser. But i cannot find the differences between other sites and mine :(
[1]: http://soundart.cz/mobile/index.php | 0 | [
2,
487,
8190,
93,
3241,
13,
8,
90,
272,
18,
18,
2435,
27,
13005,
16495,
18,
800,
3726,
3726,
31,
57,
794,
20,
5723,
109,
13,
7,
19274,
7,
689,
568,
487,
8190,
93,
3241,
9,
796,
693,
2107,
27,
51,
21024,
29,
25055,
15,
8144,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add a subdomain and avoid to create a new folder?
===
On my shared hosting, I have just created a new subdomain **static.example.com** but it has also create a new folder **www.example.com/static/** .
How can I avoid to create these new folders every time I create a new subdomain ? | 2 | [
2,
184,
20,
3547,
21,
972,
537,
6232,
17,
2658,
20,
1600,
21,
78,
19294,
60,
800,
3726,
3726,
27,
51,
2592,
10637,
15,
31,
57,
114,
679,
21,
78,
972,
537,
6232,
13,
1409,
18077,
9,
29041,
9,
960,
1409,
47,
32,
63,
67,
1600,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a portable way using unix shell commands to tell if there is a configured IPv6 interface?
===
Specifically I'm looking for a way to tell if the system has a network interface that is configured with a **global** scoped IPv6 address. Loopback and link scoped addresses "don't count".
What I want to achieve is to match whether `getaddrinfo()` will return any IPv6 addresses with the `AI_ADDRCONFIG` hint flag.
I could do this by writing some code which looks up the IPv6 loopback address ("::1") using `getaddrinfo()`. But this is part of the tests for a fairly involved build procedure and it would be much simpler not to have to build an executable just to test this rather simple thing.
The best I've found so far only works for Linux and uses the `ip` command that comes with recent distros.
if ip -f inet6 -o addr | cut -f 9 -s -d' ' | grep global > /dev/null ; then
echo "IPv6 addresses configured continuing"
else
echo "No global IPv6 addresses configured - skipping test"
exit 0
fi
However this relies on the current format of the output from `ip` which I doubt is guaranteed and doesn't exist on other versions of Unix (e.g. FreeBSD).
I don't think that ifconfig provides a similar enough output across different Unix versions to be of use.
Are there any other tools I'm missing? | 0 | [
2,
25,
80,
21,
13469,
161,
568,
22540,
3593,
14294,
20,
494,
100,
80,
25,
21,
28895,
31,
10166,
379,
6573,
60,
800,
3726,
3726,
3524,
31,
22,
79,
699,
26,
21,
161,
20,
494,
100,
14,
329,
63,
21,
982,
6573,
30,
25,
28895,
29,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rails SImple From post to different controller create action
===
I have 3 models. User, Group, and Membership. User and Group have a has_many relationship through Membership. I want to be able to create the membership by clicking on a join button form the group show view.
Part of the Show view on the Groups Controller
= simple_form_for @membership, :url => memberships_path do |f|
= f.input :group_id, :value => @group.id, :as => :hidden
= f.submit "Join This Group!"
I set @membership in the groups show action with `@membership = Membership.new`
Just trying to figure out what I need to do to pass the from above to the create action on the membership controller. Right now it seem to be trying to pass it to the show action in the membership controller. Thanks for any help you can provide. | 0 | [
2,
2240,
18,
1935,
37,
678,
20,
421,
9919,
1600,
1028,
800,
3726,
3726,
31,
57,
203,
2761,
9,
4155,
15,
214,
15,
17,
4363,
9,
4155,
17,
214,
57,
21,
63,
1,
14842,
1429,
120,
4363,
9,
31,
259,
20,
44,
777,
20,
1600,
14,
4363,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 - Issue with Dialog Boxes/ clicking of buttons
===
I have a game where the user can interact with an item in this scenario a dog which triggers a battle. This loads up a dialog giving the user the option to fight or run away. The user clicks fight, which then brings up another dialog, this displays some text (your details and the dogs details), and underneath that text there is an attack buttons.
When you click the attach button a few things happen (not relvent), which essentially mean the user and dog details change (e.g. DogHP drops to 18).
The issue I am having is once I have clicked the attack button and the relvent code has run and updated the user and dog details i need to reload the orginal dialog screen, but this time the builder.setMessage() needs to display the new user and dog details. Please see some code snippet below, any ideas or guidence would be much appreciated:
Code Snippet:
void Fight()
{
final int DogHP = 25;
final int DogAtk = 15;
final int DogDef = 5;
final int DogSpeed = 20;
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(context.getText(R.string.monster_dog_title));
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.fight, null);
builder.setView(view);
final AlertDialog DogBattle = builder.create();
View FightBtn = view.findViewById(R.id.dog_fight);
FightBtn.setOnClickListener(new OnClickListener()
{
boolean attacked = false;
@Override
public void onClick(View clicked)
{
if(clicked.getId() == R.id.dog_fight)
{
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(context.getText(R.string.monster_fight));
builder.setMessage("Your Current Battle Details:\n" + "HP = " + UserHP + " Def = " + UserDef + " Atk = " + UserAtk + "\n\n" + "Your Enemy:\n" + "HP = " + DogHP + " Def = " + DogDef + " Atk = " + DogAtk);
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.monsterbattle, null);
builder.setView(view);
final AlertDialog BattleRun = builder.create();
BattleRun.show();
View LeaveBattle = view.findViewById(R.id.Attack);
LeaveBattle.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View clicked)
{
if(clicked.getId() == R.id.Attack)
{
// SOME CODE GOES HERE
}
}
});
}
}
});
}
Thanks in Advance for any help. | 0 | [
2,
13005,
13,
8,
1513,
29,
28223,
8120,
118,
25590,
16,
12861,
800,
3726,
3726,
31,
57,
21,
250,
113,
14,
4155,
92,
10001,
29,
40,
9101,
19,
48,
12705,
21,
1952,
56,
7286,
18,
21,
692,
9,
48,
19069,
71,
21,
28223,
1438,
14,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 install Vertica Management Console?
===
Anybody knows how to install Vertica Management Console ???
I have already downloded the soft and created a machine just for it !!
THX ALL
| 2 | [
2,
184,
20,
16146,
2494,
12630,
1097,
8650,
60,
800,
3726,
3726,
11181,
3620,
184,
20,
16146,
2494,
12630,
1097,
8650,
13,
60,
60,
60,
31,
57,
614,
125,
19471,
43,
14,
1856,
17,
679,
21,
1940,
114,
26,
32,
13,
19015,
13,
96,
396... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to make Progressdialog before dilplaying data from the method in Android
===
i have a problem with my Android application
my application want to use progressdialog for showing data from calculation, but without use "sleep"
but the result of data from that calculation is not show up
i want to display the data with TextView and Listview
the message error is "only the original thread that created a view hierarchy can touch its views"
this is my code :
progressDialog = ProgressDialog.show(hasilrute.this, "","Communicating",true);
new Thread(new Runnable() {
@Override
public void run() {
cariRute(tv);
try {
} catch (Exception e) {
// TODO: handle exception
}
handler.sendEmptyMessage(0);
progressDialog.dismiss();
}
}).start();
progressDialog.dismiss();
Handler handle=new Handler(){
public void handleMessage(Message msg) {
super.handleMessage(msg);
if(msg.what == 0) {
//perform some action here................
}
}
};
and it my cariRute method :
public void cariRute(TextView t){
String haha = tv.getText().toString().toLowerCase();
String []getAsalTujuan = haha.split("-");
getAsal = getAsalTujuan[0];
getTujuan = getAsalTujuan[1];
cari(getAsal,getTujuan);
route = new ArrayList<rute>();
for(int i=0;i<hasilKahir.size()-1;i++){
a = hasilKahir.get(i);
i++;
b = hasilKahir.get(i);
i--;
hitungJarak(a, b);
System.out.println(a+b);
List<rute> temp = new ArrayList<rute>();
temp = getDataRute(a,b);
/*temp = getDataRute(a,b);
for(int j = 0; j < temp.size(); j++){
route.add(temp.get(j));
}*/
}
List<rute> temp = new ArrayList<rute>();
temp = filterList(listJalan);
route = temp;
jrk = 0;
for(int k = 0;k<Ljrk.size();k++){
jrk = jrk + Ljrk.get(k);
}
//System.out.println(jrk);
ongkos = 0;
for(int l = 0;l<Longkos.size();l++){
ongkos = ongkos + Longkos.get(l);
//System.out.println(ongkos);
}
pembulatan("####.##", jrk);
hitungOngkos(ongkos);
System.out.println(jrk+ongkos);
JARAK = (TextView)findViewById(R.id.textView11);
JARAK.setText(" Jarak : "+keluaran+" km");
ONGKOS = (TextView)findViewById(R.id.textView12);
ONGKOS.setText(" Ongkos : Rp."+harga);
Longkos.clear();
for(int x = 0; x < route.size();x++){
}
ListAdapter adapter = new ruteListAdapter(this, (List<? extends Map<String, String>>) route,
R.layout.list_item_2, new String[] {
rute.ANGKOT, rute.JALAN }, new int[] {
R.id.textID, R.id.textRute });
this.setListAdapter(adapter);
//db.close();
}
anyone can solve my problem?
please help me
thanks friends :) | 0 | [
2,
184,
20,
233,
3455,
4286,
5567,
115,
9658,
10630,
1054,
37,
14,
2109,
19,
13005,
800,
3726,
3726,
31,
57,
21,
1448,
29,
51,
13005,
3010,
51,
3010,
259,
20,
275,
3455,
4286,
5567,
26,
3187,
1054,
37,
19644,
15,
47,
366,
275,
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... |
Rally Javascript API: How can I determine the release of a requirement on a defect?
===
I'm trying to create a Rally Javascript API app to break down defects reported within a release cycle into "current" and "prior". Current = defects against stories in the selected release. Prior = defects against stories in a prior release or with no associated story. In both cases, the defect creation date must be within the date range of the release.
Here's the basic flow I was going for:
1. Select a release
2. Query all defects where CreationDate is within the selected release date range
3. If the defect has a Requirement and the Requirement is in the selected release, count as "current", otherwise count as "prior"
It seemed simple enough, but I've run into a roadblock in determining if the defect is reported against a story in the selected release or not. Defects have a Requirement property which represents the story the defect is against, but the Requirement object does not have a Release property. Only HierarchicalRequirement has a Release property.
Any thoughts on how to determine the release of a requirement on a defect? Or maybe a different approach that could accomplish the same thing?
| 0 | [
2,
6950,
8247,
8741,
21,
2159,
45,
184,
92,
31,
3746,
14,
830,
16,
21,
8981,
27,
21,
18929,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
6950,
8247,
8741,
21,
2159,
4865,
20,
1442,
125,
21747,
1117,
363,
21,
830,
4150,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL query for reporting data over given period
===
I'm writing up a reporting system for a recruitment website I made. So far I've managed to get the function below to pull through total jobs over a given time period grouped in days, weeks months or years
What I'd like to do is pull through the total job applications for that same period. The job applications are stored in another table called job_application, and contain job_application_id, job_id and date_added fields
Is there a way I can pull that data through in the same query? The SQL is beginning to fry my brain so any help would be much appreciated!
public function getJobReport() {
$sql = "SELECT MIN(tmp.date_added) AS date_start, MAX(tmp.date_added) AS date_end, COUNT(tmp.job_id) AS `jobs` FROM (SELECT j.job_id, ja.total, j.date_added FROM `" . DB_PREFIX . "job` j WHERE 1";
if (isset($data['date_start']) && $data['date_start']) {
$sql .= " AND DATE(j.date_added) >= '" . $this->db->escape($data['date_start']) . "'";
}
if (isset($data['date_end']) && $data['date_end']) {
$sql .= " AND DATE(j.date_added) <= '" . $this->db->escape($data['date_end']) . "'";
}
$sql .= " GROUP BY j.job_id) tmp";
if (isset($data['group'])) {
$group = $data['group'];
} else {
$group = 'week';
}
switch($group) {
case 'day';
$sql .= " GROUP BY DAY(tmp.date_added)";
break;
default:
case 'week':
$sql .= " GROUP BY WEEK(tmp.date_added)";
break;
case 'month':
$sql .= " GROUP BY MONTH(tmp.date_added)";
break;
case 'year':
$sql .= " GROUP BY YEAR(tmp.date_added)";
break;
}
if (isset($data['start']) || isset($data['limit'])) {
if ($data['start'] < 0) {
$data['start'] = 0;
}
if ($data['limit'] < 1) {
$data['limit'] = 20;
}
$sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit'];
}
$query = $this->db->query($sql);
return $query->rows;
} | 0 | [
2,
51,
18,
22402,
25597,
26,
6670,
1054,
84,
504,
620,
800,
3726,
3726,
31,
22,
79,
1174,
71,
21,
6670,
329,
26,
21,
18335,
2271,
31,
117,
9,
86,
463,
31,
22,
195,
1471,
20,
164,
14,
1990,
1021,
20,
2201,
120,
600,
4844,
84,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WP7 webClient.OpenReadAsync -how to post variables rather than using a query string
===
I'm using the following code to retrieve a json string from my webserver:
var webClient = new WebClient();
webClient.OpenReadCompleted += OnOpenReadCompleted;
webClient.OpenReadAsync(new Uri("https://myurl.com/request.cgi?user=" + user + "&pass=" + pass + "&junk=" + DateTime.Now, UriKind.Absolute));
...
private void OnOpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
// response processed here
}
I intend to encrypt the variables used but would like to be able to post the variables to the server rather than have them included in the query string. How would I achieve this?
Thanks - Stu
| 0 | [
2,
13,
13790,
465,
2741,
150,
18513,
38,
9,
10157,
99,
4405,
9507,
150,
13,
8,
1544,
20,
678,
12157,
864,
119,
568,
21,
25597,
3724,
800,
3726,
3726,
31,
22,
79,
568,
14,
249,
1797,
20,
11917,
21,
487,
528,
3724,
37,
51,
2741,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using a PHP function collection or how to avoid many files
===
I wonder if it is possible to use a single PHP file which is declaring all necessary functions instead of creating a unique file for every one.
For example, i've got a form which submits a text to phpscript.php. Another form is sending a date. I would do this like this:
<form id="text" method="post" action="textscript.php">
<textarea name="text"></textarea>
</form>
<form id="editForm" method="POST" action="datescript.php">
<input name="date" type="date" /><br />
<input id="submitDate" type="submit" /><br />
</form>
Now i would like to declare functions.php, which contains both procedures and then use this file for form action. I have just no idea idea how to achieve this as well as i already tried to give an URL-Parameter. | 0 | [
2,
568,
21,
13,
26120,
1990,
1206,
54,
184,
20,
2658,
151,
6488,
800,
3726,
3726,
31,
2666,
100,
32,
25,
938,
20,
275,
21,
345,
13,
26120,
3893,
56,
25,
15594,
65,
2378,
3719,
700,
16,
2936,
21,
2619,
3893,
26,
352,
53,
9,
26,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating an image Tag with DOMDocument fails
===
I'm using DOMDocument to generate a XML and this XML has to have an <image>-Tag.
Somehow, when I do (simplified)
$response = new DOMDocument();
$actions = $response->createElement('actions');
$response->appendChild($actions);
$imageElement = $response->createElement('image');
$actions->appendChild($imageElement);
$anotherNode = $response->createElement('nodexy');
$imageElement->appendChild($anotherNode);
it results in
<actions>
<img>
<node></node>
</actions>
If I change 'image' to 'images' or even 'img' it works. It does work as well when I switch from PHP 5.3.10 to 5.3.8.
Is this a bug or a feature? My guess is that DOMDocuments assumes that I want to build an HTML img Element ... Can I prevent this somehow?
Weird thing on top: I'm not able to reproduce the error in another script on the same server. But I do not catch the pattern ... | 0 | [
2,
2936,
40,
1961,
3383,
29,
11859,
28132,
13614,
800,
3726,
3726,
31,
22,
79,
568,
11859,
28132,
20,
7920,
21,
23504,
17,
48,
23504,
63,
20,
57,
40,
13,
1,
22039,
1,
8,
8628,
9,
3625,
15,
76,
31,
107,
13,
5,
11268,
6,
5579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I filter the content of SSL website using WEBrick proxy server
===
I'm making content filtering proxy server using WEBrick.
Can I change/filter the content of ssl-encrypted page?
Thanks.
here is my code;
#!/usr/bin/env ruby
require "webrick"
require "webrick/httpproxy"
require "ruby-debug"
include WEBrick
handler = Proc.new do |req, res|
# res.body is empty when connecting https
# I wanna chagne the body...
end
server = HTTPProxyServer.new(
:Port => 4545,
:ProxyVia => false,
:ProxyContentHandler => handler,
)
Signal.trap('INT') do
server.shutdown
end
server.start | 0 | [
2,
92,
31,
11945,
14,
2331,
16,
13,
18,
18,
255,
2271,
568,
95,
21406,
27188,
8128,
800,
3726,
3726,
31,
22,
79,
544,
2331,
25272,
27188,
8128,
568,
95,
21406,
9,
92,
31,
753,
118,
11924,
815,
14,
2331,
16,
13,
18,
18,
255,
8,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to change alignment of a report field in crystal reoport at runtime
===
In a crystal report, i want to set allignment of a fields accordingly. How can i do the same at run time.
Thanks. | 0 | [
2,
184,
20,
753,
12448,
16,
21,
1330,
575,
19,
4282,
302,
111,
1993,
35,
485,
891,
800,
3726,
3726,
19,
21,
4282,
1330,
15,
31,
259,
20,
309,
65,
9693,
1130,
16,
21,
2861,
12932,
9,
184,
92,
31,
107,
14,
205,
35,
485,
85,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Positioning NSTextField correctly with setFrame:
===

I am having problems positioning my NSTextFields inside my views so I hope you guys can help me. I have this NSView *theView with `[theView setFrame:NSMakeRect(10, 10, 64, 64)];` which positions the view exactly where I want it.
But now I am trying to add a NSTextField as a subView to theView but something isn't right. Now the image *above is how it should be*.
Here's my code and what it looks like:
primaryDigit = [[NSTextField alloc] init];
[primaryDigit setFrame:NSMakeRect(4, 6, 60, 58)];
[primaryDigit setFont:[NSFont fontWithName:@"Helvetica Neue" size:55]];
[primaryDigit setBezeled:NO];
[primaryDigit setEditable:NO];
[primaryDigit setSelectable:NO];
[primaryDigit setDrawsBackground:NO];
[primaryDigit setTextColor:[NSColor whiteColor]];
[primaryDigit setStringValue:@"2"];
[self addSubview:primaryDigit];

And when I do `[primaryDigit setFrame:NSMakeRect(0, 0, 64, 64)];` the digit doesn't end up in the left lower corner but it does this:

Is there something fundamental that I don't understand about positioning these views? I'm quite the noobie but I still thought that I understand this. (Btw, the font is different in these images but that shouldn't cause a problem, I think?) | 0 | [
2,
649,
68,
13,
2172,
11969,
1109,
12044,
29,
309,
8361,
45,
800,
3726,
3726,
13,
187,
2558,
2172,
4725,
500,
5,
21127,
6903,
410,
9,
5316,
9,
102,
118,
2119,
79,
18,
118,
12054,
220,
135,
499,
3099,
135,
396,
165,
38,
165,
728,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Core Data: crash when last window is closed
===
I get invariably this error when I close the last window of my app:
> Application Specific Information: objc_msgSend() selector name:
> respondsToSelector: objc[42729]: garbage collection is OFF
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0
> libobjc.A.dylib 0x00007fff8cc9a150 objc_msgSend_vtable5
> + 16 1 com.apple.AppKit 0x00007fff8fbca814 -[NSApplication supplementalTargetForAction:sender:] + 63 2 com.apple.AppKit 0x00007fff8fab91e4
> _objectFromResponderChainWhichRespondsToAction + 155 3 com.apple.AppKit 0x00007fff8fab8feb
> _NSTargetForSendAction + 3255 4 com.apple.AppKit 0x00007fff8fab832f -[NSApplication targetForAction:to:from:] + 682 5
> com.apple.AppKit 0x00007fff8fab7e00 -[NSMenu
> _enableItem:] + 403
I confess that the document nib has two windows. I want the "auxiliary window" to be closed and deallocated when the main window is closed. How should I do? Maybe these errors com from here… I'm using Core Data and ARC.
Regards
| 0 | [
2,
2884,
1054,
45,
4597,
76,
236,
1463,
25,
827,
800,
3726,
3726,
31,
164,
27913,
48,
7019,
76,
31,
543,
14,
236,
1463,
16,
51,
4865,
45,
13,
1,
3010,
1903,
676,
45,
5122,
15864,
1,
79,
18,
5447,
2451,
5,
6,
23946,
204,
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... |
Average returns way too big number
===
When I get the average of the two divided variables, I get something like:
1.4007342235591407
but what I want is just two decimals, like this:
1.40
Here is my code:
document.getElementById('place').innerHTML = meter / seler; | 0 | [
2,
862,
4815,
161,
266,
580,
234,
800,
3726,
3726,
76,
31,
164,
14,
862,
16,
14,
81,
2350,
12157,
15,
31,
164,
301,
101,
45,
137,
9,
7114,
4440,
25292,
23341,
4472,
26301,
47,
98,
31,
259,
25,
114,
81,
26380,
18,
15,
101,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WaterFall in CorePlot
===
How to plot waterfall chart using coreplot in ipad.I am able to draw pie chart and other chart but not getting way to draw it. please share if any one have working example it will be very helpfull | 0 | [
2,
12927,
19,
2884,
13221,
38,
800,
3726,
3726,
184,
20,
3798,
12927,
1795,
568,
2884,
13221,
38,
19,
31,
8240,
9,
49,
589,
777,
20,
2003,
5470,
1795,
17,
89,
1795,
47,
52,
1017,
161,
20,
2003,
32,
9,
2247,
1891,
100,
186,
53,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Mysql UPDATE error, why
===
i have this part of code:
$result = mysql_query("SELECT * FROM posts WHERE id = '$id'") or die (mysql_error());
$rec = mysql_fetch_array($result) or die (mysql_error());
$like = $rec['like'];
$like += 1;
mysql_query("UPDATE posts SET like = '$like' WHERE id = '$id'") or die (mysql_error());
and returning this error:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like = '1' WHERE id = '43'' at line 1"
Help me ^^ | 0 | [
2,
51,
18,
22402,
11100,
7019,
15,
483,
800,
3726,
3726,
31,
57,
48,
141,
16,
1797,
45,
5579,
29955,
800,
51,
18,
22402,
1,
8190,
93,
5,
7,
18,
16964,
1637,
37,
9868,
113,
4924,
800,
13,
22,
4403,
1340,
22,
7,
6,
54,
1327,
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... |
FMDB: Where does the iPhone simulator store Desktop SQL files?
===
I am trying to connect to an SQL Database with FMDB that is on my development machine desktop. I can open it from sqlite3 from a terminal and it has the data in it.
When I try and use this code from Cocoa I get an "error opening!: 14"
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex:0];
NSString *path = [docsPath stringByAppendingPathComponent:@"database.sqlite"];
FMDatabase *database = [FMDatabase databaseWithPath:path];
What do I need to do to solve this and where is the preferred place to store data? | 0 | [
2,
4585,
9007,
45,
113,
630,
14,
21024,
24565,
1718,
17404,
4444,
255,
6488,
60,
800,
3726,
3726,
31,
589,
749,
20,
6379,
20,
40,
4444,
255,
6018,
29,
4585,
9007,
30,
25,
27,
51,
522,
1940,
17404,
9,
31,
92,
368,
32,
37,
4444,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is identity delegation via WS-Trust/ActAs supported in ACS?
===
I'm just getting started with claims-based security and have a question related to identity delegation. I've managed to set up a local dummy STS and a couple of WCF services that relies on it for authentication. A web application authenticates the user via the STS and makes a call to Service A *on behalf of the user* (using [`ChannelFactory.CreateChannelActingAs`][1]). This works fine.
Now I would like to use Azure Access Control Service (ACS) as a federation provider and sign in using a Google account (or whatever) instead, getting rid of the dummy STS altogether. I'm able to authenticate to the web application, but receive a "bad request" response when trying to make the call to the web service.
I realize that a number of things could be the problem, but then it also hit me that I haven't really checked if ACS even supports this ActAs concept of WS-Trust. I've found [a forum thread][2] that indicates that ActAs is not supported, but it's about six months old.
**Can anyone confirm whether ActAs is supported in ACS?** And if not, is there any other clever way of implementing identity delegation that *is* supported?
[1]: http://msdn.microsoft.com/en-us/library/ee766397
[2]: http://social.msdn.microsoft.com/Forums/en-US/windowsazuresecurity/thread/bace0edf-391b-4fa4-b0b1-ca5a97815a27#97fa7970-296e-41f2-8acf-0b23f7f631fb | 0 | [
2,
25,
3270,
9651,
1197,
619,
18,
8,
11592,
118,
5183,
472,
1827,
19,
21,
6824,
60,
800,
3726,
3726,
31,
22,
79,
114,
1017,
373,
29,
2810,
8,
1281,
1221,
17,
57,
21,
1301,
1597,
20,
3270,
9651,
9,
31,
22,
195,
1471,
20,
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... |
how to create document library in sharepoint 2010 using client object model
===
i am struggling to create a document library in a site using sharepoint Client object model.
main idea is to create document library after that under each document library we will create sub documents.
Please let me know..
Thanks
Kajal | 0 | [
2,
184,
20,
1600,
4492,
1248,
19,
1891,
3132,
498,
568,
6819,
3095,
1061,
800,
3726,
3726,
31,
589,
7587,
20,
1600,
21,
4492,
1248,
19,
21,
689,
568,
1891,
3132,
6819,
3095,
1061,
9,
407,
882,
25,
20,
1600,
4492,
1248,
75,
30,
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... |
AJAX and getting recent database entries
===
I am working on a web application that will query a database for messages and display them to the browser. I am first of all retrieving the list of messages server side on visiting the site and then displaying the ones that are there. But then I want to use AJAX to periodically check for messages again and update the DOM with the new ones.
However, I don't want to refresh the entire list. Just inject the most recent messages into a table. I am using MySQL, PHP and mootools and I am really just looking to hear ideas of the best practice on how to achieve this. Sending an array of every message ID on the screen via AJAX and then comparing it to what is in the DB is my current solution but this seems extremely dirty.
Any suggestions are welcome. | 0 | [
2,
20624,
17,
1017,
1764,
6018,
11399,
800,
3726,
3726,
31,
589,
638,
27,
21,
2741,
3010,
30,
129,
25597,
21,
6018,
26,
7561,
17,
3042,
105,
20,
14,
16495,
9,
31,
589,
64,
16,
65,
13,
6239,
3272,
8397,
14,
968,
16,
7561,
8128,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should it take more than a few seconds to ALTER a VIEW in SQL Server
===
I'm trying to alter a View that is just a table plus an additional calculated field, and it's now five minutes since I hit EXECUTE. Is this normal? | 0 | [
2,
378,
32,
247,
91,
119,
21,
310,
2582,
20,
7835,
21,
1418,
19,
4444,
255,
8128,
800,
3726,
3726,
31,
22,
79,
749,
20,
7835,
21,
1418,
30,
25,
114,
21,
859,
3123,
40,
1351,
10785,
575,
15,
17,
32,
22,
18,
130,
355,
902,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
insert table using Dynamic Ranges
===
I have looked around and not quite found the code i am looking for/ felt it was always drawn out longer than need be. I put together some VBA in a structure close to how i feel it should look. I am trying to insert a table running off source data that changes in row length each time i create this table with my template. I did find code to select Last row and Last column, however there is no garauntee that the final row in column 'A' will have data in column 'K'.
column 'K' is the final column i would liek to select, essentially the range select should show A1:K"last row"
below is my code, hopefully you can help, and please dont laugh if im completely off track with its set up :)
Sub LastRow_AcrossCols()
' Example used to select the last
' filled row across as many filled columns
' Find the last filled row in column A
Sheets("Raw data").Select
Range("A1").Select
lRow = ActiveSheet.UsedRange.Rows.Count
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A" & lRow & ":" & Cells(lRow, 11).Address).Select, , xlYes).Name = "Table3"
Range("Table3").Select
Selection.Copy
Sheets("ITS Data").Select
Range("Table1[Issue Number]").Select
ActiveSheet.Paste
Range("A2").Select
End Sub | 0 | [
2,
14692,
859,
568,
7782,
9230,
800,
3726,
3726,
31,
57,
292,
140,
17,
52,
1450,
216,
14,
1797,
31,
589,
699,
26,
118,
427,
32,
23,
550,
3160,
70,
1045,
119,
376,
44,
9,
31,
442,
429,
109,
566,
969,
19,
21,
1411,
543,
20,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need little assistance with pexpect interaction
===
Need little assistance with making this code work with pexpect module.
This code executes git pull by logging into a server and then downloads the latest code (if upgrade is available) or just sends out a messages saying "Already up-to-date."
The code actually idenfies the password screen but does not identify the text "already up-to-date"
not sure if I'm missing anything here.
A snippet from the code is:
p = pexpect.spawn('git pull',cwd = comp_dir,maxread = 10000, timeout = 100)
i = p.expect(['password:','Already up-to-date.',pexpect.EOF])
if i == 0:
output_lines = p.before
output_line_list = output_lines.split('\r\n')
for line in output_line_list: print line
count = 0
p.sendline(pwd)
while count < 3: **# The server in case of unsuccessful login asks for password thrice so this check... (not sure if there is a better way of achieving this)**
try:
output = p.expect('Permission denied')
count+=1
p.sendline(pwd)
p.logfile = sys.stdout
except:
print 'Successful Login !!!! ------'
p.expect('Already up-to-date',timeout=None)
count = 3
if i == 1:
output_lines = p.before
output_line_list = output_lines.split('\r\n')
for line in output_line_list: print line
p.expect(pexpect.EOF)
Any help is greatly appreciated.
Thanks,
-Vijay | 0 | [
2,
376,
265,
4067,
29,
351,
6899,
11557,
7754,
800,
3726,
3726,
376,
265,
4067,
29,
544,
48,
1797,
170,
29,
351,
6899,
11557,
12613,
9,
48,
1797,
15644,
18,
13,
10404,
2201,
34,
13,
13919,
77,
21,
8128,
17,
94,
7121,
18,
14,
573... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Avoid version specific information in configSection in app.config
===
I have made a small GUI for administration of some settings in an app.config file. The GUI is released as part of my product, making it possible to change values in the app.config file, without opening this in a text editor.
The properties are implemented in a custom configSection, making it strongly typed in the code. My problem is, that when the app.config file is updated (when I save from the GUI), the fully qualified name of my assembly is written in the configSection like this:
<section name="ConfigurationSettings" type="PerformanceDude.MSBuildShellExtension.Common.ConfigurationSettings, Common, Version=2.2.1.0, Culture=neutral, PublicKeyToken=1ab1b15115e63xxx" />
When I upgrade this assembly to a new version number, the GUI code assembly version not longer matches the assembly references in the app.config.
I don't want to write an upgrade script changing the version everytime I update. Does anyone know a great solution to this problem?
| 0 | [
2,
2658,
615,
1903,
676,
19,
13,
14093,
2816,
10579,
19,
4865,
9,
14093,
2816,
800,
3726,
3726,
31,
57,
117,
21,
284,
9457,
26,
1603,
16,
109,
12410,
19,
40,
4865,
9,
14093,
2816,
3893,
9,
14,
9457,
25,
261,
28,
141,
16,
51,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.