unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
My trainer says Java creates 380 objects to run a simple java program.Is this right?
===
A java trainer who trained in our company claims there are 380 objects created to run the simplest "Hello World" program. Is this correct ? How do I verify it ? | 1 | [
2,
51,
9088,
898,
8247,
9695,
13,
15666,
3916,
20,
485,
21,
1935,
8247,
625,
9,
403,
48,
193,
60,
800,
3726,
3726,
21,
8247,
9088,
72,
3416,
19,
318,
237,
2810,
80,
50,
13,
15666,
3916,
679,
20,
485,
14,
24384,
13,
7,
11515,
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,
0,
0... |
ActionBar in os 4.03
===
I am using an **ActionBar** in my application.
I have three things on my **ActionBar**
1-Logo
2-Tab's
3-Menu's
I am facing a problem in Tab's becouse Tab's text going in next line
for example:- i am using **Audio** so it should be in single line(i.e **Audio**)
but in OS 4.03 it looks like :-
**Aud**
**io**
//some text going in next line.
can any one suggest that why it is happening. | 0 | [
2,
1028,
1850,
19,
13,
759,
268,
9,
3601,
800,
3726,
3726,
31,
589,
568,
40,
13,
1409,
8645,
1850,
1409,
19,
51,
3010,
9,
31,
57,
132,
564,
27,
51,
13,
1409,
8645,
1850,
1409,
137,
8,
5567,
111,
172,
8,
15783,
22,
18,
203,
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... |
Disabling a Textbox Using TextChanged Event
===
The form I am using requires a copy pasted URL. I am trying to have a textChanged event that will check the url as soon as it is pasted, telling the user whether it is valid or invalid. I also want to be able to lock out the textbox when this happens, with a message saying something like "Processing...".
The problem is with the code below, the textbox is never disabled, the program will do the checkUrl() method and the textbox is never disabled even though it is first to execute (I assume it is but the fact there is a function call right underneath it is messing around with something or getting higher priority).
How do I go about making the control visually disabled while the method runs?
private void urlTxtBx_TextChanged(object sender, EventArgs e)
{
urlTxtBx.Enabled = false;
checkUrl();
urlTxtBx.Enabled = true;
} | 0 | [
2,
1460,
58,
8599,
21,
1854,
5309,
568,
1854,
16229,
43,
807,
800,
3726,
3726,
14,
505,
31,
589,
568,
4781,
21,
4344,
640,
69,
287,
6362,
9,
31,
589,
749,
20,
57,
21,
1854,
16229,
43,
807,
30,
129,
2631,
14,
287,
6362,
28,
651... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Updating a Table in sql
===
ALTER PROCEDURE InsertHash
@FileName varchar(max),
@Hash varchar(max)
AS
UPDATE tabletest
SET deneme1 = @Hash, deneme2 =@FileName
this is my stored procedure, and i send some data
while (rdr.Read())
{
string filename = @"\\" + rdr.GetString(3);
filename = System.IO.Path.Combine(filename, rdr.GetString(2));
filename = System.IO.Path.Combine(filename, rdr.GetString(1));
computeHashh1 abc = new computeHashh1();
Console.WriteLine(abc.computeHash(filename));
SqlCommand myCommand2 = new SqlCommand("InsertHash", myConnection);
myCommand2.CommandType = CommandType.StoredProcedure;
SqlParameter param = new SqlParameter("@FileName", filename);
myCommand2.Parameters.Add(param);
SqlParameter param2 = new SqlParameter("@Hash", abc.computeHash(filename));
myCommand2.Parameters.Add(param2);
}
its not updating the table when i run the code, what can be the problem, sory for such bad question im quite new to sql
| 0 | [
2,
71,
43,
1880,
21,
859,
19,
4444,
255,
800,
3726,
3726,
7835,
7004,
14692,
25436,
13,
1,
16877,
7259,
4033,
5433,
5,
8304,
6,
15,
13,
1,
25436,
4033,
5433,
5,
8304,
6,
28,
11100,
859,
10543,
309,
5394,
11025,
165,
800,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mathematica function intersection points with 3D grid
===
I need to produce a 3-dimensional equispaced grid over a given function in a way, that I can calculate intersection points of the function with the grids edges.
So my first question is how to produce this grid in Mathematica. I don't really get if this is possible by modeling the grid by Polygons? For this I might need some help then, too. Or can it be done by using more simple graphics-objects like done here ( http://stackoverflow.com/questions/8115893/3d-grid-inside-the-box-in-graphics3d )?
Thanks for reading and help! | 2 | [
2,
5057,
5996,
12630,
1990,
5351,
819,
29,
203,
43,
7354,
800,
3726,
3726,
31,
376,
20,
2213,
21,
203,
8,
7865,
13,
9629,
18,
15265,
7354,
84,
21,
504,
1990,
19,
21,
161,
15,
30,
31,
92,
18469,
5351,
819,
16,
14,
1990,
29,
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... |
Hbase: Storing "End-Of-Day" Financial data
===
I have End-of-Day Data for stocks.
Basically a set of data is:
TICKER: APPLE
FIELD: PRICE
DATE of OBS: 24/07/2012
result= 123.5$
a more complicated one would be to ask what in the past (18/07/2012) were all the instruments available to trade the apple stock
TICKER: APPLE
FIELD: LIST_OF_ALL_INST
OVERRIDE: DATE_IN_THE_PAST
OVERRIDE_PARAM:18/07/2012
result= list of string c("APPLE_MARCH","APPLE_JUNE","APPLE_SEP")
Is this a schema compatible with HBASE?
Could you please share with me:
- the tutorial you think are relevant
- your experience and advice
Also, I am working with Bloomberg. If you have more specific articles, tutorial, thanks.
Regards
| 0 | [
2,
746,
8436,
45,
25615,
13,
7,
2451,
8,
1041,
8,
1185,
7,
1553,
1054,
800,
3726,
3726,
31,
57,
241,
8,
1041,
8,
1185,
1054,
26,
2070,
18,
9,
11374,
21,
309,
16,
1054,
25,
45,
8809,
106,
45,
4037,
575,
45,
2162,
1231,
16,
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... |
Grouping the nodes at three levels and summing one node
===
Please follow the comments in the sample xml it explains everything I need, it is having three scenerio's check each scenerio in the output xml in the same sequence.
Input XML
<?xml version = '1.0' encoding = 'UTF-8'?>
<!-- In the below xml there will be one ASNInDesc with multiple ASNInPO's
and each ASNInPO contains one ASNInCtn and each ASNInCtn contains one ASNInItem -->
<ASNInDesc>
<asn_nbr>ASN-1</asn_nbr>
<!-- In the below two ASNInPO's po_nbr is same container_id under ASNInCtn is same and item_id under
ASNInItem is same. In this case two ASNInPO's has to be merged and two ASNInCtn's has to be merged
into one tag(since the container_id is same) and two ASNInItem's has to be merged into one tag and unit_qty is to be added -->
<ASNInPO>
<po_nbr>PO-1</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-1</container_id>
<ASNInItem>
<item_id>ITEM-1</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<ASNInPO>
<po_nbr>PO-1</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-1</container_id>
<ASNInItem>
<item_id>ITEM-1</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<!-- In the below two ASNInPO's po_nbr is same container_id under ASNInCtn is same and item_id under
ASNInItem is different. In this case two ASNInPO's has to be merged and two ASNInCtn's has to be merged into one tag and
two different ASNInItem's for the two different items -->
<ASNInPO>
<po_nbr>PO-2</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-2</container_id>
<ASNInItem>
<item_id>ITEM-2</item_id>
<unit_qty>3</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<ASNInPO>
<po_nbr>PO-2</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-2</container_id>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>3</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<!-- In the below two ASNInPO's po_nbr is same container_id under ASNInCtn is different and item_id under
ASNInItem is different. In this case two ASNInPO's has to be merged into one tag with
two different ASNInCtn's each having their own ASNInItem -->
<ASNInPO>
<po_nbr>PO-3</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-3</container_id>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<ASNInPO>
<po_nbr>PO-3</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-4</container_id>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
</ASNInDesc>
Output XML
<?xml version = '1.0' encoding = 'UTF-8'?>
<ASNInDesc>
<asn_nbr>ASN-1</asn_nbr>
<!-- Scenerio-1 -->
<ASNInPO>
<po_nbr>PO-1</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-1</container_id>
<ASNInItem>
<item_id>ITEM-1</item_id>
<unit_qty>4</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<!-- Scenerio-2 -->
<ASNInPO>
<po_nbr>PO-2</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-2</container_id>
<ASNInItem>
<item_id>ITEM-2</item_id>
<unit_qty>3</unit_qty>
</ASNInItem>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>3</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
<!-- Scenerio-3 -->
<ASNInPO>
<po_nbr>PO-3</po_nbr>
<ASNInCtn>
<container_id>CONTAINER-3</container_id>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
<ASNInCtn>
<container_id>CONTAINER-4</container_id>
<ASNInItem>
<item_id>ITEM-3</item_id>
<unit_qty>2</unit_qty>
</ASNInItem>
</ASNInCtn>
</ASNInPO>
I have tried with my own xsl, but couldn't handle all the scenerios. Please help me in solving this.
Thanks in Advance.
| 0 | [
2,
19288,
14,
16272,
35,
132,
2216,
17,
3907,
3863,
53,
15421,
800,
3726,
3726,
2247,
1740,
14,
7534,
19,
14,
5717,
23504,
32,
7346,
796,
31,
376,
15,
32,
25,
452,
132,
1691,
5741,
22,
18,
2631,
206,
1691,
5741,
19,
14,
5196,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE8 DOM does not reflect JS changes
===
I'm making some simple changes using javascript to HTML elements already existant when the page is served (such as changing background images of div elements, adding IDs etc). This of course works fine in every browser apart from IE8 where the change doesn't appear to be reflected in the DOM so when I parse the dom after the JS has run it cant find the elements I'm looking for. The page is built up of 2 javascript files in the header, 1 is an external third party script which I do not have control over but which is the one adding the ids and background images. The second is mine which is called after the first and is parsing the document looking for the specific elements with the new IDs. Both are external scripts and are not inline in the HTML source.
From what I can tell its either:
- a race condition, 2 external Javascripts are running 1 is changing the buttons and adding the ids and the other is parsing the dom looking for specific elements and as they're running at the same time the second never finds the elements
- IE8 does not properly refresh the DOM after changes have been made
My JS is called after the first JS in the head so you would assume that the blocking would not cause the race condition and the elements would be available before my JS runs
Things I've tried:
- I've tried adding a class to the body to force a refresh of the DOM before my code runs
- I've used IE8 developer tools and the ids and elements are not present, but if I refresh a few times they magically appear (the page has already fully loaded at the this point and I can interact with it fully)
Any ideas?
Thanks!
| 0 | [
2,
13,
660,
457,
11859,
630,
52,
6907,
487,
18,
1693,
800,
3726,
3726,
31,
22,
79,
544,
109,
1935,
1693,
568,
8247,
8741,
20,
13,
15895,
2065,
614,
3182,
1830,
76,
14,
2478,
25,
423,
13,
5,
4289,
28,
4226,
2395,
3502,
16,
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... |
Vertically-resizable NSTextView as field editor for a table view
===
I have a `NSTextView` as a field editor for the table view (naturally, since that's the default). I've used `setVerticallyResizable:` to, well, make the editor vertically autoresizable.
Unfortunately, it never grows beyond the size of the cell. User can enter multiple lines, but can never see more than one. I presume this is because the text view sees the cell as its boundaries.
Is there a way to get the field editor to autoresize its height relative to the entire table view's height? Or at least display several lines at once? I have no problem with the width, but the height is really too small. | 0 | [
2,
23300,
8,
99,
18,
3186,
579,
13,
2172,
11969,
4725,
28,
575,
1835,
26,
21,
859,
1418,
800,
3726,
3726,
31,
57,
21,
13,
1,
2172,
11969,
4725,
1,
28,
21,
575,
1835,
26,
14,
859,
1418,
13,
5,
17232,
102,
15,
179,
30,
22,
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... |
FaceBook PageTab Questions
===
I'll get right to it...
First i can't get an event to fire after a pagetab is added
var url=window.location + '?recheck=true';
var obj = {
method: 'pagetab',
redirect_uri: url
};
FB.ui(obj);
Don't know why i even bother specifying a redirect_url if the redirect doesn't even work.
Simple enough... i've tried
FB.ui(obj, function(result){
alert(result);// nothing happens
});
----------
And a second question. When adding pagetabs it only allows the facebook user to add the pagetab to the pages they administer but not to their default profile page. Is there a way around this? | 0 | [
2,
9090,
2478,
15783,
2346,
800,
3726,
3726,
31,
22,
211,
164,
193,
20,
32,
9,
9,
9,
64,
31,
92,
22,
38,
164,
40,
807,
20,
535,
75,
21,
2478,
15783,
25,
905,
4033,
287,
6362,
3726,
27508,
9,
19032,
2754,
13,
22,
60,
99,
1254... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 R not generating, even after following every single step on the internet
===
The android R has been troubling me for quite some time now. I've seen it in a lot of projects of mine, sometimes they just disappeared,sometimes i had to recreate a project, etc. Still this doesn't solve anything for my current project. Logically i suspect the XML files to contain an error but i'm unable to find it.
I'm using eclipse as my development environment and this is my main.xml
<?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="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imgLogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/title"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/title"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/btnNewTime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/overview" />
<Button
android:id="@+id/btnOverview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/overview" />
<Button
android:id="@+id/btnValues"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/values" />
<Button
android:id="@+id/btnExit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit" />
</LinearLayout>
This is my strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Werkregistratie</string>
<string name="title">Werkregistratie</string>
<string name="overview">Overzicht</string>
<string name="values">Salaris/reiskosten aanpassen</string>
<string name="exit">Afsluiten</string>
</resources>
I'm unable to find the problem so i really hope you can help me out.
Greetings. | 0 | [
2,
13005,
761,
52,
13500,
15,
166,
75,
249,
352,
345,
1424,
27,
14,
2620,
800,
3726,
3726,
14,
13005,
761,
63,
74,
26894,
8599,
55,
26,
1450,
109,
85,
130,
9,
31,
22,
195,
541,
32,
19,
21,
865,
16,
2314,
16,
1114,
15,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 make it so that the program will print the number of words in a sentence?
===
I can already make it do vowels,consonants,spaces, and special characters.
I have to do it using some beginner techniques. Nothing to complicated.
import java.util.Scanner;
public class JBlahBlah
{
static Scanner sc = new Scanner(System.in );
public static void main(String[] Theory)
{
JWaffles MyWaffles = new JWaffles();
MyWaffles.ProgramHeading();
System.out.println("Enter a string:" );
String SentenceContents = sc.nextLine( );
int VowelCount = 0,ConsonantCount = 0,WordCount = 0,SpaceCount = 0,SpecialCharCount = 0 ;
for (int Bat = 0; Bat < SentenceContents.length(); Bat++)
{
char Vowels = SentenceContents.charAt(Bat );
if ( (Vowels == 'A') || (Vowels == 'a' )
|| (Vowels == 'E') || (Vowels == 'e' )
|| (Vowels == 'I') || (Vowels == 'i' )
|| (Vowels == 'O') || (Vowels == 'o' )
|| (Vowels == 'U') || (Vowels == 'u' ))
VowelCount++;
char Consonants = SentenceContents.charAt(Bat);
if ( (Consonants == 'B') || (Consonants == 'b')
|| (Consonants == 'C') || (Consonants == 'c')
|| (Consonants == 'D') || (Consonants == 'd')
|| (Consonants == 'F') || (Consonants == 'f')
|| (Consonants == 'G') || (Consonants == 'g')
|| (Consonants == 'H') || (Consonants == 'h')
|| (Consonants == 'J') || (Consonants == 'j')
|| (Consonants == 'K') || (Consonants == 'k')
|| (Consonants == 'L') || (Consonants == 'l')
|| (Consonants == 'M') || (Consonants == 'm')
|| (Consonants == 'N') || (Consonants == 'n')
|| (Consonants == 'P') || (Consonants == 'p')
|| (Consonants == 'Q') || (Consonants == 'q')
|| (Consonants == 'R') || (Consonants == 'r')
|| (Consonants == 'S') || (Consonants == 's')
|| (Consonants == 'T') || (Consonants == 't')
|| (Consonants == 'V') || (Consonants == 'v')
|| (Consonants == 'W') || (Consonants == 'w')
|| (Consonants == 'X') || (Consonants == 'x')
|| (Consonants == 'Y') || (Consonants == 'y')
|| (Consonants == 'Z') || (Consonants == 'z') )
ConsonantCount++;
char Spaces = SentenceContents.charAt(Bat);
if ( (Spaces == ' ') )
SpaceCount++;
char SpecialCharacters = SentenceContents.charAt(Bat);
if ( (SpecialCharacters == '!') || (SpecialCharacters == '@' )
|| (SpecialCharacters == '#') || (SpecialCharacters == '$' )
|| (SpecialCharacters == '%') || (SpecialCharacters == '^' )
|| (SpecialCharacters == '&') || (SpecialCharacters == '*' )
|| (SpecialCharacters == '(') || (SpecialCharacters == ')' )
|| (SpecialCharacters == '-') || (SpecialCharacters == '_' )
|| (SpecialCharacters == '+') || (SpecialCharacters == '=' )
|| (SpecialCharacters == ',') || (SpecialCharacters == '<' )
|| (SpecialCharacters == '.') || (SpecialCharacters == '>' )
|| (SpecialCharacters == '?') || (SpecialCharacters == '/' )
|| (SpecialCharacters == '"') || (SpecialCharacters == ';' )
|| (SpecialCharacters == ':') || (SpecialCharacters == '{' )
|| (SpecialCharacters == '[') || (SpecialCharacters == '}' )
|| (SpecialCharacters == ']') || (SpecialCharacters == '~' )
|| (SpecialCharacters == '`') || ((SpecialCharacters == '1' )
|| (SpecialCharacters == '2') || (SpecialCharacters == '3' )
|| (SpecialCharacters == '4') || (SpecialCharacters == '5' )
|| (SpecialCharacters == '6') || (SpecialCharacters == '7' )
|| (SpecialCharacters == '8') || (SpecialCharacters == '9' )
|| (SpecialCharacters == '|') ))
SpecialCharCount++;
}
System.out.println("There are " + VowelCount + " vowels in this sentance" );
System.out.println("There are " + ConsonantCount + " consonants in this sentance" );
System.out.println("There are " + SpaceCount + " spaces in this sentance" );
System.out.println("There are " + SpecialCharCount + " special characters in this sentance");
}
}
How can I do it? What if their are several spaces in between the words? | 0 | [
2,
184,
92,
31,
233,
32,
86,
30,
14,
625,
129,
4793,
14,
234,
16,
715,
19,
21,
5123,
60,
800,
3726,
3726,
31,
92,
614,
233,
32,
107,
17159,
15,
1126,
528,
5958,
15,
5582,
18,
15,
17,
621,
1766,
9,
31,
57,
20,
107,
32,
568,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to get the pid of a package in android
===
I have done the coding on getting all the installed packages in the android system! now what I want is to get the pid of that package since I want the current resource usage of the package! I dont know the method of doing this, where I know the reverse of it! :) I dont want to use the shell either! is there a way to achieve this! or else I'll state what I want to do and suggest me a better way..
what I want :
I have created an activity, where I take all the current installed third party applications or the system. used the package manager to get it! I listed it on a layout and when I click on an application I want it to direct to another screen where all the details are shown about the application. I already have some details which i got using the package name of the application. the thing is, I want to show the memory info, and the code size of the application! how can I achieve this! :)
please help! | 0 | [
2,
184,
20,
164,
14,
13,
11031,
16,
21,
6030,
19,
13005,
800,
3726,
3726,
31,
57,
677,
14,
13,
15458,
27,
1017,
65,
14,
4066,
16875,
19,
14,
13005,
329,
187,
130,
98,
31,
259,
25,
20,
164,
14,
13,
11031,
16,
30,
6030,
179,
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... |
A way to control Google Earth from Python on Linux
===
I have dowloaded a python script that uses `win32com` module ([project site][1]) to start and control Google Earth aplication on Windows. The commands in the script can also be used to interactively control Google Earth from command line.
The code is [here][2]. It works, it is exciting, BUT...
I'd like to do the same ON LINUX (Ubuntu derivatives).
The problem is: this script uses the COM interface to pass commands to GoogleEarth via interprocess communication. On linux, instead of an .exe, there is `googleearth-bin` executable, and I don't know how it would or shoud be to use the same interprocess communication idea on Linux.
Since the program is most probably compiled to the different OSes from (mostly) the same source code, it "seems" to me that the functionality could be in there. Now about HOW to access it from a Python script, this goes way beyond my current knowledge.
Thanks for any help!
[1]: http://sourceforge.net/projects/pywin32/
[2]: http://docs.google.com/View?docid=dgqhgsgm_933rjw93 | 0 | [
2,
21,
161,
20,
569,
8144,
1073,
37,
20059,
27,
13024,
800,
3726,
3726,
31,
57,
14103,
22546,
21,
20059,
3884,
30,
2027,
13,
1,
4181,
3125,
960,
1,
12613,
13,
5,
2558,
21011,
689,
500,
2558,
165,
500,
6,
20,
799,
17,
569,
8144,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android emulator not working in windows 8 beta
===
Android emulator not working in windows 8 beta. It worked fine on windows 7. | 0 | [
2,
13005,
3579,
14868,
52,
638,
19,
1936,
469,
8434,
800,
3726,
3726,
13005,
3579,
14868,
52,
638,
19,
1936,
469,
8434,
9,
32,
577,
1123,
27,
1936,
453,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
R auto.arima package version 3.22 Error in solve.default(res$hessian * n.used)
===
I am using auto.arima() like that:
F12.Xreg <- fourier(NEW.JMB,12)
F4.Xreg<- fourier(NEW.JMB,4)
fb<-cbind(F12.Xreg, F4.Xreg)
fit <-auto.arima(NEW.JMB, D=0, max.P=0, max.Q=0, xreg=fb)
I don't know how can I avoid error:
Error in solve.default(res$hessian * n.used) :
system is computationally singular: reciprocal condition number = 6.64873e-30
Error in if (diffs == 1 & constant) { : argument is of length zero
In addition: Warning message:
In auto.arima(NEW.JMB, D = 0, max.P = 0, max.Q = 0, xreg = fb) :
Unable to calculate AIC offset
Thanks | 0 | [
2,
761,
3108,
9,
2905,
540,
6030,
615,
203,
9,
2287,
7019,
19,
8402,
9,
13862,
9708,
5,
99,
18,
4403,
438,
18,
10760,
1637,
13,
103,
9,
8795,
6,
800,
3726,
3726,
31,
589,
568,
3108,
9,
2905,
540,
5,
6,
101,
30,
45,
398,
918,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LongListSelector for Metro
===
Does anyone know if any of the WinRT Controls exposed via WinJS can be customized to offer the same look and feel as the [Windows Phone LongListSelector][1]?
![enter image description here][2]
[1]: http://www.windowsphonegeek.com/articles/wp7-longlistselector-in-depth--part1-visual-structure-and-api
[2]: http://i.stack.imgur.com/MssH5.png | 0 | [
2,
175,
5739,
3434,
19932,
26,
3986,
800,
3726,
3726,
630,
1276,
143,
100,
186,
16,
14,
628,
5256,
8671,
5043,
1197,
628,
728,
18,
92,
44,
28779,
20,
1994,
14,
205,
361,
17,
583,
28,
14,
636,
27508,
18,
1132,
175,
5739,
3434,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
java.lang.NoSuchMethodError: org.json.XML.toJSONObject
===
Aim: to parse XML to JSON:
i have imported json-org.jar to parse XML to JSON.
it was fine working with simple java project but during Android its gives ERROR:
String stringxml="<item><title>Clinton slams Russia, China over Syria</title></item>";
JSONObject xmlJSONObj = XML.toJSONObject(stringxml);
org.json.JSONObject j = org.json.XML.toJSONObject(stringxml);
String json = j.toString();
I have got the Error in DDMS:
java.lang.NoSuchMethodError:org.json.XML.toJSONObject
at org.json.XML.toJSONObject(XML.java:282) | 0 | [
2,
8247,
9,
9949,
9,
251,
4289,
5909,
1807,
43,
29992,
45,
13,
5583,
9,
728,
528,
9,
396,
8184,
9,
262,
728,
528,
23793,
800,
3726,
3726,
5226,
45,
20,
2017,
870,
23504,
20,
487,
528,
45,
31,
57,
11808,
487,
528,
8,
5583,
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... |
Segmentation fault in C
===
I have the following C program. It works when I include this line, otherwise it gives segmentation fault. Any idea what's the issue here.
printf("head(%p), last(%p), newnode(%p)\n", head, last, newnode);
Here is my whole program. It's a basic circular queue example.
#include "stdio.h"
#include "malloc.h"
struct node {
int data;
struct node *next;
};
typedef struct node NODE;
void display(NODE *);
int main(void) {
NODE *head, *last, *newnode = NULL;
int i = 5;
for ( ; i > 0; i--) {
newnode = (NODE *) malloc(sizeof(NODE));
newnode->data = i*10;
newnode->next = NULL;
//printf("head(%p), last(%p), newnode(%p)\n", head, last, newnode);
if (head == NULL) {
head = newnode;
last = newnode;
} else {
last->next = newnode;
last = newnode;
}
last->next = head;
}
display(head);
return 1;
}
void display(NODE *head) {
NODE *temp = NULL;
temp = head;
printf("Elements --> ");
do {
printf("%d ", temp->data);
temp = temp->next;
} while (temp != head);
printf("\n");
} | 0 | [
2,
5631,
857,
4173,
19,
272,
800,
3726,
3726,
31,
57,
14,
249,
272,
625,
9,
32,
693,
76,
31,
468,
48,
293,
15,
3190,
32,
2352,
5631,
857,
4173,
9,
186,
882,
98,
22,
18,
14,
1513,
235,
9,
4793,
410,
5,
7,
1743,
5,
11881,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
restrict interval in element in the child element
===
I want to generate XML file with attach each element with time intervals by two attributes start and end with date type
The problem I encountered is how to restrict the value of time interval of the child element to be within the interval of its parent element?
any suggestions to solve this issue? | 0 | [
2,
15436,
14422,
19,
4520,
19,
14,
850,
4520,
800,
3726,
3726,
31,
259,
20,
7920,
23504,
3893,
29,
19514,
206,
4520,
29,
85,
15899,
34,
81,
13422,
799,
17,
241,
29,
1231,
1001,
14,
1448,
31,
8208,
25,
184,
20,
15436,
14,
1923,
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... |
What library to link for glGetShaderiv?
===
I am trying to link an OpenGL 3 program on Windows 7 64 and the linker doesn't find glGetShaderiv. Which library do I have to link for that? | 0 | [
2,
98,
1248,
20,
3508,
26,
13,
8430,
3060,
27209,
9655,
60,
800,
3726,
3726,
31,
589,
749,
20,
3508,
40,
368,
8430,
203,
625,
27,
1936,
453,
4384,
17,
14,
3508,
106,
1437,
22,
38,
477,
13,
8430,
3060,
27209,
9655,
9,
56,
1248,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Ruby Dir['*'] with dotfiles?
===
How do I get `Dir['*']` to include dotfiles, e.g., `.gitignore`, but not `.` and `..`?
I.e., is there a better way to do:
`ls -A`.split "\n"
perhaps with `Dir`? The following is close but includes `.` & `..`:
Dir.glob('*', File::FNM_DOTMATCH)
So, the following works:
Dir.glob('*', File::FNM_DOTMATCH) - ['.', '..']
But, is there still a better way to do this?
I'm wondering this to fix line 9 of a [Meteor Homebrew Formula][1].
[1]: https://gist.github.com/3072321#file_meteor.rb | 0 | [
2,
10811,
13,
9035,
2558,
22,
2483,
22,
500,
29,
14123,
16877,
18,
60,
800,
3726,
3726,
184,
107,
31,
164,
13,
1,
9035,
2558,
22,
2483,
22,
500,
1,
20,
468,
14123,
16877,
18,
15,
13,
62,
9,
263,
9,
15,
13,
1,
9,
10404,
23565... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Split-Screen Online Game Creation Necessities?
===
I imagine a **virtual** world where I can interact with *anything* as I please and there are no consequences; however, that is *not* the premise, merely a perk. It should have a split screen design where you follow one of two options. They may be of **varying specifics** and **queries** such as a male or female option (for your user/player). Any suggestions about modern 3D graphics engines by which to implement it? OpenGL? SDL? I appreciate your feedback! Thanks. | 1 | [
2,
2132,
8,
7187,
2087,
250,
2502,
19724,
160,
18,
3808,
60,
800,
3726,
3726,
31,
4382,
21,
13,
1409,
8145,
38,
6948,
1409,
126,
113,
31,
92,
10001,
29,
1637,
20938,
2483,
28,
31,
2247,
17,
80,
50,
90,
8360,
73,
207,
15,
30,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to get objects from two arrays?
===
There are arrays
Array A (1,3,5,7,9)
Array B (2,4,6,8,10)
And int number.
And id selectedObject
Here is what i want
I want to show 1,2,3,4,5,6,7,8,9,10
What i did...
Set enumerators
NSEnumerator *enu1 = [arrayA objectEnumerator];
NSEnumerator *enu2 = [arrayB objectEnumerator];
Set number =1
And there is UIButton
When I tap the Button
If( number%2==1)
selectedObject = [enu1 nextObject]
else
selectedObject = [enu2 nextObject]
And
NSLog..
How to get what i want?
| 1 | [
2,
184,
20,
164,
3916,
37,
81,
7718,
18,
60,
800,
3726,
3726,
80,
50,
7718,
18,
7718,
21,
13,
5,
19127,
15,
264,
15,
465,
15,
518,
6,
7718,
334,
13,
5,
135,
15,
300,
15,
379,
15,
457,
15,
1036,
6,
17,
19,
38,
234,
9,
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... |
Order of execution after an event is fired
===
someClass = Ext.extend(someOtherClass,
initComponent: function (){
someFunction();
this.on('exampleEvent', someFuntion2(), this);
},
someFunction: function (){
this.fireEvent('exampleEvent');
return null;
}
//...
}
Immediately after "this.fireEvent('exampleEvent');" does "return null" get executed or "someFuntion2()"? Why? | 0 | [
2,
389,
16,
5769,
75,
40,
807,
25,
3899,
800,
3726,
3726,
109,
1898,
800,
1396,
38,
9,
1706,
1316,
43,
5,
3220,
9539,
1898,
15,
19,
242,
11103,
218,
2291,
45,
1990,
13,
5,
6,
1,
109,
22359,
5,
6,
73,
48,
9,
218,
5,
22,
290... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 hibernating mapping from application code
===
Is there a way to get the hibernate mapping from within my application code?
for example, for the below mapping, I want to return createdDate given created_date from my application.
<pre>
<property
name="createdDate"
type="java.lang.String"
column="created_date"
length="45"
/>
</pre> | 0 | [
2,
164,
4148,
16720,
1880,
13305,
37,
3010,
1797,
800,
3726,
3726,
25,
80,
21,
161,
20,
164,
14,
4148,
2102,
8820,
13305,
37,
363,
51,
3010,
1797,
60,
26,
823,
15,
26,
14,
1021,
13305,
15,
31,
259,
20,
788,
679,
8209,
504,
679,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 analogue of the PostSharp required
===
Can't anybody advice me the analogue of PostSharp? It should be attribute-based and use code injection into assembly. And it will be nice if this library is free.
Thank you | 0 | [
2,
551,
21574,
16,
14,
678,
23646,
1390,
800,
3726,
3726,
92,
22,
38,
11181,
4978,
55,
14,
21574,
16,
678,
23646,
60,
32,
378,
44,
35,
14755,
8,
1281,
17,
275,
1797,
13646,
77,
1475,
9,
17,
32,
129,
44,
2210,
100,
48,
1248,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Why isn't graphics acceleration turned on by default in Honeycomb?
===
Why isn't graphics acceleration turned on by default in Honeycomb? Are there any situations when it's better to leave it disabled? | 0 | [
2,
483,
2532,
22,
38,
8351,
17661,
412,
27,
34,
12838,
19,
29806,
60,
800,
3726,
3726,
483,
2532,
22,
38,
8351,
17661,
412,
27,
34,
12838,
19,
29806,
60,
50,
80,
186,
8329,
76,
32,
22,
18,
574,
20,
767,
32,
10154,
60,
3,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
web manifesto... forgot the author's name
===
I don't think it's labeled a "manifesto" but it's basically about how websites should work. One of the things in the list is that it should be accessible via GETs and not POSTs. Have clean extensionless urls, etc... I've seen it linked to a couple of times by bloggers I am just drawing a complete blank on how to find it now. | 0 | [
2,
2741,
18570,
9,
9,
9,
9564,
14,
1314,
22,
18,
204,
800,
3726,
3726,
31,
221,
22,
38,
277,
32,
22,
18,
14348,
21,
13,
7,
8002,
9962,
111,
7,
47,
32,
22,
18,
11374,
88,
184,
13931,
378,
170,
9,
53,
16,
14,
564,
19,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The way to stop and continue animation while mouseover and mouseout in JQuery!?
===
E.g:
a simple example to explain:
$('.moveDiv').animate({ "margin-left": 2000 }, 20000, 'linear');
the `moveDiv element` would move to left when it was loaded,and now, when the `mouse move over` the `moveDiv element`, I wish it to stop and continue to move when the `mouse move out`!
Any ideas?
I found this code in this [question of stackoverflow][1],so , I just want to modify the code to make it could stop and continue animation when mouse hover!!
[the demo of the code][2]
Thank you very much!!
[1]: http://stackoverflow.com/questions/2143056/seamless-jquery-marquee
[2]: http://jsbin.com/uyawi/3/edit | 0 | [
2,
14,
161,
20,
747,
17,
1816,
6236,
133,
7567,
2549,
17,
7567,
1320,
19,
487,
8190,
93,
187,
60,
800,
3726,
3726,
13,
62,
9,
263,
45,
21,
1935,
823,
20,
3271,
45,
5579,
5,
22,
9,
16598,
12916,
22,
6,
9,
3443,
5281,
5,
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... |
using jquery to return dates
===
I am making a JQuery call to a web method and returning JSON, but I have a problem when I try to return dates, they come back in the format /Date(1298073600000)/. Can anybody help?
$(document).ready(function() {
$.ajax(
{
type: "POST",
url: "/CDServices.asmx/GetWeekEndingDates",
data: "{}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function(msg) {
alert(msg.d.LastWeekEndingDate);
}
});
}); | 0 | [
2,
568,
487,
8190,
93,
20,
788,
4076,
800,
3726,
3726,
31,
589,
544,
21,
487,
8190,
93,
645,
20,
21,
2741,
2109,
17,
2485,
487,
528,
15,
47,
31,
57,
21,
1448,
76,
31,
1131,
20,
788,
4076,
15,
59,
340,
97,
19,
14,
2595,
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... |
Clarfication on pointer arithmetic
===
*(*(p+a)+b)
If a*size is added to an address (p), then why is b*size added to *(p+a)? *(p+a) appears to be the value at that location and adding b*size to it would change its value, not the address. However, based on what I read this is meant to be added to an address. | 0 | [
2,
13,
12078,
15261,
857,
27,
454,
106,
21211,
800,
3726,
3726,
1637,
5,
2483,
5,
306,
2430,
58,
6,
2430,
220,
6,
100,
21,
2483,
10454,
25,
905,
20,
40,
3218,
13,
5,
306,
6,
15,
94,
483,
25,
334,
2483,
10454,
905,
20,
1637,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 NDK - Eclipse can't include jni.h
===
So I'm using Eclipse 4.2 to build my projects which imports native functions in Java.
Everything build fine with eclipse and yesterday everything worked fine.
Today my eclipse stopped to resolve jni.h headers and others android header and shows me errors.
My project builds correctly but eclipse forbids me running application with message saying that there are errors in my application.
I have all paths to symbols in project paths and symbols c,cpp.
And it was working without errors... My only solution right now is to build project, then restart eclipse and run application... | 0 | [
2,
13005,
13,
706,
197,
13,
8,
11652,
92,
22,
38,
468,
487,
889,
9,
252,
800,
3726,
3726,
86,
31,
22,
79,
568,
11652,
268,
9,
135,
20,
1895,
51,
2314,
56,
20617,
1275,
3719,
19,
8247,
9,
796,
1895,
1123,
29,
11652,
17,
7124,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running consol application in debug mode with WCF selfhosting?
===
I have a WCF service hosted in a consol application(that also acts as the Windows Service installer), pleas see more here : [http://msdn.microsoft.com/en-us/library/ms733069.aspx][1]
This is how the class in the consol application looks like :
public class MyAppWindowsService : ServiceBase
{
public ServiceHost _MyAppClientServiceHost = null;
public ServiceHost _MyAppIntegrationServiceHost = null;
public ServiceHost _MyAppserviceHost = null;
public MyAppWindowsService()
{
// Name the Windows Service
ServiceName = "MyApp Service";
}
public static void Main()
{
ServiceBase.Run(new MyAppWindowsService());
}
private void StopService(ServiceHost serviceHost)
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
}
}
private ServiceHost StartService(Type serviceType)
{
ServiceHost serviceHost = null;
// Create a ServiceHost for the CalculatorService type and
// provide the base address.
serviceHost = new ServiceHost(serviceType);
// Open the ServiceHostBase to create listeners and start
// listening for messages.
serviceHost.Open();
return serviceHost;
}
private void StartServices()
{
StopService(_MyAppClientServiceHost);
StopService(_MyAppIntegrationServiceHost);
StopService(_MyAppServiceHost);
_MyAppClientServiceHost = StartService(typeof(MyApp.ServiceImplementation.MyAppClientService));
_MyAppIntegrationServiceHost = StartService(typeof(MyApp.ServiceImplementation.MyAppIntegration));
_MyAppServiceHost = StartService(typeof(MyApp.ServiceImplementation.HL7Service));
}
private void StopServices()
{
StopService(_MyAppClientServiceHost);
StopService(_MyAppIntegrationServiceHost);
StopService(_MyAppHl7ServiceHost);
}
// Start the Windows service.
protected override void OnStart(string[] args)
{
StartServices();
}
protected override void OnStop()
{
StopServices();
}
}
This is made for running in a Windows Service, how do I make so I can run this as a regular selfhost in debug mode(during development)? or do I really have to start a special project to be able to debug this servuce during runtime?
[1]: http://msdn.microsoft.com/en-us/library/ms733069.aspx | 0 | [
2,
946,
1065,
5594,
3010,
19,
121,
16254,
3740,
29,
11801,
410,
1119,
11694,
68,
60,
800,
3726,
3726,
31,
57,
21,
11801,
410,
365,
2812,
19,
21,
1065,
5594,
3010,
5,
887,
67,
3167,
28,
14,
1936,
365,
16146,
106,
6,
15,
10797,
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... |
LINQ Join Cout Include
===
I have two tables "Codes" and "Views" and want to get a list of the 20 Codes with most views since x days ago (thats my variable dt).
Im able to get the list and sort it, but i have a problem i also would like to include 2 other tables "User" and "Language".
var query =
from f in _db.Codes
select new
{
code = f,
PostCount = f.ViewModels.Count(p => p.timestamp > dt)
};
var result = query.OrderByDescending(X => X.PostCount).Select(y => y.code).Take(20)
But after doing like this im not able to Include my other tables. I tried to convert the result to a ObjectQuery but then it becomes null (there are 20 Codes in the result before trying to convert it).
| 0 | [
2,
6294,
1251,
1865,
272,
1320,
468,
800,
3726,
3726,
31,
57,
81,
7484,
13,
7,
9375,
18,
7,
17,
13,
7,
4725,
18,
7,
17,
259,
20,
164,
21,
968,
16,
14,
434,
11358,
29,
127,
4146,
179,
993,
509,
1464,
13,
5,
887,
18,
51,
761... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Neo4j Blueprints vs Native Traversal Speed . .
===
I am doing a performance test of neo4j's traversal speed between neo4j's blueprints and native implementation. I have created a graph of 1000 nodes with 1 node per level i.e.
O->O->O->O->. . . .->O
I have recorded an iteration (for loop code) time of 90ms, 93ms and 79ms (ran 3 times) using this blueprints code:
Iterable<Vertex> vertices = testGraph.getVertices();
//Code block which was measured.
for(Vertex vertex : vertices){};
and using native code 270ms, 268ms and 321ms:
Iterable<Node> nodes = Traversal.description().breadthFirst().relationships(CustomRelTypes.LINKED_TO, Direction.OUTGOING).evaluator(Evaluators.all()).traverse(rootNode).nodes();
//Code block which was measured.
for(Node node : nodes){}
I cant understand how is neo4j's blueprints implementation is faster. I havent done any special configuration for any one of them. Time is almost same for depthFirst too.
does anyone how i can speed up native performance to match blueprints'.
thank you.
| 0 | [
2,
4368,
300,
728,
26272,
18,
4611,
1275,
19501,
192,
1362,
13,
9,
13,
9,
800,
3726,
3726,
31,
589,
845,
21,
956,
1289,
16,
4368,
300,
728,
22,
18,
19501,
192,
1362,
128,
4368,
300,
728,
22,
18,
26272,
18,
17,
1275,
6123,
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... |
ArrayList keeps filling with same data
===
I have a very wierd problem. I have some data which I show in a Dialog. If I close the App and reopen it again my ArrayList always adds the original data again (First 5 entries -> close & reopen -> 10 entries -> close & reopen -> 15 entries etc.).
This is how I parse my data into the ArrayList (This only happens once in my TabHost):
JSONArray jPDFs = json.getJSONArray("pdfs");
for (int i = 0; i < jPDFs.length(); i++) {
JSONObject c3 = jPDFs.getJSONObject(i);
String pdf_title = c3.getString("title");
String pdf_url = c3.getString("url");
pdfListTitle.add(pdf_title);
pdfListTitle2.add(pdf_title);
pdfListURL.add(pdf_url);
}
And here is my Code where I show the dialog with the parsed data:
public void showDialog() {
items = null; // have tried with and without...
builder = null; // have tried with and without...
builder = new AlertDialog.Builder(this);
Log.e(TabHost.LOG_TAG, "pdfListTitle=" + TabHost.pdfListTitle.size()); // this always hops from 5 -> 10 -> 15 on every reopen (without killing the app with a taskkiller...)
items = TabHost.pdfListTitle.toArray(new CharSequence[TabHost.pdfListTitle.size()]);
builder.setTitle(R.string.choose_document);
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
WebView wv = (WebView) findViewById(R.id.webviewpdf);
wv.setWebViewClient(new WebViewClient());
wv.getSettings().setJavaScriptEnabled(true);
wv.getSettings().setBuiltInZoomControls(true);
wv.loadUrl("http://docs.google.com/gview?embedded=true&url="
+ TabHost.pdfListURL.get(item));
}
});
AlertDialog alert = builder.create();
alert.show();
}
Thanks alot in advance for your help! | 0 | [
2,
7718,
5739,
8968,
7702,
29,
205,
1054,
800,
3726,
3726,
31,
57,
21,
253,
11842,
897,
1448,
9,
31,
57,
109,
1054,
56,
31,
298,
19,
21,
28223,
9,
100,
31,
543,
14,
4865,
17,
21398,
32,
188,
51,
7718,
5739,
550,
10621,
14,
501... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Jquery validation with Data Annotations in MVC3 without use of Unobstrusive
===
I have a class:
public class EditableOrder
{
[Required(ErrorMessage = "Order ID is required.")]
public int OrderID
{
get;
set;
}
[StringLength(5, ErrorMessage = "Customer ID must be 5 characters.")]
public string CustomerID
{
get;
set;
}
}
I want get validation attributes( [Required(ErrorMessage = "Order ID is required.")]) defined in the above class in jquery.
For jquery validation i need to add class to input element to validate input.
but i cant able to get [Required] attribute in jquery.
Note: without using unobstrusive
Thanks...
| 0 | [
2,
487,
8190,
93,
27999,
29,
1054,
40,
1270,
7504,
19,
307,
8990,
240,
366,
275,
16,
367,
4995,
11602,
18,
1284,
800,
3726,
3726,
31,
57,
21,
718,
45,
317,
718,
9392,
579,
7861,
13,
1,
636,
99,
3003,
2095,
5,
29992,
3845,
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... |
Dynamically created user control validation not working
===
I have created a user control that is a textbox with some validation which I am adding dynamically to a grid. The grid's data source is from a dataset.
Because of this I am looping through my grid and loading the control to specific cells in the grid where I want them to be.
The problem I have is because I am adding this control dynamically, this somehow stops the validation from working.
**User Control**
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TextboxPercentage.ascx.cs"
Inherits="tesco.User_Controls.TextboxPercentage" %>
<%@ register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc2" %>
<div id="percentage">
<asp:TextBox runat="server" ID="txtPercentage" Width="40" onfocus="if (this.value=='0') this.value='';" onblur="if
(this.value=='') this.value='0';" Text="0"></asp:TextBox>
<asp:Label runat="server" ID="lbl1">%</asp:Label>
<asp:RegularExpressionValidator ID="Reg_percentage" ControlToValidate="txtPercentage"
runat="server" ErrorMessage="Numbers with 18 digits and two decimal values only. eg.9999999.99"
Display="None" ValidationExpression="\b\d{1,18}\.?\d{0,2}" Enabled="true"></asp:RegularExpressionValidator>
<asp:RangeValidator ID="rval_percentage" ControlToValidate="txtPercentage" MinimumValue="0"
MaximumValue="100" Type="Double" runat="server" ErrorMessage="Numbers between 0-100 only" Display="None" ></asp:RangeValidator>
<cc2:ValidatorCalloutExtender ID="vce_percentage_value" runat="server" TargetControlID="Reg_percentage"
Enabled="True">
</cc2:ValidatorCalloutExtender>
<cc2:ValidatorCalloutExtender ID="vce_percentage_range" runat="server" TargetControlID="rval_percentage"
Enabled="True">
</cc2:ValidatorCalloutExtender>
</div>
**Code behind**
GridView1.DataSource = ds;
GridView1.DataBind();
AssignCellCoordinates();
private void AssignCellCoordinates()
{
// Create IDs for Grid
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridView1.Rows[i].ID = "r" + i; // Row ID
for (int ii = 0; ii < GridView1.Rows[i].Cells.Count; ii++)
{
GridView1.Rows[i].Cells[ii].ID = "c" + ii; // Cell ID
if (GridView1.Rows[i].ID == "r25" || GridView1.Rows[i].ID == "r26" || GridView1.Rows[i].ID == "r27")
{
if (GridView1.Rows[i].Cells[ii].ID != "c0")
{
User_Controls.TextboxPercentage txtPerc = (User_Controls.TextboxPercentage)LoadControl("~/User_Controls/TextboxPercentage.ascx");
GridView1.Rows[i].Cells[ii].Controls.Add(txtPerc);
}
}
}
}
}
As you can see I loop through a row and for each row iteration I add cell IDs until I reach total cells for one row. Within my inner loop I add the control if its certain cell id. But my validation doesn't work.
Anyone have ideas why this is?
Thanks
| 0 | [
2,
7782,
1326,
679,
4155,
569,
27999,
52,
638,
800,
3726,
3726,
31,
57,
679,
21,
4155,
569,
30,
25,
21,
1854,
5309,
29,
109,
27999,
56,
31,
589,
4721,
7782,
1326,
20,
21,
7354,
9,
14,
7354,
22,
18,
1054,
1267,
25,
37,
21,
1054... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Any IPC Mechanisms between Java and C in Windows - Dont want Sockets
===
My requirement is to IPC between a C client and Java server on Windows using JSON strings.
Just realized that I can't use named pipe ("\\.\pipe\filename") in Windows from java. I'm not too keen on using any network based architecture, because its gonna get more complicated to ensure the security and speed.
Kindly suggest any shared memory/fast solution you happen to know?
Thanks in Advance :)
| 0 | [
2,
186,
31,
5779,
11626,
128,
8247,
17,
272,
19,
1936,
13,
8,
1049,
259,
18482,
18,
800,
3726,
3726,
51,
8981,
25,
20,
31,
5779,
128,
21,
272,
6819,
17,
8247,
8128,
27,
1936,
568,
487,
528,
7887,
9,
114,
1896,
30,
31,
92,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VOIP application with ovh
===
Any one know if it is possible to implement VOIP service in application iPhone with OVH ( http://www.ovh.co.uk/telephony/ )
Thanks | 0 | [
2,
18742,
306,
3010,
29,
13,
2026,
252,
800,
3726,
3726,
186,
53,
143,
100,
32,
25,
938,
20,
8713,
18742,
306,
365,
19,
3010,
21024,
29,
13,
2026,
252,
13,
5,
7775,
6903,
6483,
9,
2026,
252,
9,
716,
9,
2185,
118,
14305,
22031,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Using BufferedImage in J2ME
===
Is there a way to implement BufferedImage class in a J2ME project? I desperately need it for HSV image processing! | 0 | [
2,
568,
17497,
69,
22039,
19,
487,
135,
790,
800,
3726,
3726,
25,
80,
21,
161,
20,
8713,
17497,
69,
22039,
718,
19,
21,
487,
135,
790,
669,
60,
31,
9832,
376,
32,
26,
746,
18,
710,
1961,
5511,
187,
3,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Queue click() events with jQuery
===
Is it possible to somehow attach a click event handler to an element, which will be called after all others?
I have an another click event handler registered with `.click()` and I'd like to attach another function call, which will be executed after the previous one, without using `setTimeout()`.
Cheers,
Till | 0 | [
2,
22521,
10840,
5,
6,
963,
29,
487,
8190,
93,
800,
3726,
3726,
25,
32,
938,
20,
3625,
19514,
21,
10840,
807,
24641,
20,
40,
4520,
15,
56,
129,
44,
227,
75,
65,
654,
60,
31,
57,
40,
226,
10840,
807,
24641,
3801,
29,
13,
1,
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... |
Kohana 3.1 Auth, password field wont generate an error
===
My Kohana view file looks like:
<?=Form::open('/signup/user');?>
<?=Form::label('username', 'Username: ')?>
<?=Form::input('username', isset($username)?$username:''); ?>
<br />
<?=Form::label('password', 'Password: ')?>
<?=Form::password('password', ''); ?>
<br />
<?=Form::label('confirm', 'Re-enter Password: ')?>
<?=Form::password('confirm', ''); ?>
<br />
<?=Form::label('email', 'Email: ')?>
<?=Form::input('email', ''); ?>
<?=Form::submit('submit', "Submit"); ?>
<?=Form::close()?>
And my controller:
public function action_user(){
if($this->request->method() == "POST"){
$this->template->set('username', $this->request->post('username'));
$user = ORM::factory('user');
try{
$user->values($_POST)->save();
}catch(ORM_Validation_Exception $e){
var_dump($e->errors());
}
}
}
The problem is that the latter would accept a form with empty password or non-matching passwords and writes it in Database. The username and Emails field validation works fine but I am not sure how to validate password field.
| 0 | [
2,
1584,
7285,
203,
9,
165,
10343,
96,
15,
20884,
575,
7290,
7920,
40,
7019,
800,
3726,
3726,
51,
1584,
7285,
1418,
3893,
1879,
101,
45,
13,
1,
60,
3726,
4190,
45,
45,
10157,
5,
22,
118,
11255,
576,
118,
16704,
22,
6,
73,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Return a message from a Stored Proc to C# app
===
I have a stored proc that adds a user and at each permission i add, i want to start building a success message.
My proc runs fine but how do i get that success message back into a message dialog in my app?
I want to display the below @text in a messagebox in my C# app.
DECLARE @text NVARCHAR(1000)
SET @text = 'This is line 1.' + CHAR(13)+CHAR(10) + 'This is line 2.'
SELECT @text
**This is my call in my C# app:**
public DataTable CreateOrDropUser(string dataBase, string procedure, SqlParameter[] parameters)
{
try
{
if (dataBase.Length > 0) { procedure = dataBase + ".." + procedure; } //Set procedure to DBNAME..ProcedureName
SqlCommand cmd1 = new SqlCommand(procedure, con);
cmd1.CommandType = CommandType.StoredProcedure;
foreach (SqlParameter p in parameters)
{
if (p != null)
{
cmd1.Parameters.Add(p);
}
}
con.Open();
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(cmd1);
da.Fill(dt);
con.Close();
MessageBox.Show("Success"); //This should display the @text variable in my proc
return dt;
}
catch (Exception ex)
{
try
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
}
catch
{
MessageBox.Show("Could not connect to database. Check settings. " + ex.Message, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
MessageBox.Show(ex.Message);
return null;
}
}
| 0 | [
2,
788,
21,
2802,
37,
21,
8214,
13,
15617,
20,
272,
5910,
4865,
800,
3726,
3726,
31,
57,
21,
8214,
13,
15617,
30,
10621,
21,
4155,
17,
35,
206,
5572,
31,
3547,
15,
31,
259,
20,
799,
353,
21,
1280,
2802,
9,
51,
13,
15617,
1461,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 be restful with url params
===
I am having a problem with structuring rails application. Let's say that I have a Style model and I want to have listed 5 featured ones on my page root (/), and browse option where I can set listing from the oldest to the newest and vice versa.
> http://example.com/ - five featured
> http://example.com/styles/newest -
> all newest http://example.com/styles/oldest - all oldest
How do I code the controller and routes? I've tried separate controllers for five featured and for all with if statement ( something like if params[:order] == 'oldest' then @styles = Style.oldest), but this doesn't seem to be either working or logical. | 0 | [
2,
184,
20,
44,
760,
1566,
29,
287,
6362,
2258,
79,
18,
800,
3726,
3726,
31,
589,
452,
21,
1448,
29,
13,
10346,
10450,
2240,
18,
3010,
9,
408,
22,
18,
395,
30,
31,
57,
21,
1034,
1061,
17,
31,
259,
20,
57,
1510,
331,
1070,
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... |
Bug reporting tool
===
I'm searching for a tool or library that can be connected to an application and keeps track of what the user has been doing: opened windows, actions performed and so on, within the context of an application. Something like log4j or log4net or...
The aim is to attach that information to a stack trace, platform useful information and all that and help us to fix bugs.
Is there such an application?
What I want is not a bug tracker; I know a lot about lots of them: Jira, Mantis, Bugzilla, OnTime, VersionOne, Rally...
What I really want is some software that "attached" somehow to my application does the same (well not the same because it's amazing, so let's say "does its best") as VisualStudio 2010 Ultimate IntelliTrace feature, or something like Firefox, Thunderbird or even Windows when something goes wrong.
Something like showing a dialog to the user to send a report of the crash or eventual error including the message and stacktrace (of course), and additionally a description of the steps followed that led to that situation.
That'd be really great.
Of course we could develop that in our application, but if there's something out there already done and working fine... | 0 | [
2,
6256,
6670,
5607,
800,
3726,
3726,
31,
22,
79,
5792,
26,
21,
5607,
54,
1248,
30,
92,
44,
2587,
20,
40,
3010,
17,
8968,
792,
16,
98,
14,
4155,
63,
74,
845,
45,
520,
1936,
15,
3078,
986,
17,
86,
27,
15,
363,
14,
4141,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iPhone/Objective - C - How to display the whole text of a long string in a UILabel
===
I have a very long string which is something like that below...
[[sqrt(221)-10,-sqrt(221)-10],[11,11]],[[rootof([[474368400,237184200,-125944810200,258530778000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)+rootof([[409681800,9099248400,-99876110400,-1875803589000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*3,rootof([[-3439170900,-50638826700,864180632700,9670592794500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)+rootof([[1477010700,22974524100,-369910322100,-4442729593500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*3],[rootof([[474368400,237184200,-125944810200,258530778000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*2+rootof([[409681800,9099248400,-99876110400,-1875803589000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*4,rootof([[-3439170900,-50638826700,864180632700,9670592794500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*2+rootof([[1477010700,22974524100,-369910322100,-4442729593500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*4]],[sqrt(sqrt(221)+15),sqrt(-sqrt(221)+15)]
How can i display the whole thing in a UILabel with more than one lines (0)?
Also, although there are no linebreaks ("\n") in the string, the result is displayed like below....
[[sqrt(221)-10,-sqrt(221)-<br> 10],[11,11]],[[rootof([[474368400,2<br> 37184200,-<br> 125944810200,258530778000],[1,<br> 0,-<br> 472,884,42215]])/(sqrt(221)*78270<br>
========================================================================
Any help?
PS I could upload an image but i am not allowed beacause i am a new user... | 0 | [
2,
21024,
118,
23793,
1284,
13,
8,
272,
13,
8,
184,
20,
3042,
14,
979,
1854,
16,
21,
175,
3724,
19,
21,
13,
5661,
21018,
800,
3726,
3726,
31,
57,
21,
253,
175,
3724,
56,
25,
301,
101,
30,
1021,
9,
9,
9,
636,
2558,
18,
1251,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 load data to a form using javascript
===
i want to load data from mysql database to a http form
<form method="post" action="convert.php">
Id<input type="text" name="id" size="5" onchange="FetchUser(this.value)"/>
Name<input type="text" name="name" />
Age<input type="text" name="" size="2" />
</form>
when i type the in the text it should load the name of the person
function FetchUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("name").value=xmlhttp.responseText;
}
}
xmlhttp.open("GET","finduser.php?q="+str,true);
xmlhttp.send();
}
</script>
the php code for that.
<?php
$q=$_GET["q"];
$con = mysql_connect('localhost', 'root', '123456789');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("name", $con);
$sql="SELECT * FROM user WHERE id = '".$q."'";
$result = mysql_query($sql);
?>
my question is how i can get the both name and age to the text boxes
| 0 | [
2,
184,
92,
31,
6305,
1054,
20,
21,
505,
568,
8247,
8741,
800,
3726,
3726,
31,
259,
20,
6305,
1054,
37,
51,
18,
22402,
6018,
20,
21,
7775,
505,
13,
1,
4190,
2109,
3726,
7,
6962,
7,
1028,
3726,
7,
1126,
8122,
9,
26120,
7,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delay using h.264 video decoder mediafoundation
===
I am streaming my content using H.264 encoder and wish to decode the content using H.264 decoder.
The encoding topology is like
Source --> H.264 Encoder --> NetDump
and the decoding topology is like
NetSource --> H.264 Decoder --> EVR
We are able to make our the decoding topology but output video produce the delay around more than 1 sec .Please suggest some solution for that delay .any help will be appreciate
Regard's Chetan shawroop | 0 | [
2,
7255,
568,
746,
9,
20470,
763,
12015,
1157,
941,
12235,
857,
800,
3726,
3726,
31,
589,
11920,
51,
2331,
568,
746,
9,
20470,
20523,
139,
17,
2536,
20,
121,
9375,
14,
2331,
568,
746,
9,
20470,
12015,
1157,
9,
14,
19608,
21661,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java Swing recursive layout
===
I know this might seem like a duplicate, but I'm not getting anywhere with by experimenting on invalidate/validate/revalidate/repaint, so please bear with me. My panel structure looks something like this:
JPanel/GridBagLayout (1)
+-- JPanel/BorderLayout
+-- JPanel/GridBagLayout (2)
| +-- JTextField (3)
| +-- JComboBox
+-- JPanel/WhateverLayout
...
... and so forth. In my sub panel `(2)` I change the insets (right and bottom), and I want to layout the whole top panel `(1)`. Is there some easy way to layout everything (preferably from top panel `(1)` and down, but anything that works is okey). Right now I've tried combinations of invalidate/validate/revalidate/repaint on all levels, but nothing seems to work (in fact nothing changes at all). Thanks! | 0 | [
2,
8247,
5587,
302,
24244,
9106,
800,
3726,
3726,
31,
143,
48,
530,
2260,
101,
21,
19429,
15,
47,
31,
22,
79,
52,
1017,
4922,
29,
34,
5737,
68,
27,
16671,
1373,
118,
18506,
8209,
118,
99,
18506,
8209,
118,
99,
20578,
15,
86,
224... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Want to avoid extra stuff when writing xml to output file
===
i am new to this stackoverflow group. So first of all warm greetings to all of you from my side.
My question is when after modifying my XML file I write it to an output XML file using XMLOutputter of JDOM it writes a lot of extra stuff in the output XML file. I want to avoid that.
Its very Urgent. Please help asap. Thanks everyone.....
Anyone can mail me :
My mail-id is : sudeep715@gmail.com
My original xml snippet is:
<level leveltype="comm1"><bodytext searchtype="LEGISLATION"><legfragment><leg:level><leg:level-vrnt leveltype="section"><leg:heading inline="true"><desig searchtype="SEC-NUM"><desiglabel>S.</desiglabel><designum>9.</designum></desig><title searchtype="FORM-TITLE"><refpt id="dlacs009" type="ext"/>Interim measures, etc. by court.</title></leg:heading><leg:levelbody><leg:bodytext><pgrp><p><text>—A party may, before, or during arbitral proceedings or at any time after the making of the arbitral award but before it is enforced in accordance with <ci:cite searchtype="LEG-REF"><ci:sesslaw><ci:sesslawinfo><ci:jurisinfo><ci:in/></ci:jurisinfo><ci:hier><ci:hierlev label="section" num="36"/></ci:hier></ci:sesslawinfo><ci:sesslawref><ci:standardname normpubcode="IN1996AACA01"/></ci:sesslawref></ci:sesslaw><ci:content>section 36</ci:content></ci:cite>, apply to a court—</text></p><l><li><lilabel>( <emph typestyle="it">i</emph>)</lilabel><p><text>for the appointment of a guardian for a minor or a person of unsound mind for the purposes of arbitral proceedings; or</text></p></li><li><lilabel>( <emph typestyle="it">ii</emph>)</lilabel><p><text>for an interim measure of protection in respect of any of the following matters, namely :—</text><l><li><lilabel>( <emph typestyle="it">a</emph>)</lilabel><p><text>the preservation, interim custody or sale of any goods which are the subject-matter of the arbitration agreement;</text></p></li><li><lilabel>( <emph typestyle="it">b</emph>)</lilabel><p><text>securing the amount in dispute in the arbitration;</text></p></li><li><lilabel>( <emph typestyle="it">c</emph>)</lilabel><p><text>the detention, preservation or inspection of any property or thing which is the subject-matter of the dispute in arbitration, or as to which any question may arise therein and authorising for any of the aforesaid purposes any person to enter upon any land or building in the possession of any party, or authorising any samples to be taken or any observation to be made, or experiment to be tried, which may be necessary or expedient for the purpose of obtaining full information or evidence;</text></p></li><li><lilabel>( <emph typestyle="it">d</emph>)</lilabel><p><text>interim injunction or the appointment of a receiver;</text></p></li><li><lilabel>( <emph typestyle="it">e</emph>)</lilabel><p><text>such other interim measure of protection as may appear to the court to be just and convenient,</text></p></li></l></p></li></l><p><text>and the Court shall have the same power for making orders as it has for the purpose of, and in relation to, any proceedings before it.</text></p></pgrp></leg:bodytext></leg:levelbody></leg:level-vrnt></leg:level></legfragment></bodytext><bodytext searchtype="COMMENTARY"><pgrp><p><text><emph typestyle="bf">UNCITRAL Model Law</emph></text></p><p><text>For the text of the related UNCITRAL Model Law, Analytical Commentary on Draft Model Law and UNCITRAL Report on Adoption of Model Laws, see <emph typestyle="it">Appendix 1</emph>.</text></p></pgrp><pgrp><p><text><emph typestyle="bf">COMMENTS</emph></text></p></pgrp><pgrp><p><text><emph typestyle="bf">1. Interim order by court</emph></text></p><p><text>A party to an Arbitration may apply to Court for Interim Orders. Such an application may be made before, during, or after the proceedings, but before enforcement of the Award. Such a prayer may be made for the appointment of a Guardian of a Minor child or for a person of unsound mind for an interim order for protection, interim custody, sale of goods, securing amount in dispute, detention, preservation or inspection of any property. An order may be made for inspection of the disputed goods or the property or for anything to obtain requisite evidence. Interim injunction may be issued or a receiver may be appointed. Any other relevant orders may be made for protection and preservation of the interests of the parties concerned. Further and other orders may be made as the Court may think it fit and proper.</text></p></pgrp><pgrp><p><text><emph typestyle="bf">2. Interim measure by court</emph></text></p><p><text><ci:cite searchtype="LEG-REF"><ci:sesslaw><ci:sesslawinfo><ci:jurisinfo><ci:in/></ci:jurisinfo><ci:hier><ci:hierlev label="section" num="9"/></ci:hier></ci:sesslawinfo><ci:sesslawref><ci:standardname normpubcode="IN1996AACA01"/></ci:sesslawref></ci:sesslaw><ci:content>Section 9</ci:content></ci:cite>
My output XML snippet is :
<level leveltype="comm1" subdoc="false" ln.type="seg" ln.segname="TEXT-1" ln.nsprefix="lnv:">
<bodytext searchtype="LEGISLATION" ln.nsprefix="lnvxe:">
<legfragment ln.nsprefix="lnvxe:">
<leg:level subdoc="false" ln.type="seg" ln.segname="LEG-TEXT-1" ln.nsprefix="lnv:">
<leg:level-vrnt leveltype="section" subdoc="false" ln.nsprefix="lnvxe:">
<leg:heading inline="true" subdoc="false" ln.nsprefix="lnvxe:">
<desig searchtype="SEC-NUM" ln.nsprefix="lnvxe:">
<desiglabel ln.nsprefix="lnvxe:">S.</desiglabel>
<designum ln.nsprefix="lnvxe:">9.</designum>
</desig>
<title searchtype="FORM-TITLE" ln.nsprefix="lnvxe:">
<refpt id="dlacs009" type="ext" ln.nsprefix="NONE" />
Interim measures, etc. by court.
</title>
</leg:heading>
<leg:levelbody ln.nsprefix="lnvxe:">
<leg:bodytext ln.nsprefix="lnvxe:">
<pgrp subdoc="false" ln.nsprefix="lnvxe:">
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
—A party may, before, or during arbitral proceedings or at any time after the making of the arbitral award but before it is enforced in accordance with
<ci:cite searchtype="LEG-REF" srcstatus="normal" impcit="main" pub="none" pub-status="none" loadable="1" historycite="0" validate="1" xlink.show="replace" xlink.actuate="user" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:sesslaw status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:sesslawinfo status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:jurisinfo status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:in status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:jurisinfo>
<ci:hier status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:hierlev label="section" num="36" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:hier>
</ci:sesslawinfo>
<ci:sesslawref official="0" regional="0" publicdomain="0" xlink.show="replace" xlink.actuate="user" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:standardname normpubcode="IN1996AACA01" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:sesslawref>
</ci:sesslaw>
<ci:content popname="0" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">section 36</ci:content>
</ci:cite>
, apply to a court—
</text>
</p>
<l ln.nsprefix="lnvxe:" type="def">
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">i</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">for the appointment of a guardian for a minor or a person of unsound mind for the purposes of arbitral proceedings; or</text>
</p>
</li>
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">ii</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">for an interim measure of protection in respect of any of the following matters, namely :—</text>
<l ln.nsprefix="lnvxe:" type="def">
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">a</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">the preservation, interim custody or sale of any goods which are the subject-matter of the arbitration agreement;</text>
</p>
</li>
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">b</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">securing the amount in dispute in the arbitration;</text>
</p>
</li>
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">c</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">the detention, preservation or inspection of any property or thing which is the subject-matter of the dispute in arbitration, or as to which any question may arise therein and authorising for any of the aforesaid purposes any person to enter upon any land or building in the possession of any party, or authorising any samples to be taken or any observation to be made, or experiment to be tried, which may be necessary or expedient for the purpose of obtaining full information or evidence;</text>
</p>
</li>
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">d</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">interim injunction or the appointment of a receiver;</text>
</p>
</li>
<li ln.nsprefix="lnvxe:">
<lilabel ln.nsprefix="lnvxe:">
(
<emph typestyle="it" ln.nsprefix="NONE">e</emph>
)
</lilabel>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">such other interim measure of protection as may appear to the court to be just and convenient,</text>
</p>
</li>
</l>
</p>
</li>
</l>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">and the Court shall have the same power for making orders as it has for the purpose of, and in relation to, any proceedings before it.</text>
</p>
</pgrp>
</leg:bodytext>
</leg:levelbody>
</leg:level-vrnt>
</leg:level>
</legfragment>
</bodytext>
<bodytext searchtype="COMMENTARY" ln.nsprefix="lnvxe:">
<pgrp subdoc="false" ln.nsprefix="lnvxe:">
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
<emph typestyle="bf" ln.nsprefix="NONE">UNCITRAL Model Law</emph>
</text>
</p>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
For the text of the related UNCITRAL Model Law, Analytical Commentary on Draft Model Law and UNCITRAL Report on Adoption of Model Laws, see
<emph typestyle="it" ln.nsprefix="NONE">Appendix 1</emph>
.
</text>
</p>
</pgrp>
<pgrp subdoc="false" ln.nsprefix="lnvxe:">
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
<emph typestyle="bf" ln.nsprefix="NONE">COMMENTS</emph>
</text>
</p>
</pgrp>
<pgrp subdoc="false" ln.nsprefix="lnvxe:">
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
<emph typestyle="bf" ln.nsprefix="NONE">1. Interim order by court</emph>
</text>
</p>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">A party to an Arbitration may apply to Court for Interim Orders. Such an application may be made before, during, or after the proceedings, but before enforcement of the Award. Such a prayer may be made for the appointment of a Guardian of a Minor child or for a person of unsound mind for an interim order for protection, interim custody, sale of goods, securing amount in dispute, detention, preservation or inspection of any property. An order may be made for inspection of the disputed goods or the property or for anything to obtain requisite evidence. Interim injunction may be issued or a receiver may be appointed. Any other relevant orders may be made for protection and preservation of the interests of the parties concerned. Further and other orders may be made as the Court may think it fit and proper.</text>
</p>
</pgrp>
<pgrp subdoc="false" ln.nsprefix="lnvxe:">
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
<emph typestyle="bf" ln.nsprefix="NONE">2. Interim measure by court</emph>
</text>
</p>
<p ln.nsprefix="NONE">
<text ln.nsprefix="lnvxe:">
<ci:cite searchtype="LEG-REF" srcstatus="normal" impcit="main" pub="none" pub-status="none" loadable="1" historycite="0" validate="1" xlink.show="replace" xlink.actuate="user" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:sesslaw status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:sesslawinfo status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:jurisinfo status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:in status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:jurisinfo>
<ci:hier status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:hierlev label="section" num="9" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:hier>
</ci:sesslawinfo>
<ci:sesslawref official="0" regional="0" publicdomain="0" xlink.show="replace" xlink.actuate="user" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">
<ci:standardname normpubcode="IN1996AACA01" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:" />
</ci:sesslawref>
</ci:sesslaw>
<ci:content popname="0" status="valid" generated="0" attreq="0" ln.nsprefix="lnci:">Section 9</ci:content>
</ci:cite>
And My code is:
SAXBuilder builder = new SAXBuilder();
builder.setExpandEntities(false);
File xmlFile = new File("dlac_p01_c02_s09.xml");
try {
Document document = (Document) builder.build(xmlFile);
Element rootNode = document.getRootElement();
listChildren(rootNode, 0);
XMLOutputter xmlOutput = new XMLOutputter();
xmlOutput.setFormat(Format.getPrettyFormat());
xmlOutput.output(document, new FileOutputStream(
"dlac_p01_c02_s09_output.xml"));
} catch (IOException io) {
System.out.println(io.getMessage());
} catch (JDOMException jdomex) {
System.out.println(jdomex.getMessage());
}
}
| 0 | [
2,
259,
20,
2658,
2230,
3217,
76,
1174,
23504,
20,
5196,
3893,
800,
3726,
3726,
31,
589,
78,
20,
48,
7566,
2549,
9990,
214,
9,
86,
64,
16,
65,
2059,
13769,
18,
20,
65,
16,
42,
37,
51,
270,
9,
51,
1301,
25,
76,
75,
17579,
68,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dynamic Number of Reducers in Hadoop MR Application
===
Is there any means to set the number of reduce tasks once a job is submitted? For example if I need to collect English words based on start alphabet, I can directly set the number of reduce tasks as 26. But in case a scenario arises where I cannot pre determine the number of reducers required,is there any means to accomplish the requirement? Here the requirement is independent of the number of nodes on the cluster, it just depends on the key being processed. Say for example, the number of reducers is to increment by one each time a new key is met.
Thanks in advance for any support. | 0 | [
2,
7782,
234,
16,
4136,
1224,
19,
41,
21709,
820,
3010,
800,
3726,
3726,
25,
80,
186,
1108,
20,
309,
14,
234,
16,
4136,
8674,
382,
21,
1205,
25,
7368,
60,
26,
823,
100,
31,
376,
20,
5543,
486,
715,
432,
27,
799,
11844,
15,
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... |
any speech to text conversion libraries or apis in python?
===
I am working on converting speech to text for an application I am working on.
Are there any speech to text conversion open source libraries or apis that i can use?
Looking for answers :) | 0 | [
2,
186,
2974,
20,
1854,
6263,
8649,
54,
21,
8954,
19,
20059,
60,
800,
3726,
3726,
31,
589,
638,
27,
19583,
2974,
20,
1854,
26,
40,
3010,
31,
589,
638,
27,
9,
50,
80,
186,
2974,
20,
1854,
6263,
368,
1267,
8649,
54,
21,
8954,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
QToolBar on the right corner of application topdock area
===
I found this [link][1] but unfortunately it doesn't do what it promised. Can you someone help me, please?
NOTE: I'm not asking how align on the right the contents of a toolbar (QSpacerItem) or how to have a toolbar on the right side of the screen (Qt::RightToolBarArea) but howto move the entire toolbar in the right side of the application top dock area.
Maybe this image would help you to understand what I wish to automatically achieve.
![Maybe this image would help you to understand what I wish to automatically achieve.][2]
Thanks a lot!
[1]: http://qt-project.org/faq/answer/how_can_i_make_one_of_my_toolbars_appear_on_the_right_hand_side_of_the_topd
[2]: http://i.stack.imgur.com/5cUfo.png | 0 | [
2,
2593,
20799,
1850,
27,
14,
193,
1531,
16,
3010,
371,
11458,
217,
800,
3726,
3726,
31,
216,
48,
636,
6258,
500,
2558,
165,
500,
47,
6200,
32,
1437,
22,
38,
107,
98,
32,
4591,
9,
92,
42,
737,
448,
55,
15,
2247,
60,
1945,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Triggering problems in Z3
===
I've recently observed several behaviours in Z3 with respect to triggering, which I don't understand. Unfortunately, the examples come from large Boogie files, so I thought I'd describe them abstractly for now, just to see if there are obvious answers. However, if the concrete files would be better, I can attach them.
There are basically three issues, although the third may well be a special case of the second. As far as my understanding goes, none of the behaviours are expected, but maybe I'm missing something. Any help would be greatly appreciated!
I. Trivial equalities in my program seem to get ignored as far as triggering is concerned. For example, if t1 is a term which should match the pattern for a quantified axiom, if I add a line in my Boogie program of the form
assert t1 == t1;
then t1 does *not* seem to get used as a trigger for quantified axioms. I added the line explicitly in order to provide t1 as a trigger to the prover, which I often do/did in Boogie programs.
If instead I introduce an extra function, say
function f(x : same_type_as_t1) : bool
{ true }
and now instead add a line
assert f(t1);
to my program, then t1 *does* appear to be used as a trigger by Z3. I have checked the Z3 translation of the former program, and the (trivial) equality on t1 did survive the Boogie translation (i.e., it isn't Boogie trying to do something clever).
II. Secondary patterns don't seem to be working properly for me. For example, I have a program in which one axiom has the form
axiom forall ... :: {t1,t2} {t3,t4,t5} .....
and a situation in which t3, t4 and t5 have all occurred. The program fails to verify, apparently because the axiom is not instantiated. However, if I rewrite the axiom as
axiom forall ... :: {t3,t4,t5} {t1,t2} .....
then the program verifies. In both cases, the time to run Boogie is approximately 3 seconds, and the patterns survive to the Z3 output.
III. This could well be a symptom of the secondproblem, but I was surprised by the following behaviour:
I wrote axioms of the form
axiom forall .. :: {t1,t2} ....
axiom forall ... :: {t2,t4} {t2,t3} ...some expression involving t1...
and in a situation where t2 and t3 had occurred, the first axiom didn't get instantiated (I expected it to be, since after the instantiation of the second axiom, t1 occurs). However, if I rewrote as
axiom forall .. :: {t2,t3} {t1,t2} ....
axiom forall ... :: {t2,t4} {t2,t3} ...some expression involving t1...
then the first axiom was instantiated. However, if for some reason secondary patterns are not getting used in general, then that would also explain this behaviour.
If explicit examples would be useful, I can certainly attach long ones, and can try to cut them down a bit (but of course triggering problems are a bit delicate, so I might well lose the behaviour if I make the example too small).
Thanks a lot in advance for any advice!
Alex Summers | 0 | [
2,
7286,
68,
1716,
19,
2052,
240,
800,
3726,
3726,
31,
22,
195,
1989,
3634,
238,
7727,
18,
19,
2052,
240,
29,
2873,
20,
7286,
68,
15,
56,
31,
221,
22,
38,
1369,
9,
6200,
15,
14,
3770,
340,
37,
370,
24708,
6488,
15,
86,
31,
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... |
jQuery append html with razor syntax error on Chrome
===
I have this javascript code:
var markup = '<tr id="newdo" class="odd"><td>' + @Html.DropDownList("does", new SelectList(Model.Does, "Id", "Name"),new { @class = "newDoSelect" }) + '</td><td class="small">'+ @Html.DropDownList("restriction", Model.Restrictions) + '</td><td>' + @Html.ListBox("doobjectives", new MultiSelectList(Model.AllObjectives, "Id", "Name"), new { Multiple = "multiple", @class="doobjectives" }) + '</td><td></td></tr>';
$('#doList tr:last').after(markup);
It works just fine on firefox, but on chrome I'm getting this error on the first line:
Uncaught SyntaxError: Unexpected identifier
Any clues?
| 0 | [
2,
487,
8190,
93,
4865,
2451,
13,
15895,
29,
14282,
22649,
7019,
27,
13,
12985,
800,
3726,
3726,
31,
57,
48,
8247,
8741,
1797,
45,
4033,
943,
576,
800,
13,
22,
1,
6384,
4924,
3726,
7,
2681,
537,
7,
718,
3726,
7,
22530,
7,
1,
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... |
copying a label followed by input field contents
===
Given :
A label Text followed by an input field similar to a form (for e.g Name : ________(input box) )
Requirement:
Need to develop a mechanism to be able to copy both text and input field in a single go
i.e highlighting/selecting the entire line of text and input box
Problem :
CTRL + C only copies the text only and not the entire data along with input box.
Reason for such Requirement :
I have a form in which Label is domain of a website and input box is for author profile id
(for e.g www.facebook.com/ ________(input box) )
Behaviour intended :
When User selects the entire www.facebook.com/ and the author id ( say john007) thinking he will paste "www.facebook.com/john007" somewhere.
Technicality :
My clipboard should copy both the text & the input box contents.
Implementation :
Was thinking of playing with CTRL + C events but cannot figure out the exact behaviour required.
<div>
<label>www.facebook.com/</label>
<input style="width:150px " type="Text" id="nameInput"/>
</div> | 0 | [
2,
4344,
68,
21,
1899,
709,
34,
6367,
575,
8478,
800,
3726,
3726,
504,
13,
45,
21,
1899,
1854,
709,
34,
40,
6367,
575,
835,
20,
21,
505,
13,
5,
1106,
13,
62,
9,
263,
204,
13,
45,
13,
1,
5,
108,
4881,
1649,
6,
13,
6,
8981,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 checkbox value in a javascript function
===
I'm doing javascript injection, below is my code.
`HtmlElement head = webBrowser1.Document.GetElementsByTagName("head")[0];
HtmlElement scriptEl = webBrowser1.Document.CreateElement("script");
IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement;
element.text = "function sayHello() { debugger; alert('Helloooo');" + " var resume=webBrowser1.Document.GetElementByTagName('resID');" +
" var i; for (i=0;i<resume.length;i++){if (resume[i].checked){alert(\"hi....\");} } }";
head.AppendChild(scriptEl);
System.Diagnostics.Debug.Print("html: {0}",head.InnerHtml);
webBrowser1.Document.InvokeScript("sayHello");`
My check box name is resID. The statement after alert in sayHello function is not executing. The result of this code is , its giving alert as Hello and its stopping execute. Is there any mistake in my code while accessing check box value. I | 0 | [
2,
164,
2631,
5309,
1923,
19,
21,
8247,
8741,
1990,
800,
3726,
3726,
31,
22,
79,
845,
8247,
8741,
13646,
15,
1021,
25,
51,
1797,
9,
13,
1,
15895,
27567,
157,
800,
10192,
5417,
4104,
165,
9,
28132,
9,
3060,
27567,
18,
779,
8628,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XCode 4.3 unit test issues
===
Anybody have the same problem with unit test using Xcode 4.3
I have configured all for using unit test and this work for me before.
But now when I try to start my test it doesn't work.
I have added method that looks like below:
- (void)testExample {
STFail(@"FAIL!");
}
But I don't see any notification for me from system. I just see activity indicator next to test icon in log navigator. no success messages no fail messages. | 0 | [
2,
993,
9375,
268,
9,
240,
1237,
1289,
1549,
800,
3726,
3726,
11181,
57,
14,
205,
1448,
29,
1237,
1289,
568,
993,
9375,
268,
9,
240,
31,
57,
28895,
65,
26,
568,
1237,
1289,
17,
48,
170,
26,
55,
115,
9,
47,
130,
76,
31,
1131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
turn off wifi in ios 5.1.1
===
I have been able to turn on/off wifi in lower version of iOS but it doesn't work with iOS 5.1.1. Any help is really appreciated.
Let me know.
thank you,
Ankita | 0 | [
2,
805,
168,
4807,
1707,
19,
13,
7760,
331,
9,
165,
9,
165,
800,
3726,
3726,
31,
57,
74,
777,
20,
805,
27,
118,
1299,
4807,
1707,
19,
987,
615,
16,
13,
7760,
47,
32,
1437,
22,
38,
170,
29,
13,
7760,
331,
9,
165,
9,
165,
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... |
Excel: How to sum two different numbers in same cell?
===
I have some info like below:
3/7
4/6
5/1
And I want a formula that will add them up to a total based on the numbers on either side of the slash. So the result cell from the above would be: `12/14`. Anyone know how I can do this? Please let me know if this is not clear. Thanks! | 0 | [
2,
20700,
45,
184,
20,
3907,
81,
421,
2116,
19,
205,
1667,
60,
800,
3726,
3726,
31,
57,
109,
15404,
101,
1021,
45,
13,
9280,
465,
13,
12918,
379,
331,
11698,
17,
31,
259,
21,
3729,
30,
129,
3547,
105,
71,
20,
21,
600,
432,
27,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to deduce return type or argument-function?
===
Below is example of what I need to do. The *call* function in real code is operator which means that all template parameters should be deduced.
#include <cstdlib>
template<typename T>
call (T x, int (*f)(T) ) {
return (*f)(x);
};
int main() {
return call(-1, std::abs);
}
Unary, possibly overloaded function *f* in example have hardcoded *int* return type - to make this example compile. The *f* arg type is known (as in example). I can not figure out how to make *call* to accept *f* with any return type.
I know about decltype (this is C+11 code), std::result_of and boost::function_traits. Is it possible to make *call* work with functions of any return type? | 0 | [
2,
25,
32,
938,
20,
121,
16041,
788,
1001,
54,
5476,
8,
22359,
60,
800,
3726,
3726,
1021,
25,
823,
16,
98,
31,
376,
20,
107,
9,
14,
1637,
9200,
2483,
1990,
19,
683,
1797,
25,
6022,
56,
1108,
30,
65,
22894,
12905,
378,
44,
121,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delete item from mysql database then go back to last page
===
I have a page where I list items ( in this case businesses) that are pulled from a mysql database with php.
<?
include('config.php');
echo "<h3>Saved Businesses</h3>";
echo "<ul style='list-style-type:none;'>";
$result = mysql_query("SELECT * FROM `saved_biz` WHERE user_id = '$id'") or trigger_error(mysql_error());
while($row = mysql_fetch_array($result)){
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); }
$business_id = $row['business_id'];
$result = mysql_query("SELECT * FROM `company` WHERE id = '$business_id'") or trigger_error(mysql_error());
while($row = mysql_fetch_array($result)){
$business_name = $row['name'];
}
echo "<li>" . nl2br( $business_name);
echo "<a href=deletesavedbiz.php?id={$row['id']}>Delete</a></li>";
echo "</tr>";
}
echo "</ul>";
?>
If the user decides to delete one of the businesses ( by clicking the "Delete" link ) he/she is then taken to deletesavedbiz.php and then, if successful, presented with a link to get back to the profile.php page that he/she was just on.
<?
include('config.php');
$id = (int) $_GET['id'];
mysql_query("DELETE FROM `saved_biz` WHERE `id` = '$id' ") ;
echo (mysql_affected_rows()) ? "Row deleted.<br /> " : "Nothing deleted.<br /> ";
?>
<a href='profile.php'>Back To Listing</a>
Now, what I want to do is have the php delete and then do like a php header redirect to profile.php without ever making the user click a link back. How can I accomplish this? Also, I'm fine with having the answer being javascript if it's not possible or not very clean in PHP.
Thanks for all help! | 0 | [
2,
27448,
9101,
37,
51,
18,
22402,
6018,
94,
162,
97,
20,
236,
2478,
800,
3726,
3726,
31,
57,
21,
2478,
113,
31,
968,
3755,
13,
5,
19,
48,
610,
4426,
6,
30,
50,
881,
37,
21,
51,
18,
22402,
6018,
29,
13,
26120,
9,
13,
1,
60... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can a multitenant google app engine (java) application authenticate with google apps users?
===
So now Google released the multi-tenant feature for gae.
Assuming i am going to implement a google app engine application and put it on google apps market place.
suppose www.doma.com and www.domb.com bought the application.
can usera from doma and userb from domb authenticate to this application with their google apps domain username (in other words) can usera@doma and userb@domb use authenticate with gae?
Thanks in advance | 0 | [
2,
92,
21,
1889,
1316,
1830,
8144,
4865,
1406,
13,
5,
1004,
1385,
6,
3010,
14351,
1373,
29,
8144,
4865,
18,
3878,
60,
800,
3726,
3726,
86,
130,
8144,
261,
14,
1889,
8,
1316,
1830,
1580,
26,
13,
17721,
9,
11704,
31,
589,
228,
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... |
Relative positions inside a div. Weird interactions
===
I am trying to replicate a Udacity question in html. The original question is [here](http://www.udacity.com/view#Course/st101/CourseRev/1/Unit/6001/Nugget/119001). (*)
My example is [here](http://www.linux.ime.usp.br/~lucasmmg/udacity/quiz.html). As you can see(\*\*), the only problem is the positions of the radio buttons(\*\*\*). I've seen the positions using gimp, and tried to use those into the html. However, not only there is an offset (which is perfectly managable in itself) but also this offset varies from button to button. Even worse: there seems to be some kind of interaction: removing some buttons makes the rest get closer to where they should be.
I (suppose) I could just guess positions till I got it right, but as I will probably do this many times, I'd rather understand the problem better. What is going on ? Is there a better way to achieve the same result ?
(\*) I've already been given the suggestion to look at the source, and tried to, not with much sucess<br>
(\*\*) I opened the file on firefox 14 and chromium 18<br>
(\*\*\*) they were meant to be on north, west, east and on the square just below west | 0 | [
2,
4543,
3062,
572,
21,
13,
12916,
9,
5455,
11224,
800,
3726,
3726,
31,
589,
749,
20,
22156,
21,
13,
5729,
5788,
1301,
19,
13,
15895,
9,
14,
501,
1301,
25,
636,
6836,
500,
5,
21127,
6903,
6483,
9,
5729,
5788,
9,
960,
118,
4725,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bad link crashes Python IRC bot
===
My bot uses Beautiful soup to parse HTML, and also prints out the web page title of a link said in IRC. This all works except for one thing: If someone gives a dead/fake link, the bot crashes.
The link grabber triggers when "http" is found, so for example if someone just said "http", it crashes because there's no response. Does anyone know how to fix this? | 0 | [
2,
896,
3508,
21563,
20059,
31,
5453,
11012,
800,
3726,
3726,
51,
11012,
2027,
1632,
11554,
20,
2017,
870,
13,
15895,
15,
17,
67,
12202,
70,
14,
2741,
2478,
581,
16,
21,
3508,
87,
19,
31,
5453,
9,
48,
65,
693,
1613,
26,
53,
584,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sleeping a Thread in Canvas
===
In my game I want to draw the screen black after losing or winning a level and then draw a message in white on to the screen. After a few seconds delay I then want the screen to disappear when touched. Below is part of my draw() method. The problem is that screen freezes (or the thread sleeps) before the screen is drawn black and the text is drawn, even though the sleep command is after the text and canvas is drawn. Any ideas why this is happening?
if (state == WIN || state == LOSE){
canvas.drawColor(Color.BLACK);
message = "Touch Screen To Start";
canvas.drawText(message + "", mCanvasWidth / 2, mCanvasHeight / 2, white);
try {
GameThread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | 0 | [
2,
4777,
21,
9322,
19,
9696,
800,
3726,
3726,
19,
51,
250,
31,
259,
20,
2003,
14,
2324,
319,
75,
2281,
54,
1414,
21,
662,
17,
94,
2003,
21,
2802,
19,
359,
27,
20,
14,
2324,
9,
75,
21,
310,
2582,
7255,
31,
94,
259,
14,
2324,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
My colors are getting messed up when I give them an alpha value
===
I have a ListView, and I want the items to show a different color than Holo Blue when they're pressed. So I made a selector drawable and it works great.
My color is `FFF100`, a nice yellow.
However, I think it's a bit too saturated, so I want to bring down the alpha to make it more like my tab indicator, which is done with an image file. It has the same color, `FFF100`, but with 50% opacity.
So I changed my color to an ARGB value, using `80` (128/255st) as the alpha value. So my color is now `80FFF100`.
But now it looks like a weird green!![Screenshot][1]
[1]: http://i.stack.imgur.com/Ant5l.png
Why is this happening?! | 0 | [
2,
51,
5268,
50,
1017,
21537,
71,
76,
31,
590,
105,
40,
5705,
1923,
800,
3726,
3726,
31,
57,
21,
968,
4725,
15,
17,
31,
259,
14,
3755,
20,
298,
21,
421,
1665,
119,
17928,
705,
76,
59,
22,
99,
2931,
9,
86,
31,
117,
21,
23946,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
update status input radio button jstl and spring mvc
===
i am using spring mvc
when i am creating user, in my form active or deactive radio button is perfectly saving in my db
when i am editing my user its not selecting actual status in input radio button, i need suggestions in jslt, below is my code
<div class="section">
<label>Status<small>status</small></label>
<div>
<div>
<input type="radio" name="status" id="radio-1" value="ACTIVE" class="ck" checked='<c:out value="${userIdSearch.state ? 'ACTIVE'}">checked</c:out>'/>
<label for="radio-1">Active</label>
<input type="radio" name="status" id="radio-2" value="DEACTIVE" class="ck" checked='<c:out value="${userIdSearch.state ? 'DEACTIVE'}">checked</c:out>'/>
<label for="radio-2">Deactive</label>
</div>
</div>
</div>
thanks in advance pradeep | 0 | [
2,
11100,
1782,
6367,
603,
5167,
487,
18,
7786,
17,
1573,
307,
8990,
800,
3726,
3726,
31,
589,
568,
1573,
307,
8990,
76,
31,
589,
2936,
4155,
15,
19,
51,
505,
1348,
54,
121,
7889,
603,
5167,
25,
5759,
7599,
19,
51,
13,
9007,
76,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Passing an object from a detail disclosure button segue
===
How can I pass an object from a detail disclosure tap to a detail view controller? Are there any recommendations or quick fixes for this? Ideally I want to create a method like this:
[self performSegueWithIdentifier:@"showDetail" sender:self passObject:object];
The reason is that 'prepare for segue' seems to only get called when I press the cell before the detail disclosure indicator. How would I create a method like the above to create the effects of prepare below?
if ([[segue identifier] isEqualToString:@"showDetail"]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
id object = [_objects objectAtIndex:indexPath.row];
[[segue destinationViewController] setDetailItem:object];
}
I already attempted to create a subclass of UIStoryboardSegue like so but encountered two issues.
@implementation masterToDetail
-(void)performSegueWithIdentifier:(NSString*)identifier sender:(id)sender passObject:(id)object{
[self.destinationViewController setDetailItem:object];
[self performSegueWithIdentifier:identifier sender:sender];
}
-(void)performSegueWithIdentifier:(NSString*)identifier sender:(id)sender{
//What code should go here? Issue one
}
-(void)perform{
//Second issue, the compiler will crash and say I need to override perform.
}
| 0 | [
2,
2848,
40,
3095,
37,
21,
6110,
21449,
5167,
1353,
3982,
800,
3726,
3726,
184,
92,
31,
1477,
40,
3095,
37,
21,
6110,
21449,
5526,
20,
21,
6110,
1418,
9919,
60,
50,
80,
186,
12121,
54,
2231,
6098,
160,
26,
48,
60,
5628,
102,
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... |
Adding redirect to Ruby on Rails webpage using .htaccess or Virtualmin
===
Thanks in advance for any help you can provide on this issue! I manage a Ruby on Rails website that uses Apache and lives on Joyent's Cloud Server. Right now I have a pdf located at http://example.com/docs/mydoc.pdf . I'd like for this url to 301 redirect visitors to http://example.com/mydoc , which will be a webpage with the same content (instead of a pdf.)
I've tried a couple of methods for getting the redirect to take place, but neither are working.
1. I went into VirtualMin and into the Apache server. Then, I chose Aliases / Redirects. Finally, I went under Permanent URL redirects and entered: FROM http://example.com/docs/mydoc.pdf TO http://example.com/mydoc and applied the changes.
2. Since that didn't work, I went looking for an .htaccess file in my /public folder. None existed. So, I created an .htaccess file and added it to the /public folder. The only code in the file is
`Redirect 301 /docs/mydoc.pdf http://example.com/mydoc`
When I go to I'm looking for the simplest way to add this 301 redirect and future 301 redirects to my website. Thanks again for your advice! | 0 | [
2,
4721,
302,
14706,
20,
10811,
27,
2240,
18,
2741,
6486,
568,
13,
9,
9020,
20604,
54,
6599,
2160,
800,
3726,
3726,
3669,
19,
3612,
26,
186,
448,
42,
92,
1181,
27,
48,
1513,
187,
31,
4705,
21,
10811,
27,
2240,
18,
2271,
30,
2027... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Faster way to run long PDO insert statement?
===
So I am starting to switch over all my of mysql/php work database queries and such over to PDO. I was wondering if the following method could be shortened somehow. This particular example, is using a large registration form and inserting the results into the database. I feel this is a lot more code than is necessary... Is there a shorter method to insert this into the database?
$query = $affiliates->prepare('INSERT INTO affiliates (afid, afTitle, afbio, afLink, afEmail, afAddress, afCity, afState, afZip, afphone, affacebook, aflinkedin, aftwitter, afPassword, afLon, afType, aftime, afApproved) VALUES (?, ?, ? , ? , ?, ? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,?, ?)');
echo "prepare successfull";
$query-> execute(array('',$afTitle, $afBio, $afLink, $afEmail, $afAddress, $afCity, $afState, $afZip, $afPhone, $afFacebook, $afLinkedIn, $afTwitter, $afPassword, '', $afType, $date, $afApproved))or die(print_r($affiliates->errorInfo(), true));
echo "Insert worked!";
I apologize for any bad structure, as I said, learning as I go. Also will this protect against sql injection?
Thank you! | 0 | [
2,
4233,
161,
20,
485,
175,
351,
537,
14692,
3331,
60,
800,
3726,
3726,
86,
31,
589,
1422,
20,
5521,
84,
65,
51,
16,
51,
18,
22402,
118,
26120,
170,
6018,
9386,
2829,
17,
145,
84,
20,
351,
537,
9,
31,
23,
5712,
100,
14,
249,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Testing non-default App Engine task queues
===
App Engine documentation gives an [example](https://developers.google.com/appengine/docs/java/tools/localunittesting#Writing_Task_Queue_Tests) of unit testing task queues, which works fine for the "default" queue, but I need a unit test for non-default queues.
I'm getting an exception from the following line:
val qsi = ltq.getQueueStateInfo.get("non-default");
I assume that I need to configure the non-default queue in my testing environment in much the same way that non-default production queues need to be configured (via queue.xml), but I'm not sure how to go about this.
Do I need a queue.xml file somewhere in my testing environment? And if so, where.
I've tried the following with a queue.xml file in my resources directory, but it complains about not finding `org/mortbay/xml/XmlParser`
val ltqtc = new LocalTaskQueueTestConfig
ltqtc.setQueueXmlPath(this.getClass.getResource("queue.xml").getPath)
val helper = new LocalServiceTestHelper(ltqtc)
| 0 | [
2,
4431,
538,
8,
13862,
9708,
4865,
1406,
3005,
22521,
18,
800,
3726,
3726,
4865,
1406,
13945,
2352,
40,
636,
29041,
500,
5,
21127,
18,
6903,
26051,
445,
9,
16111,
4875,
9,
960,
118,
7753,
16847,
118,
13799,
18,
118,
1004,
1385,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is CloudConfigurationManager using my Cloud.cscfg instead of Local.cscfg?
===
I have configured my application to use the Service configuration Local in the development settings.
I have two cscfg files (as per default) Cloud and Local. I have cerated connection strings for Storage that tell it to use a live account for Cloud cscfg and dev storage for Local cscfg.
However when I run my project and use the line
var setting = CloudConfigurationManager.GetSetting("StorageConnectionString");
It is using my Cloud configuration and returning my live storage. It is definitely my Cloud cscfg and not something else setting the value as if I change it in Cloud the setting returned changes.
Is this by design? Is there any way to see the logic CloudConfigurationManager is using to select the configuration?
The weird thing was I am sure this was working earlier.
Thanks | 0 | [
2,
483,
25,
4005,
1126,
13549,
857,
22256,
568,
51,
4005,
9,
150,
3862,
19109,
700,
16,
375,
9,
150,
3862,
19109,
60,
800,
3726,
3726,
31,
57,
28895,
51,
3010,
20,
275,
14,
365,
8091,
375,
19,
14,
522,
12410,
9,
31,
57,
81,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP (client) to Android (Server) Socket communication
===
I made a simple ServerSocket application on my android device I use telnet to connect and it's works fine (sended messages are displayed in my logcat window). Probl;em is when i try to make a connection from php page (I'm also using PHP sockets). Android socket accepts a first connection and then is something strange - sometimes he read a messages sended from PHP and display them in logcat but usually it accepts only first request and trhen... nothing
ANDROID SIDE Code:
public class TestSocketActivity extends Activity {
private ServerSocket ss;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setSocket();
}
public void setSocket() {
try {
ss = new ServerSocket(7000);
System.out.println("Started");
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("Accept failed: 4444");
e.printStackTrace();
}
Socket clientSocket = null;
try {
clientSocket = ss.accept();
String s = clientSocket.getRemoteSocketAddress().toString();
System.out.println(s);
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("SS error");
e.printStackTrace();
}
try {
BufferedReader in =
new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
String inputLine, outputLine;
while ((inputLine = in.readLine()) != null) {
Toast.makeText(getApplicationContext(),"test",1).show();
System.out.println("in: "+inputLine);
}
ss.close();
setSocket();
}
catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("error");
e.printStackTrace();
}
}
}
And this is simple PHP request:
<?php
error_reporting(E_ALL);
$address = '192.168.0.180';
$port = 7000;
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
$result = socket_connect($socket, $address, $port);
$in = mktime();
socket_write($socket, $in, strlen($in));
socket_close($socket);
?>
... that's all
Maybe there is some easier communication (I need to connect to android device from PHP everytime I want so PHP can't wait for a request from Android).
Thanks for help. | 0 | [
2,
13,
26120,
13,
5,
150,
18513,
38,
6,
20,
13005,
13,
5,
10321,
106,
6,
18482,
3291,
800,
3726,
3726,
31,
117,
21,
1935,
17595,
5668,
1198,
3010,
27,
51,
13005,
3646,
31,
275,
6757,
2328,
20,
6379,
17,
32,
22,
18,
693,
1123,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Hide all divs of a class, show only those with additional class
===
I've got a list of DIVS (products on a storepage) width the class "chairdiv".
I'd like to be able to filter the DIVS that have an additional class, here's an example:
<div class="chairdiv sold"></div>
<div class="chairdiv forsale"></div>
<div class="chairdiv forsale"></div>
<div class="chairdiv forsale"></div>
<div class="chairdiv sold"></div>
<div class="chairdiv forsale"></div>
By default the page would show all these divs, can I use javascript to hide all "chairdiv" divs except those with "sold" or "forsale" as an additional class?
I'm HTML/CSS proficient but I know very little javascript.
Thanks! | 0 | [
2,
3077,
65,
13,
12916,
18,
16,
21,
718,
15,
298,
104,
273,
29,
1351,
718,
800,
3726,
3726,
31,
22,
195,
330,
21,
968,
16,
13,
12916,
18,
13,
5,
14086,
18,
27,
21,
1718,
6486,
6,
9456,
14,
718,
13,
7,
14045,
12916,
7,
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... |
Syntax error, unexpected $end In for loop
===
first thread i post here. I have been searching here for answers and almost always got them. But this one is a slightly different.
I have this php code snippet
for($i=0;$i<$var;$i++) {
echo "<td style='width:30px;height:30px;border-color:black;border-style:solid;border- width:1px;background-color: lightgray;font-weight: bold;text-align: center;";
if($Page==($i+1))
echo "color:red;";
echo "' onmouseover=\"this.style.cursor = 'pointer';\" onmousemove=\"this.style.backgroundColor = 'red';this.style.color='white';\" onmouseout=\"this.style.backgroundColor='lightgray';";
if($Page==($i+1))
echo "this.style.color='red';";
else
echo "this.style.color='black';";
echo "\" onClick='window.location=\"Catalog.php?Cat={$Category}&Page=".($i+1)."&SubCat= {$SubCat}&lang={$Lang}\"' >".($i+1);
echo "</td>";
} ?>
It's a little mess because i don't know how to add code snippets.
I have done some debugging and got that the 1st line (the line of the for) is the prob, yet I can't find the problem.
(i replaced $var with 1 and it still didn't help).
Thank you. | 0 | [
2,
22649,
7019,
15,
9380,
5579,
2451,
19,
26,
5293,
800,
3726,
3726,
64,
9322,
31,
678,
235,
9,
31,
57,
74,
5792,
235,
26,
6709,
17,
557,
550,
330,
105,
9,
47,
48,
53,
25,
21,
1847,
421,
9,
31,
57,
48,
13,
26120,
1797,
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... |
2D arrays of objects in java
===
How do I set up an 2d array (array of arrays in java)?
dmap = new sq[255][255];
for (int y = 0; y < 255; ++y)
for (int x = 0; x < 255; ++x)
dmap[x][y] = new sq();
where `sq` is my other class doesn't work well- I get a long hang (2 mins) and no logging or printfs appear in Eclipse debug views (console + log). | 0 | [
2,
172,
43,
7718,
18,
16,
3916,
19,
8247,
800,
3726,
3726,
184,
107,
31,
309,
71,
40,
172,
43,
7718,
13,
5,
8576,
93,
16,
7718,
18,
19,
8247,
6,
60,
13,
43,
15022,
800,
78,
4444,
2558,
20038,
500,
2558,
20038,
12660,
26,
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... |
Divide a array into multiple (individual) arrays based on a bin size in python
===
I am reading a file that contains values like this:
-0.68285 -6.919616
-0.7876 -14.521115
-0.64072 -43.428411
-0.05368 -11.561341
-0.43144 -34.768892
-0.23268 -10.793603
-0.22216 -50.341101
-0.41152 -90.083377
-0.01288 -84.265557
-0.3524 -24.253145
How do i split this into individual arrays based on the value in column 1 with a bin width of 0.1?
i want my output something like this:
array1=[[-0.05368, -11.561341],[-0.01288, -84.265557]]
array2=[[-0.23268, -10.79360] ,[-0.22216, -50.341101]]
array3=[[-0.3524, -24.253145]]
array4=[[-0.43144, -34.768892], [-0.41152, -90.083377]]
array5=[[-0.68285, -6.919616],[-0.64072, -43.428411]]
array6=[[-0.7876, -14.521115]] | 0 | [
2,
8918,
21,
7718,
77,
1886,
13,
5,
108,
11390,
43,
6948,
6,
7718,
18,
432,
27,
21,
4511,
1072,
19,
20059,
800,
3726,
3726,
31,
589,
1876,
21,
3893,
30,
1588,
4070,
101,
48,
45,
13,
8,
387,
9,
4279,
21917,
13,
8,
379,
9,
518... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RavenDB exception on query - Method not found: 'Void Raven.Abstractions.Data.IndexQuery.set_DefaultField(System.String)'
===
I am getting the following exception during the foreach loop of refresh model as it tries to enumerate through the results retreived by the query. I have not been able to find anything relating to this error anywhere else on the internet. Can someone point out what I am doing wrong?
> System.MissingMethodException was unhandled
> > Message=Method not found: 'Void Raven.Abstractions.Data.IndexQuery.set_DefaultField(System.String)'.
> > Source=Raven.Client.Lightweight
> > StackTrace:
> > > at Raven.Client.Document.AbstractDocumentQuery`2.GenerateIndexQuery(String query)
> > > at Raven.Client.Document.AbstractDocumentQuery`2.InitializeQueryOperation(Action`2 setOperationHeaders) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 399
> > > at Raven.Client.Document.AbstractDocumentQuery`2.InitSync() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 434
> > > at Raven.Client.Document.AbstractDocumentQuery`2.get_QueryResult() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 421
> > > at Raven.Client.Linq.RavenQueryProviderProcessor`1.ExecuteQuery[TProjection]() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Linq\RavenQueryProviderProcessor.cs:line 1263
> > > at Raven.Client.Linq.RavenQueryProviderProcessor`1.Execute(Expression expression) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Linq\RavenQueryProviderProcessor.cs:line 1244
> > > at Raven.Client.Linq.RavenQueryProvider`1.Execute(Expression expression) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Linq\RavenQueryProvider.cs:line 138
> > > at Raven.Client.Linq.RavenQueryProvider`1.System.Linq.IQueryProvider.Execute(Expression expression) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Linq\RavenQueryProvider.cs:line 195
> > > at Raven.Client.Linq.RavenQueryInspector`1.GetEnumerator() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Linq\RavenQueryInspector.cs:line 97
> > > at VidFilter.AdminPanel.RefreshModel() in C:\Users\krobins\VidFilter\trunk\source\VidFilter\AdminPanel.xaml.cs:line 111
private void RefreshModel()
{
MainModel.Movies.Clear();
foreach (FriendlyName movie in App.Database.QueryAllMovies())
{
MainModel.Movies.Add(movie);
}
}
public IEnumerable<FriendlyName> QueryAllMovies()
{
using (var session = DocumentStore.OpenSession())
{
return session.Query<Movie, Movies_AsFriendlyName>().As<FriendlyName>();
}
}
class Movies_AsFriendlyName : AbstractIndexCreationTask<Movie>
{
public Movies_AsFriendlyName()
{
Map = movies => movies.Select(movie => new { Id = movie.Id, Name = movie.FileName });
TransformResults = (database, movies) => movies.Select(movie => new { Id = movie.Id, Name = movie.FileName });
}
}
public class FriendlyName
{
public string Name { get; set; }
public string Id { get; set; }
public FriendlyName(string id, string name)
{
Id = id;
Name = name;
}
public override string ToString()
{
return Name;
}
} | 0 | [
2,
7542,
9007,
5391,
27,
25597,
13,
8,
2109,
52,
216,
45,
13,
22,
2625,
1340,
7542,
9,
2297,
9729,
8645,
18,
9,
18768,
9,
25671,
8190,
93,
9,
3554,
1,
13862,
9708,
1109,
5,
10724,
9,
11130,
6,
22,
800,
3726,
3726,
31,
589,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
showing rows as columns in mysql
===
I have a networks table and a groups table and they are linked by each group being connected to a network.
each group have a type and some of these groups are special type of groups.
I'm trying to run query that will display each group that is a a special type to be displayed as a column showing how many people are in that group type.
is that something that is possible. having each group type being displayed as a column header?
thanks. | 0 | [
2,
3187,
11295,
28,
7498,
19,
51,
18,
22402,
800,
3726,
3726,
31,
57,
21,
5540,
859,
17,
21,
1170,
859,
17,
59,
50,
4727,
34,
206,
214,
142,
2587,
20,
21,
982,
9,
206,
214,
57,
21,
1001,
17,
109,
16,
158,
1170,
50,
621,
1001... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I use logic loop to print out 20 Pythagorean numbers of non-congruent triangles.
===
How can I use logic loop to print out 20 Pythagorean numbers of non-congruent triangles.
Without repeating numbers i.e if I have 4,3,5 I can't have 3,4,5.
I was using "for" loops but I don't know how to remove the repeating answers.
| 0 | [
2,
184,
92,
31,
275,
7085,
5293,
20,
4793,
70,
434,
7103,
3667,
6979,
5609,
2116,
16,
538,
8,
1126,
15244,
2291,
8676,
18,
9,
800,
3726,
3726,
184,
92,
31,
275,
7085,
5293,
20,
4793,
70,
434,
7103,
3667,
6979,
5609,
2116,
16,
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... |
Repopulating textarea with EXACTLY what the user submitted (with ASCII codes and without additonal forward slashes before some characters)
===
I have a textarea, which I need to be able to take characters including / and ' as well as special characters in ASCII. It does this fine, and sends the data to a php page by the POST method.
Then I repopulate the text area simply by putting
<?php echo isset($F_Text) ? $F_Text : '' ?>
between the textarea tags ($F_Name = $_POST["F_Name"]), with the intention that the user can then alter what they typed in and resubmit.
But each time the form is repopulated two issues arise. A forward slash is added before characters such as ' and the ASCII characters are printed out as the symbol rather than the code. This basically breaks the rest of the page (the submission goes on to be processed by some javascript).
I can't simply strip the forward slashes out or anything, since forward slashes can also be entered intentionally by the user. And I can't think of any way to keep the ASCII codes as just that, codes, not symbols.
I need the form to display EXACTLY what the user typed in originally. Any ideas? | 0 | [
2,
302,
6057,
10038,
1854,
17760,
29,
1890,
98,
14,
4155,
7368,
13,
5,
1410,
28,
1892,
49,
11358,
17,
366,
3547,
7478,
5025,
917,
14098,
160,
115,
109,
1766,
6,
800,
3726,
3726,
31,
57,
21,
1854,
17760,
15,
56,
31,
376,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Play/Pause Buttons not working when stacked
===
I wanted to implement a play/pause button functionality for a slider and I face really unexpected troubles with the code.
$("#Pause").click(function ()
{
$("#Pause").fadeOut("700");
$("#Play").fadeIn("700");
});
$("#Play").click(function ()
{
$("#Play").fadeOut("700");
$("#Pause").fadeIn("700");
}); });
The switch between buttons works well but only if they have separate position.
For eg. if I stack them, I can make the play button appear but it is not active
.
As if the 'ghost' of the previously displayed pause button was still there.
I do not know what to do to overcome this.
Thanks
Pascal | 0 | [
2,
418,
118,
1060,
3699,
12861,
52,
638,
76,
20054,
800,
3726,
3726,
31,
417,
20,
8713,
21,
418,
118,
1060,
3699,
5167,
18548,
26,
21,
3295,
106,
17,
31,
276,
510,
9380,
16615,
29,
14,
1797,
9,
5579,
5,
7,
5910,
1060,
3699,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MyApp.Properties.Settings issues errors precompile, but works after compiling
===
I'm receiving the following error in my c# program:
'MyApp.Properties.Settings' does not contain a definition for 'expired' and no extension method 'expired' accepting a first argument of type 'MyApp.Properties.Settings' could be found
But, here's the kicker.
If I go to the Settings.Designer.cs, the "expired" setting is listed (it was created with the Project > Properties > Settings UI):
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool expired {
get {
return ((bool)(this["expired"]));
}
set {
this["expired"] = value;
}
}
Further, if I compile and run the program, it compiles successfully and the setting is saved and accessed properly. This only appears in the Error List while editing the program and not when I compile.
I also tried putting a `using MyApp.Properties;` at the start of the Program.cs where I'm accessing the setting, but this didn't change anything.
So since everything seems to work fine and the compiler seems to be working fine... what gives? I'm using Visual Studio 2012 RC and C#.
I know could just set it to ignore the errors, but I'd rather find out **why** it's erroring and resolve it. Thanks in advance! | 0 | [
2,
51,
7753,
9,
10890,
106,
3915,
9,
19831,
18,
1549,
11908,
782,
11103,
3599,
15,
47,
693,
75,
24378,
800,
3726,
3726,
31,
22,
79,
3396,
14,
249,
7019,
19,
51,
272,
5910,
625,
45,
13,
22,
915,
7753,
9,
10890,
106,
3915,
9,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular expression accept all characters with at least five characters
===
I've seen the following regular expression around the web.
> (?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$
It validates only if the string:
* contain at least (1) upper case letter
* contain at least (1) lower case letter
* contain at least (1) number or special character
* contain at least (8) characters in length
But I am Trying to make it contain at least (5) characters but allowing the user to use which ever characters he/her chooses | 0 | [
2,
1290,
1803,
3440,
65,
1766,
29,
35,
639,
355,
1766,
800,
3726,
3726,
31,
22,
195,
541,
14,
249,
1290,
1803,
140,
14,
2741,
9,
13,
1,
13,
5,
60,
3726,
1,
9,
1,
457,
15,
1,
4403,
6,
5,
5,
60,
3726,
9,
2483,
1,
43,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to prevent 3rd party iframe onunload event in iOS (Safari 5)?
===
I have a mobile site which includes a 3rd party iFrame which has an onunload event. I don't want the onunload event to fire in certain situations.
I tried various ways like removing the iframe node but i cannot prevent the iframe onunload event from firing.
Chrome and Android works fine but safari fires it anyway.
Thanks in advance!! | 0 | [
2,
184,
20,
2501,
203,
897,
346,
31,
8361,
27,
1020,
8294,
807,
19,
13,
7760,
13,
5,
18,
2565,
2905,
331,
6,
60,
800,
3726,
3726,
31,
57,
21,
3241,
689,
56,
1103,
21,
203,
897,
346,
31,
8361,
56,
63,
40,
27,
1020,
8294,
807,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
import cookies to Firefox via commands
===
I have a cookie file.txt ,and I want to import it to Firefox via commands , Usually I do that manually using the extension of Firefox (cookie importer 1.1) and it works like a charm , but I want to do this via commands
is its possible ? is there a tool that can do it ?
I have win 73 bit , I want to do this using cmd.exe
thanks | 0 | [
2,
9010,
19396,
20,
535,
18219,
1197,
14294,
800,
3726,
3726,
31,
57,
21,
19980,
3893,
9,
38,
396,
38,
13,
15,
290,
31,
259,
20,
9010,
32,
20,
535,
18219,
1197,
14294,
13,
15,
951,
31,
107,
30,
23671,
568,
14,
3896,
16,
535,
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... |
nginx and apache - Error processing php files
===
I am still learning nginx, so please bear with me if the answer is obvious :).
I have set up nginx in front of apache using [these instructions][1]
[1]: http://hybridlogic.co.uk/2011/07/setting-up-nginx-in-front-of-apache2-on-ubuntu-server/
nginx seems to be properly processing html files, however anytime I try and access a php file I get a 404 error.
here is the nginx example.com conf file
server {
listen 80;
access_log /var/www/example.com/logs/nginx.access.log;
error_log /var/www/example.com/logs/nginx.error.log;
root /var/www/example.com/prod;
index index.php index.html index.htm;
server_name www.example.com example.com;
location \ {
try_files $uri $uri/ index.php/$uri;
}
location ~* ^.*\.php$ {
if (!-f $request_filename) {
return 404;
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
location ~ /\.(ht|git) {
deny all;
}
}
and here is my apache example.com conf file
<VirtualHost 123.45.67.89:8080>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
#Indexes + Directory Root
DirectoryIndex index.html index.htm index.php
DocumentRoot /var/www/example.com/prod/
#CGI Directory
ScriptAlias /cgi-bin/ /var/www/example.com/prod/cgi-bin/
<location /cgi-bin>
Options +ExecCGI
</location>
#Log Files
ErrorLog /var/www/example.com/logs/error.log
CustomLog /var/www/example.com/logs/access.log combined
</VirtualHost>
I've been trying to figure out where my error is for the better part of 4 hours now. I am hoping you might be able to help :( | 0 | [
2,
13,
2723,
108,
396,
17,
17140,
13,
8,
7019,
5511,
13,
26120,
6488,
800,
3726,
3726,
31,
589,
174,
2477,
13,
2723,
108,
396,
15,
86,
2247,
2746,
29,
55,
100,
14,
1623,
25,
4674,
13,
45,
6,
9,
31,
57,
309,
71,
13,
2723,
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... |
XQuery content between two singleton tags
===
do you know to do XQuery query for selection of content between two singleton tags, e.g.
<pb n="1"/>
this is <foo>page</foo> number one
<pb n="2"/>
this is <bar>page</bar> number two
<pb n="3"/>
this is <x>page</x> number three
and I want for example content of second page, so between `<pb n="2"/>` and next `<pb/>`. Output should be then:
this is <bar>page</bar> number two
| 0 | [
2,
993,
8190,
93,
2331,
128,
81,
345,
444,
3383,
18,
800,
3726,
3726,
107,
42,
143,
20,
107,
993,
8190,
93,
25597,
26,
3155,
16,
2331,
128,
81,
345,
444,
3383,
18,
15,
13,
62,
9,
263,
9,
13,
1,
13390,
13,
103,
3726,
7,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
nested mysql query with double select statement?
===
hell
i have a simple problem regarding a nested query
to be honest i don't know if it can be done through the query only or should i use PHP as im always do
simply i want return the users information from the users tables by the users ID's return from a select statement in relations table
i can do this by 2 queries and some PHP loop but for saving resources i think its better to combine it into 1 query and single loop
First query
SELECT UserID FROM relations WHERE GroupID = '1'
Second query i need to retrieve the user info from the user table by the returned UsersID's from the first select statement
i can do this by loop through the ID and making the queries but i think i can get all in 1 query
Thanks
| 0 | [
2,
5618,
69,
51,
18,
22402,
25597,
29,
1494,
5407,
3331,
60,
800,
3726,
3726,
1094,
31,
57,
21,
1935,
1448,
3467,
21,
5618,
69,
25597,
20,
44,
6964,
31,
221,
22,
38,
143,
100,
32,
92,
44,
677,
120,
14,
25597,
104,
54,
378,
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... |
Data is not showing - Jquery Mobile
===
i am inserting some value in database using a form and list all that in a page using jquery mobile. as page is redirect it is not showing any data however if i press f5(refress) all the data in displaying.
can any one tel me the issue, as i am unable to fine it. in my view DOM is not reloading. if this is the case can any one suggest me how to reload the page on redirect. i am using page change function.
Regards
Vivek | 0 | [
2,
1054,
25,
52,
3187,
13,
8,
487,
8190,
93,
3241,
800,
3726,
3726,
31,
589,
14692,
68,
109,
1923,
19,
6018,
568,
21,
505,
17,
968,
65,
30,
19,
21,
2478,
568,
487,
8190,
93,
3241,
9,
28,
2478,
25,
302,
14706,
32,
25,
52,
318... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
acess file in raw folder in android by calling them from their names
===
code is below:
I m not able to using string in file name.Any suggestions.If i use R.raw.anyString , it show error
tv3.setText(readTxt());
}
private String readTxt(){
InputStream inputStream = getResources().openRawResource(R.raw.filname);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
int i;
try {
i = inputStream.read();
while (i != -1)
{
byteArrayOutputStream.write(i);
i = inputStream.read();
}
inputStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return byteArrayOutputStream.toString();
| 0 | [
2,
21,
5052,
18,
3893,
19,
4333,
19294,
19,
13005,
34,
2555,
105,
37,
66,
1817,
800,
3726,
3726,
1797,
25,
1021,
45,
31,
307,
52,
777,
20,
568,
3724,
19,
3893,
204,
9,
6001,
18389,
9,
821,
31,
275,
761,
9,
12404,
9,
6001,
1113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Alternate row colour WP7
===
I want to have alternating background colors of a listbox in my MVVM Light WP7 project.
WP7 has no support for alternating the background color of the ListBox items background.
I have a listbox that has its itemsource set to a CollectionViewSource. The CollectionViewSource is in turn bound to an ObservableCollection in my ViewModel. The CollectionViewSource is configured to sort the list by a datetime property in my custom object.
When the list is scrolled to the bottom a command is sent to the viewmodel to add more data to my collection. Since the CollectionViewSource sort on the datetime the items can appear anywhere in the list, not just at the end.
This makes approches like http://chillijam.co.uk/2012/01/11/alternating-listbox-item-background-colours-in-wp7/ and http://stackoverflow.com/questions/6247920/how-to-apply-alternate-row-style-in-listbox-in-window-phone-7 not work. Since they only check the previously added item.
I have also subscribed to the ListView UpdateLayout event and there go through each element in the ListBox and alternate the background, but this triggers to many times and made the app really unresponsive.
Does anyone have an idea? | 0 | [
2,
4912,
3131,
4609,
13,
13790,
465,
800,
3726,
3726,
31,
259,
20,
57,
17572,
2395,
5268,
16,
21,
968,
5309,
19,
51,
17967,
20147,
471,
13,
13790,
465,
669,
9,
13,
13790,
465,
63,
90,
555,
26,
17572,
14,
2395,
1665,
16,
14,
968,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using regexp in Excel can I perform some arithemetic on the matched pattern before replacing the matched string?
===
I am using VBscript.RegExp to find and replace using a regular expression. I'm trying to do something like this:
Dim regEx
Set regEx = CreateObject("VBScript.RegExp")
regEx.Pattern = "ID_(\d{3})"
regEx.IgnoreCase = False
regEx.Global = True
regEx.Replace(a_cell.Value, "=HYPERLINK(A" & CStr(CInt("$1") + 2) )
I.e. I have cells which contain things like ID_006 and I want to replace the contents of such a cell with a hyperlink to cell A8. So I match the three digits, and then want to add 2 to those digits to get the correct row to hyperlink to.
But the CStr(CInt("$1") + 2) part doesn't work. Any suggestions on how I can make it work? | 0 | [
2,
568,
7953,
6899,
19,
20700,
92,
31,
2985,
109,
9647,
124,
79,
9329,
27,
14,
11265,
3732,
115,
5496,
14,
11265,
3724,
60,
800,
3726,
3726,
31,
589,
568,
13,
20468,
8741,
9,
12463,
6899,
20,
477,
17,
3934,
568,
21,
1290,
1803,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need UI testing && analyzing tool for Windows
===
I have very little experience with Windows platform and I really need a tool to test my application from the UI side. Quick i-net search make me completely baffled, so any help is highly appreciated.
Key requirements:
1. Can fire user-driven events (such as click on specific place, drag'n'drop, text input)
2. Can capture screenshots (e.g. on failure)
3. Can analyze screenshots (sometimes application fires random events and creates pop-ups, needs to intercept and handle such situations). Maybe I can delegate this to some third-party process?
4. Can create reports and store them in file system.
Application itself is written on C#, but it doesn't matter, right? | 0 | [
2,
376,
13,
5661,
4431,
279,
1569,
23543,
5607,
26,
1936,
800,
3726,
3726,
31,
57,
253,
265,
1496,
29,
1936,
2452,
17,
31,
510,
376,
21,
5607,
20,
1289,
51,
3010,
37,
14,
13,
5661,
270,
9,
2231,
31,
8,
2328,
2122,
233,
55,
152... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit NOT found
===
Is it possible to implement the same discussed in http://www.devexpress.com/Support/Center/p/Q337799.aspx using DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit?
I found most of the properties and events are
missing for RepositoryItemSearchLookUpEdit
which are present in SearchLookUpEdit
I would like to use the _TextChanged event in order to bind
RepositoryItemSearchLookUpEdit data source on
the fly. | 0 | [
2,
9664,
21230,
9,
396,
1939,
13401,
18,
9,
99,
14882,
14599,
9,
99,
14882,
14599,
2119,
79,
25136,
5810,
576,
69,
242,
52,
216,
800,
3726,
3726,
25,
32,
938,
20,
8713,
14,
205,
6078,
19,
7775,
6903,
6483,
9,
14438,
21230,
9,
96... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SMSManager is Deprecated
===
i have included this file in a project of android 2.3.3
import android.telephony.gsm.SmsManager;
It shows the code as follows(strikes out the smsmanager text)<br/>
import android.telephony.gsm.<strike>SmsManager</strike>;<br/>
and a shows message
"SmsManager is deprecated"<br/>
how can i fix this? | 0 | [
2,
7613,
18,
22256,
25,
121,
3515,
150,
1669,
800,
3726,
3726,
31,
57,
506,
48,
3893,
19,
21,
669,
16,
13005,
172,
9,
240,
9,
240,
9010,
13005,
9,
14305,
22031,
9,
5447,
79,
9,
18,
79,
18,
22256,
73,
32,
1285,
14,
1797,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Monitor the communication of 2 programs on my local machine?
===
I'm having trouble finding a solution for a program I'm trying to make.
You see I have this programA, that when prompted to, will run an external .exe of my choosing.
The current set up is that program A will run an SMS sending.exe that will send a string of text to a mobile phone using a USB modem.
What i'm trying to do is replicate that SMS Sending.exe. I have no trouble in sending a string of text to a mobile phone but I do have a problem on how to get that string of text from programA.
I have no idea how programA gives that string of text to the SMS sending exe. That is what im tryign to find out so I can replicate it. Is there anyway I can monitor the communication of these 2? These 2 programs run on one local machine. | 0 | [
2,
7626,
14,
3291,
16,
172,
1726,
27,
51,
375,
1940,
60,
800,
3726,
3726,
31,
22,
79,
452,
2572,
3007,
21,
4295,
26,
21,
625,
31,
22,
79,
749,
20,
233,
9,
42,
196,
31,
57,
48,
625,
58,
15,
30,
76,
9491,
20,
15,
129,
485,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.