unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Xcode 4.3 is not finding header files in /usr/include
===
For some reason Xcode is saying it cannot find a header file which is located in /usr/include
As a test, I just put the include at the top of a hello world program. I can compile it fine with clang in the terminal, but in Xcode it still says it cannot find the header.
I tried adding /usr/include to the "Header Search Paths" in build settings, but it is still not finding it.
I am not sure what to do here. It seems like Xcode should automatically be looking in this directory in the first place. | 0 | [
2,
993,
9375,
268,
9,
240,
25,
52,
3007,
157,
106,
6488,
19,
13,
118,
267,
139,
118,
22640,
800,
3726,
3726,
26,
109,
1215,
993,
9375,
25,
1148,
32,
1967,
477,
21,
157,
106,
3893,
56,
25,
335,
19,
13,
118,
267,
139,
118,
22640... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Solr4.0 with Tomcat 7 installation error
===
After trying to install Solr4.0 alpha on tomcat, I can never get to the admin gui, as I get the following error message:
This interface requires that you activate the admin request handlers, add the following configuration to your solrconfig.xml:
<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->
<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
and even after adding them to the solrconfig.xml (they actually already existed), the admin gui will still not load. I have seen some bugs reported on apache, but none of them fix the problem. Does anyone have a solution? | 0 | [
2,
7176,
139,
300,
9,
387,
29,
2067,
5782,
453,
7758,
7019,
800,
3726,
3726,
75,
749,
20,
16146,
7176,
139,
300,
9,
387,
5705,
27,
2067,
5782,
15,
31,
92,
243,
164,
20,
14,
21,
43,
2160,
9457,
15,
28,
31,
164,
14,
249,
7019,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I am having Issues converting this code to web service
===
I was fortunate to have @Darin Dimitrov help me convert asp.net to web service on this link:
http://stackoverflow.com/questions/11460585/how-can-i-migrate-this-to-web-service
This time, I tried to convert the code below but having issues.
Here is the code I am trying to convert, followed by my conversion attempt.
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using EO.Pdf;
using System.Collections.Specialized;
partial class ToDems : System.Web.UI.Page
{
private void // ERROR: Handles clauses are not supported in C#
Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack) {
string itemList = Request.QueryString("from");
string[] items = Strings.Split(itemList, ",");
//Create a PdfDocument object
PdfDocument doc = new PdfDocument();
string item = null;
foreach ( item in items) {
HtmlToPdf.ConvertUrl(url, doc);
}
//We present "Save As" dialog
doc.Save(Response.OutputStream);
}
}
}
This is what I have tried but confused about the list and loop.
public class ToDems : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string itemList = context.Request.QueryString["from"];
string items = context.Strings.Split(itemList, ",");
PdfDocument doc = new PdfDocument();
string item = null;
foreach ( item in items)
{
HtmlToPdf.ConvertUrl(url, doc);
}
doc.Save(context.Response.OutputStream);
}
public bool IsReusable
{
get { return false; }
}
}
What am I doing wrong? | 0 | [
2,
31,
589,
452,
1549,
19583,
48,
1797,
20,
2741,
365,
800,
3726,
3726,
31,
23,
22446,
20,
57,
13,
1,
2542,
108,
5937,
242,
6937,
448,
55,
8406,
28,
306,
9,
2328,
20,
2741,
365,
27,
48,
3508,
45,
7775,
6903,
25325,
2549,
9990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 join two tables on common attributes in mysql and php?
===
i have 2 tables:
table1
id message user
1 testing 23
2 testing again 44
3 test.. 23
5 lol 12
6 test.. 6
and
table2
id user friend
1 23 44
2 23 6
3 19 12
4 23 32
5 23 76
6 23 89
i am trying to get the `messages` of all users that are friends with `23` including `23`
like:
id message user id user friend
1 testing 23 n n n
2 testing again 44 1 23 44
3 test.. 23 n n n
6 test.. 6 2 23 6
we can see that `12` is missing because he is not friend with `23` but only with `19`
i've got this
SELECT *
FROM table1 AS w
INNER JOIN table1 AS f ON w.user = f.friend
WHERE (w.user = 23)
but in case `23` has messages but no friends it will return null and also this will return other friends of `23` like `76 and 89` that have no messages..
:) confused?
any ideas?
thanks | 0 | [
2,
184,
20,
1865,
81,
7484,
27,
757,
13422,
19,
51,
18,
22402,
17,
13,
26120,
60,
800,
3726,
3726,
31,
57,
172,
7484,
45,
859,
165,
4924,
2802,
4155,
137,
4431,
1137,
172,
4431,
188,
4576,
203,
1289,
9,
9,
1137,
331,
13,
20248,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 run "cd" command using C# Process Mono
===
proc.StartInfo.FileName="cd";
proc.StartInfo.Arguments="/";
proc.Start();
proc.WaitForExit();
Hi, I am trying to run "cd" command to access a directory, but when the process starts, the app closes. Can you help me? | 0 | [
2,
92,
22,
38,
485,
13,
7,
6324,
7,
1202,
568,
272,
5910,
953,
4129,
800,
3726,
3726,
13,
15617,
9,
13680,
108,
4120,
9,
16877,
7259,
3726,
7,
6324,
7,
73,
13,
15617,
9,
13680,
108,
4120,
9,
512,
3073,
6601,
3726,
7,
118,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Facebook library not exporting to android .apk
===
I have an Android app that allows users to login via Facebook. Everything works well in the emulator, but when I export a signed .apk, and run from my phone, it appears that the Facebook SDK isn't included (it will flash an empty FB screen for a second, then go back to the previous screen).
The facebook SDK is un-compiled and the code is included in the project as a separate package. As I said in above, it works in an emulator so I'm assuming I properly included the package as a library from my own package.
Is there anything special you need to do to include an outside library when exporting the .apk?
Thanks! | 0 | [
2,
9090,
1248,
52,
7487,
68,
20,
13005,
13,
9,
2552,
197,
800,
3726,
3726,
31,
57,
40,
13005,
4865,
30,
2965,
3878,
20,
6738,
108,
1197,
9090,
9,
796,
693,
134,
19,
14,
3579,
14868,
15,
47,
76,
31,
7487,
21,
908,
13,
9,
2552,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 applet taking a screenshot of browser with a flash application, flash missing
===
I am attempting to create a Java applet that takes a screenshot of the browser containing a flash application. The case for that is to have a "Bug found/Feedback" sidebar for the testers of our flash application that can send a form with a screenshot of the tester's browser with his actual view so that the developers can understand the comment/bug.
I am using the `Robot().createScreenCapture(Rectangle)` method and I indeed get the screenshot but the flash application is missing from the image file created. I was fearing that because I had guessed that Flash was using overlay and direct access to the graphical driver.
My question is: is there a way to get the actual screen viewed by the user with the Robot class ? If not, is there another way to do that via Java ? And finally, if not, what would be an alternative to achieve the same conclusion which is to take a screenshot of the tester's screen that can be send via HTML/JavaScript to our servers.
Important: <br>
- It must be a browser based solution.<br>
- It *"must"* be browser and OS independent (that would be a PLUS, but if it's only for windows, that would be okay in last resort)<br>
- I have read about the `Robot()` methods to simulate a (Alt)PrintScreen keyboard action and take the content of the clipboard but it's too dependent of the Browser/OS.<br>
- I understand that there are permissions issues to access the screen but that's something that we can tell to the testers.
Thanks in advance to the repliers,
O. | 0 | [
2,
8247,
4037,
38,
741,
21,
2324,
7868,
16,
16495,
29,
21,
4433,
3010,
15,
4433,
2863,
800,
3726,
3726,
31,
589,
6314,
20,
1600,
21,
8247,
4037,
38,
30,
1384,
21,
2324,
7868,
16,
14,
16495,
3503,
21,
4433,
3010,
9,
14,
610,
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... |
Why is DBCP still used instead of other Connection Pools?
===
After reading this article - "[Connection pooling options with JDBC: DBCP vs C3P0][1]"; About how Apache DBCP is out of date, not production graded and not supported by hibernate, I'm confused why people are still using it instead other connection pools like C3P0?
For example:
In this tutorial created May 2012 - [Spring Hibernate Integration Tutorial][2]
<bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> ... </bean>
[1]: http://stackoverflow.com/questions/520585/connection-pooling-options-with-jdbc-dbcp-vs-c3p0
[2]: http://www.dzone.com/tutorials/java/spring/spring-hibernate-integration-1.html
| 0 | [
2,
483,
25,
13,
9007,
7439,
174,
147,
700,
16,
89,
2760,
15230,
60,
800,
3726,
3726,
75,
1876,
48,
2002,
13,
8,
13,
7,
2558,
25996,
872,
3067,
68,
6368,
29,
487,
43,
7229,
45,
13,
9007,
7439,
4611,
272,
240,
306,
387,
500,
255... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Divert TCP connection
===
I am trying to divert a TCP connection. Given a client (C) which is connected to a router R and two servers (S1 and S2) are connected to the router, C initially connects to S1. I am trying to write an iptables rule in the router to divert all traffic to S2. But the problem is, S2 keeps on sending RST messages and the connection is never established. I ran wireshark on all the boxes and noticed this: C sets up a TCP connection with S1 and when my iptable rule starts is active, it sends an ACK to S2 which sends back a RST and then they loop on this for time. Is there a way to divert TCP connections like this?
| 2 | [
2,
19610,
13,
38,
7439,
2760,
800,
3726,
3726,
31,
589,
749,
20,
19610,
21,
13,
38,
7439,
2760,
9,
504,
21,
6819,
13,
5,
150,
6,
56,
25,
2587,
20,
21,
858,
139,
761,
17,
81,
17595,
13,
5,
18,
165,
17,
13,
18,
135,
6,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any way to make the Bottle servers less verbose?
===
Is there any option *on the Bottle side* that can keep servers like *WSGIRef* and *Paste* from outputting a line for every request received?
**NB:** I know there's a *quiet* option, but I don't want the entire appication to be silent, just the request log.
It gets very messy very quickly, especially considering that I'd like to print debug information now and then and it just gets lost in the chaos. Here's the output for a single page-load, and it'll probably get a lot bigger when my project grows a little:
<pre>
Bottle server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.
localhost - - [28/Jul/2012 04:05:59] "GET /clients HTTP/1.1" 200 3129
localhost - - [28/Jul/2012 04:05:59] "GET /static/css/main.css HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/js/jquery-1.7.2.js HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/js/jquery.cookie.js HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/js/jquery.qtip.min.js HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/js/showdown.js HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/js/proj.js HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:05:59] "GET /static/css/reset.css HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:06:00] "GET /static/images/flag_gb.png HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:06:00] "GET /static/images/flag_no.png HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:06:00] "GET /static/images/icon_add.png HTTP/1.1" 304 0
localhost - - [28/Jul/2012 04:06:00] "GET /favicon.ico HTTP/1.1" 404 742
</pre> | 0 | [
2,
25,
80,
186,
161,
20,
233,
14,
4040,
17595,
787,
9504,
6641,
60,
800,
3726,
3726,
25,
80,
186,
4255,
1637,
218,
14,
4040,
270,
2483,
30,
92,
643,
17595,
101,
1637,
10268,
2234,
14057,
2483,
17,
1637,
19802,
62,
2483,
37,
5196,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MYSQL connection thorugh ssh with ruby
===
I have an interesting question that needs to be resolved in an elegant way :)
I have two hosts: my laptop and an MYSQL server to which I need to connect to the thing is that I can only ssh the server via a private/public keys and from there I can log in directly to the mysql and send queries.
My question is how can I do this in ruby? I already solve the ssh with private key connection to the server:
Net::SSH.start(ssh_host, ssh_user, :port => ssh_port, :keys => keys, :passphrase => passphrase) do |ssh|
result = ssh.exec!('ls')
puts result
end
But I dont know how to proceed from here on :(
Has anyone encountered the same problem?
| 0 | [
2,
51,
18,
22402,
2760,
7189,
9294,
13,
18,
1635,
29,
10811,
800,
3726,
3726,
31,
57,
40,
4883,
1301,
30,
2274,
20,
44,
11052,
19,
40,
11614,
161,
13,
45,
6,
31,
57,
81,
5397,
45,
51,
12294,
17,
40,
51,
18,
22402,
8128,
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... |
Dynamic file path for IDE setting?
===
Can you set the drive letter to be dynamically added for an application setting on a flash-usb?
Something like this maybe? -> (*i.e. {DRIVE:PATH}/Qt/4.8.1/bin}*)
**Issue Example:**
I have Qt SDK 1.2.1 installed on my flash drive for plug and play on any workstation without the environment. The issue is if the drive letter isn't assigned to be the same as when I installed it, things wont link or compile. | 0 | [
2,
7782,
3893,
2013,
26,
13,
3448,
2697,
60,
800,
3726,
3726,
92,
42,
309,
14,
1493,
1748,
20,
44,
7782,
1326,
905,
26,
40,
3010,
2697,
27,
21,
4433,
8,
267,
220,
60,
301,
101,
48,
913,
60,
13,
8,
1,
13,
5,
2483,
49,
9,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
app engine java openid tutorial errors
===
I'm going through this tutorial pretty much verbatim:
[https://developers.google.com/google-apps/marketplace/tutorial_java][1]
- deploying to my app engine app id nimbits-domains. I set my consumer secret and api key in my web.xml. The downloadable sample compiles and deployes ok. When I add the app to my domain via the marketplace, and then launch the app I get an error in my app engine log:
Uncaught exception from servlet
javax.servlet.UnavailableException: com.google.inject.ProvisionException: Guice provision errors:
1) Error injecting constructor, java.lang.NullPointerException
at com.google.code.samples.apps.marketplace.openid.appengine.AppEngineTrustsRootProvider.<init>(AppEngineTrustsRootProvider.java:33)
while locating com.google.code.samples.apps.marketplace.openid.appengine.AppEngineTrustsRootProvider
while locating com.google.step2.xmlsimplesign.TrustRootsProvider
for parameter 0 at com.google.step2.xmlsimplesign.CachedCertPathValidator.<init>(CachedCertPathValidator.java:61)
while locating com.google.step2.xmlsimplesign.CachedCertPathValidator
for parameter 0 at com.google.step2.xmlsimplesign.Verifier.<init>(Verifier.java:51)
while locating com.google.step2.xmlsimplesign.Verifier
for parameter 1 at com.google.step2.discovery.LegacyXrdsResolver.<init>(LegacyXrdsResolver.java:91)
while locating com.google.step2.discovery.LegacyXrdsResolver
while locating com.google.step2.discovery.XrdDiscoveryResolver
for parameter 1 at com.google.step2.discovery.Discovery2.<init>(Discovery2.java:167)
while locating com.google.step2.discovery.Discovery2
for parameter 1 at com.google.step2.ConsumerHelper.<init>(ConsumerHelper.java:60)
while locating com.google.step2.ConsumerHelper
I'm wondering if the sample code is out of date. Particularly this method in GuiceModule:
/**
* Overrides for running on GAE. Need to ue special HTTP fetchers & explicitly set the trust roots
* since the built-in java equivalents are not available when running in GAE's sandbox.
*/
public static class AppEngineModule extends AbstractModule {
@Override
protected void configure() {
bind(HttpFetcher.class)
.to(AppEngineHttpFetcher.class).in(Scopes.SINGLETON);
bind(TrustRootsProvider.class)
.to(AppEngineTrustsRootProvider.class).in(Scopes.SINGLETON);
bind(org.openid4java.util.HttpFetcher.class)
.to(Openid4javaFetcher.class)
.in(Scopes.SINGLETON);
}
}
[1]: https://developers.google.com/google-apps/marketplace/tutorial_java#Structure-ListingDev
Does anyone know a working sample for using OpenID and Google Apps with Java and GAE?
Is this sample broken or is it me?
| 0 | [
2,
4865,
1406,
8247,
368,
1340,
29724,
11908,
800,
3726,
3726,
31,
22,
79,
228,
120,
48,
29724,
1772,
212,
9504,
5166,
79,
45,
636,
21127,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
960,
118,
16111,
4875,
8,
7753,
18,
118,
10822,
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... |
MATLAB compiler processes mcc.enc too many times
===
I'm using mcc to compile my MATLAB project. The machine I'm using has many MATLAB toolboxes installed on it, but my code only requires a few (such as distcomp and images). However, whenever I run mcc, it ends up "processing" the mcc.enc files for many toolboxes, including those that my code does not need.
Here is the beginning of the output from mcc (I'm running it with <code>-R '-nodisplay'</code> to be compatible with the cluster I'm using).
Warning: No display specified. You will not be able to display graphics on the screen.
Compiler version: 4.15 (R2011a)
Processing /cm/shared/apps/matlab/7.12.0/toolbox/matlab/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/distcomp/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/images/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/stats/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/imageslib/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/system/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/spcuilib/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/control/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/controllib/engine/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/controllib/general/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/signal/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/nnet/mcc.enc
I've noticed it does the same thing when running mcc on my desktop as well. Some of these mcc.enc files (especially .../signal/mcc.enc and .../nnet/mcc.enc), take more time to process than it takes the rest of mcc to execute. Is there any way to exclude processing unneeded mcc.enc files? | 0 | [
2,
4277,
9086,
21486,
5102,
7263,
9,
219,
150,
266,
151,
436,
800,
3726,
3726,
31,
22,
79,
568,
7263,
20,
26561,
51,
4277,
9086,
669,
9,
14,
1940,
31,
22,
79,
568,
63,
151,
4277,
9086,
5607,
5309,
160,
4066,
27,
32,
15,
47,
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... |
In an ExtJS custom renderer how do I tell if the column header has been clicked?
===
I have an ExtJs EditorGridPanel with a custom renderer. The basic idea is to display a checkbox when an item needs to be registered and the text Registered when an item is already registered. Everything is working swimmingly except for when clicking on the header, the entire grid re-renders and every cell toggles. Furthermore, the sort does not work. How to I tell when the header has been clicked so that all my checkboxes do not toggle? How do I fix the sort for the column? Right now it does not sort. Thanks in advance for your help.
var colModel = new Ext.grid.ColumnModel(
{
columns: [
{ id: 'ItemOid', header: "ItemOid", width: 100, sortable: true, locked: true, dataIndex: 'ItemOid', hidden: true },
{ id: 'nNumber', header: "N-#", width: 100, sortable: true, locked: true, dataIndex: 'NNumber' },
{ header: "Make", width: 150, sortable: true, dataIndex: 'Make' },
{ header: "Model", width: 150, sortable: true, dataIndex: 'Model' },
{ header: "Register",
width: 55,
sortable: true,
dataIndex: 'Register',
xtype: 'checkcolumn',
renderer: renderFunction
}
]
});
function renderFunction(value, metaData, record, rowIndex, colIndex, store) {
if (!store.getAt(rowIndex).data['ItemNeedsRegistered'])
return 'Registered';
var isRegistered = store.getAt(rowIndex).data['Registered'];
var renderString;
if (initialItemRender || isRegistered) {
renderString = '<input type="checkbox" id="chkRegistered' + rowIndex + '" />';
store.getAt(rowIndex).data['Registered'] = false;
} else {
renderString = '<input type="checkbox" checked="yes" id="chkRegistered' + rowIndex + '" />';
store.getAt(rowIndex).data['Registered'] = true;
}
return renderString;
}
var grid = new Ext.grid.EditorGridPanel({
store: itemStore,
cm: colModel,
sm: new Ext.grid.RowSelectionModel({ singleSelect: true }),
viewConfig: {
forceFit: true
},
height: 100,
split: true,
region: 'north'
}); | 0 | [
2,
19,
40,
1396,
38,
728,
18,
5816,
16535,
106,
184,
107,
31,
494,
100,
14,
4698,
157,
106,
63,
74,
15802,
60,
800,
3726,
3726,
31,
57,
40,
1396,
38,
728,
18,
1835,
16375,
3206,
532,
29,
21,
5816,
16535,
106,
9,
14,
2125,
882,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Channel Google App Engine channel.open() does not work
===
I've a problem when opening the channel.
i've this on the server side:
def get(self):
user = users.get_current_user()
if not user:
self.redirect(users.create_login_url(self.request.uri))
return
channel_id=str(str(random.randint(0,1000)))
token = channel.create_channel(channel_id)
template_values = {
'token': token,
'me': user.user_id()
}
logger.debug("Token: %s user:%s %s %s" % (token,user.user_id(),user.nickname(),user.email()))
self.response.out.write(template.render('templates/index.html', template_values))
and this on the HTML (templates/index.html)
<html>
<head>
<script type="text/javascript" src="/_ah/channel/jsapi"></script>
</head>
<body>
{{ token }}
<script>alert("a0");
var token = {{ token }};
alert("a1");
var channel = new goog.appengine.Channel(token);
alert("a2");
var socket = channel.open();
alert("a3");
socket.onopen = function(){
alert("open");
};
socket.onmessage = function(m){
var data = $.parseJSON(m.data);
alert(data)
};
socket.onerror = function(err){
alert("Error => "+err.description);
};
socket.onclose = function(){
alert("channel closed");
};
</script>
</body>
</html>
I put alert to see if everything works, but a0 a1 a2 are raised, while a3 doesn't.
Where is the problem?
why channel.open() does not work?
PS: is there any way to trace these errors in javascript ? something more effective then guessing where is the error.
| 0 | [
2,
1318,
8144,
4865,
1406,
1318,
9,
10157,
5,
6,
630,
52,
170,
800,
3726,
3726,
31,
22,
195,
21,
1448,
76,
1214,
14,
1318,
9,
31,
22,
195,
48,
27,
14,
8128,
270,
45,
6312,
164,
5,
8411,
6,
45,
4155,
800,
3878,
9,
3060,
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... |
Inserting a variable to the database using sqlite in Python
===
I want to add some data from variables into my database using sqlite library in python. I create a table and then run the sql statement. Here is my simple code:
import sqlite3
db = sqlite3.connect("dbse.sqlite")
cursor= db.cursor()
cursor.execute("CREATE TABLE Myt (Test TEXT)")
variable = ('aaa')
cursor.execute('INSERT INTO Myt VALUES (?)' , variable)
db.commit()
but after running the code, this error comes up:
cursor.execute('INSERT INTO Myt VALUES (?)' , variable)
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 3 supplied.
When I insert a variable that contains a one character value, it works well but when I use a variable with more than one character, it doesn't work.
I use python 3.2.3 .
Do you have an idea to solve it? | 0 | [
2,
14692,
68,
21,
7612,
20,
14,
6018,
568,
4444,
10601,
19,
20059,
800,
3726,
3726,
31,
259,
20,
3547,
109,
1054,
37,
12157,
77,
51,
6018,
568,
4444,
10601,
1248,
19,
20059,
9,
31,
1600,
21,
859,
17,
94,
485,
14,
4444,
255,
3331... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Use C++ strings in file handling
===
How to use C++ strings in file handling? I created a class that had C++ string as one of its private data members but that gave an error while reading from the file even if I am not manipulating with it at the moment and was initialised with default value in constructor. There is no problem while writing to the file. It works fine if I use C string instead but I don't want to. Is there a way to solve this? | 0 | [
2,
275,
272,
20512,
7887,
19,
3893,
7988,
800,
3726,
3726,
184,
20,
275,
272,
20512,
7887,
19,
3893,
7988,
60,
31,
679,
21,
718,
30,
41,
272,
20512,
3724,
28,
53,
16,
82,
932,
1054,
443,
47,
30,
492,
40,
7019,
133,
1876,
37,
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 extract distinct part of a string from a file in linux
===
I'm using the following command to extract distinct urls that contain .com extension and may contain .us or whatever country extension.
grep '\.com' source.txt -m 700 | uniq | sed -e 's/www.//'
> dest.txt
The problem is that, it extracts urls in the same doamin, the thing tht I don't want. Ex:
abc.yahoo.com
efg.yahoo.com
I only need the yahoo.com. How can I using grep or any other command extract distinct domain names only ?
| 0 | [
2,
184,
20,
10962,
4421,
141,
16,
21,
3724,
37,
21,
3893,
19,
13024,
800,
3726,
3726,
31,
22,
79,
568,
14,
249,
1202,
20,
10962,
4421,
13,
911,
7532,
30,
3717,
13,
9,
960,
3896,
17,
123,
3717,
13,
9,
267,
54,
2099,
475,
3896,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Migrating iphone app to universal - problemm with SplitViewController
===
I have searched the big google and stack for help in this and have not been able to find a useable answer.
I am new to iphone app development and would like your help.
I am using xcode 4.3, and I have made a Master-Detail app (NOT using storyboard), and after i finished, i needed to make it universal.
So i made a new NIB as a SplitViewController.
I dont know if i need to assign the class of this nib to AppDelegate (where i load the views) OR the MasterViewController.
And I am not able to find the "view" outlet of the files owner unless i chose the MasterViewController as a the class for the new nib.
then i coupled it with the table view in the masterviewcontroller (root view controller) of the split view controller. Then i get some strange errors on runtime.
The app loads fine in portrait with the detail view as i set it to be the splitviewcontroller delegate, but when i load the landscape orientation, it crashes with some error about a button in the masterviewcontroller that has nothing to do with the splitviewcontroller:
this class is not key value coding-compliant for the key addButton.
Can you please shed some light on this error? and eventually describe briefly the steps i need to make the iphone app universal starting with a brand new view nib with splitviewcontroller.
I would appreciate it and you would help me on my path to riches! (knowledge riches of course :) ) | 0 | [
2,
28749,
21024,
4865,
20,
4172,
13,
8,
1448,
79,
29,
2132,
4725,
12898,
1252,
800,
3726,
3726,
31,
57,
9036,
14,
580,
8144,
17,
7566,
26,
448,
19,
48,
17,
57,
52,
74,
777,
20,
477,
21,
275,
579,
1623,
9,
31,
589,
78,
20,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
rewrite to www and rewrite directory name
===
Hi I have some thing like the following, everything works perfectly until I try and add 'www' if it doesn't exist I get something like the below:
origin: http://domain.net/welcome/
Rewrite: http://www.domain.net//index.php/?request=welcome
php_value register_globals "on"
RewriteEngine on
RewriteRule ^(.+)/$ /index.php?request=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
RewriteCond %{HTTP_HOST} ^domain.net$
RewriteRule (.*) http://www.domain.net/$1 [R=301]
ErrorDocument 404 /404.php?request=$1 | 0 | [
2,
27891,
20,
13,
6483,
17,
27891,
16755,
204,
800,
3726,
3726,
4148,
31,
57,
109,
584,
101,
14,
249,
15,
796,
693,
5759,
163,
31,
1131,
17,
3547,
13,
22,
6483,
22,
100,
32,
1437,
22,
38,
3182,
31,
164,
301,
101,
14,
1021,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
OnClick method in own component works slow
===
i'm trying to make my own component, which I will use to change background. Now I have really empty component form, and i put it on the form. To onclick event I add a code:
private void myComponent_Click(object sender, EventArgs e)
{
this.BackColor = (this.BackColor == Color.Red) ? Color.Blue : Color.Red;
}
It works when i click slow. But when i'm clicking very fast, background is changing always on the second click. What is wrong in this code? I tried too use MouseClick, but there is the same result. | 0 | [
2,
27,
150,
10129,
2109,
19,
258,
5912,
693,
2276,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
51,
258,
5912,
15,
56,
31,
129,
275,
20,
753,
2395,
9,
130,
31,
57,
510,
2424,
5912,
505,
15,
17,
31,
442,
32,
27,
14,
505,
9,
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... |
Downloading Live Olympic Medal Data into R
===
It looks like the website is blocking direct access from Curl.
library(XML)
library(RCurl)
theurl <- "http://www.london2012.com/medals/medal-count/"
page <- getURL(theurl)
page # fail
[1] "<HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don't have permission to access \"http://www.london2012.com/medals/medal-count/\" on this server.<P>\nReference #18.358a503f.1343590091.c056ae2\n</BODY>\n</HTML>\n"
Let's try to see if we can access it directly from the Table.
page <- readHTMLTable(theurl)
No luck there `Error in htmlParse(doc) : error in creating parser for http://www.london2012.com/medals/medal-count/`
How would you go about getting this table into R? | 0 | [
2,
7121,
68,
515,
2713,
1217,
1054,
77,
761,
800,
3726,
3726,
32,
1879,
101,
14,
2271,
25,
11828,
1744,
1381,
37,
14320,
9,
1248,
5,
396,
8184,
6,
1248,
5,
139,
4734,
255,
6,
14,
911,
255,
13,
1,
8,
13,
7,
21127,
6903,
6483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I include a variable in an FQL query?
===
I would like to use a variable in my FQL query. I'm using Koala in my rails environment to access Facebook variables
u1 = f["uid1"]
@opponent = @graph.fql_query('select name, pic_square FROM user WHERE uid = "' + u1 + '"')
The above code is not working. I'd appreciate any feedback! Thanks!! | 0 | [
2,
184,
107,
31,
468,
21,
7612,
19,
40,
398,
22402,
25597,
60,
800,
3726,
3726,
31,
83,
101,
20,
275,
21,
7612,
19,
51,
398,
22402,
25597,
9,
31,
22,
79,
568,
1584,
4242,
19,
51,
2240,
18,
2307,
20,
1381,
9090,
12157,
287,
165... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Access D3 from GWT
===
I include the d3 javascript like this
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="d3/d3.nocache.js"></script>
</head>
<body>
</body>
</html>
Then when I call it from the entry point d3 is null, why?
package com.example.client;
import com.google.gwt.core.client.EntryPoint;
public class D3 implements EntryPoint {
public void onModuleLoad() {
test();
}
private native void test()/*-{
$wnd.alert($wnd.d3);
}-*/;
}
| 0 | [
2,
1381,
13,
43,
240,
37,
14094,
38,
800,
3726,
3726,
31,
468,
14,
13,
43,
240,
8247,
8741,
101,
48,
13,
1,
187,
13799,
4474,
13,
15895,
1,
13,
1,
15895,
1,
13,
1,
1743,
1,
13,
1,
5909,
58,
7775,
8,
9629,
710,
3726,
7,
254... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unpacking software for analysis
===
Has anyone ever tried to analyze binaries for radmin..
I was just trying to analyze it for getting a hands on experience. I found out that it is somehow packed or encrypted. I mean a very few imports with getprocaddress, loadlibrary, virtualalloc being some calls among them..IDA does not recognize much..processexplorer shows the process in violet..but all the sections are there.
there were also some other things I saw during debugging the radmin process like:-
crashing ollydbg, generating exceptions and getting terminated, getting terminated in the debugger and when I close the attached debugger, the process remains alive and works as it should..totally weird..
Can anyone suggest how I should go about it.
Thanks | 0 | [
2,
367,
8573,
68,
2306,
26,
2495,
800,
3726,
3726,
63,
1276,
462,
794,
20,
16051,
4511,
11301,
26,
4944,
2160,
9,
9,
31,
23,
114,
749,
20,
16051,
32,
26,
1017,
21,
473,
27,
1496,
9,
31,
216,
70,
30,
32,
25,
3625,
9402,
54,
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... |
visio sdk in c# : add image to orgchart shape
===
I am working on Implementation of dynamic organization chart in Visual studio 2010(.net)
In my project i used visio sdk (Microsoft.Office.Interop.Visio)
now , I want to add an image to my shapes(Microsoft.Office.Interop.Visio.Shape) in OrgChart("ORGCH_M.VST") template.
can anybody help me in this? | 0 | [
2,
9060,
1963,
13,
18,
43,
197,
19,
272,
5910,
13,
45,
3547,
1961,
20,
54,
10362,
8342,
2539,
800,
3726,
3726,
31,
589,
638,
27,
6123,
16,
7782,
1165,
1795,
19,
3458,
1120,
498,
5,
9,
2328,
6,
19,
51,
669,
31,
147,
9060,
1963,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
creating NSDictionary with keys that have multiple values
===
I have a mutable array that contains NSDictionary *dic1* objectes ,
each dictionary have a key called **contactId** , more than one dictionary can have the same value for **contactId** .
what i want to do is to create an NSDictionary with unique contactIds as the keys and an array value that contains a list of all NSDictionary *dic1* objects that have the value **contactId** equal to the key
how can i do this ??
my data looks like this
**myArray**:[ **dic1** {contactId = x1 , name = name1 }, **dic2**{contactId = x2, name = name2 }, **dic3**{contactId = x1, name = name3} ]
i want it to become like this
**NSDictionary**: { **x1**:[dic1, dic3], **x2**:[dic2] } | 0 | [
2,
2936,
13,
2172,
22595,
1857,
29,
5534,
30,
57,
1886,
4070,
800,
3726,
3726,
31,
57,
21,
2832,
5924,
7718,
30,
1588,
13,
2172,
22595,
1857,
1637,
4673,
165,
2483,
3095,
160,
13,
15,
206,
9186,
57,
21,
1246,
227,
13,
1409,
29912,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Gallio 64bit Plattform and 32bit dll Sonar and OpenCover BadImageException
===
We using Gallio for test execution. All projects under test and all test projects are compiled as 32bit Version. The Buildserver is Win2008 R2 64bit.
Gallio is installed as 32bit version.
Gallio is startet through Sonar. As coverageTool we use OpenCover.
As the title says the BadImageFormat Exception is the Problem. Then Trying to run, the .Net\Framework64\ folder is used. But all targets are set to 32bit architecture.
After two days of testing and researching I tryed different Gallio Versions:
32bit installer
64bit installer
Gallio Bundle Zip
I tried to rename the Gallio.Host.x86.exe to Gallio.Host.exe
I tried to force Gallio to run in 32bit mode via CorFlags Galio.Echo.exe /32BIT+ /FORCE
(Using /FORCE will invalidate the signature of this image and will require the assambly to be resigned)
Has anybody a Idea what I'am doing wrong?
| 0 | [
2,
15212,
111,
4384,
3326,
14254,
4190,
17,
2512,
3326,
13,
43,
211,
433,
512,
17,
368,
14069,
896,
22039,
10066,
872,
800,
3726,
3726,
95,
568,
15212,
111,
26,
1289,
5769,
9,
65,
2314,
131,
1289,
17,
65,
1289,
2314,
50,
9316,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use post method in ruby?
===
I have a form that contains text boxes which gets the values of name and title. And a submit button is present. I want to get the values of the text boxes and send it in the format shown below to an api.
{
"entry":
{
"name":"api-workspace",
"title":"API Workspace"
}
}
How can i do it using ruby?
please give me some sample codes if available. | 0 | [
2,
184,
20,
275,
678,
2109,
19,
10811,
60,
800,
3726,
3726,
31,
57,
21,
505,
30,
1588,
1854,
8120,
56,
3049,
14,
4070,
16,
204,
17,
581,
9,
17,
21,
12298,
5167,
25,
734,
9,
31,
259,
20,
164,
14,
4070,
16,
14,
1854,
8120,
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... |
Genetic Algorithm for Sudoku
===
I'm currently working on translating these codes especially the function name "boolean _solvePuzzle ". I had been searching over the Internet but still I do not know how to translate this segment to use Genetic Algorithm to produce the output. Anyone can please help me one this? I had been looking for few hours and still can't do it. Please help. Thanks a lot in advance.
import java.util.Random;
//Generates a Sudoku puzzle through brute-force
public class SudokuPuzzle
{
public int[][] puzzle = new int[9][9]; // Generated puzzle.
public int[][] solved_puzzle = new int[9][9]; // The solved puzzle.
private int[][] _tmp_grid = new int[9][9]; // For the solver
private Random rand = new Random();
private short solution_count; // Should be 1
/**
* Constructor generates a new puzzle, and its solution
*/
public SudokuPuzzle()
{
generateSolvedPuzzle(0);
generatePuzzle();
}
/**
* Finds a solved puzzle through depth-first search
*/
private boolean generateSolvedPuzzle(int cur_cell)
{
if (cur_cell > 80)
return true;
int col = cur_cell % 9;
int row = cur_cell / 9;
// create a sequence of the integers {1,...,9} of random order
int [] numbers = new int[9];
for (int i=0; i < 9; i++)
numbers[i] = 1+i;
shuffle_array(numbers);
for (int i=0; i < 9; i++)
{
int n = numbers[i]; // for the next number in the array
// if number is acceptable by Sudoku rules
if (!existsInColumn(solved_puzzle, n, col)
&& !existsInRow(solved_puzzle, n, row)
&& !existsInSubGrid(solved_puzzle, n, row, col))
{
// attempt to fill in the next cell with the current cell set to number
solved_puzzle[row][col] = n;
if (generateSolvedPuzzle(cur_cell + 1))
return true;
solved_puzzle[row][col] = 0; // didn't work, reset cell and try the next number in sequence
}
}
return false; // unreachable (since search is exhaustive and a solved puzzle must exist)
}
/**
* Solves the Sudoku puzzle through depth-first, exhaustive search, and store the number of
* solutions in solution_count. Currently, we want to use this only to detect if two solutions
* exist. Hence, we stop the search as soon as two solutions have been found.
*
*
*/
private boolean _solvePuzzle(int cur_cell)
{
if (cur_cell > 80)
{
solution_count++;
if (solution_count > 1) // two solutions detected. notify caller to abort search
return true;
return false;
}
int col = cur_cell % 9;
int row = cur_cell / 9;
if (_tmp_grid[row][col] == 0) // if cell is unfilled
{
for (int n=1; n <= 9; n++) // for each number
{
// if number is acceptable by Sudoku rules
if (!existsInColumn(_tmp_grid, n, col)
&& !existsInRow(_tmp_grid, n, row)
&& !existsInSubGrid(_tmp_grid, n, row, col))
{
// attempt to fill in the next cell with the current cell set to number
_tmp_grid[row][col] = n;
if (_solvePuzzle(cur_cell + 1)) // notified of two solutions being detected
return true; // notify caller to abort search
_tmp_grid[row][col] = 0; // try with other numbers
}
}
}
else
if (_solvePuzzle(cur_cell + 1)) // notified of two solutions being detected
return true; // notify caller to abort search
return false;
}
private void shuffle_array(int array[])
{
// swap the first size elements with other elements from the whole array
for (int i = 0; i < array.length; i++)
{
// find an index j (i<j<=array_length) to swap with the element i
int j = i + rand.nextInt(array.length - i);
int t = array[j];
array[j] = array[i];
array[i] = t;
}
}
/**
* Returns whether a given number exists in a given column.
*
* @param col column to check.
* @param number number to check.
* @return true iff number exists in row.
*/
private boolean existsInColumn(int[][] puzzle, int number, int col)
{
for (int row = 0; row < 9; row++)
if (puzzle[row][col] == number)
return true;
return false;
}
/**
* Returns whether a given number exists in a given row.
*
* @param row row to check.
* @param number number to check.
* @return true iff number exists in row.
*/
private boolean existsInRow(int[][] puzzle, int number, int row)
{
for (int col = 0; col < 9; col++)
if (puzzle[row][col] == number)
return true;
return false;
}
/**
* Returns whether if the 3x3 sub-grid which includes (row, col) contains a
* cell with the given number.
*
* @param row a row in the sub-grid.
* @param col a col in the sub-grid.
* @param number number to check.
* @return true iff sub-grid contains number.
*/
private boolean existsInSubGrid(int[][] puzzle, int number, int row, int col)
{
int sub_grid_start_row = (row / 3)*3;
int sub_grid_start_col = (col / 3)*3;
for (int _row = sub_grid_start_row; _row < sub_grid_start_row + 3; _row++)
for (int _col = sub_grid_start_col; _col < sub_grid_start_col + 3; _col++)
if (puzzle[_row][_col] == number)
return true;
return false;
}
/**
* Generates a Sudoku puzzle from a solved puzzle by setting up to 64 cells to 0.
* (We cannot set more than 64 cells to 0. See http://www.math.ie/McGuire_V1.pdf)
*/
private void generatePuzzle()
{
// copy solved_puzzle to puzzle
for (int row = 0; row < 9; row++)
for (int col = 0; col < 9; col++)
puzzle[row][col] = solved_puzzle[row][col];
// create a sequence of the integers {0,...,80} of random order
int [] cell_sequence = new int[81];
for (int i=0; i < 81; i++)
cell_sequence[i] = i;
shuffle_array(cell_sequence);
// attempt to set each cell in the sequence to 0
int count_set_to_zero = 0;
for (int i=0; i < 81 && count_set_to_zero < 64; i++)
{
int cur_cell = cell_sequence[i];
int col = cur_cell % 9;
int row = cur_cell / 9;
int sav = puzzle[row][col];
puzzle[row][col] = 0;
solution_count = 0;
// copy puzzle to _tmp_grid for the solver to work on
for (int r = 0; r < 9; r++)
for (int c = 0; c < 9; c++)
_tmp_grid[r][c] = puzzle[r][c];
if (_solvePuzzle(0)) // Puzzle allows more than 1 solution
puzzle[row][col] = sav; // Revert to original puzzle
else
count_set_to_zero++;
}
}
public void showSolution()
{
for (int row = 0; row < 9; row++)
{
System.out.print(" ");
for (int col = 0; col < 9; col++)
System.out.print(" " + solved_puzzle[row][col]);
System.out.println();
}
}
public void show()
{
for (int row = 0; row < 9; row++)
{
System.out.print(" ");
for (int col = 0; col < 9; col++)
System.out.print(" " + puzzle[row][col]);
System.out.println();
}
}
public static void main(String[] args)
{
SudokuPuzzle sudoku_puzzle = new SudokuPuzzle();
System.out.println("Puzzle:");
sudoku_puzzle.show();
System.out.println();
System.out.println("Solution:");
sudoku_puzzle.showSolution();
}
} | 1 | [
2,
6211,
9083,
26,
9680,
9266,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
25237,
158,
11358,
1118,
14,
1990,
204,
13,
7,
10858,
413,
210,
13,
1,
5594,
195,
4201,
5092,
413,
13,
7,
9,
31,
41,
74,
5792,
84,
14,
2620,
47,
174,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
File Transfer failed
===
I have ftp server in my local machine using MFT Internet Server. I am trying to upload / download the files from the MFT Internet server.
I could not transfer files from fileZilla to MFT Internet Server. It says
Status: Starting upload of C:\fileZilla\Rs.766Transferred.jpg<br/>
Command: PASV<br/>
Response: 227 Entering Passive Mode (10,231,0,108,7,138)<br/>
Command: STOR Rs.766Transferred.jpg<br/>
Response: 150 Opening data connection for transferdirectory<br/>
Response: 426 Transfer failed. AuditID=A70420000444<br/>
Error: File transfer failed<br/>
I could not find any solution for the above. Please help me to fix this.
-Sridhar | 0 | [
2,
3893,
2617,
1702,
800,
3726,
3726,
31,
57,
1187,
306,
8128,
19,
51,
375,
1940,
568,
307,
3072,
2620,
8128,
9,
31,
589,
749,
20,
71,
8294,
13,
118,
7121,
14,
6488,
37,
14,
307,
3072,
2620,
8128,
9,
31,
110,
52,
2617,
6488,
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... |
Switching to new page in sencha after button click
===
Hi m new to sencha i have planned to prepare calculator and i need to show result of calculation on new page in textbox after i entered value on first page textbox andclick on calculate button can some one tell me how to do this | 0 | [
2,
13027,
20,
78,
2478,
19,
8252,
1651,
75,
5167,
10840,
800,
3726,
3726,
4148,
307,
78,
20,
8252,
1651,
31,
57,
2035,
20,
5723,
28539,
17,
31,
376,
20,
298,
829,
16,
19644,
27,
78,
2478,
19,
1854,
5309,
75,
31,
1297,
1923,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reverse video playback in OpenCV
===
Is it possible to play videos backwards in OpenCV?
Either by an API call or by buffering video frames and reversing the order into
a new video file.
Thanks | 0 | [
2,
7006,
763,
21306,
19,
368,
12732,
800,
3726,
3726,
25,
32,
938,
20,
418,
6610,
12207,
19,
368,
12732,
60,
694,
34,
40,
21,
2159,
645,
54,
34,
17497,
68,
763,
12809,
17,
28829,
14,
389,
77,
21,
78,
763,
3893,
9,
3669,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Android : How to change audio tempo and pitch individuality using ffmpeg?
===
I have managed to play audio files using ffmpeg and AudioTrack class in my android project. I can change the speed of audio using AudioTrack class setRate method. But it also change the pitch of audio, I want to change only Tempo of audio but I found no solution on net.
anyone can please help me on this as there is no support for this. | 0 | [
2,
13005,
13,
45,
184,
20,
753,
4023,
14935,
17,
5678,
1359,
856,
568,
13,
2460,
79,
20427,
60,
800,
3726,
3726,
31,
57,
1471,
20,
418,
4023,
6488,
568,
13,
2460,
79,
20427,
17,
4023,
4792,
718,
19,
51,
13005,
669,
9,
31,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android Lockscreen interaction when locked
===
Ive been porting the S3 lockscreen to S2.
Got the animated circle working with a switch for ripple on/off,weather and live wallpaper lockscreen support.
I just cannot get the ripple interaction when screen locked. When the movement to unlock is made the ripple appears.
Logcat shows the ripple renderer runs when screen is locked and touched but whilst locked the screen does not display the interaction. You can see what i mean towards the end of this video....
Https://www.youtube.com/watch?v=UiwUOlk5HR8&feature=youtube_gdata_player
I think its possibly phonewindowmanager or keyguardmediator which is stopping the screen displaying interaction until the movement to unlock is made. Any advice on the process that links what is shown on screen and interaction when locked (for lockscreen music widgets for example which allow interaction when locked) would be greatly appreciated.
Thanks
:)
| 0 | [
2,
13005,
3991,
7187,
7754,
76,
4011,
800,
3726,
3726,
5568,
74,
1295,
68,
14,
13,
18,
240,
3991,
7187,
20,
13,
18,
135,
9,
330,
14,
5784,
2775,
638,
29,
21,
5521,
26,
15761,
27,
118,
1299,
15,
18924,
17,
515,
28129,
3991,
7187,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to stop the ARC in particular view Controller?
===
How to stop the ARC in particular view Controller? Not for ALL View Controllers... | 0 | [
2,
184,
20,
747,
14,
4686,
19,
1498,
1418,
9919,
60,
800,
3726,
3726,
184,
20,
747,
14,
4686,
19,
1498,
1418,
9919,
60,
52,
26,
65,
1418,
9919,
18,
9,
9,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
0,
0... |
Android Page Curl
===
I want to curl a view. Could anyone please decode the FBReader Application's page curl effect?
http://www.fbreader.org/FBReaderJ/ | 1 | [
2,
13005,
2478,
14320,
800,
3726,
3726,
31,
259,
20,
14320,
21,
1418,
9,
110,
1276,
2247,
121,
9375,
14,
398,
22852,
106,
3010,
22,
18,
2478,
14320,
1590,
60,
7775,
6903,
6483,
9,
410,
22852,
106,
9,
5583,
118,
410,
22852,
106,
72... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How can i extract the info between " " ? C#
===
Can anyone tell me how to extract the following info to a variable in a simple way from this output.
Output:
AT+CMGL="ALL"
+CMGL: 0,"REC READ","+40728072005",,"12/06/29,13:04:26+12"
password,1,ON
i want to extract from some info from the above output like below into variables:
msisdn="+40728072005"
passwd="password"
itemno="1"
command="ON"
thanks
| 0 | [
2,
184,
92,
31,
10962,
14,
15404,
128,
13,
7,
13,
7,
13,
60,
272,
5910,
800,
3726,
3726,
92,
1276,
494,
55,
184,
20,
10962,
14,
249,
15404,
20,
21,
7612,
19,
21,
1935,
161,
37,
48,
5196,
9,
5196,
45,
35,
2430,
9095,
8430,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Includes by statment, Entity framework
===
Is there anyway to make multiple includes based on some if-statements?
For instance:
if(x == 1)
someTable = someTable.Include("Table1")
if(y == "Duck")
someTable = someTable.Include("Table2")
Thanks in advance! | 0 | [
2,
1103,
34,
12819,
1130,
15,
9252,
6596,
800,
3726,
3726,
25,
80,
2774,
20,
233,
1886,
1103,
432,
27,
109,
100,
8,
3859,
6601,
60,
26,
4851,
45,
100,
5,
396,
800,
3726,
137,
6,
109,
5924,
800,
109,
5924,
9,
22640,
5,
7,
5924,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Go through certain sets of html tags
===
I need a little help here please.What am trying to do is pull all the content in b nodes.
<P><B>Credit Weighting: </B>5<BR><BR>
<B>Teaching Period(s): </B>Teaching Periods 1 and 2.<BR><BR>
<B>No. of Students: </B>-.<BR><BR>
<B>Pre-requisite(s): </B>None<BR><BR>
<P><A HREF="#top" class="toppage">[Top of page]</A></P>
<P><B>Credit Weighting: </B>20<BR><BR>
<B>Teaching Period(s): </B>Teaching Periods 1 and 2.<BR><BR>
<B>No. of Students: </B>-.<BR><BR>
<B>Pre-requisite(s): </B>None<BR><BR>
<P><A HREF="#top" class="toppage">[Top of page]</A></P>
<P><B>Credit Weighting: </B>10<BR><BR>
<B>Teaching Period(s): </B>Teaching Periods 1 and 2.<BR><BR>
<B>No. of Students: </B>-.<BR><BR>
<B>Pre-requisite(s): </B>None<BR><BR>
<P><A HREF="#top" class="toppage">[Top of page]</A></P>
I was able to pull data from the first set.Below is my sample code that does this
// GETTING ALL THE B NODE STUFFS AND PRINTING IT'S CONTENTS
$result = array();
foreach($document->getElementsByTagName('b') as $node){
$result[preg_replace('/:\s+$/','',$node->textContent)] = trim($node->nextSibling->textContent);
}
var_dump($result);
echo '<br /><br />';
Now what am trying to do is loop through the three set of html code to get all the b nodes and get the contetnts.How could I go about this please ? | 0 | [
2,
162,
120,
1200,
3415,
16,
13,
15895,
3383,
18,
800,
3726,
3726,
31,
376,
21,
265,
448,
235,
2247,
9,
608,
589,
749,
20,
107,
25,
2201,
65,
14,
2331,
19,
334,
16272,
9,
13,
1,
306,
1,
220,
1,
21740,
1763,
68,
45,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HttpConnection.getContentLength() not available in blackberry
===
I am trying to read the length of my responce by using "getContentLength()" of HttpConnection class..
but I am getting method getContentLength() not available error..
Is there any workaround to find length of the responce in blackberry..??
Below is my code snippet.
HttpConnection httpconn = null;
httpconn = (HttpConnection) Connector.open(URL);
httpconn.setRequestMethod(HttpConnection.GET);
InputStream is = httpconn.openInputStream();
fileSize = httpconn.getContentLength();
Thanks. | 0 | [
2,
7775,
25996,
872,
9,
3060,
25424,
6325,
5,
6,
52,
904,
19,
27367,
800,
3726,
3726,
31,
589,
749,
20,
1302,
14,
1476,
16,
51,
302,
3401,
13120,
34,
568,
13,
7,
3060,
25424,
6325,
5,
6,
7,
16,
7775,
25996,
872,
718,
9,
9,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error: <no source info>: public class org.apache.commons.dbcp.BasicDataSource
===
This error (with all related 'unresolved type' errors) appeared while installing Maven project. There were no changes related to dbcp, I tried to delete all the local repos, installed again and `commons-dbcp` was downloaded, so dependencies are fine I suppose (actually I could install with the same dependencies a couple of hours ago). What could be a reason of such behaviour? | 0 | [
2,
7019,
45,
13,
1,
251,
1267,
15404,
1,
45,
317,
718,
13,
5583,
9,
7738,
2569,
9,
17130,
18,
9,
9007,
7439,
9,
26467,
18768,
12097,
800,
3726,
3726,
48,
7019,
13,
5,
1410,
65,
1597,
13,
22,
1020,
99,
5594,
4763,
1001,
22,
119... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there an Exchange Server 2010 based service publicly available with EWS
===
I was asked to develop a connection to download emails from Exchange 2010 using EWS (Exchange Web Services). The company who asked does not have an Exchange server that is available from outside, but development and testing is impossible without having one. I also cannot and do not want to install and configure a full blown Exchange 2010 server because I do not have licenses and experience.
So the question: is there a publicly available email service that is using Exchange Server 2010 which can be accessed with EWS? I am willing to pay a fee for an account, so that's not a problem. I just want to save time and money with obtaining a license and learning to configure MSES2010. | 0 | [
2,
25,
80,
40,
1950,
8128,
498,
432,
365,
6713,
904,
29,
13,
4460,
18,
800,
3726,
3726,
31,
23,
411,
20,
2803,
21,
2760,
20,
7121,
8517,
18,
37,
1950,
498,
568,
13,
4460,
18,
13,
5,
1706,
16229,
2741,
687,
6,
9,
14,
237,
72,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS and HTML: How to create an Expanding DIV On Click?
===
I need to create a DIV that has some content (some of which is hidden) and when you click on it, it expands and reveals the rest of its content..
I have found many HOWTOs but use jQuery....
I would like a solution using CSS and HTML (Javascript is good also!)
Thanks in advance! | 0 | [
2,
272,
18,
18,
17,
13,
15895,
45,
184,
20,
1600,
40,
9393,
13,
12916,
27,
10840,
60,
800,
3726,
3726,
31,
376,
20,
1600,
21,
13,
12916,
30,
63,
109,
2331,
13,
5,
3220,
16,
56,
25,
3689,
6,
17,
76,
42,
10840,
27,
32,
15,
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... |
Dynamics AX 2012 Financial Dimensions
===
How can I get similar results to my ax09 query,
SELECT DIMENSION, DIMENSION2_ FROM CUSTTABLE
in Dynamics AX 2012?
I understand the tremendous complexity of the new dynamic dimension structure. With this new structure is there even a way to reproduce a select statement like the one above?
Here are the tools I have to work with:
1. SQL Server Management Studio 2008
2. DAX AOT
3. BIDS (MS SQL Server 2008 R2 (SSRS))
| 0 | [
2,
12289,
21,
396,
563,
1553,
9913,
800,
3726,
3726,
184,
92,
31,
164,
835,
1736,
20,
51,
21,
396,
2545,
25597,
15,
5407,
9547,
15,
9547,
135,
1,
37,
13,
4636,
38,
5924,
19,
12289,
21,
396,
563,
60,
31,
1369,
14,
14622,
12745,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 appropriate UITableView delegation strategy for this situation?
===
I have a UITableView and I would like all the functionality that comes built into the UITableViewController except that I would like to have the delegate be a separate class. The problem is I need to pull an identifying piece of information from my data source in order for my delegate class to function. Should I make UITableView delegate to UITableViewController, which would then pull the appropriate identifying information, and then just call the third class from within didSelectRowAtIndexPath? I just want to structure this in the appropriate way.
I am fairly new to iOS and objective-C, so I feel like there is a solution that everyone would use, but it is not obvious to me. | 0 | [
2,
98,
25,
14,
4593,
13,
11193,
579,
4725,
9651,
4427,
26,
48,
1858,
60,
800,
3726,
3726,
31,
57,
21,
13,
11193,
579,
4725,
17,
31,
83,
101,
65,
14,
18548,
30,
1624,
392,
77,
14,
13,
11193,
579,
4725,
12898,
1252,
1613,
30,
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... |
VaryByCustom and model binding
===
I have a class I model bind and I want to use output caching with it. I can't find a way to access the bound object in `GetVaryByCustomString`
For example:
public class MyClass
{
public string Id { get; set; }
... More properties here
}
public class MyClassModelBinder : DefaultModelBinder
{
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var model = new MyClass();
... build the class
return model;
}
}
I set the binder in Global.cs
ModelBinders.Binders.Add(typeof(MyClass), new MyClassModelBinder());
And then use output caching like this.
[OutputCache(Duration = 300, VaryByCustom = "myClass")]
public ActionResult MyAction(MyClass myClass)
{
.......
public override string GetVaryByCustomString(HttpContext context, string custom)
{
... check we're working with 'MyClass'
var routeData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(context));
var myClass = (MyClass)routeData.Values["myClass"]; <-- This is always null
myClass isn't in the route table event though the model binder fired.
Any help as always will be most welcome.
Cheers | 0 | [
2,
7392,
779,
4636,
6015,
17,
1061,
8728,
800,
3726,
3726,
31,
57,
21,
718,
31,
1061,
10193,
17,
31,
259,
20,
275,
5196,
1658,
7192,
29,
32,
9,
31,
92,
22,
38,
477,
21,
161,
20,
1381,
14,
4138,
3095,
19,
13,
1,
3060,
3311,
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... |
Generating a webpage dynamically with PHP to embed a stream?
===
I am working on a website that hosts streams from websites like twitch.tv by embedding them.
I have a list of streams. When the user clicks one, I need the user to be redirected to a web page with that stream embedded inside. So, for example, if the user clicks dysruption from the list, then he should be redirected to mysite.com/streams/dysruption, (any URL works) where it's still my site, but dysruption's stream is embedded there.
I can dynamically update the embed code depending on the stream the user chooses, but I don't know how to create the webpage on the fly. It's not efficient to create a separate web page for every single stream I list, but if I have to I will do that. If I could just have PHP generate a web page and then send the stream chosen to the new web page, that would work too.
Maybe PHP isn't the best option for this. Any help is greatly appreciated. Thank you! | 1 | [
2,
13500,
21,
2741,
6486,
7782,
1326,
29,
13,
26120,
20,
11911,
69,
21,
3766,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
2271,
30,
5397,
9464,
37,
13931,
101,
18769,
9,
1709,
34,
11911,
69,
3258,
105,
9,
31,
57,
21,
968,
16,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What am I not escapping correctly?
===
I am trying to create a html file out of a database, and I have problems escaping this line `"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"`
Full code:
Dim filer As Integer, paths As String
filer = FreeFile
paths = App.Path + "\DB"
Open paths + "\test.html" For Output As #filer
'...
Print #filer, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"
'...
Close #filer
I don't know why it appears in red and don't let me create the `.exe` to even run it | 0 | [
2,
98,
589,
31,
52,
13,
13944,
5574,
12044,
60,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
13,
15895,
3893,
70,
16,
21,
6018,
15,
17,
31,
57,
1716,
14700,
48,
293,
13,
1,
7,
1,
5909,
58,
7775,
8,
9629,
710,
3726,
1,
7,
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... |
Problems with german characters in MonoTouch.Dialog
===
Has anyone a solution to the following problem:
When I want to display a string in a StringElement that contains a german Umlaut like: ä,ü or ö or an ß it is shown as a white questionmark in a black-filled rectangle.
Any suggestions how to solve this are highly appreciated! | 0 | [
2,
1716,
29,
548,
1766,
19,
4129,
15725,
9,
4286,
5567,
800,
3726,
3726,
63,
1276,
21,
4295,
20,
14,
249,
1448,
45,
76,
31,
259,
20,
3042,
21,
3724,
19,
21,
3724,
27567,
30,
1588,
21,
548,
13,
723,
6247,
38,
101,
45,
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... |
Is there a way to make use both italic and bold in a textview in XCode 4.3.2?
===
I am including some text in a textview and want both regular font and some italicized words. Is this possible to do this or no? If so can someone show me how to do this? I know you can either set the whole text in the textview to either be bold or italic or regular but was wondering if you could mix it up as well?
Thanks | 0 | [
2,
25,
80,
21,
161,
20,
233,
275,
156,
32,
192,
596,
17,
5657,
19,
21,
1854,
4725,
19,
993,
9375,
268,
9,
240,
9,
135,
60,
800,
3726,
3726,
31,
589,
215,
109,
1854,
19,
21,
1854,
4725,
17,
259,
156,
1290,
9978,
17,
109,
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 grep/split a word in middle of %% or $$
===
I have a variable from which i have to grep the which in middle of %% adn the word which starts wit $$. I used split it works... bt for only some scenarios.
Example:
#!/usr/bin/perl
my $lastline ="%Filters_LN_RESS_DIR%\ARC\Options\Pega\CHF_Vega\$$(1212_GV_DATE_LDN)";
my @lastline_temp = split(/%/,$lastline);print @lastline_temp;
my @var=split("\\$\\$",$lastline_temp[2]);print @var;
I get the o/p as expected. But can i get the same using Grep command. I mean i dont want to use the array[2] or array[1]. So that i can replace the values easily.
Appreciate for the Help!!!! | 0 | [
2,
184,
20,
5604,
306,
118,
25603,
21,
833,
19,
772,
16,
13,
11881,
11881,
54,
5579,
4403,
800,
3726,
3726,
31,
57,
21,
7612,
37,
56,
31,
57,
20,
5604,
306,
14,
56,
19,
772,
16,
13,
11881,
11881,
21,
43,
103,
14,
833,
56,
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... |
Mapping/Binding host to IIS
===
I have dificulties routing a post request to an asp.net application in IIS 7.
The difficulty comes from the fact that the post request contains the header:
> POST /reaper-cal/Event HTTP/1.1\x0d\x0aHost: develserver:8081
As i can understand, the request expects a host named "_**develserver**_" and the application to be on port "_**8081**_".
I added "_**develserver**_" to C:\Windows\System32\drivers\etc\hosts and confirm it:
> \#resolution is handled within DNS itself.<br>
> \#localhost name <br>
> \#127.0.0.1 localhost <br>
> 127.0.0.1 develserver
I also made the application to run on "_**8081**_" and confirm it. Still, the post request doesn't hit the specified controller.
| 0 | [
2,
13305,
118,
22260,
2015,
20,
595,
18,
800,
3726,
3726,
31,
57,
926,
1707,
6635,
3915,
19880,
21,
678,
3772,
20,
40,
28,
306,
9,
2328,
3010,
19,
595,
18,
453,
9,
14,
6967,
1624,
37,
14,
837,
30,
14,
678,
3772,
1588,
14,
157,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Languages Detection
===
I'm developing in Django an app for languages detections. I'm using NLTK and Naive Bayes Classificator. For training data i have many data annotate (I use many reviews in different languages). I use a code like [this][1]
Do you think this method could be a good approach for this task?
Thank a lot for your help
[1]: http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/ | 0 | [
2,
2556,
11643,
800,
3726,
3726,
31,
22,
79,
3561,
19,
3857,
14541,
40,
4865,
26,
2556,
11643,
18,
9,
31,
22,
79,
568,
13,
10651,
38,
197,
17,
16288,
899,
160,
718,
24831,
2153,
9,
26,
838,
1054,
31,
57,
151,
1054,
40,
1270,
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... |
Multiple Monitors & Multiple Kiosks - How to make powerpoint viewer open on a particular display?
===
I have a setup with 4 monitors that all need to be running in kiosk mode.<br/>
3 of the monitors will be running IE and the fourth needs to be running a powerpoint presentation.<br/>
IE is easy - I've got a way to select which monitor should display which window, but I can't get powerpoint viewer to run in any window other than the main display.
Is there a way to set Powerpoint Viewer to ALWAYS open in a particular monitor? | 0 | [
2,
1886,
18521,
279,
1886,
28092,
18,
13,
8,
184,
20,
233,
414,
3132,
16812,
368,
27,
21,
1498,
3042,
60,
800,
3726,
3726,
31,
57,
21,
18161,
29,
268,
18521,
30,
65,
376,
20,
44,
946,
19,
28092,
3740,
9,
1,
5145,
118,
1,
203,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 battery level on Galaxy Nexus Phone
===
I know you can set the battery level on the emulator in
android to whatever value you want from 0-100. Is there any way we can do the same for testing purposes on the Galaxy Nexus device or any Android device for that matter? | 0 | [
2,
184,
20,
309,
14,
5044,
662,
27,
9358,
28674,
1132,
800,
3726,
3726,
31,
143,
42,
92,
309,
14,
5044,
662,
27,
14,
3579,
14868,
19,
13005,
20,
2099,
1923,
42,
259,
37,
713,
8,
4031,
9,
25,
80,
186,
161,
95,
92,
107,
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... |
The server principal Xuser is not able to access the database Ydb under the current security context. sql server 2008
===
I'm trying to figure out why my stored procedure is not working for selecting from another database's column.
Databases Kdb and Ydb have the same database owner. Stored procedures and tables in both databases created using that database owner account.
There is a stored procedure in Ydb trying to access a table in Kdb being executed by a minimal rights user (only has execute and connect on Ydb, no rights to Kdb).
Use [Ydb]
GO
ALTER PROCEDURE [dbo].[CreateSecureTableAEntry]
@fid int
AS
BEGIN
DECLARE @operatorId uniqueidentifier
DECLARE @orgName nvarchar(max)
SELECT @orgName = SUBSTRING(SYSTEM_USER,1,LEN(SYSTEM_USER)-4)
SELECT @operatorId = Id FROM Kdb.dbo.Organizations WHERE Kdb.dbo.Organizations.Name = @orgName
INSERT INTO TableA (operatorId, sourceFid) VALUES (@operatorId, @fid);
END
I have enabled cross database chaining on both Kdb and Ydb. I have made Ydb trustworthy.
This is clearly a permissions problem, but what else should I do while keeping permissions as tight as possible? | 0 | [
2,
14,
8128,
2279,
993,
16704,
25,
52,
777,
20,
1381,
14,
6018,
13,
93,
9007,
131,
14,
866,
1221,
4141,
9,
4444,
255,
8128,
570,
800,
3726,
3726,
31,
22,
79,
749,
20,
1465,
70,
483,
51,
8214,
7004,
25,
52,
638,
26,
20764,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to make this audio javascript work in iOS?
===
Anyone know a way I could make this work on iOS? Very very new to this stuff. Function play() is being called with onClick via button class. Any help would be greatly appreciated.
function loadPlayer() {
var audioPlayer = new Audio();
audioPlayer.addEventListener('ended',nextSong,false);
audioPlayer.addEventListener('error',errorFallback,true);
audioPlayer.src="myfile.mp3";
document.getElementById("player").appendChild(audioPlayer);
nextSong();
}
function nextSong() {
if(urls[next]!=undefined) {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
audioPlayer.load();
} else {
loadPlayer();
}
}
}
function errorFallback() {
nextSong();
}
function play() {
var audioPlayer = document.getElementsByTagName('audio')[0];
if(audioPlayer!=undefined) {
i=Math.floor(Math.random() *(9 - 0 + 1)) + 0;
audioPlayer.src=urls[i];
audioPlayer.play();
}
else {
loadPlayer();
}
} | 0 | [
2,
25,
80,
21,
161,
20,
233,
48,
4023,
8247,
8741,
170,
19,
13,
7760,
60,
800,
3726,
3726,
1276,
143,
21,
161,
31,
110,
233,
48,
170,
27,
13,
7760,
60,
253,
253,
78,
20,
48,
3217,
9,
1990,
418,
5,
6,
25,
142,
227,
29,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Apache Tomcat 7 - what is the caching location for app.xml
===
In Tomcat 7, it seems app.xml files is no longer cached at conf/Catalina/localhost/myapp.xml. I can't locate it, and yet Tomcat is still holding onto this somehow as my app seems to be using a cached copy.
How can I remove or force Tomcat to use a different version? | 0 | [
2,
17140,
2067,
5782,
453,
13,
8,
98,
25,
14,
1658,
7192,
1474,
26,
4865,
9,
396,
8184,
800,
3726,
3726,
19,
2067,
5782,
453,
15,
32,
2206,
4865,
9,
396,
8184,
6488,
25,
90,
1045,
16522,
43,
35,
13,
14093,
118,
9709,
9356,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Null Pointer Exception at receiver handler of usb accessory
===
I am an embedded programmer and a newbie for android
There is new message being sent from the a development board through USB, I have written the java code to accept that message and display it on the android device. But the app crashes, here is the LogCat
D/UsbDeviceManager( 163): entering USB accessory mode: UsbAccessory[mManufacturer=Embedded Artists AB, mModel=AOA Board - Nodes, mDescription=Demo - AOA Nodes, mVersion=1.0, mUri=http://www.embeddedartists.com/_aoa/Demo_AOA_Nodes.apk, mSerial=N/A]
I/ActivityManager( 163): START {flg=0x10000000 cmp=com.android.systemui/.usb.UsbConfirmActivity (has extras)} from pid 163
I/ActivityManager( 163): Displayed com.android.systemui/.usb.UsbConfirmActivity: +71ms
I/ActivityManager( 163): START {act=android.hardware.usb.action.USB_ACCESSORY_ATTACHED flg=0x10000000 cmp=com.embeddedartists.aoa.nodes/.MainActivity (has extras)} from pid 315
I/EA AOA CAN(30663): onResume
I/EA AOA (30663): Receiver.run
I/EA AOA (30663): Recv Node Add: id=144, capLen=7
I/EA AOA (30663): Recv Node id=144, CapId= 16, data=2650
I/ActivityManager( 163): Displayed com.embeddedartists.aoa.nodes/.MainActivity: +97ms
D/OpenGLRenderer( 315): Flushing caches (mode 0)
I/EA AOA (30663): Recv Node id=144, CapId= 32, data=227
I/EA AOA (30663): Recv Node id=144, CapId= 48, data=0
D/OpenGLRenderer( 315): Flushing caches (mode 1)
I/EA AOA (30663): Recv Node id=144, CapId= 32, data=245
I/EA AOA (30663): Recv Node id=144, CapId= 96, data=245
D/AndroidRuntime(30663): Shutting down VM
W/dalvikvm(30663): threadid=1: thread exiting with uncaught exception (group=0x40a471f8)
E/AndroidRuntime(30663): FATAL EXCEPTION: main
E/AndroidRuntime(30663): java.lang.NullPointerException
E/AndroidRuntime(30663): at com.embeddedartists.aoa.nodes.NodeView$1.handleMessage(NodeView.java:171)
E/AndroidRuntime(30663): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(30663): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(30663): at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime(30663): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(30663): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(30663): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime(30663): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime(30663): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 163): Force finishing activity com.embeddedartists.aoa.nodes/.MainActivity
D/dalvikvm( 163): GC_FOR_ALLOC freed 401K, 24% free 12582K/16391K, paused 54ms
W/ActivityManager( 163): Activity pause timeout for ActivityRecord{4134eaf0 com.embeddedartists.aoa.nodes/.MainActivity}
I/EA AOA (30663): Recv Node id=144, CapId= 32, data=222
I/EA AOA (30663): Recv Node id=144, CapId= 96, data=222
I/EA AOA (30663): Recv Node id=144, CapId= 32, data=233
I/EA AOA (30663): Recv Node id=144, CapId= 96, data=233
I/Process (30663): Sending signal. PID: 30663 SIG: 9
W/InputDispatcher( 163): channel '41356ab0 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 163): channel '41356ab0 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 163): Attempted to unregister already unregistered input channel '41356ab0 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity (server)'
I/ActivityManager( 163): Process com.embeddedartists.aoa.nodes (pid 30663) has died.
I/WindowManager( 163): WIN DEATH: Window{410e8e00 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity paused=false}
W/ActivityManager( 163): Force removing ActivityRecord{4109b628 com.embeddedartists.aoa.nodes/.MainActivity}: app died, no saved state
I/WindowManager( 163): WIN DEATH: Window{41356ab0 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity paused=false}
I/WindowManager( 163): WINDOW DIED Window{41356ab0 com.embeddedartists.aoa.nodes/com.embeddedartists.aoa.nodes.MainActivity paused=false}
W/InputManagerService( 163): Got RemoteException sending setActive(false) notification to pid 30663 uid 10012
D/UsbDeviceManager( 163): exited USB accessory mode
D/MtpService(25247): addStorageLocked 65537 /mnt/sdcard
D/MtpService(25247): starting MTP server in MTP mode
D/MtpService(25247): addStorageLocked 65537 /mnt/sdcard
D/dalvikvm( 315): GC_CONCURRENT freed 332K, 58% free 8215K/19271K, paused 6ms+5ms
I figured from the LogCat, that the Handler in NodeView.java was leading to the exception. At line 171, it calls a getValue() from Node.java. Below you can find both the java files.
case Node.DEV_ACCL_X:
val = Integer.toString(v);
break;
These are the lines that I have added to a pre-existing code base which was working correctly.
I do understand what the problem is. I see that the new message is being sent correctly from the other end of the USB(Development board) I also see the new message in the app, just before it crashes
I/EA AOA (30663): Recv Node id=144, CapId= 96, data=245
NodeView.java
package com.embeddedartists.aoa.nodes;
import java.util.HashMap;
import java.util.Map;
import com.embeddedartists.aoa.nodes.R;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
public class NodeView extends LinearLayout implements Node.OnValueChangeListener {
/**************************************************************************
* Private variables
*************************************************************************/
private TextView nodeIdView;
private Node node;
private Map<Integer, TextView> values;
private static final int VALUE_UPDATED = 0;
/**************************************************************************
* Constructor
*************************************************************************/
/**
* Create a NodeView
* @param context context
* @param node node associated with this view
*/
public NodeView(Context context, Node node) {
super(context);
this.node = node;
this.setOrientation(VERTICAL);
values = new HashMap<Integer, TextView>();
node.addOnValueChangeListener(this);
nodeIdView = new TextView(context);
nodeIdView.setTextSize(24);
nodeIdView.setText("Node: " + node.getNodeId());
addView(nodeIdView, new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
LinearLayout capLayout = new LinearLayout(context);
capLayout.setOrientation(HORIZONTAL);
addView(capLayout, new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
int[] caps = node.getCapabilities();
for (int i = 0; i < caps.length; i++) {
LinearLayout vl = new LinearLayout(context);
vl.setOrientation(HORIZONTAL);
vl.setMinimumWidth(110);
ImageView iv = getImageView(context, caps[i]);
if (iv == null) continue;
iv.setPadding(0, 0, 10, 5);
vl.addView(iv, new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
TextView tv = new TextView(context);
tv.setText("" + node.getValue(caps[i]));
vl.addView(tv, new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
// Mapping capability with the TextView that holds its value.
// A limitation with using the capability type as key is
// that a node can only have one capability of each type
values.put(Integer.valueOf(caps[i]), tv);
capLayout.addView(vl, new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}
}
/**************************************************************************
* Public methods
*************************************************************************/
/**
* Get Node associated with this NodeView
* @return
*/
public Node getNode() {
return this.node;
}
/**
* OnValueChangeListener
*/
public void onValueChange(int capId) {
Message m = Message.obtain(handler, VALUE_UPDATED);
m.arg1 = capId;
handler.sendMessage(m);
}
/**************************************************************************
* Private methods
*************************************************************************/
/**
* Get ImageView given a capability
* @param context
* @param capability capability ID
* @return ImageView
*/
private ImageView getImageView(Context context, int capability) {
ImageView iv = null;
switch (capability) {
case Node.DEV_TEMP:
iv = new ImageView(context);
iv.setImageResource(R.drawable.temperature);
break;
case Node.DEV_LIGHT:
iv = new ImageView(context);
iv.setImageResource(R.drawable.lightbulb);
break;
case Node.DEV_BTN:
iv = new ImageView(context);
iv.setImageResource(R.drawable.button);
break;
}
return iv;
}
private final Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch(msg.what) {
case VALUE_UPDATED:
TextView tv = values.get(msg.arg1);
tv.setText(node.getValue(msg.arg1));
break;
}
}
};
Node.java
package com.embeddedartists.aoa.nodes;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class Node {
/**************************************************************************
* Public constants
*************************************************************************/
public static final int DEV_TEMP = (0x01 << 4);
public static final int DEV_LIGHT = (0x02 << 4);
public static final int DEV_BTN = (0x03 << 4);
public static final int DEV_RGB = (0x04 << 4);
public static final int DEV_LED = (0x05 << 4);
public static final int DEV_ACCL_X = (0x06 << 4);
/**************************************************************************
* Private variables
*************************************************************************/
private int nodeId;
private Map<Integer, Integer> values;
private int[] capabilities;
private AccessoryControl accessoryControl;
private ArrayList<OnValueChangeListener> listeners;
/**************************************************************************
* Public interface
*************************************************************************/
public interface OnValueChangeListener {
public void onValueChange(int capId);
}
/**************************************************************************
* Constructor
*************************************************************************/
/**
* Create a new Node
*
* @param nodeId the unique ID of the Node
* @param capabilites node capabilities is an array with capability IDs
* DEV_TEMP, DEV_LIGHT, ...
*/
public Node (int nodeId, int[] capabilites, AccessoryControl accessoryControl) {
this.nodeId = nodeId;
this.capabilities = capabilites;
this.accessoryControl = accessoryControl;
listeners = new ArrayList<OnValueChangeListener>();
values = new HashMap<Integer, Integer>();
for (int i = 0; i < capabilities.length; i++) {
values.put(Integer.valueOf(capabilites[i]), 0);
}
}
/**************************************************************************
* Public methods
*************************************************************************/
/**
* Get Node ID
* @return the node ID
*/
public int getNodeId() {
return nodeId;
}
/**
* Get Node capabilities
* @return node capabilities
*/
public int[] getCapabilities() {
return capabilities;
}
/**
* Add value change listener
* @param l listener to add
*/
public void addOnValueChangeListener(OnValueChangeListener l) {
listeners.add(l);
}
/**
* Remove value change listener
* @param l listener to remove
*/
public void removeOnValueChangeListener(OnValueChangeListener l) {
listeners.remove(l);
}
/**
* Update the value of a capability in this node object
*
* @param capId capability ID
* @param value value to set
*/
public void setValue(int capId, int value) {
values.put(Integer.valueOf(capId), Integer.valueOf(value));
for (OnValueChangeListener l : listeners) {
l.onValueChange(capId);
}
}
/**
* Get the value of a specific capability
* @param capId capability ID
* @return the value of the capability
*/
public String getValue(int capId) {
String val = "";
int v = values.get(Integer.valueOf(capId));
switch (capId) {
case Node.DEV_TEMP:
val = Double.toString( ((double)v)/100 );
break;
case Node.DEV_LIGHT:
val = Integer.toString(v);
break;
case Node.DEV_BTN:
val = Integer.toString(v);
break;
case Node.DEV_ACCL_X:
val = Integer.toString(v);
break;
}
return val;
}
/**
* Set the RGB LED on the node. A message will be sent
* to the attached accessory
*/
private void setRgb(int led, boolean on) {
byte[] data = new byte[5];
data[0] = AccessoryControl.MESSAGE_OUT_SET_VALUE;
data[1] = (byte)this.nodeId;
data[2] = DEV_RGB;
data[3] = (byte)led;
data[4] = (byte)(on ? 1 : 0);
accessoryControl.writeCommand(data);
}
/**
* Set Red LED
* @param on true if LED should be turned on
*/
public void setRedLed(boolean on) {
setRgb(AccessoryControl.MESSAGE_RGB_VAL_RED, on);
}
/**
* Set Blue LED
* @param on true if LED should be turned on
*/
public void setBlueLed(boolean on) {
setRgb(AccessoryControl.MESSAGE_RGB_VAL_BLUE, on);
}
/**
* Set Green LED
* @param on true if LED should be turned on
*/
public void setGreenLed(boolean on) {
setRgb(AccessoryControl.MESSAGE_RGB_VAL_GREEN, on);
}
/**
* Set LED state. A message will be sent to the Accessory
*
* @param on true if the LED should be turned on
*/
public void setLed(boolean on) {
byte[] data = new byte[5];
data[0] = AccessoryControl.MESSAGE_OUT_SET_VALUE;
data[1] = (byte)this.nodeId;
data[2] = DEV_LED;
data[3] = 0;
data[4] = (byte)(on ? 1 : 0);
accessoryControl.writeCommand(data);
}
}
So why is there a NullPointerException? Can any of the experts please point out the error?
I might be wrong in interpreting the LogCat as well, if so please point that out, so that I can share the appropriate code.
Thanks in advance! | 0 | [
2,
16203,
454,
106,
5391,
35,
6264,
24641,
16,
182,
220,
26371,
800,
3726,
3726,
31,
589,
40,
12138,
17968,
17,
21,
78,
5893,
26,
13005,
80,
25,
78,
2802,
142,
795,
37,
14,
21,
522,
686,
120,
182,
220,
15,
31,
57,
642,
14,
824... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Flexible Layout in CSS like vBulletin
===
When you resize [vBulletin](https://www.vbulletin.com/forum/forum.php) you can see the 3 columns rescaling nicely (Board Name, Threads / Posts, Last Post).
How could you achieve something like that in CSS? When I try to do so it always overlaps each other. The .board-icon width needs to stay the same because there's an image inside.
This is my CSS
.board-icon {
float: left;
width: 55px;
}
.board-title {
float: left;
background: red;
width: 50%;
}
.board-info {
float: left;
background: green;
width: 120px;
}
.board-lastpost {
float: left;
background: orange;
width: 240px;
}
Here are some other examples using the same flexible layout:
- http://punbb.informer.com/forums/
- http://www.simplemachines.org/community/index.php
- http://community.invisionpower.com/
Thanks! | 0 | [
2,
13568,
9106,
19,
272,
18,
18,
101,
566,
9077,
1336,
108,
800,
3726,
3726,
76,
42,
302,
10454,
636,
710,
9077,
1336,
108,
500,
5,
21127,
18,
6903,
6483,
9,
710,
9077,
1336,
108,
9,
960,
118,
1106,
723,
118,
1106,
723,
9,
26120... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
unit testing REST client -- mock the service
===
I am trying to test REST client functionality when the response status indicates error. So I want to mock the rest service to return an error code (like 404) and test that the client is handling the error cases correctly. Is there a way to mock the service? | 0 | [
2,
1237,
4431,
760,
6819,
13,
8,
8,
10506,
14,
365,
800,
3726,
3726,
31,
589,
749,
20,
1289,
760,
6819,
18548,
76,
14,
1627,
1782,
6475,
7019,
9,
86,
31,
259,
20,
10506,
14,
760,
365,
20,
788,
40,
7019,
1797,
13,
5,
1403,
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... |
Why clojure's vector function definition is so verbose?
===
I'm really curious to see why vector's implementation is so verbose? What's the reason it can't just do `[]`, `[a]` and `[a & args]`?
Here is what I get from `clj-1.4.0`.
=> (source vector)
(defn vector
"Creates a new vector containing the args."
{:added "1.0"
:static true}
([] [])
([a] [a])
([a b] [a b])
([a b c] [a b c])
([a b c d] [a b c d])
([a b c d & args]
(. clojure.lang.LazilyPersistentVector (create (cons a (cons b (cons c (cons d args))))))))
nil
| 0 | [
2,
483,
7383,
2142,
99,
22,
18,
7497,
1990,
5465,
25,
86,
9504,
6641,
60,
800,
3726,
3726,
31,
22,
79,
510,
7686,
20,
196,
483,
7497,
22,
18,
6123,
25,
86,
9504,
6641,
60,
98,
22,
18,
14,
1215,
32,
92,
22,
38,
114,
107,
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... |
htaccess hide extension doesn't allow ExpressionEngine logins
===
So pretty much said it but, using this in my .htaccess
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## removes index.php
# Add/Hide index.php from everything except admin
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond $1 !admin$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
## hide .php extension
# To externally redirect foo.php to foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
Will allow me to use /admin as a url, but will not allow me to log in,
If I remove this line `RewriteCond $1 !admin$ [NC]` it prepends index.php onto
/admin making it index.php/admin and I can't see the page | 0 | [
2,
13,
9020,
20604,
3077,
3896,
1437,
22,
38,
1655,
1803,
16847,
2205,
17040,
800,
3726,
3726,
86,
1772,
212,
87,
32,
47,
15,
568,
48,
19,
51,
13,
9,
9020,
20604,
6368,
2754,
19184,
7261,
6258,
18,
13,
8,
21531,
4725,
18,
6926,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Override Visual Studio's Treatment of Component-Derived Class
===
Is there any way to tell Visual Studio that I want to treat my class as a regular class and not a component? My class is declared like this:
public class WebDavClient : WebClient
{
}
I guess that, because `WebClient` derives from `System.ComponentModel.Component`, Visual Studio assumes it is a component. So double clicking the file in Solution Explorer brings up a designer surface instead of the code. Moreover, if I add another class before the declaration above, double clicking the file in Solution Explorer gives me a "The class WebDavClient can be designed, but is not the first class in the file" error.
In all cases, I only want to treat this class as a regular class and will never want a designer surface. Is there any way to override Visual Studio's default behavior? | 0 | [
2,
84,
11891,
3458,
1120,
22,
18,
2202,
16,
5912,
8,
25891,
718,
800,
3726,
3726,
25,
80,
186,
161,
20,
494,
3458,
1120,
30,
31,
259,
20,
5752,
51,
718,
28,
21,
1290,
718,
17,
52,
21,
5912,
60,
51,
718,
25,
2482,
101,
48,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MVC 3 jQuery TABS splt form input
===
I have a tabbed view using jQuery for the tabbing:
<script type="text/javascript">
$(document).ready(function () {
$("#tabs").tabs();
});
</script>
and the following is the rest of the view:
<div id="tabs">
<ul>
<li><a href="#tabs-1">Tab 1</a></li>
<li><a href="#tabs-2">Tab 2</a></li>
<li><a href="#tabs-4">Form summary</a></li>
</ul>
<div id="tabs-1">
@Html.Partial("Data1")
</div>
<div id="tabs-2">
@Html.Partial("Data2")
</div>
<div id="tabs-3">
@Html.Partial("Summary")
</div>
</div>
where the first two partial views represent two parts of the complete data model.The partial views look like:
@model ....
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<div class="editor-label">
@Html.LabelFor(model => model.Item1)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Item1)
@Html.ValidationMessageFor(model => model.Item1)
</div>
<p>
<input type="submit" value="Previous Medical History" />
</p>
</fieldset>
}
I am using the 'generate controller from model' method to get the content for the partial views.
The models contain attributes for validation etc. These are edited extracts from the real code and may have some errors!
What I want to do is to use the validation components of each partial view but defer the for submit until the end of the second tab and then move to the third tab to confirm for submission.
I am fairly new to MVC and am completly at a loss to know what to do.
Please educate me - many thanks in advance. | 0 | [
2,
307,
8990,
203,
487,
8190,
93,
6523,
18,
11202,
38,
505,
6367,
800,
3726,
3726,
31,
57,
21,
6523,
4283,
1418,
568,
487,
8190,
93,
26,
14,
6523,
8136,
45,
13,
1,
8741,
1001,
3726,
7,
11969,
118,
1004,
1385,
8741,
7,
1,
5579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ServiceStack JIT Error on MonoTouch
===
I have seen a previous [SO Question here](http://stackoverflow.com/questions/10094507/monotouch-using-servicestack-caused-jit-error) that discusses a similar (identical?) issue, but there was no answer there that could satisfy my problem.
My Environment:
<pre>
MonoDevelop 3.0.3.2
Installation UUID: ????????
Runtime:
Mono 2.10.9 (tarball)
GTK 2.24.10
GTK# (2.12.0.0)
Package version: 210090011
Mono for Android not installed
Apple Developer Tools:
Xcode 4.3.3 (1178)
Build 4E3002
Monotouch: 5.2.12
Build information:
Release ID: 30003002
Git revision: 7bf6ac0ca43c1b12703176ad9933c3484c05c84c-dirty
Build date: 2012-06-16 04:36:10+0000
Xamarin addins: 62ad7268d38c2ece7e00dc32960bd3bdab8fec38
Operating System:
Mac OS X 10.7.4
Darwin NEWTON.local 11.4.0 Darwin Kernel Version 11.4.0
Mon Apr 9 19:32:15 PDT 2012
root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
</pre>
My Code (Ping & PingResponse are DTOs in my own ServiceModel library):
Ping request = new Ping { LoginInfo = new IMDSSWebService_SS.ServiceModel.ClientLoginInfo { UserName="guest", Password="guest", ClientPlatform="iOS", ClientVersion="1.5", InstanceUID="uid1"} };
var response = _appDel.ServiceClient.Send<IMDSSWebService_SS.ServiceModel.PingResponse>(request);
ServiceStack Libraries:
ServiceStack.Common.Monotouch.dll (built from git src)
ServiceStack.Interfaces.Monotouch.dll (built from git src)
ServiceStack.Text.Monotouch (built from git src)
Exception:
<pre>
System.ExecutionEngineException has been thrown
Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1<IMDSSWebService_SS.ServiceModel.StatusEnum>:GetParseFn ()' while running with --aot-only.
System.ExecutionEngineException: Attempting to JIT compile method 'ServiceStack.Text.Json.JsonReader`1<IMDSSWebService_SS.ServiceModel.StatusEnum>:GetParseFn ()' while running with --aot-only.
at ServiceStack.Text.Json.JsonReader.GetParseFn (System.Type type) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Json.JsonTypeSerializer.GetParseFn (System.Type type) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.TypeAccessor.Create (ITypeSerializer serializer, ServiceStack.Text.TypeConfig typeConfig, System.Reflection.PropertyInfo propertyInfo) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.DeserializeType`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseMethod (ServiceStack.Text.TypeConfig typeConfig) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.JsReader`1[ServiceStack.Text.Json.JsonTypeSerializer].GetParseFn[PingResponse] () [0x00000] in <filename unknown>:0
at ServiceStack.Text.Json.JsonReader`1[IMDSSWebService_SS.ServiceModel.PingResponse]..cctor () [0x00000] in <filename unknown>:0
</pre>
I did try calling JsConfig.RegisterForAot(), but that didn't change anything. I also tried various permutations of Link SDK Only, Link All, Link None, but all failed either with the above exception, or didn't build at all, see below.
<pre>
Simulator/Debug - Works Fine
Simulator/Release - Works Fine
iPhone/Debug - Exception Above
iPhone/Release - Doesn't even build. (will create a separate SO question)
</pre> | 0 | [
2,
365,
25325,
13,
13803,
7019,
27,
4129,
15725,
800,
3726,
3726,
31,
57,
541,
21,
1158,
636,
656,
1301,
235,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
24803,
4588,
2290,
9816,
20027,
15725,
8,
12655,
8,
11449,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to pass arguments to tp_new and tp_init from subtypes in Python C API?
===
I originally asked this question on the Python capi-sig list: [How to pass arguments to tp_new and tp_init from subtypes?][1]
I'm reading the Python [PEP-253][2] on subtyping and there are plenty of good recommendations on how to structure the types, call `tp_new` and `tp_init` slots, etc.
But, it lacks an important note on passing arguments from sub to super type.
It seems the [PEP-253][3] is unfinished as per the note:
> (XXX There should be a paragraph or two about argument passing here.)
So, I'm trying to extrapolate some strategies [well known from the Python classes subtyping][4], especially techniques that each level strips-off arguments, etc.
I'm looking for techniques to achieve similar effect to this, but in using plain **Python C API** (3.x):
class Shape:
def __init__(self, shapename, **kwds):
self.shapename = shapename
super().__init__(**kwds)
class ColoredShape(Shape):
def __init__(self, color, **kwds):
self.color = color
super().__init__(**kwds)
What would be the equivalent in Python C API?
How to deal with similar situation but with arguments specific to derived class expected in different order?
It is arguments given at the end of the args tuple (or `kwds` dict, I assume principle would be same).
Here is some (pseudo-)code that illustrates the situation:
class Base:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
class Derived(Base):
def __init__(self, x, y, a):
self.a = a
super().__init__(x, y, None):
Note, if the `a` was expected first:
Derived.__init__(self, a, x, y)
it would be similar situation to the `Shape` and `ColoredShape` above.
It would also be easier to deal with, I assume.
Could anyone help to figure out the missing *XXX* comment mentioned above and correct technique for passing arguments from subtype up to super type(s) on construction?
[1]: http://mail.python.org/pipermail/capi-sig/2012-July/000500.html
[2]: http://www.python.org/dev/peps/pep-0253/
[3]: http://www.python.org/dev/peps/pep-0253/
[4]: http://rhettinger.wordpress.com/2011/05/26/super-considered-super/ | 0 | [
2,
184,
20,
1477,
10553,
20,
13,
13726,
1,
2681,
17,
13,
13726,
1,
108,
242,
37,
972,
4474,
18,
19,
20059,
272,
21,
2159,
60,
800,
3726,
3726,
31,
912,
411,
48,
1301,
27,
14,
20059,
2605,
49,
8,
18,
2816,
968,
45,
636,
1544,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
eCommerce CMS where product doesn't have it's own page
===
I'm looking for the eCommerce CMS where there are no product pages. CMS should contain the list of products. Then when you click a single product a window with description and bigger image should appear. I don't need a webpage for each product. | 0 | [
2,
13,
62,
26470,
2390,
18,
113,
2374,
1437,
22,
38,
57,
32,
22,
18,
258,
2478,
800,
3726,
3726,
31,
22,
79,
699,
26,
14,
13,
62,
26470,
2390,
18,
113,
80,
50,
90,
2374,
4434,
9,
2390,
18,
378,
3717,
14,
968,
16,
1985,
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... |
time between a date and a unix time, and a timer counting down that time
===
As my title sais I want to make a timer that counts down the time between a unix time of the current time and a date (including hour minute and secounds) in js.
I don't have idea how to do it can you give me some help here? | 0 | [
2,
85,
128,
21,
1231,
17,
21,
22540,
85,
15,
17,
21,
85,
139,
11195,
125,
30,
85,
800,
3726,
3726,
28,
51,
581,
8417,
18,
31,
259,
20,
233,
21,
85,
139,
30,
9927,
125,
14,
85,
128,
21,
22540,
85,
16,
14,
866,
85,
17,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to insert spanish characters in mysql
===
I am trying to do a simple insert with spanish characters without success.
This is my simple MySQL table structure:
CREATE TABLE student (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
lastname VARCHAR(100) NOT NULL,
CONSTRAINT PK_STUDENT PRIMARY KEY (id)
) CHARACTER SET utf8 COLLATE utf8_general_ci;
The names and lastnames will be from spanish people, their names and lastnames are like:
- Daniel Velásquez
- Javier Ñañez
- Víctor Sánchez
But when I do the following:
mysql> INSERT INTO student (name, lastname) VALUES ('Víctor', 'Sanchez');
I get this error:
ERROR 1366 (HY000): Incorrect string value: '\xA1ctor' for column 'name' at row
1
Well, I am really confused about collations, encondings and everything related when doing a search on internet.
So, what is the correct way to deal with this? Just to know I am using PHP and I know that a way to retrieve some special characters is using `htmlentities($value);`
Thanks in advance. | 0 | [
2,
184,
20,
14692,
1273,
1766,
19,
51,
18,
22402,
800,
3726,
3726,
31,
589,
749,
20,
107,
21,
1935,
14692,
29,
1273,
1766,
366,
1280,
9,
48,
25,
51,
1935,
51,
18,
22402,
859,
1411,
45,
1600,
859,
1209,
13,
5,
4924,
13820,
52,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using HtmlString throws an InvalidOperationException when updating the model
===
I'm using an HtmlString property on my model like this
public HtmlString Html { get; set; }
then I have an EditorTemplate that renders and html editor but when I use TryUpdateModel() I get an InvalidOperationException because no type converter can convert between these types String and HtmlString.
Do I need to create a custom model binder or is there another way? | 0 | [
2,
568,
13,
15895,
11130,
13566,
40,
16671,
11377,
10066,
872,
76,
71,
43,
1880,
14,
1061,
800,
3726,
3726,
31,
22,
79,
568,
40,
13,
15895,
11130,
1354,
27,
51,
1061,
101,
48,
317,
13,
15895,
11130,
13,
15895,
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... |
Do I have to pay any license fees if my iphone/android app records audio with AAC encoding?
===
Can any one tell me specifically whether I have to pay any patent license fees or no for making such an app that records audio with AAC format?
If that is the case I remember that I read on Developer Apple site like they said that now developers don't have to provide AAC license(Is it because they have bought a wrapper license for all IOS developers). Though I couldn't retrace where it was written, can you help with that.
Also there are several small time audio recorders available on the App Store that convert to AAC format. Do they provide the license while deploying their App.
And too how do open source projects like VLC Media Player and Firefox handle decoding AAC audio?
Thanks | 2 | [
2,
107,
31,
57,
20,
1372,
186,
3962,
10437,
100,
51,
21024,
118,
290,
18524,
4865,
742,
4023,
29,
21,
1738,
19608,
60,
800,
3726,
3726,
92,
186,
53,
494,
55,
3524,
1472,
31,
57,
20,
1372,
186,
6316,
3962,
10437,
54,
90,
26,
544,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MapView not focusing in on CoreLocation
===
I am using MapView and CoreLocation in a simple iPhone app... the CoreLocation shows my latitude and longitude correctly:
[Session started at 2012-07-08 20:11:35 +0200.]
2012-07-08 20:11:37.082 WhereAmI[5095:207] <+52.37609766, +4.92279518> +/- 70.00m (speed 0.00 mps / course -1.00) @ 7/8/12 8:11:33 PM Central European Summer Time
2012-07-08 20:11:38.605 WhereAmI[5095:207] <+52.37609766, +4.92279518> +/- 70.00m (speed 0.00 mps / course -1.00) @ 7/8/12 8:11:38 PM Central European Summer Time
However when I run:
[mapView setShowsUserLocation:YES];
The highlighted location is AppleHQ in California and not Amsterdam <+52.37609766, +4.92279518>?
From console logging I did find this "User location view is NOT visible" error:
2012-07-08 20:11:46.600 WhereAmI[5095:207] User location view is NOT visible but should be. Showing....
I did search on this and was advised to run:
mapView.userLocationVisible;
This executes ok but made no difference? | 0 | [
2,
2942,
4725,
52,
7796,
19,
27,
2884,
19032,
800,
3726,
3726,
31,
589,
568,
2942,
4725,
17,
2884,
19032,
19,
21,
1935,
21024,
4865,
9,
9,
9,
14,
2884,
19032,
1285,
51,
16337,
17,
22291,
12044,
45,
636,
7202,
5991,
373,
35,
563,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delay a while loop in PHP to prevent memory exhaustion?
===
I have a pretty simple image resize script that loops through 1000 folders, with different amounts of images in each folder. On my testing server, there aren't a lot of images, so it runs fine...but live with about 100K images...it will run into the memory problem. The php memory is already set to 384M, but i'd rather have the script maybe only process 10 folders at a time, stop for a bit, then start again. How can I do that within the while loop? use the sleep function maybe?
Here it is...
class DevTestHelper {
//This will Go through all full size images and resize images into requested folder
function resizeGalleryImages($destFolder, $width, $height, $isCrop = false) {
$count = 1000;
$source = JPATH_SITE."/images/gallery/full";
$dest = JPATH_SITE."/images/gallery/".$destFolder;
echo 'Processing Images<br>';
//Loop through all 1000 folders 0 to 999 in the /full dir
for($i=0; $i < $count;$i++) {
$iPath = $source.'/'.$i;
if(is_dir($iPath)) {
$h = opendir($iPath);
//Loop through all the files in numbered folder
while ($entry = readdir($h)) {
//only read files
if ($entry != "." && $entry != ".." && !is_dir($entry)) {
$img = new GImage($source.'/'.$i.'/'.$entry);
$tmp = $img->resize($width, $height, true, 3);
if($isCrop) {
$tmpWidth = $tmp->getWidth();
$tmpHeight = $tmp->getHeight();
$xOffset = ($tmpWidth - $width) / 2;
$yOffset = ($tmpHeight - $height) / 2;
$tmp->crop($width, $height, $xOffset, $yOffset, false, 3);
}
$destination = $dest.'/'.$i.'/'.$entry;
if(!$tmp->toFile($destination)) {
echo 'error in creating resized image at: '.$destination.'<br>';
}
flush();
ob_flush();
sleep(10);
echo $entry ;
//echo $entry.'<br>';
}
}
echo 'Processed: '.$i.' Folder<br>';
}
}
Thanks for any suggestions. | 0 | [
2,
7255,
21,
133,
5293,
19,
13,
26120,
20,
2501,
1912,
17343,
60,
800,
3726,
3726,
31,
57,
21,
1772,
1935,
1961,
302,
10454,
3884,
30,
19661,
120,
6150,
19294,
18,
15,
29,
421,
8545,
16,
3502,
19,
206,
19294,
9,
27,
51,
4431,
81... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 from command line a network adapter/interface used for Internet access on Windows 7
===
The general situation: I have Windows 7 64-bit professional, network connection via ethernet and plugged USB GSM modem. The problem is that sometimes my Internet provider has some outage and during such time I'd like to automatically use USB modem. I've already written some Perl code that actively tests if connection is down and can run a shell command to switch the adapter used for Internet access.
The question is how to change the adapters from command prompt. I'd prefer not giving the script administrative privileges but if it's unavoidable, I can bear this.
Preliminary look-around:
C:\Windows\system32>wmic nic get name, index
Index Name
0 WAN Miniport (SSTP)
1 WAN Miniport (IKEv2)
2 WAN Miniport (L2TP)
3 WAN Miniport (PPTP)
4 WAN Miniport (PPPOE)
5 WAN Miniport (IPv6)
6 WAN Miniport (Network Monitor)
7 Realtek PCIe GBE Family Controller
8 WAN Miniport (IP)
9 Microsoft ISATAP Adapter
10 RAS Async Adapter
11 Teredo Tunneling Pseudo-Interface
12 Microsoft ISATAP Adapter
13 Microsoft 6to4 Adapter
"netstat -rn" shows that adapter for Local Area Connection has higher priority for binding than the modem, which is good.
The usage of my USB modem for casual user consists of running a bespoke application for it and clicking a button "Connect/Disconnect". AFAIK the app doesn't have command line options.
In one direction I figured out a workaround that has additional advantage of keeping the connection alive: AutoConnect 0.1.3.1 by Jarek "Shider" Wieczorek. AFAIK it has no command line options, but just running it after it has been once configured establishes GSM connection and later reconnects in case, which is great.
Now I stuck on how to switch back to LAN (which is my primary, quicker access to the net) after some time, when Internet access has been restored. After killing AutoConnect, the connection is still via modem. I suspected that switching back could be some netsh command but haven't found anything obvious in the help. In a desperate attempt I thought of disabling the modem using devcon.exe but the program downloaded from
http://support.microsoft.com/?kbid=311272
didn't run (some errors that I won't cite because they're actually unrelated to the main issue) and before downloading huge Windows Driver Kit 7.1.0 for a hopefully better version I thought I'll ask here for some suggestion/solution :)
Thank you in advance for any neat general solution or a small specific solution on how to turn off USB connection (maybe Windows will automatically use LAN then) or switch to LAN. | 0 | [
2,
753,
37,
1202,
293,
21,
982,
9924,
106,
118,
6280,
6413,
147,
26,
2620,
1381,
27,
1936,
453,
800,
3726,
3726,
14,
297,
1858,
45,
31,
57,
1936,
453,
4384,
8,
3326,
736,
15,
982,
2760,
1197,
27820,
17,
29039,
182,
220,
489,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
writing JSON data to disk
===
What is the easiest way to write a JSON data/NSDictionary and read it back again? I know there's NSFileManager, but is there an open source framework library out there that would make this process easier? Does iOS5 NSJSONSerialization class supports writing the data to disk? | 0 | [
2,
1174,
487,
528,
1054,
20,
8582,
800,
3726,
3726,
98,
25,
14,
27237,
161,
20,
2757,
21,
487,
528,
1054,
118,
2172,
22595,
1857,
17,
1302,
32,
97,
188,
60,
31,
143,
80,
22,
18,
13,
2172,
16877,
22256,
15,
47,
25,
80,
40,
368,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Got "request failed" while trying to post on facebook's wall
===
I'm using facebook connect with SSO to sign in/up users to my app, and want to ask user to post on wall after each login.
But, at the requestListener's onComplete (Post on wall dialog was shown, and user touched on Share), I'm getting a false response. Didn't find out what it means in the FB SDK docs, but anything was posted on my Wall. Response was supposed to return a JSON formated string, so when trying to execute "message = json.getString("message");", I get a FacebookError witch just prints "request failed"...
logcat:
07-27 12:58:09.170: W/FacebookConnect(26086): Activity Started
07-27 12:58:12.300: W/FacebookConnect(26086): User authorized
07-27 12:58:12.300: E/FacebookConnect(26086): onComplete called at facebook.authorize
07-27 12:58:12.300: E/FacebookConnect(26086): Access Token: AAAC1sJLmgzkBAD0M40SQLgluPU...
07-27 12:58:12.860: D/webviewglue(26086): nativeDestroy view: 0x223888
07-27 12:58:13.420: I/SqliteDatabaseCpp(26086): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/androidhive.dashboard/databases/webview.db
07-27 12:58:13.420: I/SqliteDatabaseCpp(26086): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/androidhive.dashboard/databases/webview.db
07-27 12:58:14.670: D/SampleRequestListener(26086): Response: {"id":"1123123","name"...
07-27 12:58:14.680: E/FacebookConnect(26086): JSON {"work":[{"position"...
07-27 12:58:17.150: E/SampleDialogListener(26086): Dialog Success! post_id=1003157...
07-27 12:58:17.720: E/WallPostRequestListener(26086): Got response: false
07-27 12:58:17.720: E/WallPostRequestListener(26086): Facebook Error: request failed
My code (Error occurs in class WallPostRequestListener):
public class FacebookConnectActivity extends Activity {
private static final String TAG_JSON = "json";
static Facebook facebook = new Facebook("11111111111111");
AsyncFacebookRunner mAsyncRunner;
private SharedPreferences mPrefs;
JSONObject json;
Context ctx = this;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.resgatar_produto_layout);
Log.w("FacebookConnect", "Activity Started");
mPrefs = getPreferences(MODE_PRIVATE);
String access_token = mPrefs.getString("access_token", null);
long expires = mPrefs.getLong("access_expires", 0);
if(access_token != null) {
facebook.setAccessToken(access_token);
}
if(expires != 0) {
facebook.setAccessExpires(expires);
}
if(!facebook.isSessionValid()) {
facebook.authorize(this, new String[] {"email", "user_photos", "user_birthday", "user_hometown", "user_relationships","user_location", "user_work_history", "publish_actions"}, new DialogListener() {
@Override
public void onComplete(Bundle values) {
Log.w("FacebookConnect", "User authorized");
Log.e("FacebookConnect", "onComplete called at facebook.authorize");
Log.e("FacebookConnect", "Access Token: "+facebook.getAccessToken().toString());
mAsyncRunner = new AsyncFacebookRunner(facebook);
mAsyncRunner.request("me", new SampleRequestListener());
Bundle params = new Bundle();
params.putString("link", "www.qranio.com");
facebook.dialog(ctx, "feed", params, new SampleDialogListener());
}
@Override
public void onFacebookError(FacebookError error) {
Log.w("FacebookConnect", "Error authorizing: "+error.toString());
}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
}
}
public static void logoutFB(){
if(facebook.isSessionValid()){
facebook.setAccessToken(null);
}
}
public void startDataProcess(){
Intent a = new Intent(FacebookConnectActivity.this, FacebookDataProcess.class);
a.putExtra(TAG_JSON, json.toString());
startActivity(a);
finish();
}
public class SampleDialogListener extends BaseDialogListener {
public void onComplete(Bundle values) {
final String postId = values.getString("post_id");
if (postId != null) {
Log.e("SampleDialogListener", "Dialog Success! post_id=" + postId);
mAsyncRunner.request(postId, new WallPostRequestListener());
} else {
Log.e("SampleDialogListener", "No wall post made"); //Usuario clicou em Cancelar
startDataProcess();
}
}
public void onCancel(){ //Usuario clicou no X do dialog
Log.w("FacebookConnect", "Post to Wall Canceled");
startDataProcess();
}
}
public class WallPostRequestListener extends BaseRequestListener {
public void onComplete(final String response, final Object state) {
Log.e("WallPostRequestListener", "Got response: " + response);
String message = "<empty>";
try {
JSONObject json = Util.parseJson(response);
message = json.getString("message");
} catch (JSONException e) {
Log.e("WallPostRequestListener", "JSON Error in response");
} catch (FacebookError e) {
Log.e("WallPostRequestListener", "Facebook Error: " + e.getMessage());
//Toast.makeText(ctx, "Erro ao postar no Facebook.", Toast.LENGTH_LONG).show();
}
//startDataProcess();
}
}
public class SampleRequestListener extends BaseRequestListener {
public void onComplete(final String response, final Object state) {
try {
// process the response here: executed in background thread
Log.d("SampleRequestListener", "Response: " + response.toString());
json = Util.parseJson(response);
Log.e("FacebookConnect", "JSON " + json.toString());
//startDataProcess();
// then post the processed result back to the UI thread
// if we do not do this, an runtime exception will be generated
// e.g. "CalledFromWrongThreadException: Only the original
// thread that created a view hierarchy can touch its views."
} catch (JSONException e) {
Log.w("Facebook-Example", "JSON Error in response");
} catch (FacebookError e) {
Log.w("Facebook-Example", "Facebook Error: " + e.getMessage());
}
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
facebook.authorizeCallback(requestCode, resultCode, data);
try{
mAsyncRunner = new AsyncFacebookRunner(facebook);
mAsyncRunner.request("me", new SampleRequestListener());
Bundle params = new Bundle();
params.putString("link", "www.qranio.com");
//params.putString("display", "touch");
facebook.dialog(ctx, "feed", params, new SampleDialogListener());
Log.e("FacebookConnect", "Authentication authorizeCallback called (onActivityResult)");
Log.e("FacebookConnect", "Access Token: "+facebook.getAccessToken().toString());
//facebook.
//if (facebook.isSessionValid()){
//}else{
//Log.e("FacebookConnect", "Invalid facebook session while trying to fetch user data");
//}*/
}catch(FacebookError fbe){
Log.e("FacebookConnect", "onActivityResult FacebookError " + fbe.toString());
}catch (Exception e){
Log.e("FacebookConnect", "onActivityResult Exception " + e.toString());
}
}
} | 0 | [
2,
330,
13,
7,
99,
10351,
1702,
7,
133,
749,
20,
678,
27,
9090,
22,
18,
769,
800,
3726,
3726,
31,
22,
79,
568,
9090,
6379,
29,
13,
18,
656,
20,
1676,
19,
118,
576,
3878,
20,
51,
4865,
15,
17,
259,
20,
1349,
4155,
20,
678,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ConcurrentDictionary->AddOrUpdate in VS C++
===
i am using Visual Studio 2010 C++ Express and i mant to add an item to my ConcurrentDictionary:
i have such code:
String^ key = gcnew String("key");
int value = 123;
myDictionary->AddOrUpdate(key,value,/*WHAT TO ADD HERE?*/);
AddOrUpdate Method takes 3 argument, not like normal Dictionary 2.
Microsoft sites says it takes such arguments:
public:
TValue AddOrUpdate(
TKey key,
TValue addValue,
Func<TKey, TValue, TValue>^ updateValueFactory
)
on microsoft sites i also found code in C#:
cd.AddOrUpdate(1, 1, (key, oldValue) => oldValue + 1);
but it does not work in C++. what i must put as 3rd argument? | 0 | [
2,
19513,
22595,
1857,
8,
1,
14854,
248,
576,
8209,
19,
4611,
272,
20512,
800,
3726,
3726,
31,
589,
568,
3458,
1120,
498,
272,
20512,
2999,
17,
31,
169,
38,
20,
3547,
40,
9101,
20,
51,
19513,
22595,
1857,
45,
31,
57,
145,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to configure a custom DataService<T> to allow impersonation?
===
On a "standard" WCF service I'd simply mark up the operation methods with:
[OperationBehavior(Impersonation = ImpersonationOption.Allowed)]
But with my data service, I get an InvalidOperationException as soon as the DataServiceHost is opened:
The service operation 'ProcessRequestForMessage' that belongs to the contract with the 'IRequestHandler' name and the 'http://tempuri.org/' namespace does not allow impersonation.
How do I mark 'ProcessRequestForMessage' to allow impersonation?
| 0 | [
2,
25,
32,
938,
20,
1065,
15951,
21,
5816,
1054,
11449,
1,
38,
1,
20,
1655,
797,
7276,
857,
60,
800,
3726,
3726,
27,
21,
13,
7,
15566,
7,
11801,
410,
365,
31,
22,
43,
1659,
943,
71,
14,
1453,
3195,
29,
45,
636,
11377,
863,
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... |
Validating XSD against W3C XML Schema Definition
===
I am generating some XML Schemas and would like to ensure that our generator is creating valid XML Schema documents (Not XML). I was trying to come up with the code to validate the XML Schema document, but failing miserably. I didn't think it would be this complex.
private void validateXsd( String xsdAsString ) {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
factory.setNamespaceAware(true);
factory.setFeature( "http://apache.org/xml/features/validation/schema", true );
SchemaFactory schemaFactory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
URL xmlSchemaXSD = this.getClass().getClassLoader().getResource( "com/metamodel/xsd/XMLSchema.xsd" );
URL xmlSchemaDTD = this.getClass().getClassLoader().getResource( "com/metamodel/xsd/XMLSchema.dtd" );
URL xmlSchemaDataTypes = this.getClass().getClassLoader().getResource( "com/metamodel/xsd/datatypes.dtd" );
// requires that XMLSchema.dtd and datatypes.dtd are present in the same directory with the XMLSchema.xsd.
factory.setSchema( schemaFactory.newSchema( xmlSchemaXSD ) );
SAXParser parser = factory.newSAXParser();
// parser.setProperty( "http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema" );
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler( new SimpleErrorHandler() );
reader.parse( new InputSource( IOUtils.toInputStream( xsdAsString ) ) );
} catch( SAXParseException e ) {
e.printStackTrace( System.err );
} catch ( ParserConfigurationException e ) {
e.printStackTrace( System.err );
} catch ( SAXException e ) {
e.printStackTrace( System.err );
} catch ( IOException e ) {
e.printStackTrace( System.err );
}
}
This code is fairly close to what I need to do, but I'm getting the following errors.
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/r:/as4ot/lib/metamodel.jar!/com/metamodel/xsd/XMLSchema.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2245)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(XSDHandler.java:1590)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:438)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:523)
at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
I'm using a URL when calling setSchema( uri ) to ensure that XMLSchema.dtd and datatypes.dtd are relative and I hope they are available, but I am unsure how I can check this.
I'm guessing that it doesn't like the fact the XMLSchema.xsd, XMLSchema.dtd and datatypes.dtd are bundled in my jar and hence loaded by the classloader. Is there anyway to solve this so that I can move onto my next hurdle which is *org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.* assuming that it behaves the same as when I loaded the XMLSchema from a directory path outside of a jar.
My goals are:
- Load the XMLSchema.xsd from inside the jar so that it is neatly packaged with the code.
- Get past the next error regarding xml:lang.
Hopefully I'm not asking too much!
Thanks,
Stuart | 0 | [
2,
7394,
1880,
993,
18,
43,
149,
619,
240,
150,
23504,
23874,
5465,
800,
3726,
3726,
31,
589,
13500,
109,
23504,
23874,
18,
17,
83,
101,
20,
4062,
30,
318,
15286,
25,
2936,
7394,
23504,
23874,
4374,
13,
5,
1270,
23504,
6,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Passing char* to a function c++
===
So I've this issue I can't get fixed :-(
In my .h I've this:
char* _textPath_1;
FileReader* _reader_3;
in .cpp I've:
_textPath_1 = "foo";
_reader_3->openFile(_textPath_5);
And FileReader has this function:
signed int openFile(char* name);
but If I write this (just to test):
signed int FileReader::openFile(char* name) {
std::cout << name << std::endl;
fileName = name;
stream.open(fileName, std::ios::in);
if (!stream.is_open()) {
FileReader::printErrorOpeningFile(fileName);
stream.close();
return -1;
}
return 0;
}
fileName is a char * and I need that it gets the same value (foo) of name. I get an error, and I'm not even able to print name, it just print a blank line.. why? | 0 | [
2,
2848,
4892,
2483,
20,
21,
1990,
272,
20512,
800,
3726,
3726,
86,
31,
22,
195,
48,
1513,
31,
92,
22,
38,
164,
3535,
13,
45,
8,
5,
19,
51,
13,
9,
252,
31,
22,
195,
48,
45,
4892,
2483,
13,
1,
11969,
8353,
1,
165,
73,
3893,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Interview deal coding review
===
after clearing 2 F2F rounds,I was asked this problem to code at one company during interview process.although I coded it ,my solution was not able to satiate those guys , can anyone suggest better solution or problems with mine.Overall a bad interview process.
PROBLEM:
Since the departure of Sahara Group from Pune Warriors and non-participation of Kochi Tuskers (for obvious reasons), BCCI has decided to put both the teams up for sale again. This time two new business giants B1 and B2 take the ownership of Pune and Kochi teams respectivly. At the time of auction both teams have a pool of 30 players to choose from. Each player is rated on the scale of 0 to 10 (10 being the best) in each of the below departments:
1. Batting
2. Bowling
3. Fielding
4. Can keep wickets? (keeping strength would be either 0 or 10)
Total Strength of a player = Batting Strength + Bowling Strength + Fielding Strength + Keeping Strength
Besides these, each player has a jersey number which is a unique natural number. Prime numbered jersies are worn by foreign players only.
Price of a particular player is determined by below formula:
'
Price (in INR) = 1000000 X (0.45 <strength_batting> + 0.35 <strength_bowling> + 0.20 <strength_fielding>) + 500000 X (<can_keep_wickets>)
'
Entire data about the players is available to an automated auctionor in xml format. The auctionor puts up players for auction in increasing order of their price.
Both B1 and B2 are looking for 5 players. Each team can have a maximum of two foreign players.
B1 and B2 alternately buy players put up on sale by auctionor. If the player cannot enter the squad (due to team strength/foreign players constraints), he is returned back to the auctionor. Else, if a team has unfulfilled strength, then the most expensive eligible player is returned back to the auctioner and the new player is inducted. A player, when rejected by both groups, is declared UNSOLD and is removed from the auctionor's queue.
With given conditions and for given player strength xml (sample.xml), compute the team composition, minimum amount B1 and B2 have to spend individually on their respective teams to achieve the desired strength for each of the below cases:
Case 1: Desired Strength = 60, A calls first
Case 2: Desired Strength = 65, B calls first
Case 3: Desired Strength = 70, A calls first
How to attach files ? I need to attach one files which I coded.XML is not coming in same format.
| 1 | [
2,
2421,
1183,
13,
15458,
1487,
800,
3726,
3726,
75,
8130,
172,
398,
135,
410,
5839,
15,
49,
23,
411,
48,
1448,
20,
1797,
35,
53,
237,
112,
2421,
953,
9,
8655,
31,
13,
22254,
32,
13,
15,
915,
4295,
23,
52,
777,
20,
847,
15882,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 - Basic chained methods not working
===
I'm very puzzled by some basic chained actions not (apparently) done:
Goal is to hide a dialog panel (this works), and at the same time, to change classes for the `#nomoreIE` div.
Puddy simple. Well..not.
I tried many combinations to chain the `.addClass('masked').removeClass('poped')` without ANY results (nor console error) .
Pb is the same for the "`append`" too (I wanna add some little handle to give the ability to reopen the dialog..
$('.lt-ie9 #nomoreIE a.ui-dialog-titlebar-close').live('click', function(e4){
$('#nomoreIE').addClass('masked').removeClass('poped').animate({
left: '-148px' }, {
duration: '80',
easing: 'easeInExpo'
}).append('<div id="alert-ie"></div>');
return false;
});
Any help appreciated
Thank you | 0 | [
2,
487,
8190,
93,
13,
8,
2125,
2858,
69,
3195,
52,
638,
800,
3726,
3726,
31,
22,
79,
253,
17033,
34,
109,
2125,
2858,
69,
3078,
52,
13,
5,
27844,
6,
677,
45,
1195,
25,
20,
3077,
21,
28223,
4113,
13,
5,
1565,
693,
6,
15,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to implement server shut down
===
I've been looking at a clean way of implementing shut down logic for a server that I'm developing.
There are two approaches that I could take:
- Use Runtime.addShutdownHook() to gracefully handle shut down when Ctrl-C is issued.
- Listen to a designated shut down port (similar to what Tomcat does) and shut down when the appropriate command is received through that port.
The first approach is simple to implement but using Ctrl-C as the shut down mechanism doesn't seem elegant.
The second approach seems cleaner, but requires the overhead of configuring and listening to another port.
I would appreciate advice on this, particularly if you can suggest a better alternative. | 0 | [
2,
184,
20,
8713,
8128,
2218,
125,
800,
3726,
3726,
31,
22,
195,
74,
699,
35,
21,
2745,
161,
16,
17333,
2218,
125,
7085,
26,
21,
8128,
30,
31,
22,
79,
3561,
9,
80,
50,
81,
7501,
30,
31,
110,
247,
45,
13,
8,
275,
485,
891,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get Built-in Output From Core Audio
===
Is it possible to reliably get the `AudioDeviceID` of a Mac's built-in output? I've tried using `kAudioHardwarePropertyDefaultOutputDevice` to get the currently selected output device, but this can be any old device depending on what the user has selected in system preferences — I only want the ID of the built in speakers.
AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyDefaultInputDevice,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster };
verify_noerr (AudioObjectGetPropertyData(kAudioObjectSystemObject,
&theAddress,
0,
NULL,
&propsize,
&inputDevice));
At the moment I'm getting a list of all the devices and checking the name string of the devices by doing `name == "Built-in Output"`. This works on my machine but doesn't seem like a very robust solution! Is there anything like a `kAudioHardwarePropertyBuiltInOutputDevice`? | 0 | [
2,
164,
392,
8,
108,
5196,
37,
2884,
4023,
800,
3726,
3726,
25,
32,
938,
20,
13,
19003,
4801,
164,
14,
13,
1,
7150,
49,
8355,
18507,
1340,
1,
16,
21,
1572,
22,
18,
392,
8,
108,
5196,
60,
31,
22,
195,
794,
568,
13,
1,
20136,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Blank space in dom load after js/css
===
i'm debugging my site and i see a blank space in dom load after .js and .css files.
I'm not able to understand this behaviour, have you some idea if this blank time is a problem and what is it?
This is a screenshot. :)
thx!
![DOM LOAD][1]
[1]: http://i.stack.imgur.com/8oRdg.png | 0 | [
2,
6463,
726,
19,
11859,
6305,
75,
487,
18,
118,
6824,
18,
800,
3726,
3726,
31,
22,
79,
121,
16254,
2762,
51,
689,
17,
31,
196,
21,
6463,
726,
19,
11859,
6305,
75,
13,
9,
728,
18,
17,
13,
9,
6824,
18,
6488,
9,
31,
22,
79,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 - Array of objects inside double brackets
===
Im trying to create a node.js chat application and when someone joins the chat room I want to push the last 100 messages to their browser. I have node.js adding each chat message as an object with the username and text of the message into an array. When node.js pushes the array of objects it looks like this.
[
[
{
"username": "Warren2",
"text": "test1"
},
{
"username": "Warren2",
"text": "test2"
},
{
"username": "Warren2",
"text": "test3"
},
{
"username": "Warren2",
"text": "hello"
}
]
]
I'm having trouble parsing that with jquery and I think jquery is throwing errors because the objects are inside an extra set of brackets. The code I'm using to create the array of objects is as follows:
// chat history
var history = [];
// when the client emits 'sendchat', this listens and executes
socket.on('sendchat', function (data) {
// we tell the client to execute 'updatechat' with 2 parameters
io.sockets.emit('updatechat', socket.username, data);
// we add the message to the chat history
var obj = {username:socket.username,text:data};
history.push(obj);
history = history.slice(-100);
});
Am I doing something wrong or is there a way to remove the extra set of brackets or parse this with jquery? When I log the history data node.js is sending to the browser to the console it looks like this:
[Object { username="Warren2", text="test1"}, Object { username="Warren2", text="test2"}, Object { username="Warren2", text="test3"}, Object { username="Warren2", text="hello"}, Object { username="Warren", text="test"}, Object { username="Warren", text="test again"}, Object { username="Warren", text="test"}, Object { username="Warren", text="Hey"}] | 0 | [
2,
487,
8190,
93,
13,
8,
7718,
16,
3916,
572,
1494,
21971,
800,
3726,
3726,
797,
749,
20,
1600,
21,
15421,
9,
728,
18,
6615,
3010,
17,
76,
737,
10612,
14,
6615,
337,
31,
259,
20,
3250,
14,
236,
808,
7561,
20,
66,
16495,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular Expression to capture numbers in parentheses
===
I tried searching for this but couldn't find a similar question.
I have a string that looks like the following:
> Products Ran (14, 51, 71, 92) at 2012-07-05
I want to only grab the numbers that are inside the parentheses, so that I have the following matches:
> 14 51 71 92
I've tried the following, but am obviously missing something:
(?x)
(?<=\() #Opening parentheses
(?<product>\d*) #Group the numbers
(?=\)) #Closing parentheses
| 0 | [
2,
1290,
1803,
20,
3683,
2116,
19,
28273,
800,
3726,
3726,
31,
794,
5792,
26,
48,
47,
711,
22,
38,
477,
21,
835,
1301,
9,
31,
57,
21,
3724,
30,
1879,
101,
14,
249,
45,
13,
1,
1985,
717,
13,
5,
1419,
15,
5236,
15,
8966,
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... |
running netbeans projects with xampp
===
i have created a j2ee application using netbeans ide. I want to run this project in xampp rather than the netbeans tomcat server. How can i do this?
Thanx in advance. | 0 | [
2,
946,
4275,
863,
5950,
2314,
29,
993,
765,
3421,
800,
3726,
3726,
31,
57,
679,
21,
487,
135,
2851,
3010,
568,
4275,
863,
5950,
13,
3448,
9,
31,
259,
20,
485,
48,
669,
19,
993,
765,
3421,
864,
119,
14,
4275,
863,
5950,
2067,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Sporadic Error Window when using DirectShow with WPF
===
I have build an app, which shows two direct show graphs parallely. This application uses WPF, therefore I evaluated different solutions, like WPFMediaKit (http://wpfmediakit.codeplex.com/) and AVCapWPF(https://wpfcap.codeplex.com/). Both solutions normally works fine. But sometimes a get a grey error window (which looks a lot like Windows 2000) with some informations about CPU (but old CPU informations, seems like the actual CPU was not known, whne this error message was designed) and loaded Dlls, but no error message at all. The title of the window is simply "Error".
The problem is the error occures sproradically, so I am not sure, whether I know all occurancies, but the following error cases are known:
1. Error occures somewhere, when building the direct show graph, which results in only one graph loaded and displays
2. Error occurs before both graphs where builded, which results in both graphs loaded and displayed
3. Error does not depend of the used filter in the graph. For rendering the frameworks uses different renderer and the source filter where switched as well, mostly using Montivision DemoSource.
I could only produce the error, when both graphs where rendered, but could also not find a possibilit to produce it regularly.
When the error window is closed, the whole application is finished (crashed). It is impossible to catch the error in .Net, it seems like it comes from a system library.
Error Window Text:
OS: Workstation, SP1
CPU: GenuineIntel, Intel Pentium III Xeon, MMX @ 2490 MHz
Module name: D:\[...]\bin\Debug\TestApp.exe
Application data:
VmVyc2lvbjogV2t4dGJIZHFVbTEyYkdsb0oxRmhiR3htS2xwaWUya3N
TMlJpZW1wOVRUd3hTaU0rTXlJNE5DTTVOaVpLT3pnVkUwSXJOQzRxUE
... (a base64 encoded list of loaded dlls)
I hope someone knows that error and a good solution for avoiding it.
Regards, Maria | 0 | [
2,
26335,
7019,
1463,
76,
568,
1744,
9303,
29,
619,
7721,
800,
3726,
3726,
31,
57,
1895,
40,
4865,
15,
56,
1285,
81,
1744,
298,
7210,
18,
3821,
93,
9,
48,
3010,
2027,
619,
7721,
15,
1793,
31,
19018,
421,
6776,
15,
101,
619,
7721... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 links in custom modules use Joomla SEF
===
I configured my site (sweetroof.com) to use Joomla SEF. I have issues with maintaining the SEF links within a custom module. For instance, I want to have links to some articles in the custom module so I did something like this
<pre><code><a href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=2&Itemid=3'); ?>">About Us</a> </code></pre>I don't know why it's not directing me to the approprate place. It simply brings out the some error saying component not found. What exactly am I not doing correctly | 0 | [
2,
544,
6271,
19,
5816,
17113,
275,
2640,
2636,
531,
13,
16141,
800,
3726,
3726,
31,
28895,
51,
689,
13,
5,
10902,
661,
1041,
9,
960,
6,
20,
275,
2640,
2636,
531,
13,
16141,
9,
31,
57,
1549,
29,
8215,
14,
13,
16141,
6271,
363,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
date select event for TKCalendarMonthView in Xcode 4.3
===
i have used the TapkuLibrary for calendar in a iPhone app developed using Xcode 4.
The calendar is initialized but when i select a date from the month the function is not getting executed
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d {
NSLog(@"calendarMonthView didSelectDate");
}
I am new to Xcode, please help | 0 | [
2,
1231,
5407,
807,
26,
13,
38,
197,
3430,
219,
2542,
6444,
4725,
19,
993,
9375,
268,
9,
240,
800,
3726,
3726,
31,
57,
147,
14,
5526,
12065,
49,
2559,
622,
26,
7036,
19,
21,
21024,
4865,
885,
568,
993,
9375,
268,
9,
14,
7036,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 revive nested JSON dates/times
===
I have a JSON string like this one: (data is faked, my company is very restrictive...)
<!-- language-all: lang-js -->
{
"people" : {
"0" : {
"name" : "Strub, Thomas Reto",
"birthdate" : "/Date(690595200000)/"
}
},
"generated" : "/Date(1340755200000)/"
}
and I use this reviver when parsing:
var jsonMSDateTime = new RegExp('^\\/Date\\([0-9]{13}\\)\\/$');
function jsonReviver(key, value) {
if (jsonMSDateTime.test(value)) return new Date(value.substr(6, 13) * 1);
else return value;
}
My Problem is the following: If I run this script in IE, the generated date is parsed, but the birthdate is not. (It works in chrome, however.)
What mistake did I make? | 0 | [
2,
184,
20,
19576,
5618,
69,
487,
528,
4076,
118,
891,
18,
800,
3726,
3726,
31,
57,
21,
487,
528,
3724,
101,
48,
53,
45,
13,
5,
18768,
25,
7031,
43,
15,
51,
237,
25,
253,
26915,
9,
9,
9,
6,
13,
1,
187,
8,
8,
816,
8,
1233... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MDI child shows ıcon when maximized
===
I have an mdi parent and mdi child. Mdi child forms showicon value is set to false but when i maximized mdi child it shows icon.
I tried this but still not working:
g.WindowState = FormWindowState.Normal;
g.ShowIcon = false;
g.Show();
g.WindowState = FormWindowState.Maximized;
[http://i.stack.imgur.com/KNTHz.jpg][1]
since my rep doesnt let me post pics i give it as a link.
[1]: http://i.stack.imgur.com/KNTHz.jpg | 0 | [
2,
8138,
49,
850,
1285,
13,
1,
1126,
76,
23952,
43,
800,
3726,
3726,
31,
57,
40,
8138,
49,
4766,
17,
8138,
49,
850,
9,
8138,
49,
850,
1997,
298,
49,
1126,
1923,
25,
309,
20,
4997,
47,
76,
31,
23952,
43,
8138,
49,
850,
32,
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... |
Can I use Python's curses and cmd libraries together?
===
In Python, I'd like to write a terminal program using both cmd and curses together, ie. use cmd to accept and decode full input lines, but position the output with curses.
Mashing together examples of both curses and cmd like this :
import curses
import cmd
class HelloWorld(cmd.Cmd):
"""Simple command processor example."""
def do_greet(self, line):
screen.clear()
screen.addstr(1,1,"hello "+line)
screen.addstr(0,1,">")
screen.refresh()
def do_q(self, line):
curses.endwin()
return True
if __name__ == '__main__':
screen = curses.initscr()
HelloWorld().cmdloop()
I find that I'm not seeing anything when I type. curses is presumably waiting for a refresh before displaying anything on the screen. I could switch to using getch() but then I'd lose the value of cmd.
Is there a way to make these work together? | 0 | [
2,
92,
31,
275,
20059,
22,
18,
7144,
18,
17,
2390,
43,
8649,
429,
60,
800,
3726,
3726,
19,
20059,
15,
31,
22,
43,
101,
20,
2757,
21,
3855,
625,
568,
156,
2390,
43,
17,
7144,
18,
429,
15,
13,
660,
9,
275,
2390,
43,
20,
3440,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 NSIS be used to package MSI installers?
===
I have two MSI installers for 32 bit and 64 bit platforms, and I'd like to create a single installer to ship that will run the appropriate MSI based on the platform it's being run on. I appreciate that this is not possible with MSI alone.
The package required is very simple, just check the bit-ness of the platform it's running on and launch the appropriate MSI, but I haven't yet found any *free* tools that will do this. I've come across NSIS, which looks promising, does anyone know if it is appropriate for this task? | 0 | [
2,
92,
13,
103,
4557,
44,
147,
20,
6030,
4235,
49,
16146,
445,
60,
800,
3726,
3726,
31,
57,
81,
4235,
49,
16146,
445,
26,
2512,
1142,
17,
4384,
1142,
6843,
15,
17,
31,
22,
43,
101,
20,
1600,
21,
345,
16146,
106,
20,
995,
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... |
Toggle specific div and change img jquery
===
I have a problem with toggle on this list:
<div id="list">
<div id="segment"> // <--- when clicked, toggle segm_content and opener
<div id="opener">
<img src="images/open.png" /> // changes when toggled
</div>
<div id="segm_content">
// content to hide/show
</div>
</div>
<div id="segment"> // <--- when clicked, toggle segm_content and opener
<div id="opener">
<img src="images/open.png" /> // changes when toggled
</div>
<div id="segm_content">
// content to hide/show
</div>
</div>
... //and so on
</div>
I want clicked *"#segment"* to toggle child *"#segm_content"* and change img in *"#opener"*.
I made it working with this code:
$('#segment').toggle(function() {
$('#opener').html('<img src="images/open.png"/>');
$('#segm_content').hide(500);
}, function() {
$('#opener').html('<img src="images/close.png"/>');
$('#segm_content').show(500);
});
But I can't figure out how to do it only for one *"#segment"* at a time.
This code toggles everything, which I don't want.
I am stuck at this point, any suggestions please?
Many thanks! | 0 | [
2,
20,
263,
4875,
1903,
13,
12916,
17,
753,
797,
263,
487,
8190,
93,
800,
3726,
3726,
31,
57,
21,
1448,
29,
20,
263,
4875,
27,
48,
968,
45,
13,
1,
12916,
4924,
3726,
7,
5739,
7,
1,
13,
1,
12916,
4924,
3726,
7,
28857,
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... |
Colorbox frame size calculated wrong (30px)
===
as you can see here:
http://wakawaka.reh-kendermann.df-kunde.de/media/media
the colorbox content wrapper "cboxContent" height is 30 px too short.
We could say the content "cboxLoadedContent" / "cboxContent" is 30px too large.
In fact, when I correct the content 30px, the dsplay is right, but naturally the content has a specific height which is not changeable.
So: the whole calculation is wrong.
I am using Drupal 7.14 and
colorbox 7.x-1.3 ; A light-weight, customizable lightbox plugin for jQuery 1.4.3+. and
jQuery Update 7.x-2.2 ; Updates jQuery to jQuery 1.5.2 and jQuery UI 1.8.11.
Thanx for help
Lars | 0 | [
2,
1665,
5309,
3523,
1072,
10785,
1389,
13,
5,
1762,
306,
396,
6,
800,
3726,
3726,
28,
42,
92,
196,
235,
45,
7775,
6903,
1608,
6965,
657,
9,
99,
252,
8,
2853,
1157,
1897,
9,
8736,
8,
197,
12239,
9,
546,
118,
8260,
118,
8260,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.