unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
isset or !empty for $_GET[var]
===
i recently had to do a "test" for a job, and i got feed back saying that this statement was incorrect:
$images = $flickr->get_images(5, !empty($_GET['pg']) ? $_GET['pg'] : 1);
The "supposed" error was generated via the ternary operator on the first time the page was loaded, as there was no "?pg=1" (or whatever) passed via the query string.
The feed back said i should have used isset instead. I have looked at various posts both here ([question 1960509][1]) and blogs, but cannot find any definitive answer.
Is this really an error? How can i replicate this issue? do i need to put on E_STRICT or something in my php.ini file? Or might this be due to an older version of php?
Note: please don't tell me about how i should validate things.. i know this... it was a test to just see if i could use the flickr api calls.
[1]: http://stackoverflow.com/questions/1960509/isset-and-empty-make-code-ugly | 0 | [
2,
25,
3554,
54,
13,
187,
26542,
26,
5579,
1,
3060,
2558,
3311,
500,
800,
3726,
3726,
31,
1989,
41,
20,
107,
21,
13,
7,
10543,
7,
26,
21,
1205,
15,
17,
31,
330,
4063,
97,
1148,
30,
48,
3331,
23,
18867,
45,
5579,
22039,
18,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
where I can publicate my release notes about my Ruby or JavaScript open source projects?
===
I have some open source ruby and JS projects.
I need feedback for my projects on [github][1], that is why I try to find any ways for advertise.
I want to know - where I can publicate my release notes about my Ruby or JavaScript open source projects?
Which popular IT resources with open publication system are you know?
Which news sites are you reading?
[1]: https://github.com/the-teacher | 2 | [
2,
113,
31,
92,
317,
1373,
51,
830,
2434,
88,
51,
10811,
54,
8247,
8741,
368,
1267,
2314,
60,
800,
3726,
3726,
31,
57,
109,
368,
1267,
10811,
17,
487,
18,
2314,
9,
31,
376,
13111,
26,
51,
2314,
27,
636,
10404,
20926,
500,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CKeditor not loading text when using onclick
===
I have two ways of launching the same CKeditor on a page one
<a href="javascript: editor();" >text</a>
and the other
<td onclick="javascript: editor();">
But for some reason the editor is not picking up the text from the div "text" when clicking the table based link.
function editor()
{
textEditor=CKEDITOR.replace( 'text',
{
toolbar : 'Basic'
});
} | 0 | [
2,
13,
2601,
13401,
52,
12797,
1854,
76,
568,
27,
150,
10129,
800,
3726,
3726,
31,
57,
81,
2847,
16,
13762,
14,
205,
13,
2601,
13401,
27,
21,
2478,
53,
13,
1,
58,
746,
14057,
3726,
7,
1004,
1385,
8741,
45,
1835,
5,
6,
73,
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... |
wso2 url rewrite
===
I am using wso2ESB to obtain a login ticket from alfresco using the alfresco username and password. After I call the service
http://xx.xx.xxx.xx:8282/services/AlfrescoLogin
I have to append
http://xx.xx.xxx.xx:8282/services/AlfrescoLogin?u=xxx&pw=xxx
I have defined the following service:
<proxy name="AlfrescoLogin" transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint>
<address uri="http://XX.XX.XXX.XX:8080/alfresco/s/api/login"/>
</endpoint>
<inSequence>
<rewrite>
<rewriterule>
<action value="u=xxxxx" type="set" fragment="query"/>
<action value="pw=xxxxx" type="set" fragment="query"/>
</rewriterule>
</rewrite>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
</proxy>
But the following configuration has no effect. I've tried to set the type attribute of the action tag to append as well. And I still have to add by hand the parameters to the url.
| 0 | [
2,
619,
656,
135,
287,
6362,
27891,
800,
3726,
3726,
31,
589,
568,
619,
656,
135,
160,
220,
20,
5545,
21,
6738,
108,
6133,
37,
14307,
99,
8328,
568,
14,
14307,
99,
8328,
4155,
7259,
17,
20884,
9,
75,
31,
645,
14,
365,
7775,
6903... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
access string names using variables in FOR statement
===
is is possible to access objects using variables in a FOR statement?
Say i have declared:
UIImageView *UIImageView0;
UIImageView *UIImageView1;
UIImageView *UIImageView2;
and i have 3 objects in an array and i call a FOR statement if x in the array is equal to 2 i want it to add the value of x to the UIImageView name like UIImageView1 etc
I have tried:
for (int x=0; x<[theArray count]; x++) {
UIImageView[x].image = etc....
}
but it gives me a error on UIImageView[x]
subscript requires size of interface 'UIImageView'
any ideas? or is it even possible with a UIImageView?
Thanks
| 0 | [
2,
1381,
3724,
1817,
568,
12157,
19,
26,
3331,
800,
3726,
3726,
25,
25,
938,
20,
1381,
3916,
568,
12157,
19,
21,
26,
3331,
60,
395,
31,
57,
2482,
45,
13,
5661,
22039,
4725,
1637,
5661,
22039,
4725,
387,
73,
13,
5661,
22039,
4725,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Uploading and saving files in CakePHP 2.1
===
I want to save my uploads in a specific folder for each app_id. For example, when an applicant with app_id of 45 uploads the files it must save in a folder named 45 whilst all his/her uploads such as birth certificate, college certificate, profile picture and high school certificate will be in that folder, same to the other app_id eg 89 must have his/her own folder but all the uploaded files will be located in one parent folder for example webroot/files/uploads/....
Any tutorial or link to tackle this challenge
Thank you | 0 | [
2,
71,
16866,
17,
7599,
6488,
19,
8390,
26120,
172,
9,
165,
800,
3726,
3726,
31,
259,
20,
2079,
51,
71,
8294,
18,
19,
21,
1903,
19294,
26,
206,
4865,
1,
1340,
9,
26,
823,
15,
76,
40,
25354,
29,
4865,
1,
1340,
16,
2487,
71,
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... |
google talk / libjingle developer forum
===
Does anyone know if there is a libjingle developer forum?
The link provided at https://developers.google.com/talk/libjingle/index under "Support" throws a "You do not have permission to access this group. (#418)" error.
Other places I could find are http://code.google.com/p/libjingle/issues/list, but that is only for bugs. And the activity at Stackoverflow seems low.
| 0 | [
2,
8144,
930,
13,
118,
13,
8326,
20785,
413,
10058,
5691,
800,
3726,
3726,
630,
1276,
143,
100,
80,
25,
21,
13,
8326,
20785,
413,
10058,
5691,
60,
14,
3508,
1173,
35,
7775,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
960,
118,
9718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
deserializing JSON to object using NewtonSoft in C#
===
I try to deserialize the jsonresult response to object using NewtonSoft in C#(MVC4), then i got the object value is null, any one of them give the solution to this problem.
Example response:
{"recsonpage":"3","result":[{"entity.customerid":"987","entity.entityid":"874",
"contact.emailaddr":"test@gmail.com","contact.name":"test a","contact.contactid":"568",
"contact.telno":"0444444242","entity.description":"Contact"},
{"entity.customerid":"987","entity.entityid":"874",
"contact.emailaddr":"test@gmail.com","contact.name":"test a","contact.contactid":"568","contact.telno":"0444444242","entity.description":"Contact"},
{"entity.customerid":"987","entity.entityid":"874",
"contact.emailaddr":"test@gmail.com","contact.name":"test a","contact.contactid":"568","contact.telno":"0444444242","entity.description":"Contact"}],"recsindb":"3"} | 0 | [
2,
1746,
106,
2815,
3335,
487,
528,
20,
3095,
568,
8124,
12980,
19,
272,
5910,
800,
3726,
3726,
31,
1131,
20,
1746,
106,
2815,
2952,
14,
487,
528,
29955,
1627,
20,
3095,
568,
8124,
12980,
19,
272,
5910,
5,
79,
8990,
300,
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... |
Display popup message after record has been added to mysql database using html form
===
I have the following html form:
<html>
<body>
<form action="insert.php" method="post">
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
And this is the .php file:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$sql="INSERT INTO Persons (FirstName, LastName, Age)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con);
?>
How do I get a popup message that displays for 2 seconds after a record has been submitted that says for example "Record added" | 0 | [
2,
3042,
1675,
576,
2802,
75,
571,
63,
74,
905,
20,
51,
18,
22402,
6018,
568,
13,
15895,
505,
800,
3726,
3726,
31,
57,
14,
249,
13,
15895,
505,
45,
13,
1,
15895,
1,
13,
1,
9760,
1,
13,
1,
4190,
1028,
3726,
7,
108,
18,
6767,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unable to add txt files to jar using ant
===
I have written an ant script to create jar for a project. I need to include two txt files which are under the root folder in my project. The files are getting added in the jar file. But when I execute the jar its not taking them. Can you please help? My ant script is given below:
<?xml version="1.0" encoding="UTF-8"?>
<project name="MessagingInterface" basedir="." default="Jar">
<description>
Build File For Messaging Interface
</description>
<property name="src" location="appClientModule" />
<property name="build" location="build/classes" />
<property name="dist" location="dist" />
<property name="root" location="." />
<property name="lib" location="lib" />
<property name="MsgFactInputFile" location="tabConv.txt" />
<property name="MessagingInputFile" location="RDC.txt" />
<target name="Clean" description="Removes previous build">
<delete verbose="true">
<fileset dir="${dist}"/>
</delete>
</target>
<target name="Init" depends="Clean">
<mkdir dir="${dist}"/>
</target>
<target name="Compile" depends="Init">
<javac includeantruntime="false" destdir="${build}">
<src path="${src}" />
</javac>
</target>
<target name="Jar" depends="Compile">
<jar jarfile="${dist}/MessagingInterface.jar" basedir="${build}">
<fileset file="${MsgFactInputFile}" />
<fileset file="${MessagingInputFile}" />
<zipgroupfileset dir="${lib}">
<includesfile name="dependencies.list" />
</zipgroupfileset>
</jar>
</target>
</project>
| 0 | [
2,
2343,
20,
3547,
20225,
38,
6488,
20,
5112,
568,
40,
38,
800,
3726,
3726,
31,
57,
642,
40,
40,
38,
3884,
20,
1600,
5112,
26,
21,
669,
9,
31,
376,
20,
468,
81,
20225,
38,
6488,
56,
50,
131,
14,
5900,
19294,
19,
51,
669,
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... |
FF Addon-sdk: easy way to avoid server scripts
===
I'm looking to, given a target website, avoid all the server-scripts. In order to do that, I first downloaded the contents of that page and then created a pagemod that detects the URL. The problem is that, then, I want to load the stored contents but I don't know how to do it easily. For example, I've tried:
new PageMod({
include: /(http:\/\/)?(www.google)(.([a-z]){2,3}){1,2}(\/)?/,
contentURL: data.url('google.html'),
contentScriptWhen: 'end',
contentScriptFile: [data.url('contentScripts/jquery.js'),
data.url('contentScripts/handleQuery.js')],
contentScript: 'alert("' + data.load('contentScripts/google.html') + '");',
onAttach: function getQuery(worker) { ... }
Where google.html is Google's main page. But it gives me a lot of errors...
Does someone know a better solution? | 0 | [
2,
13,
2460,
3547,
218,
8,
18,
43,
197,
45,
2010,
161,
20,
2658,
8128,
17505,
800,
3726,
3726,
31,
22,
79,
699,
20,
15,
504,
21,
2935,
2271,
15,
2658,
65,
14,
8128,
8,
8741,
18,
9,
19,
389,
20,
107,
30,
15,
31,
64,
23887,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UnsatisfiedLinkError for native cpp function in Android app (ndk)
===
I am trying to run an easy Android ndk app in cpp, but I get UnsatisfiedLink Error for the Generate() function.
Any help would be appreciated. I am quite fluent in c++, but my java is a little bit rusty. I have been trying a lot of tips from the web concerning naming, but so far no luck. Here are my files:
native.cpp:
#include <string.h>
#include <jni.h>
jstring Java_com_optimuse_app_OptimuseAppActivity_generate(JNIEnv* env, jobject thiz){
return env->NewStringUTF("Hello from JNI !");
}
Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := native
LOCAL_SRC_FILES := native.cpp
include $(BUILD_SHARED_LIBRARY)
I compile this with ndk-build and all goes well, it provides me with a libnative.so, that is located in the project directory. I use eclipse for the rest.
OptimuseAppActivity.java:
package com.optimuse.app;
import android.app.Activity;
import android.widget.TextView;
import android.os.Bundle;
public class OptimuseAppActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText( generate() );
setContentView(tv);
}
public native String generate();
static {
System.loadLibrary("native");
}
}
And the automatically generated AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.optimuse.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:hasCode="true">
<activity
android:name="com.optimuse.app.OptimuseAppActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thank you for any suggestions, been searching for a few hours now! | 0 | [
2,
367,
18,
5166,
18,
1707,
69,
6258,
29992,
26,
1275,
272,
3421,
1990,
19,
13005,
4865,
13,
5,
706,
197,
6,
800,
3726,
3726,
31,
589,
749,
20,
485,
40,
2010,
13005,
13,
706,
197,
4865,
19,
272,
3421,
15,
47,
31,
164,
367,
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... |
Problems with MYSQL query (efficiency)
===
I'm having real problems with my Mysql statement, I need to join a few tables together, query them and order by the average of values from another table. This is what I have...
SELECT
ROUND(avg(re.rating), 1)AS avg_rating,
s.staff_id, s.full_name, s.mobile, s.telephone, s.email, s.drive
FROM staff s
INNER JOIN staff_homes sh
ON s.staff_id=sh.staff_id
INNER JOIN staff_positions sp
ON s.staff_id=sp.staff_id
INNER JOIN reliability re
ON s.staff_id=re.staff_id
INNER JOIN availability ua
ON s.staff_id=ua.staff_id
GROUP BY staff_id
ORDER BY avg_rating DESC
Now I believe this to work although I am getting this error "The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay".
I think this means that I have too many joins and because it is shared hosting it won't allow large queries to run I don't know.
What I would like to know is exactly what the error means (I have googled it but I don't understand the answers) and how I can work round it by maybe making my query more efficient?
Any help would be appreciated. Thanks | 0 | [
2,
1716,
29,
51,
18,
22402,
25597,
13,
5,
9039,
9198,
8883,
6,
800,
3726,
3726,
31,
22,
79,
452,
683,
1716,
29,
51,
51,
18,
22402,
3331,
15,
31,
376,
20,
1865,
21,
310,
7484,
429,
15,
25597,
105,
17,
389,
34,
14,
862,
16,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Display an svg-circle on a polymaps chart
===
I'm displaying a bing-map with the use of polymaps with [this code][1]. It's a simple script derived from the bing-example on the website of polymaps.
I now want to display a marker, a svg-circle on certain coordinates.
I've tried to use the `po.geojson("load", load)` to load the geojson feature collection and display the point in the feature collection. The structure [looks like this][2] (off course it should be a JSON string, but this is more easy to read.)
But the script does not display the marker.
Using this code:
[...]
map.add(po.geoJson()
.url("http://link/to/current.php")
.on("load", load));
[...]
function load(e) {
for (var i = 0; i < e.features.length; i++) {
var feature = e.features[i];
feature.element.setAttribute("class", "punt");
}
}
css:
.punt {
fill: cyan;
fill-opacity: 1;
stroke: #012;
}
Won't display the blue dot on the map. Does anyone now why this is not working?
[1]: http://vantoegevoegdewaarde.nl/maps.txt
[2]: http://vantoegevoegdewaarde.nl/punt.txt | 0 | [
2,
3042,
40,
13,
18,
22955,
8,
24195,
27,
21,
3446,
15022,
18,
1795,
800,
3726,
3726,
31,
22,
79,
17418,
21,
18080,
8,
15022,
29,
14,
275,
16,
3446,
15022,
18,
29,
636,
1565,
1797,
500,
2558,
165,
500,
9,
32,
22,
18,
21,
1935,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 multiple assignment: want to (tokens.append(),tokens.append(), remaining) = remaining.partition(blank)
===
I would like to do:
(tokens.append(),tokens.append(), remaining) = remaining.partition(blank)
but that is not valid syntax. Instead, I do:
(t1, t2, remaining) = remaining.partition(blank)
tokens.append(t1)
tokens.append(t2)
Is there a cleaner way?
BTW I believe I must use .partition, because I must not collapse multiple blanks into one. | 0 | [
2,
20059,
1886,
8427,
45,
259,
20,
13,
5,
262,
2853,
18,
9,
22358,
43,
5,
6,
15,
262,
2853,
18,
9,
22358,
43,
5,
6,
15,
1846,
6,
800,
1846,
9,
3091,
9861,
5,
10754,
5719,
6,
800,
3726,
3726,
31,
83,
101,
20,
107,
45,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JavaScript analogue for HTTP Date header
===
Do we have in JavaScript something that can help us determine the time, when the page was requested?
There is an HTTP header called "Date: " that fits my needs best but AFAIK there is no way to get it's value for invoking page in JavaScript.
Maybe someone can suggest something that could help? | 0 | [
2,
8247,
8741,
21574,
26,
7775,
1231,
157,
106,
800,
3726,
3726,
107,
95,
57,
19,
8247,
8741,
301,
30,
92,
448,
182,
3746,
14,
85,
15,
76,
14,
2478,
23,
6602,
60,
80,
25,
40,
7775,
157,
106,
227,
13,
7,
8209,
45,
13,
7,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android programming: Change TCP to RTP
===
I am working on an Android app including client and server that client app sends camera captured data to server for processing, and server sent the result back to client to display. The current version of it uses TCP for transmitting data, so the code includes something like:
Client side:
send(){
Socket socket = new Socket();
DataOutputStream outputStream = new DataoutputStream(socket.getOutPutStream());
outputStream.writeUTF(...)
...
outputStream.write(data);
outputSteram.flush();
...
}
receive(){
DataInputStream dataInputStream = new DataInputStream(...);
...
dataInputStream.readFully(data, 0, length);
...
}
Server side:
...
serverDataInputStream.readFully(data,0,length);
//process data
...
serverDataOutputStream.write(reply)
...
I tried to change this to use UDP, but the data sent from client to server is much larger than the maximum size of a UDP packet, so have to fragment the data in client and reassemble it on server manually. It turns out to be too much troublesome.
I know RTP takes care of data fragmentation, so now I want to change this into RTP. After Googleing for a while, I found the following information:
http://sourceforge.net/projects/jlibrtp/
http://code.google.com/p/sipdroid/source/browse/trunk/src/org/sipdroid/sipua/ui/VideoCamera.java
And these two posts are very similar to what I am doing:
http://stackoverflow.com/questions/5959745/android-camera-rtsp-rtp-stream
http://stackoverflow.com/questions/7332532/creating-rtp-packets-from-android-camera-to-send
But the posts just include limited sample code. Can anyone post more details and sample code here? I don't have much experience of Java and Android programming. So detailed examples or step by step instruction will be extremely appreciated!
Thank you!
| 0 | [
2,
13005,
3143,
45,
753,
13,
38,
7439,
20,
761,
13726,
800,
3726,
3726,
31,
589,
638,
27,
40,
13005,
4865,
215,
6819,
17,
8128,
30,
6819,
4865,
11350,
3336,
2411,
1054,
20,
8128,
26,
5511,
15,
17,
8128,
795,
14,
829,
97,
20,
681... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Extract a PDF embedded in a COleDocument file
===
I have some files created by an MFC application using COleDocument. I know that each file embeds a PDF document.
Is it possible to extract the content of these files without knowing more details about the application? If not, what information do I need? | 0 | [
2,
10962,
21,
13,
11124,
12138,
19,
21,
3438,
28132,
3893,
800,
3726,
3726,
31,
57,
109,
6488,
679,
34,
40,
307,
7061,
3010,
568,
3438,
28132,
9,
31,
143,
30,
206,
3893,
11911,
69,
18,
21,
13,
11124,
4492,
9,
25,
32,
938,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
(VBA-Excel 2010) boucle while with two conditions
===
I want to find the index of line
I've got a problem with a while in vba,
Each time one of the condition is true then the program exit the loop even if the other is false
Do While ((WorksheetActivité.Range("B2").Offset(i).Value <> Catégorie) And (WorksheetActivité.Range("C2").Offset(i).Value <> Activité))
i = i + 1
Loop
thanks
| 0 | [
2,
13,
5,
710,
969,
8,
1706,
11040,
498,
6,
5963,
5615,
133,
29,
81,
2039,
800,
3726,
3726,
31,
259,
20,
477,
14,
4348,
16,
293,
31,
22,
195,
330,
21,
1448,
29,
21,
133,
19,
566,
969,
15,
206,
85,
53,
16,
14,
2874,
25,
115... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 find all files in XCode that are NOT a member of a target
===
One of the most common issues I have with multiple targets is forgetting to add a file to all targets. Its so easy to import a file and not tick the boxes next to all targets that I would almost consider it broken functionally
![Many Targets][1]
In build phases there is a 'compile sources' view which is a list of files compiled for each target. However there seams to be no easy way to compare targets to see what files are in one but not the other.
Is there a way to find the files that are NOT a member of a particular target? A script perhaps?
[1]: http://i.stack.imgur.com/P449O.png | 0 | [
2,
184,
107,
31,
477,
65,
6488,
19,
993,
9375,
30,
50,
52,
21,
322,
16,
21,
2935,
800,
3726,
3726,
53,
16,
14,
127,
757,
1549,
31,
57,
29,
1886,
7767,
25,
20183,
20,
3547,
21,
3893,
20,
65,
7767,
9,
82,
86,
2010,
20,
9010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Stop Visual Studio 2010 from updating the designer files's Runtime Version Comment?
===
I just joined a new project and the compiled source code of my team member has the Runtime version comment "4.0.30319.1" placed on every *.g.cs. I installed the latest visual studio with service packs and tried to run our project but suddenly my SVN icons have turned red on most files because Visual Studio 2010 automatically changed the Runtime Version comments to "4.0.30319.269" on all the *.g.cs files even though I did not change those files.
Is there a way to stop Visual Studio 2010 from doing this? I would change and commit all the changed files but then my teammate will have several files in red.
I know some may suggest to ask all team mate to install the same service pack and runtime, but I would like to know if this feature can be turned off. | 0 | [
2,
184,
20,
747,
3458,
1120,
498,
37,
71,
43,
1880,
14,
4742,
6488,
22,
18,
485,
891,
615,
6484,
60,
800,
3726,
3726,
31,
114,
670,
21,
78,
669,
17,
14,
9316,
1267,
1797,
16,
51,
173,
322,
63,
14,
485,
891,
615,
6484,
13,
7,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android Emulator Shutdown or Restart
===
I want to check the BOOT COMPLETED BROADCAST RECEIVER in the emulator because right now i don't have any device to test it .
Is there any way to check that broadcast receiver in emulator ? How can i restart emulator to check that receiver ?
Thanks in advance. | 0 | [
2,
13005,
3579,
14868,
28450,
54,
22767,
800,
3726,
3726,
31,
259,
20,
2631,
14,
6801,
1066,
1992,
6264,
19,
14,
3579,
14868,
185,
193,
130,
31,
221,
22,
38,
57,
186,
3646,
20,
1289,
32,
13,
9,
25,
80,
186,
161,
20,
2631,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change span date values (add hours to fit user`s timezone)
===
I have this function:
> function get_time_zone_offset() { var current_date = new Date();
> return -current_date.getTimezoneOffset() / 60; }
I want a jQuery code to change every span which class is 'timeago' title value to its value plus the number the function above returns.. | 0 | [
2,
753,
6289,
1231,
4070,
13,
5,
14854,
974,
20,
2742,
4155,
1,
18,
85,
11661,
6,
800,
3726,
3726,
31,
57,
48,
1990,
45,
13,
1,
1990,
164,
1,
891,
1,
11661,
1,
1299,
3554,
5,
6,
13,
1,
4033,
866,
1,
8209,
800,
78,
1231,
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... |
Splitting a string list list
===
I'm quite (very) new to F# and I'm scratching my head over a little problem. I have a `string list list` that I'm trying to manipulate and transform. This is probably trivial.
The following data is being read in from a CSV file:
1,ABC,3
1,DEF,3
1,XYZ,1
2,ABC,2
2,XYZ,1
3,DEF,2
3,XYZ,2
Which right or wrong, I'm reading into a `string list list`. This data represents a non-normalized set of data, where the field at index `0` on each record is an Identifier field. At the moment I'm just trying to split the outer-list up so that I end up with a `string list list list` representing the following:
1,ABC,3 2,ABC,2 3,DEF,2
1,DEF,3 2,XYZ,1 3,XYZ,2
1,XYZ,1
The results above will then be pushed into my Typed model and fed into the rest of the application. | 0 | [
2,
17282,
21,
3724,
968,
968,
800,
3726,
3726,
31,
22,
79,
1450,
13,
5,
7864,
6,
78,
20,
398,
5910,
17,
31,
22,
79,
22202,
51,
157,
84,
21,
265,
1448,
9,
31,
57,
21,
13,
1,
11130,
968,
968,
1,
30,
31,
22,
79,
749,
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... |
Eclipse configuration to support dual Equinox/Felix environments
===
What are some configuration changes to make to Eclipse to best support working with both Equinox and Felix?
Here's an example problem I'm currently having. I can run my application ok in Equinox via the Eclipse OSGi Framework launcher. However, when running in Felix I will get NoClassDefFoundErrors:
java.lang.NoClassDefFoundError: org/w3c/dom/DOMException
My understanding is it's my Equinox setup that is at fault here; org.w3c.dom is not a 'default' OSGi package and shouldn't be loaded when I run it in Eclipse.
I know how to fix this: declare an Import-Package. But that's not my question. My question is how to force Equinox to take on a closer configuration to Felix... basically to make it stricter in loading packages? | 0 | [
2,
11652,
8091,
20,
555,
5747,
13,
9629,
251,
396,
118,
25320,
396,
11246,
800,
3726,
3726,
98,
50,
109,
8091,
1693,
20,
233,
20,
11652,
20,
246,
555,
638,
29,
156,
13,
9629,
251,
396,
17,
8217,
60,
235,
22,
18,
40,
823,
1448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Removing ellipses from Canvas in c# WPF using kinect
===
I know it seems to be simple, just use **_canvas.Children.Remove();_**
but actually its much worse than that. I am making a game that are a canvas inside it ellipses moving on a shape of bubble and at the same position of these ellipses there is another ellipse with a picture of fruits and using kinect gestures you can pop the bubbles, so the fruits fall down.
**THE problem is**
Some times when the user pops the bubble using the kinect the fruit just stuck in its place and don't fall down.
the code for the game is huge, so i will share the part of moving the fruit to fall down:
void falltimer_Tick(object sender, EventArgs e, Bubble bubble)
{
//Debug.WriteLine("(Double)bubble.fruitellipse.GetValue(Canvas.TopProperty)" + (Double)bubble.fruitellipse.GetValue(Canvas.TopProperty) + "mycanvaas.actualheight" + mycanvas.ActualHeight);
if ((Double)bubble.fruitellipse.GetValue(Canvas.TopProperty) < (Double)mycanvas.ActualHeight)
{
bubble.fruitellipse.SetValue(Canvas.TopProperty, ((Double)bubble.fruitellipse.GetValue(Canvas.TopProperty) + bubble.fallspeed));
bubble.fallspeed += 1;
mycanvas.UpdateLayout();
bubble.falltimer.Stop();
bubble.falltimer.Interval = new TimeSpan(0, 0, 0, 0, 5);
bubble.falltimer.Start();
}
else
{
bubble.falltimer.Stop();
mycanvas.Children.Remove(bubble.fruitellipse);
mycanvas.UpdateLayout();
}
}
Any idea how to solve this, if you need more code just tell me.. thanks a lot | 0 | [
2,
9096,
13,
4223,
1919,
160,
37,
9696,
19,
272,
5910,
619,
7721,
568,
6399,
11557,
800,
3726,
3726,
31,
143,
32,
2206,
20,
44,
1935,
15,
114,
275,
13,
1409,
1,
1245,
8471,
9,
17853,
9,
99,
16598,
5,
6,
73,
1,
1409,
47,
1121,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I use option:selected without knowing the element ID ahead of time?
===
I have a jqGrid with a drop-down (select) column. When the select's selected option changes, I need to run some validation. I've got the `change` event firing fine, but I can't figure out the syntax I need to use to get the selected option. Usually, this is [simple][1] with this:
$("#someDropDownId option:selected").text();
I can construct the drop-down's ID at runtime, but for the life of me can't figure out how to get the selected text.
var rowId = $("#grid").jqGrid('getGridParam', 'selrow');
var selectId = rowId + '_Description';
//selectId is the ID of the select element, how do I get the selected value now??
I've tried all manner of combinations, for example, `$("selectId option:selected").text();`, but I can't figure it out. Is it possible, and if so, what is the syntax?
[1]: http://stackoverflow.com/questions/1643227/jquery-get-selected-text-from-dropdownlist | 0 | [
2,
92,
31,
275,
4255,
45,
18,
7138,
366,
2506,
14,
4520,
4924,
2173,
16,
85,
60,
800,
3726,
3726,
31,
57,
21,
487,
1251,
16375,
29,
21,
2804,
8,
2968,
13,
5,
18,
16964,
6,
4698,
9,
76,
14,
5407,
22,
18,
1704,
4255,
1693,
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... |
JTextArea JLabel compare two txt. files line by line
===
everybody. I have completed my code two txt files by showing on the same area.
but I want to compare two txt files line by line. and I want to show the differences with Colored lines and finally, The letter or words that are different, different line I'm going to bold.
how can i start?
thanks for now, my code is here.
public class TextAreaSample {
public static void main(String args[]) {
String title = (args.length == 0 ? "TextArea Example" : args[0]);
JFrame frame = new JFrame(title);
Container content = frame.getContentPane();
content.setLayout(new GridLayout(0, 2));
JTextArea leftTextArea = new JTextArea();
JScrollPane rightPane = new JScrollPane(leftTextArea);
// JScrollPane leftPane = new JScrollPane(rightTextArea);
try {
leftTextArea.read(new FileReader("C:\\Denemeler\\deneme2.txt"),
null);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
content.add(leftTextArea);
JTextArea rightTextArea = new JTextArea() {
public boolean isManagingFocus() {
return false;
}
};
JScrollPane leftPane1 = new JScrollPane(rightTextArea);
JScrollPane rightPane1 = new JScrollPane(leftTextArea);
try {
rightTextArea.read(new FileReader("C:\\Denemeler\\deneme1.txt"),
null);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
content.add(leftPane1);
content.add(rightPane1);
frame.setSize(250, 150);
frame.setVisible(true);
}
} | 0 | [
2,
487,
11969,
17760,
487,
21018,
11590,
81,
20225,
38,
9,
6488,
293,
34,
293,
800,
3726,
3726,
8903,
9,
31,
57,
1066,
51,
1797,
81,
20225,
38,
6488,
34,
3187,
27,
14,
205,
217,
9,
47,
31,
259,
20,
11590,
81,
20225,
38,
6488,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Slim Framework member function render() on a non-object
===
Hey So I'm setting up some classes to keep my Routes out of the eye of my index.php,
**index.php**
require 'library/Slim/Slim.php';
$app=new Slim();
$app->map('/api/:class/:method(/:args1(/:args2(/:args3)))', function ($class,$method) use ($app) {
$args=array_slice(func_get_args(), 2);
require_once('library/controllers/'.str_replace('.','/',$class).'.php');
$Class=substr($class,strrpos($class,'.'));
$controller=new $Class($app);
if(method_exists($controller,$method)) $controller->{$method}($args);
})->via('GET', 'POST');
$app->run();
And am calling something like this
__http://domain.com/api/photos/recent/args/args/args
**Test Class Photos**
<?php
class photos {
private $app;
public function __contruct() {
$this->app = Slim::getInstance();
}
public function recent() {
$this->app->render('test.html');
}
}
And am just trying to run an instance of Slim to render, but am not getting it for some reason? Test HTML is in the same dir as photos.php
What am I doing wrong? I'm dying with fatal error
**PHP Fatal error: Call to a member function render() on a non-object in /library/controllers/photos.php on line 13** | 0 | [
2,
8824,
6596,
322,
1990,
16535,
5,
6,
27,
21,
538,
8,
23793,
800,
3726,
3726,
8409,
86,
31,
22,
79,
2697,
71,
109,
2684,
20,
643,
51,
5050,
70,
16,
14,
1356,
16,
51,
4348,
9,
26120,
15,
13,
1409,
25671,
9,
26120,
1409,
4077,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 speed up getJSON array data
===
I have a huge array data on the server side. right now I'm using jquery getJSON method to get the array data and render the whole array on the browser. It turns out getting the array data is too slow. Probably the main time is spent on JSON parsing,probably not.
What is the best/fastest way to get such array kind of data from server?
Thanks,
-J | 0 | [
2,
184,
20,
1362,
71,
164,
728,
528,
7718,
1054,
800,
3726,
3726,
31,
57,
21,
2329,
7718,
1054,
27,
14,
8128,
270,
9,
193,
130,
31,
22,
79,
568,
487,
8190,
93,
164,
728,
528,
2109,
20,
164,
14,
7718,
1054,
17,
16535,
14,
979,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I want to take my users from my table and display them with a html table
===
I want to take my users from my table and display them with a html table.i want their Name Avatar, Email, Twitter, Facebook all displayed. All of this information is in the table. I am trying to learn php on my own by playing with it. I got the basics to work, but i want the table to be 4 cols by as many rows needed. This is where I cant figue out how to do it...
this is what my code i have already.
$result = mysql_query("SELECT name, address, twitter, email, facebook, avatar FROM {$table} WHERE livedj=1 ");
if (!$result) {
die("Query to show fields from table failed");
}
echo "<table border='1'>";
for ($i = 1; $i <= 4; $i++) {
echo "<tr><td><img src=\"http://myurl.com/images/" . $row['avatar'] . "\" height=\"150\" width=\"150\" /><br />" . "<span style=\"text-align:center;\">" . $row['name'] . "</span></td></tr>";
This code above does what I want but it simply only puts it in a single col. I get that sense that's all its coded to do. I hope someone could tell me what the next steps are to get to my final output should look like.
Thanks | 0 | [
2,
31,
259,
20,
247,
51,
3878,
37,
51,
859,
17,
3042,
105,
29,
21,
13,
15895,
859,
800,
3726,
3726,
31,
259,
20,
247,
51,
3878,
37,
51,
859,
17,
3042,
105,
29,
21,
13,
15895,
859,
9,
49,
259,
66,
204,
22234,
15,
8517,
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... |
SQLPlus Sequence - multiple tables
===
I am trying to use Dennis' solution [here](http://stackoverflow.com/questions/7949343/sqlplus-auto-increment-error) as an implementation of auto_increment in Oracle database. Say I create one sequence as follows:
CREATE SEQUENCE auto_increment
START WITH 1
INCREMENT BY 1;
If I want auto_increment behavior in multiple tables, can I just use this sequence for all tables? Or do I need a separate sequence per table? That is, will the sequence increment for one table be affected by another table using the sequence? | 0 | [
2,
4444,
255,
13349,
4030,
13,
8,
1886,
7484,
800,
3726,
3726,
31,
589,
749,
20,
275,
5731,
22,
4295,
636,
6836,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
3399,
3624,
24142,
118,
18,
22402,
13349,
8,
180... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Asp.net MVC Web Api Http put and delete requests failing
===
I am using Asp.net MVC 4 **Web Api** project. MY application uses mvc to implement a web site. It makes http requests to the web api to implement server functionality.
Regular page requests to controllers work fine and it is able to display web pages. The application is able to make **get** and **post** requests to the api. But when it tries to to **put** or **delete** web requests it gets
**"Failed to load resource: the server responded with a status of 501 (Not Implemented) "**
The application is hosted on iis 6.
The application works when running a local cassani server instance and is able to make **put** and **delete** requests, but as soon as the application is executed from **iis** it doesn't work as expected. | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
2741,
21,
2159,
7775,
442,
17,
27448,
12279,
7250,
800,
3726,
3726,
31,
589,
568,
28,
306,
9,
2328,
307,
8990,
268,
13,
1409,
14113,
21,
2159,
1409,
669,
9,
51,
3010,
2027,
307,
8990,
20,
8713,
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... |
Adfs: Difference between token decrypting certificate and relying party signature verification certificate
===
I am trying to set up a Relying Party (SP) with ADFS. ADFS recognizes and responds for requests without signature. But ADFS fails to verify a signed AuthRequest. I have a certificate imported into relying party's 'Signature verification certificates' section but this certificate does not seem to be used in signature verification of requests from the relying party.
Rather it seems to use a 'token-decrypting' certificate. I do not understand the purpose of this certificate. Can someone please explain me the difference between these two certificates and how to replace a 'token-decrypting' certificate with another self-signed certificate (in DER or pem format)?
Thanks
| 0 | [
2,
21,
8736,
18,
45,
2841,
128,
20,
2853,
121,
11435,
68,
6259,
17,
21760,
346,
7810,
25056,
6259,
800,
3726,
3726,
31,
589,
749,
20,
309,
71,
21,
21760,
346,
13,
5,
3401,
6,
29,
21,
8736,
18,
9,
21,
8736,
18,
17839,
17,
4590,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 SQL statement in vb.net
===
NET and as well as SQL. I want to update records in my database. I made a dummy in my database.
Example the values are: ID = 1, name=Cath, age=21
In my interface made in VB.NET, I update the values example : name = txtName.Text and age = txtAge.Text where ID = 1. This is in my main form. In my main form, I have "view" button informing that by clicking that button, new form would pop up and would view the updated values by the user. The program does not have any errors except that when I want to update again the values in my SQL, It record BUT when I click "view" button again, It will show the previous inputted by the user (the first update upon running the interface). What should be the solution?
This is my code:
Mainform:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SQLConnection.ConnectionString = ServerString
Try
If SQLConnection.State = ConnectionState.Closed Then
SQLConnection.Open()
MessageBox.Show("Successful connection")
Else
'SQLConnection.Close()
MessageBox.Show("Connection is closed")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Public Sub SaveNames(ByRef SQLStatement As String)
Dim cmd As MySqlCommand = New MySqlCommand
With cmd
.CommandText = SQLStatement
.CommandType = CommandType.Text
.Connection = SQLConnection
.ExecuteNonQuery()
End With
MsgBox("Successfully Added!")
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
Dim date_now As String
date_now = Format(dtpDate.Value, "yyyy-MM-dd")
Dim SQLStatement As String = "UPDATE people SET name='" & txtName.Text & "', date ='" & date_now & "' WHERE 1"
SaveNames(SQLStatement)
End Sub
Form 2: (where the updated data would be viewed)
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SQLConnection.ConnectionString = ServerString
Try
If SQLConnection.State = ConnectionState.Closed Then
SQLConnection.Open()
'====retrieve / update values in database=============
Dim SQLStatement As String = "SELECT name, date FROM people"
ViewInfos(SQLStatement)
Else
'SQLConnection.Close()
MessageBox.Show("Connection is closed")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Public Sub ViewInfos(ByRef SQLStatement As String)
Dim cmd As MySqlCommand = New MySqlCommand
With cmd
.CommandText = SQLStatement
.CommandType = CommandType.Text
.Connection = SQLConnection
.ExecuteNonQuery()
End With
'--read the records in database in phpmyadmin gui---
Dim myReader As MySqlDataReader = cmd.ExecuteReader
If myReader.Read Then
lblName.Text = myReader.GetString(0)
lblDate.Text = myReader.GetString(1)
End If
myReader.Close()
MsgBox("Records Successfully Retrieved")
End Sub
Any help would be appreciated. Thanks! | 0 | [
2,
11100,
4444,
255,
3331,
19,
13,
20468,
9,
2328,
800,
3726,
3726,
4275,
17,
28,
134,
28,
4444,
255,
9,
31,
259,
20,
11100,
742,
19,
51,
6018,
9,
31,
117,
21,
26660,
19,
51,
6018,
9,
823,
14,
4070,
50,
45,
4924,
800,
137,
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... |
get the text box value using jquery
===
I have two text box
<input type="text" id="xxxxx_SearchBox_xxxxxx_InputBox">
<input type="text" id="xxxxx_xxxxxx_InputBox">
How i will get the value of second text box? xxxx are not constant it vary all the time so i cant rely on them.
$("input[type='text'][id*='_InputBox']").val()
Will it work?
| 0 | [
2,
164,
14,
1854,
1649,
1923,
568,
487,
8190,
93,
800,
3726,
3726,
31,
57,
81,
1854,
1649,
13,
1,
108,
4881,
1001,
3726,
7,
11969,
7,
4924,
3726,
7,
8962,
13290,
1,
25136,
5309,
1,
13290,
13290,
1,
108,
4881,
5309,
7,
1,
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... |
How to write this sql query using Rails 3 activerecord?
===
I am trying to write this query using Rails 3 activerecord conventions.
SELECT s.name, s.id FROM tripoli_schools_development.campus_programs cp JOIN tripoli_schools_development.career_categories cc ON cp.career_category_id = cc.id JOIN tripoli_schools_development.campuses c ON c.id = cp.campus_id JOIN tripoli_schools_development.schools s ON s.id = c.school_id WHERE cp.enabled = true and c.enabled = true and s.enabled = true and cc.id = 2 group by s.id order by s.name
Here are my models:
class CampusProgram < TripoliSchool
belongs_to :career_category
belongs_to :campus
end
class CareerCategory < TripoliSchool
has_many :career_programs
has_many :campus_programs
end
class Campus < TripoliSchool
self.table_name = 'campuses'
belongs_to :school
has_many :campus_programs
end
class School < ActiveRecord::Base
has_many :campuses, :class_name => "Campus"
has_many :campus_programs, :through => :campuses
end
and the all important
class TripoliSchool < ActiveRecord::Base
self.abstract_class = true
establish_connection "tripoli_schools_#{Rails.env}"
end | 0 | [
2,
184,
20,
2757,
48,
4444,
255,
25597,
568,
2240,
18,
203,
1348,
14953,
60,
800,
3726,
3726,
31,
589,
749,
20,
2757,
48,
25597,
568,
2240,
18,
203,
1348,
14953,
15117,
9,
5407,
13,
18,
9,
7259,
15,
13,
18,
9,
1340,
37,
22134,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.slideToggle() on one paragraph instead of all others with same id
===
I want it to work like this http://jsfiddle.net/jfriend00/JrhNz/6/ but instead of css classes i have ids.
Tried modifying my code with the ids instead of css classes and it doesn't work.
Thanks in advance.
My code:
echo "<tr>
<td>
<p class=\"question\" id=\"question\">".$rand['nume']."</p>
<p class=\"answer\" id=\"answer\">".$rand['rasp']."</p>
</td>
</tr>";
$(document).ready(function(){
$("#question").click(function(){
var prev = $(this).prev("p#answer");
$(this).siblings("p#answer").not(prev).slideUp("slow");
prev.slideToggle("slow");
});
$("p#answer").click(function(){
$(this).siblings("p#answer").slideUp("slow");
$(this).slideToggle("slow");
});
}); | 0 | [
2,
13,
9,
18,
13248,
11914,
263,
4875,
5,
6,
27,
53,
20599,
700,
16,
65,
654,
29,
205,
4924,
800,
3726,
3726,
31,
259,
32,
20,
170,
101,
48,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
728,
12299,
2032,
118,
13529,
252,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Testing an instance variable in a Sinatra route
===
I need to test a route like the bellow, in a Sinatra app.
post '/xxx' do
@yyy.update do |doc|
...
...
...
end
redirect '/zzz'
end
My problem is: how can I create the variable @yyy (in this case a class) and the method 'update', from my tests? | 0 | [
2,
4431,
40,
4851,
7612,
19,
21,
21491,
858,
800,
3726,
3726,
31,
376,
20,
1289,
21,
858,
101,
14,
23040,
15,
19,
21,
21491,
4865,
9,
678,
13,
22,
118,
13290,
22,
107,
13,
1,
93,
93,
93,
9,
576,
8209,
107,
13,
1,
13799,
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... |
Document is not saving in the stream
===
I am using HtmlAgility pack. After loading and manipulating the html document i am trying to save it in the Stream but it is not saving :
Stream outstream = Stream.Null;
HtmlDocument newdoc = new HtmlDocument();
newdoc.load(Inputstream);
.... manipulate the document ...
newdoc.Save(outstream);
It load the document from the stream perfectly but not save it.What i am doing wrong here ?
| 0 | [
2,
4492,
25,
52,
7599,
19,
14,
3766,
800,
3726,
3726,
31,
589,
568,
13,
15895,
3302,
20901,
3607,
9,
75,
12797,
17,
27799,
14,
13,
15895,
4492,
31,
589,
749,
20,
2079,
32,
19,
14,
3766,
47,
32,
25,
52,
7599,
13,
45,
3766,
70,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 display differences between WXGA with Nexus 7
===
I have a Nexus 7 tablet which should have a resolution of 1280px by 800px (WXGA). I develop on Eclipse and my layout is set to display at WXGA. Then, I can place my button and object and choose their size according to what I see on the Eclipse display. The problem is that what I see in Eclipse is very different from the display on the tablet. Everything is much bigger on the tablet and it causes me a lot of troubles.
I wonder if someone have an idea about this? | 0 | [
2,
13005,
3042,
4921,
128,
619,
396,
1136,
29,
28674,
453,
800,
3726,
3726,
31,
57,
21,
28674,
453,
16394,
56,
378,
57,
21,
4302,
16,
390,
2887,
306,
396,
34,
7993,
306,
396,
13,
5,
499,
396,
1136,
6,
9,
31,
2803,
27,
11652,
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... |
Getting field values from Window
===
I have a window. and some fields in it (textfield and button). Now i want to submit these details.
I get this error:
TypeError: button.up("form").getValues is not a function
Button function
buClicked : function (button,record) {
var val= button.up('form').getValues();
console.log(val.textfieldValue);
}
My Widow Definition
Ext.define('MyApp.view.WindowForm', {
extend: 'Ext.window.Window',
alias: 'widget.winform',
id: 'winformid',
| 0 | [
2,
1017,
575,
4070,
37,
1463,
800,
3726,
3726,
31,
57,
21,
1463,
9,
17,
109,
2861,
19,
32,
13,
5,
11969,
1109,
17,
5167,
6,
9,
130,
31,
259,
20,
12298,
158,
3289,
9,
31,
164,
48,
7019,
45,
1001,
29992,
45,
5167,
9,
576,
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... |
Deprecated offline access in Facebook
===
I just created last week an App and I've read that offline access doesn't work with newly created apps.(I haven't found any tutorial on the web. I am really new to facebook apps)
with this new change in facebook, I don't know how to use the current thing.
I badly need this feature because I don't want the user keeps logging-in in facebook everytime he visits and posts a status in my site as well in his facebook wall. I just want the user to be stayed connected and be able to post on his wall automatically thru my site once he authorized my app.
Thank you.
| 0 | [
2,
121,
3515,
150,
1669,
168,
1143,
1381,
19,
9090,
800,
3726,
3726,
31,
114,
679,
236,
877,
40,
4865,
17,
31,
22,
195,
1302,
30,
168,
1143,
1381,
1437,
22,
38,
170,
29,
2771,
679,
4865,
18,
9,
5,
49,
2933,
22,
38,
216,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom Raster/Vector Maps on iPhone
===
I would like to access custom raster/vector maps on iPhone for an iPhone application, I am building. Is there a way to have the maps offline on iPhone? Also how to track the path along with GPS location? Is there a framework available? | 0 | [
2,
5816,
7172,
815,
118,
28033,
6867,
27,
21024,
800,
3726,
3726,
31,
83,
101,
20,
1381,
5816,
7172,
815,
118,
28033,
6867,
27,
21024,
26,
40,
21024,
3010,
15,
31,
589,
353,
9,
25,
80,
21,
161,
20,
57,
14,
6867,
168,
1143,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JavaScript programme
===
I am putting an interactive java script form whereas the the out put is getting confused with switch case. Kindly help me: It is pipe weight calculation.
Pipe sizes: 100mm, 150 mm, 200 mm, 250mm up to 1000mm
For each pipe the pressure class varies: PN3, PN6 and PN9
For each pressure class the stiffness varies: SN124 and SN256
For given Pipes size, pressure class and stiffness class - the weight will be different. To arrive the out put - I am using the switch case, which is very lengthy and time consuming. Any body can help me in solving the java script so that same will be put in the HTML file.
| 0 | [
2,
8247,
8741,
2866,
800,
3726,
3726,
31,
589,
3873,
40,
9194,
8247,
3884,
505,
5142,
14,
14,
70,
442,
25,
1017,
4230,
29,
5521,
610,
9,
22215,
448,
55,
45,
32,
25,
7642,
1763,
19644,
9,
7642,
13403,
45,
808,
3363,
15,
4354,
162... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 error and session expairy
===
How to setup global error and session expiration handler for all ajax request using JQuery?
other less important handlers are network not available etc.
On server side i am using spring MVC and spring security.
I have tried below code but not working properly,
$.ajaxSetup({
statusCode: {
302 : function() {
alert("Login session expired, please login again.");
}
500 : function(){
alert("There was some application error occurred. Please try again.");
}
}
});
| 0 | [
2,
20624,
7019,
17,
3723,
1396,
11541,
622,
800,
3726,
3726,
184,
20,
18161,
2062,
7019,
17,
3723,
29529,
24641,
26,
65,
20624,
3772,
568,
487,
8190,
93,
60,
89,
787,
681,
24641,
18,
50,
982,
52,
904,
2722,
9,
27,
8128,
270,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Datagridview Datasource is null
===
Essentially I have a DGV displaying records from a List data source. When I attempt to access the DataSource property in another function it comes up null. I am trying to add a new record to the grid, but cannot seem to access the datasource to do so. I have tried making the List object visible to the entire form class, but it comes up empty. Anyone know why that is or how I can access the datasource so that I can add a new record? Additionally, any tips on improving this code are welcome.
This is the code that fills the data into the grid:
SchedulingDataContext progDB = new SchedulingDataContext();
List<Attendance> attendanceRecords = new List<Attendance>();
attendanceRecords = (from a in progDB.Attendances
where a.ReasonCode == null
select a).ToList<Attendance>();
BindingSource bs = new BindingSource();
bs.DataSource = attendanceRecords;
AttendanceGrid.DataSource = bs;
| 0 | [
2,
1054,
16375,
4725,
1054,
12097,
25,
16203,
800,
3726,
3726,
7398,
31,
57,
21,
13,
43,
23896,
17418,
742,
37,
21,
968,
1054,
1267,
9,
76,
31,
1735,
20,
1381,
14,
1054,
12097,
1354,
19,
226,
1990,
32,
1624,
71,
16203,
9,
31,
58... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to use setDividerLocation on the bottom componet?
===
I have a `JSplitPane` with a vertical split. The top component is a table which is in a `JScrollPane`, and the bottom component is a detailed description of a row. The bottom component always have the same number of elements, so essentially it stays the same height.
Right now, I am using `setDividerLocation` to position where the pane is being split. If I put `100` into it, the top portion will be `100px`, if `500` then the top will be `500px`. But if I re-size the `JFrame`, then the top component is still 100px and the bottom component is really big.
I was wondering if there is a way to set the divider location based on the bottom component instead of the top component?
Sorry if I didn't explain it well, if what I said is still confusing, please let me know and I can try to explain it better. | 0 | [
2,
25,
80,
21,
161,
20,
275,
309,
11390,
1157,
19032,
27,
14,
2129,
6479,
849,
38,
60,
800,
3726,
3726,
31,
57,
21,
13,
1,
728,
25603,
16660,
1,
29,
21,
7035,
2132,
9,
14,
371,
5912,
25,
21,
859,
56,
25,
19,
21,
13,
1,
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... |
TinyMCE Stripping Out All Markup
===
I'm trying to insert a simple image link in a TinyMCE-wrapped text field, but it's stripping out *all* of my markup. My markup looks like:
<a class="video-launcher lightbox-video-launcher" href="http://www.youtube.com/watch?v=blah" ><span class="video-launcher-bg"></span><span class="video-launcher-button"></span></a>
My tinymce_config_url_init.html looks like:
{
"theme_advanced_toolbar_align":"left",
"content_css":"/media/css/cms_tinymce.css,/media/css/cms_tinymce_admin.css",
"theme_advanced_blockformats":"p,h2,h3,div,customformat",
"theme_advanced_statusbar_location":"bottom",
"theme_advanced_path":false,
"plugins":"fullscreen,paste",
"valid_elements":"*[*]",
"media_strict":false,
"paste_auto_cleanup_on_paste":true,
"theme_advanced_styles":"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",
"width":"680",
"theme":"advanced",
"theme_advanced_font_sizes":"8px,10px,12px,14px,16px,18px,20px,24px,36px",
"theme_advanced_resizing":true,
"height":"300",
"relative_urls":false,
"theme_advanced_toolbar_location":"top",
"inline_styles":true,
"language":"en",
"theme_advanced_buttons1":"fullscreen,|,undo,redo,|,bullist,numlist,|,anchor,link,unlink,charmap,|,code,|,justifyleft,justifycenter,justifyright,|,image,",
"theme_advanced_buttons3":"",
"theme_advanced_buttons2":"removeformat,styleselect,formatselect,fontselect,fontsizeselect,|,bold,italic,underline,|,forecolor,backcolor",
"removeformat_selector":"span,div,p,h1,h2,h3"
}
I know the problem is with TinyMCE, because without submitting the form, and just clicking the "html" button again, TinyMCE's popup shows no content.
I'm assuming TinyMCE is striping out anything it thinks looks insecurity or invalid. For my app, it's being used in an admin section, so the content can be trusted. How do I disable the TinyMCE config causing this markup from being stripped out? | 0 | [
2,
3228,
79,
1105,
25105,
70,
65,
943,
576,
800,
3726,
3726,
31,
22,
79,
749,
20,
14692,
21,
1935,
1961,
3508,
19,
21,
3228,
79,
1105,
8,
27882,
1854,
575,
15,
47,
32,
22,
18,
25105,
70,
1637,
1233,
2483,
16,
51,
943,
576,
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... |
FillColor of CheckBox in Flex 3
===
I have about 8 checkboxes that are created dynamically using a for loop. Each checkbox has a different color. Basically i want to change the fillColor of every checkbox (label not included) using 8 predefined colors. Here's my code.
for (var i:int=0; i <= annotatorNames.length; i++)
{
var checkbox:CheckBox = new CheckBox();
var colorIndex:int = parseInt(annotatorColours[i]) - 1;
var checkboxColor:String = UiConstants.ANNOTATOR_COLORS[colorIndex];
checkbox.label=annotatorNames[i];
checkbox.selected=true;
checkbox.setStyle("fillColors", [checkboxColor, checkboxColor, checkboxColor, checkboxColor]);
annotatorCheckboxes[i] = checkbox;
this.addChild(checkbox);
}
For some reason fillCollors does not apply and the checkbox is not styled. If i style the label it works...also pretty much any other style applies..but not fillColors. What am I doing wrong here?
The code does not have errors and colors are in the form of "0XA52A2A". | 0 | [
2,
3509,
11282,
16,
2631,
5309,
19,
14409,
203,
800,
3726,
3726,
31,
57,
88,
469,
2631,
5309,
160,
30,
50,
679,
7782,
1326,
568,
21,
26,
5293,
9,
206,
2631,
5309,
63,
21,
421,
1665,
9,
11374,
31,
259,
20,
753,
14,
3509,
11282,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 maintain data (item.id) into session before the controller's action call?
===
I'm constructing some View from controller side, below code shows an "Edit" link in View and on clicking I need to go some different controller's action. As per code I'm keeping my "item.Id" itself in anchor tag.
response.Rows =
(
from item in selectedListAfterPagging
select new GridEmployeeData()
{
id = item.Id,
cell = new string[] {
item.Id.ToString(),
item.Name,
"<a href='/Home/MenuThree/"+ item.Id + "' title='Edit'>Edit</a>"
}
}
).ToArray();
My question, Is there any way to set this data "item.Id" into a Session variable and that will be available to any controller's action?
Thanks, | 0 | [
2,
184,
20,
4027,
1054,
13,
5,
2119,
79,
9,
1340,
6,
77,
3723,
115,
14,
9919,
22,
18,
1028,
645,
60,
800,
3726,
3726,
31,
22,
79,
18660,
109,
1418,
37,
9919,
270,
15,
1021,
1797,
1285,
40,
13,
7,
69,
242,
7,
3508,
19,
1418,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jasper reports: splitting columns vertically in more pages
===
I am using Dynamic Reports latest version i.e. 2.5.0,
I will get more columns in the report so when I am exporting to PDF, need not wrap the columns & just break the columns to go to next pages.
Please let me know anybody worked on this requirement, waiting for eager response.
Please let me know Other option to show more columns in pdf. | 0 | [
2,
16750,
2813,
45,
17282,
7498,
23300,
19,
91,
4434,
800,
3726,
3726,
31,
589,
568,
7782,
2813,
5736,
615,
31,
9,
62,
9,
172,
9,
264,
9,
387,
15,
31,
129,
164,
91,
7498,
19,
14,
1330,
86,
76,
31,
589,
7487,
68,
20,
13,
1112... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SAP BI 7.0 Analysis Porcess Desinger Vs Routine in Transformation
===
A1:I am confused by the usage of Analysis Porcess Desinger(APD).What is it used for?
A2:It seems that the Routine in Transformation is an alternative to APD,is that true?What is the difference between APD and Routine? | 0 | [
2,
7508,
1732,
453,
9,
387,
2495,
5156,
5052,
18,
121,
15812,
4611,
8275,
19,
6978,
800,
3726,
3726,
21,
165,
45,
49,
589,
4230,
34,
14,
7514,
16,
2495,
5156,
5052,
18,
121,
15812,
5,
2552,
43,
6,
9,
608,
25,
32,
147,
26,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Handle activemq-spring connection errors
===
I have configured (with spring) my application to listen to a jms que with activemq, and everything works fine.
My activemq server is installed on another server and sometime it can go offline and I would like to handle the connection error. Is that possible?
Here is my spring configuration
<amq:connectionFactory id="jmsFactory" brokerURL="tcp://xxx.xxx.xxx.xxx:61616" />
<bean id="messageConverter" class="com.unic.thesting.main.jms.message.TheStingMessageConverter" scope="tenant"/>
<jms:listener-container concurrency="10" connection-factory="thestingJmsFactory" destination-type="queue" message-converter="thestingMessageConverter">
<jms:listener destination="in" ref="orderStatusConsumer" method="consume"/>
</jms:listener-container>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate" scope="tenant">
<property name="messageConverter" ref="messageConverter" />
<property name="connectionFactory">
<bean class="org.springframework.jms.connection.SingleConnectionFactory" scope="tenant">
<property name="targetConnectionFactory">
<ref local="jmsFactory" />
</property>
</bean>
</property>
</bean> | 0 | [
2,
3053,
1348,
79,
1251,
8,
15827,
2760,
11908,
800,
3726,
3726,
31,
57,
28895,
13,
5,
1410,
1573,
6,
51,
3010,
20,
3834,
20,
21,
487,
79,
18,
9386,
29,
1348,
79,
1251,
15,
17,
796,
693,
1123,
9,
51,
1348,
79,
1251,
8128,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add this functionality in wordpress?
===
I'm currently working on customizing a wordpress theme for a client of mine, and she wants to change the navigation bar's drop down menu into something like here: http://farm9.staticflickr.com/8028/7442860218_e965e463ef_b.jpg
Problem is, I just can't figure out how to do it. I've been brainstorming different ways to go about doing it, but I'm coming up with different roadblocks. I have already finished about 95% of the entire project, but this is one feature that's got me stumped.
If any fellow programmers can steer me in the right direction to help me solve this problem, I'll be very grateful. Perhaps there is a free WordPress plugin I can take advantage of an modify it to look and function like that?
Please let me know.
| 1 | [
2,
184,
20,
3547,
48,
18548,
19,
833,
5890,
60,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
5816,
3335,
21,
833,
5890,
3184,
26,
21,
6819,
16,
1114,
15,
17,
39,
2846,
20,
753,
14,
8368,
748,
22,
18,
2804,
125,
11379,
77,
301,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 should be reasons to use OpenSL ES instead of AudioTrack in Android?
===
Currently I'm using AudioTrack passing to it audio data from native layer to play.
It seems I can use OpenSL ES in the native layer instead of AudioTrack in Java. What are the supposed advantages OpenSL ES gives as opposed to AudioTrack?
| 0 | [
2,
98,
378,
44,
2932,
20,
275,
8965,
255,
13,
160,
700,
16,
4023,
4792,
19,
13005,
60,
800,
3726,
3726,
871,
31,
22,
79,
568,
4023,
4792,
2848,
20,
32,
4023,
1054,
37,
1275,
5385,
20,
418,
9,
32,
2206,
31,
92,
275,
8965,
255,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
import .css file into .less file
===
Can you import .css files into .less files...?
I'm pretty familiar with less and use it for all my development. I regularly use a structure as follows:
@import "normalize";
//styles here
@import "mixins";
@import "media-queries";
@import "print";
All imports are other .less files and all works as it should.
My current issue is this:
I want to import a .css file into .less that references styles used in the .css file as follows:
@import "../style.css";
.small {
font-size:60%;
.type;
}
// other styles here
The .css file contains a class called `.type` but when I try to compile the .less file I get the error `NameError: .type is undefined`
Will the .less file not import .css files, only other .less ones...? Or am I referencing it wrong...?!
| 0 | [
2,
9010,
13,
9,
6824,
18,
3893,
77,
13,
9,
923,
3893,
800,
3726,
3726,
92,
42,
9010,
13,
9,
6824,
18,
6488,
77,
13,
9,
923,
6488,
9,
9,
9,
60,
31,
22,
79,
1772,
3694,
29,
787,
17,
275,
32,
26,
65,
51,
522,
9,
31,
4217,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Force orientation change in testcase with fragments
===
I have an Android test project in which I wish to programatically change the orientation.
My test:
public class MainActivityLandscapeTest extends ActivityInstrumentationTestCase2<MainActivity> {
public MainActivityLandscapeTest() {
super(MainActivity.class);
}
private MainActivity mActivity;
private Fragment mDetailFragment;
private Fragment mListFragment;
private Solo mSolo;
@Override
protected void setUp() throws Exception {
super.setUp();
mSolo = new Solo(getInstrumentation(), getActivity());
mSolo.setActivityOrientation(Solo.LANDSCAPE);
mActivity = getActivity();
mListFragment = (Fragment) mActivity.getSupportFragmentManager()
.findFragmentById(R.id.listFragment);
mDetailFragment = (Fragment) mActivity.getSupportFragmentManager()
.findFragmentById(R.id.detailFragment);
}
public void testPreConditions() {
assertTrue(mActivity != null);
assertTrue(mSolo != null);
assertTrue(mListFragment != null);
assertTrue(getActivity().getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_LANDSCAPE);
}
/**
* Only show detailFragment in landscape mode
*/
public void testOrientation() {
assertTrue(mListFragment.isVisible());
assertTrue(mDetailFragment.isVisible());
}
}
The layouts for the activity is in seperate folders, layout-port and layout-land
- layout-port
- fragment_main.xml
- layout-land
- fragment_main.xml
In landscape mode, the layout contains 2 fragments (Detail and list) while in portrait it contains 1(List only).
If the device/emulator is already in landscape mode before testing begins, this test passes. If in portrait, it fails with a NullPointerException on mListFragment and mDetailFragment.
Adding a delay (waitForIdleSync() and/or waitForActivity()) did NOT seem to solve my problem.
How do i force the orientation to landscape in my test, while still being able to find the fragments using findFragmentById()? | 0 | [
2,
558,
10245,
753,
19,
1289,
10325,
29,
10837,
800,
3726,
3726,
31,
57,
40,
13005,
1289,
669,
19,
56,
31,
2536,
20,
625,
721,
8438,
753,
14,
10245,
9,
51,
1289,
45,
317,
718,
407,
19348,
618,
13109,
10543,
9073,
2358,
108,
11602,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Custom SharePoint SPUserField does not show up in InfoPath in Browser
===
I have create a custom field that inherits from SPFieldUser. Everything works fine on the site and the value displays fine in InfoPath as long as I am either in preview mode or select Edit In InfoPath. As soon as I view the form in the browser the field's value no longer displays. Has anyone seen anything like this before?
Thanks, | 0 | [
2,
5816,
1891,
3132,
3782,
16704,
1109,
630,
52,
298,
71,
19,
15404,
8353,
19,
16495,
800,
3726,
3726,
31,
57,
1600,
21,
5816,
575,
30,
17569,
18,
37,
3782,
1109,
16704,
9,
796,
693,
1123,
27,
14,
689,
17,
14,
1923,
9412,
1123,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CNAME Record in Additional section
===
RFC 1034+1035 state the CNAME records should cause no additional section processing. But I am seeing an increasing trend of services like wordpress sending a CNAME chain with one part of the chain in the additional section. So, without parsing the additional section you cannot decode the DNS response.
Example:
;; QUESTION SECTION:
;after12.failblog.org. IN A
;; ANSWER SECTION:
after12.failblog.org. 3600 IN CNAME chzallnighter.wordpress.com.
vip-lb.wordpress.com. 300 IN A 72.233.104.123
vip-lb.wordpress.com. 300 IN A 76.74.255.117
vip-lb.wordpress.com. 300 IN A 74.200.247.187
vip-lb.wordpress.com. 300 IN A 74.200.247.59
vip-lb.wordpress.com. 300 IN A 76.74.255.123
vip-lb.wordpress.com. 300 IN A 72.233.127.217
;; AUTHORITY SECTION:
wordpress.com. 14400 IN NS ns1.wordpress.com.
wordpress.com. 14400 IN NS ns2.wordpress.com.
wordpress.com. 14400 IN NS ns3.wordpress.com.
wordpress.com. 14400 IN NS ns4.wordpress.com.
wordpress.com. 14400 IN NS ns5.wordpress.com.
wordpress.com. 14400 IN NS ns6.wordpress.com.
;; ADDITIONAL SECTION:
chzallnighter.wordpress.com. 300 IN CNAME vip-lb.wordpress.com.
ns1.wordpress.com. 14400 IN A 72.233.69.14
ns2.wordpress.com. 14400 IN A 76.74.159.137
ns3.wordpress.com. 14400 IN A 64.34.177.159
ns4.wordpress.com. 14400 IN A 72.233.104.98
ns5.wordpress.com. 14400 IN A 69.174.248.140
ns6.wordpress.com. 14400 IN A 64.34.174.135
Note chzallnighter.wordpress.com. 300 IN CNAME vip-lb.wordpress.com. is in the Additional section and without it you cannot get to A records in the Answer.
Why are providers using such a tactic and what does it really buy them ? | 0 | [
2,
272,
7259,
571,
19,
1351,
1050,
800,
3726,
3726,
17492,
332,
3965,
2430,
1036,
2599,
146,
14,
272,
7259,
742,
378,
1679,
90,
1351,
1050,
5511,
9,
47,
31,
589,
2078,
40,
3425,
8703,
16,
687,
101,
833,
5890,
4907,
21,
272,
7259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 fetch inconsistencies
===
I'm working with a very small sample project that can be [downloaded from here][1]. What I'm trying to do is debug why fetching is taking so long in my own project, but I've used this project as a sort of benchmark. I've enabled `-com.apple.CoreData.SQLDebug 1`in my scheme so I can see what commands are being sent to the SQLite store with my fetches.
First, in the AppDelegate, I just wrap the first part (where the bank is being created) in a for loop to create 1000 objects. Them comment out the fetch request from the AppDelegate.
Then, in the FBCFMasterViewController, there is a fetch request there. Upon running the app after saving the 1000 items, and fetching them to an NSFetchedResultsController, you'll see thousands of output lines similar to these:
2012-06-23 09:16:30.374 FailedBankCD[90166:fb03] CoreData: annotation: sql connection fetch time: 0.0004s
2012-06-23 09:16:30.375 FailedBankCD[90166:fb03] CoreData: annotation: total fetch execution time: 0.0009s for 1 rows.
2012-06-23 09:16:30.375 FailedBankCD[90166:fb03] CoreData: annotation: fault fulfilled from database for : 0xc3e9060 <x-coredata://60E5B64A-83AB-4E6A-BEAD-5FFF50DB7F66/FailedBankDetails/p823>
2012-06-23 09:16:30.376 FailedBankCD[90166:fb03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZCLOSEDATE, t0.ZUPDATEDATE, t0.ZZIP, t0.ZINFO FROM ZFAILEDBANKDETAILS t0 WHERE t0.Z_PK = ?
What I'm guessing that's from is that the sortDescriptor is initialized with key details.closeDate, which is a relationship, so as it sorts by that property, it has to fetch fault each object in, causing thousands of lines of output to appear.
So I changed the sortDescriptor to sort on the property `city` instead, and this time when I run, I get the following output:
2012-06-23 08:53:04.924 FailedBankCD[89564:fb03] CoreData: sql: SELECT 0, t0.Z_PK FROM ZFAILEDBANKINFO t0 ORDER BY t0.ZCITY DESC
2012-06-23 08:53:04.929 FailedBankCD[89564:fb03] CoreData: annotation: sql connection fetch time: 0.0049s
2012-06-23 08:53:04.930 FailedBankCD[89564:fb03] CoreData: annotation: total fetch execution time: 0.0059s for 1009 rows.
2012-06-23 08:53:04.936 FailedBankCD[89564:fb03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZCITY, t0.ZNAME, t0.ZSTATE, t0.ZDETAILS FROM ZFAILEDBANKINFO t0 WHERE t0.Z_PK IN (?,?,?,?,?,?,?,?,?,?) ORDER BY t0.ZCITY DESC LIMIT 10
2012-06-23 08:53:04.938 FailedBankCD[89564:fb03] CoreData: annotation: sql connection fetch time: 0.0013s
2012-06-23 08:53:04.939 FailedBankCD[89564:fb03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZCLOSEDATE, t0.ZUPDATEDATE, t0.ZZIP, t0.ZINFO FROM ZFAILEDBANKDETAILS t0 WHERE t0.ZINFO IN (?,?,?,?,?,?,?,?,?,?)
2012-06-23 08:53:04.971 FailedBankCD[89564:fb03] CoreData: annotation: sql connection fetch time: 0.0318s
2012-06-23 08:53:04.972 FailedBankCD[89564:fb03] CoreData: annotation: total fetch execution time: 0.0326s for 10 rows.
2012-06-23 08:53:04.973 FailedBankCD[89564:fb03] CoreData: annotation: Prefetching with key 'details'. Got 10 rows.
2012-06-23 08:53:04.974 FailedBankCD[89564:fb03] CoreData: annotation: total fetch execution time: 0.0372s for 10 rows.
I don't get repeating thousands of lines of output anymore, and this appears to be the expected output. However, if I run again, without even modifying anything, I again get thousands of lines of output similar to the following:
2012-06-23 09:19:31.263 FailedBankCD[90216:fb03] CoreData: annotation: sql connection fetch time: 0.0006s
2012-06-23 09:19:31.264 FailedBankCD[90216:fb03] CoreData: annotation: total fetch execution time: 0.0010s for 20 rows.
2012-06-23 09:19:31.264 FailedBankCD[90216:fb03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZCITY, t0.ZNAME, t0.ZSTATE, t0.ZDETAILS FROM ZFAILEDBANKINFO t0 WHERE t0.Z_PK IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY t0.ZCITY DESC LIMIT 20
This is odd behavior, no? Can anyone quickly replicate this and explain what's going on, and why I'm getting thousands of lines of output?
[1]: https://github.com/acburk/CoreData-Tutorial-1/zipball/Tutorial3 | 0 | [
2,
2884,
1054,
18312,
19,
12124,
702,
22851,
800,
3726,
3726,
31,
22,
79,
638,
29,
21,
253,
284,
5717,
669,
30,
92,
44,
636,
2968,
22546,
37,
235,
500,
2558,
165,
500,
9,
98,
31,
22,
79,
749,
20,
107,
25,
121,
16254,
483,
1831... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Search Dialog how to ensure it is always visible?
===
I have an Android tab widget app, one of my tabs is a [Search Dialog][1]. The problem is that after the search is completed, sometimes the search dialog goes away and there is no way to get it back other than restarting the app.
I am calling [onSearchRequested][2] in my onCreate() which successfully brings the search dialog up on creation. I tried calling this from onResume but this can bring up more than one search dialog, and I found that I couldn't enter anything into the one on top that was showing. At least, that's what appeared to be happening so I reverted to previous approach.
So two questions:
1. Is there a way to determine if the search dialog is currently
visible?
2. Is there a way to tell the Search Dialog to always stay
visible?
[1]: http://developer.android.com/guide/topics/search/search-dialog.html
[2]: http://stackoverflow.com/questions/4465529/how-do-i-invoke-the-search-dialog-using-onsearchrequested | 0 | [
2,
13005,
2122,
28223,
184,
20,
4062,
32,
25,
550,
4560,
60,
800,
3726,
3726,
31,
57,
40,
13005,
6523,
4807,
43,
3060,
4865,
15,
53,
16,
51,
6523,
18,
25,
21,
636,
25136,
28223,
500,
2558,
165,
500,
9,
14,
1448,
25,
30,
75,
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... |
LINQ statement to select the element which is deep inside the XML structure
===
I have XML which looks something like this:
<?xml version="1.0" encoding="utf-8"?>
<University>
<Colleges>
<College>
<Id> Cambridge </Id>
<Dept>
<Id> Arts</Id>
</Dept>
</College>
<College>
<Id> Oxford</Id>
<Dept>
<Id> Philosophy </Id>
</Dept>
</College>
</Colleges>
</University>
I want to return the College based on the ID. In another scenario, I want to written just Id of the College.
I do not understand how to write LINQ statement to read Id directly. I can use `Descendants()` at every stage. But how to select the element which is deep inside the XML structure? | 0 | [
2,
6294,
1251,
3331,
20,
5407,
14,
4520,
56,
25,
855,
572,
14,
23504,
1411,
800,
3726,
3726,
31,
57,
23504,
56,
1879,
301,
101,
48,
45,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
19608,
3726,
7,
1982,
410,
8,
457,
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... |
jquery ajax validation engine not working
===
my jquery validation form is not validate ..here is the code like
<script type='text/javascript'>
$(document).ready(function()
{
$('#frm').validationEngine('validate');
});
</script>
<div id='gap'> </div>
<div id='main'>
<div id='login-box'>
<h2><span> ".HD_LOGIN." </span></h2>
<table align='center'>
<form id='frm' name='frm' >
<tr>
<td class='name'> <span>".LBL_USERNAME." </span> </td>
<td> <span> </span> </td>
<td> <input type='text' name='username' id='username' class='input validate[required]'/><input type='hidden' name='login' value='1' /></td>
</tr>
<tr>
<td id='error-show'> <span>   </span> </td>
</tr>
<tr>
<td class='name'> <span>".LBL_PASSWORD."</span></td>
<td> <span> </span> </td>
<td> <input type='password' name='password' id='password' class='input validate[required]'/></td>
</tr>
<tr>
<td id='error-show'><span> </span> </td>
</tr>
<tr>
<td> <span> </span> </td>
<td> <span> </span> </td>
<td> <input class='chckbx' type='checkbox' name='rememberme' value='1'/> <span> ".CHCK_LOGGED." </span> </td>
</tr>
<tr>
<td> <span>   </span> </td>
</tr>
<tr>
<td colspan='3' align='center'> <input type='button' name='but' value='login' onclick=\"general_ajax1('modules/login/logincontroller.php',$('#frm').serialize())\"/></td>
</tr>
</form>
</table>
now below is custom ajax
if($("#frm").validationEngine('validate'))
{
function general_ajax1(urld,data)
{
$.ajax({
type:'POST',
url:urld,
data:data,
success: function(response)
{
$('#main_content').html(response);
}
});
}
}
| 0 | [
2,
487,
8190,
93,
20624,
27999,
1406,
52,
638,
800,
3726,
3726,
51,
487,
8190,
93,
27999,
505,
25,
52,
7394,
1373,
13,
9,
9,
6836,
25,
14,
1797,
101,
13,
1,
8741,
1001,
3726,
22,
11969,
118,
1004,
1385,
8741,
22,
1,
5579,
5,
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... |
I need to copy several cells from multiple spreadsheets to a summary sheet base on the contents of a third cell in excel
===
I need to copy the contents of cells A2 to A88 and C2 to C88 based on the contents of what is in cells in column G from several spreadsheets in a workbook to the Summary sheet.
So I need code to scan all spreadsheets to see if the word Case closed is in cell G33 and than copy the contents of cell A33 and C33 to a cell on the summary page.
I have seen several close answers but nothing that does the job.
Sorry no code available.
Thanks for any and all answers. | 0 | [
2,
31,
376,
20,
4344,
238,
2934,
37,
1886,
1789,
17627,
18,
20,
21,
14740,
6125,
1000,
27,
14,
8478,
16,
21,
422,
1667,
19,
20700,
800,
3726,
3726,
31,
376,
20,
4344,
14,
8478,
16,
2934,
21,
135,
20,
21,
3020,
17,
272,
135,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to split screen like ipad in android?
===
i want to make application in android Tablets like in ipad which have spliting screen, i am attaching screen here...
How i can do that ? if any body have idea please send me!
Thank you in advance.
![enter image description here][1]
[1]: http://i.stack.imgur.com/S56bS.png | 0 | [
2,
184,
20,
2132,
2324,
101,
31,
8240,
19,
13005,
60,
800,
3726,
3726,
31,
259,
20,
233,
3010,
19,
13005,
20175,
101,
19,
31,
8240,
56,
57,
2132,
68,
2324,
15,
31,
589,
19514,
68,
2324,
235,
9,
9,
9,
184,
31,
92,
107,
30,
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... |
scheduling a task on a paricular date/date-range using cron4j
===
I am using cron4j for scheduling email alerts as selected by the user on daily, weekly and monthly basis between the specified dates.
I am unable to find the pattern to schedule a task on particular date/dates. Say for example an email should be triggered from 15-07-2012 to 18-07-2012 daily at 11:59 pm.
The problem i am facing there is no year field in cron4j as far as i know and thus how to schedule a task on particular date or date range.
Any help is appreciated! | 0 | [
2,
23096,
21,
3005,
27,
21,
2017,
17996,
1231,
118,
8209,
8,
8366,
568,
13,
19587,
300,
728,
800,
3726,
3726,
31,
589,
568,
13,
19587,
300,
728,
26,
23096,
8517,
7863,
18,
28,
1704,
34,
14,
4155,
27,
1954,
15,
3481,
17,
6460,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Program embedded inside an ISO
===
I'm trying to find a good way to embed some application / script inside / beside an ISO file. What I'm trying to achieve is having an cd image which can be used to kick-start its own installation via virtual-manager (`virt-install`). It's just to simplify the downloads really, so that you don't need to have an installer and an image separately.
The simplest option to do something like that would be to put uu/b64-encoded image after a bash script. The bad side of that is that the file needs to be copied again, its size is bigger than it needs to be and bash likes to reserve a lot of memory for strings that are streamed into some other program.
Another alternative is a Perl script with the binary contents after an `__END__`. That saves me from encoding the contents and high memory usage, but it doesn't prevent the copy.
Is there any elegant solution then? Are there any script languages that can be embedded inside of another file with no specific header (or at the end)? Or something that can be merged with the ISO format itself? | 0 | [
2,
625,
12138,
572,
40,
11899,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
21,
254,
161,
20,
11911,
69,
109,
3010,
13,
118,
3884,
572,
13,
118,
2113,
40,
11899,
3893,
9,
98,
31,
22,
79,
749,
20,
4689,
25,
452,
40,
1745,
1961,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Salesforce SFSmartStore in native?
===
Anyone used Salesforce SmartStore in a native ios app. Question: when I #import "SFSmartStore.h" it can not find it?
Regards
Christian | 0 | [
2,
2598,
8774,
15025,
18,
9534,
16828,
19,
1275,
60,
800,
3726,
3726,
1276,
147,
2598,
8774,
3978,
16828,
19,
21,
1275,
13,
7760,
4865,
9,
1301,
45,
76,
31,
6926,
1660,
1993,
13,
7,
18,
11754,
9534,
16828,
9,
252,
7,
32,
92,
52,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to pass a parameter to a function in controller when function is called asynchronously through a Javascript function
===
i am using the SWFUpload object to upload files to the Amazon S3 Bucket which uses the synchronous way to upload files when Javascript enabled in browser now i want to save them in a specific way (want to add a specific header) which i am going to pass from the view and then use that in the file name for Amazon S3 bucket but as here we are using the asynchronous way so not possible to pass any parameter from View
<input class="t-button" type="file" id="photo" name="photo" />
$("#photo").makeAsyncUploader({
upload_url: "URL for the function to be called from controller",
flash_url:<value>,
button_image_url : <Value>
etc etc, i tried but as i am not that much good in Javascript couldn't make it. Any type of example or help will be appriciated.
Thanks and Regards | 0 | [
2,
184,
20,
1477,
21,
18906,
20,
21,
1990,
19,
9919,
76,
1990,
25,
227,
21,
16023,
13985,
120,
21,
8247,
8741,
1990,
800,
3726,
3726,
31,
589,
568,
14,
13,
18,
15263,
576,
8294,
3095,
20,
71,
8294,
6488,
20,
14,
8059,
13,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to parse languages other than English with Stanford Parser? in java, not command lines
===
I have been trying to use Stanford Parser in my Java program to parse some sentences in Chinese. Since I am quite new at both Java and Stanford Parser, I used the 'ParseDemo.java' to practice. The code works fine with sentences in English and outputs the right result. However, when I changed the model to 'chinesePCFG.ser.gz' and tried to parse some segmented Chinese sentences, things went wrong.
Here's my code in Java
<!-- language: lang-java -->
class ParserDemo {
public static void main(String[] args) {
LexicalizedParser lp = LexicalizedParser.loadModel("edu/stanford/nlp/models/lexparser/chinesePCFG.ser.gz");
if (args.length > 0) {
demoDP(lp, args[0]);
} else {
demoAPI(lp);
}
}
public static void demoDP(LexicalizedParser lp, String filename) {
// This option shows loading and sentence-segment and tokenizing
// a file using DocumentPreprocessor
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
// You could also create a tokenier here (as below) and pass it
// to DocumentPreprocessor
for (List<HasWord> sentence : new DocumentPreprocessor(filename)) {
Tree parse = lp.apply(sentence);
parse.pennPrint();
System.out.println();
GrammaticalStructure gs = gsf.newGrammaticalStructure(parse);
Collection tdl = gs.typedDependenciesCCprocessed(true);
System.out.println(tdl);
System.out.println();
}
}
public static void demoAPI(LexicalizedParser lp) {
// This option shows parsing a list of correctly tokenized words
String sent[] = { "我", "是", "一名", "学生" };
List<CoreLabel> rawWords = Sentence.toCoreLabelList(sent);
Tree parse = lp.apply(rawWords);
parse.pennPrint();
System.out.println();
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
GrammaticalStructure gs = gsf.newGrammaticalStructure(parse);
List<TypedDependency> tdl = gs.typedDependenciesCCprocessed();
System.out.println(tdl);
System.out.println();
TreePrint tp = new TreePrint("penn,typedDependenciesCollapsed");
tp.printTree(parse);
}
private ParserDemo() {} // static methods only
}
It's basically the same as ParserDemo.java, but when I run it I get the following result:
> Loading parser from serialized file
> edu/stanford/nlp/models/lexparser/chinesePCFG.ser.gz ... done [2.2
> sec]. (ROOT (IP
> (NP (PN 我))
> (VP (VC 是)
> (NP
> (QP (CD 一名))
> (NP (NN 学生))))))
>
> Exception in thread "main" java.lang.RuntimeException: Failed to
> invoke public
> edu.stanford.nlp.trees.EnglishGrammaticalStructure(edu.stanford.nlp.trees.Tree)
> at
> edu.stanford.nlp.trees.GrammaticalStructureFactory.newGrammaticalStructure(GrammaticalStructureFactory.java:104)
> at parserdemo.ParserDemo.demoAPI(ParserDemo.java:65) at
> parserdemo.ParserDemo.main(ParserDemo.java:23)
the code on line 65 is:
GrammaticalStructure gs = gsf.newGrammaticalStructure(parse);
My guess is that chinesePCFG.ser.gz misses something relevant to 'edu.stanford.nlp.trees.EnglishGrammaticalStructure'. Since the parser parses Chinese correctly via commandlines, there must be something wrong with my own code. I have been searching, only to find few similar cases some of which mentioned about using the right model, but I don't really know how to modify the code to the 'right model'. Hope that someone could help me with it. I am a newbie on Java and Stanford Parser, so please be specific. Thank you! | 0 | [
2,
184,
20,
2017,
870,
2556,
89,
119,
486,
29,
8382,
2017,
4104,
60,
19,
8247,
15,
52,
1202,
1560,
800,
3726,
3726,
31,
57,
74,
749,
20,
275,
8382,
2017,
4104,
19,
51,
8247,
625,
20,
2017,
870,
109,
13453,
19,
1116,
9,
179,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resumable Download in Cocoa
===
What is the best approach to write code for resumable downloads in cocoa? Should I use NSURLConnection or is there a better approach?
Regards | 0 | [
2,
10719,
723,
579,
7121,
19,
24507,
800,
3726,
3726,
98,
25,
14,
246,
2141,
20,
2757,
1797,
26,
10719,
723,
579,
7121,
18,
19,
24507,
60,
378,
31,
275,
13,
103,
4082,
255,
25996,
872,
54,
25,
80,
21,
574,
2141,
60,
14179,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Which is the better Approach to reduce the memory allocation in creating instances
===
I am new to iphone.I have a small doubt belongs to memory.I have three classes In my project 1.BiblePlayerViewController 2.ShowProgressViewCont and 3.AboutUsViewController
when we click on a Download button in BiblePlayerViewController it goes to the ShowProgressViewCont screen and then we click on a back button in navigation bar in ShowProgressViewCont it go back to the BiblePlayerViewController
In the similar way
when we click on a About Us button in BiblePlayerViewController it goes to the AboutUsViewController screen and then we click on a back button in navigation bar in AboutUsViewController it go back to the BiblePlayerViewController
for this first i will place screen shots of all these classes
![BiblePlayerViewController class output which is in the simulator][1]
![ShowProgressViewCont class output which is in the simulator][2]
![AboutUsViewController class output which is in the simulator][3]
[1]: http://i.stack.imgur.com/3v12y.jpg
[2]: http://i.stack.imgur.com/LvOlb.png
[3]: http://i.stack.imgur.com/xHKmI.png
for this I have written code that is in below
//ShowProgressViewCont.m
- (void)viewDidLoad {
@try {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
// appDelegate = (BiblePlayerAppDelegate*)[[UIApplication sharedApplication]delegate];
//set the navigationBar tint color to orangeColor
self.navigationController.navigationBar.tintColor=[UIColor orangeColor];
//set the backButton in the left side of navigationBar when we click on that Button it calls the method GotoBiblePlayerViewController
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(GotoBiblePlayerViewController)];
self.navigationItem.leftBarButtonItem = backButton;
//set the downloadAllButton in the right side of navigationBar when we click on that button it calls the method downloadAllBooks
UIBarButtonItem *downloadAllButton = [[UIBarButtonItem alloc] initWithTitle:@"Download All" style:UIBarButtonItemStylePlain target:self action:@selector(downloadAllBooks)];
self.navigationItem.rightBarButtonItem = downloadAllButton;
//set the timer and then call the method downloadProgress for every 2seconds
timer = [NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(downloadProgress) userInfo:nil repeats:YES];
//initialize the tableView withFrame and style
tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420) style:UITableViewStylePlain];
//set the delegate for tableView
tableView.delegate = self;
//set the dataSource for tableView
tableView.dataSource = self;
//initialize the BiblePlayerViewController class
biblePlayerViewController = [[BiblePlayerViewController alloc]init];
//call the method allDownloadLinks which is in BiblePlayerViewController class
allDownloadLinks = [biblePlayerViewController allDownloadLinks];
//add tableView as a subView to the currentView
[self.view addSubview:tableView];
}
@catch(NSException * e){NSLog(@"Exception At: %s %d %s %s %@",__FILE__,__LINE__,__PRETTY_FUNCTION__,__FUNCTION__,e);}@finally{}
}
//AboutUsViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
//set the backButton in the left side of navigationBar when we click on that Button it calls the method GotoBiblePlayerViewController
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStylePlain target:self action:@selector(GotoBiblePlayerViewController)];
self.navigationItem.leftBarButtonItem = backButton;
}
My doubt is In both the .m files i have a UIBarButtonItem *backButton which is same in both the classes so,is it better to create as a local variables in each class or is it better approach to create an instance in appDelegate from that can i access the button.Which is the better approach and during which one we will reduce the memory.
If any body know this please help me....
| 0 | [
2,
56,
25,
14,
574,
2141,
20,
4136,
14,
1912,
16840,
19,
2936,
13946,
800,
3726,
3726,
31,
589,
78,
20,
21024,
9,
49,
57,
21,
284,
3063,
7034,
20,
1912,
9,
49,
57,
132,
2684,
19,
51,
669,
137,
9,
220,
3426,
14049,
4725,
12898,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
discover # or @ in a input
===
Is it possible with jQuery to discover when a user has entered the first character in a search box as `@` or `#` and then prompt an alert no matter what keyboard language or settings they have?
for instance, if I enter `@` into the searchbox I want it to prompt a message or perform my action.
<input type='text' name='search' id='search' />
jQuery
$("#search").keydown(function(event) {
alert(event.which);
}); | 0 | [
2,
6297,
6926,
54,
13,
1,
19,
21,
6367,
800,
3726,
3726,
25,
32,
938,
29,
487,
8190,
93,
20,
6297,
76,
21,
4155,
63,
1297,
14,
64,
925,
19,
21,
2122,
1649,
28,
13,
1,
54,
13,
1,
5910,
1,
17,
94,
11443,
4417,
40,
7863,
90,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Facebook WinRT Authentication
===
I am using WinRT's WebAuthenticationBroker to attempt to connect to Facebook over OAuth. When I do this I get back a page that says: An error occurred. Please try again later.
I am wondering how I can get the details of what the error is so that I can fix it. Any info on debugging Facebook would be great. | 0 | [
2,
9090,
628,
5256,
27963,
800,
3726,
3726,
31,
589,
568,
628,
5256,
22,
18,
95,
17475,
2504,
1786,
857,
27682,
139,
20,
1735,
20,
6379,
20,
9090,
84,
635,
1346,
96,
9,
76,
31,
107,
48,
31,
164,
97,
21,
2478,
30,
898,
45,
40,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# print standard output in event handler
===
I have a console application which I am running as a process from my C# program.
I have made an event handler to be called when this process terminates.
How do I print the Standard output of this process inside the event handler.
Basically, how do I access the properties of a process inside the event handler ?
My code looks like below.
public void myFunc()
{
.
.
Process p = new Process();
p.StartInfo.FileName = "myProgram.exe";
p.StartInfo.RedirectStandardOutput = true;
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(myProcess_Exited);
p.Start();
.
.
}
private void myProcess_Exited(object sender, System.EventArgs e)
{
Console.WriteLine("log: {0}", <what should be here?>);
}
I do not want to make the process object p as a field of the class.
| 0 | [
2,
272,
5910,
4793,
1236,
5196,
19,
807,
24641,
800,
3726,
3726,
31,
57,
21,
8650,
3010,
56,
31,
589,
946,
28,
21,
953,
37,
51,
272,
5910,
625,
9,
31,
57,
117,
40,
807,
24641,
20,
44,
227,
76,
48,
953,
17952,
18,
9,
184,
107... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Instapaper Simple API : adding links without storing user password?
===
I'm trying to use Instapaper's Simple API (http://www.instapaper.com/api/simple).
The API terms of use (http://www.instapaper.com/api/terms) says apps should not store user id and password, and I don't want to store them either. However, it seems that the only way to add a link to a user's Instapaper via simple API is to store the username/password (if the user does have a password).
Am I missing something? | 0 | [
2,
19,
6106,
17945,
1935,
21,
2159,
13,
45,
4721,
6271,
366,
25615,
4155,
20884,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
19,
6106,
17945,
22,
18,
1935,
21,
2159,
13,
5,
21127,
6903,
6483,
9,
108,
6106,
17945,
9,
960,
118,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set a hardware watchpoint in dbx?
===
I need to detect when some memory changes in dbx. I know in gdb that I would do this with `watch <memoryLocation>`. However, I am using dbx at the moment, so I need to know how to set a hardware watchpoint in dbx. What is the dbx command to set a hardware watchpoint? | 0 | [
2,
184,
20,
309,
21,
7610,
1455,
3132,
19,
13,
9007,
396,
60,
800,
3726,
3726,
31,
376,
20,
9092,
76,
109,
1912,
1693,
19,
13,
9007,
396,
9,
31,
143,
19,
489,
9007,
30,
31,
83,
107,
48,
29,
13,
1,
9054,
13,
1,
790,
5171,
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... |
Java fail-over framework/library
===
Is there any framework/library that takes care of active/passive failover? Ideally it should be fast, lightweight and embeddable. I've found a few but they don't quite fit the criteria...
- http://zookeeper.apache.org/
- http://sourceforge.net/projects/jheartbeat/
- http://www.javaworld.com/javaworld/jw-03-2002/jw-0315-heart.html
| 0 | [
2,
8247,
7476,
8,
2549,
6596,
118,
1210,
2559,
622,
800,
3726,
3726,
25,
80,
186,
6596,
118,
1210,
2559,
622,
30,
1384,
781,
16,
1348,
118,
6201,
1284,
7476,
2549,
60,
5628,
102,
32,
378,
44,
1512,
15,
13613,
17,
11911,
69,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible yet to sell extensions in the Chrome Web Store?
===
Pre-launch publicity of the Chrome Web Store indicated that this would be possible but as far as I knew so far this had not yet been activated. Today's notice that extensions can be monetized through ads causes me to wonder whether sales of extensions is supported yet. Thanks. | 0 | [
2,
25,
32,
938,
768,
20,
3344,
17529,
19,
14,
13,
12985,
2741,
1718,
60,
800,
3726,
3726,
782,
8,
18494,
13141,
16,
14,
13,
12985,
2741,
1718,
4151,
30,
48,
83,
44,
938,
47,
28,
463,
28,
31,
404,
86,
463,
48,
41,
52,
768,
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... |
access query with unionall or crosstab in asp not working
===
Here is a sample access query which I have(query ref/name - abovequery)
select column_date, sum(field1), sum(field2) from table
group by column_date
union all
select 'Total' as column_date, sum(field1), sum(field2) from table
When I try to access the sql query in browser using below code in asp, it displays only heading.
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.open "odbcdatasourcename"
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT * from abovequery"
rs.Open sql, conn
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table>
</body>
</html>
Please note when I copy the output of above query into a table and use the same asp code, it works fine. So obviously it is an issue of executing "UNION" query in asp. I wonder if there is any solution for this. The same problem happens when I try to execute crosstab quey also.
| 0 | [
2,
1381,
25597,
29,
667,
1233,
54,
919,
15783,
19,
28,
306,
52,
638,
800,
3726,
3726,
235,
25,
21,
5717,
1381,
25597,
56,
31,
57,
5,
8190,
93,
13,
14057,
118,
7259,
13,
8,
784,
8190,
93,
6,
5407,
4698,
1,
8209,
15,
3907,
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... |
Javascript iframes problems when called in Objective C
===
I'm currently calling Javascript from Obj C whenever a page loads and am parsing through the iframes using the following:
var iframes = window.document.body.getElementsByTagName('iframe');
for (var i = 0; i < iframes.length; i++) {
console.log(iframes[i].contentWindow.document.body);
// Do stuff with iframes[i].contentWindow.document.body
}
The problem is when I'm using this script in Safari or Firefox, iframes[i].contentWindow.document.body works as intended. However, when I'm calling this from Objective C in my app in UIWebView didFinishLoad method, iframes[i].contentWindow.document.body is null, and it seems like the JavaScript just stops executing. Is this because the iframes haven't loaded yet? Should I be stalling until then? Any help would be greatly appreciated. | 0 | [
2,
8247,
8741,
31,
8361,
18,
1716,
76,
227,
19,
7038,
272,
800,
3726,
3726,
31,
22,
79,
871,
2555,
8247,
8741,
37,
5122,
728,
272,
6634,
21,
2478,
19069,
17,
589,
2017,
18,
68,
120,
14,
31,
8361,
18,
568,
14,
249,
45,
4033,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bash: Passing a variable into a script that has spaces
===
I currently have a bash script. It looks like this:
#!/bin/bash
case "$1" in
sendcommand)
do X with $2
exit
;;
esac
How would I send all of command `this command with spaces` into $2 without `command` acting as $3, `with` as $4 and so on? Is there something like PHP or Javascript's encodeURI for bash? | 0 | [
2,
13158,
45,
2848,
21,
7612,
77,
21,
3884,
30,
63,
7644,
800,
3726,
3726,
31,
871,
57,
21,
13158,
3884,
9,
32,
1879,
101,
48,
45,
6926,
187,
118,
4772,
118,
969,
1635,
610,
13,
7,
11019,
7,
19,
2660,
16239,
6,
107,
993,
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... |
basic popen3 syntax in ruby
===
Are there any differences between the following two uses of `popen3`?
html = ''
stdin, stdout, stderr = Open3.popen3("curl #{url}")
html << stdout.read
and
html = ''
Open3.popen3("curl #{url}") do |stdin, stdout, stderr, wait_thr|
result << stdout.read
end
I'm wondering if the second syntax causes some thread to block. I'm fairly new to asynchronous code so any insights are greatly appreciated! | 0 | [
2,
2125,
3075,
103,
240,
22649,
19,
10811,
800,
3726,
3726,
50,
80,
186,
4921,
128,
14,
249,
81,
2027,
16,
13,
1,
6057,
219,
240,
1,
60,
13,
15895,
800,
13,
7,
354,
3653,
15,
354,
43,
1320,
15,
354,
1157,
139,
800,
368,
240,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Count Parallel port input frequency - C#
===
I have to count the input frequency of the parallel port at Pin no.13, comming from a 555 timer IC, the real frequency should be around 3-4 Hz (ON Pulse). I have tried several codes, several times but every time those are giving different values. I have tried the following code:
[DllImport("inpout32.dll", EntryPoint = "Inp32")]
public static extern int Input(int adress);
private void button1_Click(object sender, EventArgs e)
{
int currentState = Input(889);
int LastState;
while (true)
{
int State = Input(889);
if (State != currentState)
{
if (Input(889) == 120)
{
LastState = 0;
}
else
{
LastState = 1;
}
break;
}
}
GetFreq(LastState);
}
void GetFreq(int LastPulse)
{
int highPulseFreq = 0;
int lowPulseFreq = 0;
if (LastPulse == 1)
{
highPulseFreq++;
}
if (LastPulse == 0)
{
lowPulseFreq++;
}
int startTime = DateTime.Now.Second;
while (true)
{
if (startTime == DateTime.Now.Second)
{
if (Input(889) != 120)// ON
{
if (LastPulse == 0)
{
highPulseFreq++;
LastPulse = 1;
}
}
else
{
if (LastPulse == 1)
{
lowPulseFreq++;
LastPulse = 0;
}
}
}
else
{
MessageBox.Show("ON Pulses: " + highPulseFreq.ToString() + Environment.NewLine + "OFF Pulses: " + lowPulseFreq.ToString());
break;
}
}
}
OUTPUT:
![enter image description here][1]
![enter image description here][2]
![enter image description here][3]
[1]: http://i.stack.imgur.com/VSCI1.jpg
[2]: http://i.stack.imgur.com/5d7dE.jpg
[3]: http://i.stack.imgur.com/nkweb.jpg
What should I do, to get accurate frequency? Is any thing wrong in my code?
I am using the `inpout32.dll` to control parallel port. | 0 | [
2,
2468,
3821,
1295,
6367,
5328,
13,
8,
272,
5910,
800,
3726,
3726,
31,
57,
20,
2468,
14,
6367,
5328,
16,
14,
3821,
1295,
35,
3459,
90,
9,
1543,
15,
11951,
68,
37,
21,
13,
22779,
85,
139,
13,
596,
15,
14,
683,
5328,
378,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Understanding the approach/implementation required to work with URL pushes
===
There's a 3rd party two-way SMS API which I am trying to use. The way it works is that, a user sends SMS in a format such as `"<COMPANYCODE><SPACE><MESSAGE>"` to `"SOME_NUMBER"` through his cell phone. The same message is sent to us via the SMS Push URL format such as shown below.
SMS Push URL Format :
http://websitedomain/default.aspx?mobile=XXX&message=YYY
I need to retrieve the parameters in the URL, and sent him an acknowledgement. Now, I have built a simple `"ASP.NET Website"` and implemented the logic to retrieve the parameters and send acknowledgement in the `"Page_Load"` function of the `"default.aspx.cs"`.
Now I realize that it won't work because the page is not loaded when the SMS is sent by the user. Hence the functions won't get triggered. Please help me understand what approach do I take to make this happen?
When the user sends an SMS and URL is pushed to my website at `websitedomain/default.aspx` ***where* and *what*** do I code such that, I am able to implement the logic and acknowledge the user back. How does my website sense a URL push/SMS being sent by user? And how/where do I work with that? Please help. Thanks.
p.s. Help with code will be highly appreciated. Thanks. | 0 | [
2,
3260,
14,
2141,
118,
8983,
413,
1130,
857,
1390,
20,
170,
29,
287,
6362,
16271,
800,
3726,
3726,
80,
22,
18,
21,
203,
897,
346,
81,
8,
1443,
7613,
18,
21,
2159,
56,
31,
589,
749,
20,
275,
9,
14,
161,
32,
693,
25,
30,
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... |
unable to create new version
===
I am getting error response, when I am trying to upload the new version in iTunes.
When I click "Ready to Upload Binary" button, I am getting below respoonse
The following error(s) occurred:
We're temporarily unable to save your changes. Please try again later.
I am trying from last 2 week but getting same response. | 0 | [
2,
2343,
20,
1600,
78,
615,
800,
3726,
3726,
31,
589,
1017,
7019,
1627,
15,
76,
31,
589,
749,
20,
71,
8294,
14,
78,
615,
19,
12952,
9,
76,
31,
10840,
13,
7,
15193,
20,
71,
8294,
14171,
7,
5167,
15,
31,
589,
1017,
1021,
302,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Add share button to share Image in facebook
===
I want to add share button in html page to share Image using url or share Image from Page Photo ? | 1 | [
2,
3547,
1891,
5167,
20,
1891,
1961,
19,
9090,
800,
3726,
3726,
31,
259,
20,
3547,
1891,
5167,
19,
13,
15895,
2478,
20,
1891,
1961,
568,
287,
6362,
54,
1891,
1961,
37,
2478,
3056,
13,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Custom Search Page or Layout in Salesforce
===
I am trying to hide elements based off user Role/Profile settings when using Search in Salesforce.
Is there a way to specify these kinds of setting in Search Layouts, VisualForce page, or Field Level Security? | 0 | [
2,
5816,
2122,
2478,
54,
9106,
19,
2598,
8774,
800,
3726,
3726,
31,
589,
749,
20,
3077,
2065,
432,
168,
4155,
597,
118,
14503,
12410,
76,
568,
2122,
19,
2598,
8774,
9,
25,
80,
21,
161,
20,
19077,
158,
8623,
16,
2697,
19,
2122,
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,
0,
0,
0,
0,
0,
0,
0... |
Drawings in UIImage are being distorted
===
I have implemented a highlight function in my app. This highlight is being drawn in UIImage so that it can be saved as a PNG Representation. Everything is working perfectly but recently I realized somewhat a very confusing issue. Sometimes when I am highlighting, the drawings are being distorted. Here is what it looks like:
![highlight stretching to the left][1]
Whenever I move my finger to highlight the characters, the drawn highlights are stretching to the left. Another one:
![highlight fading upward][2]
In this one, every time I move my finger to highlight, the drawn highlights are moving upward!
This is all very confusing for me. This happens from time to time, and sometimes to certain pages only. Sometimes it works well just like this:
![perfect highlight][3]
I am very confused on why is this happening. Can anyone tell me or at least give me an idea on why is this happening? Please help me.
[1]: http://i.stack.imgur.com/X42BU.png
[2]: http://i.stack.imgur.com/6MOmM.png
[3]: http://i.stack.imgur.com/bLSt1.png | 0 | [
2,
9646,
19,
13,
5661,
22039,
50,
142,
21414,
800,
3726,
3726,
31,
57,
6807,
21,
14373,
1990,
19,
51,
4865,
9,
48,
14373,
25,
142,
3160,
19,
13,
5661,
22039,
86,
30,
32,
92,
44,
4377,
28,
21,
351,
2723,
5442,
9,
796,
25,
638,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
memory leak in sqlite3 in ios
===
> Its location based application and application crash after 5-6
> Minutes. When I run the app using performance tools, leaks, I keep
> finding that all of my classes leak memory. i am calling this
> function second by second. Please properly close my database or
> sqlite3. Thanks.
- (void)locationUpdate:(CLLocation *)location {
for (int i=0; i<[arrayAlerts count]; i++) {
Msg=[DatabaseManager GetSelectedMessage:[NSString stringWithFormat:@"select text_msg from TextMsgTemplate where msg_id=%d",ObjAlertInfo.msgID]];
}
in Databasemanger
+(NSString *)GetSelectedMessage:(NSString *)SQL
{
NSString *msg;//=[[[NSString alloc]init] autorelease];
msg=nil;
sqlite3_stmt *dataset=nil;
dataset=[DatabaseManager getMessages:SQL];
while ((sqlite3_step(dataset)==SQLITE_ROW) ) {
msg=[NSString stringWithUTF8String:(char *)sqlite3_column_text(dataset, 0)];
}
sqlite3_finalize(dataset);
dataset = nil;
return msg;
}
+(sqlite3_stmt *)getMessages:(NSString *)SQL
{
sqlite3_stmt *dataset=nil;
sqlite3_stmt *finaldataset=nil;
if (sqlite3_open([[self getdatabasePath] UTF8String], &database) == SQLITE_OK ) {
if (sqlite3_prepare_v2(database, [SQL UTF8String], -1, &dataset, NULL) != SQLITE_OK)
{
NSLog(@"error get message");
return nil;
}else{
finaldataset= dataset;
}
}
sqlite3_close(database);
return finaldataset;
}
| 0 | [
2,
1912,
11724,
19,
4444,
10601,
240,
19,
13,
7760,
800,
3726,
3726,
13,
1,
82,
1474,
432,
3010,
17,
3010,
4597,
75,
331,
8,
379,
13,
1,
902,
9,
76,
31,
485,
14,
4865,
568,
956,
4672,
15,
11724,
18,
15,
31,
643,
13,
1,
3007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQLite insertion on android about Date
===
I'm trying to insert a row with a date column.
Here is the code :
public void createDatePostIt(String contentPostIt, Date date) {
try{
System.out.println("CREATED AT " + date);
String request = "INSERT INTO " + DataBaseHelper.DATABASE_TABLE_DATE
+ " VALUES('" + date + "', ?)";
sqlLtSt = database.compileStatement(request);
System.out.println(request);
sqlLtSt.bindString(1, contentPostIt);
sqlLtSt.executeInsert();
Cursor cursor2 = database.query(DataBaseHelper.DATABASE_TABLE_DATE,
allColumnsDate,
null,
null,
null,
null,
null
);
cursor2.moveToFirst();
while (cursor2.isAfterLast() == false)
{
System.out.println("Cursor 2 " + cursor2.getString(cursor2.getColumnIndex("current_date")));
cursor2.moveToNext();
}
}catch (Exception e){
}
}
**PROBLEM** : When I print the request string, it shows the date I want (Let's say it shows the 2028-12-23)
But when I read the table, the row is set at today's date.
Must be REALLY simple but I can't get it. | 0 | [
2,
4444,
10601,
24245,
27,
13005,
88,
1231,
800,
3726,
3726,
31,
22,
79,
749,
20,
14692,
21,
3131,
29,
21,
1231,
4698,
9,
235,
25,
14,
1797,
13,
45,
317,
11364,
679,
1373,
6962,
242,
5,
11130,
2331,
6962,
242,
15,
1231,
1231,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I fix user dir permissions for my Cydia app?
===
I am having an issue with my application hosted on Cydia.
Users are complaining that the app crashes on startup.
The app uses CoreData, I thought it had something to do with this.
Weird thing is that it works fine using simulator or on my device when testing.
But as soon as it is installed through Cydia it crashes.
Turns out that using "Fix User Dir Permissions" from SBSettings fixes this issue.
Now what can I do about this?
| 0 | [
2,
184,
92,
31,
6098,
4155,
13,
9035,
5572,
18,
26,
51,
6728,
4286,
4865,
60,
800,
3726,
3726,
31,
589,
452,
40,
1513,
29,
51,
3010,
2812,
27,
6728,
4286,
9,
3878,
50,
20154,
30,
14,
4865,
21563,
27,
20205,
9,
14,
4865,
2027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
saveproperty PersistenceManager Flash Builder Mobile
===
I develop an Android and iOS App with Flash Builder.
I save variables with the saveproperty method:
For example:
FlexGlobals.topLevelApplication.persistenceManager.setProperty("sound","on");
If I update my App and release version 1.1.0 the properties are no more available...
Any suggestions or does someone know what I am doing wrong?
Do I have to use SQLite instead of PersistenceManager?
Could I insert some code so that the update couldn't overwrite the actual properties that were set from the version before?
Best
Janine | 0 | [
2,
2079,
10890,
106,
1084,
28584,
22256,
4433,
14960,
3241,
800,
3726,
3726,
31,
2803,
40,
13005,
17,
13,
7760,
4865,
29,
4433,
14960,
9,
31,
2079,
12157,
29,
14,
2079,
10890,
106,
1084,
2109,
45,
26,
823,
45,
14409,
26763,
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... |
Ruby - Gem Daemons - How to run several different daemons
===
Basically I just want to run several daemons in my ruby script :
require 'daemons'
Daemons.run path_1, { :ARGV => ['start'], :app_name => 'app1', :multiple => true, ... }
Daemons.run path_2, { :ARGV => ['start'], :app_name => 'app2', :multiple => true, ... }
But the second Daemons.run is never called when ARGV[0] == 'start' (works perfectly with 'status'/'stop'). What is the right way to do it ? | 0 | [
2,
10811,
13,
8,
8551,
13127,
18,
13,
8,
184,
20,
485,
238,
421,
13127,
18,
800,
3726,
3726,
11374,
31,
114,
259,
20,
485,
238,
13127,
18,
19,
51,
10811,
3884,
13,
45,
4077,
13,
22,
593,
18062,
18,
22,
13127,
18,
9,
3169,
2013... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
parsing web response j2me
===
Im consuming a .net web service and generating stubs using netbeans. however i need to parse the xml string response using a third party or jsr-172. please help
code
import biblewebservice.BibleWebservice_Stub;
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import org.ksoap2.SoapEnvelope;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParser;
/**
* @author Osbert
*/
public class bible extends MIDlet implements Runnable, CommandListener {
Display display;
private Form f;
private StringItem si;
//private List si;
private TextField bk;
private TextField chp;
private TextField vs;
private Command sendCommand = new Command("Send", Command.ITEM, 1);
private Command exitCommand = new Command("Exit", Command.EXIT, 1);
public void startApp() {
display = Display.getDisplay(this);
f = new Form("Verses");
// tf = new TextField("City:", "", 30, TextField.ANY);
bk = new TextField("Book:", "", 30, TextField.ANY);
chp = new TextField("Chapter:","",5, TextField.NUMERIC);
vs = new TextField("Verse:","",5,TextField.NUMERIC);
//parse
si = new StringItem("" , " ");
f.append(bk);
f.append(chp);
f.append(vs);
f.append(si);
f.addCommand(sendCommand);
f.addCommand(exitCommand);
f.setCommandListener(this);
display.setCurrent(f);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void run() {
}
public void commandAction(Command c, Displayable d) {
if (c == sendCommand) {
// city = tf.getString();
// ctry = ct.getString();
// si.setText("");
// try {
//parse
int chapter = Integer.parseInt(chp.getString());
int verse = Integer.parseInt(vs.getString());
String book = bk.getString();
//
BibleWebservice_Stub feed1 = new BibleWebservice_Stub();
feed1._setProperty(BibleWebservice_Stub.SESSION_MAINTAIN_PROPERTY, (true ?
Boolean.TRUE : Boolean.FALSE));
String List1 ;
// String book = bk.toString();
try {
//
// feed1.
// String List = List1+"Scholarship-Postions:"+List2;
si.setText("Detail: " +List1);
//println(List);
//XML Parsing
// END XML Parsing
// si.set(0,List, null);
} catch (Exception ex) {
}
//si.toString(+List);
// } catch (Exception e) {}
//throw new UnsupportedOperationException("Not supported yet.");
/*
* Start a new thread so that the remote invocation won't block
* the process.
*/
new Thread(this).start();
}
if (c == exitCommand) {
notifyDestroyed();
destroyApp(true);
}
// throw new UnsupportedOperationException("Not supported yet.");
}
}
| 0 | [
2,
2017,
18,
68,
2741,
1627,
487,
135,
790,
800,
3726,
3726,
797,
13,
17601,
21,
13,
9,
2328,
2741,
365,
17,
13500,
21354,
18,
568,
4275,
863,
5950,
9,
207,
31,
376,
20,
2017,
870,
14,
23504,
3724,
1627,
568,
21,
422,
346,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Performance of std::vector<Test> vs std::vector<Test*>
===
In an std::vector of a non POD data type, is there a difference between a vector of objects and a vector of (smart) pointers to objects? I mean a difference in the implementation of these data structures by the compiler.
E.g.:
class Test {
std::string s;
Test *other;
};
std::vector<Test> vt;
std::vector<Test*> vpt;
Could be there no performance difference between vt and vpt?
| 0 | [
2,
956,
16,
354,
43,
45,
45,
28033,
1,
10543,
1,
4611,
354,
43,
45,
45,
28033,
1,
10543,
2483,
1,
800,
3726,
3726,
19,
40,
354,
43,
45,
45,
28033,
16,
21,
538,
8848,
1054,
1001,
15,
25,
80,
21,
2841,
128,
21,
7497,
16,
3916,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use xtext inferred JVM model outside of xtext project?
===
In the **Inferring a JVM Model** section of the Xtext documentation (http://www.eclipse.org/Xtext/documentation.html#_17) it starts by saying:
"In many cases, you will want your DSLs concepts to be usable as Java elements. E.g. an Entity will become a Java class and should be usable as such".
In the example above, how can I use the generated Entity class **outside** of xbase, i.e. in real Java code in a different project to the xtext one?
What I am essentially asking is if the Java classes created my by the model Inferrer can actually be used as real java classes, which can have their methods called and fields accessed from java code, in an altogether different project, and if so how this can be done?
My going through the documentation has lead me to fear that the generated "Java classes" are only Xbase types, only referenceabe in an xtext context, and are not therefore real java classes...
| 0 | [
2,
184,
20,
275,
993,
11969,
29541,
487,
20147,
1061,
719,
16,
993,
11969,
669,
60,
800,
3726,
3726,
19,
14,
13,
1409,
108,
2407,
2090,
21,
487,
20147,
1061,
1409,
1050,
16,
14,
993,
11969,
13945,
13,
5,
21127,
6903,
6483,
9,
3319... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CLR20r3 ....using c# error connecting mysql
===
I'm getting this error in my application
Error Info .....CLR20r3...
The local mechine is not able to make connection with mysql on server...
The system says timeoutException...
I'm using c# for my application...
Thankyou in advance for any attention....
| 0 | [
2,
10842,
139,
1323,
139,
240,
13,
9,
9,
9,
9,
12655,
272,
5910,
7019,
6440,
51,
18,
22402,
800,
3726,
3726,
31,
22,
79,
1017,
48,
7019,
19,
51,
3010,
7019,
15404,
13,
9,
9,
9,
9,
9,
5316,
139,
1323,
139,
240,
9,
9,
9,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The mailbox that was requested doesn't support the specified RequestServerVersion
===
I'm trying to send an email using Exchange Web Services.
Below is the code:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Url = new Uri("https://mail.mydomain.com/ews/Exchange.asmx");
service.Credentials = new WebCredentials("Username", "Password", "Domain");
EmailMessage message = new EmailMessage(service);
message.Subject = "SEND!";
message.Body = "Please work.";
message.Sender = new EmailAddress("myemailaddress@mydomain.com");
message.ToRecipients.Add("myemailaddress@mydomain.com");
message.Save();
message.SendAndSaveCopy();
But I'm getting the below error:
"The mailbox that was requested doesn't support the specified RequestServerVersion"
Help?
| 0 | [
2,
14,
4216,
5309,
30,
23,
6602,
1437,
22,
38,
555,
14,
9931,
12279,
106,
2304,
10898,
800,
3726,
3726,
31,
22,
79,
749,
20,
2660,
40,
8517,
568,
1950,
2741,
687,
9,
1021,
25,
14,
1797,
45,
1950,
11449,
365,
800,
78,
1950,
11449... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.