unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Creating Directory in the Memory
===
How can we create a directory in the Memory as a stream and then using the System.IO package for the zip the package directory.
Additional Info : I need to do it memory because i will be using it in the Windows Azure .So i am not sure i will have permission in the Server for doing it. | 0 | [
2,
2936,
16755,
19,
14,
1912,
800,
3726,
3726,
184,
92,
95,
1600,
21,
16755,
19,
14,
1912,
28,
21,
3766,
17,
94,
568,
14,
329,
9,
1963,
6030,
26,
14,
12133,
14,
6030,
16755,
9,
1351,
15404,
13,
45,
31,
376,
20,
107,
32,
1912,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
REST Documentation Template
===
I am in the process of writing my own RESTful API and want to document it as I go along. I was wondering if anyone has any recommendations for a tool that would help with the documentation process? I am not looking for something that will automatically generate documentation based on reading source code or anything big and robust.
I am really looking for some kind of HTML theme that would be useful for displaying the information well or even a wordpress theme that would layout the documentation nicely as I don't mind providing all the information.
Any recommendations? | 0 | [
2,
760,
13945,
22894,
800,
3726,
3726,
31,
589,
19,
14,
953,
16,
1174,
51,
258,
760,
1566,
21,
2159,
17,
259,
20,
4492,
32,
28,
31,
162,
303,
9,
31,
23,
5712,
100,
1276,
63,
186,
12121,
26,
21,
5607,
30,
83,
448,
29,
14,
139... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Random Forest Query
===
Respected sir,
I am working on a project based on random forest.I saw one ppt (Rec08_Oct21.ppt)(www.cs.cmu.edu/~ggordon/10601/.../rec08/Rec08_Oct21.ppt)
regarding random forest creation. I wanted to ask a question.
After scanning through the randomly selected features and their Information gain value, we select the feature with the max value of IG for feature j. Then, how do we split using this information?? How do we proceed after this?
Thanks in advance!
| 0 | [
2,
5477,
1334,
25597,
800,
3726,
3726,
10861,
927,
15,
31,
589,
638,
27,
21,
669,
432,
27,
5477,
1334,
9,
49,
441,
53,
3273,
38,
13,
5,
14673,
3099,
1,
2499,
38,
1941,
9,
3421,
38,
6,
5,
6483,
9,
6824,
9,
150,
3677,
9,
69,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get a value from slider when using Jquery Mobile
===
I really am struggling with js and Jquery mobile :(
-jquery-1.7.2.js
-jquery.mobile-1.1.1.js
My javascript:
<script type="text/javascript" charset="utf-8">
$('#temperature').change(function() {
alert('.change() called.');
});
</script>
</head>
My html with jqm slider:
<div data-role="page" data-theme="a">
<div>
<div data-role="header">
<h1>Conditions</h1>
</div>
<div data-role="fieldcontain">
<label for="temperature">Temperature: </label> <input type="range"
name="temperature" id="temperature" value="15" min="-15" max="60"
data-highlight="true" />
</div>
</div>
</div>
[-----> My Fiddle][1]
[1]: http://jsfiddle.net/samsam/6rT6P/
Question1: Why this is not working if using jquery Mobile but without it is working?
Question2: What is the correct way to get a value from slider? I have tried many, no success.
Question3: Why this is alerting many times in Fiddle even if I change the value once?
Question4: What is the best way to get values when you have for instance 6 slider at the one page?
Thanks!
Sami | 0 | [
2,
184,
20,
164,
21,
1923,
37,
3295,
106,
76,
568,
487,
8190,
93,
3241,
800,
3726,
3726,
31,
510,
589,
7587,
29,
487,
18,
17,
487,
8190,
93,
3241,
13,
45,
5,
13,
8,
728,
8190,
93,
8,
165,
9,
465,
9,
135,
9,
728,
18,
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... |
Unwanted new line returned after AJAX request
===
I'm using an ajax request to retrieve comments from my db. Succesful response is marked by
1. OK
The problem actually is that the response from the php script is
1.
2. OK
So I debugged the script and noted that the newline character si being added when the script executes the following line:
require_once($ABS_APPS."/quotes/classQuote.php");
After some searches i read that it could be a BOM (Byte Order Mark) problem. So I just downloaded and opened the `classQuote.php` file with an hex editor and noticed that there's no BOM... can someone help me?
P.S. All files in my project are encoted in UTF-8, and I'm currently usint NetBeans which doesn't add BOM to files. | 0 | [
2,
21095,
78,
293,
587,
75,
20624,
3772,
800,
3726,
3726,
31,
22,
79,
568,
40,
20624,
3772,
20,
11917,
7534,
37,
51,
13,
9007,
9,
21792,
5052,
1566,
1627,
25,
2739,
34,
137,
9,
5854,
14,
1448,
1121,
25,
30,
14,
1627,
37,
14,
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 call a function in main v8 loop from a different thread
===
I am trying to implement an audio module for nodejs which involves a neural network.
This neural network has 2 types of nodes
1. Pure C++
2. C++ based on JAVASCRIPT ( which involves calling a javascript
function defined )
As far as i know its not possible to call any function which involves v8 from a different thread. And if i return to the main thread i will lose my traverse in the neural network.
How to implement a call to a function in the main thread from a different thread? | 0 | [
2,
184,
20,
645,
21,
1990,
19,
407,
566,
457,
5293,
37,
21,
421,
9322,
800,
3726,
3726,
31,
589,
749,
20,
8713,
40,
4023,
12613,
26,
15421,
728,
18,
56,
6569,
21,
17371,
982,
9,
48,
17371,
982,
63,
172,
2551,
16,
16272,
137,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
getting "Class not found: org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter" in eclipse 3.8
===
i have been successfully using ajdt in conjunction with pde headless build in eclipse 3.6. i have the following entries in project's **build.properties**:
> compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
> sourceFileExtensions=*.java, *.aj
however, once i switched to eclipse 3.8, i have been getting the following stack during my ant-based pde headless build:
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\scripts\productBuild\productBuild.xml:43:
> The following error occurred while executing this line:
>
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\scripts\build.xml:105:
> The following error occurred while executing this line:
>
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\templates\headless-build\customTargets.xml:12:
> The following error occurred while executing his line:
>
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\scripts\productBuild\allElements.xml:20:
> The following error occurred while executing this line:
>
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\scripts\genericTargets.xml:119:
> The following error occurred while executing this line:
>
> [java]
> c:\eclipse3.8\plugins\org.eclipse.pde.build_3.8.0.v20120523-1555\scripts\genericTargets.xml:129:
> The following error occurred while executing this line:
>
> [java]
> c:\MyApp\temp\compile.org.eclipse.pde.build.container.feature.xml:4:
> The following error occurred while executing this line:
>
> [java] c:\MyApp\temp\plugins\com.foo.myplugin\build.xml:176: The
> following error occurred while executing this line:
>
> [java] c:\MyApp\temp\plugins\com.foo.myplugin\build.xml:122: **Class
> not found: org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter**
please help me. thank you for your time! | 0 | [
2,
1017,
13,
7,
1898,
52,
216,
45,
13,
5583,
9,
3319,
6013,
870,
9,
6881,
43,
38,
9,
10375,
9,
1830,
9,
6881,
43,
38,
1,
58,
15864,
11103,
3599,
12779,
12689,
7,
19,
11652,
203,
9,
457,
800,
3726,
3726,
31,
57,
74,
3673,
568... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Problems reading Windows Key on 64 bit machine
===
I want to read with a simple c# application the windows key from the registry. But on a x64 machine I recieve only BBBBB-BBBBB-BBBBB-BBBBB-BBBBB as the key and that is wrong... How can I fix that problem?
RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
RegistryKey subkey = key.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion");
Thanks! | 0 | [
2,
1716,
1876,
1936,
1246,
27,
4384,
1142,
1940,
800,
3726,
3726,
31,
259,
20,
1302,
29,
21,
1935,
272,
5910,
3010,
14,
1936,
1246,
37,
14,
18269,
9,
47,
27,
21,
993,
3470,
1940,
31,
302,
10486,
195,
104,
334,
3490,
3490,
8,
220... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding terminal commands to MonoDevelop each time build is hit
===
Is it possible to have MonoDevelop also run a certain terminal command each time that you hit build?
For example, I'd like to have document generation automatically generated each time I build my project in MonoDevelop. I usually do this by having to run a terminal command `NaturalDocs -i inputFolder -O OutputFolder -p ProjDirectory` | 0 | [
2,
4721,
3855,
14294,
20,
4129,
26051,
206,
85,
1895,
25,
770,
800,
3726,
3726,
25,
32,
938,
20,
57,
4129,
26051,
67,
485,
21,
1200,
3855,
1202,
206,
85,
30,
42,
770,
1895,
60,
26,
823,
15,
31,
22,
43,
101,
20,
57,
4492,
2782,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 my apto keep running when the screen is blank and locked
===
In my ap I want to ap to keep running when the screen is blank and locked.
This is an instrumentation ap that runs when the phone is in the pocket, so we can blank the screen to save power.
Currently:
If the phone locks automatically the screen goes blank and the ap terminates. When the phone is unlocked the ap needs to be re-started.
If the phone is manually locked (with a tap on the power button) the screen goes blank, the ap stays running, but the data to voice output stops "working". When the phone is unlocked the ap is still running and the data to voice starts "working" again.
I don't think WakeLock will do that for me. It's a function that's more like a sticky bit, as in load and don't terminate unless there is a specif command to terminate.
Any pointers to what I should be doing would be appreciated - thanks - Rob
| 0 | [
2,
31,
259,
51,
21,
17236,
643,
946,
76,
14,
2324,
25,
6463,
17,
4011,
800,
3726,
3726,
19,
51,
8442,
31,
259,
20,
8442,
20,
643,
946,
76,
14,
2324,
25,
6463,
17,
4011,
9,
48,
25,
40,
18235,
8442,
30,
1461,
76,
14,
1132,
25,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't link to Twitter
===
I have a business page...
I go to https://www.facebook.com/settings?tab=subscribers§ion=twitter&view and click the button that says "Link profile to Twitter"...
I'm simply redirected back to my page, http://www.facebook.com/xeroshoes | 0 | [
2,
92,
22,
38,
3508,
20,
10623,
800,
3726,
3726,
31,
57,
21,
508,
2478,
9,
9,
9,
31,
162,
20,
7775,
18,
6903,
6483,
9,
6413,
5199,
9,
960,
118,
19831,
18,
60,
15783,
3726,
20330,
1224,
1569,
10579,
3726,
38,
13098,
106,
1569,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 notification height
===
I created custom notification with a using layout ( my notification UI created in xml file ).
I can change notification height? ( notification created for android 2.1 )
If I can how?
If I can't, how can I create TextView with a vertical scroll? | 0 | [
2,
13005,
52,
4634,
2947,
800,
3726,
3726,
31,
679,
5816,
52,
4634,
29,
21,
568,
9106,
13,
5,
51,
52,
4634,
13,
5661,
679,
19,
23504,
3893,
13,
6,
9,
31,
92,
753,
52,
4634,
2947,
60,
13,
5,
52,
4634,
679,
26,
13005,
172,
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... |
Mac Bluetooth MAP profile
===
Having heard that Apple has included the Bluetooth MAP profile in iOS 6 I was wondering how I could implement the client side of that on a Mac.
I have spent a while Goggling but I haven't found any documentation on how to use it. Is it built into the OS or will I have to use an external library. (I know there is a Bluetooth API in Mac OS but I don't know if it supports the MAP profile)
Are there any code samples or documentation that I could use? | 0 | [
2,
1572,
705,
15808,
2942,
5296,
800,
3726,
3726,
452,
752,
30,
4037,
63,
506,
14,
705,
15808,
2942,
5296,
19,
13,
7760,
400,
31,
23,
5712,
184,
31,
110,
8713,
14,
6819,
270,
16,
30,
27,
21,
1572,
9,
31,
57,
1111,
21,
133,
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... |
Computer reboots when start Processing application
===
My problem is that when I run the following code in Processing my PC restarts..
import java.awt.AWTException;
import java.awt.Robot;
Robot robot;
void setup() {
size(400, 400);
try {
robot = new Robot();
}
catch (AWTException e) {
e.printStackTrace();
}
robot.mouseMove(screenWidth/2, screenHeight/2);
}
void draw() {
//println(frameCount);
}
I've tried the same code on another computer and it worked perfectly.. anyone any suggestion? | 0 | [
2,
1428,
25312,
18,
76,
799,
5511,
3010,
800,
3726,
3726,
51,
1448,
25,
30,
76,
31,
485,
14,
249,
1797,
19,
5511,
51,
5168,
22767,
18,
9,
9,
9010,
8247,
9,
3885,
38,
9,
3885,
38,
10066,
872,
73,
9010,
8247,
9,
3885,
38,
9,
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... |
internet explorer, ajax and cookie expiration
===
I've created a login form that uses ajax to send information to a php page where a cookie is set to expire after 15 days. Everything works great in all browsers, except IE( tested with IE9). The cookie is created in IE but only works until I close the browser. AFter that, if I open the IE browser again the cookie is deleted.
Is there something I need to do ?
Thnks | 0 | [
2,
2620,
8520,
15,
20624,
17,
19980,
29529,
800,
3726,
3726,
31,
22,
195,
679,
21,
6738,
108,
505,
30,
2027,
20624,
20,
2660,
676,
20,
21,
13,
26120,
2478,
113,
21,
19980,
25,
309,
20,
25910,
75,
357,
509,
9,
796,
693,
374,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to know the upload/download progress with box.net API?
===
I would like to know if there is a way with the API to get the upload or download progress while sending or receiving files ?
Thanks | 0 | [
2,
184,
20,
143,
14,
71,
8294,
118,
2968,
8294,
3455,
29,
1649,
9,
2328,
21,
2159,
60,
800,
3726,
3726,
31,
83,
101,
20,
143,
100,
80,
25,
21,
161,
29,
14,
21,
2159,
20,
164,
14,
71,
8294,
54,
7121,
3455,
133,
4907,
54,
3396... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Setting a PartyList value isn't being resolved correctly
===
I have some Javascript attached to the Service Activity form which fires OnLoad. It retrieves the TechId associated with the Service Case (which is related to the Service Activity) and tries to set the resource for the Service Activity to this user by default.
![Screenshot of the unresolved resource][1]
[1]: http://i.stack.imgur.com/k1YU9.png
As you can see in the screenshot above, it inserts the correct "name" into the Resources field but it doesn't seem to resolve it properly as the icon is "corrupt". If I remove this and manually add the same user, everything is ok. If I try and save this activity as it is in the image, I get an error generated which points to the scheduling engine having problems.
The code I use to set this value is;
function SetTechId()
{
if (Xrm.Page.getAttribute("resources").getValue() == null)
{
if (Xrm.Page.getAttribute("regardingobjectid").getValue() != null)
{
var caseId = Xrm.Page.getAttribute("regardingobjectid").getValue()[0].id;
var endPoint = getODataEndPoint();
var odataSelect = endPoint + "/IncidentSet?$select=new_new_fieldtechs_incident/OwnerId,new_new_fieldtechs_incident/OwningUser&$expand=new_new_fieldtechs_incident&$filter=IncidentId eq guid'" + caseId + "'";
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataSelect,
beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
success: function (data, textStatus, XmlHttpRequest)
{
if (data.d != null)
{
var fieldTech = data.d.results[0];
var ownerId = fieldTech.new_new_fieldtechs_incident.OwnerId;
//because the resources field in the service activity is a partylist, we need to treat this differently
var partylist = new Array();
partylist[0] = new Object();
partylist[0].id = ownerId.Id; //Guid (i.e., Guid of User or Contact etc)
partylist[0].name = ownerId.Name; //Name (i.e., Name of User or Contact etc)
partylist[0].entityType = "account"; //entity schema name of account or contact
Xrm.Page.getAttribute("resources").setValue(partylist);
}
},
error: function (XmlHttpRequest, textStatus, errorThrown) { }
});
}
}
}
function getODataEndPoint() {
return Xrm.Page.context.prependOrgName("/xrmservices/2011/OrganizationData.svc");
}; | 0 | [
2,
2697,
21,
346,
5739,
1923,
2532,
22,
38,
142,
11052,
12044,
800,
3726,
3726,
31,
57,
109,
8247,
8741,
3638,
20,
14,
365,
2358,
505,
56,
11327,
27,
8294,
9,
32,
11917,
18,
14,
6145,
1340,
1598,
29,
14,
365,
610,
13,
5,
2140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to create images dynamically by using webservices in iphone
===
How to create two or more images by passing url using webservices in iphone.
Please give suggetions and advises to me.And also provide source code for that.
thanks in advance. | 0 | [
2,
184,
20,
1600,
3502,
7782,
1326,
34,
568,
2741,
11449,
18,
19,
21024,
800,
3726,
3726,
184,
20,
1600,
81,
54,
91,
3502,
34,
2848,
287,
6362,
568,
2741,
11449,
18,
19,
21024,
9,
2247,
590,
13,
18,
5127,
3060,
5757,
17,
14640,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Using Bluetooth with a Google Chrome extension
===
I've seen the experimental API for using Bluetooth has been recently released and I wanted to perform a few tests. I've looked at the official documentation at <http://bit.ly/LkGBB8> but even the most simple example won't work. Of course, I previously set the permissions correctly in order to use the experimental APIs.
My background.js looks like this:
function booleanCallback(result) {
alert(result.toString());
}
chrome.experimental.bluetooth.isPowered(booleanCallback);
No matter what, <code>result</code> is always <code>undefined</code>. Any thoughts on this?
Cheers. | 0 | [
2,
568,
705,
15808,
29,
21,
8144,
13,
12985,
3896,
800,
3726,
3726,
31,
22,
195,
541,
14,
5174,
21,
2159,
26,
568,
705,
15808,
63,
74,
1989,
261,
17,
31,
417,
20,
2985,
21,
310,
4894,
9,
31,
22,
195,
292,
35,
14,
989,
13945,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GWT designer installation on Win 7
===
i am trying for 5 hours to install google web toolkit designer without success. After i create a project a get this error msg
"GWT Designer cannot load the native library 'wbp-gwt-webkit' used for rendering the GWT UI. This may be caused by corrupted installation or unsupported OS. Please try to re-install the product.".
If someone had similar problems, that he managed to solve, let me know, i am not interested in links that don't give the precise answer because i read a ton of it. | 0 | [
2,
14094,
38,
4742,
7758,
27,
628,
453,
800,
3726,
3726,
31,
589,
749,
26,
331,
974,
20,
16146,
8144,
2741,
5607,
13703,
4742,
366,
1280,
9,
75,
31,
1600,
21,
669,
21,
164,
48,
7019,
4235,
263,
13,
7,
263,
499,
38,
4742,
1967,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Looking back for instances that fall within a specific time frame
===
I have the following data set concerning the use of a service. People are allowed to check in and out of the service so there is a entered service date and a left service date. On another occassion further on, they may enter the service again and leave it after some days.
I want to be able to know for each use of the service (represented by a row) by a person, what is the number of times he/she has used the service in the previous year.
### What I have tried
I computed an service use index to denote the nth time a service has been used. Next I made use of the index to compute the days since the previous service use. From there on I'm stuck. I'm not sure how I should go about looking back.
I am quite stuck and would appreciate any tips on how to proceed. I wanted to use `lapply` to subset each person into its own dataframe but after which how do I look back?
Thanks.
### Dataset
read.table("http://dl.dropbox.com/u/822467/dataset.csv", sep = ",", header = TRUE) | 0 | [
2,
699,
97,
26,
13946,
30,
1080,
363,
21,
1903,
85,
3523,
800,
3726,
3726,
31,
57,
14,
249,
1054,
309,
6477,
14,
275,
16,
21,
365,
9,
148,
50,
1159,
20,
2631,
19,
17,
70,
16,
14,
365,
86,
80,
25,
21,
1297,
365,
1231,
17,
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... |
Why variables sum returns multiplication?
===
in the following code:
void fusioneArray(int v[], int vL, int w[], int wL[], int *fusione)
{
int i,j,temp;
int k=0;
printf("%d",wL+vL);
for(i=0;i<vL;i++)
{
fusione[k]=v[i];
k++;
}
for(j=0;j<wL;j++)
{
fusione[k]=w[j];
k++;
}
}
int main()
{
int v[5]={1,2,3,4,5};
int w[5]={5,4,3,2,1};
int i=0;
int fusione[10];
fusioneArray(v,5,w,5,fusione);
}
can u explain me why vL+wL returns * instead of +? (25 instead of 10)... | 0 | [
2,
483,
12157,
3907,
4815,
25432,
60,
800,
3726,
3726,
19,
14,
249,
1797,
45,
11364,
11117,
10717,
2787,
5,
6391,
566,
2558,
500,
15,
19,
38,
13,
15143,
15,
19,
38,
619,
2558,
500,
15,
19,
38,
13,
10077,
2558,
500,
15,
19,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Gradient bottom color for a div
===
I wanted a gradient bottom color for a div.Something like as shown in below image.Is it possible in css3 or should a image be used.
Any help appriciated.
![enter image description here][1]
[1]: http://i.stack.imgur.com/zPgIL.png | 0 | [
2,
17442,
2129,
1665,
26,
21,
13,
12916,
800,
3726,
3726,
31,
417,
21,
17442,
2129,
1665,
26,
21,
13,
12916,
9,
9099,
101,
28,
1721,
19,
1021,
1961,
9,
403,
32,
938,
19,
272,
18,
18,
240,
54,
378,
21,
1961,
44,
147,
9,
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... |
Any way to capture fusion charts?
===
Here i am trying to capture fusion charts as images on a button click using javascript.
Here is my javascript code:
var initiateExport = false;
function exportCharts() {
var exportFormat = 'JPG';
initiateExport = true;
for (var chartRef in FusionCharts.items) {
if (FusionCharts.items[chartRef].exportChart) {
document.getElementById("linkToExportedFile").innerHTML = "Exporting...";
FusionCharts.items[chartRef].exportChart({ "exportFormat": exportFormat });
}
else {
document.getElementById("linkToExportedFile").innerHTML = "Please wait till the chart completes rendering...";
}
}
}
function FC_Exported(statusObj) {
if (initiateExport) {
initiateExport = false;
document.getElementById("linkToExportedFile").innerHTML = "";
}
if (statusObj.statusCode == "1") {
document.getElementById("linkToExportedFile").innerHTML += "Export successful. View it from <a target='_blank' href='" + statusObj.fileName + "'>here</a>.<br/>";
}
else {
document.getElementById("linkToExportedFile").innerHTML += "Export unsuccessful. Notice from export handler : " + statusObj.notice + "<br/>";
}
}
The problem with this is before image capture a progress bar comes showing "capturing data".I want to bypass that(as i have another code waiting for its completion) so that directly on button click the images are generated.If its not possible through javascript can someone suggest a method using **c#** ? | 0 | [
2,
186,
161,
20,
3683,
11117,
5158,
60,
800,
3726,
3726,
235,
31,
589,
749,
20,
3683,
11117,
5158,
28,
3502,
27,
21,
5167,
10840,
568,
8247,
8741,
9,
235,
25,
51,
8247,
8741,
1797,
45,
4033,
17014,
1706,
1993,
800,
4997,
73,
1990,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RSync client in .Net
===
For one project, I need to find a RSync library to make some interaction with a linux server with rsync.
I already googled a lot, but I didn't found anything that matches:
https://github.com/kolosy/rsync.net
-->Seems to be unmaintened, undocumented
http://www.kolosy.com/wordpress/?p=8
--> Dead website
Even it's a commercial library, it's not a big deal. | 0 | [
2,
761,
9507,
150,
6819,
19,
13,
9,
2328,
800,
3726,
3726,
26,
53,
669,
15,
31,
376,
20,
477,
21,
761,
9507,
150,
1248,
20,
233,
109,
7754,
29,
21,
13024,
8128,
29,
761,
9507,
150,
9,
31,
614,
8144,
43,
21,
865,
15,
47,
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... |
Change or update an attribute value during Rails ActiveRecord validation
===
**Summary**: I'm trying to alter an attribute's value *within* a custom `ActiveModel::EachValidator` validator. Given the following prototype:
`def validate_each(record, attribute, value)`
trying to set `value = thing` doesn't appear to do anything -- am I missing something? There should be a smart way to do this...
**Detail**: I accept a URL input as part of a site. I don't want to just take the URL and directly validate that it returns a `200 OK` message, because that would ignore entries that didn't start with `http`, or left out the leading `www`, etc. I have some custom logic to deal with those errors and follow redirects. Thus, I'd like the validation to *succeed* if a user types in `example.org/article` rather than `http://www.example.org/article`. The logic works properly inside the validation, but the problem is that if somebody types in the former, the stored value in the database is in the "wrong" form rather than the nicely updated one. Can I change the entry during validation to a more canonical form?
| 0 | [
2,
753,
54,
11100,
40,
35,
14755,
1923,
112,
2240,
18,
1348,
14953,
27999,
800,
3726,
3726,
13,
1409,
18,
723,
17396,
1409,
45,
31,
22,
79,
749,
20,
7835,
40,
35,
14755,
22,
18,
1923,
1637,
1410,
108,
2483,
21,
5816,
13,
1,
7889... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
creating a shape over a Range object in Winword Addin
===
I am trying to create a shape over a given Range object in winword addin.
Currently I am only able to get the left and top of the begining of the Range , but I can't find the witdh and height of that range.
This is what I am doing to get the top/left :
float left= r.get_Information(Word.WdInformation.wdHorizontalPositionRelativeToPage);
float top= r.get_Information(Word.WdInformation.wdVerticalPositionRelativeToPage);
to add the shape I am doing something like that over the Selection object which hold the range :
Sel.Document.Shapes.AddShape((int)Office.MsoAutoShapeType.msoShapeRectangle,
left,
top,
100,
100, r )
In addition to that, I would like to be notifed whenever that range is changing (changing its content).
| 0 | [
2,
2936,
21,
2539,
84,
21,
978,
3095,
19,
628,
9587,
3547,
108,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
2539,
84,
21,
504,
978,
3095,
19,
628,
9587,
3547,
108,
9,
871,
31,
589,
104,
777,
20,
164,
14,
225,
17,
371,
16,
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... |
load table Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails
===
I've read the majority of responses on this my problem seems a little different. I absolutely do have the parent row populated so an Insert works but the same row cannot be added when I do a load file.
I created a very simple db to isolate the problem:
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
DROP SCHEMA IF EXISTS `world` ;
CREATE SCHEMA IF NOT EXISTS `world` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
SHOW WARNINGS;
USE `world` ;
-- -----------------------------------------------------
-- Table `world`.`country`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `world`.`country` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `world`.`country` (
`country_name` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`country_name`) )
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `world`.`climate`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `world`.`climate` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `world`.`climate` (
`climate_name` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`climate_name`) )
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `world`.`state`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `world`.`state` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `world`.`state` (
`state_name` VARCHAR(45) NOT NULL ,
`state_climate` VARCHAR(45) NOT NULL ,
`country_name` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`state_name`, `country_name`) ,
INDEX `fk_state_country` (`country_name` ASC) ,
INDEX `fk_state_climate1` (`state_climate` ASC) ,
CONSTRAINT `fk_state_countryx`
FOREIGN KEY (`country_name` )
REFERENCES `world`.`country` (`country_name` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_state_climate1x`
FOREIGN KEY (`state_climate` )
REFERENCES `world`.`climate` (`climate_name` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
-- -----------------------------------------------------
-- Table `world`.`city`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `world`.`city` ;
SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `world`.`city` (
`city_name` VARCHAR(45) NOT NULL ,
`state_name` VARCHAR(45) NOT NULL ,
`country_name` VARCHAR(45) NOT NULL ,
PRIMARY KEY (`city_name`, `state_name`, `country_name`) ,
INDEX `fk_city_state1` (`state_name` ASC) ,
INDEX `fk_city_country1` (`country_name` ASC) ,
CONSTRAINT `fk_city_state1`
FOREIGN KEY (`state_name` )
REFERENCES `world`.`state` (`state_name` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_city_country1`
FOREIGN KEY (`country_name` )
REFERENCES `world`.`country` (`country_name` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SHOW WARNINGS;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
I then load the country table from a data file whose contents are:
"USA"
"USSR"
"China"
"Germany"
"Italy"
Then select * from country:
"USA"
"USSR"
"China"
"Germany"
"Italy"
I then load the climate table with:
"Tropical"
"Dry"
"Temperate"
"Cold"
"Polar"
select * from climate shows:
"Tropical"
"Dry"
"Temperate"
"Cold"
"Polar"
Then I try to load a file with the following single record:
"Florida","Tropical","USA"
and it fails with:
Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`world/state`, CONSTRAINT `fk_state_countryx` FOREIGN KEY (`country_name`) REFERENCES `country` (`country_name`) ON DELETE NO ACTION ON UPDATE NO ACTION)
The exact SQL used is below:
use world;
load data infile 'd:/java/netbeansprojects/swidcompc/test db stuff/countries.txt'
into table country
fields terminated by "," enclosed by '"'
lines terminated by '\r\n';
select * from country;
load data infile 'd:/java/netbeansprojects/swidcompc/test db stuff/climates.txt'
into table climate
fields terminated by "," enclosed by '"'
lines terminated by '\r\n';
select * from climate;
load data infile 'd:/java/netbeansprojects/swidcompc/test db stuff/statesx.txt'
into table state
fields terminated by "," enclosed by '"'
lines terminated by '\r\n';
insert into state values ('Florida','Tropical','USA');
select * from state;
The insert works file as show by the final select statement which shows:
Florida Tropical USA
Why does the load not work?
Help, and thanks in advance.
Kevin
| 0 | [
2,
6305,
859,
7019,
1797,
45,
513,
4340,
9,
1967,
3547,
54,
11100,
21,
850,
3131,
45,
21,
1228,
1246,
28804,
13614,
800,
3726,
3726,
31,
22,
195,
1302,
14,
1698,
16,
13231,
27,
48,
51,
1448,
2206,
21,
265,
421,
9,
31,
6916,
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... |
Is it possible to retrieve the generic type used for a type token at runtime?
===
Neal Gafter introduced [type tokens][1] (for example `Class<String>`). Assuming one has access to an instance of `Class<String>` at runtime, is it possible to retrieve the generic type (`String`) at runtime?
I am looking for something similar to [Method.getGenericReturnType()][2].
[1]: http://gafter.blogspot.nl/2006/12/super-type-tokens.html
[2]: http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Method.html#getGenericReturnType%28%29 | 0 | [
2,
25,
32,
938,
20,
11917,
14,
12733,
1001,
147,
26,
21,
1001,
20,
2853,
35,
485,
891,
60,
800,
3726,
3726,
13191,
489,
5162,
1277,
636,
4474,
20,
2853,
18,
500,
2558,
165,
500,
13,
5,
1106,
823,
13,
1,
1898,
1,
11130,
1,
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 to tag user in Facebook post using Graph API?
===
I did a research, and most of the topics are at least one year old. So, wondering is there a way to tag user in the Facebook wall post using Graph API?
Some relevant but not working solutions:
http://digitizor.com/2011/01/24/tag-user-facebook-graph/
FB documentation for the wallpost mentions message_tags field, which is "Objects tagged in the message (Users, Pages, etc)".
https://developers.facebook.com/docs/reference/api/post/
So is it possible somehow to add a tag in the wallpost to another user knowing its id?
Trying to implement this in the Rails application using Koala gem. | 0 | [
2,
184,
20,
3383,
4155,
19,
9090,
678,
568,
7210,
21,
2159,
60,
800,
3726,
3726,
31,
144,
21,
527,
15,
17,
127,
16,
14,
7569,
50,
35,
639,
53,
159,
315,
9,
86,
15,
5712,
25,
80,
21,
161,
20,
3383,
4155,
19,
14,
9090,
769,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
learning sites for fixing java memory leaks
===
What would be the best places to learn fixing a java memory leak ? I have been trying to find good resource over the NET but to my disappointment, I find toy examples being discussed. I am also able to troubleshoot small toy dumps but the real world application dumps are more challenging and give little clue.
I have tried tools like Jhat, JMap, VisualVM and MAT.
what would be the best place to learn about fixing Java memory leaks ? suggestion of a book is also welcome.
thanks in advance. | 0 | [
2,
2477,
3259,
26,
20047,
8247,
1912,
11724,
18,
800,
3726,
3726,
98,
83,
44,
14,
246,
1489,
20,
2484,
20047,
21,
8247,
1912,
11724,
13,
60,
31,
57,
74,
749,
20,
477,
254,
6577,
84,
14,
4275,
47,
20,
51,
10545,
15,
31,
477,
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... |
Weird issue with for...in loop
===
This works:
for (var i = 0; i < this.size(); i++) {
values.push(this.cards[i].value);
}
... but this doesn't:
for (var card in this.cards) {
values.push(card.value);
}
... wai? Stranger still, this:
for (var card in this.cards) {
values.push(card);
}
Returns the keys and not the objects. | 0 | [
2,
5455,
1513,
29,
26,
9,
9,
9,
108,
5293,
800,
3726,
3726,
48,
693,
45,
26,
13,
5,
3311,
31,
800,
713,
73,
31,
13,
1,
48,
9,
10454,
5,
6,
73,
31,
20512,
6,
13,
1,
4070,
9,
26973,
5,
1565,
9,
6648,
18,
2558,
49,
500,
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... |
MonoGame Samples not compiling on Mountain Lion
===
So I installed MonoFramework, MonoDevelop and MonoMac and downloaded the latest version of MonoGame. I tried compiling the samples but they all fail with the same error
Parsing error of #error Unknown platform
The problem seems to be that for some reason #if MONOMAC and #elif MONOMAC are being ignored.
If I remove the Windows, XBOX and Linux related code and get rid of the #if MONOMAC the code compiles and executes. Has there been a change and should I use something else instead of MONOMAC in my platform check (i tried with __APPLE__ and MAC but neither worked).
Thank you in advance. | 0 | [
2,
4129,
5128,
7855,
52,
24378,
27,
1286,
6023,
800,
3726,
3726,
86,
31,
4066,
4129,
8361,
3783,
15,
4129,
26051,
17,
4129,
6893,
17,
23887,
14,
5736,
615,
16,
4129,
5128,
9,
31,
794,
24378,
14,
7855,
47,
59,
65,
7476,
29,
14,
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... |
QML: How to animate integer (not real)
===
My problem is that I can't animate integer.
I am showing some result as integer number in Text element, like this:
Text
{
text: someResult
}
And I have defined behavior:
Behavior on text
{
NumberAnimation{ duration: 1000; easing.type: Easing.InOutQuad}
}
Problem is that animated text gets real numbers, and I want integers to be.
------------------------------
**Example**: previous value is 0, and I set new value as 2, this is how animation looks like:
0
0.01
0.05
0.1
0.156
0.36
...
1.81
1.95
2
But what I want to be is:
0
1
2
| 0 | [
2,
2593,
8184,
45,
184,
20,
14487,
591,
13820,
13,
5,
1270,
683,
6,
800,
3726,
3726,
51,
1448,
25,
30,
31,
92,
22,
38,
14487,
591,
13820,
9,
31,
589,
3187,
109,
829,
28,
13820,
234,
19,
1854,
4520,
15,
101,
48,
45,
1854,
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... |
Singleton instantiation
===
I have written code shown below
public class SiteMapFactory {
public static ISiteMap getSiteMap(Locale loc) {
ISiteMap returnMap = null;
if (loc.equals(Locale.US)) {
returnMap = SiteMap_en_US.getInstance();
}
if(loc.equals(new Locale("es","US"))){
returnMap = SiteMap_en_US.getInstance();
}
if(loc.equals(Locale.CANADA)){
returnMap = SiteMap_fr_CA.getInstance();
}
return returnMap;
}
}
I want to return the same site map for both en_US(English) and es_US(Spanish) of our website. so i am instantiating the US sitemap for both Spanish and English version (A third party vendor is converting our English pages to Spanish). The way the sitemap is instantiated is using SINGLETON. Below show the way we are creating the singleton object
public class SiteMap_en_US extends SiteMapTree {
private static SiteMap_en_US m_instance;
private SiteMap_en_US() {}
static{
m_instance = new SiteMap_en_US();
m_instance.init();
}
public static SiteMap_en_US getInstance(){
return m_instance;
}
@Override
protected void init() {
//some code
}
}
My Question is- i am creating the 2 instances of the same singleton object. Is is valid way of instantiating the singleton object?
| 0 | [
2,
345,
444,
6322,
49,
857,
800,
3726,
3726,
31,
57,
642,
1797,
1721,
1021,
317,
718,
689,
15022,
17455,
93,
13,
1,
317,
12038,
25,
2119,
15022,
164,
9097,
15022,
5,
15580,
62,
13,
10799,
6,
13,
1,
25,
2119,
15022,
788,
15022,
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... |
reducing SWT cross-platform jar size
===
I have made a cross-platform SWT jar using the clear explanation I found on: http://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application
Still, this requires me to pack the jars of every platform in order to make it system independent, making the total size of the jar around 40MB. This is somewhat crazy for a project that does some parsing.
I have tried using ProGuard to reduce the file size, but this was not very useful. Can I conclude from this that it is in principle not possible to create small cross-platform applications using SWT? | 0 | [
2,
7974,
8783,
38,
919,
8,
27035,
5112,
1072,
800,
3726,
3726,
31,
57,
117,
21,
919,
8,
27035,
8783,
38,
5112,
568,
14,
1207,
5764,
31,
216,
27,
45,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
13710,
3698,
2287,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rspec fails when let(:base_title) added while refactoring
===
I am following Ruby on rails tutorial by Michael Hartl.
Refactoring a simple test using rspec is failing it, I will paste first what works, then i will paste what works ....
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the h1 'Sample App'" do
visit '/static_pages/home'
page.should have_selector('h1', :text => 'Sample App')
end
it "should have the title 'Home'" do
visit '/static_pages/home'
page.should have_selector('title',
:text => "Ruby on Rails Tutorial Sample App | Home")
end
end
describe "Help page" do
it "should have the h1 'Help'" do
visit '/static_pages/help'
page.should have_selector('h1', :text => 'Help')
end
it "should have the title 'Help'" do
visit '/static_pages/help'
page.should have_selector('title',
:text => "Ruby on Rails Tutorial Sample App | Help")
end
end
end
**Now I will paste what fails in rspec**
equire 'spec_helper'
describe "Static pages" do
let(:base_title) { "Ruby on Rails Tutorial Sample App |" }
describe "Home page" do
it "should have the h1 'Sample App'" do
visit '/static_pages/home'
page.should have_selector('h1', :text => 'Sample App')
end
it "should have the title 'Home'" do
visit '/static_pages/home'
page.should have_selector('title', :text => "#{base_title} Home")
end
end
describe "Help page" do
it "should have the h1 'Help'" do
visit '/static_pages/help'
page.should have_selector('h1', :text => 'Help')
end
it "should have the title 'Help'" do
visit '/static_pages/help'
page.should have_selector('title', :text => "#{base_title} Help")
end
end
end
Also i am new to this so i would like to ask what more information might be required ... the change is obviously
let(:base_title) { "Ruby on Rails Tutorial Sample App |" }
Thanks for any help !
Failing error being ....
Failures:
1) Static pages Home page should have the title 'Home'
Failure/Error: page.should have_selector('title', :text => "#base_title} Home")
expected css "title" with text "#base_title} Home" to return something
# ./spec/requests/static_pages_spec.rb:16:in `block (3 levels) in <top (required)>'
2) Static pages Help page should have the title 'Help'
Failure/Error: page.should have_selector('title', :text => "#{base_title} Help")
expected css "title" with text "Ruby on Rails Tutorial Sample App | Help" to return something
# ./spec/requests/static_pages_spec.rb:29:in `block (3 levels) in <top (required)>' | 0 | [
2,
13,
1224,
12610,
13614,
76,
408,
5,
45,
8436,
1,
22235,
6,
905,
133,
302,
17455,
68,
800,
3726,
3726,
31,
589,
249,
10811,
27,
2240,
18,
29724,
34,
832,
4316,
255,
9,
302,
17455,
68,
21,
1935,
1289,
568,
13,
1224,
12610,
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... |
Adjusting contrast of Image from Byte Array of the image
===
Can I change the contrast of an image from the byte stream of the Image? I have done necessary to do copying the image and I need to add the change contrast part to the code.
Any idea how to do this? Or is it even possible?
package make.image.bw;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
public class MakeImageBWActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main); // set screen view
String imageInSD = Environment.getExternalStorageDirectory().getAbsolutePath() +"/earthglobe.jpg";
RandomAccessFile file = null;
try {
file = new RandomAccessFile(imageInSD, "r");
} catch (FileNotFoundException e1) {
e1.printStackTrace();
}
File myFile = new File(Environment.getExternalStorageDirectory(), "latestearth.jpg");
byte[] buffer = new byte[1024];
try {
FileOutputStream out = new FileOutputStream(myFile);
while(file.read(buffer)!=-1){
out.write(buffer,0,1024);
}
out.close();
} catch (IOException e) {
e.printStackTrace();
}
Log.d("tag", "finished");
finish();
}
}
Thanking You in advance for your valuable suggestions. | 0 | [
2,
22209,
3710,
16,
1961,
37,
34,
591,
7718,
16,
14,
1961,
800,
3726,
3726,
92,
31,
753,
14,
3710,
16,
40,
1961,
37,
14,
34,
591,
3766,
16,
14,
1961,
60,
31,
57,
677,
2378,
20,
107,
4344,
68,
14,
1961,
17,
31,
376,
20,
3547,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 change the icon of the PrintPreview dialog in MsChart?
===
I'm using C# 4.0 and MsCharts within Visual Studio 2010. When I execute
MyPlotChart.Printing.PrintPreview();
(See http://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting.printingmanager.printpreview ) It works as intended, but the Print Preview dialog shows the default icon. Is there a way to use my own icon, please? Like what I would do with PrintPreviewDialog.Icon (see http://msdn.microsoft.com/en-us/library/system.windows.forms.printpreviewdialog.icon.aspx )
Thanks. | 0 | [
2,
25,
80,
21,
161,
20,
753,
14,
9801,
16,
14,
4793,
3515,
4725,
28223,
19,
4235,
5433,
38,
60,
800,
3726,
3726,
31,
22,
79,
568,
272,
5910,
268,
9,
387,
17,
307,
2992,
13448,
363,
3458,
1120,
498,
9,
76,
31,
15644,
51,
13221,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio ASP.NET unknown user name or bad password
===
I am trying to debug an asp.net website on a remote IIS server.
When I debug the project, I get an error, unknown user name or bad password.
After sniffing with wireshark, he is using a username that doesn't exist on my machine !?
Where can you select which user he uses to do the remote debugging?
Thank you
Steven | 0 | [
2,
3458,
1120,
28,
306,
9,
2328,
2562,
4155,
204,
54,
896,
20884,
800,
3726,
3726,
31,
589,
749,
20,
121,
16254,
40,
28,
306,
9,
2328,
2271,
27,
21,
5388,
595,
18,
8128,
9,
76,
31,
121,
16254,
14,
669,
15,
31,
164,
40,
7019,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
sharepoint 2010 out of box save event
===
There is a newform.aspx in which i added kwizcom(third party tool) rules for validating page. When i click on submit, kwizcom rules are validated, onsuccess data gets saved.
I have a requirement where i have to show modal dialog on click of save button in which i should show all filled data of newform.aspx page. modal popup have submit and cancel buttons.
on click of submit button of modal popup, modal popup should be closed, data of newform.aspx should be saved and on click of cancel button of modal popup data should not change.
This should be done through ootb features of sharepoint 2010.
Question: How do i check whether page has succeeded all rules(validation are done or not). if validations are not succeeded then i should not show modal popup else i should show modal popup and on submit of modal popup data should be saved. The below is save onclick event.
if (!PreSaveItem()) return false;
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$m$g_5d669d43_5ef2_4707_9f8b_4af997d6f3f7$ctl00$toolBarTbl$RightRptControls$SaveButton2$ctl00$diidIOSaveItem", "", true, "", "", false, true))
how to find whether page succeeded all validation and to show modal popup.
please do the needful.
| 0 | [
2,
1891,
3132,
498,
70,
16,
1649,
2079,
807,
800,
3726,
3726,
80,
25,
21,
78,
4190,
9,
472,
306,
396,
19,
56,
31,
905,
3510,
3186,
960,
5,
8932,
346,
5607,
6,
1761,
26,
7394,
1880,
2478,
9,
76,
31,
10840,
27,
12298,
15,
3510,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Validation for radio button
===
I have two radio button for agree and for disagree
I need to force user to choose I Agree
For that I write the validation
<input type="radio" id="ia" name="dc" value="true">I Agree
<input type="radio" id="id" name="dc" checked="checked" value="false">I Disagree
jQuery("#frm_ads").validate({
rules: {
dc: {required: function(element) {
return $('input[name="dc"]:checked').val() == 'true';
}}
But this validation is not working .
If any one have solution then please help me .
Thanks | 0 | [
2,
487,
8190,
93,
27999,
26,
603,
5167,
800,
3726,
3726,
31,
57,
81,
603,
5167,
26,
4524,
17,
26,
18276,
31,
376,
20,
558,
4155,
20,
3538,
31,
4524,
26,
30,
31,
2757,
14,
27999,
13,
1,
108,
4881,
1001,
3726,
7,
11129,
7,
4924,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Symfony 2 Dependency Injection & autowiring
===
I'm browsing the [Symfony 2 docs][1] related to [Dependency Injection][2], and can't find a reference to autowiring. I found a [bundle that offers some of this functionality][3], but it's still in beta and seems to be tied to annotations (correct me if I'm wrong).
What I'm looking for is an object (such as the service container), that could inject dependencies in my services, via setter injection.
For example, I would define a Service:
<!-- language-all: lang-php -->
class Service {
/**
* @var \PDO
*/
protected $pdo;
/**
* @param \PDO $pdo
* @Inject
*/
public function setPDO(\PDO $pdo) {
$this->pdo = $pdo;
}
}
And then, I could use this hypothetical service container to inject dependencies in the Service, even if this one has been created outside the container:
$service = new Service();
// ...
$container->inject($service);
Is there a DI container that could autowire dependencies this way?
[1]: http://symfony.com/doc/current/book/service_container.html
[2]: http://symfony.com/doc/current/components/dependency_injection/introduction.html
[3]: http://autowiring-bundle.info/ | 0 | [
2,
13,
7261,
10229,
93,
172,
26835,
13646,
279,
3108,
3976,
2090,
800,
3726,
3726,
31,
22,
79,
10175,
68,
14,
636,
7261,
10229,
93,
172,
9765,
18,
500,
2558,
165,
500,
1597,
20,
636,
19038,
8883,
13646,
500,
2558,
135,
500,
15,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
parsing a string in C++ with out using Boost
===
const char* mystring;
In above variable I will receive value as "ABC1234" or "abc1234" I should parse the string and get value 1234 (i.e., after characters). How to do this efficiently in C++?
I am not supposed to use Boost.
Thanks for your time | 1 | [
2,
2017,
18,
68,
21,
3724,
19,
272,
20512,
29,
70,
568,
10419,
800,
3726,
3726,
11608,
38,
4892,
2483,
51,
11130,
73,
19,
784,
7612,
31,
129,
2588,
1923,
28,
13,
7,
21880,
918,
3965,
7,
54,
13,
7,
21880,
918,
3965,
7,
31,
378,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Fragment : bug fix explanation
===
I'm starting using Fragments, and I've done like the API guide but ... of course it'd be too easy ;)
When I launch the app, it crashes. After some research I've found this post http://stackoverflow.com/questions/8662720/android-fragment-is-not-working
and the response of Stephen Wylie seems to correct the things for Ali, but .. I don't get it !
Where should I put the FrameLayout ? The "where_i_want_my_fragment" id... it's whatever I want, right ?
and finally where should I put the Java code ? in my activity (which is displaying 2 fragments by the way) .
Thanks !
Nico | 0 | [
2,
13005,
14847,
13,
45,
6256,
6098,
5764,
800,
3726,
3726,
31,
22,
79,
1422,
568,
10837,
15,
17,
31,
22,
195,
677,
101,
14,
21,
2159,
3378,
47,
13,
9,
9,
9,
16,
674,
32,
22,
43,
44,
266,
2010,
13,
73,
6,
76,
31,
3394,
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... |
EF 4.3 Entity with many to many not loading collection property
===
I have an entity Roster that has a collection of players.
public class Roster
{
public Roster()
{
Players = new List<Player>();
}
public int RosterId { get; set; }
[MaxLength(100)]
[Required]
public string RosterName { get; set; }
public ICollection<Player> Players { get; set; }
}
public class Player
{
public int PlayerId { get; set; }
[MaxLength(100)]
[Required]
public string PlayerName { get; set; }
public virtual ICollection<Roster> Rosters { get; set; }
}
I have defined the relationship using the fluent api
// many to many Roster - Players
modelBuilder.Entity<Roster>()
.HasMany(t => t.Players)
.WithMany(t=>t.Rosters)
.Map(m =>
{
m.ToTable("RosterPlayers");
m.MapLeftKey("RosterId");
m.MapRightKey("PlayerId");
});
I can save a player to a roster like this
var roster = rosterRepository.GetById(rosterId);
var player = playerRepository.GetById(playerId);
roster.Players.Add(player);
rosterRepository.Update(roster);
...
However, when I retrieve the roster, the players collection is not loaded. I verified the data exists with all the proper values and the following sql does yeild data.
SELECT * from Rosters r
INNER JOIN RosterPlayers rp on r.RosterId = rp.RosterId
INNER JOIN Players p ON p.PlayerId = rp.PlayerId
What am I missing? | 0 | [
2,
11599,
268,
9,
240,
9252,
29,
151,
20,
151,
52,
12797,
1206,
1354,
800,
3726,
3726,
31,
57,
40,
9252,
8699,
30,
63,
21,
1206,
16,
1007,
9,
317,
718,
8699,
13,
1,
317,
8699,
5,
6,
13,
1,
1007,
800,
78,
968,
1,
14049,
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... |
Elements hidden with overflow still accessible on android
===
I have a Facebook-comments widget contained within a parent div witch cuts it of vertically using overflow hidden. I have set it up in that manner so that I can start out showing only part of the content and then expand the parent container with jQuery.
This works great on every major browser (inculding safari for iPhone), however in Android (tested on Android 4.0, not sure on browser version) content outside the overflowed div, while still not being visible, is accessible. User can click links they cannot see, clearly an unwanted behavior.
My HTML:
<div class="pageBlock column5050 column2">
<div style="" class="ext_container">
<div data-mobile="false" data-width="" data-num-posts="10" data-href="http://na.se/redesign2012/kundcenter" class="fb-comments fb_iframe_widget">
<span style="height: 1049px; width: 550px;">
<iframe scrolling="no" id="fcb3ba7898c46" name="f169222f1ff27fe" style="border: medium none; overflow: hidden; height: 1049px; width: 550px;" class="fb_ltr " src="https://www.facebook.com/plugins/comments.php?api_key=113851685335230&channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D8%23cb%3Df12db7f9bc71f98%26origin%3Dhttp%253A%252F%252Fna.se%252Ffb9561675e1892%26domain%3Dna.se%26relation%3Dparent.parent&href=http%3A%2F%2Fna.se%2Fredesign2012%2Fkundcenter&locale=sv_SE&mobile=false&numposts=10&sdk=joey&width=550"></iframe>
</span>
</div>
</div>
<div class="fb_expand_btn expand_btn">
<span class="expand_capt">Visa fler...</span>
</div>
<script type="text/javascript">
[...]js/jQuery to expand/contract "ext_container"[..]
</script>
</div>
Everything inside "ext_container" is generated by the facebook comments widget and I have limited control over the HTML since I'm using a third party CMS.
I use the following CSS
.fb-comments {
width: 100% !important;
}
.fb-comments span, .fb-comments iframe {
width: 100% !important;
}
.ext_container {
position: relative;
height: 440px;
overflow: hidden;
margin: 0 20px 20px;
}
.fb_expand_btn.expand_btn {
margin: 0 20px;
}
My script alters the ext_container height only.
I set ext_container to position:relative because of a IE7 bug where it would ignore my overflow:hidden.
Finally, the 100% width are there because a have a fully fluid layout.
Anyway, I've tried to find any reference to the behavior described above but to n avail, would really appreciate if someone have come across this and have a solution. | 0 | [
2,
2065,
3689,
29,
20285,
174,
7342,
27,
13005,
800,
3726,
3726,
31,
57,
21,
9090,
8,
960,
6601,
4807,
43,
3060,
3437,
363,
21,
4766,
13,
12916,
5722,
7960,
32,
16,
23300,
568,
20285,
3689,
9,
31,
57,
309,
32,
71,
19,
30,
3832,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Download Corrupt File Rewritten File Content
===
Another problem with PHP force download. It was working and then i did something and now its not.
Here we go (there are if statements for each file type I accept but just showing one should be enough to help diagnose the problem):
$string1 = 'home/myhost/aboveroot/reviews/';
$string2 = $username;
$string3 = '/';
$string4 = $filename;
$file= $string1.$string2.$string3.$string4;
$ext = strtolower (end(explode('.', $filename)));
//Finding MIME type
if ($ext = pdf){
header("Content-disposition: attachment; filename= '$filename'");
header('Content-type: application/pdf');
readfile('$file');
What ends up happening is that it forces a file download with the correct file name and of the correct extension. It doesn't trigger a corrupt file error of any sort. However, when I open the file the content is missing. If its a word document it will refuse to open. If its a text document the **text will be changed to a bunch of php errors as follows:**
<br />
<b>Warning</b>: readfile($file) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/home/myhost/public_html/wwww.mydomain.com/pagethatforceddownload.php</b> on line <b>68</b><br />
<br />
Then it gives this error for each line with a header (even those contained in if clauses that should not be meeting their conditions:
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/myhost/public_html/wwww.mydomain.com/pagethatforceddownload.php:68) in <b>/home/myhost/public_html/wwww.mydomain.com/pagethatforceddownload.php</b> on line <b>69</b><br />
<br />
I'm really lost. Any help would be greatly appreciated. I finally get everything on my site working and BAM, I realize that im having this huge mess of a problem.
| 0 | [
2,
558,
7121,
11305,
3893,
302,
6390,
3893,
2331,
800,
3726,
3726,
226,
1448,
29,
13,
26120,
558,
7121,
9,
32,
23,
638,
17,
94,
31,
144,
301,
17,
130,
82,
52,
9,
235,
95,
162,
13,
5,
1887,
50,
100,
9015,
26,
206,
3893,
1001,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reading Multi-Level XML files in Java
===
Until recently, the tag-structure of my XML files were fairly simple, and I have been able to parse them easily. But now I have an 'extra level' of tags within tags, and I haven't been able to solve the problem.
Here is an example of my new XML files (in structure, I've changed the names of the tags to make it easier to understand):
<SchoolRoster>
<Student>
<name>John</name>
<age>14</age>
<course>
<math>A</math>
<english>B</english>
</course>
<course>
<government>A+</government>
</course>
</Student>
<Student>
<name>Tom</name>
<age>13</age>
<course>
<gym>A</gym>
<geography>incomplete</geography>
</course>
</Student>
</SchoolRoster>
The important features of the XML above is that I can have multiple "course" attributes, and inside that I can have arbitrarily named tags as their children. And there can be any number of these children, which I want to read into a HashMap of "name", "value".
public static TreeMap getAllSchoolRosterInformation(String fileName) {
TreeMap SchoolRoster = new TreeMap();
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
File file = new File(fileName);
if (file.exists()) {
Document doc = db.parse(file);
Element docEle = doc.getDocumentElement();
NodeList studentList = docEle.getElementsByTagName("Student");
if (studentList != null && studentList.getLength() > 0) {
for (int i = 0; i < studentList.getLength(); i++) {
Student aStudent = new Student();
Node node = studentList.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element e = (Element) node;
NodeList nodeList = e.getElementsByTagName("name");
aStudent.setName(nodeList.item(0).getChildNodes().item(0).getNodeValue());
nodeList = e.getElementsByTagName("age");
aStudent.setAge(Integer.parseInt(nodeList.item(0).getChildNodes().item(0).getNodeValue()));
nodeList = e.getElementsByTagName("course");
if (nodeList != null && nodeList.getLength() > 0) {
Course[] courses = new Course[nodeList.getLength()];
for (int j = 0; j < nodeList.getLength(); j++) {
Course singleCourse = new Course();
HashMap classGrades = new HashMap();
NodeList CourseNodeList = nodeList.item(j).getChildNodes();
for (int k = 0; k < CourseNodeList.getLength(); k++) {
if (CourseNodeList.item(k).getNodeType() == Node.ELEMENT_NODE && CourseNodeList != null) {
classGrades.put(CourseNodeList.item(k).getNodeName(), CourseNodeList.item(k).getNodeValue());
}
}
singleCourse.setRewards(classGrades);
Courses[j] = singleCourse;
}
aStudent.setCourses(Courses);
}
}
SchoolRoster.put(aStudent.getName(), aStudent);
}
}
} else {
System.exit(1);
}
} catch (Exception e) {
System.out.println(e);
}
return SchoolRoster;
}
The problem I'm running in to is that instead of getting that the student got an "A" in "math", they get a null in "math". (If this post is too long, I can try to find some way of shortening it.) | 0 | [
2,
1876,
1889,
8,
3906,
23504,
6488,
19,
8247,
800,
3726,
3726,
163,
1989,
15,
14,
3383,
8,
13971,
16,
51,
23504,
6488,
46,
6647,
1935,
15,
17,
31,
57,
74,
777,
20,
2017,
870,
105,
2351,
9,
47,
130,
31,
57,
40,
13,
22,
23631,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Retrieve all the values from listview in a button click event in asp.net
===
I tried to retrive the all the data from the listview in asp.net.
Actually, I have two listview i drag and drop row from one listview to another listview using
Jquery
<script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
// drag nd drop
$(function () {
$("#list3, #list4").sortable({
connectWith: ".conn"
}).disableSelection();
});
that is working fine for me.
what should i want is to retrive all the value of listview on a single button Click.
I have listview1 like this
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="100%">
<div id="l1" style="width: 100%; height: 171px; overflow: auto;">
<asp:ListView ID="lstvRCGroupSource" runat="server" ViewStateMode="Disabled">
<LayoutTemplate>
<ul id="list3" class="conn" style="width: 100%; height: 171px;">
<asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li class="add" id="l3">
<table id="tbl" style="width: 100%;">
<tr class="mytr" style="width: 100%;">
<td class="mytd border2 borderlistview" style="width: 50%;">
<asp:Image ID="ProductImage" runat="server" ImageUrl='<%#Eval("EventImage") %>' Height="20" />
</td>
<td class="weekid">
<%#Eval("WeekID")%>
</td>
<td class="promotedprice">
<%#Eval("PromotedPrice")%>
</td>
<td class="display">
<%#Eval("Display")%>
</td>
<td class="feature">
<%#Eval("Feature")%>
</td>
<td class="featuredisplay">
<%#Eval("FeatureDisplay")%>
</td>
<td class="tpronly">
<%#Eval("TPRonly")%>
</td>
</tr>
</table>
</li>
</ItemTemplate>
</asp:ListView>
</div>
</td>
</tr>
</table>
and listview 2 as like this
<table width="100%">
<tr>
<td width="100%">
<div id="l2" style="width: 100%; height: 171px; overflow: auto;">
<asp:ListView ID="lstvRCGroupTarget" runat="server">
<LayoutTemplate>
<ul id="list4" class="conn" style="width: 100%; height: 171px;">
<asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li class="add1">
<table style="width: 100%;">
<tr style="width: 100%;">
<td class="borderlistview" style="width: 50%;">
<%# Eval("EventImage")%>
</td>
<td>
<%#Eval("WeekID") %>
</td>
<td>
<%#Eval("PromotedPrice") %>
</td>
<td>
<%#Eval("Display") %>
</td>
<td>
<%#Eval("Feature") %>
</td>
<td>
<%#Eval("FeatureDisplay") %>
</td>
<td>
<%#Eval("TPRonly") %>
</td>
</tr>
</table>
</ItemTemplate>
</asp:ListView>
</div>
</td>
</tr>
</table>
and also I tried to retrive the data with jquery, but not works
function btnDone() {
alert("hai");
var values = '';
$("#lstvRCGroupTarget li.add table .mytr .weekid").each(function () {
values = $.trim($(this).html() + '|' + values);
alert(values);
});
document.getElementById("hdnWeekID").value = values;
I tried the for one day but i cann't retrive the data of listview either in javascript nor in asp.net code behind.
please anyone give the right solution for me. | 0 | [
2,
11917,
65,
14,
4070,
37,
968,
4725,
19,
21,
5167,
10840,
807,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
794,
20,
302,
3367,
195,
14,
65,
14,
1054,
37,
14,
968,
4725,
19,
28,
306,
9,
2328,
9,
1121,
15,
31,
57,
81,
968,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Secondary menu header as parent page title
===
My secondary menu is set to be the second level of the main menu. How would I be able to make it so that secondary menu header as parent page title?
This is the code I'm using to print out the secondary menu:
<?php print theme('links__system_secondary_menu', array(
'links' => $secondary_menu,
'attributes' => array(
'id' => 'secondary-menu-links',
'class' => array('links', 'inline', 'clearfix'),
),
'heading' => array(
'text' => t('Secondary menu'),
'level' => 'h2',
'class' => array(),
),
)); ?>
As you can see it is currently being defined by `'text' => t('Secondary menu'),` Is this possible?
Thanks. | 0 | [
2,
2277,
11379,
157,
106,
28,
4766,
2478,
581,
800,
3726,
3726,
51,
2277,
11379,
25,
309,
20,
44,
14,
153,
662,
16,
14,
407,
11379,
9,
184,
83,
31,
44,
777,
20,
233,
32,
86,
30,
2277,
11379,
157,
106,
28,
4766,
2478,
581,
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... |
Php PDO mySQL - suitability for major expansion
===
Currently redeveloping booking systems for upcoming tour operator. Based on the booking procedures, payment and product guidelines the number of rows could exceed 10 million in 3 years with bookings referencing a product manifest that would be queried WHERE booking lDs match.
What considerations should be taken into account now to ensure fast query response of PDO prepared statements, in particular when performing JOINS to multiple tables in queries based on a single unified referencing ID.
Any detail you can provide would be extremely helpful. | 0 | [
2,
13,
26120,
351,
537,
51,
18,
22402,
13,
8,
2961,
4091,
26,
394,
3233,
800,
3726,
3726,
871,
302,
26051,
68,
360,
68,
1242,
26,
9078,
846,
6022,
9,
432,
27,
14,
360,
68,
8876,
15,
7582,
17,
2374,
12629,
14,
234,
16,
11295,
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... |
Apache CXF web services problems
===
I have a multi-module project using Maven. On one of the modules I have several web services developed using Apache CXF Framework 2.5.4. At the moment I have two "problems" or doubts.
First of all, if I call to a method of one of the web services that should return a List, if the list is empty, it returns "null" instead of the empty list.
I was trying to find out what could be the problem, if it's a bug of the CXF version I'm using or if I should use some annotation to modify the definition of the method or the response, but I couldn't find anything. I've seen some people with the same problem, but no solution.
The other thing I wanted to ask is: I'm developing a web application using MVC pattern. I'm wondering which way I should call the web service from the Controller instead of using ClasspathXmlCpplicationContext and then context.getBean(<name of the bean>).
For example, the bean definition for one of the web services on the client side is:
<jaxws:client id="deviceWSClient"
serviceClass="..IDeviceWebService"
address="http://localhost:8080/../DeviceWS" />
I've already tried usin @Autowired or @WebServiceRef annotations. With these it works but not doing a HTTP request to the web service, I guess it gets the dependency from the local repository. I think what I need is the way of injecting this bean on the Controller. | 0 | [
2,
17140,
272,
396,
410,
2741,
687,
1716,
800,
3726,
3726,
31,
57,
21,
1889,
8,
19673,
62,
669,
568,
1216,
3124,
9,
27,
53,
16,
14,
17113,
31,
57,
238,
2741,
687,
885,
568,
17140,
272,
396,
410,
6596,
172,
9,
264,
9,
300,
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... |
scrolling in firefox in my website is not normal
===
After designed my new website and using a lot of javascript code
i'm bind an event to scroll and run some function with scroll number
but in firefox ( specially with firebug Addon ) scrolling my website is not too smooth and some of my friend tell me that scrolling not work in middle of page
this is my website
[http://silverboy.ir][1]
[1]: http://silverboy.ir
any one know what is the problem of page ? | 0 | [
2,
13,
28166,
19,
535,
18219,
19,
51,
2271,
25,
52,
1826,
800,
3726,
3726,
75,
1006,
51,
78,
2271,
17,
568,
21,
865,
16,
8247,
8741,
1797,
31,
22,
79,
10193,
40,
807,
20,
12159,
17,
485,
109,
1990,
29,
12159,
234,
47,
19,
535,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Stroke Width Transformation (SWT) using Liuliu
===
I'm using https://github.com/liuliu/ccv for text detection in business cards. The problem is that the recall is low and a good amount of text in the business cards is missed - sometimes partially and at times completely. Can anyone suggest values for the parameters in the file `swtdetect.c` that could give high recall? I can compromise on the precision. | 0 | [
2,
7080,
9456,
6978,
13,
5,
18,
499,
38,
6,
568,
7482,
1210,
291,
800,
3726,
3726,
31,
22,
79,
568,
7775,
18,
6903,
10404,
20926,
9,
960,
118,
1210,
6243,
291,
118,
3384,
710,
26,
1854,
11643,
19,
508,
4092,
9,
14,
1448,
25,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Wake-on-LAN over the Internet connection using C++
===
I'm coding using C++ WinAPIs for Windows and I was wondering if it's possible to implement the Wake-On-LAN functionality for a client computer (running Windows 7) via an Internet connection and not just LAN? | 0 | [
2,
3290,
8,
218,
8,
1804,
84,
14,
2620,
2760,
568,
272,
20512,
800,
3726,
3726,
31,
22,
79,
13,
15458,
568,
272,
20512,
628,
58,
8954,
26,
1936,
17,
31,
23,
5712,
100,
32,
22,
18,
938,
20,
8713,
14,
3290,
8,
218,
8,
1804,
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... |
Netty two-way and n-client UDP
===
I am trying to write an application which will run in many machines, and these machines will communicate with each other through sending a stream of UDP packets. Usually one machine will be sending many packets to another machine, until they switch and another one will do the same to another machine and so forth. Choosing UDP is due to the nature of the application (real-time/speed more important than reliability). I also understand that UDP is a connectionless protocol.
By doing a quick prototype, I managed to create a NIO Datagram Server (bind), and a NIO Datagram Client (connect). However, I realized that I can only send one way only from the client to the server (or maybe I am missing something?). I couldn't send in the opposite direction.
Also, since UDP is a connectionless protocol, I thought that it was supposed to accept many clients sending packets to it (n-client to one server), and the other way around (server sending to clients one-by-one or multi/broad-cast).
Should I create a server in the client listening to a different port to acheive two-way? Can n-client send packets to one server at the same time?
I just want someone to clear this thing to me. No need for sample code (although it will be greatly appreciated), you can give me some pointers.
Thank you. | 0 | [
2,
4275,
1084,
81,
8,
1443,
17,
13,
103,
8,
150,
18513,
38,
287,
7431,
800,
3726,
3726,
31,
589,
749,
20,
2757,
40,
3010,
56,
129,
485,
19,
151,
6035,
15,
17,
158,
6035,
129,
8709,
29,
206,
89,
120,
4907,
21,
3766,
16,
287,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
password protect directory but still allow use on main page
===
I'm trying to move an image to a tmp directory on the server side and then send it to the client from the tmp folder, but things aren't quite working. Here's what I currently have.
$imgdirectory = "../" . $ms . "msimages/" . $img_filename; //this is where the image resides permanently
$content = file_get_contents($imgdirectory); //here I'm trying to get the contents of the img from its permanent location
file_put_contents('/tmp/img.jpg', $content); //here I'm trying to create a new temporary file
...
echo "img {background:url(\"/tmp/img.jpg\")-" . $xleft . "px -" . $ytop . "px";}"; this is the css trying to use file that is supposed to be in the temp folder
and here's the css output I get when the page loads
img#{width:631px;height:453px;background:url("/tmp/img.jpg")-144px -112px;}
But unfortunately, there is no file at `/tmp/img.jpg` so something must not quite be working with the `file_put_contents` `404 image not found`
btw, I'm not getting any errors about permissions to `put contents` in /tmp,
Any advice is appreciated.
| 0 | [
2,
20884,
2196,
16755,
47,
174,
1655,
275,
27,
407,
2478,
800,
3726,
3726,
31,
22,
79,
749,
20,
780,
40,
1961,
20,
21,
13,
38,
2554,
16755,
27,
14,
8128,
270,
17,
94,
2660,
32,
20,
14,
6819,
37,
14,
13,
38,
2554,
19294,
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... |
Validating a choice field against an array Symfony2
===
I am building a form class in Symfony2. In my class, I have a choice field. I built a function to return my choice array:
public function getCardTypes() {
return array('visa' => 'Visa', 'mc' => 'MasterCard', 'amex' => 'American Express');
}
Later, I add a choice field to my form with this array:
$builder->add('PaymentCCType', 'choice', array('choices' => $this->getCardTypes()));
And then in getDefaultOptions function I have a choice constraint for this field:
'PaymentCCType' => new Choice(array('choices' => $this->getCardTypes())),
I seem to be having a problem with this validator. When I submit this form, I get the following error underneath my select box: "The value you selected is not a valid choice". Of course, I am using one of the choices in my array.
What am I doing wrong?
| 0 | [
2,
7394,
1880,
21,
1837,
575,
149,
40,
7718,
13,
7261,
10229,
93,
135,
800,
3726,
3726,
31,
589,
353,
21,
505,
718,
19,
13,
7261,
10229,
93,
135,
9,
19,
51,
718,
15,
31,
57,
21,
1837,
575,
9,
31,
392,
21,
1990,
20,
788,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which security packages exists for Smalltalk?
===
I'm looking for a package in any Smalltalk dialect that provides me to provide several security features for my system. For example: To manage failed logins, brute force attacks, user/password organization, ACL's, check points, etc. It could be based in roles or capabilities. If you could share your experience with the library it will be even better to gain some additional insight.
| 0 | [
2,
56,
1221,
16875,
5636,
26,
284,
9718,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
6030,
19,
186,
284,
9718,
8069,
30,
1927,
55,
20,
1181,
238,
1221,
967,
26,
51,
329,
9,
26,
823,
45,
20,
4705,
1702,
2205,
17040,
15,
27066... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
neo4j creating a graph database
===
package com;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.kernel.EmbeddedGraphDatabase;
import org.neo4j.graphdb.Transaction;
public class hotspots {
public static enum RelTypes implements RelationshipType
{
PERSON
}
public static void main(String[] args) {
GraphDatabaseService graphdb = new EmbeddedGraphDatabase("target/dbnew");
Transaction tx = graphdb.beginTx();
try{
Node n1 = graphdb.createNode();
Node n2 = graphdb.createNode();
n1.setProperty("name","Melwin");
n2.setProperty("name","Louis");
Relationship rel1 = graphdb.getReferenceNode().createRelationshipTo( n1, RelTypes.PERSON );
Relationship rel2 = graphdb.getReferenceNode().createRelationshipTo( n2, RelTypes.PERSON );
tx.success();
}
catch (Exception e) {
tx.failure();
}
finally{
tx.finish();
}
graphdb.shutdown();
System.out.println("Success");
}
}
this is a small database tat i created...and i view it in neoclipse...each time i run this code and view it in neoclipse...i get double the nodes n relationships...i.e. i get two more nodes with d same name & relationship.....
i'm workin on an important project and need help asap...
so guys plz help me!!! | 0 | [
2,
4368,
300,
728,
2936,
21,
7210,
6018,
800,
3726,
3726,
6030,
13,
960,
73,
9010,
13,
5583,
9,
556,
111,
300,
728,
9,
9614,
9007,
9,
9614,
18768,
8436,
11449,
73,
9010,
13,
5583,
9,
556,
111,
300,
728,
9,
9614,
9007,
9,
251,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Metaprogramming in Ruby
===
can anyone explain me how does following code works and more importantly, why does it work so?
class Example
def one
def one
@value = 99
end
puts "Expensive Call"
@value = 99 # assume its expensive call
end
end
ex = Example.new
puts ex.one # => "Expensive Call"; 99
puts ex.one # => 99
Here, on first call to method `one`, ruby executes the outer `one` method, but on successive calls, it executes only the inner `one` method, bypassing the outer `one` method totally.
I want to know how does it happen and why does it happen so. | 0 | [
2,
7618,
19746,
3863,
19,
10811,
800,
3726,
3726,
92,
1276,
3271,
55,
184,
630,
249,
1797,
693,
17,
91,
16922,
15,
483,
630,
32,
170,
86,
60,
718,
823,
6312,
53,
6312,
53,
13,
1,
15165,
800,
7787,
241,
11179,
13,
7,
6899,
3474,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 access frames using HttpWebRequest
===
I am trying to access information on a website that uses frames. When I try to access the site I get the website source, but I also get the `This page uses frames, but your browser doesn't support them.` I would've assumed that I needed to leave this page open though in order to access the frames. So what I've done is create a new object to make a request to the page with the frames. However, that returns a page that redirects to an error.
My question is if it's possible to get the frame information using HttpWebRequest and is there a tutorial or an example online? | 0 | [
2,
184,
20,
1381,
12809,
568,
7775,
458,
3692,
10351,
800,
3726,
3726,
31,
589,
749,
20,
1381,
676,
27,
21,
2271,
30,
2027,
12809,
9,
76,
31,
1131,
20,
1381,
14,
689,
31,
164,
14,
2271,
1267,
15,
47,
31,
67,
164,
14,
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... |
Symfony + PHP not working
===
I am trying to create a website with Symfony 2.0 and I am running into an issue where I see `extend("...") ?>` from `<?php $this->extend("...") ?>`.
The site is viewable at http://symfony.toxic-productions.com/install/web/poshpaws/hello.
The code for the controller:
<?php
namespace Acme\HelloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HelloController extends Controller
{
public function indexAction($name)
{
//return $this->render('AcmeHelloBundle:Hello:index.html.twig', array('name' => $name));
// render a PHP template instead
return $this->render('AcmeHelloBundle:Hello:index.html.php', array('name' => $name));
}
}
?>
The code for the frontend page (index.html.php)
<html>
<head>
<title>Poshpaws</title>
<?php
$view->extend('::base.html.php');
echo($head);
?>
</head>
<body>
<?php echo($body); ?>
<h1>This is just a page to say: Hello <?php echo $view->escape($name) ?>!</h1>
</body>
</html> | 0 | [
2,
13,
7261,
10229,
93,
2754,
13,
26120,
52,
638,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
2271,
29,
13,
7261,
10229,
93,
172,
9,
387,
17,
31,
589,
946,
77,
40,
1513,
113,
31,
196,
13,
1,
1706,
1316,
43,
5,
7,
9,
9,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the differences between application server and http server?
===
We can add "container" to "http server". So, What's the difference between application server and http server & servlet container?
Geronimo,GlassFish,JBoss are an AS. What's Tomcat? | 4 | [
2,
98,
22,
18,
14,
4921,
128,
3010,
8128,
17,
7775,
8128,
60,
800,
3726,
3726,
95,
92,
3547,
13,
7,
1126,
5851,
106,
7,
20,
13,
7,
21127,
8128,
7,
9,
86,
15,
98,
22,
18,
14,
2841,
128,
3010,
8128,
17,
7775,
8128,
279,
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... |
When referencing foreign keys in entity framework, how to force query rather than foreach
===
My code is the following:
return PurchaseOrder.PurchaseOrderContent.Sum(x => x.CompanyProduct.WholesalePrice * x.QuantitySubmitted);
PurchaseOrderContent is a foreign key in PurchaseOrder. When I step over this code, I notice that Entity Framework is downloading each PurchaseOrderContent row, then downloading the CompanyProduct row individually and is doing the calculation in a foreach.
How can I force entity framework to generate a SQL query and just return the sum? WholesalePrice and QuantitySubmitted are columns in their respective tables. | 0 | [
2,
76,
13,
29254,
1228,
5534,
19,
9252,
6596,
15,
184,
20,
558,
25597,
864,
119,
26,
14322,
800,
3726,
3726,
51,
1797,
25,
14,
249,
45,
788,
3301,
7861,
9,
2051,
1651,
870,
7861,
25424,
9,
18,
723,
5,
396,
800,
1,
993,
9,
2835... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Blend Mode For iOS MKMapRect Overlay
===
I need to create a transparent overlay where both the overlay and the underlying map text are easily visible. A good solution looks to be to use the multiply blend mode. However setting the blend mode to kCGBlendModeMultiply in my drawMapRect method does nothing. Is this because the overlays and the map itself belong to different contexts? If so, are there any workarounds that allow me to change the blend mode of the overlay?
[This post](http://stackoverflow.com/questions/10785749/mkoverlayview-draw-something-with-blend-mode) seems to suggest that I can't do this without taking a screenshot of the map but I think there has to be an easier way.
Thanks. | 0 | [
2,
753,
11138,
3740,
26,
13,
7760,
10804,
540,
3515,
4812,
84,
4414,
800,
3726,
3726,
31,
376,
20,
1600,
21,
14862,
84,
4414,
113,
156,
14,
84,
4414,
17,
14,
10974,
2942,
1854,
50,
2351,
4560,
9,
21,
254,
4295,
1879,
20,
44,
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... |
AFNetworking POST Request Sending Blank Parameters to Server
===
I am trying to send a POST request to a server using AFNetworking, and everything seems to be working, i.e. the application is successfully pinging the server. However, the parameter values that it is sending are blank when it reaches the server even though after stepping through my code below using the debugger, the values appear to be being passed successfully. Any help on this would be greatly appreciated.
**APIClient.m**
#import "APIClient.h"
#import "AFJSONRequestOperation.h"
// Removed URL for privacy purposes.
static NSString * const kAPIBaseURLString = @"string goes here";
@implementation APIClient
+ (APIClient *)sharedClient {
static APIClient *_sharedClient;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_sharedClient = [[APIClient alloc] initWithBaseURL:[NSURL URLWithString:kAPIBaseURLString]];
});
return _sharedClient;
}
- (id)initWithBaseURL:(NSURL *)url {
self = [super initWithBaseURL:url];
if (self) {
[self registerHTTPOperationClass:[AFJSONRequestOperation class]];
// Accept HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
[self setDefaultHeader:@"Accept" value:@"application/json"];
}
return self;
}
@end
**Login Method in LoginBrain.m**
- (void)loginUsingEmail:(NSString *)email andPassword:(NSString *)password withBlock:(void (^)(NSDictionary *loginResults))block {
self.email = email;
self.password = password;
[[UloopAPIClient sharedClient] postPath:@"mobAuth.php" parameters:[NSDictionary dictionaryWithObjectsAndKeys:email, @"uname", password, @"pw", nil] success:^(AFHTTPRequestOperation *operation, id responseJSON) {
if (block) {
block(responseJSON);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
if (block) {
block(nil);
}
}];
// Store user data in app?
}
**Login Called Method in LoginViewController.m**
- (IBAction)loginPressed {
[self.loginProgressIndicator startAnimating];
NSString *email = self.emailTextField.text;
NSString *password = self.passwordTextField.text;
[self.brain loginUsingEmail:email andPassword:password withBlock:^(NSDictionary *loginResults) {
[self.loginProgressIndicator stopAnimating];
[self.delegate uloopLoginViewController:self didLoginUserWithEmail:email andPassword:password];
}];
} | 0 | [
2,
13,
2565,
24106,
68,
678,
3772,
4907,
6463,
12905,
20,
8128,
800,
3726,
3726,
31,
589,
749,
20,
2660,
21,
678,
3772,
20,
21,
8128,
568,
13,
2565,
24106,
68,
15,
17,
796,
2206,
20,
44,
638,
15,
31,
9,
62,
9,
14,
3010,
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 call multiple user variables - iPhone app
===
First off, I'm a noob at iPhone application development, so forgive me if I don't get it right away.
I have a simple question concerning how to call multiple variables in a sentence-style text with other words in between the variables.
I'm teaching myself iPhone application development, so I'm basing this code off the instructions by Apple entitled "Your First iOS App" and tweaking the code to learn it better.
The basic layout of the app is two text fields labeled "Name" and "Occupation". Below that is a text area (label) and a button for submitting the text field information. Once the user inputs and submits their Name and Occupation, the application should place those variables into the sentence: "Hello, my name is [Name], and I'm a [Occupation]." and display the sentence in the text area (label).
This is what I have so far:
- (IBAction)changeGreeting:(id)sender {
self.userName = self.textField.text;
NSString *nameString = self.userName;
if ([nameString length] == 0) {
nameString = @"Name";
}
NSString *greeting = [[NSString alloc] initWithFormat:@"Hello, my name is %@,", nameString];
self.label.text = greeting;
self.userOccupation = self.textField.text;
NSString *occupationString = self.userOccupation;
if ([occupationString length] == 0) {
occupationString = @"Occupation";
}
NSString *description = [[NSString alloc] initWithFormat:@" and I'm a %@.", occupationString];
self.label.text = description;
}
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == self.textField) {
[theTextField resignFirstResponder];
}
return YES;
}
@end
When running the app and submitting the name "John" and the occupation "developer", the output sentence does not include the "Hello, my name is John," output, only the "and I'm a developer."
How do I get and call the variables in such a way that each variable is displayed in its desired place in the sentence so that it reads "Hello, my name is John, and I'm a developer." in one interrupted sentence? | 0 | [
2,
184,
20,
645,
1886,
4155,
12157,
13,
8,
21024,
4865,
800,
3726,
3726,
64,
168,
15,
31,
22,
79,
21,
90,
4995,
35,
21024,
3010,
522,
15,
86,
8591,
55,
100,
31,
221,
22,
38,
164,
32,
193,
229,
9,
31,
57,
21,
1935,
1301,
6477... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why wont my List show in DataGridView
===
I dont understand why my list wont show up in DataGridView. If i remove the comment for dataGridView1.DataSource = actors.ToList(); it runs... But I need it to run when i press the button_click. What could be wrong?
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
LoadData();
}
public void LoadData()
{
List<Actor> actors = new List<Actor>
{
new Actor(){ PersonId = 1, ForNavn = "xxxx", EtterNavn = "bbbbb", Adresse = "Hhhhhh", PostNr = 37325, PostSted = "aaaa" },
new Actor(){ PersonId = 2, ForNavn = "ggggg", EtterNavn = "ddddd", Adresse = "Dssssss", PostNr = 37464, PostSted = "ssfff" },
};
//dataGridView1.DataSource = actors.ToList();
}
private void btnSok_Click(object sender, EventArgs e)
{
List<Actor> actors = new List<Actor>();
var query = from actor in actors
select actor;
dataGridView1.DataSource = query.ToList();
}
}
} | 0 | [
2,
483,
7290,
51,
968,
298,
19,
1054,
16375,
4725,
800,
3726,
3726,
31,
1049,
1369,
483,
51,
968,
7290,
298,
71,
19,
1054,
16375,
4725,
9,
100,
31,
4681,
14,
6484,
26,
1054,
16375,
4725,
165,
9,
18768,
12097,
800,
4977,
9,
262,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Address of person selected in person picker (ABPeoplePickerNavigationController) in a NSString
===
Showing a person picker with `ABPeoplePickerNavigationController`, I can get the address of the selected person in a dictionary with this:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {
if (property == kABPersonAddressProperty) {
ABMultiValueRef addressMultiValue = ABRecordCopyValue(person, kABPersonAddressProperty);
NSDictionary *address = (NSDictionary *)CFBridgingRelease(ABMultiValueCopyValueAtIndex(addressMultiValue, ABMultiValueGetIndexForIdentifier(addressMultiValue, identifier)));
}
[self dismissModalViewControllerAnimated:YES];
return NO;
}
Depending on the country, the convention on how to format this address is not the same.
Is there a way to get the string of the address as displayed by the picker (similar to what Contacts.app shows)?
| 0 | [
2,
3218,
16,
840,
1704,
19,
840,
2036,
106,
13,
5,
2297,
10171,
16855,
106,
325,
13227,
857,
12898,
1252,
6,
19,
21,
13,
2172,
11130,
800,
3726,
3726,
3187,
21,
840,
2036,
106,
29,
13,
1,
2297,
10171,
16855,
106,
325,
13227,
857,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
emberjs rootElement
===
In guide i can find:
"If you are embedding an Ember application into an existing site, you can have event listeners set up for a specific element by providing a rootElement property:
window.App = Ember.Application.create({
rootElement: '#sidebar'
});"
Please give me example how to use it corretly. | 0 | [
2,
13,
19603,
728,
18,
5900,
27567,
800,
3726,
3726,
19,
3378,
31,
92,
477,
45,
13,
7,
821,
42,
50,
11911,
69,
3258,
40,
13,
19603,
3010,
77,
40,
3149,
689,
15,
42,
92,
57,
807,
15672,
309,
71,
26,
21,
1903,
4520,
34,
2674,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Issues with OpenSSL on PHP - different behaviour for different versions
===
*(This question was originally posted on ServerFault - I have deleted it there and moved it here.)*
I have a development machine running PHP 5.3.5 and a production machine running PHP 5.3.8.
The following code runs on the development machine:
<?php
$key = "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0x+2RiQ+LCZNAUcl/Ecf1NrTr
lhjOiHaVC+w/y+UJevqVcDstD22OJGwT13B9T47OuQG9BmzcZQYLcShUMhVD/Owu
9+8PcK51EnBd0lym6+z/WixpnqfQonyKiqq5ytmYKUlUv39J8QQUI2geyvY9VpWS
wyNcFUs7wPl2zsLCPQIDAQAB
-----END PUBLIC KEY-----";
$data = "Hello, world!";
$key1 = openssl_get_publickey($key);
print_r ($key1);
echo "<p>";
$res = openssl_public_encrypt($data, $encrypted_data, $key1, OPENSSL_PKCS1_PADDING);
echo base64_encode($encrypted_data);
On my development machine, this code outputs a resource and an encoded string. I would copy it here, but of course it changes each time. On the production machine, this code produces the resource number and the following PHP errors:
PHP Warning: openssl_public_encrypt(): Don't know how to get public key from this private key in C:\xxx\test.php on line 15
PHP Warning: openssl_public_encrypt(): key parameter is not a valid public key in C:\xxx\test.php on line 15
Unfortunately, installing an older version of PHP on the production machine is not an option at the moment because of other applications that are running on it which require 5.3.8 as a minimum.
Would it help if I upgraded to 5.4.x?
I do know that the version of OpenSSL on 5.3.5 is 0.9.8 whereas the version in 5.3.8 is 1.0.0. I imagine that there might be a problem there. Is there any way to work around that?
I have tried to find out as much as I can from the OpenSSL.org site, and the PHP bug tracker, but I don't know what I'm looking for.
Regards,
Philip | 0 | [
2,
1549,
29,
8965,
18,
255,
27,
13,
26120,
13,
8,
421,
7727,
26,
421,
3281,
800,
3726,
3726,
1637,
5,
1565,
1301,
23,
912,
6054,
27,
8128,
410,
9708,
13,
8,
31,
57,
19584,
32,
80,
17,
385,
32,
235,
9,
6,
2483,
31,
57,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP | Open/Save pdf located in Server folder
===
I want to give to the users of a php intranet web app the posibility to open/save pdf files (that are located in a folder on the apache server).
The pdfs have company private information, so i don't want to put them in a web folder.
$pdf="file:///c:/pdfs/example.pdf";
header('Content-disposition: attachment; filename=example.pdf');
header('Content-type: application/pdf');
readfile($pdf);
The problem is when the user open/save a file, the path is pointing for that folder but in the client pc and not at the server.
Any ideas?
Thanks in advance.
Best Regards,
Mike D.
| 0 | [
2,
13,
26120,
13,
1,
368,
118,
19863,
13,
11124,
335,
19,
8128,
19294,
800,
3726,
3726,
31,
259,
20,
590,
20,
14,
3878,
16,
21,
13,
26120,
14369,
2328,
2741,
4865,
14,
12928,
14264,
20,
368,
118,
19863,
13,
11124,
6488,
13,
5,
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... |
Show WPF window from another application in C#
===
I have an WPF application called app1 which has a windows named window1. When the user click the window1 close button, the app does not closes but the window1 hides (this.hide()).
I want that when the user clicks on the app executable file to run it, It check the Processes and if it finds the process with same name as it's own, It shows the window1 of the first process and then exit;
How can I do that?
I know how to check the process and how to close the current app but I don't know how to show a window from another WPF process which is runing...
In my App startup event I do this :
<!-- lang: C# -->
<pre>
<code>
private void Application_Startup(object sender, StartupEventArgs e)
{
if(System.Diagnostics.Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Count() > 1)
{
Application.Current.Shutdown(0);
}
}
</code>
</pre>
thanks. | 0 | [
2,
298,
619,
7721,
1463,
37,
226,
3010,
19,
272,
5910,
800,
3726,
3726,
31,
57,
40,
619,
7721,
3010,
227,
4865,
165,
56,
63,
21,
1936,
377,
1463,
165,
9,
76,
14,
4155,
10840,
14,
1463,
165,
543,
5167,
15,
14,
4865,
630,
52,
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... |
Pooling memory in C - Memory Management
===
I am writing a cross platform shared library in C. The workflow of this library would be like,
lib *handle = lib_init();
result = lib_do_work(handle);
lib_destroy(handle);
Usually, users will init it once their application starts and closes it when the application ends. `lib_do_work()` usually gets called multiple times in a second. So to avoid memory allocation and deallocation for each calls, I am using a pooling mechanism. With this, I ask the pool to return an instance of the structure that I need. Pool will return an unused instance or create a new instance if nothing is free. This new instance will also be added to the pool so that it can be used next time.
Any API call to my library starts with a function call `reset_pool()` which makes all elements in the pool usable again. This pool is destroyed as part of `lib_destroy()` call. In my tests, I observed that sometime my pool is getting 100000+ instances of structure instances.
I am wondering is this a good practice in handling the memory? Any help would be great. | 0 | [
2,
3067,
68,
1912,
19,
272,
13,
8,
1912,
1097,
800,
3726,
3726,
31,
589,
1174,
21,
919,
2452,
2592,
1248,
19,
272,
9,
14,
170,
9990,
16,
48,
1248,
83,
44,
101,
15,
13,
8326,
1637,
3203,
413,
800,
13,
8326,
1,
108,
242,
5,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how can i get values of Get-WMIObject -Class Win32_PerfFormattedData using power shell
===
$wmi = Get-WMIObject -Class Win32_PerfFormattedData_Tcpip_NetworkInterface -ComputerName $computer -Namespace $namespace. Using this power shell script how i will get value of parameters?
How can i get the value of these
BytesReceivedPerSec
BytesSentPerSec
BytesTotalPerSec
Thanks,
Deepesh C.P | 0 | [
2,
184,
92,
31,
164,
4070,
16,
164,
8,
499,
1435,
23793,
13,
8,
1898,
628,
3125,
1,
1432,
410,
29850,
18768,
568,
414,
3593,
800,
3726,
3726,
5579,
499,
1435,
800,
164,
8,
499,
1435,
23793,
13,
8,
1898,
628,
3125,
1,
1432,
410,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SHA1 hash translated to invalid xml
===
I have a dictionary, which I turn in to XML and then hash with SHA1.
string xmlMessageCode = inputDictionary.ToXML(); //Extension method.
UnicodeEncoding UE = new UnicodeEncoding();
SHA1Managed hasher = SHA1Managed();
byte[] hashString = Encoding.UTF8.GetBytes(xmlMessageCode.ToCharArray());
byte[] hashCode = hasher.ComputeHash(hashString);
string computedHashString = UTF8Encoding.UTF8.GetString(hashCode);
return computedHashString;
After that I put the value in an object property and then serialize a collection of these objects to XML:
XmlSerializer ser = new XmlSerializer(typeof(T));
XmlWriterSettings settings = new XmlWriterSettings()
{
Indent = false,
OmitXmlDecleration = false,
Encoding = Encoding.UTF8
};
using(StringWriter sr = new StringWriter)
{
using(XmlWriter xmlr = XmlWriter.Create(sr, settings))
{
ser.Serialize(sr, newList);
}
return sr.ToString();
}
This produces XML, but when I try to validate the resulting XML, I get an error inside the property which was created from the hashed string.
What would be the best way to resolve this?
Should I strip the invalid characters or is there a more elegant solutions?
| 0 | [
2,
4116,
165,
19170,
4331,
20,
16671,
23504,
800,
3726,
3726,
31,
57,
21,
9186,
15,
56,
31,
805,
19,
20,
23504,
17,
94,
19170,
29,
4116,
165,
9,
3724,
23504,
3845,
18,
1303,
9375,
800,
6367,
22595,
1857,
9,
262,
396,
8184,
5,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UISlider following sound volume, not working
===
I am having an issue in my iPhone app with sound.
I have a UISlider object that I use to adjust the sound volume.
When it appears I use code based on the following line, to set the initial value of the slider:
AudioSessionGetProperty ('chov',&dataSize,&volume);
and that works fine. Then I would like the slider to move accordingly when I activate the hardware sound volume buttons of the device.
But this part based on this kind of code:
AudioSessionPropertyID volumeChangeID=kAudioSessionProperty_CurrentHardwareOutputVolume;
AudioSessionAddPropertyListener(volumeChangeID,handleSoundVolume,self);
does not work so well.
What I can see is that the callback function:handleSoundVolume is only called when some sound is playing and not otherwise.
On the other hand the value provided by AudioSessionGetProperty is always correct independently of sound playing or not.
Why is that?
I thought AudioSessionGetProperty and AudioSessionAddPropertyListener were working "together", but it does not seem so.
Looking at the default Music app on iPod touch, it seems that what I want to do is quite possible.
Thanks for any piece of information.
| 0 | [
2,
287,
403,
1210,
1157,
249,
646,
2310,
15,
52,
638,
800,
3726,
3726,
31,
589,
452,
40,
1513,
19,
51,
21024,
4865,
29,
646,
9,
31,
57,
21,
287,
403,
1210,
1157,
3095,
30,
31,
275,
20,
14328,
14,
646,
2310,
9,
76,
32,
1780,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 horizontal report layout in crystal reports
===
I would like to know if it is possible to display this kind of report output. So far, what I encountered and tried is that the records are displayed vertically.
![enter image description here][1]
[1]: http://i.stack.imgur.com/ZSC56.jpg
Any help with this? | 0 | [
2,
3042,
10095,
1330,
9106,
19,
4282,
2813,
800,
3726,
3726,
31,
83,
101,
20,
143,
100,
32,
25,
938,
20,
3042,
48,
825,
16,
1330,
5196,
9,
86,
463,
15,
98,
31,
8208,
17,
794,
25,
30,
14,
742,
50,
6115,
23300,
9,
13,
187,
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... |
NSString to NSDate returns wrong date
===
I try to convert my `NSString` to `NSDate` object, but `NSDateFormatter` returns me a strange value.
Here is code:
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm"];
NSDate *date = [dateFormat dateFromString:@"2012-08-15 00:00"];
[dateFormat release];
`date` value is `2012-08-14 21:00 +0000`. It is 3 hours difference between `NSString` value and `NSDate` value. I think I've missed something, but I don't know what.
| 0 | [
2,
13,
2172,
11130,
20,
13,
2172,
8209,
4815,
1389,
1231,
800,
3726,
3726,
31,
1131,
20,
8406,
51,
13,
1,
2172,
11130,
1,
20,
13,
1,
2172,
8209,
1,
3095,
15,
47,
13,
1,
2172,
8209,
23588,
815,
1,
4815,
55,
21,
2578,
1923,
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... |
insertion of system date and time into mysql table in their respective fields
===
i am not new to php but facing a problem of very basic level but dont know how to overcome it. i have a table for comments in which fields are name ,email, comment, date and time. now what i want to do is to insert system date and time in their respective fields but it only enters time not date. the types of field date is date and of time is time.
here is my query
$insert = 'insert into tbl_comment
(name, email, desc, date, time)
VALUES
("'.$_POST['name'].'","'.$_POST['email'].'","'.$_POST['comment'].'"
,CURDATE(),"CURTIME()",CURTIME())';
mysql_query($insert);
}
plz help me out | 0 | [
2,
24245,
16,
329,
1231,
17,
85,
77,
51,
18,
22402,
859,
19,
66,
7390,
2861,
800,
3726,
3726,
31,
589,
52,
78,
20,
13,
26120,
47,
4325,
21,
1448,
16,
253,
2125,
662,
47,
1049,
143,
184,
20,
9059,
32,
9,
31,
57,
21,
859,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When to access Static Button in ListView EmptyItemTemplate and ItemTemplate?
===
I have a button in both the ItemTemplate and EmptyDatatTemplate of my Listview that I would like to dynamicly change the PostBackURL on depending on the data that is used to fill the listview. i know the I can use code similare to
tbEditAbout = (TextBox)lvCharacters.Items[e.ItemIndex].FindControl("tbEditAbout");
to get access to the button but what I dont know is what On method to be making the call in so that everytime the page is loaded via a full load or an AJAX postback I can update the value of the button's PostBackURL value. | 0 | [
2,
76,
20,
1381,
12038,
5167,
19,
968,
4725,
2424,
2119,
79,
9577,
6554,
17,
9101,
9577,
6554,
60,
800,
3726,
3726,
31,
57,
21,
5167,
19,
156,
14,
9101,
9577,
6554,
17,
2424,
18768,
38,
9577,
6554,
16,
51,
968,
4725,
30,
31,
83,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# date formats for SQL Server
===
I have dates in SQL stored as DateTime,
when showing them in a textbox I do this:
txtDateLogged.Text = v.DateLogged.ToString("dd-MM-yyyy");
But when I the update that textbox to write back to SQL Im getting and invalid DateTime error when using this:
if (DateLogged!= "") { uInput.DateLogged = Convert.ToDateTime(DateLogged); }
Im assuming Im missing something in the formatting - the date value is passed into the public void doing the update as a string, then converted in the line above.
Any suggestions?
thanks
T | 0 | [
2,
272,
5910,
1231,
13767,
26,
4444,
255,
8128,
800,
3726,
3726,
31,
57,
4076,
19,
4444,
255,
8214,
28,
1231,
891,
15,
76,
3187,
105,
19,
21,
1854,
5309,
31,
107,
48,
45,
20225,
38,
8209,
19287,
9,
11969,
800,
566,
9,
8209,
1928... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
dojo1.6.1 tabs show up as normal divs
===
I'm trying to implement a tab control using dojo in an already existing application. Here's some of what I've done:
<head>
.....
<script type="text/javascript" src="js/dojo/dojo/dojo.js')}"></script>
<script type="text/javascript">
dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.layout.ContentPane");
</script>
....
</head>
<body>
....
<div data-dojo-type="dijit.layout.TabContainer" style="width: 400px; height: 100px;" tabStrip="true">
<div data-dojo-type="dijit.layout.ContentPane" title="title1" selected="true">
...content...
</div>
<div data-dojo-type="dijit.layout.ContentPane" title="title2">
...content...
</div>
</div>
....
</body>
The js loads properly (firebug displays no errors).
When I browse to the page I see all the content divs drawn as though no formatting has taken place at all and they are just regular divs.
My first guess was that there's a css file I was meant to include. All the examples I found that work link to a hugely complex css file that does a whole lot of stuff that is inappropriate for my application. I cant find any explanations about any css that should be included so i suspect this guess is wrong.
Can anyone point out my error, or point me in the direction of a concise and up to date example? | 0 | [
2,
107,
1636,
165,
9,
379,
9,
165,
6523,
18,
298,
71,
28,
1826,
13,
12916,
18,
800,
3726,
3726,
31,
22,
79,
749,
20,
8713,
21,
6523,
569,
568,
107,
1636,
19,
40,
614,
3149,
3010,
9,
235,
22,
18,
109,
16,
98,
31,
22,
195,
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... |
hex to ascii char in native c
===
let's say i have an array of
> char[8] str="61626364"
(hex) and it is "abcd" in ascii char
according to http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/files/ascii.htm.
What i wanna is to write a function to convert
> char[SIZE]
(hex) to ascii char.
how to do it in c?
any help highly appreciated.
thanks~ | 0 | [
2,
24,
396,
20,
28,
1892,
49,
4892,
19,
1275,
272,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
40,
7718,
16,
13,
1,
4892,
2558,
457,
500,
13,
9729,
3726,
7,
379,
1091,
2409,
25874,
7,
13,
5,
438,
396,
6,
17,
32,
25,
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... |
Specified part does not exist in the package
===
I have the following code:
using (var doc = WordprocessingDocument.Open(filename, true))
{
....
}
Where string filename is a valid path to a docx file.
But calling Open causes the following InvalidOperationException: `Specified part does not exist in the package.`
Any ideas what could possibly cause this? | 0 | [
2,
9931,
141,
630,
52,
3182,
19,
14,
6030,
800,
3726,
3726,
31,
57,
14,
249,
1797,
45,
568,
13,
5,
3311,
9765,
800,
833,
16835,
68,
28132,
9,
10157,
5,
16877,
7259,
15,
1151,
6,
6,
13,
1,
13,
9,
9,
9,
9,
13,
1,
113,
3724,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ScrollTo a section of the page on button submit within a form
===
I'm working on a site that on form submit returns search values. What I'm trying to do is on submit scrollTo (down) to the results section. Works with a button outside a form but not within a form.
Example : this will work
$(function (){
$("#fb-advanced-submit").click(function (){
$('html, body').animate({
scrollTop: $("#fb-results").offset().top
}, 1300);
});
});
<button id="fb-advanced-submit">Submit</button>
but this doesn't
<form action="" method="Get">
<input type="submit" id="#fb-advanced-submit" value="Search" class="small button" />
<div id="div2" style="height: 1000px; width 100px">test</div>
<br/>
<div id="fb-results" style="height: 1000px; width 100px">test 2</div>
</form>
**[jsfiddle][1]**
[1]:http://jsfiddle.net/8dd6k/ | 0 | [
2,
12159,
262,
21,
1050,
16,
14,
2478,
27,
5167,
12298,
363,
21,
505,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
689,
30,
27,
505,
12298,
4815,
2122,
4070,
9,
98,
31,
22,
79,
749,
20,
107,
25,
27,
12298,
12159,
262,
13,
5,
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... |
JPA: How to use transactions with JTA EntityManager?
===
First of all, [this][1] solution is no option for me, because I can't change the persistence-unit.
My problem is that I use a JTA EntityManager but I need for exactly one use case something like a transaction:
public boolean saveWithResult(PointsValidityPeriod pointsValidityPeriod)
{
//TODO use transaction here
super.save(pointsValidityPeriod);
if (updatePrevious(pointsValidityPeriod.getValidFrom()) != 1)
{
logger.error("Update of Period was not possible, because UPDATE returned no single result.");
return false;
}
pointsValidityPeriodEvent.fire(pointsValidityPeriod);
return true;
}
**Save method (which I can't change):**
public void save(T entity)
{
getEntityManager().persist(entity);
}
You see, that there is a save invocation, but this save must be rolled back if the update went wrong, so how can I achieve that? Any ideas?
[1]: http://stackoverflow.com/questions/5049763/how-to-start-transaction-in-jta-entitymanager | 0 | [
2,
487,
1060,
45,
184,
20,
275,
13147,
29,
487,
536,
9252,
22256,
60,
800,
3726,
3726,
64,
16,
65,
15,
636,
1565,
500,
2558,
165,
500,
4295,
25,
90,
4255,
26,
55,
15,
185,
31,
92,
22,
38,
753,
14,
28584,
8,
15464,
9,
51,
144... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Drop down selection with UIPicker performance
===
I wanted to use a UIPicker to simulate a drop-down menu and I found this code. It`s the second answer.
http://stackoverflow.com/questions/5347537/uipickerview-select-and-hide
Its exactly what I was locking for except for one thing. When I tap my TextField activating the method, like the author sais i should do, it takes a while for the UIPicker to show up. I would like to know if theres a way to make the code faster.
I think this happens because the method creates a UIPicker every time, but I`m not sure. Sorry if it is a stupid question.
Thanks
| 0 | [
2,
2804,
125,
3155,
29,
13,
5661,
16855,
106,
956,
800,
3726,
3726,
31,
417,
20,
275,
21,
13,
5661,
16855,
106,
20,
24969,
21,
2804,
8,
2968,
11379,
17,
31,
216,
48,
1797,
9,
32,
1,
18,
14,
153,
1623,
9,
7775,
6903,
25325,
254... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 upgrade to GWT 2.5 in Eclipse
===
I'm using GWT 2.4 & Eclipse Juno. GWT is installed using the instructions at https://developers.google.com/web-toolkit/usingeclipse.
I'd like to try GWT 2.5.
How do I upgrade from GWT 2.4 to 2.5? | 0 | [
2,
184,
107,
9483,
20,
14094,
38,
172,
9,
264,
19,
11652,
800,
3726,
3726,
31,
22,
79,
568,
14094,
38,
172,
9,
300,
279,
11652,
21715,
9,
14094,
38,
25,
4066,
568,
14,
7650,
35,
7775,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I am using addClass/removeClass and "data-" attribute to show/hide divs. How can I add next/previous?
===
I am trying to work out the template for an ebook. This is what I have at present: http://jsbin.com/otakab/2/edit But the next/previous doesn't work. Can you supply working code?
// Following function works
$(function() {
$(".pageNumbers a").on("click", function(e) {
// Add highlight to the element clicked and remove highlighting from its siblings
$(this).addClass("highlight").siblings().removeClass("highlight");
// Make use of our data attribute to show the correct page and hide the siblings
$($(this).data('page')).show().siblings(".page").hide();
});
// Finally, dynamically click first page to start things off for the user
//and provide proper highlighting and showing of text
$("#a-1").click();
});
// Following function DOES NOT WORK
$(function() {
$(".direction a").on("click", function(e) {
// Trying to show the next/previous hidden div
$($(this).data('page')).show().siblings(".page").hide();
});
}); | 0 | [
2,
31,
589,
568,
3547,
1898,
118,
99,
16598,
1898,
17,
13,
7,
18768,
8,
7,
35,
14755,
20,
298,
118,
19522,
13,
12916,
18,
9,
184,
92,
31,
3547,
328,
118,
3515,
1755,
1291,
60,
800,
3726,
3726,
31,
589,
749,
20,
170,
70,
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... |
JQuery Dialog - Reuse code for different id
===
I just started working with Jquery and I was wondering if there is a way to reuse a dialog for multiple ids. I'm using the dialog to display a more indepth description of multiple items. The way I have the code setup right now is:
$('#NY7C').dialog({
autoOpen: false,
width: 800,
height: 700,
modal: true,
draggable: false
});
$('#NY7C-open').click(function(){
$('#NY7C').dialog('open');
return false;
});
$('#NY7R').dialog({ //another dialog that has the same features as #NY7C
});
$('#NY7R-open').click(function(){
})
Inside the body I use the following code to open the dialog:
<a id="NY7C-open" class="ui-state-default ui-corner-all" href="#">More Info</a>
<a id="NY7R-open" class="ui-state-default ui-corner-all" href="#">More Info</a>
Finally, the information shown in the dialog is in:
<div id="#NY7C">
//Information for NY7C
</div>
<div id="#NY7R">
//Information for NY7R
</div>
Now the way I have the code right now works. However, I was hoping I would be able to reuse the first code so I can use it for multiple IDs(ex. NY7C, NY7R, NY7P, etc.). Is there any way to do this? | 0 | [
2,
487,
8190,
93,
28223,
13,
8,
302,
3699,
1797,
26,
421,
4924,
800,
3726,
3726,
31,
114,
373,
638,
29,
487,
8190,
93,
17,
31,
23,
5712,
100,
80,
25,
21,
161,
20,
302,
3699,
21,
28223,
26,
1886,
13,
9178,
9,
31,
22,
79,
568,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Comparing values sql
===
I have a table wherein I have to report the the present status and the date from which this status is applicable.
Example:
Status date
1 26 July
1 24 July
1 22 July
2 21 July
2 19 July
1 16 July
0 14 July
Given this, i want to display the current status as 1 and date as 22 July> I am not sure how to go about this. Any help will be greatly appreciated.
Thanks,
Sindhu | 0 | [
2,
15047,
4070,
4444,
255,
800,
3726,
3726,
31,
57,
21,
859,
113,
108,
31,
57,
20,
1330,
14,
14,
734,
1782,
17,
14,
1231,
37,
56,
48,
1782,
25,
14535,
9,
823,
45,
1782,
1231,
137,
1262,
313,
137,
937,
313,
137,
1024,
313,
172,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Responsive site is zoomed in when flipping between Portrait and Landscape on iPad/iPhone
===
I've built a responsive site using Twitter Bootstrap here: http://zarin.me/cce/
The responsive design works great on iPad and iPhone, however when I flip the device from portrait to landscape, the site is zoomed in instead of adapting to the screen (pinching the screen works).
What am I missing? Is this a viewport issue? Here's the only viewport code I have in my <head>:
<meta content="width=device-width, initial-scale=1.0" name="viewport">
Thanks in advance! | 0 | [
2,
13,
22153,
689,
25,
19469,
69,
19,
76,
21422,
128,
5548,
17,
4453,
27,
31,
8240,
118,
49,
7709,
800,
3726,
3726,
31,
22,
195,
392,
21,
13,
22153,
689,
568,
10623,
5894,
16514,
235,
45,
7775,
6903,
7351,
108,
9,
790,
118,
150,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 we can enable border radius in ie
===
<style>
border-radius:10px;
</style>
<div class='radius'> <?= echo $score . 'score';?></div>
it is not working in IE8
| 0 | [
2,
184,
95,
92,
9240,
1862,
13288,
19,
13,
660,
800,
3726,
3726,
13,
1,
4381,
1,
1862,
8,
9560,
267,
6608,
306,
396,
73,
13,
1,
118,
4381,
1,
13,
1,
12916,
718,
3726,
22,
9560,
267,
22,
1,
13,
1,
60,
3726,
8117,
5579,
15077,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to prevent insertion of certain offensive words in codeigniter using a database
===
I'm developing a website using codeigniter that allows users to post free ads and search for ads, I'm looking for a fast way to check the user input against a list of offensive words stored in database table, so that if a user enters a bad word, one from those listed in that table then it should be removed (not entered). my table is using the MySql fulltext search feature.
I tried using the like in sql but I was told that it gets slow when the records reach thousands.
is there any suitable solution in codeigniter ? | 0 | [
2,
184,
20,
2501,
24245,
16,
1200,
4632,
715,
19,
1797,
9693,
242,
106,
568,
21,
6018,
800,
3726,
3726,
31,
22,
79,
3561,
21,
2271,
568,
1797,
9693,
242,
106,
30,
2965,
3878,
20,
678,
551,
16236,
17,
2122,
26,
16236,
15,
31,
22,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Assign a global Twig variable in Symfony 2?
===
My web application as a topbar where i need to display the number of unreaded messages. Each `User` entity as an association with `Message` (many-to-many). Showing the total number of messages (for a given user) would be simple:
class User
{
/*
* @ORM\ManyToMany(targetEntity="Message", invertedBy="users")
*/
private $messages;
}
In Twig:
Total messages: {{ app.user.messages|length }}.
But what if i need to count **only new messages**? Assuming my repository has a `getNewMessages(User $user)` method, how can assign this value globally to use in every template?
I know about Twig globals, but i don't know where i'm supposed to put the relevant code:
$twig = new Twig_Environment($loader);
$twig->addGlobal('text', new Text());
{{ text.lipsum(40) }} | 0 | [
2,
13952,
21,
2062,
19690,
7612,
19,
13,
7261,
10229,
93,
172,
60,
800,
3726,
3726,
51,
2741,
3010,
28,
21,
371,
1850,
113,
31,
376,
20,
3042,
14,
234,
16,
367,
10647,
69,
7561,
9,
206,
13,
1,
16704,
1,
9252,
28,
40,
607,
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... |
Creating 2D wpf custom shapes that are animateable
===
At present I am working on a project that involves animating a custom built 2D shape in WPF. The shape is to look like a box and at the present I seem to have a few glitches.
Here is what my code looks like at the moment
namespace Wpftrial4
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
SolidColorBrush fillcolor = new SolidColorBrush();
SolidColorBrush bordercolor = new SolidColorBrush();
public MainWindow()
{
InitializeComponent();
fillcolor.Color = Colors.WhiteSmoke;
bordercolor.Color = Colors.Blue;
}
private void button1_Click(object sender, RoutedEventArgs e)
{
//Manually creating the required 2D Box shape
Path path_rectangle = new Path();
path_rectangle.Fill = fillcolor;
path_rectangle.Stroke = bordercolor;
path_rectangle.StrokeThickness = 5;
RectangleGeometry rg = new RectangleGeometry();
double width_rec = 100;
double height_rec = 50;
double left_rec = 130;
double top_rec = 100;
rg.Rect = new Rect(left_rec, top_rec, width_rec, height_rec);
path_rectangle.Data = rg;
canvas1.Children.Add(path_rectangle);
Path path2_top = new Path();
path2_top.Stroke = new SolidColorBrush(Colors.Brown);
path2_top.StrokeThickness = 6;
RectangleGeometry rg2 = new RectangleGeometry();
double width2 = 100;
double height2 = 2;
double left2 = 130;
double top2 = 90;
rg2.Rect = new Rect(left2, top2, width2, height2);
path2_top.Data = rg2;
canvas1.Children.Add(path2_top);
Path path3_topcover = new Path();
path3_topcover.Stroke = new SolidColorBrush(Colors.White);
path3_topcover.StrokeThickness = 5;
RectangleGeometry rg3 = new RectangleGeometry();
double width3 = 100;
double height3 = 5;
double left3 = 130;
double top3 = 100;
rg3.Rect = new Rect(left3, top3, width3, height3);
path3_topcover.Data = rg3;
canvas1.Children.Add(path3_topcover);
//combining part_Group type
GeometryGroup myGeometryGroup = new GeometryGroup();
myGeometryGroup.Children.Add(rg);
myGeometryGroup.Children.Add(rg3);
Path myPath = new Path();
myPath.Stroke = Brushes.Blue;
myPath.Data = myGeometryGroup;
canvas1.Children.Add(myPath);
////test animate
//myCustomAnimatedBox MB2 = new myCustomAnimatedBox(200, 200, 300, 250) { Stroke = Brushes.Black, StrokeThickness = 2 };
//canvas1.Children.Add(MB2); //new myCustomAnimatedBox(200, 200, 300, 250,500,500){Stroke = Brushes.Black, StrokeThickness = 2});
//PointAnimation pa2 = new PointAnimation();
////DoubleAnimation da = new DoubleAnimation();
//pa2.To = new Point(100, 100);
////da.By = 50;
//pa2.Duration = TimeSpan.FromSeconds(10);
////MB2.BeginAnimation(myCustomAnimatedBox.TopProperty,pa2);//(//MB2.BeginAnimation(myCustomAnimatedBox.CenterProperty, pa2);
}
//class- style custom2D shape creation
private void button2_Click(object sender, RoutedEventArgs e)
{
myCustomAnimatedBox MB = new myCustomAnimatedBox(200, 200, 350, 250) { Stroke = Brushes.Black, StrokeThickness = 2 };
canvas1.Children.Add(MB); //new myCustomAnimatedBox(200, 200, 300, 250,500,500){Stroke = Brushes.Black, StrokeThickness = 2});
//PointAnimation pa = new PointAnimation();
////DoubleAnimation da = new DoubleAnimation();
//pa.To = new Point(100, 100);
////da.By = 50;
//pa.Duration = TimeSpan.FromSeconds(10);
//MB.BeginAnimation(myCustomAnimatedBox.CenterProperty, pa);
}
}
//Class that defines the custom 2D shape
public class myCustomAnimatedBox : Shape
{
private double x1, width;
private double y1, height;
private GeometryGroup myBox = new GeometryGroup();
public myCustomAnimatedBox(double XX1, double YY1, double widTH, double heiGHT)
{
makeBox(XX1, YY1, widTH, heiGHT);
}
//public static readonly DependencyProperty CenterProperty = DependencyProperty.Register("Center", typeof(Point), typeof(myCustomAnimatedBox),
// new PropertyMetadata( null,PropertyChanged));// FrameworkPropertyMetadata( FrameworkPropertyMetadataOptions.AffectsMeasure));
////new Point(cent_X, cent_Y)
//public Point Center
//{
// get { return (Point)GetValue(CenterProperty); }
// set
// {
// SetValue(CenterProperty, value);
// myBox.Children.Clear();
// makeBox(myBox, value.X, value.Y, width, height);
// }
//}
//public Point Center
//{
// get { return (Point)GetValue(CenterProperty); }
// set
// {
// SetValue(CenterProperty, value);
// myBox.Children.Clear();
// makeBox(myBox, value.X, value.Y, width, height);
// }
//}
//public Point Top
//{
// get { return new Point(X1, Y1); }
// set
// {
// //X1 = value.X;
// //Y1 = value.Y;
// Top = value;
// }
//}
//public static readonly DependencyProperty TopProperty = DependencyProperty.Register("Top", typeof(Point), typeof(myCustomAnimatedBox), new FrameworkPropertyMetadata( FrameworkPropertyMetadataOptions.AffectsMeasure));
//new PropertyMetadata( null,PropertyChanged));
public double X1
{
get { return x1; }
set
{
x1 = value;
}
}
public double Y1
{
get { return y1; }
set
{
y1 = value;
}
}
//Trial at creating a dependency property
//private static void TopPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
//{
// myCustomAnimatedBox myB = (myCustomAnimatedBox)d;
// myB.InvalidateVisual();
//}
protected override Geometry DefiningGeometry
{
get { return myBox; }
}
//Function that draws the object
private void makeBox(double XX1, double YY1, double widTH, double heiGHT)
{
width = widTH;
height = heiGHT;
this.X1 = XX1;
this.Y1 = YY1;
RectangleGeometry rectangle_part = new RectangleGeometry();
rectangle_part.Rect = new Rect(X1,Y1,width,height);
RectangleGeometry rg_cover = new RectangleGeometry();
RectangleGeometry rg_top = new RectangleGeometry();
rg_top.Rect = new Rect(X1, Y1 - 10, width, 2);
rg_cover.Rect = new Rect(X1, Y1, width, 5);
myBox.Children.Add(rectangle_part);
myBox.Children.Add(rg_top);
myBox.Children.Add(rg_cover);
}
}
}
Since the shape would be undergoing animation like: box opening and closing, I need the custom shape to have a movable part. GeometryGroup according to most authors seem to offer the most advantages when animation plus other databinding is required however. IN the code I have tested creating the shape manually. This could be seen in code attached to Button1. However when I try to do the class implementation, i am not able to get the kind of effect I want like altering individual constituent characteristics. I am less than 1 month into WPF and would like help in the following areas.
1. Is GeometryGroup ideal for what I want to achieve?
2. will following this course lead to the achievement of my goal. ie will I be able to animate a part of a custom 2D shape built in WPF ie box--open; box---Close.
3. Can someone tell me what I need to do to be able to alter individual properties of the constituent shapes ie rectangles in my custom shape.
Thanks for your help.
| 0 | [
2,
2936,
172,
43,
619,
7721,
5816,
12129,
30,
50,
14487,
591,
579,
800,
3726,
3726,
35,
734,
31,
589,
638,
27,
21,
669,
30,
6569,
14487,
1203,
21,
5816,
392,
172,
43,
2539,
19,
619,
7721,
9,
14,
2539,
25,
20,
361,
101,
21,
164... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 calling thread cannot access this object because a different thread owns it.I dont want to use dispatcher
===
in wpf,I have a listbox control and two buttons.I want to be able to use the second button when i clicked the first button till add numbers has not fineshed his work.I use dispatcher.begininvoke but this adds the work on main thread.How to i synchronize this threads?I want to be able to use second button, move the window or using other ui elements when addnumbers processing..
void AddNumbers()
{
for (int i = 1; i <= 1000000; i++)
{
listBox1.Items.Add(i);
}
}
private void button1_Click(object sender, RoutedEventArgs e)
{
Thread thr = new Thread(new ThreadStart(AddNumbers));
thr.Start();
}
private void button2_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Hello World!");
} | 0 | [
2,
14,
2555,
9322,
1967,
1381,
48,
3095,
185,
21,
421,
9322,
258,
18,
32,
9,
49,
1049,
259,
20,
275,
14226,
106,
800,
3726,
3726,
19,
619,
7721,
15,
49,
57,
21,
968,
5309,
569,
17,
81,
12861,
9,
49,
259,
20,
44,
777,
20,
275... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.