unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
MySQL performance on storing and returning ids
===
I have an API where I need to log which ids from a table that were returned in a query, and in another query, return results sorted based on the log of ids.
For example:
Tables `products` had a PK called `id` and `users` had a PK called `id` . I can create a log table with one insert/update per returned id. I'm wondering about performance and the design of this.
Essentially, for each returned ID in the API, I would:
INSERT INTO log (product_id, user_id, counter)
VALUES (@the_product_id, @the_user_id, 1)
ON DUPLICATE KEY UPDATE counter=counter+1;
.. I'd either have an id column as PK or a combination of product_id and user_id (alt. having those two as a UNIQUE index).
So the first issue is the performance of this (20 insert/updates and the effect on my select calls in the API) - is there a better/smarter way to log these IDs? Extracting from the webserver log?
Second is the performance of the select statements to include the logged data, to allow a user to see new products every request (a simplified example, I'd specify the table fields instead of * in real life):
SELECT p.*, IFNULL(
SELECT log.counter
FROM log
WHERE log.product_id = p.id
AND log.user_id = @the_user_id
, 0 ) AS seen_by_user
FROM products AS p
ORDER BY seen_by_user ASC
In our database, the products table has millions of rows, and the users table is growing rapidly. Am I right in my thinking to do it this way, or are there better ways? How do I optimize the process, and are there tools I can use? | 0 | [
2,
51,
18,
22402,
956,
27,
25615,
17,
2485,
13,
9178,
800,
3726,
3726,
31,
57,
40,
21,
2159,
113,
31,
376,
20,
6738,
56,
13,
9178,
37,
21,
859,
30,
46,
587,
19,
21,
25597,
15,
17,
19,
226,
25597,
15,
788,
1736,
22554,
432,
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... |
"Undefined" message in jqgrid, "b.jgrid.formatter is undefined"
===
when I'm sending JSON response to jqgrid I get "undefined" message across it and Firebug is telling me this:
b.jgrid.formatter is undefined
[Break On This Error]
...input===true){b(".ui-pg-input",l).val(a.p.page);h=a.p.toppager?"#sp_1"+m+",#sp_1...
which basically doesn't tell me much.
This happens when I'm sending empty response:
{"total":0,"page":1,"records":0,"rows":[]}
or response with records. Records are then visible in grid. After this "undefined" message is shown up, I can't browse through pages as, of course, the bug in code appeared.
How can I solve this?
Thanks in advance. | 0 | [
2,
13,
7,
1020,
13439,
7,
2802,
19,
487,
1251,
16375,
15,
13,
7,
220,
9,
728,
16375,
9,
23588,
815,
25,
367,
13439,
7,
800,
3726,
3726,
76,
31,
22,
79,
4907,
487,
528,
1627,
20,
487,
1251,
16375,
31,
164,
13,
7,
1020,
13439,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I dump data that I want of some SQLite3 tables in SQL format?
===
I know how to select which table I want to dump in SQL format with the shell command:
$ ./sqlite3 test.db '.dump mytable' > test.sql
But this command selects all the data of "mytable"
Can I select the data in my table that I want before dump and how?
In other terms I seek a command like :
$ ./sqlite3 test.db '.dump select name from mytable' > test.sql
Obviously this command does not work :'( | 0 | [
2,
184,
92,
31,
11424,
1054,
30,
31,
259,
16,
109,
4444,
10601,
240,
7484,
19,
4444,
255,
2595,
60,
800,
3726,
3726,
31,
143,
184,
20,
5407,
56,
859,
31,
259,
20,
11424,
19,
4444,
255,
2595,
29,
14,
3593,
1202,
45,
5579,
13,
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... |
Magento: active link state for page/template_links
===
What is the easiest method of adding an active class to links rendered via the `page/template_links` block.
Without putting any logic in the template and without resorting to javascript. I.e. everything should be contained up at the block level.
I 'kind of' of have a solution, in as much as I have can get it working, but the code becomes quite complicated, rewriting both `page/template_links` and `page/template_links_block` as they both render slightly differently which is annoying.
Does anyone know of an easy, elegant solution to this problem?
| 0 | [
2,
4723,
17050,
45,
1348,
3508,
146,
26,
2478,
118,
9577,
6554,
1,
6258,
18,
800,
3726,
3726,
98,
25,
14,
27237,
2109,
16,
4721,
40,
1348,
718,
20,
6271,
10877,
1197,
14,
13,
1,
6486,
118,
9577,
6554,
1,
6258,
18,
1,
1921,
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... |
Data is not showing up in Ajax Auto complete in ASp.net C#
===
I have a text box and i have added AJAX AutocompleteExtender to this.. the code is given below..
From:
<asp:TextBox ID="TextBox2" runat="server" Height="25px" Width="86px"></asp:TextBox><asp:AutoCompleteExtender ID="TextBox2_AutoCompleteExtender" runat="server" TargetControlID="TextBox2" MinimumPrefixLength="1" ServicePath="WebService.asmx"
ServiceMethod="GetCompletionList" UseContextKey="True"></asp:AutoCompleteExtender>
ANd is CS file file i have added
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
string connString = ConfigurationManager.ConnectionStrings["Station"].ToString();
string selectString = "SELECT *from Station";
List<String> CustList = new List<string>(count);
using (SqlConnection sqlConn = new SqlConnection(connString))
{
sqlConn.Open();
using (SqlCommand sqlCmd = new SqlCommand(selectString, sqlConn))
{
SqlDataReader reader = sqlCmd.ExecuteReader();
while (reader.Read())
CustList.Add(reader["DBRT"].ToString());//DBRT is the Column name
}
}
return (CustList.ToArray());
}
When i execute the code and type in that it is not showing anything while i type .What is wrong in my code.. | 0 | [
2,
1054,
25,
52,
3187,
71,
19,
20624,
3108,
1279,
19,
28,
306,
9,
2328,
272,
5910,
800,
3726,
3726,
31,
57,
21,
1854,
1649,
17,
31,
57,
905,
20624,
3108,
15990,
1706,
38,
13630,
20,
48,
9,
9,
14,
1797,
25,
504,
1021,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to define in rails model json method to generate json?
===
I am having this rather long json output in my controller, I wish to move it into the model as it seems to be a good practice. First off, the controller method:
def dashboard
@line_items = LineItem.all
respond_to do |format|
format.json { render json: @line_items.as_json(include: {project: {include: {spec: {methods: [:dashboard_due_at]} },methods:[:company_name, :contacts_names, :owner_names] }}, methods:[:dashboard_created_at, :dashboard_length])}
end
end
How can I move everything starting from as_json into the LineItem model so that I can just do
format.json { render json: @line_items.dashboard_json }
Thank You! | 0 | [
2,
184,
20,
9267,
19,
2240,
18,
1061,
487,
528,
2109,
20,
7920,
487,
528,
60,
800,
3726,
3726,
31,
589,
452,
48,
864,
175,
487,
528,
5196,
19,
51,
9919,
15,
31,
2536,
20,
780,
32,
77,
14,
1061,
28,
32,
2206,
20,
44,
21,
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... |
Char or String -> Unicode value in Scala?
===
So I'm working through a few of the exercises in "Scala for the Impatient" and one of them is:
Write a `for` loop for computing the product of the Unicode codes of all letters in a string. For example, the product of the characters in "Hello" is 9415087488 L.
The next problem is to do the same, but without a `for` loop - it hints that we should check `StringOps` in Scaladoc.
I checked the `RichChar` and `StringOps` section in Scaladoc, and perhaps I'm misreading or looking in the wrong places, but I can't find anything that gets me to match their output. I've thus far tried:
scala> x.foldLeft(1)(_ * _.toInt)
res0: Int = 825152896
scala> x.foldLeft(1)(_ * _.getNumericValue)
res5: Int = 2518992
scala> x.foldLeft(1)(_ * _.intValue())
res6: Int = 825152896
scala> var x = 1
x: Int = 1
scala> for (c <- "Hello") x *= c.toInt
scala> x
res12: Int = 825152896
Which does not match their output.
How do I do this, in both the `for` and non-`for` way?
Thanks! | 0 | [
2,
4892,
54,
3724,
13,
8,
1,
28010,
1923,
19,
25975,
60,
800,
3726,
3726,
86,
31,
22,
79,
638,
120,
21,
310,
16,
14,
12612,
19,
13,
7,
18,
3430,
58,
26,
14,
19764,
7,
17,
53,
16,
105,
25,
45,
2757,
21,
13,
1,
1106,
1,
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... |
Do you need to add activity listener to SystemService only once in Android? or also on resume()?
===
For example inside activity listening for closure of SearchDialog you register listener here in onCreate():
android.app.SearchManager searchManager = (android.app.SearchManager)getSystemService(Context.SEARCH_SERVICE);
if (searchManager != null)
{
searchManager.setOnDismissListener(this);
}
My question is will this remain a listener or do I need to set it as listener again inside say resume()? or one registered always registered. I am not keeping a local reference to SearchManager.
Also why we are at it, is there any reason to check if a manager is null like this or is it safe to assume you will never get a null manager back? | 0 | [
2,
107,
42,
376,
20,
3547,
2358,
21772,
20,
329,
11449,
104,
382,
19,
13005,
60,
54,
67,
27,
13113,
5,
6,
60,
800,
3726,
3726,
26,
823,
572,
2358,
4948,
26,
7790,
16,
2122,
4286,
5567,
42,
2243,
21772,
235,
19,
27,
6037,
1373,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Custom Regristration in SIlverlight Business Application
===
I need to customize the default registration page in Silverlight Business template using my own SQL Server database and table fields. Same for login. How do I do this? Any good idea or documentation is higly appreciated. Thanks. | 0 | [
2,
2936,
5816,
7953,
2777,
38,
5946,
19,
1172,
3130,
508,
3010,
800,
3726,
3726,
31,
376,
20,
5816,
2952,
14,
12838,
8587,
2478,
19,
1172,
3130,
508,
22894,
568,
51,
258,
4444,
255,
8128,
6018,
17,
859,
2861,
9,
205,
26,
6738,
108... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 generics to enforce valid structure at compile time
===
By abusing the type system in c#, I can create code, where the compiler will enforce a rule, to ensure an impossible operation is not performed. In the below code, its specific to matrix multiplication.
Obviously the below is totally impractical/wrong, but are there reasons we cant have something like this in c# in the future, where I could define a type like Matrix<2,2> and have the compiler ensure safety?
Also, does anything like this exist in any mainstream languages? I'd suspect something like this might be possible with metaprogramming in C++??
public abstract class MatrixDimension { }
public class One : MatrixDimension { }
public class Two : MatrixDimension { }
public class Three : MatrixDimension { }
public class Matrix<TRow, TCol>
where TRow : MatrixDimension
where TCol : MatrixDimension
{
// matrix mult. rule. N×M * M×P = N×P
public Matrix<TRow, T_RHSCol> Mult<T_RHSCol>(Matrix<TCol, T_RHSCol> rhs)
where T_RHSCol : MatrixDimension
{ return null;}
}
public class TwoByTwo : Matrix<Two, Two> { }
public void Main()
{
var twoByTwo = new Matrix<Two, Two>();
var oneByTwo = new Matrix<One, Two>();
var twoByThree = new Matrix<Two, Three>();
var threeByTwo = new Matrix<Three, Two>();
var _twoByTwo = new TwoByTwo();
var _2x2 = twoByTwo.Mult(twoByTwo);
var _1x2 = oneByTwo.Mult(twoByTwo);
var _3x3 = twoByThree.Mult(threeByTwo);
var _2x2_ = _twoByTwo.Mult(twoByTwo);
var invalid = twoByThree.Mult(twoByThree); // compile fails, as expected
} | 0 | [
2,
568,
12733,
18,
20,
16525,
7394,
1411,
35,
26561,
85,
800,
3726,
3726,
34,
21,
3822,
68,
14,
1001,
329,
19,
272,
5910,
15,
31,
92,
1600,
1797,
15,
113,
14,
21486,
129,
16525,
21,
1828,
15,
20,
4062,
40,
3992,
1453,
25,
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... |
Filtering backbone collection on multiple attribtues
===
Is this a good approach to filtering a backbone collection on multiple attributes:
filterData: function(params) {
// store original data for clearing filters
this.originalModels = this.models.slice();
for (var key in params) {
var val = params[key];
// if we are dealing with multiple values in an array
// i.e. ['ford','bmw','mazda']
if (typeof val === "object") {
var union = [];
for (var k in val) {
var subval = val[k];
var matched = _.filter(this.models, function(house) {
return house.get(key) == subval;
});
union = union.concat(matched);
}
this.models = union;
} else {
var results = _.filter(this.models, function(house) {
return house.get(key) == val;
});
this.models = results;
}
} // end for
return this.reset(this.models);
},
clearFilters: function() {
return this.reset(this.originalModels);
}
I tested it and it allows me to filter a collection in the following manner:
filterParams = {brand:['ford','bmw','mazda'], color:black}
carCollection.filterData(filterParams);
It seems to work, but I don't know if there is a better way of doing this.
I tested the `Backbone.Collection.where()` method, but it does not work if I want to say `brand: ['bmw','mazda','ford']` | 0 | [
2,
25272,
24036,
1206,
27,
1886,
35,
38,
17980,
2473,
160,
800,
3726,
3726,
25,
48,
21,
254,
2141,
20,
25272,
21,
24036,
1206,
27,
1886,
13422,
45,
11945,
18768,
45,
1990,
5,
6351,
79,
18,
6,
13,
1,
12894,
1718,
501,
1054,
26,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Not able query SteamItems for User Profile ( Me profile)
===
I am writing an social networking app on android ics. I have not found any content uri for user profile stream items like contacts and raw contacts.
I am able to **write** social stream for user profile into streamItems table with its raw_contactd.
But the same way I am trying to query for stream items for user profile, with following two ways and both failed with exception described below, Please note that I am able to query stream items for other contacts this way.
1). profileCursor= getContext().getContentResolver().query(
Profile.CONTENT_RAW_CONTACTS_URI.buildUpon()
.appendPath(rawContactId)
.appendPath(RawContacts.StreamItems.CONTENT_DIRECTORY).build(),
null, null, null, null);
2).query to streamitem uri with rawcontactid = profileRawContactId
Exception as bellow,
V/ContactsProvider(19514): ContactsProvider.query: url=content://com.android.contacts/profile/raw_contacts/9223372034707292179/stream_items, match is -1
E/DatabaseUtils(19514): Writing exception to parcel
E/DatabaseUtils(19514): java.lang.IllegalArgumentException: URI: content://com.android.contacts/profile/raw_contacts/9223372034707292179/stream_items, calling user: com.xyz, calling package:com.xyz
Please help me on this.
Thanks,
Ask
| 0 | [
2,
52,
777,
25597,
3960,
2119,
79,
18,
26,
4155,
5296,
13,
5,
55,
5296,
6,
800,
3726,
3726,
31,
589,
1174,
40,
668,
16230,
4865,
27,
13005,
13,
8354,
9,
31,
57,
52,
216,
186,
2331,
13,
3594,
26,
4155,
5296,
3766,
3755,
101,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make AutomationFactory available for a silverlight application in a sharepoint site?
===
I am trying to create a silverloght application to open visual studio and deploy it as a webpart in sharepoint site. I am using following code:
**dynamic cmd = AutomationFactory.CreateObject("WScript.Shell");
cmd.Run("devenv.exe", 1, true);**
this is working fine in standalone silverlight application, however, when I added this as a webpart in sharepoint site. It gives an error that "This operation is not supported in the current context".
Based on my search, the reason for this may be is that AutomationFactory is not available for this application as it requires elevated permission.
Do I have to provide elevated Permission to sharepoint site, if yes, then how to do it?
| 0 | [
2,
184,
20,
233,
23217,
17455,
93,
904,
26,
21,
1172,
3130,
3010,
19,
21,
1891,
3132,
689,
60,
800,
3726,
3726,
31,
589,
749,
20,
1600,
21,
1172,
5567,
9020,
3010,
20,
368,
3458,
1120,
17,
17617,
32,
28,
21,
2741,
3091,
19,
1891... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iOS 6 Collection View
===
I love those collection views Apple introduced in iOS6 SDK. But my iPad is not getting an upgrade to 6.0, so theres a question. If I set the deployment target to 5.1, will I be able to use those new GUI elements they added in 6.0? Or do I have to code something like a Collection View myself? | 0 | [
2,
13,
7760,
400,
1206,
1418,
800,
3726,
3726,
31,
339,
273,
1206,
4146,
4037,
1277,
19,
13,
7760,
379,
13,
18,
43,
197,
9,
47,
51,
31,
8240,
25,
52,
1017,
40,
9483,
20,
400,
9,
387,
15,
86,
80,
18,
21,
1301,
9,
100,
31,
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... |
Timezone selection in tapestry date picker as per clients Timezone
===
We are using Tapestry at our Presentation Tier.
No we have following situation.
Our application is going to be used by different users from different countries, with different timezones.
In our application we are using Tapestry 5.4 date picker,
so how can we allow date selection as per user's Timezone ? | 0 | [
2,
85,
11661,
3155,
19,
27144,
1231,
2036,
106,
28,
416,
7421,
85,
11661,
800,
3726,
3726,
95,
50,
568,
27144,
35,
318,
6364,
7197,
9,
90,
95,
57,
249,
1858,
9,
318,
3010,
25,
228,
20,
44,
147,
34,
421,
3878,
37,
421,
1166,
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... |
Candle chart and multiple axis linear chart
===
I need show in one chart, a candle chart, and some line chart, but with multiple axes.
I see some samples like:
http://amcharts.com/javascript/candlestick-chart/
http://amcharts.com/javascript/line-chart-with-multiple-value-axes/
But any have this all charts in same graph.
Any alternative?
Thanks | 0 | [
2,
11660,
1795,
17,
1886,
8577,
6745,
1795,
800,
3726,
3726,
31,
376,
298,
19,
53,
1795,
15,
21,
11660,
1795,
15,
17,
109,
293,
1795,
15,
47,
29,
1886,
10398,
18,
9,
31,
196,
109,
7855,
101,
45,
7775,
6903,
765,
5433,
38,
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... |
msv c++ 2010 simplest XML reading of filestream
===
can somebody give me an sample code of reading xml in net c++?
My xml file looks like:
<healing>
<health1>
<value />
<hotkey>-1</hotkey>
<enable>off</enable>
</health1>
</healing> | 0 | [
2,
4235,
710,
272,
20512,
498,
24384,
23504,
1876,
16,
3893,
11260,
800,
3726,
3726,
92,
8861,
590,
55,
40,
5717,
1797,
16,
1876,
23504,
19,
4275,
272,
20512,
60,
51,
23504,
3893,
1879,
101,
45,
13,
1,
438,
192,
68,
1,
13,
1,
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... |
PHP not sending outbound mail
===
I'm using the sendmail package and php, When I try to use the mail function in PHP it returns true but nothing is sent.
php config
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path =/usr/sbin/sendmail -t -i
php file
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
trace(mail('jamie@domain.tld','Testing','test.'));
the mailer log is displaying this
mail() on [/var/www/misc/mail.php:5]: To: jamie@domain.tld -- Headers:
Running sendmail through the CLI as this:
echo -e "To: jamie@domain.tld\nSubject: Test\nTest\n" | sendmail -bm -t -v
Returns "Sender ok", "Recipient ok"
Anyone know of anything which could be causing php to not send the email?
Thanks | 0 | [
2,
13,
26120,
52,
4907,
70,
7410,
4216,
800,
3726,
3726,
31,
22,
79,
568,
14,
2660,
8079,
6030,
17,
13,
26120,
15,
76,
31,
1131,
20,
275,
14,
4216,
1990,
19,
13,
26120,
32,
4815,
1151,
47,
626,
25,
795,
9,
13,
26120,
13,
14093... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GetListItems "request failed with HTTP status 401: Unauthorized"
===
I have an asp.net web application without ssl enabled using lists.asmx on a sharepoint 2010 site with ssl enabled. I have added the lists.asmx as a web reference called "myref".
The code I'm using is below:
**Web.config snippet**
<system.web>
<identity impersonate="true"/>
<authentication mode="Windows"/>
..........
</system.web>
**aspx code**
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.xml" %>
<%@ Import Namespace="myref" %>
<%
Dim xmlDoc As XmlDocument = New System.Xml.XmlDocument()
Dim myQuery As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "Query","")
myQuery.InnerXml = "<Where><Eq><FieldRef Name='_ModerationStatus' /><Value Type='ModStat'>2</Value></Eq></Where>"
Dim myViewFields As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields","")
myViewFields.InnerXml ="<FieldRef Name='_Status' /><FieldRef Name='owshiddenversion' />"
Dim myQueryOptions as XmlNode= xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions","")
myQueryOptions.InnerXml = "<Folder>my list</Folder>"
Dim mylist As new myref.Lists()
mylist.UseDefaultCredentials = true
mylist.PreAuthenticate = True
Dim ndLists As XmlNode = mylist.GetListItems("my list","",myQuery,myViewFields,100,myQueryOptions,"")
Response.Write(ndLists.outerxml)
%>
if I use the above I get the error:
Line 514: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/GetListItems", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 515: public System.Xml.XmlNode GetListItems(string listName, string viewName, System.Xml.XmlNode query, System.Xml.XmlNode viewFields, string rowLimit, System.Xml.XmlNode queryOptions, string webID) {
Line 516: object[] results = this.Invoke("GetListItems", new object[] {
Line 517: listName,
Line 518: viewName,
if I use:
Dim cache As CredentialCache = New CredentialCache()
cache.Add(New Uri(mylist.Url), "Negotiate", New NetworkCredential("userid", "password", "domain"))
instead of
mylist.UseDefaultCredentials = true
it works fine.
The problem is I want to pass through the logged on details of the user accessing the asp.net site and not a hard coded userid.
To complicate things though the same code that doesn't work on a browser on my local machine works fine if I log directly onto the asp.net sites server and access directly via localhost/sitename/pagename.aspx.
Checking the application event log on the web server shows the following extra info that the web page doesn't show:
> Thread account name: NT AUTHORITY\NETWORK SERVICE
> Is impersonating: False
which to me seems to show that its trying to use the network service to connect to the web service and not the logged in user details, except when you are logged onto the server directly.
- The asp.net app has Windows Authentication on (not anonymous)
- windows authentication is required to be passed to the sharepoint web service
- code that doesn't work via local machine works fine when logged directly onto the web server
- Impersonation is enabled in the web.config file (although if you turn it off you get no error, but you also get no items back from sharepoint)
- authentication mode in the web.config file is set at windows
- If I output **WindowsIdentity.GetCurrent.name** and disable the **getlistitems** call I can see that it definately has my details when accessed via the server or my local machine.
Any idea why this is happening?
| 0 | [
2,
164,
5739,
2119,
79,
18,
13,
7,
99,
10351,
1702,
29,
7775,
1782,
13,
20658,
45,
25881,
7,
800,
3726,
3726,
31,
57,
40,
28,
306,
9,
2328,
2741,
3010,
366,
13,
18,
18,
255,
9338,
568,
7227,
9,
472,
79,
396,
27,
21,
1891,
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... |
Can I simplify many $.fn. calls with javascript / jQuery?
===
I am using datatables and the following was recommended to be added to my code:
$.fn.dataTableExt.oStdClasses.sWrapper = 'no-margin last-child';
$.fn.dataTableExt.oStdClasses.sInfo = 'message no-margin';
$.fn.dataTableExt.oStdClasses.sLength = 'float-left';
$.fn.dataTableExt.oStdClasses.sFilter = 'float-right';
$.fn.dataTableExt.oStdClasses.sPaging = 'sub-hover paging_';
$.fn.dataTableExt.oStdClasses.sPagePrevEnabled = 'control-prev';
$.fn.dataTableExt.oStdClasses.sPagePrevDisabled = 'control-prev disabled';
$.fn.dataTableExt.oStdClasses.sPageNextEnabled = 'control-next';
$.fn.dataTableExt.oStdClasses.sPageNextDisabled = 'control-next disabled';
$.fn.dataTableExt.oStdClasses.sPageFirst = 'control-first';
$.fn.dataTableExt.oStdClasses.sPagePrevious = 'control-prev';
$.fn.dataTableExt.oStdClasses.sPageNext = 'control-next';
$.fn.dataTableExt.oStdClasses.sPageLast = 'control-last';
I don't understand this syntax. Can someone explain what it's doing. Also is there a way that I can combine all of these rows. The first 30 columns are all the same. | 0 | [
2,
92,
31,
28257,
151,
5579,
9,
19035,
9,
3029,
29,
8247,
8741,
13,
118,
487,
8190,
93,
60,
800,
3726,
3726,
31,
589,
568,
1054,
5924,
18,
17,
14,
249,
23,
5773,
20,
44,
905,
20,
51,
1797,
45,
5579,
9,
19035,
9,
18768,
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... |
center text in an absolute positioned div
===
I have the following
<div class="label"
style="position: absolute; top: 20px; left: 20px; width: 200px; height: 40px;">
Label Text
</div>
<div class="label"
style="position: absolute; top: 70px; left: 20px; width: 200px; height: 120px;">
Also several lines of
Label Text
may be included
</div>
How can I vertically align the (possibly several lines of) text inside a div.label?
I can add innerHTML if necessary but I can't change the container (class="label"). | 0 | [
2,
459,
1854,
19,
40,
7070,
12125,
13,
12916,
800,
3726,
3726,
31,
57,
14,
249,
13,
1,
12916,
718,
3726,
7,
21018,
7,
1034,
3726,
7,
9339,
45,
7070,
73,
371,
45,
434,
306,
396,
73,
225,
45,
434,
306,
396,
73,
9456,
45,
2327,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Snakeyaml load to JavaBean and if property is not found place in map
===
I would like to know if it is possible to have snakeyaml load a yaml document into a javabean and if it is unable to find a match for the entry in the document as a javabean property it will place it into a generic map within the javabean...
Ex.
public class Person {
private String firstName;
private String lastName;
private Map<String, Object> anythingElse;
//Getters and setters...
}
If I load a document that looks like:
firstName: joe
lastName: smith
age: 30
Since age is not a property in the bean I would like {age, 30} to be added to the anythingElse map.
Possible?
Thanks.
| 0 | [
2,
6358,
8580,
255,
6305,
20,
8247,
863,
210,
17,
100,
1354,
25,
52,
216,
209,
19,
2942,
800,
3726,
3726,
31,
83,
101,
20,
143,
100,
32,
25,
938,
20,
57,
6358,
8580,
255,
6305,
21,
2167,
8184,
4492,
77,
21,
8247,
863,
210,
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... |
Why am I recieving this exception?
===
I have an application that is designed to manage a small company at www.example.com. We also have a demo site that potential clients can go to see how the system works at www.example.com/demo. The example.com site works flawlessly, but when trying to read/write a file that is located at www.example.com/demo/fileHere through the demo system, I keep receiving this error:
[SecurityException: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
I have tried changing the app.config app settings to:
<appSettings file="http://www.example.com/demo/" />
...but this did not fix it.
**Any solutions or help would be greatly appreciated.**
I'm trying to avoid giving the demo site it's own domain.
| 0 | [
2,
483,
589,
31,
13,
15110,
2443,
68,
48,
5391,
60,
800,
3726,
3726,
31,
57,
40,
3010,
30,
25,
1006,
20,
4705,
21,
284,
237,
35,
13,
6483,
9,
29041,
9,
960,
9,
95,
67,
57,
21,
8376,
689,
30,
2222,
7421,
92,
162,
20,
196,
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... |
On MS SQL Server 2008 R2, how to disable the remote access only for the user "sa"?
===
The title says it pretty well: i can access my SQL Server from the internet, and my users are configured with strong password to access only their respective DBs. But i receive 10000+ login attacks by day with the user "sa".
I don't need "sa" remote access, how to disable it, and only it?
Thank you! | 0 | [
2,
27,
4235,
4444,
255,
8128,
570,
761,
135,
15,
184,
20,
1460,
579,
14,
5388,
1381,
104,
26,
14,
4155,
13,
7,
1229,
7,
60,
800,
3726,
3726,
14,
581,
898,
32,
1772,
134,
45,
31,
92,
1381,
51,
4444,
255,
8128,
37,
14,
2620,
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... |
Installing Insight-GDB in Windows using mingw
===
I'm currently trying to install Insight onto a Windows system, but am having some difficulty. I have downloaded Insight from http://sources.redhat.com/insight/downloads.php and unzipped it twice, using 7-ZIP, but I don't understand where the files should go, or what I should do with them?
Thanks in advance! | 1 | [
2,
25429,
9239,
8,
263,
9007,
19,
1936,
568,
12069,
499,
800,
3726,
3726,
31,
22,
79,
871,
749,
20,
16146,
9239,
1204,
21,
1936,
329,
15,
47,
589,
452,
109,
6967,
9,
31,
57,
23887,
9239,
37,
7775,
6903,
12097,
18,
9,
2095,
6775,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Modifying data being used in a thread C#
===
Okay, so my issue is that I have to catch delete and rename events (which) I can do. And modify the data in threads to handle this so that the deleted files are removed and the renamed files have their data changed. This is psuedo-code for the system, just to get an idea of what it looks like. Whenever I delete, the system crashes, so I have been having a hard time figuring out how to go about solving or rewriting the solution. The other portion of this is that I will have multiple managers running at once, but I figure if I can't get one to work... then this is futile.
Main
{
public void Run()
{
List<FileInfo> someData = new List<FileInfo>();
FileWatcher fileWatcher = new FileWatcher(@"C:\USers\user1\Documents");
fileWatcher.NotifyFilter = NotifyFilter.Last
fileWatcher.Deleted += new FileSystemEventHandler(OnDelete);
fileWatcher.EnableRaisingEvents = true;
Manager aManager = new Manager(someData);
Thread aThread = new Thread(new ThreadStart(aManager.ExecuteTask));
aThread.Start();
}
static void OnDelete(object sender, Event e)
{
aManager.Pause();
aManager.RemoveData(e.FileInfo);
aManager.Resume();
}
}
Manager
{
ExecuteTask()
{
while(someData.Count > 0)
{
while (paused) ; // <- This is something I am trying to add
PreformSubTask(someData[0]);
}
}
PreformSubTask()
{
lock (_locker)
{
Worker someWorker = new Worker(someData[0]);
Thread someThread = new Thread(new ThreadStart(worker.ExecuteTask()));
}
worker.Join(someSetOfTime);
lock(_locker)
{
someData.RemoveAt(0);
}
}
Pause()
{
lock (_locker)
{
if (!paused) paused = true;
}
}
Resume
{
lock (_locker)
{
if (paused) paused = false;
}
}
RemoveData(FileInfo toRemove)
{
someData.RemoveAll(sd => sd.Equals(someData));
}
}
| 0 | [
2,
17579,
68,
1054,
142,
147,
19,
21,
9322,
272,
5910,
800,
3726,
3726,
1705,
15,
86,
51,
1513,
25,
30,
31,
57,
20,
2949,
27448,
17,
302,
7259,
963,
13,
5,
2140,
6,
31,
92,
107,
9,
17,
17579,
14,
1054,
19,
20396,
20,
3053,
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... |
How to create a multiline navigation bar similar to the one in WhatsApp in iOS?
===
Does anyone have a clue on how to create a multiline navigation/top bar in iOS? I want something similar to the status line in WhatsApp (the one that displays last seen or the current status information).
Any advice would be appreciated. | 0 | [
2,
184,
20,
1600,
21,
1889,
1143,
8368,
748,
835,
20,
14,
53,
19,
98,
18,
7753,
19,
13,
7760,
60,
800,
3726,
3726,
630,
1276,
57,
21,
8906,
27,
184,
20,
1600,
21,
1889,
1143,
8368,
118,
3880,
748,
19,
13,
7760,
60,
31,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How automatically rename a file with its date ? (backup php)
===
This code create db backup file, but the file name have always the same name so I need to manually rename them. How would you write a code to automatically insert the date and hours of this backup in their title? (eg: backupDB-07.08.12-18h43) or something like that?
My code:
`<?
echo "backup of your database
";
$db="nom_de_ma_base";
$status=system("mysqldump --host=mysql5-1.perso --user=$_POST[login] --password=$_POST[password] $db > ../$db.sql");
echo $status;
echo "Compression du fichier.....
";
system("bzip2 -f /homez/backupDB/$db" . date("d-M-Y", time()) . ".sql");
echo "C'est fini. You can access to your database
\n
";
?>`
| 0 | [
2,
184,
7499,
302,
7259,
21,
3893,
29,
82,
1231,
13,
60,
13,
5,
1958,
576,
13,
26120,
6,
800,
3726,
3726,
48,
1797,
1600,
13,
9007,
10119,
3893,
15,
47,
14,
3893,
204,
57,
550,
14,
205,
204,
86,
31,
376,
20,
23671,
302,
7259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Eventviewer eventid for lock and unlock
===
Any idea what is the event id in event viewer for lock, unlock for a computer in XP, Windows7, Windows vista and windows server 2008?
Thanks! | 0 | [
2,
807,
4725,
106,
807,
1340,
26,
3991,
17,
16497,
800,
3726,
3726,
186,
882,
98,
25,
14,
807,
4924,
19,
807,
16812,
26,
3991,
15,
16497,
26,
21,
1428,
19,
23045,
15,
1936,
465,
15,
1936,
13520,
17,
1936,
8128,
570,
60,
3669,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Position absolute of div inside scrollable div doesn't work properly
===
I have a box which displays the contents of a chosen file using jquery.
The code for the box is
<div class="lightbox">
<div class="lightbox-content"></div>
<div id="close-lightbox">Close</div>
</div>
I want the close-lightbox div to be always at the bottom of the box.So the css for it is
#close-lightbox{color:red;position:absolute;bottom:0;padding-left:30%;}
Div lightbox has overflow:auto.
Now, what happens is that if the lightbox-content is not big and it fits the fixed size of lightbox then there is no scrolling and the close-ligthbox does appear at the bottom as I wanted.
But if the lightbox-content is big and doesn't fit the fixed size of lightbox then there is scrolling but the close-lightbox appears at the bottom of the lightbox BEFORE that scrolls down which means it appears on the middle of the lightbox-content.
Any suggestions how I can fix that? | 0 | [
2,
649,
7070,
16,
13,
12916,
572,
12159,
579,
13,
12916,
1437,
22,
38,
170,
7428,
800,
3726,
3726,
31,
57,
21,
1649,
56,
9412,
14,
8478,
16,
21,
2519,
3893,
568,
487,
8190,
93,
9,
14,
1797,
26,
14,
1649,
25,
13,
1,
12916,
718,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 images filtered by location: external SD or internal memory
===
I've been required to filter images shown in a GridView based on its location.
I'm not sure whether I can apply this filter on MediaStore.Images.Media.DATA field. I'm testing on two different devices, and each one mounts the internal phone memory on a different path, so I think that's not the way.
How can I deal with this? Thanks | 0 | [
2,
164,
3502,
25090,
34,
1474,
45,
4886,
13,
18,
43,
54,
3117,
1912,
800,
3726,
3726,
31,
22,
195,
74,
1390,
20,
11945,
3502,
1721,
19,
21,
7354,
4725,
432,
27,
82,
1474,
9,
31,
22,
79,
52,
562,
1472,
31,
92,
5645,
48,
11945,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Lazy=false for Many2One using HibernateAssembler of ADEP4.6, a bug?
===
Simple case: Many Employee belong to 1 Company using HibernateAssembler.
getCompany in Employee.java is set to EAGER. In EmployeeAssembler, I am sure that the related company is set for each employee.
BUT, at Flex side, employee.company throws ItemPendingError. I tested several times with different tables.
Have anyone encountered the same problem?
Notes:
- lazy = true works so great. Cannot complain
- lazy = false for One2Many is OK
- I think the Flex-Java adapter use the entity annotation to parse the relationship from Java object. but I don't know... I can't find any document for this
P/S: I don't bother asking Adobe support because it takes forever to get a solution from them. Or maybe I should make a call to them.
| 0 | [
2,
16792,
3726,
13192,
870,
26,
151,
135,
849,
568,
4148,
2102,
8820,
13736,
139,
16,
21,
17309,
300,
9,
379,
15,
21,
6256,
60,
800,
3726,
3726,
1935,
610,
45,
151,
7362,
6219,
20,
137,
237,
568,
4148,
2102,
8820,
13736,
139,
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... |
get response uri in windows phone 7 c#
===
I'm new to Windows phone 7 application development. I'm currently developing an app in which I wish to do a HTML request and display the result obtained in Web browser. For example, Suppose I give the below URI
"http://m.imdb.com/find?q="+search_string (where search_string is a variable)
I want to take the result obtained from this and display it on the web browser. I've been searching regarding this for past 1 day... Didn't get any fruitful results. So please redirect me either to a suitable tutorial page or please give a sample code?
Thanks in advance
| 0 | [
2,
164,
1627,
13,
3594,
19,
1936,
1132,
453,
272,
5910,
800,
3726,
3726,
31,
22,
79,
78,
20,
1936,
1132,
453,
3010,
522,
9,
31,
22,
79,
871,
3561,
40,
4865,
19,
56,
31,
2536,
20,
107,
21,
13,
15895,
3772,
17,
3042,
14,
829,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 my TryInvokeMember is not called?
===
My DynamicObject implementation looks like this:
public class DynCallsite: DynamicObject
{
public DynCallsite(ScriptPlayer player)
{
_player = player;
}
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
var ftt = new CallTranslator();
var request = ftt.CreateXmlRequest(binder.Name, args);
var callResult = _player.CallFunction(request);
result = ftt.DeserializeXmlRequest(callResult);
return true;
}
private ScriptPlayer _player;
}
It *used to* work :), I'm not sure what changed. The debugger is not breaking on the TryInvokeMember call and I'm getting a `RuntimeBinderException`. This class is defined in a different assembly than the running one (it is referenced the normal way, by adding references to the project from the same solution).
After performing a call on an instance, I'm getting the following stack trace:
> Microsoft.CSharp.RuntimeBinder.RuntimeBinderController.**SubmitError**(Microsoft.CSharp.RuntimeBinder.Errors.CError
> pError) + 0x23 bytes
> Microsoft.CSharp.RuntimeBinder.Semantics.LangCompiler.**SubmitError**(Microsoft.CSharp.RuntimeBinder.Errors.CParameterizedError
> error) + 0x24 bytes
> Microsoft.CSharp.RuntimeBinder.Errors.ErrorHandling.**ErrorTreeArgs**(Microsoft.CSharp.RuntimeBinder.Errors.ErrorCode
> id, Microsoft.CSharp.RuntimeBinder.Errors.ErrArg[] prgarg) + 0x53
> bytes
> Microsoft.CSharp.RuntimeBinder.Semantics.MemberLookup.**ReportErrors**() +
> 0x6cd bytes
> Microsoft.CSharp.RuntimeBinder.RuntimeBinder.**BindCall**(Microsoft.CSharp.RuntimeBinder.ICSharpInvokeOrInvokeMemberBinder
> payload, Microsoft.CSharp.RuntimeBinder.Semantics.EXPR callingObject,
> Microsoft.CSharp.RuntimeBinder.RuntimeBinder.ArgumentObject[]
> arguments,
> System.Collections.Generic.Dictionary<int,Microsoft.CSharp.RuntimeBinder.Semantics.LocalVariableSymbol>
> dictionary) + 0x206 bytes
> Microsoft.CSharp.RuntimeBinder.RuntimeBinder.**DispatchPayload**(System.Dynamic.DynamicMetaObjectBinder
> payload, Microsoft.CSharp.RuntimeBinder.RuntimeBinder.ArgumentObject[]
> arguments,
> System.Collections.Generic.Dictionary<int,Microsoft.CSharp.RuntimeBinder.Semantics.LocalVariableSymbol>
> dictionary) + 0xb1 bytes
> Microsoft.CSharp.RuntimeBinder.RuntimeBinder.**BindCore**(System.Dynamic.DynamicMetaObjectBinder
> payload,
> System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression>
> parameters, System.Dynamic.DynamicMetaObject[] args, out
> System.Dynamic.DynamicMetaObject deferredBinding) + 0xbc bytes
> Microsoft.CSharp.RuntimeBinder.RuntimeBinder.**Bind**(System.Dynamic.DynamicMetaObjectBinder
> payload,
> System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression>
> parameters, System.Dynamic.DynamicMetaObject[] args, out
> System.Dynamic.DynamicMetaObject deferredBinding) + 0x56 bytes
> Microsoft.CSharp.RuntimeBinder.BinderHelper.**Bind**(System.Dynamic.DynamicMetaObjectBinder
> action, Microsoft.CSharp.RuntimeBinder.RuntimeBinder binder,
> System.Collections.Generic.IEnumerable<System.Dynamic.DynamicMetaObject>
> args,
> System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>
> arginfos, System.Dynamic.DynamicMetaObject onBindingError) + 0x2ca
> bytes
> Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.**FallbackInvokeMember**(System.Dynamic.DynamicMetaObject
> target, System.Dynamic.DynamicMetaObject[] args,
> System.Dynamic.DynamicMetaObject errorSuggestion) + 0x77 bytes
> System.Dynamic.DynamicObject.MetaDynamic.BindInvokeMember.**AnonymousMethod__10**(System.Dynamic.DynamicMetaObject
> e) + 0x1b bytes
> System.Dynamic.DynamicObject.MetaDynamic.**BindInvokeMember**(System.Dynamic.InvokeMemberBinder
> binder, System.Dynamic.DynamicMetaObject[] args) + 0xb8 bytes
> System.Dynamic.InvokeMemberBinder.Bind(System.Dynamic.DynamicMetaObject
> target, System.Dynamic.DynamicMetaObject[] args) + 0x36 bytes
> System.Dynamic.DynamicMetaObjectBinder.Bind(object[] args,
> System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ParameterExpression>
> parameters, System.Linq.Expressions.LabelTarget returnLabel) + 0xea
> bytes
> System.Runtime.CompilerServices.CallSiteBinder.**BindCore**<System.Action<System.Runtime.CompilerServices.CallSite,object,decimal,double>>(System.Runtime.CompilerServices.CallSite<System.Action<System.Runtime.CompilerServices.CallSite,object,decimal,double>>
> site, object[] args) + 0x80 bytes
> System.Dynamic.UpdateDelegates.**UpdateAndExecuteVoid3**<object,decimal,double>(System.Runtime.CompilerServices.CallSite
> site, object arg0, decimal arg1, double arg2) + 0x30e bytes
> MyApp.DynCallsite.**MyMethod**(string str1, decimal number, string str2) Line 96 + 0x17d bytes C#
It pretty much looks like as if I was using a DynamicObject instance instead of my specialized derived class. However, I confirmed that this is not the case, as I can inspect the callsite object in the debugger and it says DynCallsite. What could cause this?
| 0 | [
2,
483,
51,
1131,
108,
2625,
1048,
6990,
25,
52,
227,
60,
800,
3726,
3726,
51,
7782,
23793,
6123,
1879,
101,
48,
45,
317,
718,
13,
21664,
9200,
9097,
45,
7782,
23793,
13,
1,
317,
13,
21664,
9200,
9097,
5,
8741,
14049,
517,
6,
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... |
Aptana Install Error
===
I just downloaded and installed Aptana 3 using the defaults. Upon opening I get an error:
Could not open the editor: Cannot instantiate input element factory org.zend.php.common.welcome.WelcomePageEditorInput for editor id=org.zend.customization.welcome.welcomePageEditor name=Welcome
I dont know what has gone wrong any ideas ?
I'm using Win7.
I thought perhaps there might be conflict as I have Eclipse PDT ont he same machine, but it is closed and installed in a different directory.
Many Thanks for all your advice ! | 0 | [
2,
8442,
9068,
16146,
7019,
800,
3726,
3726,
31,
114,
23887,
17,
4066,
8442,
9068,
203,
568,
14,
12838,
18,
9,
685,
1214,
31,
164,
40,
7019,
45,
110,
52,
368,
14,
1835,
45,
1967,
6322,
15882,
6367,
4520,
3129,
13,
5583,
9,
4257,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Magento upgrade issue from 1.3.0.0 to 1.6.2.0
===
I am running in to an issue and I am not sure how to fix it. I am very new to Magento and PHP so don’t know much about the errors and I usually google it to fix it but can’t seem to find anything for this issue.
I am getting the error below. After upgrading to 1.6.2.0, Magento was using a theme called “modern” but when I changed it to the theme I originally had, I get the error. I have also attached the file “list_sidebar.phtml” from the error seems to be originating.
Any help will be greatly appreciated.
There has been an error processing your request
Invalid method Mage_Catalog_Block_Product_List::myGetProductCollection(Array
(
[0] => 18
)
)
Trace:
#0 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/catalog/product/list_sidebar.phtml(47): Varien_Object->__call('myGetProductCol...', Array)
#1 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/catalog/product/list_sidebar.phtml(47): Mage_Catalog_Block_Product_List->myGetProductCollection('18')
#2 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(241): include('/home/lailides/...')
#3 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#4 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#6 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#8 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#9 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#10 /home/lailides/devmagento/store/app/design/frontend/default/lailides/template/page/3columns.phtml(46): Mage_Core_Block_Abstract->getChildHtml('left')
#11 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(241): include('/home/lailides/...')
#12 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home/lailides/devmagento/store/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#15 /home/lailides/devmagento/store/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#16 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#17 /home/lailides/devmagento/store/app/code/core/Mage/Cms/Helper/Page.php(132): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /home/lailides/devmagento/store/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#19 /home/lailides/devmagento/store/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#20 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_IndexController->indexAction()
#21 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /home/lailides/devmagento/store/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /home/lailides/devmagento/store/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#24 /home/lailides/devmagento/store/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#25 /home/lailides/devmagento/store/index.php(80): Mage::run('', 'store') | 0 | [
2,
4723,
17050,
9483,
1513,
37,
137,
9,
240,
9,
387,
9,
387,
20,
137,
9,
379,
9,
135,
9,
387,
800,
3726,
3726,
31,
589,
946,
19,
20,
40,
1513,
17,
31,
589,
52,
562,
184,
20,
6098,
32,
9,
31,
589,
253,
78,
20,
4723,
17050,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Building spring with gradle
===
I am learnign use git and gradle to build Spring 3.2 on my local system.
I cloned the git repo and used gradle command to start the build like so:
gradlew build
I also have the GRADLE_HOME set up and added GRADLE_HOME/bin to my path variable.
Everytime I start up the build I see a ".gradle" directory being created in my users directory
"C:\Users\Ayusman" and it seems to download gradle binaries.
My questions:
1. Since I already have gradle installed on my system; why does it have to download gradle?
2. Can I force gradle to put my dependencies in a specific directory instead of the users folder (like I can specify in maven).
3. Can gradle be pointed to pull from a local repo instead of internet?
Thanks,
ayusman | 0 | [
2,
353,
1573,
29,
13,
7691,
413,
800,
3726,
3726,
31,
589,
2484,
9693,
275,
13,
10404,
17,
13,
7691,
413,
20,
1895,
1573,
203,
9,
135,
27,
51,
375,
329,
9,
31,
13871,
43,
14,
13,
10404,
302,
1638,
17,
147,
13,
7691,
413,
1202,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
complicated anti-hotlinking
===
I have a quite complicated hotlinking problem. Since I my understanding of .htaccess is kinda terrible, I'll pseudo-code it:
1:Every embedded Image call should redirect to a "do not hotlink" image
2:Every direct hit to an image with let's say: domain.com/folder/IMAGENAME.jpg should redirect to my page containing the image e.g. domain.com/IMAGENAME.jpg
3:search engines should be unaffacted or at least still be able to crawl them for image searches
Thanks for the help :) | 0 | [
2,
8343,
1082,
8,
7010,
6258,
68,
800,
3726,
3726,
31,
57,
21,
1450,
8343,
1047,
6258,
68,
1448,
9,
179,
31,
51,
3260,
16,
13,
9,
9020,
20604,
25,
21096,
5803,
15,
31,
22,
211,
8452,
8,
9375,
32,
45,
6352,
12068,
12138,
1961,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to put click event on multi input of a same class
===
<div class="commentplaceofnewmodernpost">
<input class="inputofnewcommentinnewmodernpost watermarkpostcomment" id="newcommentinput">
<table class="newcommenttableinnewmodernpost">
<tr>
<td class="imgtdofnewcommenttable"><img src=" IMG_ SRC" class="imgofdisplaycomment"></td>
<td style="vertical-align:top;"><textarea class="textreaofnewcommentinnewmodernpost watermarkpostcomment newcommenttextareaexpand" autocomplete="off" title="Click to post comment" id="POST_ID"></textarea>
<input type="button" class="greenbutton postsubmitbutton postnewcomment" value="Comment" title="Post comment" alt="Post comment" style="padding:5px 10px;margin-top:5px;" id="postnewcomment">
<input type="button" class="normalbutton postsubmitbutton" value="Cancel" title="Close to post comment" alt="Close to post comment" style="padding:5px 10px;margin:5px 0 0 15px;" id="cencalnewcomment"></td>
</tr></table></div>
This is my HTML Code. When some body click in input id="newcommentinput" then hide this input and showing the table after it and also focusing after it. AND when click on button id="postnewcomment" then it post the message to another page display result and hide table and showing previuos input.
> REMEMBER: there are multi div in page so write your answer for multi
> selection . | 0 | [
2,
184,
20,
442,
10840,
807,
27,
1889,
6367,
16,
21,
205,
718,
800,
3726,
3726,
13,
1,
12916,
718,
3726,
7,
960,
1130,
5119,
1041,
2681,
11959,
6962,
7,
1,
13,
1,
108,
4881,
718,
3726,
7,
108,
4881,
1041,
2681,
960,
1130,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery Ajax Form beforeSubmit not firing?
===
before my form submit, I want to get all `options` text into my hidden field (which value is posted to the server). The problem is, when I click on the button, nothing happens.
If I manually (via FireBug, copy & paste code into the console) get the `options` values into my hidden field, and then click on the button, the form is submitted properly. Why ?
$('#book-data-form').ajaxForm({
beforeSubmit: function(arr, $form, options) { $('#MyList').val($.map($('#m_list option') ,function(option) {return option.value;}).join('|'));}
});
$('#book-data-form').submit(function() {
$(this).ajaxSubmit();
return false;
});
$('input.save-btn').click(function(){
$('#book-data-form').submit();
}); | 0 | [
2,
487,
8190,
93,
20624,
505,
115,
7563,
5130,
52,
7139,
60,
800,
3726,
3726,
115,
51,
505,
12298,
15,
31,
259,
20,
164,
65,
13,
1,
25458,
4710,
1,
1854,
77,
51,
3689,
575,
13,
5,
2140,
1923,
25,
6054,
20,
14,
8128,
6,
9,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Editing limit.conf in Ubuntu Server
===
I'm trying to run this command so i can install Websphere Portal in Ubuntu:
sudo echo "@users soft nofile 10240" >> /etc/security/limits.conf
But every time I try I get `"Permission Denied"` message. I'm running an Ubuntu Server 12.04 Virtual Box (no graphic interface) and every solution I found on the Web requires the use of Gedit.
Any ideas? | 0 | [
2,
9510,
4496,
9,
14093,
19,
287,
12968,
2473,
8128,
800,
3726,
3726,
31,
22,
79,
749,
20,
485,
48,
1202,
86,
31,
92,
16146,
2741,
14079,
8281,
19,
287,
12968,
2473,
45,
13,
18,
18601,
8117,
13,
7,
1,
16704,
18,
1856,
90,
16877,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Partial working of a J2SE client that calls methods of an EJB in an Enterpr. Project and JPA
===
Currently I have a Java J2SE client that calls two methods in session EJB.
One method (EJB.test()) works while the other EJB.create() doesnt.
The code for which looks like this
Properties props = new Properties();
props.load(new FileInputStream("jndi.properties"));
InitialContext ctx = new InitialContext(props);
BeanRemote EJB = (BeanRemote) ctx.lookup("stateless.pack.BeanRemote");
System.out.println(EJB.test()); //Method works
Testobj t = new Testobj();
t.setName("User");
EJB.create(t); //Doesnt Work . This is the remote version. When tried through the local version using servlet of the Enterprise App it works.
**The EJB implementation is**
@Stateless
public class Bean implements BeanLocal,BeanRemote
{
public @PersistenceContext(unitName="emp") EntityManager manager;
@Override
public String test()
{ return "test123";}
@Override
public Testobj create(Testobj cust)
{ manager.persist(cust);
return cust;
}
.....
.....
}
I get the error
Jul 21, 2012 9:16:23 AM com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator handleFullLogging
WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream
org.omg.CORBA.MARSHAL: WARNING: IOP00810011: Exception from readValue on ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy24.valuehandlerReadException(Unknown Source)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1022)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1123)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2162)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2404)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1224)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:425)
| 0 | [
2,
7284,
638,
16,
21,
487,
135,
870,
6819,
30,
3029,
3195,
16,
40,
13,
10022,
220,
19,
40,
2830,
4899,
9,
669,
17,
487,
1060,
800,
3726,
3726,
871,
31,
57,
21,
8247,
487,
135,
870,
6819,
30,
3029,
81,
3195,
19,
3723,
13,
10022... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iOS and Android links to foursquare lists
===
There's a way to create links which point directly into the native foursquare application: https://developer.foursquare.com/resources/client
But it seems there are no such kind of links for lists. Is it possible to create a link which opens some foursquare list in the app, not in browser? | 0 | [
2,
13,
7760,
17,
13005,
6271,
20,
222,
12300,
7227,
800,
3726,
3726,
80,
22,
18,
21,
161,
20,
1600,
6271,
56,
454,
1703,
77,
14,
1275,
222,
12300,
3010,
45,
7775,
18,
6903,
26051,
106,
9,
4882,
12300,
9,
960,
118,
99,
12097,
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... |
.htaccess Regex HEX match
===
I'm building a system where a user can choose custom colors, hit submit, and view what a template would look like using their color scheme.
An example would be: I allow the user to choose 3 custom colors. Once they hit submit, I would redirect them to http://www.my-site.com/scheme/#000000:#FFFFFF:#666666 which, behind the scenes, would bring them to http://www.my-site.com/index.php?scheme=#000000:#FFFFFF:#666666
I'm looking for a pattern to use in .htaccess so that upon using $_GET['scheme'] in PHP, it would return #000000:#FFFFFF:#666666
Note: I am not opposed to having to remove the "#" character from each color, nor having a different seperation character ":".
Thanks in advance! | 0 | [
2,
13,
9,
9020,
20604,
7953,
1706,
24,
396,
730,
800,
3726,
3726,
31,
22,
79,
353,
21,
329,
113,
21,
4155,
92,
3538,
5816,
5268,
15,
770,
12298,
15,
17,
1418,
98,
21,
22894,
83,
361,
101,
568,
66,
1665,
4276,
9,
40,
823,
83,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resource interpreted as Image but transferred with MIME type image/pjpeg
===
I am getting the following error:
Resource interpreted as Image but transferred with MIME type image/pjpeg
when i open one my pages in Chrome. Image on the page is pulled from my database like this:
<img src="image.aspx?id=100" />
And I am already changing the content type to jpeg from code before writing on page.
Can somebody help me how to fix this?
| 0 | [
2,
6577,
10394,
28,
1961,
47,
2288,
29,
26193,
1001,
1961,
118,
21670,
20427,
800,
3726,
3726,
31,
589,
1017,
14,
249,
7019,
45,
6577,
10394,
28,
1961,
47,
2288,
29,
26193,
1001,
1961,
118,
21670,
20427,
76,
31,
368,
53,
51,
4434,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Balancer and web server in Ruby
===
I was asked to develop a research platform in Ruby to get and analyze social networks data. I'm an absolutely beginner with this language and I'm still reading about it. I don't want to spend too much time so it would be nice if you could say if it is possible to do all of these with Ruby:
![Project diagram][1]
As you can see what I need is a web server where researches could upload its scripts. This scripts must be executed by remote clients that should notify its status to the main server to update the website. The main server have to move the scripts from one client to other if there is problems with the execution.
Is this possible? Any advice?
Thanks in advance.
[1]: http://i.stack.imgur.com/SUwGn.png | 0 | [
2,
4468,
139,
17,
2741,
8128,
19,
10811,
800,
3726,
3726,
31,
23,
411,
20,
2803,
21,
527,
2452,
19,
10811,
20,
164,
17,
16051,
668,
5540,
1054,
9,
31,
22,
79,
40,
6916,
26931,
29,
48,
816,
17,
31,
22,
79,
174,
1876,
88,
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... |
Is everything a list in scheme?
===
Along with the book "Simply Scheme" (Second Edition) i'm watching the "Computer Science 61A - Lectures" on youtube. On the lectures , the tutor uses Stk interpreter, but i'm using chicken scheme interpreter.
In the first lecture he uses the "first" procedure which if it's called like :
(first 'hello)
it returns "h".
On the book of "Simply Scheme" it has an example of how first can be implemented:
(define (first sent)
(car sent))
Which to my testing and understanding works if sent is a list .
I'm trying to understand if it's proper to say that "everything is a list" in scheme.
To be more specific where's the list in *'hello* and if there is one, why it doesn't work in first procedure as it's written in the book?
Also if every implementation is written with "everything is a list" in mind why the same code **does not** work in all scheme implementations?
| 0 | [
2,
25,
796,
21,
968,
19,
4276,
60,
800,
3726,
3726,
303,
29,
14,
360,
13,
7,
18,
8983,
102,
4276,
7,
13,
5,
5007,
1322,
6,
31,
22,
79,
1953,
14,
13,
7,
18448,
762,
6784,
58,
13,
8,
8947,
7,
27,
7330,
9,
27,
14,
8947,
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... |
How i can login user from facebook , twitter and linkden in rails
===
Hi i want to login user from facebook ,twitter and linkden like many other sites in my rails
application.Which gem is suitable for this or devise amniouth can do all this.Any guidelines
,blogs ,or books you will refer.
Any help will be most appreciated.
Thanks | 0 | [
2,
184,
31,
92,
6738,
108,
4155,
37,
9090,
13,
15,
10623,
17,
3508,
817,
19,
2240,
18,
800,
3726,
3726,
4148,
31,
259,
20,
6738,
108,
4155,
37,
9090,
13,
15,
38,
13098,
106,
17,
3508,
817,
101,
151,
89,
3259,
19,
51,
2240,
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... |
knockoutjs foreach not working
===
I have two pieces of code in the same table. One looks like this:
<tr>
<th data-bind="text: tableHeaders()[0].title"></th>
<th data-bind="text: tableHeaders()[1].title"></th>
<th data-bind="text: tableHeaders()[2].title"></th>
</tr>
And the other looks like this:
<tr data-bind="foreach: tableHeaders">
<th data-bind="text: title"></th>
</tr>
The first prints out correctly, while the second does not print out anything. Looking through the source code reveals
<tr data-bind="foreach: tableHeaders"></tr>
I've been unable to replicate my issue in jsfiddle, so it's obviously another issue. Any ideas how else I can troubleshoot? | 0 | [
2,
11676,
728,
18,
26,
14322,
52,
638,
800,
3726,
3726,
31,
57,
81,
2491,
16,
1797,
19,
14,
205,
859,
9,
53,
1879,
101,
48,
45,
13,
1,
6384,
1,
13,
1,
96,
1054,
8,
4772,
43,
3726,
7,
11969,
45,
859,
1743,
445,
5,
6,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SimpleXML or other library Unmarshalling with queries on Android
===
I'm searching for a library that offer me to unmarshall data of XML file.
Actually I'm using Simple (http://simple.sourceforge.net/), that permit me read data very easily. But I've to apply some filters when loading XML like XPath queries, and I've not found anything.
Please tell me if you've any solution (with or without simple XML),
Beef | 0 | [
2,
1935,
396,
8184,
54,
89,
1248,
367,
19988,
1233,
68,
29,
9386,
2829,
27,
13005,
800,
3726,
3726,
31,
22,
79,
5792,
26,
21,
1248,
30,
1994,
55,
20,
367,
19988,
1233,
1054,
16,
23504,
3893,
9,
1121,
31,
22,
79,
568,
1935,
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... |
How to take a picture of in panaroma mode?
===
I want to make an application that allow the user to take a picture of text either from android device Gallery or from android Camera application in a Panorama mode .But i can not find any source or tutorial to do this.How can i do this in my application? how to make an application that take picture from android camera application in a panaroma mode?
Thanks in advance. | 0 | [
2,
184,
20,
247,
21,
2151,
16,
19,
1809,
512,
4955,
3740,
60,
800,
3726,
3726,
31,
259,
20,
233,
40,
3010,
30,
1655,
14,
4155,
20,
247,
21,
2151,
16,
1854,
694,
37,
13005,
3646,
2246,
54,
37,
13005,
3336,
3010,
19,
21,
24805,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
[python]How can I Search for a line then replace a line that comes after
===
I have a text file that i need to replace a line of text
its a very large file so reading the whole file into memory is not the best way for this.
there are tons of these blocks of code here is just two to get an idea.
what i need to do is replace 'const/4 v0, 0x1' with 'const/4 v0, 0x0'
but i need to only replace the one that is in the canCancelFocus()Z method
so i need to search for the line '.method public static canCancelFocus()Z'
then replace the 'const/4 v0, 0x1' with the 'const/4 v0, 0x0' with in that method.
Textfile.text contains:
.method public static CancelFocus()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public static FullSize()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
......
......
Thanks Again | 0 | [
2,
636,
6448,
11570,
500,
1544,
92,
31,
2122,
26,
21,
293,
94,
3934,
21,
293,
30,
1624,
75,
800,
3726,
3726,
31,
57,
21,
1854,
3893,
30,
31,
376,
20,
3934,
21,
293,
16,
1854,
82,
21,
253,
370,
3893,
86,
1876,
14,
979,
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... |
free(): invalid next size (fast) string too long?
===
My code is getting the following error:
free(): invalid next size (fast)
My code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
char *temp_str;
char *pos, *pos2;
char *key = (char*)malloc(20);
char *data = (char*)malloc(20);
const char newline = '\n';
char *unparsed_data = "NEW_DATA_PACKET\n\
Data Set 16-byte Universal Key\n\
Unix Time Stamp (microsecs): 1319639501097446\n\
Frame Number: 0\n\
Version: 3\n\
Platform Yaw Angle (deg): 15.22428\n\
Platform Pitch Angle (deg): 1.78528\n\
Platform Roll Angle (deg): 2.004111\n\
Image Source Source: test\n\
Image Coordinate System: Testing XXXXX\n\
Sample Latitude (deg): 17.306791\n\
Sample Longitude (deg): -60.26209\n\
Sample True Altitude (m): 7.623407\n\
Sample Horizontal FoV (deg): 0.1821277\n\
Sample Vertical FoV (deg): 15.1879\n\
Sample Rel. Azimuth Angle (deg): 291.70295\n\
Sample Rel. Elevation Angle (deg): -5.941163\n\
Sample Rel. Roll Angle (deg): 3.10959\n\
Checksum: 4659\n";
temp_str = (char*)malloc(strlen(unparsed_data));
printf("\nThe original string is: \n%s\n",unparsed_data);
//Ignore the first two lines
pos = strchr(unparsed_data, newline);
strcpy(temp_str, pos+1);
pos = strchr(temp_str, newline);
strcpy(temp_str, pos+1);
printf("STARTING THE PARSER\n\n");
while(strlen(temp_str) > 2)
{
printf("\tstarting loop\n");
//Getting the position of the colon and newline character
pos = strchr(temp_str, ':'); // ':' divides the name from the value
pos2 = strchr(temp_str, '\n'); //end of the line
realloc(key, (pos-temp_str-1)); //allocate enough memory
realloc(data, (pos2-pos)-1);
printf("After realloc \n");
//copying into key and data
strncpy(key, temp_str, (pos-temp_str));
strncpy(data, pos + 2, (pos2-pos)-2);
//Append null terminator
strcpy(key+(pos-temp_str-1)+1, "");
strcpy(data+(pos2-pos)-2, "");
printf("%s = ",key);
printf("%s\n",data);
assign_value(key,data, &gvals);
printf("The value has been assigned\n");
strcpy(temp_str, pos2+1);
printf("Freeing key and data\n\n");
free(key);
free(data);
}
return 0;
}
I am also getting some garbage when it is printing
STARTING THE PARSER
starting loop
After realloc
Unix Time Stamp (m13196395 = 13196395
The value has been assigned
Freeing key and data
*** glibc detected *** ./memory_alloc: free(): invalid next size (fast): 0x098cd008 ***
Finally, when I reduce the length of the lines of the string, the code works perfectly. It works fine with the following string:
char *unparsed_data = "NEW_DATA_PACKET\n\
Data Set 16-byte Universal Key\n\
Time Stamp: 1319639501097446\n\
Frame Number: 0\n\
Version: 3\n\
Yaw Angle: 15.22428\n\
Pitch Angle: 0.78528\n\
Roll Angle: 2.004111\n\
Source: test\n\
Coor System: Test XXXXX\n\
Latitude: 27.306791\n\
Longitude: -60.26209\n\
True Altitude: 7.623407\n\
Hor FoV: 0.1821277\n\
Ver FoV: 15.1879\n\
Azimuth: 291.702954\n\
Elevation: -0.433563\n\
Roll: 0.79659\n\
Checksum: 2659\n"; | 0 | [
2,
551,
5,
6,
45,
16671,
328,
1072,
13,
5,
13088,
6,
3724,
266,
175,
60,
800,
3726,
3726,
51,
1797,
25,
1017,
14,
249,
7019,
45,
551,
5,
6,
45,
16671,
328,
1072,
13,
5,
13088,
6,
51,
1797,
45,
6926,
22640,
13,
1,
384,
6921,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Reference Exception during Fluent NHibernate Configuration from App.Config File
===
Scenario: See Heading.
Description: Please See Screenshot.
![enter image description here][1]
[1]: http://i.stack.imgur.com/c46te.png
Alternative:
Tried using appsettings too
.ConnectionString(c=>c.FromAppSetting(conStr)))
Same error for this one too. | 0 | [
2,
16203,
2801,
5391,
112,
19252,
12109,
15191,
8820,
8091,
37,
4865,
9,
14093,
2816,
3893,
800,
3726,
3726,
12705,
45,
196,
4582,
9,
5318,
45,
2247,
196,
2324,
7868,
9,
13,
187,
2558,
13679,
1961,
5318,
235,
500,
2558,
165,
500,
63... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RESTful API: media data upload and performance
===
I need to create REST API for uploading media data. I need to be able to handle hundreds (thousands) of simultaneous requests. Once data is uploaded to my server, we are going to store it on Amazon S3 and populate some meta data into database. Could you advice in a few questions:
1) Which language is better for these kind of tasks ? I'm familiar with PHP and Perl. Don't want to use Perl as it's loosing its popularity. As for PHP - haven't ever done any similar tasks with it. PHP+APC ? (NOT JAVA PLS)
2) What about server ? (nginx ?)
3) We need to be able to scale easily in case there are a lot of requests
4) Anything else you could point out and advice ?
Thank you | 0 | [
2,
760,
1566,
21,
2159,
45,
941,
1054,
71,
8294,
17,
956,
800,
3726,
3726,
31,
376,
20,
1600,
760,
21,
2159,
26,
71,
16866,
941,
1054,
9,
31,
376,
20,
44,
777,
20,
3053,
4541,
13,
5,
27904,
18,
6,
16,
4861,
1287,
11613,
1291,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript: Saving a function as an instance variable
===
I am working on extracting a set of already working code into a widget. The problem is, I have a constructor which takes a function as one of its parameters and saves it as an instance variable for use later. e.g.:
function myClass(myFunc) {
this.func = myFunc;
}
myClass.prototype.anotherFunc = function() {
this.func();
}
This worked wonderfully when just used on one page with the js file in the same directory. But now that I've extracted the code into a js file in a separate directory, I get this error from Chrome, sourced at the line where the function is saved an instance variable (Firefox gives no error, and I haven't tried IE):
Unsafe JavaScript attempt to access frame with URL data:text/html,chromewebdata from frame with URL http://localhost:8080/execution/bookingadmin.do. Domains, protocols and ports must match.
Again, it works fine if I keep in the js file in the same directory as the page itself, but that's obviously not going to make it a very flexible plugin. Is there any way around this issue, or a better way of dealing with the function I need to have passed? The files are deployed to a local Apache server, all the files are in the same domain, and I'm not using frames of any kind. | 0 | [
2,
8247,
8741,
45,
7599,
21,
1990,
28,
40,
4851,
7612,
800,
3726,
3726,
31,
589,
638,
27,
10962,
68,
21,
309,
16,
614,
638,
1797,
77,
21,
4807,
43,
3060,
9,
14,
1448,
25,
15,
31,
57,
21,
6960,
248,
56,
1384,
21,
1990,
28,
53... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Vertical align top list elements which span 2 lines and fly outs to align with drop menu items
===
Im trying to vertically align my top menu items in the middle, ive tried line-height but because they span 2 lines this will not work. Also when I add a 3rd level to the list the fly out menu is not aligned with the corresponding parent list item. [http://jsfiddle.net/pk8Lm/][1]
HTML:
<ul id="nav">
<li class="rhombusStart"> </li>
<li class="rhombus"><a class="rhlink" href="#"><span>Home</span></a></li>
<li class="rhombus"><a class="rhlink" href="#"><span>Market <br> Update</span></a></li>
<li class="rhombus"><a class="rhlink" href="#"><span>Team Membership</span></a></li>
<li class="rhombus"><a class="rhlink" href="#"><span>FISC Info</span></a>
<ul>
<li><a class="linkchild" href="#">About the FISC</a></li>
<li><a class="linkchild" href="#">International</a></li>
<li><a class="linkchild" href="#"><img class = "arrow" src="Images/arrow.png" alt="►">Advantages of listing</a>
<ul>
<li><a class="linkchild" href="#">Advantages of Listing</a></li>
<li><a class="linkchild" href="#">Products</a></li>
</ul>
</li>
<li><a class="linkchild" href ="#">Links</a></li>
</ul>
</li>
<li class="rhombus"><a class="rhlink" href="#"><span>Contact Us</span></a>
<ul>
<li><a class="linkchild" href="#">About US</a></li>
<li><a class="linkchild" href="#">Details</a></li>
<li><a class="linkchild" href="#">Location</a></li>
</ul>
</li>
<li class="rhombusEnd"> </li>
</ul>
CSS:
/*******************************************
Menu Styling
*******************************************/
#menu {
margin: 0 auto;
padding-left: 2%;
width: 640px;
height: 3.5em;
position: relative;
top: 0;
background-color: rgb(255,194,14);
border: 1px solid rgb(140,51,61);
}
#nav {
margin:0;
padding:0;
list-style-type:none;
list-style-position:outside;
position:relative;
height:3.5em;
background-color: rgb(255,194,14);
display: table;
}
#nav ul {
margin:0;
padding:0;
list-style-type:none;
list-style-position:outside;
position:relative;
background-color: rgb(255,194,14);
}
#nav a.linkchild:link,
#nav a.linkchild:active,
#nav a.linkchild:visited {
display:block;
padding:0px 5px;
text-decoration:none;
background: #b95d73; /* Old browsers */
background: -moz-linear-gradient(top, #b95d73 0%, #970e2e 0%, #9c1a38 0%, #910022 52%, #b95d73 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b95d73), color-stop(0%,#970e2e), color-stop(0%,#9c1a38), color-stop(52%,#910022), color-stop(100%,#b95d73)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* IE10+ */
background: linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b95d73', endColorstr='#b95d73',GradientType=0 ); /* IE6-9 */
color: white;
}
#nav a.rhlink:link, #nav a.rhlink:active, #nav a.rhlink:visited {
display: block;
padding: 0px 5px;
text-decoration: none;
color: inherit;
}
#nav li.rhombus:hover {
background: -webkit-gradient(linear, center top, center bottom, from(#B95D73), color-stop(25%, #9C1A38), color-stop(50%, #970E2E), color-stop(75%, #910022), to(#B95D73));
background: #b95d73; /* Old browsers */
background: -moz-linear-gradient(top, #b95d73 0%, #9c1a38 25%, #970e2e 50%, #910022 75%, #b95d73 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b95d73), color-stop(25%,#9c1a38), color-stop(50%,#970e2e), color-stop(75%,#910022), color-stop(100%,#b95d73)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* IE10+ */
background: linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b95d73', endColorstr='#b95d73',GradientType=0 ); /* IE6-9 */
color: white;
text-decoration: none;
}
#nav a.linkchild:hover {
background: rgb(118,0,18);
color: white;
}
#nav > li {
float:left;
position:relative;
}
#nav > li.rhombus {
float:left;
position: relative;
-webkit-transform-origin:0 0;
-moz-transform-origin:0 0;
-ms-transform-origin:0 0;
-o-transform-origin:0 0;
transform-origin:0 0;
-webkit-transform:skew(35deg);
-moz-transform:skew(35deg);
-ms-transform:skew(35deg);
-o-transform:skew(35deg);
transform:skew(35deg);
border-right: 1px solid rgb(239,89,24);
border-left: 1px solid rgb(255,244,80);
background-color: rgb(255,194,14);
font-family: Georgia;
color: rgb(131,0,26);
width: 8em;
text-align: center;
height: 3.5em;
}
#nav > li.rhombusStart {
float:left;
position: relative;
-webkit-transform-origin:0 0;
-moz-transform-origin:0 0;
-ms-transform-origin:0 0;
-o-transform-origin:0 0;
transform-origin:0 0;
-webkit-transform:skew(35deg);
-moz-transform:skew(35deg);
-ms-transform:skew(35deg);
-o-transform:skew(35deg);
transform:skew(35deg);
border-right: 1px solid rgb(239,89,24);
background-color: rgb(255,194,14);
width: 1em;
height: 3.5em;
}
#nav > li.rhombusEnd {
float: left;
position: relative;
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-ms-transform-origin: 0 0;
-o-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: skew(35deg);
-moz-transform: skew(35deg);
-ms-transform: skew(35deg);
-o-transform: skew(35deg);
transform: skew(35deg);
border-left: 1px solid rgb(255,244,80);
background-color: rgb(255,194,14);
width: 1em;
height: 3.5em;
}
li.rhombus > a span {
-webkit-transform:skew(-35deg);
-moz-transform:skew(-35deg);
-ms-transform:skew(-35deg);
-o-transform:skew(-35deg);
transform:skew(-35deg);
text-decoration: none;
vertical-align: middle;
display: table-cell;
}
li.rhombus > ul {
-webkit-transform-origin:0 0;
-moz-transform-origin:0 0;
-ms-transform-origin:0 0;
-o-transform-origin:0 0;
transform-origin:0 0;
-webkit-transform:skew(-35deg);
-moz-transform:translate(0,1px) skew(-35deg);
-ms-transform:skew(-35deg);
-o-transform:skew(-35deg);
transform:skew(-35deg);
}
#nav ul {
position:absolute;
top:3.5em;
left:0;
width:15em;
display:none;
}
#nav li ul a {
width:15em;
float:left;
border-bottom: 1px, solid, rgb(145,0,34);
border-top: 1px, solid, rgb(178,77,101);
display: block;
line-height: 2em;
text-align: left;
display: table-cell;
}
#nav ul ul {
top:auto;
}
#nav li ul ul {
left:15em;
margin:0px 0 0 10px;
}
#nav li:hover ul ul,
#nav li:hover ul ul ul,
#nav li:hover ul ul ul ul {
display:none;
}
#nav li:hover ul,
#nav li li:hover ul,
#nav li li li:hover ul,
#nav li li li li:hover ul {
display:block;
}
img.arrow
{
float: right;
vertical-align: middle;
}
[1]: http://jsfiddle.net/pk8Lm/ | 0 | [
2,
7035,
23389,
371,
968,
2065,
56,
6289,
172,
1560,
17,
2855,
70,
18,
20,
23389,
29,
2804,
11379,
3755,
800,
3726,
3726,
797,
749,
20,
23300,
23389,
51,
371,
11379,
3755,
19,
14,
772,
15,
5568,
794,
293,
8,
252,
7748,
47,
185,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automatically setting y-axis limits for bar graph using matplotlib
===
Here's an example of graphing large values.
import matplotlib.pyplot as plt
x = [1,2,3,4,5]
y = [1000, 1002, 1001, 1003, 1005]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.bar(x,y)
plt.show()
The y-axis starts at 0, so the bars all look equal. I know you can use plt.ylim to manually set the limits, but is there a way for matplotlib to automatically (and smartly) set the limits to reasonable values (like 998-1008)?
| 0 | [
2,
7499,
2697,
13,
93,
8,
19676,
5887,
26,
748,
7210,
568,
4277,
13221,
38,
8326,
800,
3726,
3726,
235,
22,
18,
40,
823,
16,
7210,
68,
370,
4070,
9,
9010,
4277,
13221,
38,
8326,
9,
6448,
13221,
38,
28,
12443,
38,
993,
800,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to reduce listview item height
===
I have an expandable listview. The rows consist of a textview and a custom checkbox. The size of the checkbox depends on the textview's text size. There are only two available sizes. When the large checkbox is shown, the difference between the rows is small. When the small checkbox is shown, it looks big. How can I reduce the row height between the rows?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/childlayout"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp" >
<TextView
android:id="@+id/child_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:textColor="#000000"/>
</LinearLayout>
<CheckBox
android:id="@+id/multiple_checkbox"
android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:checked="true"
android:layout_marginRight="10dp"
android:button="@drawable/productlists_custom_cb"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
</LinearLayout>
If I set the layout_height of the relative layout to 30dp, the row height will be smaller. But this shouldn't be the way.
This is the .xml for setting the smaller checkbox on and off:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/cbon348" />
<item android:state_checked="false" android:drawable="@drawable/cboff348" />
</selector>
One could think the canvas for the image is much bigger than the image itself, but I assure you, it isn't.
![enter image description here][1]
[1]: http://i.stack.imgur.com/JUYhm.png | 0 | [
2,
184,
20,
4136,
968,
4725,
9101,
2947,
800,
3726,
3726,
31,
57,
40,
6073,
579,
968,
4725,
9,
14,
11295,
7929,
16,
21,
1854,
4725,
17,
21,
5816,
2631,
5309,
9,
14,
1072,
16,
14,
2631,
5309,
9597,
27,
14,
1854,
4725,
22,
18,
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... |
ANTLR rule rewrite to nested tree
===
I'm trying to make a rule that will rewrite into a nested tree (similar to a binary tree).
For example:
a + b + c + d;
Would parse to a tree like:
a
+
b
+
c
+
d
Or typed another way: ( ( (a + b) + c) + d). Basically each root node would have three children (LHS '+' RHS) where LHS could be more nested nodes.
I attempted some things like:
rule: lhs '+' ID;
lhs: ID | rule;
and
rule
: rule '+' ID
| ID '+' ID;
(with some tree rewrites) but they all gave me an error about it being left-recursive. I'm not sure how to solve this without some type of recursion.
Suggestions? | 0 | [
2,
40,
38,
12988,
1828,
27891,
20,
5618,
69,
1541,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
21,
1828,
30,
129,
27891,
77,
21,
5618,
69,
1541,
13,
5,
19107,
20,
21,
14171,
1541,
6,
9,
26,
823,
45,
21,
2754,
334,
2754,
272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 animate data visualization in Processing?
===
I'm trying to create an animated data visualization and currently only know how to do the following "static" code, which puts a string of dots in a straight line. How do I make them jump up and down? Also, if there is anyone in Dublin, Ireland, who wouldn't mind giving a few tutorial sessions to a couple of college students working on a data visualization project in Processing, we have a small budget to compensate you for your time. Thanks very much!
For now, here's the code I was talking about...
SimpleSpreadsheetManager sm;
String sUrl = "t6mq_WLV5c5uj6mUNSryBIA";
String googleUser = "USERNAME";
String googlePass = "PASSWORD";
void setup() {
//This code happens once, right when our sketch is launched
size(800,800);
background(0);
smooth();
//Ask for the list of numbers
int[] numbers = getNumbers();
fill(255,40);
noStroke();
for (int i = 0; i < numbers.length; i++) {
ellipse(numbers[i] * 8, width/2, 8,8);
};
};
void draw() {
//This code happens once every frame.
}; | 0 | [
2,
184,
20,
14487,
591,
1054,
28873,
19,
5511,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
40,
5784,
1054,
28873,
17,
871,
104,
143,
184,
20,
107,
14,
249,
13,
7,
18077,
7,
1797,
15,
56,
11179,
21,
3724,
16,
17900,
19,
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... |
Won't Apple reject app?
===
I've got webproject, with two "modes" - first is some kind of drawing, second - showing 3D model in WebGL got from the picture you have drawn.
I want to port it to iOS for some reasons. I've decided not to rewrite first page (it is html page with some js scripts in there), but port WebGL (as I know Apple don't allow it) into some native OpenGL ES code.
Won't Apple reject this app? | 0 | [
2,
230,
22,
38,
4037,
12170,
4865,
60,
800,
3726,
3726,
31,
22,
195,
330,
2741,
21011,
15,
29,
81,
13,
7,
15570,
18,
7,
13,
8,
64,
25,
109,
825,
16,
3533,
15,
153,
13,
8,
3187,
203,
43,
1061,
19,
2741,
8430,
330,
37,
14,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Check for either ADO.NET / OLEDB Connection presence
===
I am developing a custom SSIS component for use across my entire company. Right now the code (which is from [here][1]) accepts only ADO.NET connection type.
I would like to support OLEDB type as well and would like to change my code accordingly. The piece of code that checks for valid ADO.NET connectivity is:
SqlConnection connection = connections[_connectionName].AcquireConnection(null) as SqlConnection;
if (connection == null)
{
componentEvents.FireError(0, METHOD_NAME, "The connection is not a valid ADO.NET connection", "", -1);
return DTSExecResult.Failure;
}
This would just check for a valid ADO.NET connection. How would I change this to check for OLEDB connection ALSO. So for example, if the connection type is OLEDB, it should be accepted, if its neither of those, it should fail.
I am not much of a C# person and hence I am looking for any help that I can get on this. Thanks for any help.
[1]: http://www.thejoyofcode.com/SSIS_Custom_Logging_Task_for_Event_Handlers.aspx
| 0 | [
2,
2631,
26,
694,
21,
537,
9,
2328,
13,
118,
12116,
9007,
2760,
1970,
800,
3726,
3726,
31,
589,
3561,
21,
5816,
13,
18,
4557,
5912,
26,
275,
464,
51,
1078,
237,
9,
193,
130,
14,
1797,
13,
5,
2140,
25,
37,
636,
6836,
500,
2558,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Remove all other list items except the one that is clicked using jQuery
===
I have list of this kind
<ul>
<li><div class="pname">Name1</div><div class="pid">ID1</div>...</li>
<li><div class="pname">Name2</div><div class="pid">ID2</div>...</li>
<li><div class="pname">Name3</div><div class="pid">ID3</div>...</li>
...
</ul>
If I click on any of the list item, rest all other list items should be removed. Can anyone suggest how I could do this?
| 0 | [
2,
4681,
65,
89,
968,
3755,
1613,
14,
53,
30,
25,
15802,
568,
487,
8190,
93,
800,
3726,
3726,
31,
57,
968,
16,
48,
825,
13,
1,
1287,
1,
13,
1,
1210,
1,
12916,
718,
3726,
7,
306,
7259,
7,
1,
7259,
165,
1,
118,
12916,
1,
129... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TortoiseSVN forces me to close each commit dialog with OK button?
===
This seems to be a trivial question, but this issue really, really drives me crazy.
I'm closing EVERY window in my Windows using "red x" button. I'm rather quick user of computers, typing around 300 characters per minute and doing similar number of clicks. Having to remember that I have to do a special exception for TortoiseSVN makes every my day really bad.
Why TortoiseSVN authors forces me to use "OK" button? What is the damn logic behind writing special code to block user from using "x" button to close each commit results window? Anyone knows the answers?
And the most important: How can I change it? How can I turn my favorite SVN client back to normal and be able to close each of its window with "x" button, as I do in ALL Windows applications? | 0 | [
2,
483,
25691,
18,
16578,
879,
55,
20,
543,
206,
9686,
28223,
29,
5854,
5167,
60,
800,
3726,
3726,
48,
2206,
20,
44,
21,
13,
19712,
1301,
15,
47,
48,
1513,
510,
15,
510,
10396,
55,
3328,
9,
31,
22,
79,
4239,
352,
1463,
19,
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... |
adding nodes under node in WPF treeview
===
In Visual C++/MFC we used to add a node to a tree and then by referencing the node we could add children under parent node. However, in WPF there is no such a thing as I see. I'm confused how I can add child/children to a node?
any help will be appreciated. | 0 | [
2,
4721,
16272,
131,
15421,
19,
619,
7721,
1541,
4725,
800,
3726,
3726,
19,
3458,
272,
20512,
118,
79,
7061,
95,
147,
20,
3547,
21,
15421,
20,
21,
1541,
17,
94,
34,
13,
29254,
14,
15421,
95,
110,
3547,
391,
131,
4766,
15421,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to display comment thread hierarchy in JavaScript?
===
I have a set of comments in JSON.
This JSON is loaded into a browser.
I wish to display the comments as a threaded comment hierarchy, with the most recent comment first.
I've done lots of searching to find the right algorithm. Surely this is a solved problem but I can't find it.
To explain the JSON fields:
- createdtime = epochseconds (the time the comment was created)
- documentid = the documentid of this comment
- parentdocumentid = the documentid of the comment that this comment is a reply to
- topleveldocumentid = documentid of the blog post that the comments
belong to
The question is, what is an effective way to display these comments in HTML as a hierarchy using Javascript? (Jquery code is fine)
[
{
"commenttext": "This is a comment",
"parentdocumentid": "c88cbdd6d05811e19fe912314301329d",
"doctype": "comment",
"topleveldocumentid": "c88cbdd6d05811e19fe912314301329d",
"createdtime": 1343222535,
"documentid": "c0341e96d65b11e1a91d12314301329d"
},
{
"commenttext": "This is a another comment",
"parentdocumentid": "c88cbdd6d05811e19fe912314301329d",
"doctype": "comment",
"topleveldocumentid": "c88cbdd6d05811e19fe912314301329d",
"createdtime": 1343222639,
"documentid": "fe5209e0d65b11e1a91d12314301329d"
},
{
"commenttext": "Yet another comment",
"parentdocumentid": "c88cbdd6d05811e19fe912314301329d",
"doctype": "comment",
"topleveldocumentid": "c88cbdd6d05811e19fe912314301329d",
"createdtime": 1343297245,
"documentid": "b2d9f0f0d70911e1903d12314301329d"
},
{
"commenttext": "I have a comment",
"parentdocumentid": "c88cbdd6d05811e19fe912314301329d",
"doctype": "comment",
"topleveldocumentid": "c88cbdd6d05811e19fe912314301329d",
"createdtime": 1343364418,
"documentid": "1971ca6cd7a611e180fa12314301329d"
}
] | 0 | [
2,
184,
20,
3042,
6484,
9322,
14417,
19,
8247,
8741,
60,
800,
3726,
3726,
31,
57,
21,
309,
16,
7534,
19,
487,
528,
9,
48,
487,
528,
25,
8572,
77,
21,
16495,
9,
31,
2536,
20,
3042,
14,
7534,
28,
21,
9322,
69,
6484,
14417,
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... |
Handling large amounts of 2 dimensional data
===
I hope you can help me with this one.
I am currently redesigning an application (.NET) and now I have come to the part were I
have to overthink the data storage.
Basically every 10 seconds or so (can vary, but this is the fastest) I get a new dataset containing an array of float values and a timeStamp. (These arrays can be pretty large, so I have to deal with lots of data [Can go up to hundreds of mb or even gb]) The length of a array is fixed per procedure (lets call it run) but will vary during different runs. I will only look at one run at a time.
So my question is:
How do I save this data and how do I handle it in my application?
Especially if I want to read out a dataset with a specific timestamp,
a list of float values from a given index
and a 2d list of float values given an index range and a timestamp range.
| 0 | [
2,
7988,
370,
8545,
16,
172,
13,
7865,
1054,
800,
3726,
3726,
31,
1376,
42,
92,
448,
55,
29,
48,
53,
9,
31,
589,
871,
23903,
68,
40,
3010,
13,
5,
9,
2328,
6,
17,
130,
31,
57,
340,
20,
14,
141,
46,
31,
57,
20,
84,
10550,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 isn't Color Image Displaying?
===
I am using the Kinect SDK and trying to add a color frame. I am using the code:
byte[] pixels = new byte[sensor.ColorStream.FramePixelDataLength];
WriteableBitmap image = new WriteableBitmap(sensor.ColorStream.FrameWidth, sensor.ColorStream.FrameHeight, 96, 96,
PixelFormats.Bgra32, null);
video.Source = image;
colorFrame.CopyPixelDataTo(pixels);
image.WritePixels(new Int32Rect(0, 0, image.PixelWidth, image.PixelHeight), pixels, image.PixelWidth * sizeof(int), 0);
But the image isn't displaying. Thanks in advance. _Note: I am trying to avoid using Coding4Fun_ | 0 | [
2,
483,
2532,
22,
38,
1665,
1961,
17418,
60,
800,
3726,
3726,
31,
589,
568,
14,
6399,
11557,
13,
18,
43,
197,
17,
749,
20,
3547,
21,
1665,
3523,
9,
31,
589,
568,
14,
1797,
45,
34,
591,
2558,
500,
18146,
18,
800,
78,
34,
591,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an .add*() plug-in function using jQuery
===
Okay, so I have discovered how to write jQuery plug-ins and I think this will tidy up my code a lot. I've been looking at a lot of tutorials which just adds style to the set of matched elements passed on the plug-in function.
...but I want to add new elements to the when using my function. Say that I want to do this:
$children
.addCousins()
.addClass("x")
.end()
.addClass("y");
So I've written this function, `.addCousins()`. What it does, nobody knows, but know that it works in theory. I only need to wrap my head around how to add more elements (if there are any) when `.addCousins()` is called. For each element in `$children` there can be zero or more "cousins", which should be added when doing the `.each()` in the plug-in function.
Here's what I have so far:
(function($){
$.fn.extend({
addCousins: function () {
return this.each(
function () {
var index = $(this)
.prevAll("td.radio")
.andSelf()
.length - 1;
$(this)
.prev("td[rowspan=2]")
.parent()
.next()
.children("td.radio")
.eq(index); // here is the "cousin" which should be added to the selection
}
);
}
});
})(jQuery);
I've been trying various solutions all day, but no progress yet. The selection of the cousin (the implementation of the selection you need not worry about) is done in the inner anonymous function, but, yeah, I don't really know how to go from here.
I hope I've been more or less clear about what I want. | 0 | [
2,
1174,
40,
13,
9,
14854,
2483,
5,
6,
10922,
8,
108,
1990,
568,
487,
8190,
93,
800,
3726,
3726,
1705,
15,
86,
31,
57,
1848,
184,
20,
2757,
487,
8190,
93,
10922,
8,
108,
18,
17,
31,
277,
48,
129,
28028,
71,
51,
1797,
21,
865... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Call the jvectormap's addMarker function
===
I'm using the jVectorMap plugin and I'd like to trigger a marker by another function.
How can I call just that one line "map.addMarker( index, markers[index], [values1[index], values2[index]] );" ?
$("#target").click(function() {
**Here should that addMarker function included**
});
That's the part of the code where the markers are triggerd by a checkbox:
$('.list-markers :checkbox').change(function(){
var index = $(this).closest('li').attr('data-marker-index');
if ($(this).prop('checked')) {
map.addMarker( index, markers[index], [values1[index], values2[index]] );
} else {
map.removeMarkers( [index] );
}
});
Thanks a lot | 0 | [
2,
645,
14,
487,
28033,
15022,
22,
18,
3547,
4527,
106,
1990,
800,
3726,
3726,
31,
22,
79,
568,
14,
487,
28033,
15022,
10922,
108,
17,
31,
22,
43,
101,
20,
7286,
21,
13289,
34,
226,
1990,
9,
184,
92,
31,
645,
114,
30,
53,
293,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Different ways of getting a string resource
===
What is the difference between getResources().getString(...) and getString() when called from my activity? I read that getText(...) returns stylized text, but when should I use getResources() as opposed to directly calling getString()? | 0 | [
2,
421,
2847,
16,
1017,
21,
3724,
6577,
800,
3726,
3726,
98,
25,
14,
2841,
128,
164,
99,
12097,
18,
5,
6,
9,
3060,
11130,
5,
9,
9,
9,
6,
17,
164,
11130,
5,
6,
76,
227,
37,
51,
2358,
60,
31,
1302,
30,
164,
11969,
5,
9,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iOS ending Coco2D game within Viewcontroller correctly and restart issue
===
The coco2d game which is UIView is launched from viewcontroller as such
coco2dgame=[[coco2d_view alloc] initWithFrame:CGRectMake(0,0,320,480)];
[self.view addSubview:coco2dgame];
when it ends
[coco2dgame.director end];
[coco2dgame removeFromSuperview];
coco2dgame=nil;
when I want to relaunch I call again
coco2dgame=[[coco2d_view alloc] initWithFrame:CGRectMake(0,0,320,480)];
[self.view addSubview:coco2dgame];
but I am getting errors
OpenGL error 0x0502 in -[CCSprite draw] 532
OpenGL error 0x0502 in -[CCSprite draw] 532
| 0 | [
2,
13,
7760,
3119,
22470,
135,
43,
250,
363,
1418,
12898,
1252,
12044,
17,
22767,
1513,
800,
3726,
3726,
14,
22470,
135,
43,
250,
56,
25,
13,
5661,
4725,
25,
1601,
37,
1418,
12898,
1252,
28,
145,
22470,
135,
43,
5128,
3726,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GZip for PHP on IIS
===
If GZip is enabled in IIS is it only going to improve performance for ASP pages or can it be setup to compress PHP pages as well? | 0 | [
2,
489,
2553,
306,
26,
13,
26120,
27,
595,
18,
800,
3726,
3726,
100,
489,
2553,
306,
25,
9338,
19,
595,
18,
25,
32,
104,
228,
20,
3545,
956,
26,
28,
306,
4434,
54,
92,
32,
44,
18161,
20,
26060,
13,
26120,
4434,
28,
134,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Are sessions stored in browser only?
===
My site is under a brute force attack in which the attackers are attempting to gain access to user accounts. The bots do not have a user agent. I have a system in place that blocks a person from signing in if they exceed 3 attempts per account in under 10 minutes.
I also made it check for a user agent, and if not, exit.
My question is: Are sessions only stored in browsers? What I'm thinking is that they are using a script executed via command line.
I've implemented this as well:
if(!isset($_COOKIE[ini_get('session.name')])) {
header("HTTP/1.0 404 Not Found");
exit;
}
Is there anything else I can do to prevent these attacks? | 0 | [
2,
50,
5763,
8214,
19,
16495,
104,
60,
800,
3726,
3726,
51,
689,
25,
131,
21,
27066,
558,
991,
19,
56,
14,
19550,
50,
6314,
20,
3288,
1381,
20,
4155,
5310,
9,
14,
11012,
18,
107,
52,
57,
21,
4155,
2267,
9,
31,
57,
21,
329,
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... |
Android save layout state
===
I have a question about saving the state of a layout file in Android. For example: I have a button and when I click the button an image appears. But when I rotate my Android device the image is disappeared. So how do I save the state (visible/invisible) of the image in the layout? I know I have to put this in the Android manifest at the activity:
android:configChanges="keyboardHidden|orientation"
Thanks in advance.
| 0 | [
2,
13005,
2079,
9106,
146,
800,
3726,
3726,
31,
57,
21,
1301,
88,
7599,
14,
146,
16,
21,
9106,
3893,
19,
13005,
9,
26,
823,
45,
31,
57,
21,
5167,
17,
76,
31,
10840,
14,
5167,
40,
1961,
1780,
9,
47,
76,
31,
21448,
51,
13005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to detect button press history on Android
===
I want to know how to find out which (programmed in) button was last pressed, and then act accordingly. Would I have to have an array of some kind? | 0 | [
2,
184,
20,
9092,
5167,
901,
447,
27,
13005,
800,
3726,
3726,
31,
259,
20,
143,
184,
20,
477,
70,
56,
13,
5,
19746,
4688,
19,
6,
5167,
23,
236,
2931,
15,
17,
94,
601,
12932,
9,
83,
31,
57,
20,
57,
40,
7718,
16,
109,
825,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
error when install the setup file i make for s# sql program
===
i am c# beginner and i write a C# program that have SQL connection with entity framework.
when i create a setup file for it in visual studio 2010 i insert all af the files in debug folder in Application folder.
when i run the program, it runs good but when i want to change database like add, remove or delete the database i get this error:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Failed to update database "C:\PROGRAM FILES (X86)\DEFAULT COMPANY NAME\SETUP\DATABASE.MDF" because the database is read-only.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
--- End of inner exception stack trace ---
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Objects.ObjectContext.SaveChanges()
at sasan_lottery.Forms.FormPersons.buttonSave_Click(Object sender, EventArgs e) in C:\Users\Arman\Desktop\sasan_lottery\sasan_lottery\Forms\FormPersons.cs:line 110
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
how can i fix this? | 0 | [
2,
7019,
76,
16146,
14,
18161,
3893,
31,
233,
26,
13,
18,
5910,
4444,
255,
625,
800,
3726,
3726,
31,
589,
272,
5910,
26931,
17,
31,
2757,
21,
272,
5910,
625,
30,
57,
4444,
255,
2760,
29,
9252,
6596,
9,
76,
31,
1600,
21,
18161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determining the size of a UITextView within a UITableView before it's created
===
So I'm creating a custom UITableViewCell that includes a UIImageView, 2 UILabels and a UITextView. The size of the cell changes depending on the amount of text to be input into the textView using `[NSString sizeWithFont: constrainedToSize: lineBreakMode:]` but the issue I'm having is trying to set the width to be checked dynamically. I've hacked it to work by manually creating a CGSize with what I know to be the dimensions of the CustomCell, but I'd like to know the proper way to access this information. Here's the code I'm using...
// create a dictionary of the JSON data received
NSDictionary *dict = [rows objectAtIndex:indexPath.row];
// retrieve the text(tweet)
NSString *tweet = [dict objectForKey:@"text"];
// the following line returns a size and height of 0, tried both frame and contentSize
CGSize frame = CGSizeMake(theCustomCell.messageLabel.frame.size.width, theCustomCell.messageLabel.contentSize.height);
// the CGSize variable I manually created to get the desired result
CGSize cellWidth = CGSizeMake(242, 9999);
CGSize size = [tweet sizeWithFont:[UIFont systemFontOfSize:17.0] constrainedToSize:cellWidth lineBreakMode:UILineBreakModeWordWrap];
// ensure we're at least at default height of cell
if(size.height < 70) // would like this to be set dynamically be default height of custom cell
{
size.height = 70;
}
else if(size.height > MAX_SIZE) // MAX_SIZE is defined as 100
{
size.height = MAX_SIZE;
}
NSUInteger row = [indexPath row];
NSLog(@"Row = %u Height = %f", row, size.height);
return size.height;
I assumed that because the CustomCell was built in Interface Builder and I was trying to access properties of it before it was created lead to the height and width to be returned as 0. So in `viewDidLoad` I created a CustomCell ivar to attempt to access this info with the following code `theCustomCell = (CustomCell *)[theTableView dequeueReusableCellWithIdentifier:@"CustomCell"];` and even set the variables I was requesting in CustomCell's `- (id)initWithStyle:(UITableViewCellStyle) reuseIdentifier:(NSString *)` as so
// Initialization code
CGRect frame = CGRectMake(302, 20, 242, 50);
[messageLabel setFrame:frame];
[messageLabel setFont:[UIFont systemFontOfSize:17.0]];
But the variables are still returning 0 for the height and width. What am I missing? Also, as a side question if I create that CustomCell in viewDidLoad with the same reuseIdentifier, will it be picked up and used in the UITableView when I call
static NSString *CellIdentifier = @"CustomCell";
CustomCell *cell = (CustomCell *)[theTableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
Thanks in advance for any and all input on if I'm going about this the right way, or if there is a better way to get my desired result. | 0 | [
2,
13521,
14,
1072,
16,
21,
13,
5661,
11969,
4725,
363,
21,
13,
11193,
579,
4725,
115,
32,
22,
18,
679,
800,
3726,
3726,
86,
31,
22,
79,
2936,
21,
5816,
13,
11193,
579,
4725,
9725,
30,
1103,
21,
13,
5661,
22039,
4725,
15,
172,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JAVACV : Wbcam capturing using javacv
===
Tried to capture from a webcam using the JAVACV library. But it throws some exception like this.Please give me a solution for this
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\anooj\AppData\Local\Temp\javacpp7955905460040\jniopencv_core.dll: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:418)
at com.googlecode.javacpp.Loader.load(Loader.java:368)
at com.googlecode.javacpp.Loader.load(Loader.java:315)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:91)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:170)
at javaapplication16.JavaApplication16.captureframe(JavaApplication16.java:24)
at javaapplication16.JavaApplication16.main(JavaApplication16.java:38)
Java Result: 1 | 0 | [
2,
8247,
12732,
13,
45,
12285,
8760,
12859,
568,
8247,
12732,
800,
3726,
3726,
794,
20,
3683,
37,
21,
2741,
8760,
568,
14,
8247,
12732,
1248,
9,
47,
32,
13566,
109,
5391,
101,
48,
9,
6744,
590,
55,
21,
4295,
26,
48,
5391,
19,
93... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 4.x+ + Actionbar + fullscreen
===
I've gone through several posts in stackoverflow but i'm still unable to get the answer to a simple question:
Is it possible to create a fullscreen app in Android 3.x onwards, with the actionbar?
Using the `@android:style/Theme.Holo.Light.DarkActionBar`
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
did not do the trick.
Using fullscreen theme, adding the actionbar through code did not do it either.
Does android not allow both to happen at the same time? | 0 | [
2,
13005,
268,
9,
396,
2430,
2754,
1028,
1850,
2754,
503,
7187,
800,
3726,
3726,
31,
22,
195,
1042,
120,
238,
9868,
19,
7566,
2549,
9990,
47,
31,
22,
79,
174,
2343,
20,
164,
14,
1623,
20,
21,
1935,
1301,
45,
25,
32,
938,
20,
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... |
Progress Dialog in Tab Layout in android
===
I am working on Tab layout and progress dialog. I want to show progress dialog for five sec when user comes on the tab layout and when user changes the tabs.
I used following same code to show the progress dialog in both conditions.
public class TabLayoutActivity extends TabActivity {
ProgressDialog progressDialog;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tablayoutview);
progressDialog = ProgressDialog.show(TabLayoutActivity.this, "",
"Loading. Please wait...");
new Thread() {
public void run() {
try {
Thread.sleep(5000);
TabHost tabHost = getTabHost();
TabHost.TabSpec tabSpec;
Intent intent = new Intent().setClass(
getApplicationContext(), FirstTabActivity.class);
tabSpec = tabHost.newTabSpec("first").setIndicator("First")
.setContent(intent);
tabHost.addTab(tabSpec);
intent = new Intent().setClass(getApplicationContext(),
SecondTabActivity.class);
tabSpec = tabHost.newTabSpec("second")
.setIndicator("Second").setContent(intent);
tabHost.addTab(tabSpec);
} catch (Exception e) {
Log.e("tag", e.getMessage());
}
progressDialog.dismiss();
}
}.start();
}
}
The progress dialog working fine, but contents of the tabs does not display. It is showing following error.
"Only the original thread that created a view hierarchy can touch its views" | 0 | [
2,
3455,
28223,
19,
6523,
9106,
19,
13005,
800,
3726,
3726,
31,
589,
638,
27,
6523,
9106,
17,
3455,
28223,
9,
31,
259,
20,
298,
3455,
28223,
26,
355,
9265,
76,
4155,
1624,
27,
14,
6523,
9106,
17,
76,
4155,
1693,
14,
6523,
18,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java nio Reading SocketChannel on a Selector
===
I have a small server application which receives connections from multiple clients.
The clients will connect, send a message and disconnect, there is no response sent back.
I'm using a ServerSocketChannel to listen for connections.
I get notified of new connections using a selector, When this happens I register the SocketChannel with the selector for `SelectionKey.OP_READ`
The part I'm unsure of is when I get notified data is available for reading.
My SocketChannels are in nonblocking mode.
I call `channel.read(buffer)` on the SocketChannel to read into the byte buffer
From the javadoc for read, I should repeatadly call this until I get a -1 indicating the end of the stream. However, I'm not sure if I should be waiting for the selector to notify me again before calling read again.
That is:
* I get notified by the selector that data is available.
* I call read
* Should I then call read again until -1 is returned or should I let the selector notify me then call read again
Many Thanks
| 0 | [
2,
8247,
13,
15042,
1876,
18482,
10928,
27,
21,
23946,
800,
3726,
3726,
31,
57,
21,
284,
8128,
3010,
56,
8359,
6760,
37,
1886,
7421,
9,
14,
7421,
129,
6379,
15,
2660,
21,
2802,
17,
29363,
15,
80,
25,
90,
1627,
795,
97,
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... |
why isn't this assignment working?
===
private void MainWindow_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == Keys.Shift)
{
if (e.KeyCode == Keys.F12)
{
terminalToolStripMenuItem.Visible = false;//first assignment
}
if (e.KeyCode == Keys.F11)
{
terminalToolStripMenuItem.Visible = true;//2nd assignment
}
}
}
Visible property of terminalToolStripMenuItem is preset to false in designer but even in debug it doesn't change.meaning the 2nd assignment doesn't change the value.it works fine in view but in code it's always false.why? | 0 | [
2,
483,
2532,
22,
38,
48,
8427,
638,
60,
800,
3726,
3726,
932,
11364,
407,
27508,
1,
4237,
2968,
5,
23793,
2660,
106,
15,
1246,
4943,
38,
10663,
18,
13,
62,
6,
13,
1,
100,
13,
5,
62,
9,
13670,
16292,
18,
800,
3726,
5534,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can i add index to @ManyToOne relation
===
I have @ManyToOne relation in object and in the "one" side i don't have a @OneToMany relation how can i can add the @IndexColumn in this situation?
And can i add @indexColumn in @ONeToOne relation?
| 0 | [
2,
184,
92,
31,
3547,
4348,
20,
13,
1,
14842,
262,
849,
5827,
800,
3726,
3726,
31,
57,
13,
1,
14842,
262,
849,
5827,
19,
3095,
17,
19,
14,
13,
7,
849,
7,
270,
31,
221,
22,
38,
57,
21,
13,
1,
849,
262,
14842,
5827,
184,
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... |
Can all contents of a folder be "automatically" be categorized in Plone 4.1?
===
In plone if I make a folder, all the content items i.e files, folders, images in that particular folder should **automatically** be categorized under that folder. So when I make a collection to view all the contents of the folder, only those should be visible in the collection. I need not tag each of the contents with a tag and create the collection i.e an automatic tag (inherent tag for the folder contents) should be created for its contents. How can this be achieved in Plone 4.1? | 0 | [
2,
92,
65,
8478,
16,
21,
19294,
44,
13,
7,
23465,
1326,
7,
44,
23346,
19,
351,
16285,
268,
9,
165,
60,
800,
3726,
3726,
19,
351,
16285,
100,
31,
233,
21,
19294,
15,
65,
14,
2331,
3755,
31,
9,
62,
6488,
15,
19294,
18,
15,
350... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cannot access oAuth2 of google apps api
===
> I am getting following error whenever i try to access credential.refreshToken();
>Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
>{
> "error" : "invalid_grant"
>}
> at >com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:>103)
> at ?>com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:303)
> at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323)
> at >com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCr>edential.java:340)
> at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:508)
> at >com.intuit.dmx.storage.google.StorageAuthenticationServiceImpl.authenticateUser(StorageAut>henticationServiceImpl.java:51)
> ... 2 more
>I am not getting this exception always.. sometimes it works fine means i could get the >accesstoken, sometimes it throws error.
>Jyoti
Jyoti | 0 | [
2,
1967,
1381,
635,
1346,
96,
135,
16,
8144,
4865,
18,
21,
2159,
800,
3726,
3726,
13,
1,
31,
589,
1017,
249,
7019,
6634,
31,
1131,
20,
1381,
5059,
43,
10107,
9,
99,
22373,
262,
2853,
5,
6,
73,
13,
1,
17560,
43,
34,
45,
13,
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 happening when typing in the browser URL?
===
I've been asked this question several times on interview and each time could not give clear answer. So my question is, what is happening when we are typing URL in browser I know that this URL is translated into IP via DNS and it is obtained via GET method. But what is happening in details? Could someone please tell me? | 0 | [
2,
98,
4942,
76,
25266,
19,
14,
16495,
287,
6362,
60,
800,
3726,
3726,
31,
22,
195,
74,
411,
48,
1301,
238,
436,
27,
2421,
17,
206,
85,
110,
52,
590,
1207,
1623,
9,
86,
51,
1301,
25,
15,
98,
25,
4942,
76,
95,
50,
25266,
287,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to deal with null value in array
===
i hav a query
$sql="SELECT mstEmp.empname,mstEmp.cardno, InDate, dailyattendance.InTime,dailyattendance.OutTime, mstEmp.teamtype FROM mstEmp left JOIN dailyattendance ON (InDate BETWEEN '$from' AND '$to' ) AND (dailyattendance.HolderName = mstEmp.empname ) WHERE mstEmp.teamtype = '$chk' ORDER BY InDate DESC";
now when i run this as print_r($row) it gives me array as [0]=absbd [1]=34 [2]= [3]= [4]=
now i want [2] which is the date to display the date but it is giving me garbage value. | 0 | [
2,
184,
20,
1183,
29,
16203,
1923,
19,
7718,
800,
3726,
3726,
31,
13,
14462,
21,
25597,
5579,
18,
22402,
3726,
7,
18,
16964,
4235,
9577,
9,
62,
2554,
7259,
15,
79,
18,
9577,
9,
6648,
251,
15,
19,
8209,
15,
1954,
721,
1316,
11855... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delphi 7 Procedure with variant parameters
===
Have a procedure which looks like
Procedure TestProc(TVar1, TVar2 : variant);
Begin
TVar1 := CreateOleObject('Excel.Application');
TVar1.Workbooks.open('C:\Test\Test.xls');
TVar1.Workbooks[1].Worksheets[1].Name := 'Sheet_1';
TVar2 := TVar1.Workbooks[1].Worksheets['Sheet_1'];
End;
Note: TVar1 and TVar2 are global variables
Calling the procedure in an onclick event of a button and then using the created objects is not working
Is it that delphi does not allow creation of procedures having variant parameters???
| 0 | [
2,
23030,
453,
7004,
29,
8320,
12905,
800,
3726,
3726,
57,
21,
7004,
56,
1879,
101,
7004,
1289,
15617,
5,
38,
3311,
165,
15,
983,
512,
135,
13,
45,
8320,
6,
73,
2348,
983,
512,
165,
13,
45,
3726,
1600,
6069,
23793,
5,
22,
1706,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sorting with Index Retention
===
Instead of Bubble Sort which Sorting technique can be used to sort an array of integers such that at the time of output i can display its position in original array??
INPUT
4 5 3 6 1
OUTPUT
INDEX : VALUE
5 : 1
3 : 3
1 : 4
2 : 5
4 : 6 | 0 | [
2,
2058,
68,
29,
4348,
21912,
800,
3726,
3726,
700,
16,
10937,
2058,
56,
2058,
68,
4873,
92,
44,
147,
20,
2058,
40,
7718,
16,
13820,
18,
145,
30,
35,
14,
85,
16,
5196,
31,
92,
3042,
82,
649,
19,
501,
7718,
60,
60,
6367,
268,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CountIf formula within MS Access report
===
something terrible as happened with my poor attempt at adding a "CountIf" forumula to my access report.
i am trying to add a formula within my report header to count the amount of entries in my "Service" column of a report that contain a certain word. The problem is i am an absolute amateur when it comes to SQL code.
`=CountIf([Service]="Housing")`
is the code i was hoping would work but i dont seem to be getting anywhere,
any help would be greatly appreciated. cheers, Kris | 0 | [
2,
2468,
821,
3729,
363,
4235,
1381,
1330,
800,
3726,
3726,
301,
5803,
28,
1190,
29,
51,
1696,
1735,
35,
4721,
21,
13,
7,
16549,
821,
7,
5691,
3743,
20,
51,
1381,
1330,
9,
31,
589,
749,
20,
3547,
21,
3729,
363,
51,
1330,
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... |
postgres 9.1 logfile change
===
I have a standard Ubuntu postgres9.1 install running continuosly, I may not stop it.
Nothing has been specifically configured regarding the logging target,
so there is a (rotating somehow)
logfile /var/log/postgresqlpostgresql-9.1-main.log.
I suppose, that it grabs the standard output of the processes.
What I want is to configure a different file target, and, without restart,
(no collector, no syslog ... those need restarting)
but with reconfig, the new child processes used that file.
Is that possible?
Thank you. | 0 | [
2,
678,
6879,
18,
561,
9,
165,
6738,
16877,
753,
800,
3726,
3726,
31,
57,
21,
1236,
287,
12968,
2473,
678,
6879,
18,
518,
9,
165,
16146,
946,
13,
13391,
13324,
18,
102,
15,
31,
123,
52,
747,
32,
9,
626,
63,
74,
3524,
28895,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Trying to convert time stored in char to normal form. Printing a random value. Whats wrong?
===
Here is a short code I have written to print time entered as string or char to hh:mm:ss form.
No compilation errors but gives a garbage value. Whats wrong with it?
# include<iostream>
# include<ctime>
using namespace std;
int main(){
const char *time_details = "15:34:12";
struct tm tm;
strptime(time_details, "%H:%M:%S", &tm);
time_t t = mktime(&tm);
cout << t << endl;
}
| 0 | [
2,
749,
20,
8406,
85,
8214,
19,
4892,
20,
1826,
505,
9,
7312,
21,
5477,
1923,
9,
98,
18,
1389,
60,
800,
3726,
3726,
235,
25,
21,
502,
1797,
31,
57,
642,
20,
4793,
85,
1297,
28,
3724,
54,
4892,
20,
13,
10681,
45,
3363,
45,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to implement zero-copy tcp using lock-free circular buffer in C++
===
I have multiple threads that need to consume data from a TCP stream. I wish to use a circular buffer/queue in shared memory to read from the TCP socket. The TCP receive will write directly to the circular queue. The consumers will read from the queue.
This design should enable zero-copy and zero-lock. However there are 2 different issues here.
1. Is it possible/efficient to read just 1 logical message from the TCP socket? If not, and I read more than 1 message, I will have to copy the residuals from this to this->next.
2. Is it really possible to implement a lock-less queue? I know there are atomic operations, but these can be costly too. because all CPU cache needs to be invalidated. This will effect all operations on all of my 24 cores.
Im a little rusty in low-level TCP, and not exactly clear how to tell when a message is complete. Do I look for \0 or is it implementation specific?
ty
| 0 | [
2,
184,
20,
8713,
4606,
8,
19625,
13,
38,
7439,
568,
3991,
8,
4639,
8155,
17497,
19,
272,
20512,
800,
3726,
3726,
31,
57,
1886,
20396,
30,
376,
20,
16447,
1054,
37,
21,
13,
38,
7439,
3766,
9,
31,
2536,
20,
275,
21,
8155,
17497,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Lock Android 2.3 Device programmatically
===
from last 2 days i am trying to lock my device programmatically for one of my application , have tried using both keyguardmanager and DeviceAdminManager method.
Please help
| 0 | [
2,
3991,
13005,
172,
9,
240,
3646,
625,
6732,
1326,
800,
3726,
3726,
37,
236,
172,
509,
31,
589,
749,
20,
3991,
51,
3646,
625,
6732,
1326,
26,
53,
16,
51,
3010,
13,
15,
57,
794,
568,
156,
1246,
9499,
22256,
17,
3646,
1283,
2160,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is this syntax supposed to do?
===
I am managing a website with a custom framework, developed by some programmers who are no longer working in out company. In some parts of the code I saw this:
$class = 'PagesControl';
$obj = clone new $class();
What is this thing supposed to do? Why would you clone an object created like that? | 0 | [
2,
98,
25,
48,
22649,
2293,
20,
107,
60,
800,
3726,
3726,
31,
589,
5616,
21,
2271,
29,
21,
5816,
6596,
15,
885,
34,
109,
17968,
18,
72,
50,
90,
1045,
638,
19,
70,
237,
9,
19,
109,
1341,
16,
14,
1797,
31,
441,
48,
45,
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... |
Google MAPS waypoints
===
I have a problem using waypoints in Google Maps: https://developers.google.com/maps/documentation/javascript/directions#DirectionsResults
I want to add waypoints and get driving directions in the order I provide them, but google automatically optimize them...
I send request with this code:
var request = {
origin: start,
destination: end,
waypoints: waypts,
optimizeWaypoints: true,
travelMode: google.maps.TravelMode.DRIVING
};
and in my array (waypts) waypoints are ordered as they should be ...
Example:
I want to go from NY via Chicago via NY to Philadelphia.. But the response I get is like this: NY via NY (1 meter) to Chicago to Philadelphia. Google somehow optimize route but I don't want this ...
Any idea?
Thanks!
| 0 | [
2,
8144,
6867,
161,
3132,
18,
800,
3726,
3726,
31,
57,
21,
1448,
568,
161,
3132,
18,
19,
8144,
6867,
45,
7775,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
960,
118,
15022,
18,
118,
28132,
857,
118,
1004,
1385,
8741,
118,
14706,
5757,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
firefox high memory (RAM) usage, how to free with javascript?
===
I notice that after using firefox for a couple of hours it gets more that 2gb of ram memory. It happens expecially when I upload big files (100mb-400mb) with ajax uploader, and also happens when I open to many images (for example 16mb of total images on a web page).
The problem is that even after upload finish or after closing the images pages the memory is not getting free, firefox still have 2gb of ram memory.
Is there a way from javascript to make firefox free the memory, for example when upload finish or after images are loaded or closed?
| 0 | [
2,
535,
18219,
183,
1912,
13,
5,
2781,
6,
7514,
15,
184,
20,
551,
29,
8247,
8741,
60,
800,
3726,
3726,
31,
3551,
30,
75,
568,
535,
18219,
26,
21,
1335,
16,
974,
32,
3049,
91,
30,
172,
11400,
16,
2843,
1912,
9,
32,
5531,
1396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I update a single Html.HiddenFor (MVC 3) container within an array using JQuery?
===
I'm using MVC 3 with razor. I'm displaying an array of Ajax forms with a Save button for each. Each form has a "html.hiddenfor" container that holds a value that I would like to update when the client clicks on the "Save" button. The problem is that, since this is an array of html.hiddenfor containers, there's no way to differentiate the ids unless you append a counter to a name using the Razor syntax. I could do that easily enough, however, there is no way that I can reference that razor counter from the JScript so that I could use Jquery to update the html.hiddenfor container when the SAVE button is pressed. Anybody have any ideas as to how I could accomplish this? IN SUMMARY: I would like to update a html.hiddenfor container when the SAVE button is pressed for that particular form. In other words, there are 50 forms that each have a save and html.hiddenfor... how can you get each save button to refer to its corresponding html.hiddenfor container? Much appreciated!!! | 0 | [
2,
184,
92,
31,
11100,
21,
345,
13,
15895,
9,
1822,
43,
817,
1106,
13,
5,
79,
8990,
203,
6,
12147,
363,
40,
7718,
568,
487,
8190,
93,
60,
800,
3726,
3726,
31,
22,
79,
568,
307,
8990,
203,
29,
14282,
9,
31,
22,
79,
17418,
40,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.