unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Using Eclipse PDT for debugging Ajax pages with concurrent requests
===
Once I asked this same question but now I can give a test case for it.
The problem resides in debugging in Eclipse PDT when the page sends multiple requests to the server's dynamic pages. Consider a web page as follow:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="link-to-jquery/jquery-1.7.2.min.js"></script>
<script>
$(document).ready(function() {
var list = $("ol");
for (var i=0; i<20; i++) {
list.append($('<li><img src="/img.php?'+i+'" /></li>'));
}
});
</script>
</head>
<body>
<ol>
</ol>
</body>
</html>
In above page, JQuery is used only to prevent browser from caching the images. And the the `img.php` reads like this:
<?php
readfile('some_image.jpg');
When I try to debug the first page in the Eclipse PDT, using Zend Debugger, only the first `img.php` request is made and others are dismissed. A sample output is shown in the attached image file. In the presented case, not loading an image file won't prevent you from debugging the rest of project. But once there's a javascript file which isn't loaded because of this problem, the rest of project won't work as it has to. Does anyone know how can I debug such a page?
Here are my specifications:
- PHP Version 5.3.14
- Zend Debugger v5.3
- Eclipse for PHP Developers, Version: 3.0.2
- Apache/2.2.22 (Ubuntu)
![Sample output][1]
[1]: http://i.stack.imgur.com/aQ67A.jpg | 0 | [
2,
568,
11652,
13,
9251,
38,
26,
121,
16254,
2762,
20624,
4434,
29,
19513,
12279,
800,
3726,
3726,
382,
31,
411,
48,
205,
1301,
47,
130,
31,
92,
590,
21,
1289,
610,
26,
32,
9,
14,
1448,
12631,
19,
121,
16254,
2762,
19,
11652,
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... |
HeapDumpOnOutOfMemoryError works only once on periodical tasks
===
I have a couple of applications that run in specified intervals. To monitor OutOfMemoryError i've decided to enable HeapDumpOnOutOfMemoryError, and before doing this i decided to do some research. Some of applications have maximum heap size of 2GB, so generating multiple heap dumps in rapid succession could eat up all disk space.
I've written a small script to check how it will work.
import java.util.LinkedList;
import java.util.List;
public class Test implements Runnable{
public static void main(String[] args) throws Exception {
new Thread(new Test()).start();
}
public void run() {
while (true) {
try{
List<Object> list = new LinkedList<Object>();
while (true){
list.add(new Object());
}
}
catch (Throwable e){
System.out.println(e);
}
try {
Thread.sleep(1000);
}
catch (InterruptedException ignored) {
}
}
}
}
And here is the result
$ java -XX:+HeapDumpOnOutOfMemoryError -Xmx2M Test
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid25711.hprof ...
Heap dump file created [14694890 bytes in 0,101 secs]
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
It works as i would want it to, but i would like to know why.
Looking at openjdk6 source code i've found the following
void report_java_out_of_memory(const char* message) {
static jint out_of_memory_reported = 0;
// A number of threads may attempt to report OutOfMemoryError at around the
// same time. To avoid dumping the heap or executing the data collection
// commands multiple times we just do it once when the first threads reports
// the error.
if (Atomic::cmpxchg(1, &out_of_memory_reported, 0) == 0) {
// create heap dump before OnOutOfMemoryError commands are executed
if (HeapDumpOnOutOfMemoryError) {
tty->print_cr("java.lang.OutOfMemoryError: %s", message);
HeapDumper::dump_heap_from_oome();
}
if (OnOutOfMemoryError && OnOutOfMemoryError[0]) {
VMError err(message);
err.report_java_out_of_memory();
}
}
}
How does the first if statement work?
| 0 | [
2,
15414,
12617,
8782,
1320,
1041,
790,
5171,
93,
29992,
693,
104,
382,
27,
15512,
8674,
800,
3726,
3726,
31,
57,
21,
1335,
16,
3767,
30,
485,
19,
9931,
15899,
9,
20,
7626,
70,
1041,
790,
5171,
93,
29992,
31,
22,
195,
868,
20,
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... |
C# string.IndexOf with itself returning 1 instead of 0
===
We have recently upgraded all our projects from .Net 3.5 to .Net 4. I have come across a rather strange issue w.r.t. string and IndexOf().
My code obviously does something slightly different, but in the process of investigating the issue, I found that doing an IndexOf() call on a string with itself, it returned 1 and not 0.
In other words:
string text = "--dely N.China";
int index = text.IndexOf(text);
Gave me an index of 1, instead of 0. A couple of things to note about this problem:
- The string above is not the correct string. In memory, the first dash has a char value of 173 and the second one has a char value of 45. I could not paste this string directly into the stack overflow editor, so I just put in two dashes. I am pretty sure it is that first dash which is causing the issue, but I do not know why.
- I have double checked, this does not happen in .Net 3.5 but does in .Net 4.
- Changing the IndexOf() to do an Ordinal compare fixes the issue, so for some reason that first character is ignored with the default index of.
Does anyone know why this happens? | 0 | [
2,
272,
5910,
3724,
9,
25671,
1041,
29,
1145,
2485,
137,
700,
16,
713,
800,
3726,
3726,
95,
57,
1989,
9958,
65,
318,
2314,
37,
13,
9,
2328,
203,
9,
264,
20,
13,
9,
2328,
268,
9,
31,
57,
340,
464,
21,
864,
2578,
1513,
619,
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... |
XPath query in Google docs does not match HTML source
===
Using [XpathBuilder](http://www.xpathbuilder.com/) I can construct a simple search engine query and pull data out of the search results using XPath. I have some simple examples in a Google Doc spreadsheet [here](https://docs.google.com/spreadsheet/ccc?key=0AtT1QPEACWUldE9CZno5WkhzVGZBXzhaMjdNc045Z3c), which runs the query "XPath tutorial" on various search engines and attempts to pull out the number of results each search engine returns.
There are some oddities about this that I don't understand. Firstly, the Google search does not return any results, but the XPath query looks OK. When I try this on a XPath testing site it says the HTML is not well formed! Secondly, the number of results found by the Bing Xpath query do not match the results given on the [Bing web page](http://www.bing.com/search?q=xpath+tutorial&count=30), even though there is only one XML node which matches the XPath query.
Where did it all go so wrong? | 0 | [
2,
993,
8353,
25597,
19,
8144,
9765,
18,
630,
52,
730,
13,
15895,
1267,
800,
3726,
3726,
568,
636,
396,
8353,
20904,
500,
5,
21127,
6903,
6483,
9,
396,
8353,
20904,
9,
960,
118,
6,
31,
92,
6960,
21,
1935,
2122,
1406,
25597,
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... |
Advantages vs. Disadvantages of sending email through Google/Gmail instead of from my server
===
I've read a lot of questions on stack about people who want to change their mail classes (i.e. swiftmailer) to send the emails with SMTP using their Google Apps server/email address.
The only real benefit to this that I can see is that a copy is placed in Gmail's sent folder. I overcome this currently (without SMTP) by just BCCing an email from my server to keep copies of everything that goes out (i.e. mail@whatever.com).
Does sending through Gmail's SMTP server help with Spam or that annoying "Google doesn't think this was sent by this server"? Is there anything else I'm overlooking?
Thanks all.
(and yes, my domain is a hosted by Google Apps for email/calendar/etc... the MX records are all set and functional). | 0 | [
2,
14683,
4611,
9,
13387,
18,
16,
4907,
8517,
120,
8144,
118,
263,
8079,
700,
16,
37,
51,
8128,
800,
3726,
3726,
31,
22,
195,
1302,
21,
865,
16,
2346,
27,
7566,
88,
148,
72,
259,
20,
753,
66,
4216,
2684,
13,
5,
49,
9,
62,
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... |
linking error when linking vc6 application to vc7 lib build with /MT foption
===
I build a static library(.lib) with vc7. I build it with /MT flag so there is no dependency of this lib on msvcr dll. Now when i am trying to link it with vc6 application i am getting unresolved external symbol error.
When i tried the same with dll built with /MT option on vc7 and link it with the same vc6 application it runs successfully.
Any idea what is the reason behind this??
Thanks | 0 | [
2,
12585,
7019,
76,
12585,
13,
8990,
379,
3010,
20,
13,
8990,
465,
13,
8326,
1895,
29,
13,
118,
79,
38,
398,
2594,
3309,
800,
3726,
3726,
31,
1895,
21,
12038,
1248,
5,
9,
8326,
6,
29,
13,
8990,
465,
9,
31,
1895,
32,
29,
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... |
Complex Select Query
===
i want implement like fb news feed and i have done following things but i don't know what should be the query to retrive that kind of data
i have these tables
**TABLE : posts**
This table used to store users status
post_id is AI and primary
username is the userid of user
share is the visibility control if it is public it shareable to everyone or if it shared with list of user then share filed contains share_id of that list.
+--------------+---------------+
| col_name | col_type |
+--------------|---------------+
| post_id | INT(11) |
+--------------|---------------+
| username | VARCHAR(50) |
+--------------|---------------+
| share | VARCHAR(50) |
+--------------|---------------+
| content | TEXT |
+--------------|---------------+
**TBALE : share**
This table store lists of user
share_id is AI and primary
share_name is name of shareing list.
+--------------+---------------+
| col_name | col_type |
+--------------|---------------+
| share_id | INT(11) |
+--------------|---------------+
| username | VARCHAR(50) |
+--------------|---------------+
| share_name | VARCHAR(50) |
+--------------|---------------+
**TABLE : share_member**
This table is child table of `share` which stores list of shared member.
+--------------+---------------+
| col_name | col_type |
+--------------|---------------+
| smid | INT(11) |
+--------------|---------------+
| share_id | IMT(11) |
+--------------|---------------+
| username | VARCHAR(50) |
+--------------|---------------+
i want get data of all user who allowed me see.including public. | 0 | [
2,
1502,
5407,
25597,
800,
3726,
3726,
31,
259,
8713,
101,
13,
13478,
996,
4063,
17,
31,
57,
677,
249,
564,
47,
31,
221,
22,
38,
143,
98,
378,
44,
14,
25597,
20,
302,
3367,
195,
30,
825,
16,
1054,
31,
57,
158,
7484,
13,
1409,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why should I create the context in main for a serial queue and in start for a concurrent queue?
===
There is topic about *Thread Confinement pattern* in [Core Data programming Guide][1] and it says that
> You must create the managed context on the thread on which is will be used. If you use NSOperation, note that its init method is invoked on the same thread as the caller. You must not, therefore, create a managed object context for the queue in the queue’s init method, otherwise it is associated with the caller’s thread. **Instead, you should create the context in main (for a serial queue) or start (for a concurrent queue)**.
I just can't get *why* is that? Where is the difference?
Thanks for future responses.
[1]: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/coredata/Articles/cdConcurrency.html#//apple_ref/doc/uid/TP40003385-SW1 | 0 | [
2,
483,
378,
31,
1600,
14,
4141,
19,
407,
26,
21,
5956,
22521,
17,
19,
799,
26,
21,
19513,
22521,
60,
800,
3726,
3726,
80,
25,
8303,
88,
1637,
96,
10647,
23621,
3732,
2483,
19,
636,
10375,
1054,
3143,
3378,
500,
2558,
165,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ExtJS: form elements lose focus style
===
A problem I was faced with is that there is no any focus frame (dashed border) on form elements: text fiels, buttons - when they are focused. This case is reproduced in IE9, Chrome but not in FF (FF displays focused elements the usual way).
So, we get that TAB key acts normally, but focus frame is absent, what confuses the user.
Also I should notice that I use ExtJS 3.3.1 API.
Does anybody have any suggestions in what's the problem?
Thank you in advance! | 0 | [
2,
1396,
38,
728,
18,
45,
505,
2065,
2926,
1776,
1034,
800,
3726,
3726,
21,
1448,
31,
23,
3110,
29,
25,
30,
80,
25,
90,
186,
1776,
3523,
13,
5,
593,
7399,
1862,
6,
27,
505,
2065,
45,
1854,
6028,
6798,
15,
12861,
13,
8,
76,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.Net AccountMembershipService moq
===
I'm doing a ASP.Net MVC2 project and i want to do some unit tests on it. I tried to test my LogOnController and i have faced some difficulties. In my LogOnController I used AccountMembershipService as,
AccountMembershipService MembershipService = new AccountMembershipService();
if (MembershipService.ValidateUser(model.UserName, model.Password)){
............
..........
}
I'm using MOQ framwork and i want to know how to mock AccountMembershipService. Eventhough i have given the correct username and password "`MembershipService.ValidateUser(model.UserName, model.Password)`" always return false. So any one of you have a idea about how to do this.. Thankyou.
| 0 | [
2,
28,
306,
9,
2328,
2176,
6990,
2418,
11449,
1873,
1251,
800,
3726,
3726,
31,
22,
79,
845,
21,
28,
306,
9,
2328,
307,
8990,
135,
669,
17,
31,
259,
20,
107,
109,
1237,
4894,
27,
32,
9,
31,
794,
20,
1289,
51,
6449,
103,
12898,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Run applet in Android tablet
===
I have already some applets ready.
I tried to run it on android tablet.
Will it not work at all?
I am not sure?
Do any one knows this? | 0 | [
2,
485,
4037,
38,
19,
13005,
16394,
800,
3726,
3726,
31,
57,
614,
109,
4037,
38,
18,
1451,
9,
31,
794,
20,
485,
32,
27,
13005,
16394,
9,
129,
32,
52,
170,
35,
65,
60,
31,
589,
52,
562,
60,
107,
186,
53,
3620,
48,
60,
3,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
UIScrollview contents not scrolling and sticky
===
i created a new UIScrollView using the interface builder, i put a label with a long text, the scrollbar is showing and sliding although the contents became sticky and not hiding while scrolling
screenshots
https://thumbs.rapidshare.com/thumbs/600/61D/B3641E8EAE1BA97C4F5AB67CA2065.jpg
https://thumbs.rapidshare.com/thumbs/600/D1E/0E8B0DEA90DD5F4B23A918624F9AF.jpg
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
title.text = @"hellllllo world hellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo worldhellllllo world";
scrollview.contentSize =
CGSizeMake(self.view.frame.size.width, self.view.frame.size.height+600);
//scrollview.maximumZoomScale = 4.0;
//scrollview.minimumZoomScale = 0.75;
scrollview.clipsToBounds = YES;
// scrollview.bounces = YES;
scrollview.superview.autoresizesSubviews = NO;
//scrollview.delegate = self;
[scrollview setScrollEnabled:YES];
// Do any additional setup after loading the view.
}
| 0 | [
2,
13,
5661,
3862,
8694,
4725,
8478,
52,
13,
28166,
17,
19087,
800,
3726,
3726,
31,
679,
21,
78,
13,
5661,
3862,
8694,
4725,
568,
14,
6573,
14960,
15,
31,
442,
21,
1899,
29,
21,
175,
1854,
15,
14,
12159,
1850,
25,
3187,
17,
7609... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the Client/Server Equivalent for ASP.NET MVC
===
I used to build a website on ASP.NET MVC. Now I want to build another web service. This time, I want to use a client application (running on Windows) and no web pages are needed. What technology should I choose? I am still using C# on both server- and client-side, and I might use mySQL. Thank you very much. | 0 | [
2,
98,
25,
14,
6819,
118,
10321,
106,
4602,
26,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
31,
147,
20,
1895,
21,
2271,
27,
28,
306,
9,
2328,
307,
8990,
9,
130,
31,
259,
20,
1895,
226,
2741,
365,
9,
48,
85,
15,
31,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 good advice to put Models/POCO's in separate DLL?
===
How does the principles say about put POCO's (Or Models in MVC) in a separate DLL? The point is to make the objects easier to move around when objects are distributed by different developers. At this actual scenario "we" are one developer that soon are two.
The other developer focus on GUI design and data from interfaces and a mock datasource to develope the GUI.
public class Customer
{
public int CustomerId { get; set; }
public string Name { get; set; }
}
Questions. Are there some drawbacks create a separate dll for the POCO's? Is it good? Why or why not?
| 0 | [
2,
25,
32,
254,
4978,
20,
442,
2761,
118,
1638,
716,
22,
18,
19,
1725,
13,
43,
211,
60,
800,
3726,
3726,
184,
630,
14,
5624,
395,
88,
442,
2353,
716,
22,
18,
13,
5,
248,
2761,
19,
307,
8990,
6,
19,
21,
1725,
13,
43,
211,
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... |
(jQuery) Create multidimensional object with multidimentional arrays
===
Im trying to build a somewhat advanced "Flot" jQuery pluging graph. For that, I need a multidimensional object (or at least I think it is).
The structure should look like this:
var datasets = {
"usa": {
label: "USA",
data: [[1988, 483994], [1989, 479060], [1990, 457648], [1991, 401949], [1992, 424705], [1993, 402375], [1994, 377867], [1995, 357382], [1996, 337946], [1997, 336185], [1998, 328611], [1999, 329421], [2000, 342172], [2001, 344932], [2002, 387303], [2003, 440813], [2004, 480451], [2005, 504638], [2006, 528692]]
},
"russia": {
label: "Russia",
data: [[1988, 218000], [1989, 203000], [1990, 171000], [1992, 42500], [1993, 37600], [1994, 36600], [1995, 21700], [1996, 19200], [1997, 21300], [1998, 13600], [1999, 14000], [2000, 19100], [2001, 21300], [2002, 23600], [2003, 25100], [2004, 26100], [2005, 31100], [2006, 34700]]
}
};
From my code-behind i've generated some lists looking like this (Not the same data, but dont mind that):
<ul id="MOBILISATION">
<li data-key="2012/3/27">02:10</li>
<li data-key="2012/3/28">05:25</li>
<li data-key="2012/3/29">09:21</li>
<li data-key="2012/3/30">00:00</li>
<li data-key="2012/3/31">00:00</li>
</ul>
<ul id="OPERATIONS">
<li data-key="2012/3/27">19:51</li>
<li data-key="2012/3/28">18:35</li>
<li data-key="2012/3/29">14:39</li>
<li data-key="2012/3/30">07:46</li>
<li data-key="2012/3/31">10:26</li>
</ul>
Where "USA/usa" is "MOBILISATION", "1988" is "2012/3/27" and "483994" is "02:10". You get picture!!??
I've tried writing some jQuery, but it obviously doesnt work:
var objects = [];
var array = [];
var categoryName = "";
$('div#Container ul').each(function () {
catName = $(this).attr('id');
$('li', this).each(function () {
array.push([new Date($(this).data('key')).getTime(), $(this).text()]);
});
objects.push({ categoryName: { label: categoryName, data: array} });
});
var datasets = objects;
As you can see i've used push to `objects` array. Clearly thats not giving me the result I want. Im kindda loosing whats up and down in this, as its the first time im working with javascript/jQuery objects.
Whats the best solution for this? | 0 | [
2,
13,
5,
728,
8190,
93,
6,
1600,
1889,
7865,
3095,
29,
1889,
1115,
1130,
872,
192,
7718,
18,
800,
3726,
3726,
797,
749,
20,
1895,
21,
4131,
2255,
13,
7,
14712,
38,
7,
487,
8190,
93,
10922,
68,
7210,
9,
26,
30,
15,
31,
376,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Incoming call auto answer in android 4.0.3
===
i am working in android technology last 1 years.currently i want develop an application incoming call auto answer in android 4.0.3 but in this version i am not getting any solution or can't find any api for this(ITelephony.aidl). plz suggest me.
Thanks and regards
rajeev pal | 0 | [
2,
17126,
645,
3108,
1623,
19,
13005,
268,
9,
387,
9,
240,
800,
3726,
3726,
31,
589,
638,
19,
13005,
1099,
236,
137,
122,
9,
24947,
31,
259,
2803,
40,
3010,
17126,
645,
3108,
1623,
19,
13005,
268,
9,
387,
9,
240,
47,
19,
48,
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... |
Multible events in c#
===
I am trying to program the Pokemon Trading Card Game using Visual C# 2010 but I ran into a little problem. I have three objects:
**Game**: Handles all of the game’s data and rules.
**Form1**: The window shown to the player. Displays all the info the player is allowed to see about the game and allows the player to interact with the game.
**ComputerAI**: This object tracks what the computer is supposed to know and holds the AI’s logic.
To keep things moving, the game raises a “PriorityChanged” event, to let both the player and the AI know that priority has changed and which one received it (in the EventArgs). The Form reports this info in a log and displays the messages: “Waiting for you” and “Waiting for opponent” as appropriate. The computerAI uses it to decide if it should run its logic or not. The problem I ran into was that when the event was raised the AI was told and ran its logic (playing cards etc), this caused the player to get priority and raised another PriorityChanged event, which the AI got and did nothing with (which was correct). Then the Form got both PriorityChanged events one after the other but in the wrong order.
To fix this I split the “PriorityChanged” event into two, “PriorityChanged” and “PriorityRecieved”. The Forms updates the display on the “PriorityChanged” event, and the AI runs its logic on the “PriorityRecieved” event. This solution worked, but it strikes me as wrong. Is there a better way? | 2 | [
2,
1889,
2854,
963,
19,
272,
5910,
800,
3726,
3726,
31,
589,
749,
20,
625,
14,
23132,
5205,
2056,
250,
568,
3458,
272,
5910,
498,
47,
31,
717,
77,
21,
265,
1448,
9,
31,
57,
132,
3916,
45,
13,
1409,
5128,
1409,
45,
3053,
18,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASPNETDB gets detached everytime the service is restarted
===
I have an ASPNETDB.mdf file that I have attached to database from within SQL Server Management Studio. I use that database for Membership. When I have just attached the the mdf file and created a database everything works fine. Authentication works fine.But if I restart the computer or SQLExpress service itself ASPNETDB stops working. When I enter Management Studio I can ASPNETDB there, but has no plus sign to its left. And if I try to grant permission to a user through User mapping a dialog appears saying "one or more database are inaccessible and will not be displayed". How can I avoid this problem? | 0 | [
2,
28,
306,
2328,
9007,
3049,
14631,
352,
891,
14,
365,
25,
27440,
800,
3726,
3726,
31,
57,
40,
28,
306,
2328,
9007,
9,
79,
8736,
3893,
30,
31,
57,
3638,
20,
6018,
37,
363,
4444,
255,
8128,
1097,
1120,
9,
31,
275,
30,
6018,
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... |
How to check a set of radio buttons that all are selected?
===
I've a list of radio buttons that are generated dynamically. The names of radio buttons are also generated dynamically. The first row of radio buttons has name 1, the second row radio buttons have name 2. Each row has three radio buttons with same name but different values.
How can I check using jquery that one radio button is selected in each row when submitting the form? | 0 | [
2,
184,
20,
2631,
21,
309,
16,
603,
12861,
30,
65,
50,
1704,
60,
800,
3726,
3726,
31,
22,
195,
21,
968,
16,
603,
12861,
30,
50,
6756,
7782,
1326,
9,
14,
1817,
16,
603,
12861,
50,
67,
6756,
7782,
1326,
9,
14,
64,
3131,
16,
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... |
FlashVars and AS2 loading dynamically named text file
===
I am attempting to load a dynamically generated textfile into an as2 script. This file will have a unique name each time. I have a working as2 script that will load the file just fine when specifically named, but not when I try to load it through a flashvar.
The line from the html that specifies it is here.
<param name=FlashVars value="myVariable=mytextfile.txt&mySecondVariable=2" />
the AS2 load variable here.
**my_data.load("mydata.txt");**
while we are at it, is this the right way to load this flashvar into the scroll_speed? variable.
**var scroll_speed:Number = mySecondVariable;**
| 0 | [
2,
4433,
3311,
18,
17,
28,
135,
12797,
7782,
1326,
377,
1854,
3893,
800,
3726,
3726,
31,
589,
6314,
20,
6305,
21,
7782,
1326,
6756,
1854,
16877,
77,
40,
28,
135,
3884,
9,
48,
3893,
129,
57,
21,
2619,
204,
206,
85,
9,
31,
57,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I avoid encoding errors using Net::OpenID::Consumer with Yahoo OpenIDs?
===
I've written a Dancer web app that utilizes Net::OpenID::Consumer to consume OpenIDs for authentication. It works well with Google and MyOpenID, but not Yahoo. When a user tries to authenticate using their Yahoo account, HTML::Parser warns "Parsing of undecoded UTF-8 will give garbage when decoding entities" and this warning kills my app (rightfully so).
I don't see any existing bugs with Net::OpenID::Consumer (or Common) that relate to this. The HTTP headers and the HTML meta tags both specify UTF-8 for the 'claimed id' URI. Why would the response not be decoded for HTML::Parser? Am I missing something obvious? | 0 | [
2,
184,
92,
31,
2658,
19608,
11908,
568,
4275,
45,
45,
10157,
1340,
45,
45,
12124,
723,
106,
29,
23553,
368,
9178,
60,
800,
3726,
3726,
31,
22,
195,
642,
21,
7799,
2741,
4865,
30,
13151,
18,
4275,
45,
45,
10157,
1340,
45,
45,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Querying AssemblyInformationalVersionAttribute while targeting Windows Mobile 5.0 PocketPC
===
I have a version number in my AssemblyInfo.cs file like so:
`[assembly: AssemblyInformationalVersion("0.0.0.2")]`
Normally I can access this information using [FileVersionInfo][1] and I *do* have a reference to System.dll (where this class is normally defined) but the System.Diagnostics namespace does not seem to be available.
Here's the path that VS says is the System assembly I'm referencing:
> C:\Program Files
> (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll
**In short:** How can I display the version string in my application?
[1]: http://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo.aspx | 0 | [
2,
25597,
68,
1475,
22793,
192,
10898,
721,
14755,
133,
15972,
1936,
3241,
331,
9,
387,
3397,
5779,
800,
3726,
3726,
31,
57,
21,
615,
234,
19,
51,
1475,
108,
4120,
9,
6824,
3893,
101,
86,
45,
13,
1,
2558,
29432,
45,
1475,
22793,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 whitespace characters in standard output
===
Display whitespace characters in Eclipse is [a simple trick][1], but unfortunately this applies only on Editor views.
Is there a way to display these characters in the Console view too? I would find it useful for checking if strings are correctly formatted. Any help?
[1]: http://stackoverflow.com/questions/364168/show-some-invisible-whitespace-characters-in-eclipse | 0 | [
2,
298,
359,
5582,
1766,
19,
1236,
5196,
800,
3726,
3726,
3042,
359,
5582,
1766,
19,
11652,
25,
636,
58,
1935,
5514,
500,
2558,
165,
500,
15,
47,
6200,
48,
13169,
104,
27,
1835,
4146,
9,
25,
80,
21,
161,
20,
3042,
158,
1766,
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... |
iPad IOS5 orientation
===
I am currently working on an application on the iPad. It only supports the portrait orientation but not the landscape. What code (what file) should be edited or added in the .m file in order to make it support the landscape left? I need all the pages in the app to support it. | 0 | [
2,
31,
8240,
13,
7760,
264,
10245,
800,
3726,
3726,
31,
589,
871,
638,
27,
40,
3010,
27,
14,
31,
8240,
9,
32,
104,
6747,
14,
5548,
10245,
47,
52,
14,
4453,
9,
98,
1797,
13,
5,
608,
3893,
6,
378,
44,
4802,
54,
905,
19,
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 ui droppable clone animation
===
I have a problem with jQuery UI Drag & Drop. In the following example, i want the boxes to fade in, if i drag&drop one into the green or red area. Problem is it only works the second time. Wehn i first drag&drop one, it stays at the drop position, but when i drag it again, it fits to the area. Here is the code: http://jsfiddle.net/G3vG6/1/
$(".boxArt").draggable({ revert: "invalid" }, { containment: "document", scroll: false }, {helper: "clone"});
$('.boxArt').bind('dragstop', function(event, ui) {
$(this).after($(ui.helper).clone().draggable({ revert: "invalid" }));
});
$(".drop").droppable({
accept: ".boxArt",
activeClass: 'droppable-active',
hoverClass: 'droppable-hover',
drop: function(ev, ui) {
//$(this).append("<br>Dropped!");
//ui.draggable.position( { of: $(this), my: 'left top', at: 'left top' } );
//Do your AJAX stuff in here.
var drop_p = $(this).offset();
var drag_p = ui.draggable.offset();
var left_end = drop_p.left - drag_p.left + 1;
var top_end = drop_p.top - drag_p.top + 1;
ui.draggable.animate({
top: '+=' + top_end,
left: '+=' + left_end
});
}
}); | 0 | [
2,
487,
8190,
93,
13,
5661,
2804,
306,
579,
13871,
6236,
800,
3726,
3726,
31,
57,
21,
1448,
29,
487,
8190,
93,
13,
5661,
5501,
279,
2804,
9,
19,
14,
249,
823,
15,
31,
259,
14,
8120,
20,
11381,
19,
15,
100,
31,
5501,
1569,
1236... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 repository location
===
With Git/Github for Windows, if I have a repository with this directory: `C:\dir1\dir2`, what do I need to do to move the repo files to `C:\dir1`? I can obviously physically copy and paste the files, but what do I need to do on the Git side?
I have this repo on GitHub and I use Git Bash and GitHub for Windows. | 0 | [
2,
753,
24869,
1474,
800,
3726,
3726,
29,
13,
10404,
118,
10404,
20926,
26,
1936,
15,
100,
31,
57,
21,
24869,
29,
48,
16755,
45,
13,
1,
150,
45,
1,
9035,
165,
1,
9035,
135,
1,
15,
98,
107,
31,
376,
20,
107,
20,
780,
14,
302,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Xcode: Can't access the property of a parent Class correct
===
I am actuallay working at a an Interface for an iPhone App. I recognised that I have repeating objects in my different views so i want to make a parent ViewController. But now when i want to acces a property of this parent ViewController from a child ViewController I get some problems. To be specific I want to have a general ProgressView in each View but I want it to be hidden when the View appears. When I access the ProgressView.hidden from the child ViewController i get no errormessage, but at the running programm nothing happens.
My Code looks like this:
ParentViewController.h:
#import <UIKit/UIKit.h>
@interface ParentViewController : UIViewController{
UIProgressView *progressView;
}
@property (readwrite) UIProgressView *progressView;
@end
ParentViewController.m:
- (void)viewDidLoad
{
CGRect progressViewFrame = CGRectMake(0, 407, 320, 9);
progressView = [[UIProgressView alloc] initWithFrame:progressViewFrame];
progressView.hidden = TRUE;
[self.view addSubview:progressView];
[super viewDidLoad];
}
ChildViewController.h:
#import <UIKit/UIKit.h>
#import "ParentViewController.h"
@interface ChildViewController : ParentViewController
@end
ChildViewController.m:
- (void)viewDidLoad
{
progressView.hidden = FALSE;
[super viewDidLoad];
}
if i do it like this the ProgressView Bar stays hidden and i get no errors. I also checked whether the viewDidLoad method was called and yes it gets called.
greetings
C4rmel
| 0 | [
2,
993,
9375,
45,
92,
22,
38,
1381,
14,
1354,
16,
21,
4766,
718,
4456,
800,
3726,
3726,
31,
589,
3463,
4414,
638,
35,
21,
40,
6573,
26,
40,
21024,
4865,
9,
31,
7163,
30,
31,
57,
17389,
3916,
19,
51,
421,
4146,
86,
31,
259,
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... |
Making user-defined literals with pre-processor
===
I'm trying to write a macro, that makes a user-defined literal out of a regular string literal. The following two lines should create the token `"foobar"_literal`:
#define AS_LITERAL(TEXT) TEXT ## _literal
AS_LITERAL("foobar");
However, the pre-processor of _GCC-4.7_ reports the following error:
error: pasting ""foobar"" and "_literal" does not give a valid preprocessing token
How to do that right?
| 0 | [
2,
544,
4155,
8,
13439,
20665,
18,
29,
782,
8,
16835,
248,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
21,
9069,
15,
30,
1364,
21,
4155,
8,
13439,
20665,
70,
16,
21,
1290,
3724,
20665,
9,
14,
249,
81,
1560,
378,
1600,
14,
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... |
Facebook API batch request using Tornado
===
I am using Tornado to issue requests to FB's API and I'd like to know if there is the possibility to send batch requests. A first inspection of the source code of facebook_request() in Tornado reveals that there's no provision for batch requests. Does anybody know if that is possible? | 0 | [
2,
9090,
21,
2159,
13064,
3772,
568,
12306,
800,
3726,
3726,
31,
589,
568,
12306,
20,
1513,
12279,
20,
13,
13478,
22,
18,
21,
2159,
17,
31,
22,
43,
101,
20,
143,
100,
80,
25,
14,
4813,
20,
2660,
13064,
12279,
9,
21,
64,
9762,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 wrong with these MySQL column constraints?
===
I'm getting a syntax error when I try to create this column in MySQL 5.5.24:
\`count\` mediumint unsigned not null default=0
What's wrong? | 0 | [
2,
98,
22,
18,
1389,
29,
158,
51,
18,
22402,
4698,
16747,
60,
800,
3726,
3726,
31,
22,
79,
1017,
21,
22649,
7019,
76,
31,
1131,
20,
1600,
48,
4698,
19,
51,
18,
22402,
331,
9,
264,
9,
1996,
45,
13,
1,
16549,
1,
4152,
6391,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
How to animate a 3D character?
===
I have some 3D character model, and I would like to animate them, to use them in my project. The resuld should be a keyframe animated collada.
I need only the basic movements: walk, run, aim, die...
Are there any programs for that? I unfortunatly can't really use Blender or 3D studio max.
I don't know, where else can I ask it, so I hope you can help me.
Thanks in advance, | 0 | [
2,
184,
20,
14487,
591,
21,
203,
43,
925,
60,
800,
3726,
3726,
31,
57,
109,
203,
43,
925,
1061,
15,
17,
31,
83,
101,
20,
14487,
591,
105,
15,
20,
275,
105,
19,
51,
669,
9,
14,
10719,
1287,
43,
378,
44,
21,
1246,
8361,
5784,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Easily branded site architecture
===
I recently attended a demo of a large-scale enterprise system, whose web pages may be customised to the point of including fields added by the client. The way I understand it, their architecture is made up of the following layers:
1. Database
2. Web service API
3. XML files that dictate layout
4. The web pages that are generated from the XML files.
When I was asked to investigate building a web portal which could be easily branded, that struck me as a good way of going about it. The question now, is how one would design it.
I understand the database and web service layers, but I am a little confused by the various possibilities for building web sites in .NET.
Considering the requirement for customisability and the architecture from above, here is how I understand the options:
1. Webforms - the option I am most familiar with, but it is essentially enriched HTML with code-behind. I think there will probably be a lot of work to make it work with the idea of an XML layout.
2. WPF - the XAML middle layer is built-in, but as I understand it, WPF can only really be used in browser applications and not websites.
3. Silverlight - more for building applets than websites, right?
4. MVC - This looks interesting, but all the demos I have seen use Entity Framework as well. It seems to me like Entity Framework with all its automatic code generation is much more suitable to applications that are all new. In my case, I have a very large database that already exists.
If none of the above are suitable, I thought of an alternative. One could do a stock standard Webforms site with a web service that returns the branding elements. That isn't quite the same as what I described at the top, but is sufficient for my needs.
Or am I barking up the wrong tree? | 0 | [
2,
2351,
15274,
689,
2607,
800,
3726,
3726,
31,
1989,
1394,
21,
8376,
16,
21,
370,
8,
5093,
6002,
329,
15,
1196,
2741,
4434,
123,
44,
5816,
2541,
20,
14,
454,
16,
215,
2861,
905,
34,
14,
6819,
9,
14,
161,
31,
1369,
32,
15,
66,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regex that splits long text in separate sentences with match()
===
This is a textarea where the user writes some text. I've written an example in it.
<textarea id="text">First sentence. Second sentence? Third sentence!
Fourth sentence.
Fifth sentence
</textarea>
**Requirements already considered in the regex**
* separator should be included in array item
* last sentence doesn't necessarily require a separator character (it can end with any character)
* if a sentence has more than one separator char, it should also be included in the array item. Example: **second sentence?!?** should be [...,"second sentence?!?",...]
**Missing requirement (I need help with this)**
Each new line should be represented by an empty array item. If the regex is applied, this should be the response:
["First sentence.", "Second sentence?", "Third sentence!", "", "Fourth sentence.", "", "", "Fifth sentence"]
Instead, I'm receiving this:
["First sentence.", "Second sentence?", "Third sentence!", "Fourth sentence.", "Fifth sentence"]
This is the regex and match call:
var tregex = /[^\r\n.!?]+(:?(:?\r\n|[\r\n]|[.!?])+|$)/gi;
var sentences = $('#text').val().match(tregex).map($.trim);
Any ideas? Thanks! | 0 | [
2,
7953,
1706,
30,
2132,
18,
175,
1854,
19,
1725,
13453,
29,
730,
5,
6,
800,
3726,
3726,
48,
25,
21,
1854,
17760,
113,
14,
4155,
6215,
109,
1854,
9,
31,
22,
195,
642,
40,
823,
19,
32,
9,
13,
1,
11969,
17760,
4924,
3726,
7,
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... |
Java Source Code Analyzer Open-Source
===
I'm looking for Java Source Code Analyzer Open-Source tool in eclipse. Anybody know one? Thanks! | 4 | [
2,
8247,
1267,
1797,
16051,
139,
368,
8,
12097,
800,
3726,
3726,
31,
22,
79,
699,
26,
8247,
1267,
1797,
16051,
139,
368,
8,
12097,
5607,
19,
11652,
9,
11181,
143,
53,
60,
3669,
187,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
GAE Simple Request Handler only run once
===
Good day!<br>
<br>
https://developers.google.com/appengine/docs/python/gettingstarted/helloworld<br>
this is the hello world that I'm trying to run.<br>
<br>
I can seeing the<br>
Hello, world!
Status: 500
message. however it will be turned to a "HTTP Error 500" after I hit the refresh.<br>
and I found out the appengine only shows me the good result once after I re-save either app.yaml or helloworld.py<br>
<br>
This is the trace for the good result... (odd, I'm getting Errors even though the result is displayed.)
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 239, in _LoadHandler
raise ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'helloworld' from 'D:\work\[GAE] tests\helloworld\helloworld.pyc'> has no attribute app
INFO 2012-06-23 01:47:28,522 dev_appserver.py:2891] "GET /hello HTTP/1.1" 200 -
ERROR 2012-06-23 01:47:30,040 wsgi.py:189]
and this is the trace for the Error 500
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files\Google\google_appengine\google\appengine\runtime\wsgi.py", line 239, in _LoadHandler
raise ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'helloworld' from 'D:\work\[GAE] tests\helloworld\helloworld.pyc'> has no attribute app
INFO 2012-06-23 01:47:30,127 dev_appserver.py:2891] "GET /hello HTTP/1.1" 500 -
<br>
here's my helloworld.py
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
my main.py. (app is used instead of application)
import webapp2
class hello(webapp2.RequestHandler):
def get(self):
self.response.out.write('normal hello')
app = webapp2.WSGIApplication([
('/', hello),
], debug = True)
and the app.yaml
application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /hello
script: helloworld.app
- url: /.*
script: main.app
libraries:
- name: webapp2
version: "2.5.1"
<br>
any clue what's causing this?<br>
<br>
Regards, | 0 | [
2,
13,
17721,
1935,
3772,
24641,
104,
485,
382,
800,
3726,
3726,
254,
208,
187,
1,
5145,
1,
13,
1,
5145,
1,
7775,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
960,
118,
7753,
16847,
118,
13799,
18,
118,
6448,
11570,
118,
27380,
13680,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Including already existing variable in a function
===
Im trying to make a function, that takes an input, determines its value, and outputs a word from an already existing array that has been included in the script. The problem is the output is blank, i believe the function ignores variables already in the script, is there a way to change this so existing variables arent ignored by the function?
Here is the function:
The words need to be from an array because of multi-lingual requirements.
function get_genre($id)
{
if($id == "1"){
$genre = $lang['277'];
}
if($id == "2"){
$genre = $lang['278'];
}
if($id == "3"){
$genre = $lang['279'];
}
if($id == "4"){
$genre = $lang['280'];
}
if($id == "5"){
$genre = $lang['281'];
}
if($id == "6"){
$genre = $lang['282'];
}
if($id == "7"){
$genre = $lang['283'];
}
if($id == "8"){
$genre = $lang['284'];
}
if($id == "9"){
$genre = $lang['285'];
}
if($id == "10"){
$genre = $lang['286'];
}
if($id == "11"){
$genre = $lang['287'];
}
if($id == "12"){
$genre = $lang['288'];
}
if($id == "13"){
$genre = $lang['289'];
}
if($id == "14"){
$genre = $lang['290'];
}
if($id == "15"){
$genre = $lang['374'];
}
return $genre;
} | 0 | [
2,
215,
614,
3149,
7612,
19,
21,
1990,
800,
3726,
3726,
797,
749,
20,
233,
21,
1990,
15,
30,
1384,
40,
6367,
15,
3746,
18,
82,
1923,
15,
17,
5196,
18,
21,
833,
37,
40,
614,
3149,
7718,
30,
63,
74,
506,
19,
14,
3884,
9,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fancybox 2 load page, flows beyond browser without scrolling
===
I'm loading a page dynamically via fancybox and AJAX. Everything is fine except when the dynamically loaded page is too tall for the screen. It will simply overflow past the bottom of the screen.
How do I implement scrolling so that I scroll down? I'm using..
function dynamic_page(){
var url = "#ajax url here#";
$.fancybox.showLoading();
$.post(url, function(res){
$.fancybox.open(res,{
afterClose : function (){
$("#remove_val").val(0);
}
});
$.fancybox.update();
});
}
All help would be appreciated | 0 | [
2,
12251,
5309,
172,
6305,
2478,
15,
5188,
1701,
16495,
366,
13,
28166,
800,
3726,
3726,
31,
22,
79,
12797,
21,
2478,
7782,
1326,
1197,
12251,
5309,
17,
20624,
9,
796,
25,
1123,
1613,
76,
14,
7782,
1326,
8572,
2478,
25,
266,
2263,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Partially deserialize a json object in a restful post call
===
I am trying to get a method in springmvc to accept a partial json string of an object, and have jackson automatically de-serialize it for me.
I can solve it by making a temporary object with only the attributes I want, or pass it in as a string and use Gson to desearialize it for me, but these feel hacky. Is there any way to tell jackson how to do it?
Here is the controller snippet:
@RequestMapping(value = "/task",
method = RequestMethod.POST,
consumes="application/json")
public @ResponseBody String postTask(@RequestBody Task task){
if(task.getId() == null){
task.setId(UUID.randomUUID());
}
if(task.getDate_entered() == 0){
task.setDate_entered(System.currentTimeMillis());
}
TaskDao.addTask(task);
return "success";
}
And the task, a basic pojo:
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Task {
private UUID id;
private String name;
private String description;
private long date_entered;
private long finish_by;
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
// Rest of the getters and setters
}
If you can't tell by my other spring related questions, I'm kind of flying blind, and can't figure out the proper google query for this one.
Thanks! | 0 | [
2,
5933,
1746,
106,
2815,
2952,
21,
487,
528,
3095,
19,
21,
760,
1566,
678,
645,
800,
3726,
3726,
31,
589,
749,
20,
164,
21,
2109,
19,
1573,
79,
8990,
20,
3440,
21,
7284,
487,
528,
3724,
16,
40,
3095,
15,
17,
57,
2303,
7499,
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 load app-wide settings at startup (for Spring3 webapp)?
===
I am in the basic stages of writing a Spring3 MVC webapp with Hibernate. I want all of data model classes to be able to access basic configuration values for example, database table prefix name, etc. I want this option, so I (or other developers) can change things on the fly by modifying them in the .properties file.
Is my best bet to create a Config class in a util package with a static block that loads a bunch of properties from a .properties file? I suppose the class itself could be static with a variety of getters to access the values within.
If I choose the method above, how could I insure the application didn't load (Failed gently) if for some reason the .properties file I have specified was not able to be loaded? With exceptions?
If my way stinks, what might be a better scenario?
Thanks! | 0 | [
2,
184,
20,
6305,
4865,
8,
8077,
12410,
35,
20205,
13,
5,
1106,
1573,
240,
2741,
7753,
6,
60,
800,
3726,
3726,
31,
589,
19,
14,
2125,
4891,
16,
1174,
21,
1573,
240,
307,
8990,
2741,
7753,
29,
4148,
2102,
8820,
9,
31,
259,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dropdown for each cell in tabular data
===
I have a very large html table that is similar to the following:
<table>
<tr>
<td>value1</td>
<td>value2</td>
</tr>
<tr>
<td>value3</td>
<td>value4</td>
</tr>
</table>
For each value I need to have a dropdown, where a user can click to change the value. This would trigger an ajax function. What would be the best way to do this? A dropdown in each <td>? One dropdown that changes position? How should i go about adding this? | 0 | [
2,
2804,
2968,
26,
206,
1667,
19,
6523,
7451,
1054,
800,
3726,
3726,
31,
57,
21,
253,
370,
13,
15895,
859,
30,
25,
835,
20,
14,
249,
45,
13,
1,
5924,
1,
13,
1,
6384,
1,
13,
1,
38,
43,
1,
15165,
165,
1,
118,
38,
43,
1,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
hadoop eclipse plugin installation directory
===
I am new to hadoop and eclipse. Can anyone tell me the format of the Installation directory for hadoop eclipse plugin when try to add a new hadoop server. I googled and tried hours with no luck getting desperate... Any help will be greatly appreciated | 0 | [
2,
41,
21709,
11652,
10922,
108,
7758,
16755,
800,
3726,
3726,
31,
589,
78,
20,
41,
21709,
17,
11652,
9,
92,
1276,
494,
55,
14,
2595,
16,
14,
7758,
16755,
26,
41,
21709,
11652,
10922,
108,
76,
1131,
20,
3547,
21,
78,
41,
21709,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
shell script to connect to a mysql
===
i currently use this command to connect to an already running db. I am working with tsch shell and this is the command that i am using to connect to my db
mysql -uusername -ppassword
I am attempting to write a csh script that will connect to the mysql server in the same way. Currently this is what i have come up with
#!bin/csh -f
#This file contains commands used to simply connect to a database and read all columns
#from a database called test
#CALLS :{MYSQL_HOME}/bin/mysql
set MYSQL=${MYSQL_HOME}/bin/mysql
${MYSQL}${CDBUSER}
what is the correct way to set my env variable to point to a string that contains both password and username to connect to the database. This is what i figured it should be
setenv CDBUSER="-uusername -ppassword"
or maybe i should change it to just a regular variable such as set CBUSER="-uusername -ppassword"?
| 0 | [
2,
3593,
3884,
20,
6379,
20,
21,
51,
18,
22402,
800,
3726,
3726,
31,
871,
275,
48,
1202,
20,
6379,
20,
40,
614,
946,
13,
9007,
9,
31,
589,
638,
29,
13,
10069,
3593,
17,
48,
25,
14,
1202,
30,
31,
589,
568,
20,
6379,
20,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I Publish my WCF Service?
===
I want to use my webservice on internet. I opened my port which is 4501 an I disabled firewall on modem and on windows. I can write my global ip and I can open modem control inteface. But I want to connect to iis which address is xx.xx.xx.xx:4501/Products.svc
It works on localhost (http://localhost:4501/Product.svc) But I cant connect to svc on internet ..
I dont know where is problem.
When I add my svc link addres as adding reference service I got this error
There was an error downloading 'http://xx.xx.xx.xx:4501/Products.svc'.
Unable to connect to the remote server
Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı xx.xx.xx.xx:4501
Metadata contains a reference that cannot be resolved: 'http://xx.xx.xx.xx:4501/Products.svc'.
There was no endpoint listening at http://xx.xx.xx.xx:4501/Products.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Unable to connect to the remote server
Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı xx.xx.xx.xx:4501
If the service is defined in the current solution, try building the solution and adding the service reference again.
And One point more,
If I start to IIS, wcf service doesnt work even in localhost. If I start it in Visual Studio (I mean asp.net development service works) it works..
IIS version is 7.5.7600 and I added application pool as Asp.net 4.0
| 0 | [
2,
184,
92,
31,
10824,
51,
11801,
410,
365,
60,
800,
3726,
3726,
31,
259,
20,
275,
51,
2741,
11449,
27,
2620,
9,
31,
520,
51,
1295,
56,
25,
15402,
165,
40,
31,
10154,
535,
6051,
27,
3740,
79,
17,
27,
1936,
9,
31,
92,
2757,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
strings from DynamoDB that were originally byte arrays have funky values
===
Now I'm not sure if this is something I'm doing wrong, or something thats happening in DynamoDB..
Basically, Im building a simple registration/login system for my project, saving the userdata/password in a DynamoDB instance with the password hashed using RIPEMD160, and salted as well using C#'s `RNGCryptoServiceProvider()`.
Registration seems to work perfectly fine. the issue is upon login, no matter what, the passwords dont match up, and I think its because I'm getting some funky characters back when pulling the hash/salt back from DynamoDB. First off, both the hash and the salt are byte arrays of length 20, and converted to strings before saved in the database.
These examples are copy/pasted from the dynamo web interface
Example Hash: ">�Bb.ŧ�E���d��Ʀ"
Example Salt: "`���!�!�Hb�m�}e�"
When they're coming back and I debug into the function that pulls back the data from dynamo, both strings have different characters (VS2010 Debugger):
Returned Hash: "u001B>�Bb.ŧ�E��u0003�d�u001C�Ʀ"
Returned Salt: "`���!u000B�!�Hb�u001Dmu0012�u0001}e�"
Seems these u001B, u000B, u001D, u0012, u0003, u001C, and u0001 are sneaking into the returned data, and I'm not entirely sure whats going on? | 0 | [
2,
7887,
37,
18120,
9007,
30,
46,
912,
34,
591,
7718,
18,
57,
11275,
93,
4070,
800,
3726,
3726,
130,
31,
22,
79,
52,
562,
100,
48,
25,
301,
31,
22,
79,
845,
1389,
15,
54,
301,
30,
18,
4942,
19,
18120,
9007,
9,
9,
11374,
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... |
Do I have to pay for Qt license to develop a commercial application for Symbian OS?
===
I have the intention to develop a commercial, closed-source application for mobile phones.
I've choosen to start with Symbian OS, as I've got a Symbian phone as
well, and I really like it.
I would like to adopt Qt, because it's actually the way suggested by
Nokia, and because I know I could port my app quite easily to ios and
other platforms by using the Qt libraries.
So, having to make the choose between Qt and C/C++/Carbide
I have one compelling question:
do I have to pay to obtain a license for using the Qt to develop a
commercial closed-source program?
Truly, I won't to pay for using a development tool, as I'm not sure I
could return on my investment. Besides, I have also to pay to open an
account for hosting my app on the stores.
Please feel free to correct my English if it sounds bad. Thnx. | 0 | [
2,
107,
31,
57,
20,
1372,
26,
2593,
38,
3962,
20,
2803,
21,
1439,
3010,
26,
13,
7261,
10035,
13,
759,
60,
800,
3726,
3726,
31,
57,
14,
5140,
20,
2803,
21,
1439,
15,
827,
8,
12097,
3010,
26,
3241,
14830,
9,
31,
22,
195,
3538,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
antlr: how to use String.format inside action
===
I have the a rule with an action defined as follows:
metric_expr
: metric=NAME ('AS' label=NAME)? {System.out.println(String.format("%s: %s", metric, label));}
;
I got the error says:
error(146): com\foo\bar\PRL.g:65:54: invalid StringTemplate % shorthand syntax: '%s'
Anyone know how to workaround this? | 0 | [
2,
40,
38,
12988,
45,
184,
20,
275,
3724,
9,
23588,
572,
1028,
800,
3726,
3726,
31,
57,
14,
21,
1828,
29,
40,
1028,
2811,
28,
2415,
45,
11544,
1,
6899,
139,
13,
45,
11544,
3726,
7259,
13,
5,
22,
472,
22,
1899,
3726,
7259,
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... |
Facebook registration plug-in and Login button
===
I'm using the XFBML tag fb:registration to generate a registration form when a user visiting my site is logged into Facebook. However, if the user is NOT logged into Facebook, the plug-in renders a "Log in to Facebook" button. The problem... if a user encounters this button using a mobile device, they are directed to the desktop version of the Facebook login.
Does anyone know how to force the button to link to the mobile version?
Or is it better to detect if a user is currently logged into Facebook and, if so, use the fb:login-button tag?
Thanks. | 0 | [
2,
9090,
8587,
10922,
8,
108,
17,
6738,
108,
5167,
800,
3726,
3726,
31,
22,
79,
568,
14,
993,
13478,
8184,
3383,
13,
13478,
45,
12463,
702,
5946,
20,
7920,
21,
8587,
505,
76,
21,
4155,
4803,
51,
689,
25,
13,
19287,
77,
9090,
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... |
Title bar keeps appearing, even with requestWindowFeature or android:theme
===
My question is exactly the sabe as http://stackoverflow.com/questions/4950901/custom-titlebar-system-titlebar-being-shown-for-a-brief-moment
But I couldn't achieve the same results as @Jerry wrote on best answer. "When I switched to using a theme to tell the framework I didn't want a title, the problem went away and I now see my own title directly on first load"
My code:
Manifest:
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="3" android:versionName="1.0.2"
package="androidhive.dashboard" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:icon="@drawable/icone" android:label="@string/app_name">
<activity
android:name="com.androidhive.dashboard.SplashScreen"
android:theme="@android:style/Theme.NoTitleBar"
android:label="@string/app_name"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/SplashTheme"
>
<ImageView
android:id="@+id/splashscreen_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:contentDescription="Splash"
android:scaleType="centerCrop"
android:src="@drawable/splash"
style="@style/SplashTheme" />
</LinearLayout>
Style:
<style name="SplashTheme" parent="@android:Theme.Black">
<item name="android:windowNoTitle">true</item>
<item name="android:background">@drawable/splash</item>
</style>
SplashScreen.java
public class SplashScreen extends Activity implements Runnable{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setTheme(R.style.SplashTheme);
setContentView(R.layout.splashscreen_layout);
Handler h = new Handler();
h.postDelayed(this, 15000);
}
@Override
public void run() {
startActivity(new Intent(this, AndroidDashboardDesignActivity.class));
finish();
}
}
Thank you for helping! | 0 | [
2,
581,
748,
8968,
4870,
15,
166,
29,
3772,
27508,
26956,
54,
13005,
45,
124,
790,
800,
3726,
3726,
51,
1301,
25,
1890,
14,
11303,
62,
28,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
13722,
20790,
3165,
8197,
4636,
6015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bitmap returned, Uri needed
===
be kind this is my first post.
I have a Crop intent retuning and assigning the Bitmap to an ImageView. But what i want is the URI of the new bitmap.
How can i either get the Uri from the 'photo' var, or return the URI with the intent result.
protected void onActivityResult(int requestCode, int resultCode, Intent data)
case CROP_FROM_CAMERA:
Log.d(TAG, "Returned from Crop");
Bundle extras = data.getExtras();
Uri uriCropped = data.getData();
if (extras != null) {
Bitmap photo = extras.getParcelable("data");
Log.d(TAG, "Setting Crop preview with URI: " + uriCropped);
ImageView mImageView2 = (ImageView) findViewById(R.id.mImageView);
mImageView2.setImageURI(uriCropped);
}
File f = new File(mImageCaptureUri.getPath());
if (f.exists()) f.delete();
startX(<URI of 'photo' needed>);
break;
Thanks in advance. | 0 | [
2,
1142,
15022,
587,
15,
13,
3594,
851,
800,
3726,
3726,
44,
825,
48,
25,
51,
64,
678,
9,
31,
57,
21,
9833,
6936,
302,
7736,
68,
17,
13952,
68,
14,
1142,
15022,
20,
40,
1961,
4725,
9,
47,
98,
31,
259,
25,
14,
13,
3594,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What does this jQuery code with square brackets and a caret mean?
===
What does this jQuery code mean?
$('tr[id^="message"]') | 0 | [
2,
98,
630,
48,
487,
8190,
93,
1797,
29,
735,
21971,
17,
21,
781,
38,
884,
60,
800,
3726,
3726,
98,
630,
48,
487,
8190,
93,
1797,
884,
60,
5579,
5,
22,
6384,
2558,
1340,
1,
3726,
7,
3845,
18,
1303,
7,
500,
22,
6,
3,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Script hangs on attempt to close modal dialog
===
Have a problem when trying to close modal dialog in browser. The code is similar to the following one:
1) driver.switchTo().window(1);
2) driver.close();
3) driver.switchTo().window(0);
The problem is that code execution hangs on line number 2. I believe that's because of browser (none web) dialog saying "The web page you are viewing is trying to close the window..." appearance. The script goes forward after I close the confirmation dialog manually. So, I wonder if somebody have any ideas about how to handle this issue.
I work with IE8 browser with webdriver 2.24.1.
Thanks.
| 0 | [
2,
3884,
4546,
18,
27,
1735,
20,
543,
13,
20756,
28223,
800,
3726,
3726,
57,
21,
1448,
76,
749,
20,
543,
13,
20756,
28223,
19,
16495,
9,
14,
1797,
25,
835,
20,
14,
249,
53,
45,
137,
6,
2425,
9,
18,
15915,
262,
5,
6,
9,
27508... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DataFormatString formats percentage wrong
===
I have this field from the database which is:
DataType: Numeric (7, 3)
So will allow max number
9999.99
Into the database.
I put the number
10.000
Into the database, and now I'm retrieving out of the database using:
<asp:GridView>
I specify:
<asp:BoundField DataFormatString="{0:p}" />
And it outputs
1,000.00%
Which is suppose to be
10.00%
Why isn't it?
I also can't put <% %> server runtime tags into a:
<asp:TemplateField />
Why is this? | 0 | [
2,
1054,
23588,
11130,
13767,
5780,
1389,
800,
3726,
3726,
31,
57,
48,
575,
37,
14,
6018,
56,
25,
45,
1054,
4474,
45,
15764,
596,
13,
5,
465,
15,
203,
6,
86,
129,
1655,
2049,
234,
561,
23170,
9,
3483,
77,
14,
6018,
9,
31,
442,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
mvc 3 conditional Remote Validation
===
Here's my model:
public class StockRequestModel
{
public int StockID { get; set; }
public int CategoryID { get; set; }
public int ItemID { get; set; }
public string TranCode { get; set; }
[Remote("CheckAvailableStocks", "Validation", AdditionalFields = "ItemID")]
public int ItemQuantity { get; set; }
public decimal ItemValue { get; set; }
public int PurchaseOrderID { get; set; }
public int MaterialRequesitionID { get; set; }
public int ReturnedByID { get; set; }
public string Remarks { get; set; }
public DateTime LastUpdateDate { get; set; }
}
This model was used by multiple pages on my site. Please help me on how to enable/disable this remote on certain pages only?
Thanks
| 0 | [
2,
307,
8990,
203,
21206,
5388,
27999,
800,
3726,
3726,
235,
22,
18,
51,
1061,
45,
317,
718,
2070,
99,
10351,
13998,
13,
1,
317,
19,
38,
2070,
1340,
13,
1,
164,
73,
309,
73,
13,
1,
317,
19,
38,
3230,
1340,
13,
1,
164,
73,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
plot tick level control
===
Here is my question:
myd <- data.frame (V1 = paste ("V", 1:1000), V2 = rnorm(1000))
plot(myd[,1], myd[,2])
![enter image description here][1]
As my plot is busy in axis, I want to just put tick markers at every 100 and display corresponding labels. Also tick only (without label) is displayed at between two hundred ticks. For example, ticks and labels at 1, 100, 200, 300.....1000, ticks only at 50, 150, 250, 350 ......950
How I can I achieve this ?
[1]: http://i.stack.imgur.com/Kwp0E.jpg | 0 | [
2,
3798,
8809,
662,
569,
800,
3726,
3726,
235,
25,
51,
1301,
45,
51,
43,
13,
1,
8,
1054,
9,
8361,
13,
5,
710,
165,
800,
640,
62,
13,
5,
7,
710,
7,
15,
6352,
19484,
6,
15,
566,
135,
800,
761,
4747,
79,
5,
19484,
6,
6,
379... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to remove gaps on TabControl?
===
Could somebody know how to avoid left and right gaps (each about 5-10 px) between a page on TabControl and TabControl itself. I tried everything. All margins and padings are zero. | 0 | [
2,
184,
20,
4681,
4127,
18,
27,
6523,
12898,
60,
800,
3726,
3726,
110,
8861,
143,
184,
20,
2658,
225,
17,
193,
4127,
18,
13,
5,
14322,
88,
331,
8,
1036,
351,
396,
6,
128,
21,
2478,
27,
6523,
12898,
17,
6523,
12898,
1145,
9,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
Need to know the regex format that shouldnt allow a particular string
===
I need to know the regex that doesnot allow the string delete all but it should accept everything delete followed by anything
For Ex: it should not allow delete all but it should allow delete 1, delete xyz, etc....
Please help me out. | 0 | [
2,
376,
20,
143,
14,
7953,
1706,
2595,
30,
18249,
1655,
21,
1498,
3724,
800,
3726,
3726,
31,
376,
20,
143,
14,
7953,
1706,
30,
630,
1270,
1655,
14,
3724,
27448,
65,
47,
32,
378,
3440,
796,
27448,
709,
34,
602,
26,
1396,
45,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to align list elements left, right and centered
===
look at this fiddle:
http://jsfiddle.net/ugxNK/
I want that the first list element is in the left corner, the middle in the center and the right one in the right corner.
How could I do this dynamicly so for different screen sizes?
I only know to align them with margins.
Regards! | 0 | [
2,
184,
20,
23389,
968,
2065,
225,
15,
193,
17,
10583,
800,
3726,
3726,
361,
35,
48,
12759,
45,
7775,
6903,
728,
18,
1707,
12312,
9,
2328,
118,
5127,
396,
5719,
118,
31,
259,
30,
14,
64,
968,
4520,
25,
19,
14,
225,
1531,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MessageDialog task not shown if i use Task.Wait() instead of await
===
I don't know the difference beetween await a task and use task.Wait() but for the MessageDialog.ShowAsync method with the first it works but not with the second (while the two syntax works with other async methods).
If anyone could explain why i will be interested !
// this don't work, no dialog is shown (and UI is block)
var dialog = new MessageDialog("fail");
var task = dialog.ShowAsync().AsTask();
task.Wait();
// this work
var dialog = new MessageDialog("success");
var task = dialog.ShowAsync().AsTask();
await task;
You will ask me why i want to do this, it's because i need to show a dialog in a catch block (to show an error message) and wait for the user to close the dialog before continue after the catch block (and yes we can't use await in a catch block but we can use Task.Wait(), i've used it successfully with other async methods). | 0 | [
2,
2802,
4286,
5567,
3005,
52,
1721,
100,
31,
275,
3005,
9,
8195,
5,
6,
700,
16,
21,
8195,
800,
3726,
3726,
31,
221,
22,
38,
143,
14,
2841,
44,
1198,
458,
219,
21,
8195,
21,
3005,
17,
275,
3005,
9,
8195,
5,
6,
47,
26,
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... |
Struts2: Ajax response not recieved sent by Result in jQuery
===
I send an Ajax request to an `Action` class and try to get the response from a `Result`.
Here is my jquery code:
$('#button').click(function(){
$.get('ajax.action','query="hi server:)")',function(x,r,s){
alert("server said :"+r+"-stat-"+s.status);
})
Here always the response is 'success' which not the expected response.
Here is my Action class.
@Override
public String execute() throws Exception {
response=query+" - Struts added :";
setResponse(response);
return SUCCESS;
}
There a getters and setter for string response and query.
Here is my `Result` class
public class AjaxResponse implements Result {
@Override
public void execute(ActionInvocation ai) throws Exception {
System.out.println("I am the Ajax Rsponse RESULT");
PrintWriter out =
ServletActionContext.getResponse().getWriter();
try {
ServletActionContext.getResponse().setContentType("text/plain");
ValueStack valueStack = ai.getStack();
// Object resObj= valueStack.findValue("response");
out.print("hi I am server ...");
System.out.println("Response WROTE---");
} catch (Exception e) {
e.printStackTrace();
}finally{
out.close();
System.out.println("Response Close ");
}
}
}
Here is how I added my Result class to struts.xml
<result-types>
<result-type name="ajaxResponse" class="com.app.ajax.AjaxResponse" />
</result-types>
Here is how I declared the action
<action name="ajax" class="com.app.action.AjaxSupport">
<result type="ajaxResponse"/>
</action>
The alert always gives only *SUCESS* , not the expected result 'hi I am server ...' . I used a seperate Result class for loose couple the task and do the business logic inside the action class.
Please any one let me know where my problem is ? | 0 | [
2,
18316,
18,
135,
45,
20624,
1627,
52,
302,
10486,
4763,
795,
34,
829,
19,
487,
8190,
93,
800,
3726,
3726,
31,
2660,
40,
20624,
3772,
20,
40,
13,
1,
8645,
1,
718,
17,
1131,
20,
164,
14,
1627,
37,
21,
13,
1,
29955,
1,
9,
235... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Consuming and publishing my WCF and MVC projects
===
I am a complete newbie. I am building my very first web application using a SQLServer 2008 database, WCF project and a MVC3 Project in Visual Studio 2010. My host is godaddy so I was trying to start with launching my MVC Project at Godaddy. This gave me so many problems, that I decided to forget about that for now and try to launch my site on my localhost. Now I have 2 problems:
First: Both my WCF and My MVC Projects have been published correctly after creating web sites in IIS and then publishing in Visual Studio using the publish method "Web Deploy" and marked as IIS applications. In the output box I then get the message "Start Web Deploy Publish the Application/package to some url (localhost:port/IIS-websitename) .......Publish is successfully deployed........." If I then go to the url mentioned above, I get the error "webpage cannot be found".
Second problem: After I published my WCF Project successfully, I thought I should be able to add a Service Reference in My MVC Project to this service in order to consume my WCF, but NO service is to be discovered in my "Add Service Reference" dialog box in Visual Studio!!
Can anyone please help me? I do not have a clue of these technologies (IIS, Web Deploying, etc) Just know how to create my web application. Sorry, if I come across stupid but I have been trying stuff of which I didn't even know what I was doing for 3 days now. So I'm begging for someone to take me by the hand and leading me through what I guess should be a very simple task.
Many MANY thanks in advance!!! | 0 | [
2,
13,
17601,
17,
3107,
51,
11801,
410,
17,
307,
8990,
2314,
800,
3726,
3726,
31,
589,
21,
1279,
78,
5893,
9,
31,
589,
353,
51,
253,
64,
2741,
3010,
568,
21,
4444,
255,
10321,
106,
570,
6018,
15,
11801,
410,
669,
17,
21,
307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Connecting asp.net with SQL Server
===
Opening and closing connection serveral times while retriving query from SQL database, makes it more slow or it is okay doing this and its speed same as opening connection one time and retrieve all data and closing it at last. | 0 | [
2,
6440,
28,
306,
9,
2328,
29,
4444,
255,
8128,
800,
3726,
3726,
1214,
17,
4239,
2760,
8128,
192,
436,
133,
302,
3367,
8397,
25597,
37,
4444,
255,
6018,
15,
1364,
32,
91,
2276,
54,
32,
25,
1705,
845,
48,
17,
82,
1362,
205,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
chrome drops sessions
===
Hi I have problems with chrome. I create session, but after reload of page session isn't availabel. Where can be a problem? Thanks for reply.
session_start();
if(isset($_SESSION['chrome'])) {
echo 'SESSION OK';
}
else {
$_SESSION['chrome'] = 'yes';
}
This is simple code, but it doesn't work too. | 0 | [
2,
13,
12985,
9458,
5763,
800,
3726,
3726,
4148,
31,
57,
1716,
29,
13,
12985,
9,
31,
1600,
3723,
15,
47,
75,
27339,
16,
2478,
3723,
2532,
22,
38,
24240,
19564,
9,
113,
92,
44,
21,
1448,
60,
3669,
26,
6504,
9,
3723,
1,
13680,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Happy numbers checker. Help needed
===
int Cnt(){
return Count (10);
}
int Count (int init){
int u = init % 10;
int t = (init % 100) - u;
int u2 = u * u;
int t2 = t * t;
int m = u2 + t2;
if(m <= 1)
System.out.println("Happy!");
else {
return Count (m);
}
This code should (in theory) check if number is Happy, and if it's not sets initial value to be same as the result and whole process repeats.
Infinite loop should occur if number is not happy.
However none of this happens, does anyone know how to make this work?
| 0 | [
2,
1700,
2116,
2631,
106,
9,
448,
851,
800,
3726,
3726,
19,
38,
272,
2877,
5,
6,
1,
788,
2468,
13,
5,
1036,
6,
73,
13,
1,
19,
38,
2468,
13,
5,
6391,
19,
242,
6,
1,
19,
38,
287,
800,
19,
242,
13,
11881,
332,
73,
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... |
Update multiple heroku apps by batch script
===
i have nearly 30~ heroku apps i want to update them by just 1 hit. i just made a simple batch but it doesn't focus to 2nd line after the first line is ok
cd C:\Users\Ofis\heroku\app1 && up.bat
cd C:\Users\Ofis\heroku\app2 && up.bat
cd C:\Users\Ofis\heroku\app3 && up.bat
cd C:\Users\Ofis\heroku\app4 && up.bat
cd C:\Users\Ofis\heroku\app5 && up.bat
cd C:\Users\Ofis\heroku\app6 && up.bat
up.bat =
git add .
git commit -m "update"
git push heroku master
| 0 | [
2,
11100,
1886,
36,
9266,
4865,
18,
34,
13064,
3884,
800,
3726,
3726,
31,
57,
1212,
712,
1,
36,
9266,
4865,
18,
31,
259,
20,
11100,
105,
34,
114,
137,
770,
9,
31,
114,
117,
21,
1935,
13064,
47,
32,
1437,
22,
38,
1776,
20,
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... |
How to use setw with objects
===
I'm trying to format output using the NTL library (a number theory library). One of the objects is the GF2X object, which is a polynomial represented as a string of coefficients. A quick example:
GF2X a = GF2X(5,1);
a++;
cout<<a;
will yield `[1 0 0 0 0 1]` which is the same as x^5 + 1. My question is about formatting this output using setw. I want to be able to output various length GF2X objects, prepended by a number, and appended with a string. I'd like my output to look like the following:
1: [x x x x x x x x] string here
15: [x x x] string here
I would also settle for the right ] to be aligned, which is what I should probably expect if I'm using setw. However, when i use the code (variable names ommitted for simplicity):
cout << setw(3)<< int <<": "<< setw(35) << GF2X << setw(15) << string << endl;
I get output more like this (some white space removed for compactness)
1: [x x x x x x x x] string here
15: [x x x] string here
In other words, the setw function seems to be treating the entire output of `<<GF2X` as a single character, and doesn't seem to actually account for the size of the output string. As you can see from the output I've shown you, the left side of the GF2X output is aligned, but the right side isn't, whereas typically, setw seems to align the right side of outputs. | 0 | [
2,
184,
20,
275,
309,
499,
29,
3916,
800,
3726,
3726,
31,
22,
79,
749,
20,
2595,
5196,
568,
14,
13,
2877,
255,
1248,
13,
5,
58,
234,
1639,
1248,
6,
9,
53,
16,
14,
3916,
25,
14,
13,
16368,
135,
396,
3095,
15,
56,
25,
21,
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... |
Delete filename from a filepath in C#
===
I am trying to remove the filename of a path e.g.:
/vmfs/volumes/50153b66-6aac5486-e942-080027a10080/TestMachine/TestMachine.vmx
Would result in:
/vmfs/volumes/50153b66-6aac5486-e942-080027a10080/TestMachine/
Bearing in mind that the file name might change, would a regex be the best way of achieving this? | 0 | [
2,
27448,
3893,
7259,
37,
21,
3893,
8353,
19,
272,
5910,
800,
3726,
3726,
31,
589,
749,
20,
4681,
14,
3893,
7259,
16,
21,
2013,
13,
62,
9,
263,
9,
45,
13,
118,
20147,
11754,
118,
15949,
18,
118,
2290,
14511,
220,
3526,
8,
379,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WPF databinding not updating ListBox completely
===
I'm using the MVVM pattern and have a databound Listbox that isn't updating completely.
There is a modelview that contains an Observable collection of Machines which is bound to the list:
<ListBox Name="MachinesList"
Height="300"
Width="290"
DataContext="{Binding Path=AllMachines}"
SelectionMode="Single"
ItemsSource="{Binding}" SelectionChanged="MachinesList_SelectionChanged"
HorizontalAlignment="Right"
>
</ListBox>
The collection AllMachines Contains an observable list of MachineModelViews which are in turn bound to a MachineView that presents the name and location of the machine:
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Label Name="NameLabel" Content="{Binding Path=Name}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="50" />
<Label Content="Location:" Width="120"
HorizontalAlignment="Right"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Target="{Binding ElementName=locationLabel}"
/>
<Label Content="{Binding Path=Location.Name}" Name="locationLabel" HorizontalContentAlignment="Center" Width="60"/>
</StackPanel>
The problem:
When values are added to the collection things update okay. When a machine is deleted however only the Label bound to Location.Name updates the other two remain in the listbox. I've confirmed that the collection is actually updating and removing the MachineModelView Correctly but some how the label with it's name and the "label label" with "Location:" continues to exist until the application is restarted:
before:
![enter image description here][1]
after delete:
![enter image description here][2]
after app restart:
![enter image description here][3]
[1]: http://i.stack.imgur.com/3Ldov.png
[2]: http://i.stack.imgur.com/yaCUk.png
[3]: http://i.stack.imgur.com/235Oq.png | 0 | [
2,
619,
7721,
1054,
22260,
52,
71,
43,
1880,
968,
5309,
1524,
800,
3726,
3726,
31,
22,
79,
568,
14,
17967,
20147,
3732,
17,
57,
21,
1054,
7410,
968,
5309,
30,
2532,
22,
38,
71,
43,
1880,
1524,
9,
80,
25,
21,
1061,
4725,
30,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can BizTalk HL7 Accelerator produce HL7 v2XML compliant messages
===
By default, it looks like the HL7 accelerator produces XML from HL7 v2 messages which is not HL7.org compliant (doesn't match their XML v2 XML schemas). Is it possible to get it to generate HL7 v2XML compliant xml? | 0 | [
2,
92,
1732,
380,
9718,
13,
3712,
465,
24484,
2213,
13,
3712,
465,
566,
135,
396,
8184,
13,
25509,
7561,
800,
3726,
3726,
34,
12838,
15,
32,
1879,
101,
14,
13,
3712,
465,
24484,
6700,
23504,
37,
13,
3712,
465,
566,
135,
7561,
56,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
2 Dimensional jQuery Slider - CSS Positioning
===
So, I'm trying to build a two dimensional content slider and I'm having problems implementing it. I'm using jQuery.
The basic idea for the slider markup is:
<div id="contentSlider">
<div class="contentBlock">
<div class="pictures">
<ul>
<li>
<img src="img1.jpg" />
</li>
<li>
<img src="img2.jpg" />
</li>
<li>
<img src="img3.jpg" />
</li>
</ul>
<div class="absPositionedNavUp></div>
<div class="absPositionedNavDown></div>
</div>
<div class="text">
<p>
Blah blah yadda yadda.
Blah blah yadda yadda.
Blah blah yadda yadda.
Blah blah yadda yadda.
</p>
<p>
Blah blah yadda yadda.
Blah blah yadda yadda.
Blah blah yadda yadda.
Blah blah yadda yadda.
</p>
</div>
</div>
<div class="contentBlock">
........
</div>
<div class="contentBlock">
........
</div>
</div>
<div class="slideAllContentLeft"></div>
<div class="slideAllContentRight"></div>
What I'm trying to do (and I've been able to get certain parts working) is:
(1) Have the pictures div slide up and down between images
(2) Have the contentSlider div slide left and right between multiple contentBlock divs
What I have currently is at: http://www.ficreates.com/_SiteDemos/PBL/projects.html
My main issue is with the CSS part of it. How do I get the divs to line up left to right and slide between them? You can see my code currently, which is prob about 60% of the way there. | 0 | [
2,
172,
13,
7865,
487,
8190,
93,
3295,
106,
13,
8,
272,
18,
18,
649,
68,
800,
3726,
3726,
86,
15,
31,
22,
79,
749,
20,
1895,
21,
81,
13,
7865,
2331,
3295,
106,
17,
31,
22,
79,
452,
1716,
17333,
32,
9,
31,
22,
79,
568,
487,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Class returning object confusion
===
I've been asked to create a class that does some stuff, and then returns an object with read only properties.. Now I've created the class and I've got everything working 100%, however I'm confused when they say to 'return an object with read only properties'..
This is the outline of my php file which contains the class and some extra lines calling it etc:
class Book(){
protected $self = array();
function __construct{
//do processing and build the array
}
function getAttributes(){
return $this->self; //return the protected array (for reading)
}
}
$book = new Book();
print_r($book->getAttributes());
Can someone please help me with returning an object or something?
Thanks | 0 | [
2,
718,
2485,
3095,
5677,
800,
3726,
3726,
31,
22,
195,
74,
411,
20,
1600,
21,
718,
30,
630,
109,
3217,
15,
17,
94,
4815,
40,
3095,
29,
1302,
104,
3704,
9,
9,
130,
31,
22,
195,
679,
14,
718,
17,
31,
22,
195,
330,
796,
638,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
create d3.js axes without numbering
===
Is there a way to create a d3.js axis without any kind of numbering? Tickmarks are ok but just no numbers at all. Currently I'm creating my d3.js axis with the code below. Thanks in advance.
// create Axis
svg.selectAll("axis")
.data(d3.range(angle.domain()[1]))
.enter().append("g")
.attr("class", "axis")
.attr("transform", function(d) { return "rotate(" + angle(d) * 180 / Math.PI + ")"; })
.call(d3.svg.axis()
.scale(radius.copy().range([0,0]))
.ticks(1)
.orient("left"))
.append("text")
.style("color", "white")
.attr("y",
function (d) {
if (window.innerWidth < 455){
console.log("innerWidth less than 455: ",window.innerWidth);
return -(0);
}
else{
console.log("innerWidth greater than 455: ",window.innerWidth);
return -(0);
}
})
.attr("dy", "0em"); | 0 | [
2,
1600,
13,
43,
240,
9,
728,
18,
10398,
18,
366,
18404,
800,
3726,
3726,
25,
80,
21,
161,
20,
1600,
21,
13,
43,
240,
9,
728,
18,
8577,
366,
186,
825,
16,
18404,
60,
8809,
4527,
18,
50,
5854,
47,
114,
90,
2116,
35,
65,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java PriorityQueue
===
I am trying to implement PriorityQueue. This PriorityQueue is going to hold instances of class Task. These instances of Task should be arranged in such a way that the instances which have higher "priority" are at the head of the Queue. In short instances should be in descending order of priority.
private static Queue<Task> testQ = new PriorityQueue<Task>(11, new TaskQueueComparator());
/*** Comparator ***/
public class TaskQueueComparator implements Comparator<Task> {
public int compare(Task task1, Task task2) {
return task2.priority - task1.priority;
}
}
/**** Task definition **/
public class Task {
public int priority;
}
/**** Code in main() ****/
Task pe11 = new Task();
pe11.priority = 3;
testQ.add(pe11);
pe11 = new Task();
pe11.priority = 1;
testQ.add(pe11);
pe11 = new Task();
pe11.priority = 2;
testQ.add(pe11);
void displayQueue() {
int size = testQ.size();
for (int k = 0; k < size; k++)
{
Task p = testQ.peek();
System.out.format("Task Priority %d \n", p.priority); // The result I am getting is 3 1 2.. I was expecting 3 2 1
}
Can someone please let me know what mistake I am doing here ? Every time I remove or add a task from /to the queue, the queue should arrange the tasks in descending order of priority.
Let me know.
Thanks
Josh | 0 | [
2,
8247,
9857,
2005,
4185,
800,
3726,
3726,
31,
589,
749,
20,
8713,
9857,
2005,
4185,
9,
48,
9857,
2005,
4185,
25,
228,
20,
1027,
13946,
16,
718,
3005,
9,
158,
13946,
16,
3005,
378,
44,
4300,
19,
145,
21,
161,
30,
14,
13946,
56,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't get inner text from FQL using Xpath C#
===
I'm trying to get the inner text from a XML tag called sharecount, I need to get it by the normalized_url tag like so:
string ShareCount;
string Url = "'" + "http://www.example.com/Article.aspx?id=" + GuideID + "'";
XmlNode Node;
try
{
//return Share count (using Xpath).
XmlDoc.SelectSingleNode("fql_query_response/link_stat[normalized_url=" + Url + "]/share_count");
ShareCount = XmlDoc.InnerText;
int.TryParse(ShareCount, out Value); //Turn string to int.
return Value;
}
catch
{
return 0;
}
and this is the XML:
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
<link_stat>
<url>http://www.example.com/Article.aspx?id=1909</url>
<normalized_url>http://www.example.com/Article.aspx?id=1909</normalized_url>
<share_count>11</share_count>
<like_count>3</like_count>
<comment_count>0</comment_count>
<total_count>14</total_count>
<commentsbox_count>8</commentsbox_count>
<comments_fbid>10150846665210566</comments_fbid>
<click_count>0</click_count>
</link_stat>
</fql_query_response>
<link_stat>
<url>http://www.example.com/Article.aspx?id=1989</url>
<normalized_url>http://www.example.com/Article.aspx?id=1989</normalized_url>
<share_count>11</share_count>
<like_count>3</like_count>
<comment_count>0</comment_count>
<total_count>14</total_count>
<commentsbox_count>8</commentsbox_count>
<comments_fbid>10150846665210566</comments_fbid>
<click_count>0</click_count>
</link_stat>
</fql_query_response>
The thing is i got in the return value: "www.example.com/Article.aspx?id=1132http://www.example.com/Article.aspx?id=190900000101502138970422760" what am i doing wrong? thanks!
| 0 | [
2,
92,
22,
38,
164,
3754,
1854,
37,
398,
22402,
568,
993,
8353,
272,
5910,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
14,
3754,
1854,
37,
21,
23504,
3383,
227,
1891,
16549,
15,
31,
376,
20,
164,
32,
34,
14,
1826,
1333,
1,
911,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Verifying a signature with a public key
===
I have an external service which call me back after some defined event, and sign his request with its private key.
I have stored the public key which look like :
-----BEGIN PUBLIC KEY-----
........................................
-----END PUBLIC KEY-----
So my work is to check if request's content has not been alterned by verifying signature.
Here is my algorithm :
// 1 - reading public key :
Scanner scanner = new Scanner( new File( keyPath ) );
// encodedPublicKey.toString( );
StringBuilder sb = new StringBuilder( );
while ( scanner.hasNextLine( ) )
{
sb.append( scanner.nextLine( ) );
sb.append( '\n' );
}
byte[] encodedPublicKey = sb.toString( ).getBytes( "utf-8" );
// 2 - loading public key in a relevant object :
X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec( publicKeyBytes );
KeyFactory keyFactory = KeyFactory.getInstance( "DSA" );
PublicKey publicKey = keyFactory.generatePublic( publicKeySpec );
// 3 - verifying content with signature and content :
Signature sig = Signature.getInstance( "SHA1withDSA" );
sig.initVerify( publicKey );
sig.update( message.getBytes( ) );
ret = sig.verify( sign.getBytes( ) );
But for now my algorithm is stoped at "PublicKey publicKey = keyFactory.generatePublic( publicKeySpec )" step by this message :
java.security.spec.InvalidKeySpecException: Inappropriate key specification: invalid key format
So how can I load my key in a way that is accepted by java api ? | 0 | [
2,
21012,
68,
21,
7810,
29,
21,
317,
1246,
800,
3726,
3726,
31,
57,
40,
4886,
365,
56,
645,
55,
97,
75,
109,
2811,
807,
15,
17,
1676,
33,
3772,
29,
82,
932,
1246,
9,
31,
57,
8214,
14,
317,
1246,
56,
361,
101,
13,
45,
13,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET Forms Authentication Cookie causes 400 "Bad Request" error in WCF REST api method
===
I've scoured the web for an answer to this and while I've found similar issues like [this one](http://stackoverflow.com/questions/9515249/wcf-rest-web-service-request-error-when-using-forms-authentication-and-authoriza), I've yet to find a specific answer.
I've got an MVC web site using Forms Authentication to provide login support (this is basically out-of-the-box login support in MVC).
In the same domain, I've got a WCF REST service with a single method.
What I'm trying to do is see if I can leverage Forms Authentication from within the service to see if the requester has already 'signed in' via the MVC application. Following some other posts I found, I've made sure that the web.config files (w.r.t. Forms Authentication) are the same (same machine key, etc.).
Here's the problem: I can sign in via the MVC site (and thus, get my authentication ticket via cookie). When I make a GET request to my service (remember, on same domain as MVC) I can see that the ".ASPXAUTH" cookie is getting sent with the request.
But, I get a "400 Bad Request" response each time. Further, the body of the response is indicating
"The server encountered an error processing the request..."
Additional observations:
* If I remove the .ASPXAUTH cookie from the request (using Fiddler or curl for instance), the request goes through without issue
* I can use Fiddler or curl to to send a request to a secured page in the MVC app and include the same .ASPXAUTH cookie and this works as expected (a 200 response with expected content in response body).
* (the strange one) I can set a break point in my Service application within the _Application\_AcquireRequestState_ method in global.asax.cs and hit it when I send the request.
- I can then examine *HttpContext.Current.User.Identity* and see that *IsAuthenticated* is true and *Name* is showing my expected username (from the initial login via MVC app)
* A break point in the very first executable line of code within my service method is never hit.
Of course, when I remove the .ASPXAUTH cookie, both break points in my service are hit (and, naturally, the Identity is _not_ authenticated in this case.
So, it would seem to me that:
1. Forms Authentication is working as I'd hoped it work within my service. I can detect that the request is authenticated and them move on that information.
2. I crash and burn somewhere in the ASP.NET pipeline _after_ Forms Authentication does its thing but _before_ my service method gets called.
I've had no luck finding any references to a similar problem out there and would appreciate another set of eyes (or several thousand sets of eyes) to point out what I hope is a very silly and obvious answer.
(If there is a specific area of code anyone would like to see, I can add as requested. I didn't want to further burden an already overly-worded post with tons of random code samples)
| 0 | [
2,
28,
306,
9,
2328,
1997,
27963,
19980,
4047,
4353,
13,
7,
5989,
3772,
7,
7019,
19,
11801,
410,
760,
21,
2159,
2109,
800,
3726,
3726,
31,
22,
195,
13,
18,
9598,
69,
14,
2741,
26,
40,
1623,
20,
48,
17,
133,
31,
22,
195,
216,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
store value after log in java for all other files
===
I am developing an application in which the first window is![enter image description here][1]
[1]: http://i.stack.imgur.com/DC6P9.jpg
after clicking on log in the log in window appears and after correct credentials is is directed to choose time stamp and data set id window.
I want that after successful log in the user can anytime choose data set and time stamps.
That is login.java is passing a value to Algorithm.java(for choosing the data set and timestamp window)
if (httpCon.getResponseCode()==200) {
Algorithm frame=new Algorithm(APIkey);
frame.setSize(450,200);
frame.setVisible(true);
dispose();
JLabel label = new JLabel("Welcome:"+value1);
}
now this API key is used in ALgorithm.java to set the connection and select some specific nodes based on entered time stamps and data set id.
Now I want that after log in I can anytime click on the second button shown in this window and choose the time stamp and data set id.But in that case I don't have the value of API key as I am using this in Main.java (responsible for the above window).And in Main .java the value of API key is null.I don't want the user to enter the log in username and password again and again.
if (e.getSource() == myFirstButton) {
Login frame1=new Login();
frame1.setSize(450,200);
frame1.setVisible(true);
}
if (e.getSource() == mySecondButton) {
Algorithm frame=new Algorithm(APIkey);
frame.setSize(450,200);
frame.setVisible(true);
}
Now how can I have the value of API key stored in all files once the user entered the correct access credentials in Login window and can use it anywhere.I am working in Netbeans 7.1.2. I am coding this in Swing Java.I am new to Java. | 0 | [
2,
1718,
1923,
75,
6738,
19,
8247,
26,
65,
89,
6488,
800,
3726,
3726,
31,
589,
3561,
40,
3010,
19,
56,
14,
64,
1463,
25,
187,
2558,
13679,
1961,
5318,
235,
500,
2558,
165,
500,
636,
165,
500,
45,
7775,
6903,
49,
9,
25325,
9,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Making both the background image clickable as well as the contents clickable
===
I would like to make both the background image as well as the contents in it clickable. I am not sure how to implement it...
The image:
![enter image description here][1]
[1]: http://i.stack.imgur.com/04dio.png
I want both image as well as the contents to be clickable.
The html portion:
<div class = "reportslistitem">
<a href="[[ url ]]"
target=="_blank">
[[ startdate ]] -
[[ enddate ]]
</a>
</div>
The css portion:
.reportslistitem{
width:120px;
height:140px;
display:block;
float: right;
background:url('../images/Report-icon-without-text.png');
}
a{
font: bold 12px 'Thin2Regular';
text-decoration: none;
color: rgb(0,0,0);
padding: 10px 15px;
position: relative;
text-align: center;
display:block;
padding: 0px;
position:relative;
top:25px;
}
How do i change it? Need some guidance... | 0 | [
2,
544,
156,
14,
2395,
1961,
10840,
579,
28,
134,
28,
14,
8478,
10840,
579,
800,
3726,
3726,
31,
83,
101,
20,
233,
156,
14,
2395,
1961,
28,
134,
28,
14,
8478,
19,
32,
10840,
579,
9,
31,
589,
52,
562,
184,
20,
8713,
32,
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... |
How to set the text_selector at the run time
===
I am using the following selector
text_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="@android:color/white"/>
<item android:state_focused="true" android:color="@android:color/white"/>
<item android:state_pressed="true" android:color="@android:color/white"/>
<item android:color="@android:color/black" />
</selector>
I am using the following code to set the selector at the runtime
txtMainlabel.setTextColor(R.color.text_selector);
| 0 | [
2,
184,
20,
309,
14,
1854,
1,
3434,
19932,
35,
14,
485,
85,
800,
3726,
3726,
31,
589,
568,
14,
249,
23946,
1854,
1,
3434,
19932,
9,
396,
8184,
13,
1,
60,
396,
8184,
615,
3726,
7,
165,
9,
387,
7,
19608,
3726,
7,
1982,
410,
8,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to hide a table column in mvc3 and show on hover?
===
HI guys i have to hide a a column from my table can and show it on hover again this is how table looks
ProjectName|Description|Status
i have to hide description table and show it in a pop up when i take the mouse on ProjectName
this is how my Index.cshtml page looks
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
projectName
</th>
<th>
Description
</th>
<th>
status
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.projectName)
</td>
<td >
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.status)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.ProjectId }) |
@Html.ActionLink("Details", "Details", new { id=item.ProjectId }) |
@Html.ActionLink("Delete", "Delete", new { id=item.ProjectId })
</td>
</tr>
}
</table>
| 0 | [
2,
184,
20,
3077,
21,
859,
4698,
19,
307,
8990,
240,
17,
298,
27,
21350,
60,
800,
3726,
3726,
4148,
2776,
31,
57,
20,
3077,
21,
21,
4698,
37,
51,
859,
92,
17,
298,
32,
27,
21350,
188,
48,
25,
184,
859,
1879,
669,
7259,
1,
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... |
Error using hmmviterbi, how make Pseudo Transition matrix?
===
I got this error using hmmviterbi in Matlab:
??? Error using ==> hmmviterbi at 167
A zero transition probability was encountered from state 1.
Please provide more data or PseudoTransition information.
I don't know how make a Pseudo Transition matrix (which transitions have zero probability?)
How can I find that? | 0 | [
2,
7019,
568,
13,
15530,
8901,
106,
2161,
15,
184,
233,
8452,
4513,
8187,
60,
800,
3726,
3726,
31,
330,
48,
7019,
568,
13,
15530,
8901,
106,
2161,
19,
4277,
9086,
45,
13,
60,
60,
60,
7019,
568,
800,
3726,
1,
13,
15530,
8901,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PEAR error with whereAddIn
===
In the below code it returns me entire table content, can anybody advice why my whereAddIn doesn't works.
$i=o;
$Jclients = \OA_Dal::factoryDO('clients');
foreach($linkedaccounts as $linkedId => $linkedValue){
$linkedIdArr[$i++] = $linkedId;
}
$linkedIdStr = implode(",",$linkedIdArr);
$Jclients->whereAddIn('account_id',$linkedIdStr,'string');
$result = $Jclients->find();
$out = array();
if($result > 0){
while( $Jclients->fetch() ) {
$out[] = new \jsonAPI\model\advertiserid($Jclients->toArray());
}
} | 0 | [
2,
16619,
7019,
29,
113,
14854,
108,
800,
3726,
3726,
19,
14,
1021,
1797,
32,
4815,
55,
1078,
859,
2331,
15,
92,
11181,
4978,
483,
51,
113,
14854,
108,
1437,
22,
38,
693,
9,
5579,
49,
3726,
111,
73,
5579,
15864,
18513,
38,
18,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# Free Image file from use
===
i have a temp image file which i open with
Bitmap CapturedImg = (Bitmap)Image.FromFile("Item/Item.bmp");
and because is temp i want to replace it with another image for further use, but the program still using that image and i cannot do anything.
How to let go from the image in order to be replaced? | 0 | [
2,
272,
5910,
551,
1961,
3893,
37,
275,
800,
3726,
3726,
31,
57,
21,
13,
9577,
1961,
3893,
56,
31,
368,
29,
1142,
15022,
2411,
1660,
263,
800,
13,
5,
3326,
15022,
6,
22039,
9,
2665,
16877,
5,
7,
2119,
79,
118,
2119,
79,
9,
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... |
Uniform Html Grid
===
I need the following layout in HTML (S - empty space, *Child* - html child, can be DIV or TABLE. The layout should be resizable without help of JavaScript (CSS+HTML are the tools), it should support unlimited number of children. All children will be of the same width.
S*Child*S*Child*S*Child*S
Note, using table for this will result in: S*Child*SS*Child*SS*Child*S, which isn't what I'm looking for. | 0 | [
2,
4347,
13,
15895,
7354,
800,
3726,
3726,
31,
376,
14,
249,
9106,
19,
13,
15895,
13,
5,
18,
13,
8,
2424,
726,
15,
1637,
11287,
2483,
13,
8,
13,
15895,
850,
15,
92,
44,
13,
12916,
54,
859,
9,
14,
9106,
378,
44,
10719,
3186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Parse JSON using JQuery
===
I am receiving JSON string response from my WCF service. I wanna parse this JSON to respective objects. So i have done like below.
$.ajax({
type: 'GET',
url: 'http://URL/Service.svc/LoginValidation?',
success: function(response, status, xhr) {
if (response != "") {
var JSON=response.replace(/^"|"$/g, '\''); // replace Start and End double Quotes with single quotes. becze JSON string should be start and end with single quotes while parsing this.
var obj = JSON.parse(JSON); // Here is my problem. While accessing JSON variable here that automatically showing double quotes. so that here showing syntax error.
UserID = obj.UserID;
ClientID = obj.ClientID;
DomainName = obj.DomainName;
AuthenticationKey = obj.AuthenticationKey;
}
else {
alert("Invalid UserName or Password.");
}
}
});
How to parse this JSON data. can we do this using JQuery.
| 0 | [
2,
2017,
870,
487,
528,
568,
487,
8190,
93,
800,
3726,
3726,
31,
589,
3396,
487,
528,
3724,
1627,
37,
51,
11801,
410,
365,
9,
31,
11024,
2017,
870,
48,
487,
528,
20,
7390,
3916,
9,
86,
31,
57,
677,
101,
1021,
9,
5579,
9,
6881,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 wicket - DropDownChioce.onSelectionChanged() does not work
===
I recently started using wicket. I tried to use in your project example "Linked select boxes" from the book "Apache wicket by Vaynberg".
I recreated the example from the book:
public class LinkedSelectboxesPage extends WebPage {
private Country country;
private City city;
public LinkedSelectboxesPage() {
Database.buildData();
country = Database.getCountries().get(0);
FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
add(feedbackPanel);
Form form = new Form("form");
add(form);
DropDownChoice<Country> countries = new DropDownChoice<Country>(
"countries",
new PropertyModel<Country>(this, "country"),
new CountriesModel(),
new ChoiceRenderer<Country>("name", "code")) {
protected boolean
wantOnSelectionChangedNotifications() {
return true;
}
protected void
onSelectionChanged(Country newSelection) {
city = null;
}
};
countries.setRequired(true);
form.add(countries);
DropDownChoice<City> cities = new DropDownChoice<City>(
"cities",
new PropertyModel<City>(this, "city"),
new CitiesModel(),
new ChoiceRenderer<City>("name", "code"));
cities.setRequired(true);
form.add(cities);
}
private static class CountriesModel extends LoadableDetachableModel<List<? extends Country>> {
protected List<? extends Country> load() {
return Database.getCountries();
}
}
private class CitiesModel extends LoadableDetachableModel<List<? extends City>> {
protected List<? extends City> load() {
return Database.getCities(country.getCode());
}
}
}
When i try to use linked select-boxes in my project, breakpoint, which is fixed in front of the function body has not been achieved.
public class AddArticlePanel extends Panel {
private Type type;
private Subtype subtype;
private List<Type> typesList;
private List<Subtype> subtypesList;
@SpringBean
@SuppressWarnings("unused")
public static ITypeDao typeDao;
@SpringBean
@SuppressWarnings("unused")
private ISubtypeDao subtypeDao;
public AddArticlePanel(String id) {
super(id);
this.typesList = typeDao.loadAllTypes();
this.type = this.typesList.get(0);
Form form = new Form("form");
add(form);
FormComponent<String> tbTitleArticle = new TextField<String>("titleArticle").setRequired(true);
form.add(tbTitleArticle);
FormComponent<String> taTextArticle = new TextArea<String>("textArticle").setRequired(true);
form.add(taTextArticle);
DropDownChoice<Type> ddcTypes = new DropDownChoice<Type>(
"typeArticle",
new PropertyModel<Type>(this, "type"),
new TypesModel(),
new ChoiceRenderer<Type>("name", "id")) {
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
protected void onSelectionChanged(Type newSelection) {
type = null;
}
};
ddcTypes.setRequired(true);
form.add(ddcTypes);
DropDownChoice<Subtype> ddcSubtypes = new DropDownChoice<Subtype>(
"subtypeArticle",
new PropertyModel<Subtype>(this, "subtype"),
new SubtypesModel(),
new ChoiceRenderer<Subtype>("name", "id"));
ddcSubtypes.setRequired(true);
form.add(ddcSubtypes);
}
public AddArticlePanel(String id, IModel<?> model) {
super(id, model);
}
private static class TypesModel extends LoadableDetachableModel<List<? extends Type>> {
protected List<? extends Type> load() {
return typeDao.loadAllTypes();
}
}
private class SubtypesModel extends LoadableDetachableModel<List<? extends Subtype>> {
protected List<? extends Subtype> load() {
return subtypeDao.loadSubtypesByTypeId(type.getId());
}
}
}
I can not understand why it happened. Help me, please and sorry for my english.
| 0 | [
2,
17140,
14414,
13,
8,
2804,
2968,
1594,
111,
1105,
9,
4710,
5033,
16229,
43,
5,
6,
630,
52,
170,
800,
3726,
3726,
31,
1989,
373,
568,
14414,
9,
31,
794,
20,
275,
19,
154,
669,
823,
13,
7,
6258,
69,
5407,
8120,
7,
37,
14,
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... |
Event synchronization between two threads in Qt
===
I have two threads, lets say thread "A" and thread "B".
Thread "A" post's custom QEvent to thread "B", and then it should wait till thread "B" processes this event.
What I did so far:
My event class:
class IPCMessageEvent : public QEvent
{
public:
IPCMessageEvent(QWaitCondition* pConditions) : QEvent(IPC_MESSAGE_RECEIVED)
, mpWaitCondition(pConditions)
{ };
~IPCMessageEvent()
{
mpWaitCondition->wakeOne();
};
private:
QWaitCondition* mpWaitCondition;
};
My thread "A":
QWaitCondition recvCondition;
IPCMessageEvent* pEvent = new IPCMessageEvent(&recvCondition);
QCoreApplication::postEvent(gpApp, pEvent);
QMutex mutex;
mutex.lock();
recvCondition.wait(&mutex, IPC_MESSAGE_WAIT_TIMEOUT);
My thread "B": Processes the received event and destroyes it. "~IPCMessageEvent" destructor is called and therefore wakeOne() will be initiated for the "recvCondition" in thread "A".
Everything seems to work just fine, **it's just one thing**!
It looks like sometimes "~IPCMessageEvent" is called sooner then expected...
QCoreApplication::postEvent(gpApp, pEvent);
<---- pEvent is already destroyed here ---->
QMutex mutex;
mutex.lock();
So my "recvCondition.wait(&mutex, IPC_MESSAGE_WAIT_TIMEOUT);" will be locked and will reach the timeout.
Are there any other ways of doing this kind of synchronization?
Or maybe someone have any suggestions how to fix/overcome this problem? | 0 | [
2,
807,
13,
16023,
1829,
128,
81,
20396,
19,
2593,
38,
800,
3726,
3726,
31,
57,
81,
20396,
15,
6884,
395,
9322,
13,
7,
58,
7,
17,
9322,
13,
7,
220,
7,
9,
9322,
13,
7,
58,
7,
678,
22,
18,
5816,
2593,
4943,
38,
20,
9322,
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... |
GLUT on OS/X with OpenGL 3.2 Core Profile
===
Is it possible to use GLUT on OS/X Lion (or OS/X Mountain Lion) using core profile (so I can use GLSL 1.50)?
Can I use the built in GLUT or do I need to use a third-part library such as FreeGLUT?
And is there any simple 'Hello world' applications available for OS/X with either an XCode project or a make-file? | 0 | [
2,
21697,
27,
13,
759,
118,
396,
29,
368,
8430,
203,
9,
135,
2884,
5296,
800,
3726,
3726,
25,
32,
938,
20,
275,
21697,
27,
13,
759,
118,
396,
6023,
13,
5,
248,
13,
759,
118,
396,
1286,
6023,
6,
568,
2884,
5296,
13,
5,
656,
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... |
Replace '+' with '%2B' in a URL
===
I am using the following code on my site to display a thumbnail produced by the TimThumb script:
<img src="timthumb.php?src=<?php echo $image_url[0]; ?>&h=100&w=150" />
It works fine except when the image URL contains '+'. I think it is seeing the '+' as a space. Is there a simple way to replace the '+' symbol with '%2B'? I'm not a coder sorry but I guess it would be something like 'str_replace'? | 0 | [
2,
3934,
13,
22,
2430,
22,
29,
13,
22,
11881,
135,
220,
22,
19,
21,
287,
6362,
800,
3726,
3726,
31,
589,
568,
14,
249,
1797,
27,
51,
689,
20,
3042,
21,
5078,
325,
947,
671,
34,
14,
2574,
96,
723,
220,
3884,
45,
13,
1,
1660,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP / MySQL Getting and processing data totals, counts efficently
===
I have to create a few functions for a website that will get a lot of data from a MySQL database, process it in a number of ways and produce tables/graphs in HTML and excel format but do not know what the most efficient way of getting, storing and processing the data would be in PHP.
Up till now I've just used PHP to submit SQL statements which return rows and then go into objects that I call relevant information from, but the new functions could return up to 18,000 rows which I need to get averages, counts, etc from.
It seems I have to either make a bunch of SQL statements for the counts / averages or use PHP to do something similar. I would need to go through the 18,000 rows up to 20 times. Which would be the preferable way or does anyone have a better idea?
Thanks for any help/advice.
| 0 | [
2,
13,
26120,
13,
118,
51,
18,
22402,
1017,
17,
5511,
1054,
600,
18,
15,
9927,
13,
9039,
49,
5089,
102,
800,
3726,
3726,
31,
57,
20,
1600,
21,
310,
3719,
26,
21,
2271,
30,
129,
164,
21,
865,
16,
1054,
37,
21,
51,
18,
22402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using req.flash in Express.js
===
I have a login form. When an incorrect password is provided, the route will use `req.flash` to add an error message to the session.
I need to access this error message in my template for display. I am wondering if the `flash` is automatically passed to the view by Express, or do I need to add this to the render myself? | 0 | [
2,
568,
302,
1251,
9,
26694,
19,
2999,
9,
728,
18,
800,
3726,
3726,
31,
57,
21,
6738,
108,
505,
9,
76,
40,
18867,
20884,
25,
1173,
15,
14,
858,
129,
275,
13,
1,
99,
1251,
9,
26694,
1,
20,
3547,
40,
7019,
2802,
20,
14,
3723,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIWebview loadHTMLString does not want to show
===
To fix the UITextview blue color issue for links in ios ( i want white ones) i implemented the UIWebview in my custom popup
in my popup controller i have the following code ( uiwebview is set to hidden in xib)
- (void) showWebView:(NSString *)htmlText{
[webView setHidden:FALSE];
[txtContent setHidden:TRUE];
NSString * htmlString = [NSString stringWithFormat:@"<html><head><style type='text/css'>body {background-color:transparent; } p { color:white; font-family:Helvetica; font-size:14px; } a { color:white; }</style></head><body><p>%@</p></body></html>", htmlText];
webView.delegate = self;
NSLog(@"htmlstring %@",htmlString);
[webView loadHTMLString:htmlString baseURL:nil];
}
(txtContent is my uiTextview which i'm hiding)
in my main controller i have the following:
SwbPopup * popup = [[SwbPopup alloc] initWithNibName:@"SwbPopup" bundle:nil];
[[self.view superview] addSubview:popup.view];
popup.view.center = CGPointMake([self.view superview ].center.y, [self.view superview].center.x - ([self.view superview].frame.size.width / 4) );
[popup showWebView:popupBloodglucoseLevel];
(popbloodglucoselevel is a string containing my popupmessage with a link)
When i don't hide webview in the xib it does show (everytime) but don't want to load the html either.... | 0 | [
2,
13,
5661,
14113,
4725,
6305,
15895,
11130,
630,
52,
259,
20,
298,
800,
3726,
3726,
20,
6098,
14,
13,
5661,
11969,
4725,
705,
1665,
1513,
26,
6271,
19,
13,
7760,
13,
5,
31,
259,
359,
53,
18,
6,
31,
6807,
14,
13,
5661,
14113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Forms in Adobe Reader Mobile 9 SDK in iOS?
===
is it possible to use forms with the Adobe Reader Mobile 9 SDK? I want to fill out some forms in a pdf with the iPad and send it back to a own server. If yes, does sign also works?
thx guys. | 0 | [
2,
1997,
19,
20299,
7765,
3241,
561,
13,
18,
43,
197,
19,
13,
7760,
60,
800,
3726,
3726,
25,
32,
938,
20,
275,
1997,
29,
14,
20299,
7765,
3241,
561,
13,
18,
43,
197,
60,
31,
259,
20,
3509,
70,
109,
1997,
19,
21,
13,
11124,
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... |
Parent activity not visible after launching child activities
===
I am new to android..Actually iam trying to increase the RAM Memory of android phone through my app..For that I had created an activity from which i could Launch the other applications present in our phone.This approach is sucessfully reducing RAM memory.But i am facing a difficulty,as i couldnot see the PARENT activity after the launch of the Application. I need to push the other activities (that are launched) to be run in the background as soon as it has been launch and always i need the Parent activity to be visible..
package com.android;
import java.util.List;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.MemoryInfo;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.os.Handler;
import android.widget.LinearLayout;
import android.widget.Toast;
/**
* GraphViewDemo creates some dummy data to demonstrate the GraphView component.
* @author Arno den Hond
**/
public class VsActivity extends Activity {
/**
* Variable Array for GraphView
* verlabel : Background Height Values
* horlabel : Background Width Values
* values : Max Values of Foreground Active Graph
*/
private float[] values = new float[60];
long availableMegs;
private String[] verlabels = new String[] { "500","450","400","350","300","250","200","150","100","50","0"};
private String[] horlabels = new String[] {"0","10", "20", "30", "40", "50", "60"};
private GraphView graphView;
private LinearLayout graph;
private boolean runnable = false;
public static int datasend,test=0;
int cnt=0;
Activity activity = this.activity;
static int count=0;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
graph = (LinearLayout)findViewById(R.id.graph);
graphView = new GraphView(this, values, "TEST GRAPH", horlabels, verlabels, GraphView.LINE);
graph.addView(graphView);
runnable = true;
startDraw.start();
}
@Override
public void onDestroy(){
super.onDestroy();
runnable = false;
}
public void setGraph(){
int i,j;
count=count+10;
try{
j=values.length-1;
for(i=0; i<values.length-1; i++){
values[i] = values[i+1];
}
MemoryInfo mi = new ActivityManager.MemoryInfo();
ActivityManager activityManager = (ActivityManager) getApplicationContext()
.getSystemService(ACTIVITY_SERVICE);
activityManager.getMemoryInfo(mi);
datasend= (int)((mi.availMem / 1048576));
values[values.length-1] = (float) datasend;//datasend;//count;
graph.removeView(graphView);
graph.addView(graphView);
}
catch (Exception e){
// e.printstacktrace();
}
}
private void launchComponent(String packageName, String name){
System.out.println("launch application "+datasend);
Intent launch_intent = new Intent("android.intent.action.MAIN");
launch_intent.addCategory("android.intent.category.LAUNCHER");
launch_intent.setComponent(new ComponentName(packageName, name));
launch_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if(datasend > 24){
System.out.println("launch application inside if "+packageName+" "+name);
this.startActivity(launch_intent);
}
}
public void startApplication(){
String application_name = "";
test=1;
//ContextWrapper activity = this.activity;
try{
System.out.println("Start application ");
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
List<android.content.pm.PackageInfo> packageList;
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
PackageManager pm = this.getPackageManager();
packageList = pm.getInstalledPackages(0);
List<ResolveInfo> resolveinfo_list = pm.queryIntentActivities(intent, 0);
for(ResolveInfo info:resolveinfo_list){
application_name = info.activityInfo.packageName;
System.out.println(info.activityInfo.packageName+" "+info.activityInfo.name);
//if(info.activityInfo.packageName.equalsIgnoreCase(application_name)){
launchComponent(info.activityInfo.packageName, info.activityInfo.name);
// break;
// }
}
}
catch (ActivityNotFoundException e) {
Toast.makeText(activity.getApplicationContext(), "There was a problem loading the application: "+application_name,Toast.LENGTH_SHORT).show();
}
}
public Handler handler = new Handler(){
@Override
public void handleMessage(android.os.Message msg){
switch(msg.what){
case 0x01:
setGraph();
// if(test == 0){
startApplication();//}
break;
}
}
};
public Thread startDraw = new Thread(){
@Override
public void run(){
while(runnable){
handler.sendEmptyMessage(0x01);
try{
MemoryInfo mi = new ActivityManager.MemoryInfo();
ActivityManager activityManager = (ActivityManager)getSystemService(ACTIVITY_SERVICE);
activityManager.getMemoryInfo(mi);
long ava = mi.availMem / 1048576L;
//count=(int)ava;
//System.out.println("SUDARHAN RAMAN "+ava+" "+count);
Thread.sleep(1000);
} catch (Exception e){
// e.printstacktrace();
}
}
}
};
}
Here the GraphView is a View which will draw a Graph using Canvas.drawline(...) In the above code startapplication() will launch the child (application installed in our phone) activities..
Plz help ...
| 0 | [
2,
4766,
2358,
52,
4560,
75,
13762,
850,
1648,
800,
3726,
3726,
31,
589,
78,
20,
13005,
9,
9,
15661,
31,
765,
749,
20,
1839,
14,
2843,
1912,
16,
13005,
1132,
120,
51,
4865,
9,
9,
1106,
30,
31,
41,
679,
40,
2358,
37,
56,
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... |
How to make 3D rounded corner JLable in Java?
===
I know there is a way to extend a Jlabel to paint 3D borders and a way to paint round borders, but how do you get both? Here is my code
protected void paintComponent(Graphics g) {
g.setColor(getBackground());
g.fillRoundRect(0, 0, getWidth()-1, getHeight()-1, 25, 25);
g.fill3DRect(10, 10, 30, 30, true);
super.paintComponent(g); | 0 | [
2,
184,
20,
233,
203,
43,
8472,
1531,
13,
22897,
579,
19,
8247,
60,
800,
3726,
3726,
31,
143,
80,
25,
21,
161,
20,
7206,
21,
487,
21018,
20,
5107,
203,
43,
5878,
17,
21,
161,
20,
5107,
560,
5878,
15,
47,
184,
107,
42,
164,
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... |
nogray time picker implementation
===
I want to use nogray time picker . I do not how to use it in my application. What files should i download and how to use it .
var tp = new TimePicker('time_picker', null, null, {onChange:function(){
if (this.time.hour < 12) var ampm = this.options.lang.am;
else var ampm = this.options.lang.pm;
var hour = this.time.hour%12;
if (hour < 10) hour = "0"+hour;
var minute = this.time.minute;
if (minute < 10) minute = "0"+minute;
$('time3_value').setHTML(hour+":"+minute+" "+ampm);
} });
Please help.
Thank you very much | 0 | [
2,
90,
20158,
85,
2036,
106,
6123,
800,
3726,
3726,
31,
259,
20,
275,
90,
20158,
85,
2036,
106,
13,
9,
31,
107,
52,
184,
20,
275,
32,
19,
51,
3010,
9,
98,
6488,
378,
31,
7121,
17,
184,
20,
275,
32,
13,
9,
4033,
13,
13726,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ListView Custom row not clickable entirely
===
I am doing an App ,in which was showing the information from database in listview custom row using SimpleCursorAdapter.I also handle onItemClickListner for listview
My Layout of custom row is as follow
But I have one issue as follow -
when I click above content of listview row then it performs only click event but I want if I click any where in a row then a click action should be performed.but it not behave like this
<LinearLayout
android:layout_width="fill_parent"`enter code here`
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
android:focusableInTouchMode="true"
android:padding="10dip" >
<ImageView android:id="@+id/imageButtonAccount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:src="@drawable/icon_account" />
<TextView
android:id="@+id/TextViewAccount"
style="@style/textView_normal_bold_style"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dip"
android:focusable="false"
android:focusableInTouchMode="false"
android:textSize="@dimen/text_size_large" />
</LinearLayout>
Thanks.
| 0 | [
2,
968,
4725,
5816,
3131,
52,
10840,
579,
2894,
800,
3726,
3726,
31,
589,
845,
40,
4865,
13,
15,
108,
56,
23,
3187,
14,
676,
37,
6018,
19,
968,
4725,
5816,
3131,
568,
1935,
4734,
18,
248,
27576,
106,
9,
49,
67,
3053,
27,
2119,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 method in WSDL from Salesforce callout
===
I m a new bie to the salesforce, and I m trying to get the response by calling a wsdl file from the salesforce.<br/>
I dont know how to call a method of the WSDL from HTTP callouts<br/><br/>
The code is something Like this :-<br/>
//HTTP request<br/>
HttpRequest req = new HttpRequest();<br/>
req.setEndpoint('domain.com/webservices/wwservice.php?wsdl');<br/>
req.setMethod('GET');<br/><br/>
ANd I m calling the HTTP request and response from the TestMethod.<br/>
The result I m getting is System.HttpResponse[Status=null, StatusCode=0] .<br/>
Please help me out in this. | 0 | [
2,
184,
20,
645,
21,
2109,
19,
619,
18,
8643,
37,
2598,
8774,
645,
1320,
800,
3726,
3726,
31,
307,
21,
78,
13,
5893,
20,
14,
2598,
8774,
15,
17,
31,
307,
749,
20,
164,
14,
1627,
34,
2555,
21,
619,
18,
8643,
3893,
37,
14,
259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regex to match two words in a string
===
I have a string
> "13572_BranchInformationReport_2012-06-28.zip","13572_BranchInformationReport_2012-06-28.zip",0,"184296","`Jun 28` 1:30","/icons/default.gif"
What could be the Regex If i want to extract `Jun 28` from this string using c#.
| 0 | [
2,
7953,
1706,
20,
730,
81,
715,
19,
21,
3724,
800,
3726,
3726,
31,
57,
21,
3724,
13,
1,
13,
7,
17161,
4009,
1,
23014,
22793,
17437,
1,
3212,
8,
3370,
8,
2714,
9,
2553,
306,
7,
15,
7,
17161,
4009,
1,
23014,
22793,
17437,
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... |
Label display inside nodes cytoscape.js
===
Is there a way to display a node label centered inside the node such as cytoscape desktop does by default? | 0 | [
2,
1899,
3042,
572,
16272,
13,
16483,
13109,
9,
728,
18,
800,
3726,
3726,
25,
80,
21,
161,
20,
3042,
21,
15421,
1899,
10583,
572,
14,
15421,
145,
28,
13,
16483,
13109,
17404,
630,
34,
12838,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SQL Match multiple rows
===
relationID sessionID_Ref userID_Ref
1 1 1
2 1 2
3 2 1
4 2 3
5 3 1
6 3 2
7 3 3
Okey! I'm building a messaging system with the possibility to send messages to a group of people. But I'm stuck with this SQL query where to find the sessionID depending on what users I send the message to.
For example: If I (userID: 1) send a message to userID 2, the SQL Query should return sessionID: 1
If I send a message to userID 2 and 3, it sould return: sessionID: 3
Can I do this with a single sql query, using MSSQL?
Thanks in advance | 0 | [
2,
4444,
255,
730,
1886,
11295,
800,
3726,
3726,
5827,
1340,
3723,
1340,
1,
14057,
275,
5175,
1,
14057,
137,
137,
137,
172,
137,
172,
203,
172,
137,
268,
172,
203,
331,
203,
137,
400,
203,
172,
453,
203,
203,
635,
4237,
187,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.