unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Can mtrace be successfully run with valgrind?
===
I have a program which does 5 mallocs and 3 frees. I call mtrace() at the start and muntrace() at the end. mtrace will report the missing frees if I run the program normally. If I do:
valgrind -v --log-file=val.log --leak-check=full --show-reachable=yes my_program
valgrind will report the missing frees but mtrace will not.
So I guess you can't use them both together - valgrind will override mtrace? | 0 | [
2,
92,
8651,
7367,
44,
3673,
485,
29,
3347,
23244,
43,
60,
800,
3726,
3726,
31,
57,
21,
625,
56,
630,
331,
3668,
2499,
18,
17,
203,
551,
18,
9,
31,
645,
8651,
7367,
5,
6,
35,
14,
799,
17,
6492,
38,
7367,
5,
6,
35,
14,
241,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Protobuf java code has build errors
===
If you get build errors like these when using protobufs with java, look below.
The method getOptions() from the type Descriptors.Descriptor refers to the missing type MessageOptions
The import com.google.protobuf.DescriptorProtos cannot be resolved
FileDescriptorProto cannot be resolved to a type
| 0 | [
2,
9347,
2345,
410,
8247,
1797,
63,
1895,
11908,
800,
3726,
3726,
100,
42,
164,
1895,
11908,
101,
158,
76,
568,
9347,
2345,
11754,
29,
8247,
15,
361,
1021,
9,
14,
2109,
164,
25458,
4710,
5,
6,
37,
14,
1001,
121,
8741,
248,
18,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bean value not updated with Ajax
===
I have a PopupPanel with a form inside. The form has been previously rendered by ajax, so by some issue / bug with richfaces, I am forced to put the `a4j:commandButton` outside the form, with an `execute` attribute.
When I hit the button, it calls the server but the bean value is not updated.
Any suggestion?
Simplied code of my form:
<rich:popupPanel id="workOrderPopup" modal="true" resizeable="true"
onmaskclick="#{rich:component('workOrderPopup')}.hide()" width="750" height="420">
<h:form id="editWorkOrderForm" onkeypress="if (event.keyCode == 13) { document.getElementById('workOrderEdition:saveWO').click(); return false; }">
[[[FORM FIELDS]]]
</h:form>
<a4j:commandButton id="createWO" value="Guardar" action="#{ticketCont.saveWorkOrder()}"
render="workOrders,footer" execute="editWorkOrderForm" oncomplete="#{rich:component('workOrderPopup')}.hide()"/>
</rich:popupPanel>
Complete code of my form:
<rich:popupPanel id="workOrderPopup" modal="true" resizeable="true"
onmaskclick="#{rich:component('workOrderPopup')}.hide()" width="750" height="420">
<h:form id="editWorkOrderForm" onkeypress="if (event.keyCode == 13) { document.getElementById('workOrderEdition:saveWO').click(); return false; }">
<table width="100%" id="editWorkOrderTable">
<tr>
<td>
<h:outputText value="ID" for="editedWOId"/><br/>
<h:inputText value="#{ticketCont.workOrder.id}" id="editedWOId" readonly="true" size="7"/>
</td>
<td>
<h:outputText value="Descripción" for="editedWODescription"/><br/>
<h:inputText value="#{ticketCont.workOrder.description}" id="editedWODescription"/>
</td>
<td>
<h:outputText value="Estado" for="editedWOState"/><br/>
<h:selectOneListbox value="#{ticketCont.workOrder.status}">
<f:selectItem itemLabel="Abierto" itemValue="0"/>
<f:selectItem itemLabel="Cerrado" itemValue="1"/>
</h:selectOneListbox>
</td>
<td>
<h:outputText value="Tiempo (en horas)" for="editedWOTime"/><br/>
<rich:inputNumberSpinner value="#{ticketCont.workOrder.workHours}" inputSize="4"/>
</td>
</tr>
<tr>
<td colspan="4">
<div align="center">
<h:outputText value="Recursos" for="editedWOResources"/><br/>
<rich:pickList value="#{ticketCont.workOrder.resources}" var="_resource" listHeight="200px" id="editedWOResources">
<f:selectItems value="#{ticketCont.activeResources}"/>
<f:converter converterId="es.caib.gesma.gesman.data.converter.ResourceConverter" />
<rich:column>
#{_resource.name}
</rich:column>
</rich:pickList>
</div>
</td>
</tr>
</table>
</h:form>
<a4j:commandButton id="createWO" value="Guardar" action="#{ticketCont.saveWorkOrder()}"
render="workOrders,footer" execute="editWorkOrderForm" oncomplete="#{rich:component('workOrderPopup')}.hide()"/>
</rich:popupPanel>
I am using JBoss 6.1, Mojarra 2.1.9 and Richfaces 4. | 0 | [
2,
15322,
1923,
52,
6372,
29,
20624,
800,
3726,
3726,
31,
57,
21,
1675,
576,
3206,
532,
29,
21,
505,
572,
9,
14,
505,
63,
74,
1343,
10877,
34,
20624,
15,
86,
34,
109,
1513,
13,
118,
6256,
29,
2042,
6413,
18,
15,
31,
589,
1292,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which App is on the foreground?
===
Can I know somehow which App is on the foreground at the moment if I'm using Background Service or Broadcast Receiver maybe by having its package name? Thanks in advance. | 0 | [
2,
56,
4865,
25,
27,
14,
26,
62,
8810,
60,
800,
3726,
3726,
92,
31,
143,
3625,
56,
4865,
25,
27,
14,
26,
62,
8810,
35,
14,
688,
100,
31,
22,
79,
568,
2395,
365,
54,
1992,
6264,
913,
34,
452,
82,
6030,
204,
60,
3669,
19,
36... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
C# project/solution structure for easy CI building
===
We have around ~ 80 C# projects in a single Git repository.
Our CI server is TeamCity, and we use it to build upon every commit to our git master repository.
I am trying to come up with the best way to build all of the projects on the server.
These projects are currently grouped together in a few .sln files (around 20 projects each), is it a common practice to create a "master" solution file with ALL projects such that the build server will only need to build this solution?
Or is it preferable to keep some MSBuild or other script file that will itself execute the building of each solution/project whatever it sees fit? | 0 | [
2,
272,
5910,
669,
118,
18,
18687,
3309,
1411,
26,
2010,
5486,
353,
800,
3726,
3726,
95,
57,
140,
13,
1,
2972,
272,
5910,
2314,
19,
21,
345,
13,
10404,
24869,
9,
318,
5486,
8128,
25,
173,
5788,
15,
17,
95,
275,
32,
20,
1895,
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... |
Nested observables in knockoutjs
===
In a web app based on Knockoutjs and Sammy.js I have three observables that depend on each other in a parent-child way (the second is child of the first, the third is child of the second). My HTML has three sections where only one should be visible at a time. Each section depends on one of the mentioned observables using the visible binding.
My URL scheme is laid out like /#id-of-parent/id-of-child/id-of-grandchild (in Sammy.js).
If I access a full URL (one with all three ids) I get into trouble with the observables. In the Sammy rule function I first load and store the parent, then the child and lastly the grandchild (which is really the data the user wants to see). The problem is that the bindings for the parent and the child are also triggered.
Is there a way to avoid triggering the bindings or is there a better way to organise an app like this? | 0 | [
2,
5618,
69,
5122,
10321,
579,
18,
19,
11676,
728,
18,
800,
3726,
3726,
19,
21,
2741,
4865,
432,
27,
11676,
728,
18,
17,
17570,
9,
728,
18,
31,
57,
132,
5122,
10321,
579,
18,
30,
12547,
27,
206,
89,
19,
21,
4766,
8,
11287,
161... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Type casting in Python 2.7
===
how to cast a float into long in Python 2.7,
Im doing the same in Python2.3 like,
from array import*
data = array('L',[12.34])
print data
it will print like
array('L',[12L])
how to do the same in Python2.7. Please help me | 0 | [
2,
1001,
9087,
19,
20059,
172,
9,
465,
800,
3726,
3726,
184,
20,
1325,
21,
11510,
77,
175,
19,
20059,
172,
9,
465,
15,
797,
845,
14,
205,
19,
20059,
135,
9,
240,
101,
15,
37,
7718,
9010,
2483,
1054,
800,
7718,
5,
22,
255,
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... |
JBoss server.log output customization
===
I have developed a servlet that outputs the server.log file of my JBoss 7.1 for easier debugging.
What i want to do is to customize the output of JBoss and also display from which war each line of output is generated.
To understand better this is a sample output right now:
![server log as a servlet][1]
What i want is also to output something that will identify from which deployment this output is coming from.
After the URL in each output i noticed a number after the 7001 port that is different for each deployment, but don't know how to associate that with a war file....
Anyone has an idea how i can do that?
Thanks in advance
[1]: http://i.stack.imgur.com/CMQ1d.png | 0 | [
2,
487,
10349,
18,
8128,
9,
5567,
5196,
5816,
1829,
800,
3726,
3726,
31,
57,
885,
21,
13,
10321,
1336,
30,
5196,
18,
14,
8128,
9,
5567,
3893,
16,
51,
487,
10349,
18,
453,
9,
165,
26,
4950,
121,
16254,
2762,
9,
98,
31,
259,
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... |
jQuery Mobile loading message spinner error
===
I want to use jQuery Mobile pageloading message in my app.But I am having problem with the display of the spinner.
In case of a custom message, the messsage displays correctly only if I use textonly option.If I enable the spinner, only the spinner is shown and nothing else.
Here is the code:
$.mobile.showPageLoadingMsg("a","This is only a test",true);
In the above case, no spinner is shown.
$.mobile.showPageLoadingMsg("a","This is only a test",false);
In this case, only a spinner and nothing else is shown.What am I doing wrong? | 0 | [
2,
487,
8190,
93,
3241,
12797,
2802,
3310,
1031,
7019,
800,
3726,
3726,
31,
259,
20,
275,
487,
8190,
93,
3241,
2478,
16866,
2802,
19,
51,
4865,
9,
811,
31,
589,
452,
1448,
29,
14,
3042,
16,
14,
3310,
1031,
9,
19,
610,
16,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to add a box in this ListView for uploading image?
===
I am a new ASP.NET developer and I have to create a quiz engine application. I am using a ListView for inserting the questions under specific quiz.
I have the following database design:
QuizContent Table: ID, QuizID, QuestionID, AnswerID
Quiz Table: QuizID, Title, Description
Question Table: QuestionID, Question, QuestionOrder, AnswerExplanation
Answers Table: AnswerID, Answer
QuestionImage: ID, QuestionID, URL
What I want now is making the admin being able to embedd an image to any one of these questions. How can I do that since I have two different tables in the database. One for the questions and one for the images as shown in the design above.
I know I should not post too much code or information, but I have to do it to make it clear:
<asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource2"
DataKeyNames="QuestionID" InsertItemPosition="LastItem">
<EditItemTemplate>
<tr style="">
<td>
<asp:ImageButton ID="UpdateButton" ImageUrl="Images/icons/update24.png" ToolTip="Update" runat="server" CommandName="Update" />
<asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/cancel324.png" ToolTip="Cancel" runat="server" CommandName="Cancel" />
</td>
<%--<td>
<asp:Label ID="QuestionIDLabel1" runat="server"
Text='<%# Eval("QuestionID") %>' />
</td>--%>
<td>
<asp:TextBox ID="QuestionTextBox" runat="server"
Text='<%# Bind("Question") %>' />
</td>
<td>
<asp:TextBox ID="QuestionOrderTextBox" runat="server"
Text='<%# Bind("QuestionOrder") %>' />
</td>
<td>
<asp:TextBox ID="AnswerExplanationTextBox" runat="server"
Text='<%# Bind("AnswerExplanation") %>' />
</td>
</tr>
</EditItemTemplate>
<EmptyDataTemplate>
<table runat="server"
style="">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<tr style="">
<td>
<asp:ImageButton ID="InsertButton" ImageUrl="Images/icons/add24.png" ToolTip="Add" runat="server" CommandName="Insert" />
<asp:ImageButton ID="CancelButton" ImageUrl="Images/icons/clear24.png" ToolTip="Cancel" runat="server" CommandName="Cancel" />
</td>
<%--<td>
</td>--%>
<td>
<asp:TextBox ID="QuestionTextBox" runat="server"
Text='<%# Bind("Question") %>' />
</td>
<td>
<asp:TextBox ID="QuestionOrderTextBox" runat="server"
Text='<%# Bind("QuestionOrder") %>'/>
</td>
<td>
<asp:TextBox ID="AnswerExplanationTextBox" runat="server"
Text='<%# Bind("AnswerExplanation") %>' />
</td>
</tr>
</InsertItemTemplate>
<ItemTemplate>
<tr style="">
<td>
<asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="delete" runat="server" CommandName="Delete" />
<asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" />
<asp:ImageButton ID="SelectButton" ImageUrl="Images/icons/select.png" ToolTip="Select" runat="server" CommandName="Select" />
<%--<asp:Button ID="SelectButton" runat="server" CommandName="Select" Text="Select" />--%>
</td>
<td>
<asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
</td>
<td>
<asp:Label ID="QuestionOrderLabel" runat="server"
Text='<%# Eval("QuestionOrder") %>' />
</td>
<td>
<asp:Label ID="AnswerExplanationLabel" runat="server"
Text='<%# Eval("AnswerExplanation") %>' />
</td>
</tr>
</ItemTemplate>
<LayoutTemplate>
<div ><table id="thetable" width="97%" cellpadding="0px" cellspacing="0px" style="margin:0px 0px 0px 0px; border:2px solid #003366; font-size:13px; font-weight:bold;">
<thead>
<tr style="background-color:#C6D7B5;">
<th style="border-bottom:2px solid #003366; ">...</th>
<th style="border-bottom:2px solid #003366; ">Question</th>
<th style="border-bottom:2px solid #003366; ">Question Order</th>
<th style="border-bottom:2px solid #003366; ">Answer Explanation</th>
</tr>
</thead>
<tbody><tr id="itemPlaceholder" runat="server"></tr></tbody>
</table></div>
</LayoutTemplate>
<SelectedItemTemplate>
<tr style="">
<td>
<asp:ImageButton ID="DeleteButton" ImageUrl="Images/icons/delete24.png" ToolTip="Delete" runat="server" CommandName="Delete" />
<asp:ImageButton ID="EditButton" ImageUrl="Images/icons/edit24.png" ToolTip="Edit" runat="server" CommandName="Edit" />
</td>
<td>
<asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
</td>
<td>
<asp:Label ID="QuestionOrderLabel" runat="server"
Text='<%# Eval("QuestionOrder") %>' />
</td>
<td>
<asp:Label ID="AnswerExplanationLabel" runat="server"
Text='<%# Eval("AnswerExplanation") %>' />
</td>
</tr>
</SelectedItemTemplate>
</asp:ListView>
</div>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:QuizSysDBConnectionString %>"
SelectCommand="SELECT DISTINCT [Question].* FROM [Question] INNER JOIN [QuizContent] ON [QuizContent].[QuizID] = @QuizID"
DeleteCommand="DELETE FROM [Question] WHERE [QuestionID] = @QuestionID"
InsertCommand="INSERT INTO [Question] ([Question], [QuestionOrder], [AnswerExplanation]) VALUES (@Question, @QuestionOrder, @AnswerExplanation)"
UpdateCommand="UPDATE [Question] SET [Question] = @Question, [QuestionOrder] = @QuestionOrder, [AnswerExplanation] = @AnswerExplanation WHERE [QuestionID] = @QuestionID">
<DeleteParameters>
<asp:Parameter Name="QuestionID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Question" Type="String" />
<asp:Parameter Name="QuestionOrder" Type="Int32" />
<asp:Parameter Name="AnswerExplanation" Type="String" />
<asp:ControlParameter ControlID="ListView1" Name="QuizID" PropertyName="SelectedValue" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Question" Type="String" />
<asp:Parameter Name="QuestionOrder" Type="Int32" />
<asp:Parameter Name="AnswerExplanation" Type="String" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="ListView1" Name="QuizID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
**So how to do that?** | 0 | [
2,
184,
20,
3547,
21,
1649,
19,
48,
968,
4725,
26,
71,
16866,
1961,
60,
800,
3726,
3726,
31,
589,
21,
78,
28,
306,
9,
2328,
10058,
17,
31,
57,
20,
1600,
21,
17667,
1406,
3010,
9,
31,
589,
568,
21,
968,
4725,
26,
14692,
68,
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... |
outbound HTTPS calls on NGINN
===
Form within my PHP code on NGINX, I am making an HTTPS call to a 3rd party server. But it doesnt work. When I change it to HTTP instead of HTTPS, it works. But we cant leave that as is. We need to have it run as HTTPS. Is there some config on NGINX that we need to change to allow outbound HTTPS calls to a 3rd party service? | 0 | [
2,
70,
7410,
7775,
18,
3029,
27,
13,
2723,
11789,
800,
3726,
3726,
505,
363,
51,
13,
26120,
1797,
27,
13,
2723,
108,
396,
15,
31,
589,
544,
40,
7775,
18,
645,
20,
21,
203,
897,
346,
8128,
9,
47,
32,
5886,
170,
9,
76,
31,
753... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Uploadify in mozilla
===
Hi am using Uploadify plugin to upload photos.My issue is in mozilla. When i click on button the dialog box opens the uploadify works fine but the issue is when i click on other tabs,links on my application the uploadify dialog box vanishes and it goes to the respective page this happens only in mozilla .i want to restrict this.Can anybody give the solution for this. | 0 | [
2,
71,
8294,
8612,
19,
13,
18057,
3247,
800,
3726,
3726,
4148,
589,
568,
71,
8294,
8612,
10922,
108,
20,
71,
8294,
7064,
9,
915,
1513,
25,
19,
13,
18057,
3247,
9,
76,
31,
10840,
27,
5167,
14,
28223,
1649,
8965,
14,
71,
8294,
861... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Events organized vertically in Week view and horizentally in Month view
===
After playing around with fullcalendar for a large project, i figured out that fullCal sorts events vertically in Week view (check the bottom view of the attached image) and horizontally in Month view (attached image top).
They are all supposed to be sorted horizontally in week view as well.
Thanks
![Events organized vertically in Week view and horizentally in Month view][1]
[1]: http://i.stack.imgur.com/2OCdL.png | 0 | [
2,
963,
2518,
23300,
19,
877,
1418,
17,
4523,
3186,
2291,
1326,
19,
1617,
1418,
800,
3726,
3726,
75,
791,
140,
29,
503,
3430,
219,
2542,
26,
21,
370,
669,
15,
31,
5700,
70,
30,
503,
3430,
14357,
963,
23300,
19,
877,
1418,
13,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Increase Row Count of ListView with CursorAdapter?
===
I'm using a ListView that is populated by a custom CursorAdapter that returns two different Views based on the value of the data in the Cursor for that particular row. One View type contains a TextView, call it TextView1. The second View contains TextView1 and TextView2. The problem is I'd like the second View to be treated as two rows in the ListView. So Text1 would become a row and Text2 would become another row. Obviously with Layouts I can make it look like it's a different row, but it's not actually a different row. I can't independently select them, so when I hook into the ListView's OnListItemClick event, I get a single event for clicking TextView1 and TextView2, they are not distinct. Is there a way I can tell the ListView that there are two rows here and not one or is there a way to fake it?
Thanks!
| 0 | [
2,
1839,
3131,
2468,
16,
968,
4725,
29,
29588,
27576,
106,
60,
800,
3726,
3726,
31,
22,
79,
568,
21,
968,
4725,
30,
25,
11111,
34,
21,
5816,
29588,
27576,
106,
30,
4815,
81,
421,
4146,
432,
27,
14,
1923,
16,
14,
1054,
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... |
Android - Page curl effect for the view
===
We have few requirements in our application like Page curl functionality and zooming view.
Page curl is exactly like in a book how we are turning a page to page. We got few samples as well for page curl which is using GLSurfaceView and Renderer classes to implement it. Since they are from openGL, they were trying to apply the page curl for the images stored in drawable by getting it as bitmap.
For our case, we have a view where we will have many images on it. We need to apply the page curl effect for the whole view (view in the sense a parent layout) which act as a page here.
Any help. Greatly appreciated. | 1 | [
2,
13005,
13,
8,
2478,
14320,
1590,
26,
14,
1418,
800,
3726,
3726,
95,
57,
310,
4786,
19,
318,
3010,
101,
2478,
14320,
18548,
17,
19469,
68,
1418,
9,
2478,
14320,
25,
1890,
101,
19,
21,
360,
184,
95,
50,
2101,
21,
2478,
20,
2478... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HTML 5 File API 0x80004003
===
Hi i am using the JS HTML5 File API to handle file uploads to my server.
i am getting the following error in Aurora(Fire Fox Bleeding edge builds)
NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMFileReader.readAsBinaryString]
<code>
function readBlob(opt_startByte, opt_stopByte,file,partNo) {
var start = parseInt(opt_startByte);
var stop = parseInt(opt_stopByte);
var reader = new FileReader();
var totalParts = parseInt(file.size/MAX_READ);
if((file.size % MAX_READ) !== 0){
totalParts++;
}
// If we use onloadend, we need to check the readyState.
reader.onloadend = function(evt) {
if (evt.target.readyState == FileReader.DONE) {
//var contents = reader.result;
postFilePart(partNo,contents,totalParts,escape(file.name))// DONE == 2
}
};
if (file.webkitSlice) {
var blob = file.webkitSlice(start, stop);
} else if (file.mozSlice) {
var blob = file.mozSlice(start, stop);
}
reader.readAsBinaryString(blob);
}
</code>
the error is occurring at this line
<code>reader.readAsBinaryString(blob);</code>
i have tried mozSlice and Slice
<code>if (file.mozSlice) {
var blob = file.mozSlice(start, stop);
}</code>
and it gave me the same results. it might not be the best idea to use HTML 5 API yet as this may cause issues with other browsers as well.
does anyone have a work around to get the same functionality or how i can resolve this particular error | 0 | [
2,
13,
15895,
331,
3893,
21,
2159,
713,
396,
28064,
7114,
240,
800,
3726,
3726,
4148,
31,
589,
568,
14,
487,
18,
13,
15895,
264,
3893,
21,
2159,
20,
3053,
3893,
71,
8294,
18,
20,
51,
8128,
9,
31,
589,
1017,
14,
249,
7019,
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... |
limitting range of input field
===
Though It is very common question. But I have one input field in which data must be entered between 1 and 150 .
Problem is I am already using some validations on that .That validation is being used by many other input fields.So I can not change that.Here it is num()
On one field mesure I want to add extra functionality.I tried it with validate.
I dont know how to merge these two validations for only one input field.Using both function in document.ready
I can do it in either jquery or php
<input type="text" name='mesure' class="numbersonly" maxlength="3" onblur =" validate()"/>
function num() {
$(".numbersonly").bind('keypress', function(e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
$("#errmsg").html("numbers please");
return false;
}
});
}
function validate()
{
if( document.form.mesure.value >150 )
{
alert( "out of range!" );
document.form.mesure.focus() ;
return false;
}
}
Thank you all
| 0 | [
2,
4496,
1203,
978,
16,
6367,
575,
800,
3726,
3726,
362,
32,
25,
253,
757,
1301,
9,
47,
31,
57,
53,
6367,
575,
19,
56,
1054,
491,
44,
1297,
128,
137,
17,
4354,
13,
9,
1448,
25,
31,
589,
614,
568,
109,
27999,
18,
27,
30,
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... |
folders created with php, are being owned by apache
===
We are using a linux dedicated server in our company.
Whenever we create a folder with php script, apache is owning the folder and each time I have to connect to server via root in order to change the owner to the user and the permissions
But I don't know which setting I should change in order to fix this.
I tried to switch the safe mode on/off but it didn't work.
I'd be glad if someone could help me
Thanks in advance | 0 | [
2,
19294,
18,
679,
29,
13,
26120,
15,
50,
142,
1467,
34,
17140,
800,
3726,
3726,
95,
50,
568,
21,
13024,
2360,
8128,
19,
318,
237,
9,
6634,
95,
1600,
21,
19294,
29,
13,
26120,
3884,
15,
17140,
25,
258,
68,
14,
19294,
17,
206,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 retrieve records from database by selecting a list item
===
Hi i want to select an item from list box and to retrieve the records of the selected item from the database display its content in edittext field. Iam new to android and i can't found any hints regarding to this topic. so friends if anybody knows please help me.<br>Thanks in advance... | 0 | [
2,
184,
20,
11917,
742,
37,
6018,
34,
20764,
21,
968,
9101,
800,
3726,
3726,
4148,
31,
259,
20,
5407,
40,
9101,
37,
968,
1649,
17,
20,
11917,
14,
742,
16,
14,
1704,
9101,
37,
14,
6018,
3042,
82,
2331,
19,
9392,
11969,
575,
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... |
Group by not returning 0 value
===
My table contains pk_id,reviewer_id,rating.
There are 4 type of rating.
1-very good.
2-good.
3-bad.
4-very bad.
I want to calculate how much rating given by each reviewer.
Means:
If Akee having id 200 has given 2 very good,4 good,3 bad and zero very bad rating to different code.
I want result
**count--- rate**
2---------1
4---------2
3---------3
0---------4
My query is
SELECT COUNT(RATE),RATE FROM CODE_REVIEW WHERE CODE_REVIEWER_ID= 200 GROUP BY RATE;
It is showing result
**count--- rate**
2---------1
4---------2
3---------3
I want to show the fourth row that is 4 rating zero.
How can it be done??Please help.
[1]: http://i.stack.imgur.com/Hw5Cm.png
[2]: http://i.stack.imgur.com/Ezyqa.png | 0 | [
2,
214,
34,
52,
2485,
713,
1923,
800,
3726,
3726,
51,
859,
1588,
13,
17244,
1,
1340,
15,
99,
4725,
106,
1,
1340,
15,
15073,
9,
80,
50,
268,
1001,
16,
4647,
9,
137,
8,
7864,
254,
9,
172,
8,
3264,
9,
203,
8,
5989,
9,
268,
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... |
changing the color of individual data points flotr2
===
I was wondering if it was possible to change the color of individual data points. I have tried writing my own function into it like in tickFormatter, but it doesn't seem to be working. This is kinda what I'm talking about:
graph = Flotr.draw(container, [
{ data : dataset, label : 'Scores1', lines:{show:true},
points: {
show: true,
color: function(o){
return 'yellow';
}
}},
{ data : patient_average, label : 'Scores2', lines:{show:true}, points: {show:true}},
{ data : overall_average, label : "Scores3", lines : {show:true, color:'#FFCD00'}, points: {show:true, color: '#FFCD00'}}
], {
Right now I was just trying to get it to show yellow so that I knew that the function would work. If that works I basically want it so that depending on what the value of the data point is I would color it into a certain color. But with the code above it just displays the points as grey meaning that it doesn't understand my code. Is this even possible? Thanks for any help. | 0 | [
2,
4226,
14,
1665,
16,
1359,
1054,
819,
9319,
6384,
135,
800,
3726,
3726,
31,
23,
5712,
100,
32,
23,
938,
20,
753,
14,
1665,
16,
1359,
1054,
819,
9,
31,
57,
794,
1174,
51,
258,
1990,
77,
32,
101,
19,
8809,
23588,
815,
15,
47,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Looking for advice on programs to open huge text files
===
I have several files which I need to examine I'm currently using ultra edit and it works but I'm looking for something that can deal with a really big file a little better than ultra edit. It is entirely too slow and crashes a lot. The sizes of the files are 10+ GB. I've tried hex editor but it gives me the information in the wrong format. Any suggestions>? | 0 | [
2,
699,
26,
4978,
27,
1726,
20,
368,
2329,
1854,
6488,
800,
3726,
3726,
31,
57,
238,
6488,
56,
31,
376,
20,
9691,
31,
22,
79,
871,
568,
6885,
9392,
17,
32,
693,
47,
31,
22,
79,
699,
26,
301,
30,
92,
1183,
29,
21,
510,
580,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XSLT 1.0: IDOC to AdsML transformation
===
I need to transform SAP IDOC to AdsML format.
But the abstract question is: how to transform xml1 into xml2?
xml1:
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>010</ITEM_NUMBER>
</E1BPBUSISM008_ITEM_OUT>
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>020</ITEM_NUMBER>
</E1BPBUSISM008_ITEM_OUT>
<E1BPBUSISM008_AD_SPEC_AD_OU>
<ITEM_NUMBER>010</ITEM_NUMBER>
<PLANNED_WIDTH>1.851</PLANNED_WIDTH>
<PLANNED_HEIGHT>0.000</PLANNED_HEIGHT>
</E1BPBUSISM008_AD_SPEC_AD_OU>
<E1BPBUSISM008_AD_SPEC_AD_OU>
<ITEM_NUMBER>020</ITEM_NUMBER>
<PLANNED_WIDTH>2.37</PLANNED_WIDTH>
<PLANNED_HEIGHT>0.000</PLANNED_HEIGHT>
</E1BPBUSISM008_AD_SPEC_AD_OU>
into xml2:
<Ad>
<ad-number>010<ad-number>
<width>1.851</width>
<height>0.000</height>
</Ad>
<Ad>
<ad-number>020<ad-number>
<width>2.37</width>
<height>0.000</height>
</Ad>
What I have tried here is Muench method, but even if it is the correct solution for this case, not sure how to complete it, because it returns wrong 'width' and 'heigth' (the same for all Ad elements):
<xsl:key name="adnumbers" match="IE1BPBUSISM008_ITEM_OUT" use="ITEM_NUMBER"/>
....
<xsl:for-each select="E1BPBUSISM008_ITEM_OUT[generate-id(.)=generate-id(key('adnumbers',ITEM_NUMBER)[1])]">
<xsl:sort select="ITEM_NUMBER"/>
<Ad>
<ad-number>
<xsl:value-of select="ITEM_NUMBER/text()"/>
</ad-number>
<width>
<xsl:value-of select="E1BPBUSISM008_AD_SPEC_AD_OU/PLANNED_WIDTH"/>
</width>
<height>
<xsl:value-of select="E1BPBUSISM008_AD_SPEC_AD_OU/PLANNED_HEIGHT"/>
</height>
outputs:
<Ad>
<number>010</ad-number>
<width>1.851</width>
<heigth>0.000</heigth>
</Ad>
<Ad>
<number>020</ad-number>
<width>1.851</width>
<heigth>0.000</heigth>
</Ad> | 0 | [
2,
993,
18,
255,
38,
137,
9,
387,
45,
31,
13799,
20,
16236,
8184,
6978,
800,
3726,
3726,
31,
376,
20,
8007,
7508,
31,
13799,
20,
16236,
8184,
2595,
9,
47,
14,
8502,
1301,
25,
45,
184,
20,
8007,
23504,
165,
77,
23504,
135,
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... |
ActiveRecord DateTime comparison
===
I understand that Rails store the Time in UTC.
I have out_date and in_date instances of DateTime
I have this query:
reservations = Reservation.where("bookable_id = :bookable_id AND bookable_type = :bookable_type AND status <> :status AND ((:out_date >= check_out_date AND :out_date <= check_in_date) OR (:in_date <= check_in_date AND :in_date >= check_out_date) OR (:out_date <= check_in_date AND :in_date >= check_in_date))", :bookable_id => params[:bookable_id], :bookable_type => params[:bookable_type], :status => Reservation::STATUS_CHECKED_IN, :out_date => out_date, :in_date => in_date)
I always get a null set even though I should get a return tuple.
I have tried these varients:
out_date.utc
out_date.utc.to_s(:db)
Nothing seems to be working. How to construct this query?
| 0 | [
2,
1348,
14953,
1231,
891,
6050,
800,
3726,
3726,
31,
1369,
30,
2240,
18,
1718,
14,
85,
19,
13,
11440,
9,
31,
57,
70,
1,
8209,
17,
19,
1,
8209,
13946,
16,
1231,
891,
31,
57,
48,
25597,
45,
8733,
18,
800,
8733,
9,
2798,
5,
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... |
Creating a plane, adding a texture on both sides and rotating the object on it's side
===
I'm trying to create a long corridor with a repeating texture. How do I add a repeating texture and rotate a object (in this case a plane) at right angles to create the corridor wall's and ceiling?
var texture, material, plane;
texture = THREE.ImageUtils.loadTexture( "../img/texture.jpg" );
texture.wrapT = THREE.RepeatWrapping; // This doesn't seem to work;
var material = new THREE.MeshLambertMaterial({ map : texture });
plane = new THREE.Mesh(new THREE.PlaneGeometry(400, 3500), material);
plane.doubleSided = true;
plane.position.x = 100;
plane.rotation.z = 2; // Not sure what this number represents.
scene.add(plane);
| 0 | [
2,
2936,
21,
3627,
15,
4721,
21,
12714,
27,
156,
2570,
17,
16164,
14,
3095,
27,
32,
22,
18,
270,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
175,
5222,
29,
21,
17389,
12714,
9,
184,
107,
31,
3547,
21,
17389,
12714,
17,
214... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 upload using ajax ,jquery,java
===
I have a html form that have some text fields and one file type as form elements.
I am using jquery ajax method to pass the form datas to servlet.
I have set multipart/form-data in my form. But in the server side am getting only the text fields where as the file type is giving out exception like multipart data not found exception.
Is it possible to upload files using jquery ajax method.
Is there any solution for this..? | 0 | [
2,
20700,
71,
8294,
568,
20624,
13,
15,
728,
8190,
93,
15,
1004,
1385,
800,
3726,
3726,
31,
57,
21,
13,
15895,
505,
30,
57,
109,
1854,
2861,
17,
53,
3893,
1001,
28,
505,
2065,
9,
31,
589,
568,
487,
8190,
93,
20624,
2109,
20,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to set header and footer as dynamic in word document generation using php
===
i have generated the word document using html template in php. but the issue is, header and footer not displayed. how to integrate header and footer as dynamically. can i include html template as header and put page number as dynamic in footer part. Any one guide me or help... Thanks in advance... | 0 | [
2,
184,
20,
309,
157,
106,
17,
1749,
106,
28,
7782,
19,
833,
4492,
2782,
568,
13,
26120,
800,
3726,
3726,
31,
57,
6756,
14,
833,
4492,
568,
13,
15895,
22894,
19,
13,
26120,
9,
47,
14,
1513,
25,
15,
157,
106,
17,
1749,
106,
52,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Executing a terminal command in a java progam
===
javap -classpath /Users/amol/Documents/Java/
When i execute the above command in my terminal the output shows the function names in my class along with the local variables
Process process3 = Runtime.getRuntime().exec(new String[]{"javap","-classpath","/Users/amol/Documents/Java/","-l","-c","a"});
however when i type the above line in netbeans and run it, it only show the function names and line numbers where the local variables have been declared. Why is there a change in the output for tha same command?
Please help me out.... | 0 | [
2,
25836,
21,
3855,
1202,
19,
21,
8247,
895,
7253,
800,
3726,
3726,
8247,
306,
13,
8,
1898,
8353,
13,
118,
16704,
18,
118,
58,
9222,
118,
28132,
18,
118,
1004,
1385,
118,
76,
31,
15644,
14,
784,
1202,
19,
51,
3855,
14,
5196,
128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Only first 3 (of 7) Anchor ID links working goto correct place in Firefox (all work in Chrome & Safari.)
===
Ok, I'm working on a scrolling site (using jQuery) with one exterior page. Withing this exterior page there are navigation links to go back to the scrolling page. I have added unique ID's (eg. `<div id="done">` ) to each section on the scrolling page and have added # anchor points to the end of the links in the exterior page (eg. `<a href="index-banners.html#done">What We've Done</a>` ).
These work in Safari and Chrome. But only The first 3 (from the top of the page down) work in FF. The rest take me to the bottom of the page.
If I type the URL of the scrolling page with an # extension to one of the ID's that aren't working in FF, it works and takes me to the correct point. I have tried removeing the jQuery occurring after the working anchor points and they still wouldn't work. However, removing some `<ul>`'s that the jQuery effects did allow the links to find their respective points. This is mealy an observation as those `<ul>`'s must remain.
Can anyone tell me why and how I can fix/workaround?
Here is a link to the test page (<http://www.irishofcourse.co.cc/firebrand/index-banners.html>). Head to "what we do" then click the "find out more" link to the exterior page, or go straight to the exterior page here (<http://www.irishofcourse.co.cc/firebrand/index-do.html>). Note: the anchored links to "What We've Done", "Case Studies" and "Social" are the ones not working.
Ben.
| 0 | [
2,
104,
64,
203,
13,
5,
1041,
453,
6,
6265,
4924,
6271,
638,
330,
111,
4456,
209,
19,
535,
18219,
13,
5,
1233,
170,
19,
13,
12985,
279,
25055,
9,
6,
800,
3726,
3726,
5854,
15,
31,
22,
79,
638,
27,
21,
13,
28166,
689,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery on select show div
===
i have one question about jQuery. If user select "Presmerovanie" with value "0" in html select with id "typ" i want to show div with id "pres" . Here is the code:
<dl>
<dt><label for="typ">Typ</label></dt>
<dd>
<select id="typ" size="1">
<option value="1">Normálna</option>
<option value="0">Presmerovanie</option>
</select>
</dd>
</dl>
<!-- Len ak je presmerovatelna -->
<div id="pres" style="display: none;">
<dl>
<dt><label for="presmerovat">Presmerovat na</label></dt>
<dd>
<select id="presmerovat" size="1">
<option>Category 1</option>
<option>Category 2</option>
</select>
</dd>
</dl>
</div>
<!-- Koniec ak je presmerovatelna -->
is it possible? | 0 | [
2,
487,
8190,
93,
27,
5407,
298,
13,
12916,
800,
3726,
3726,
31,
57,
53,
1301,
88,
487,
8190,
93,
9,
100,
4155,
5407,
13,
7,
11973,
1263,
3496,
2913,
7,
29,
1923,
13,
7,
387,
7,
19,
13,
15895,
5407,
29,
4924,
13,
7,
1084,
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... |
google search images
===
Hi I need to send GET method to google to show me images something like this:
**web search:**
https://www.google.jo/search?q=Palestine
thanks
| 1 | [
2,
8144,
2122,
3502,
800,
3726,
3726,
4148,
31,
376,
20,
2660,
164,
2109,
20,
8144,
20,
298,
55,
3502,
301,
101,
48,
45,
13,
1409,
14113,
2122,
45,
1409,
7775,
18,
6903,
6483,
9,
16111,
4875,
9,
1636,
118,
25136,
60,
1251,
3726,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to know at page load, if view state is clear at some other event on the page?
===
I am facing a weird problem, i am dynamically loading user control at page load with ViewState condition check, if true then load it, else not.
Now the problem is on a dropdown selected index change event i set NULL to view state but the page load comes in action first and it sees that the viewstate is not null, so it load the control again, how to overcome with this problem, please let know how to fix it. | 0 | [
2,
184,
20,
143,
35,
2478,
6305,
15,
100,
1418,
146,
25,
1207,
35,
109,
89,
807,
27,
14,
2478,
60,
800,
3726,
3726,
31,
589,
4325,
21,
5455,
1448,
15,
31,
589,
7782,
1326,
12797,
4155,
569,
35,
2478,
6305,
29,
1418,
3859,
2874,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WPF Validation.HasError setting Margin on a TextBox
===
I've been trying everything to figure this issue out. :(
For a TextBox, I have a Validation.ErrorTemplate setup with an image on the right hand side of the textbox while it has a validation error.
This works great! But one thing I want to do is to resize or set the margin the textbox that has the error so it fits within the space the textbox has on the form. Currently, the image flows outside of the textboxes area.
What I really want is the textbox with error to take up the same space as textbox without.
Here is my XAML style:
<Style TargetType="{x:Type TextBox}">
<Style.Resources>
<my:TextBoxWidthTransformConverter x:Key="TextBoxWidthTransformConverter"/>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="Margin" Value="{Binding Converter={StaticResource TextBoxWidthTransformConverter}, RelativeSource={RelativeSource Self}}"/>
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}"/>
</Trigger>
</Style.Triggers>
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<StackPanel
Margin="{TemplateBinding Margin}"
Orientation="Horizontal"
RenderOptions.BitmapScalingMode="NearestNeighbor"
>
<AdornedElementPlaceholder
Grid.Column="1"
Grid.Row="1"
Name="controlWithError"
/>
<Border Width="2"/>
<Image
ToolTip="{Binding ElementName=controlWithError, Path=AdornedElement.(Validation.Errors).CurrentItem.ErrorContent}"
Source="imagepath"
/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
I'm using a converter TextBoxWidthTransformConverter just to see if I can get something to happen, but before I was just using "0,0,20,0" in the Value, to no avail. The converter doesn't fire, the Margin doesn't change. I've used Snoop to see if I can see the property being touched or changed, but nothing happens.
Is Margin a property that can't be changed by the Validation.HasError property?
Any insight would be wonderful!
Thanks! | 0 | [
2,
619,
7721,
27999,
9,
6482,
29992,
2697,
5440,
27,
21,
1854,
5309,
800,
3726,
3726,
31,
22,
195,
74,
749,
796,
20,
1465,
48,
1513,
70,
9,
13,
45,
5,
26,
21,
1854,
5309,
15,
31,
57,
21,
27999,
9,
29992,
9577,
6554,
18161,
29,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating Versioned Data and Finding Differences between versions in SQL Server
===
I am looking for a good database design solution for easy compare of my versioned information of data. Please review my scenario below for example (I can not place the actual scenario in our application though - very sorry for that.)
Sample Data:
-----------------------------------------------------
Assembly
-----------
AssemblyId AssemblyId
--------------------------
1 Assembly1
2 Assembly2
BOM
--------------------------
BOMId AssemblyId VersionName ParentBOMId
-----------------------------------------------------
1 1 V001 NULL
2 1 V002 1
3 1 V003 2
4 1 V004 3
5 1 V005 2
[Each time a BOM record is changed, it is inherited from any of the previous version (ParentBOMID) - If it is the first Version for the Assembly the ParentBOMID is Null]
BOMDetail
-----------
ID BOMID PartName Qty
---------------------------------------------------
1 1 Part1 2
2 1 Part2 1
3 1 Part3 2
4 2 Part1 2
5 2 Part2 1
6 2 Part4 2 {Change in PartName here in V002 Base Version V001}
7 3 Part1 2
8 3 Part2 1
9 3 Part4 2
10 3 Part5 9 {Added this part into V003 Base Version V002}
11 4 Part1 2
12 4 Part2 1
13 4 Part4 2
14 4 Part6 9 {this part changed into V004 Base Version V003}
15 2 Part1 2
16 2 Part2 1
17 2 Part9 2 {Change in PartName here in V002 Base Version V002}
I need to compare the different BOM Versions with each other. It is easy if need to compare the V001 with V002 OR V004 with V003 because there is ParentBOMId relationship easily available. But in the case of V005 when it is created from V002 AND if someone wants to compare V004 with V001 it is little difficult.
**P.S. I CAN NOT CREATE A MASTER TABLE FOR PARTS I HAVE TO WORK WITH COMPARING THE PART NAMES ONLY.**
Can Anyone suggest me different database design OR easy solution in the case when the Versioning frequencies are VERY VERY HIGH and the parent >> Parent >> parent relationship may go very deep in the hierarchy. | 0 | [
2,
2936,
615,
69,
1054,
17,
3007,
4921,
128,
3281,
19,
4444,
255,
8128,
800,
3726,
3726,
31,
589,
699,
26,
21,
254,
6018,
704,
4295,
26,
2010,
11590,
16,
51,
615,
69,
676,
16,
1054,
9,
2247,
1487,
51,
12705,
1021,
26,
823,
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... |
Missing BaseLineAlignment Property in Metro Style Application
===
I am using RichTextBlock to display images and text continuously, for example i suppose want to show mathematics matrix question, in that i am having all the matrix equation as images. So, my question will be like, text image text image text image and so on. "I just to make the content as vertically center". In WPF, i am having the property like baselinealignment. but i dont find any property in metro style application. How can i achieve that? | 0 | [
2,
2863,
27150,
192,
9693,
1130,
1354,
19,
3986,
1034,
3010,
800,
3726,
3726,
31,
589,
568,
2042,
11969,
12048,
20,
3042,
3502,
17,
1854,
11738,
15,
26,
823,
31,
5787,
259,
20,
298,
4264,
8187,
1301,
15,
19,
30,
31,
589,
452,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
google earth like UI android
===
I want to use google earth on Android App, because the motion is really smooth and the attractiveness of the UI. Is there any framework or controls or APIs available for integrating google earth like UI in android apps.
I want to display a particular location
I want to zoom in/out to locations
I want to add/display markers from a particular zoom level onwards.
Hope I described my problem well. If it is not clear I will explain more.
Please give me answer.
| 0 | [
2,
8144,
1073,
101,
13,
5661,
13005,
800,
3726,
3726,
31,
259,
20,
275,
8144,
1073,
27,
13005,
4865,
15,
185,
14,
2422,
25,
510,
3905,
17,
14,
7982,
720,
16,
14,
13,
5661,
9,
25,
80,
186,
6596,
54,
8671,
54,
21,
8954,
904,
26,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Changing BibTeX "format.names" function in .bst file to force "et al." citations at > 3 authors
===
Dear stackoverflow members,
I'm using natbib package for my reference list.
I have been struggling with BibTeX. I'm writing for Journal of Finance, and they want > 3 citations to be in "et al." format for the body of the paper. But the Journal's .bst file makes it such that no amount of authors will make natbib \citet or \citep (or any other method of citing) truncate the author list to "Jones et al. (2009)" (for example); all authors will always be listed.
I've found a solution to a different .bst (not the Journal of Finance's .bst) here:
http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2009-05/msg00099.html
But the Journal's .bst has a "format.names" function that's completely different to this and I can't edit it such that every paper that has > 3 authors gets truncated to "et al." in the body of the paper.
Please assist. Here's the code for the Journal's "format.names" function:
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
{ s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't := }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
if$
nameptr #1 >
{
namesleft #1 >
{ ", " * t * }
{
", " *
t "others" =
{ " et~al." * }
% { " {\small and} " * t * }
{ " and " * t * }
%%%KCB: added \small %%KD removed small
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
| 2 | [
2,
4226,
13,
16930,
38,
1706,
13,
7,
23588,
9,
7259,
18,
7,
1990,
19,
13,
9,
220,
384,
3893,
20,
558,
13,
7,
1198,
493,
9,
7,
9715,
18,
35,
13,
1,
203,
5152,
800,
3726,
3726,
4483,
7566,
2549,
9990,
443,
15,
31,
22,
79,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
multiple axis matlab
===
I have three variables:
First variable is: time (datenum),
Second variable is: depth,
Third variable is: u (x component of velocity)
I need to plot the u with x axis as time, u data should be starting from that depth.
I tried to use this:
x1 = time;
y1 = depth(:,1);
y2 = u(:,1);
plotyy(x1,y2,x1,y1);
But i dont want to plot depth but instead i want the u data to start from that depth value, but depth value should be shown on second y axis. Since i will be changing the depth matrix again and plotting on same plot.
Note that depth matrix is just one depth (1.20) through out.
| 0 | [
2,
1886,
8577,
4277,
9086,
800,
3726,
3726,
31,
57,
132,
12157,
45,
64,
7612,
25,
45,
85,
13,
5,
8209,
6336,
6,
15,
153,
7612,
25,
45,
5204,
15,
422,
7612,
25,
45,
287,
13,
5,
396,
5912,
16,
10700,
6,
31,
376,
20,
3798,
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... |
Access Inkscape Item In SVG From JavaScript
===
I am using a map of the US by counties in SVG format. I did not generate this map. It has PATH elements like:
<path
style="font-size:12px;fill:#d0d0d0;fill-rule:nonzero;stroke:#000000;stroke-opacity:1;stroke-width:0.1;stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:butt;marker-start:none;stroke-linejoin:bevel"
d="M 445.51998,291.515 L 451.69098,290.644 L 452.25298,290.563 L 452.85298,294.444 L 453.25798,297.212 L 447.56998,298.055 L 448.71498,296.347 L 448.73698,296.297 L 448.98998,295.683 L 449.04798,295.354 L 448.86298,294.795 L 448.70098,294.58 L 446.99298,293.975 L 446.58298,293.98 L 446.24498,294.044 L 445.92498,294.134 L 445.51998,291.515"
id="12057"
inkscape:label="Hillsborough, FL" />
What I want to do is on mouse hover for a popup text to appear with the county name.
In this example we see the name is held in `inkscape:label="Hillsborough, FL"`. I am having a problem in getting this value. I have tried various versions of:
this.label
this.inkscape.labe
...
Each of these fail with undefined or null errors.
How can I read this content in javascript?
Current system specs are jQuery 1.7.2 and d3js v2 running on a ASP.NET site. | 0 | [
2,
1381,
19,
197,
13109,
9101,
19,
13,
18,
22955,
37,
8247,
8741,
800,
3726,
3726,
31,
589,
568,
21,
2942,
16,
14,
182,
34,
4413,
19,
13,
18,
22955,
2595,
9,
31,
144,
52,
7920,
48,
2942,
9,
32,
63,
2013,
2065,
101,
45,
13,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Remove a value from string in hidden field with jQuery
===
I have a hidden field that stores all of the id's of images that have been uploaded for a specific post.
The hidden field HTML looks something like this:
<input type="hidden" id="post_images" name="post_images" value="1,2,3,4,5" />
When an image is deleted from the post, I need to remove it's image_id from that hidden field. So if I delete image_id 4 from the post, the hidden field needs to update to be `value="1,2,3,5"`
I'm open to changing the way I store the image_id's for the post to a different format if there is a better way of doing this. | 0 | [
2,
4681,
21,
1923,
37,
3724,
19,
3689,
575,
29,
487,
8190,
93,
800,
3726,
3726,
31,
57,
21,
3689,
575,
30,
4134,
65,
16,
14,
4924,
22,
18,
16,
3502,
30,
57,
74,
23782,
26,
21,
1903,
678,
9,
14,
3689,
575,
13,
15895,
1879,
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... |
How to load JSON via get into variable in CasperJS script
===
I'm using the following code to load some JSON data into a variable in my casperJS script:
var casper = require("casper").create({
verbose: true,
logLevel: 'debug',
pageSettings: {
userName: 'dev',
password: 'devpass',
}
});
var baseUrl = 'http://mysite.com/';
casper.start().then(function() {
this.open(baseUrl + 'JSON-stuff', {
method: 'get',
headers: {
'Accept': 'application/json'
}
});
});
casper.run(function() {
var journalJson = JSON.parse(this.getPageContent());
require('utils').dump(journalJson); //this returns my json stuff as expected
this.exit();
});
This works like I want - I have the journalJson object that I need to do my processing. However, I'm not sure how to continue with my testing. Other functions added to casper.run() do not execute as expected... for instance, if I change the casper run function to:
casper.run(function() {
var journalJson = JSON.parse(this.getPageContent());
require('utils').dump(journalJson);
this.open(baseUrl).then(function () {
this.assertExists('#header');
});
this.exit();
});
then phantomjs logs that the url is requested, but the test is never run.
My question: How can I access JSON via get, and then use it to perform tests? I think that I'm missing something here...
| 0 | [
2,
184,
20,
6305,
487,
528,
1197,
164,
77,
7612,
19,
26137,
728,
18,
3884,
800,
3726,
3726,
31,
22,
79,
568,
14,
249,
1797,
20,
6305,
109,
487,
528,
1054,
77,
21,
7612,
19,
51,
26137,
728,
18,
3884,
45,
4033,
26137,
800,
4077,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get the type of a value in Scheme?
===
I want a function that gets the type of a value at runtime. Example use:
(get-type a)
where `a` has been `define`d to be some arbitrary Scheme value.
How do I do this? Or do I have to implement this myself, using a cond stack of `boolean?`, `number?` etc. ? | 0 | [
2,
184,
107,
31,
164,
14,
1001,
16,
21,
1923,
19,
4276,
60,
800,
3726,
3726,
31,
259,
21,
1990,
30,
3049,
14,
1001,
16,
21,
1923,
35,
485,
891,
9,
823,
275,
45,
13,
5,
3060,
8,
4474,
21,
6,
113,
13,
1,
58,
1,
63,
74,
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... |
Access form - tab through columns not rows (not the first column), also only fields that are > 0
===
I've used the tab index and tab stop options in access but I want to tab through a column instead of through rows.
Within a form, I have a table which has three columns, the third contains integers and is the only column that I want to tab through. I would also preferably like to only tab through fields within the column that are not zero.
Currently, on pressing tab it goes through each field in each row of the table within the form.
I would be very grateful for any advice offered. | 0 | [
2,
1381,
505,
13,
8,
6523,
120,
7498,
52,
11295,
13,
5,
1270,
14,
64,
4698,
6,
15,
67,
104,
2861,
30,
50,
13,
1,
713,
800,
3726,
3726,
31,
22,
195,
147,
14,
6523,
4348,
17,
6523,
747,
6368,
19,
1381,
47,
31,
259,
20,
6523,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Missing data in hash table after deletion
===
Assume `hash(x) = hash(y) = hash(z) = i.`
Assume x was inserted first, then y, then z.
If I'm not wrong, in open addressing:
table[i] = x, table[i+1] = y, table[i+2] = z.
Now I want to delete x, and set it to NULL.
When I search for z, why do i get `hash(z)=i and table[i]=NULL?`
Am I doing something wrong, as z should be in the table.. | 0 | [
2,
2863,
1054,
19,
19170,
859,
75,
28916,
800,
3726,
3726,
7158,
13,
1,
25436,
5,
396,
6,
800,
19170,
5,
93,
6,
800,
19170,
5,
380,
6,
800,
31,
9,
1,
7158,
993,
23,
14215,
64,
15,
94,
13,
93,
15,
94,
2052,
9,
100,
31,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL - count inner join query
===
I have the following query that works like i want it to, except i want to return a pseudo (?) column of the count of the number of units each property has that are matched from the inner joins. Where p.team = u.team and u.deleted = '0000-00-00 00:00:00' and u.rates != '0'. Could i do this in the same query?
A property has several units. They are all attached to a "team"(think username).
SELECT DISTINCT p.title, p.state, p.city, p.regionID, p.team, p.type, p.lat, p.lng, p.url_title
FROM Properties AS p
INNER JOIN Units AS u ON p.team = u.team
INNER JOIN Rates AS r ON p.team = r.team
INNER JOIN Photos AS ph ON p.team = ph.team
AND p.public = '1'
AND u.rates != '0'
AND p.deleted = '0000-00-00 00:00:00'
AND u.deleted = '000-00-00 00:00:00'
AND r.deleted = '000-00-00 00:00:00'
AND ph.deleted = '000-00-00 00:00:00'
GROUP BY p.id
ORDER BY p.created ASC
| 0 | [
2,
51,
18,
22402,
13,
8,
2468,
3754,
1865,
25597,
800,
3726,
3726,
31,
57,
14,
249,
25597,
30,
693,
101,
31,
259,
32,
20,
15,
1613,
31,
259,
20,
788,
21,
8452,
13,
5,
60,
6,
4698,
16,
14,
2468,
16,
14,
234,
16,
1398,
206,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Postgres implicit type inferencing from select statements
===
I asked a [similar questions yesterday][1] about postgress, and if it could inference the type from the result shape of a select statement.
Today I want to return a resultset from a query, this is the query that I have found to work :
DROP TYPE IF EXISTS topic_result_entry CASCADE;
CREATE TYPE topic_result_entry AS
(
id INTEGER,
last_post_at TIMESTAMP WITHOUT TIME ZONE,
is_sticky BOOLEAN,
is_poll BOOLEAN,
has_prefix BOOLEAN,
prefix CHARACTER VARYING,
title CHARACTER VARYING,
post_count INTEGER,
started_by INTEGER,
started_at TIMESTAMP WITHOUT TIME ZONE
);
CREATE OR REPLACE FUNCTION get_paginated_topics(
forum_id_ INTEGER, category_id_ INTEGER, page_number_ INTEGER, topics_per_page_ INTEGER)
RETURNS SETOF topic_result_entry as $$
DECLARE
zero_based_index INTEGER;
lower_offset INTEGER;
upper_offset INTEGER;
BEGIN
zero_based_index := page_number_ -1;
lower_offset := zero_based_index * topics_per_page_;
upper_offset := ( (topics_per_page_ * page_number_) + 1 );
RETURN query
select id,last_post_at, is_sticky, is_poll,
has_prefix, prefix, title,post_count,
started_by, started_at
from (
select row_number() OVER(ORDER by last_post_at desc) as rn, *
from forum_topics where category_id = category_id_ and forum_id= forum_id_
) as foo
where rn > lower_offset and rn < upper_offset;
END;
$$ LANGUAGE plpgsql;
The shape of the resultset can be infered from the parameter list of the select + the schema definition of the source table.
Q1. Is there some syntactic sugar in 9.1, and if not is this on the roadmap ?
Q2 is there a less verbose way of doing this ?
[1]: http://stackoverflow.com/questions/11551627/postgres-implicitly-shaped-temporary-tables-syntactic-sugar-i-am-not-aware-of | 0 | [
2,
678,
6879,
18,
20290,
1001,
19,
2407,
219,
6302,
37,
5407,
9015,
800,
3726,
3726,
31,
411,
21,
636,
19107,
2346,
7124,
500,
2558,
165,
500,
88,
678,
13026,
15,
17,
100,
32,
110,
25883,
14,
1001,
37,
14,
829,
2539,
16,
21,
540... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
forcing overflow-x using percentage and float
===
I have a small structure of `<li>` inside a container and what i'm trying to make is to force the `overflow-x` appear instead of `overflow-y`, but i can't achieve this, i presume it is beacuse of properties `float` and the percentage that i'm using.
is there i way where i can reach this result ? show only the horizontal overflow ?
here is the code:
**html**
<div id="CockpitCenter">
<ul class="CockpitContainerResult">
<li><div class="box">Box 1</div></li>
<li><div class="box">Box 2</div></li>
<li><div class="box">Box 3</div></li>
<li style="height: 400px;">
<div class="box" style="height: 370px;">Box 4</div>
</li>
<li><div class="box">Box 5</div></li>
<li><div class="box">Box 6</div></li>
<li><div class="box">Box 7</div></li>
</ul>
</div>
and **css**
#CockpitCenter {
height: 500px; /* set only here in jsFiddle */
position: fixed;
left: 0;
border: solid 2px #ccc;
border-bottom: none;
overflow: auto;
}
div#CockpitCenter ul.CockpitContainerResult {
float: left;
width: 100%;
}
ul.CockpitContainerResult li {
margin: 5px 0;
height: 150px;
width: 50%;
float: left;
}
ul.CockpitContainerResult li:nth-child(even) {
float: right;
}
ul.CockpitContainerResult li div.box {
border: solid 1px #ccc;
margin: 15px;
border-radius: 20px;
height: 150px;
text-align: center;
}
here is a [**demo**][1]
[1]: http://jsfiddle.net/ybJ6C/7/ | 0 | [
2,
6135,
20285,
8,
396,
568,
5780,
17,
11510,
800,
3726,
3726,
31,
57,
21,
284,
1411,
16,
13,
1,
1210,
1,
572,
21,
12147,
17,
98,
31,
22,
79,
749,
20,
233,
25,
20,
558,
14,
13,
1,
2549,
9990,
8,
396,
1,
1893,
700,
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... |
Convert string to presentable XML format in SSIS
===
I have the following string that I want to convert to a presentable XML format. Presentable meaning, properly indented and carriage returned at appropriate spots. For some reason, I cant seem to get this to work.
<HTML><SSISLog><PackageProperty><PackageName>Package</PackageName><PackageID>{67D67690-D437-42DB-80A2-A7FB68353E70}</PackageID></PackageProperty></SSISLog></HTML>'
Can I use the xml task to do this job? Any inbuilt stored procedures for the same? | 0 | [
2,
8406,
3724,
20,
734,
579,
23504,
2595,
19,
13,
18,
4557,
800,
3726,
3726,
31,
57,
14,
249,
3724,
30,
31,
259,
20,
8406,
20,
21,
734,
579,
23504,
2595,
9,
734,
579,
1813,
15,
7428,
19,
817,
1427,
17,
7274,
587,
35,
4593,
711... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python lxml image download
===
I need to find an image in a HTML code similar to this one:
...
<a href="/example/11/1">
img id="img"
width="800"
height="1235"
src="http://example.net/example/example/example.jpg"
alt="Example 1 - Page 2"
name="img" /></a>
...
Here is the code
import lxml
from lxml import html
import requests
url = 'http://www.example.com'
r = requests.get(url)
tree = lxml.html.fromstring(r.content)
img = tree.get_element_by_id("img")
f = open("image.jpg",'wb')
f.write(requests.get(img['src']).content)
But i am getting an error:
Traceback (most recent call last):
File "/Users/Name/Documents/Python/Example/Script.py", line 13, in <module>
s = requests.get(img['src'])
File "/Library/Python/2.6/site-packages/lxml/lxml.etree.pyx", line 1052, in lxml.etree._Element.__getitem__ (src/lxml/lxml.etree.c:38272)
TypeError: 'str' object cannot be interpreted as an index
Suggests? | 0 | [
2,
20059,
13,
24560,
8184,
1961,
7121,
800,
3726,
3726,
31,
376,
20,
477,
40,
1961,
19,
21,
13,
15895,
1797,
835,
20,
48,
53,
45,
13,
9,
9,
9,
279,
255,
38,
73,
58,
746,
14057,
3726,
7,
118,
29041,
118,
1306,
11698,
7,
1569,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compiling shaders in PyQt
===
I can't get a basic shader program working in PyQt. I think this should at least compile the shader code correctly (I'm no expert here), but `addShaderFromSourceFile()` always returns false no matter what I try. The shader program log is always empty too.
Any help here would be awesome. I'm on Ubuntu 12.04, and I can compile and run GLSL shader programs in C++. So I don't think it's a system issue.
Apologies for the code dump - I've tried to cut out all the unnecessary details.
File *shader.vert*
void main(void)
{
gl_Position = ftransform();
}
File *shader.frag*
void main(void)
{
gl_FragColor = vec4(1.0,0.0,0.0,1.0);
}
File *test_shaders.py*:
from OpenGL.GL import *
from OpenGL.GLU import *
from PyQt4 import QtCore, QtGui
from PyQt4.QtOpenGL import *
class ExampleQGLWidget(QGLWidget):
def __init__(self, parent):
QGLWidget.__init__(self, parent)
self.shaderProgram = QGLShaderProgram()
print self.shaderProgram.addShaderFromSourceFile(QGLShader.Vertex, "shader.vert")
print self.shaderProgram.addShaderFromSourceFile(QGLShader.Fragment, "shader.frag")
print self.shaderProgram.log()
self.shaderProgram.link()
glViewport(0,0, 640, 480)
def paintGL(self):
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
self.shaderProgram.bind()
def resizeGL(self, w, h):
glViewport(0, 0, w, h)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
def initializeGL(self):
glClearColor(0.0, 0.0, 0.0, 1.0)
glClearDepth(1.0)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
class TestContainer(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
widget = ExampleQGLWidget(self)
self.setCentralWidget(widget)
if __name__ == '__main__':
app = QtGui.QApplication(['Shader Example'])
window = TestContainer()
window.show()
app.exec_() | 0 | [
2,
24378,
7546,
1224,
19,
7103,
1251,
38,
800,
3726,
3726,
31,
92,
22,
38,
164,
21,
2125,
7546,
139,
625,
638,
19,
7103,
1251,
38,
9,
31,
277,
48,
378,
35,
639,
26561,
14,
7546,
139,
1797,
12044,
13,
5,
49,
22,
79,
90,
5390,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fetching specific values from Ruby array and creating a comma-delimited string
===
I need a bit of help with some Ruby array jujitsu.
I have the following array called @tasks:
[#<PivotalTracker::Story:0x007f9d6b8 @id=314, @url="http://www.pivotaltracker.com/", @created_at=#<DateTime: 2012-06-18T20:23:42+00:00 ((2456097j,73422s,0n),+0s,2299161j)>, @accepted_at=nil, @project_id=357031, @name="Test ", @description="This is the description for \"Test\"", @story_type="feature", @estimate=-1, @current_state="unstarted", @requested_by="joe jones", @owned_by=nil, @labels=nil, @jira_id=nil, @jira_url=nil, @other_id=nil, @integration_id=nil, @deadline=nil, @attachments=[]>, #<PivotalTracker::Story:0x007f9d6b8 @id=315, @url="http://www.pivotaltracker.com/", @created_at=#<DateTime: 2012-06-18T20:25:20+00:00 ((2456097j,73520s,0n),+0s,2299161j)>, @accepted_at=nil, @project_id=357031, @name="Test 2", @description="This is the description for \"Test 2\"", @story_type="feature", @estimate=-1, @current_state="unstarted", @requested_by="joe jones", @owned_by=nil, @labels=nil, @jira_id=nil, @jira_url=nil, @other_id=nil, @integration_id=nil, @deadline=nil, @attachments=[]>, #<PivotalTracker::Story:0x007f9d6b8 @id=316, @url="http://www.pivotaltracker.com/story/", @created_at=#<DateTime: 2012-06-18T20:25:26+00:00 ((2456097j,73526s,0n),+0s,2299161j)>, @accepted_at=nil, @project_id=357031, @name="Test 3", @description="Description for Test 3 ", @story_type="feature", @estimate=-1, @current_state="unstarted", @requested_by="joe jones", @owned_by=nil, @labels=nil, @jira_id=nil, @jira_url=nil, @other_id=nil, @integration_id=nil, @deadline=nil, @attachments=[]>]
My end goal is to create a JavaScript array in my .erb view with just the ID values in the above array.
I was thinking of trying something like:
var myJSArray = [<%= @tasks.each { |t| print t.id.to_s+", " } %>];
However, that obviously appends a "," to the end of the string, which is not desirable (i.e. it returns "314, 315, 316,". It also seems like a bit of a hack and not the right way to do it.
Any ideas on how to do this properly?
Thank you!
| 0 | [
2,
18312,
68,
1903,
4070,
37,
10811,
7718,
17,
2936,
21,
11951,
58,
8,
546,
23012,
3724,
800,
3726,
3726,
31,
376,
21,
1142,
16,
448,
29,
109,
10811,
7718,
3191,
27381,
9,
31,
57,
14,
249,
7718,
227,
13,
1,
6922,
4020,
45,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
OpenGL transparency of black background
===
I'm working with sprite animation (OpenGL + C++).
I have some trouble working with blending.
I'm trying to load an image with a black background and draw it over another texture without a block of black appearing around the image. The image has Alpha channel and blending is enabled.
I tried playing with different blending functions. I either end up with a blocky image or a translucent image.
I know I can do it if I replace the black background with a transparent color instead using an image editing software, but I would like to get this working without that and without using an image mask.
An example to better understand my situation.
The image & Image over texture done incorrectly: [incorrect][1]
The way I want it to be: [correct][2]
I hope the example explains exactly what I'm trying to achieve. Any help to solve my problem is greatly appreciated.
Thank you.
[1]: http://img856.imageshack.us/img856/3804/wrong2.png
[2]: http://img861.imageshack.us/img861/5439/rightm.png | 0 | [
2,
368,
8430,
19668,
16,
319,
2395,
800,
3726,
3726,
31,
22,
79,
638,
29,
27902,
6236,
13,
5,
10157,
8430,
2754,
272,
20512,
6,
9,
31,
57,
109,
2572,
638,
29,
25359,
9,
31,
22,
79,
749,
20,
6305,
40,
1961,
29,
21,
319,
2395,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CommandLine parser for arrays of type enum
===
We are trying to find a command line parser that can parse array with enums.
CommandlineParser supports parsing arrays with int or string but not enum.
For e.g
[OptionArray("o", "output", HelpText = "The output files to generate.", DefaultValue = new[] { "OptimizeFor.Accuracy", "OptimizeFor.Speed" })]
public string[] OutputFiles { get; set; }
Works fine. But not the below one:
public enum OptimizeFor
{
Unspecified,
Speed,
Accuracy
}
[OptionArray("o", "output", HelpText = "The output files to generate.", DefaultValue = new[] { OptimizeFor.Accuracy, OptimizeFor.Speed })]
public OptimizeFor[] OutputFiles { get; set; }
| 0 | [
2,
1202,
1143,
2017,
4104,
26,
7718,
18,
16,
1001,
1957,
723,
800,
3726,
3726,
95,
50,
749,
20,
477,
21,
1202,
293,
2017,
4104,
30,
92,
2017,
870,
7718,
29,
1957,
723,
18,
9,
1202,
1143,
3574,
4104,
6747,
2017,
18,
68,
7718,
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... |
Select only nodes which contain a specific child node and format them into YAML
===
This has been doing my head for a whole day. Can you help me out?!
I have a simple xml file. using xslt i'd like to convert it into yaml file. problems are:
1. i need to organize the output in a way i should only catch **specyfic values** from xml tags and put them to specyfic yaml dictionaries *(work, address)*
2. some xml tags will have names() or attrs() i **can't predict** in advance - hence i cannot just grab them by names() or some other logic. I can make some assumptions but not for all tags...
3. While formatting the output I find it really hard to set dictionary key (*work, address*) for for yaml file after i've selected values i want - i can either set key for all children of ofert (which i don't require) or i can set key for each individual element which is not what i want.
consider this:
<data>
<info>some info</info>
<data>some data</data>
<list>
<ofert>
<id>00934</id>
<name>Bob</name>
<street>Euston rd.</street>
<postcode>SE23GH</postcode>
<job>IT</job>
<position>boss</position>
<unknow>....</unknow>
<unknow1>....</unknow1>
<unknow2>....</unknow2>
<unknow3>....</unknow3>
</ofert>
</list>
</data>
I would like output like:
<pre>
data:
info: ....
data: ....
list:
ofert:
id: 00934
name: Bob
address: {street: Euston rd, postcode: SE23GH }
work: {job: IT, position: boss }
other: {unknow: ....., unknow1: .... }
</pre> | 0 | [
2,
5407,
104,
16272,
56,
3717,
21,
1903,
850,
15421,
17,
2595,
105,
77,
2167,
8184,
800,
3726,
3726,
48,
63,
74,
845,
51,
157,
26,
21,
979,
208,
9,
92,
42,
448,
55,
70,
60,
187,
31,
57,
21,
1935,
23504,
3893,
9,
568,
993,
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... |
PHP: Find string with preg_match_all()
===
I have this given:
<tr class="tth3">
<td>aaa - bbbbb</td>
<td>6:10 </td>
<td >bla</td>
</tr>
<tr class="tth3">
<td>cccc - xxxx</td>
<td>6:10 </td>
<td>blabla</td>
</tr>
and I will serach this regex: `preg_match_all('/<tr class="tth3">.*?xxx.*?<\/[\s]*tr>/s', ...)`
And my result should be only the seound
> <tr>..</tr>
, but I dont know how to use this correct so can anyone help me?? | 0 | [
2,
13,
26120,
45,
477,
3724,
29,
782,
263,
1,
12280,
1,
1233,
5,
6,
800,
3726,
3726,
31,
57,
48,
504,
45,
13,
1,
6384,
718,
3726,
7,
38,
96,
240,
7,
1,
13,
1,
38,
43,
1,
22160,
13,
8,
334,
3490,
3490,
1,
118,
38,
43,
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 Silverlight DropShadowEffect causes blurring in Internet Explorer 9
===
I am applying the DropShadowEffect in Silverlight 5 on IE9. When the elements are rendered in IE9 they look blurred or out of focus. This is the Effect I am using
<DropShadowEffect Direction="274" Opacity="0.5"/>
In Firefox 13.0.1 and Chrome 20.0.1132 the control renders as expected with no blurring or softness. Is this a known problem?
Thanks | 0 | [
2,
568,
1172,
3130,
2804,
18396,
21295,
4047,
10330,
2090,
19,
2620,
8520,
561,
800,
3726,
3726,
31,
589,
11989,
14,
2804,
18396,
21295,
19,
1172,
3130,
331,
27,
13,
660,
518,
9,
76,
14,
2065,
50,
10877,
19,
13,
660,
518,
59,
361,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ExceptionInInitializerError while creating ant custom task
===
I'm creating a custom task in ant, while creating that, I'm facing ExceptionInInitializer exception.
I've placed jdom-2.0.2.jar in my ant lib directory so that the custom task gets compiled successfully.
Below is my custom task code
import java.io.*;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
public class Demo extends Task {
private String init;
@Override
public void execute() throws BuildException {
if(!init.isEmpty() && init!=null){
display();
}else{
throw new BuildException("Please enter attribute init");
}
}
public void setInit(String init){
this.init=init;
}
public void display(){
System.out.println("init value is "+init);
try {
SAXBuilder saxBuilder = new SAXBuilder();
} catch (Exception e) {
e.printStackTrace();
throw new BuildException("JDOMException caught");
}
}
}
This is my ant file
<project name="XMLUpdate" default="main" basedir=".">
<target name="main" depends="compile,jar,runtask">
</target>
<target name="compile">
<javac srcdir="." destdir="."/>
</target>
<target name="jar">
<jar destfile="./Demo.jar" basedir="." includes="*.class"/>
</target>
<target name="runtask">
<taskdef name="dem" classname="Demo"/>
<dem init="BOM.xml" />
</target>
</project>
I'm facing ExceptionInInitializer exception
![enter image description here][1]
[1]: http://i.stack.imgur.com/2RCjH.png
I presume that the error hit when compiler is parsing the line
SAXBuilder saxBuilder = new SAXBuilder();
Honestly, so far I've not encountered this exception in java. what's wrong here ? | 0 | [
2,
5391,
108,
27313,
11907,
29992,
133,
2936,
40,
38,
5816,
3005,
800,
3726,
3726,
31,
22,
79,
2936,
21,
5816,
3005,
19,
40,
38,
15,
133,
2936,
30,
15,
31,
22,
79,
4325,
5391,
108,
27313,
11907,
5391,
9,
31,
22,
195,
1037,
487,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
www.borgun.is -- payment gateway integration
===
I am looking for a Iceland based payment gateway '**www.borgun.is**' integration and can not find any help in php.
I cannot find any developers guide on their website..... | 1 | [
2,
13,
6483,
9,
6706,
1020,
9,
403,
13,
8,
8,
7582,
12171,
8078,
800,
3726,
3726,
31,
589,
699,
26,
21,
10659,
432,
7582,
12171,
13,
22,
1409,
6483,
9,
6706,
1020,
9,
403,
1409,
22,
8078,
17,
92,
52,
477,
186,
448,
19,
13,
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,
0... |
Changing the status of a new users in batches in cakephp 2.1
===
Hie CakePHP gurus, I need your help. I would want to active new applicants in batches. When a new applicants applies for a place at the university he/she is granted undecided status. I need help on how do i go about it, or any tutorial or link that will help me to tackle this task. | 0 | [
2,
4226,
14,
1782,
16,
21,
78,
3878,
19,
13064,
160,
19,
8390,
26120,
172,
9,
165,
800,
3726,
3726,
4148,
62,
8390,
26120,
10334,
18,
15,
31,
376,
154,
448,
9,
31,
83,
259,
20,
1348,
78,
19470,
19,
13064,
160,
9,
76,
21,
78,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XSL concate attributes in for each
===
Hi I have xml which looks like this:
<field index="1" name="my_field_1" type="String">
<value/>
</field>
<field index="2" name="my_field_2" type="String">
<value/>
</field>
<field index="3" name="my_field_3" type="String">
<value/>
</field>
Later in for each I itterate over those fields and I try to take name of field(which is same) and concate it with index(which depends on number of elements which may vary).
I tried this(I put apostrophe in variable because I was not sure how to escape it).
<xsl:variable name="currentIndex" select="@index"></xsl:variable>
<xsl:variable name="apostrof">'</xsl:variable>
<xsl:value-of select="concat(
'//field[@name=',
$apostrof,
'sar_account_entrepreneur_name_',
@index,
$apostrof,
']/value')"/>
Problem is that this instead of select value it outputs litteraly just the string my_field_1 for example. | 0 | [
2,
993,
18,
255,
1065,
9530,
13422,
19,
26,
206,
800,
3726,
3726,
4148,
31,
57,
23504,
56,
1879,
101,
48,
45,
13,
1,
1109,
4348,
3726,
7,
165,
7,
204,
3726,
7,
915,
1,
1109,
1,
165,
7,
1001,
3726,
7,
11130,
7,
1,
13,
1,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Android: Fetch data from database into ListFragment
===
Fetching data from database into LisFragment. I need to use this ListFragment file content into MainActivity.java.
**SecondActivity which extends ListFragment:**
String DB = "TestDB";
String TABLE_NAME = "addcamera";
SQLiteDatabase sampleDB = null;
ArrayList<String> results = new ArrayList<String>();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sampleDB = SQLiteDatabase.openOrCreateDatabase(DB, null);
Cursor c = sampleDB.rawQuery("SELECT CameraName FROM " + TABLE_NAME , null);
if (c != null) {
if (c.moveToFirst()) {
do {
String CameraName = c.getString(c.getColumnIndex("CameraName"));
results.add(CameraName);
}while (c.moveToNext());
}
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, results);
}
**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">
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.exercise.FragmentTest.SecondActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/image_list_fragment">
</fragment>
</LinearLayout>
Can anyone helpme? | 0 | [
2,
13005,
45,
18312,
1054,
37,
6018,
77,
968,
22133,
1130,
800,
3726,
3726,
18312,
68,
1054,
37,
6018,
77,
13,
3159,
22133,
1130,
9,
31,
376,
20,
275,
48,
968,
22133,
1130,
3893,
2331,
77,
407,
19348,
9,
1004,
1385,
9,
13,
1409,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tips abouts comparing to database tables. Table Diff
===
Please share your tips about comparing tables :
- showing lines that contain the same values for a given set of columns
- showing lines not contained in table A but contained in table B &
vice-versa | 0 | [
2,
11034,
88,
18,
15047,
20,
6018,
7484,
9,
859,
20811,
800,
3726,
3726,
2247,
1891,
154,
11034,
88,
15047,
7484,
13,
45,
13,
8,
3187,
1560,
30,
3717,
14,
205,
4070,
26,
21,
504,
309,
16,
7498,
13,
8,
3187,
1560,
52,
3437,
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,
0,
0,
0,
0,
0,
0... |
Coldfusion 7 - mail sending bad 'helo'
===
I've got my own box sitting in a rack, it's Win2000 running CF 7 - using the racks companies smpt server - I can't send emails... when I try to send emails they simply go to the undeliverable email folder... Support says my server is sending a non-verifiable 'helo' message, so their smtp server wont send it.
It being CF v7 - the admin has nowhere to specify U/P for auth... however I SHOULD be able to do that in the tag... and when I do - I get no errors - but the mail goes to the undeliverable...
CODE:
<cftry>
<cfmail to="jxxx@yahoo.com"
from="jxxx@xxx.com"
subject="xxx.com Sign-up"
server="smtp.xxx.net"
port="25"
username="valid-account@xxx.net"
password="password" >This is a test - with server specified</cfmail>
Success w/ server user defined
<cfcatch type="any">
<strong>ERROR: #cfcatch.Message#</strong><BR />
#cfcatch.Detail#
</cfcatch>
</cftry>
<cftry>
<cfmail to="jxxx@yahoo.com"
from="xxx@xxx.net"
subject="xxx.com Sign-up" >This is a test - without server specified</cfmail>
Success w/o server user defined
<cfcatch type="any">
<strong>ERROR: #cfcatch.Message#</strong><BR />
#cfcatch.Detail#
</cfcatch>
</cftry>
I don't know much about mail servers...
Any ideas? | 0 | [
2,
1191,
9818,
453,
13,
8,
4216,
4907,
896,
13,
22,
438,
1415,
22,
800,
3726,
3726,
31,
22,
195,
330,
51,
258,
1649,
1805,
19,
21,
10257,
15,
32,
22,
18,
628,
3050,
946,
10084,
453,
13,
8,
568,
14,
10257,
18,
1532,
7613,
4417,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Inversed FK with NOT NULL required
===
I am trying to model a database where I have 2 inverted foreign keys which both tables fields are required NOT NULL. How can I model that?
Here a small sample:
I have two tables called the first is a generic called "SystemObjects" and the second is called "Users". Each "SystemObject" is created by a "User" object and so require a 'CreatedBy' foreign key which cannot be null. In the same time, all users have also generic associated SystemObject entry and the table "Users" contains more info about those objects with specific type "User".
In OOP analogy, "User" inherits from "SystemObject" and has supplementary members. and so I need to keep track of that connection.
A summary to my problem:
- "A" has a foreign key field to "B"
- "B" has a foreign key field to "A"
- Both are required (NOT NULL)
How to escape this trap? Any alternative Model that would solve my problem and allow me to have this vis-verca tracking?
Thank you! | 0 | [
2,
19,
5498,
69,
15795,
29,
52,
16203,
1390,
800,
3726,
3726,
31,
589,
749,
20,
1061,
21,
6018,
113,
31,
57,
172,
22442,
1228,
5534,
56,
156,
7484,
2861,
50,
1390,
52,
16203,
9,
184,
92,
31,
1061,
30,
60,
235,
21,
284,
5717,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I access the observableArray in my click event?
===
I have a project where I cannot figure out how to access the observableArray from a click event as called from the container template. I have a stripped down example in a fiddle here:
http://jsfiddle.net/zBarW/26/
The click event is specified in a template which then dynamically loads a template for each item from a property on the item itself.
So an example item is:
{ID: 1, TemplateName: 'template1', Label: 'Name', Description: 'Your name'}
The "parent" template looks like this:
<script type="text/html" id="tpl-placeholder">
<div class="entry" data-bind="click: $parent.RemoveEntry, attr: { id: ID}, template: {name: TemplateName }"></div>
</script>
And a dynamically loaded template looks like this:
<script type="text/html" id="template1">
<h1 data-bind="text: Label"></h1>
<div data-bind="text: Description"></div>
</script>
In the method that handles the click event - in this case, RemoveEntry - I get null when trying to access the observableArray (Entries). What am I doing wrong here?
Thanks! | 0 | [
2,
184,
92,
31,
1381,
14,
5122,
10321,
579,
8576,
93,
19,
51,
10840,
807,
60,
800,
3726,
3726,
31,
57,
21,
669,
113,
31,
1967,
1465,
70,
184,
20,
1381,
14,
5122,
10321,
579,
8576,
93,
37,
21,
10840,
807,
28,
227,
37,
14,
12147... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determine a pointer type at compile time
===
I'm trying to extract the class type from a pointer passed into a macro. Here's what i have so far
template <class CLASS> class getter
{
public:
typedef CLASS type;
};
template <class CLASS> getter<CLASS> func(const CLASS* const)
{
return getter<CLASS>();
}
...
MyClass *p = new MyClass;
func(p)::type myClass;
Is this even possible? Am I barking up the wrong tree? | 0 | [
2,
3746,
21,
454,
106,
1001,
35,
26561,
85,
800,
3726,
3726,
31,
22,
79,
749,
20,
10962,
14,
718,
1001,
37,
21,
454,
106,
1100,
77,
21,
9069,
9,
235,
22,
18,
98,
31,
57,
86,
463,
22894,
13,
1,
1898,
718,
1,
718,
164,
815,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Control.Monad.Writer not working in haskell
===
I have a Haskell question/problem.
I have been trying to compile haskell code all day - again - involving the Control.Monad.Writer. Here is a code that wont compile from Learn you a Haskell:
<code>
import Control.Monad.Writer
gcd' :: Int -> Int -> Writer [String] Int
gcd' a b
| b == 0 = do
tell ["Finished with " ++ show a]
return a
| otherwise = do
tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)]
gcd' b (a `mod` b)
</code>
I receive this error:
<code>
No instance for (Show (Writer [String] Int))
arising from a use of `print'
Possible fix:
add an instance declaration for (Show (Writer [String] Int))
In a stmt of an interactive GHCi command: print it
</code>
I have tried compiling code my teacher wrote today also involving Monad.Write but nothing works.
I am using Ubuntu 12.04, gedit and the ghc compiler 7.4.1.
All the Monad writer programs from learn you a haskell have failed compiling, and I am pretty stuck as it is.
Thanks for taking a look at my problem.
With regards,
Arnthor | 0 | [
2,
569,
9,
13951,
43,
9,
9657,
52,
638,
19,
63,
16507,
800,
3726,
3726,
31,
57,
21,
63,
16507,
1301,
118,
2740,
2854,
79,
9,
31,
57,
74,
749,
20,
26561,
63,
16507,
1797,
65,
208,
13,
8,
188,
13,
8,
4838,
14,
569,
9,
13951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I globally disable the sounds within an Android application?
===
I currently have a checkbox to correctly determine if the sound on/off toggle is pressed, and I save the preferences so that I can globally access the mPrefs later in all my activities.
I've been searching for how to disable global sounds within my application but couldn't come to a conclusion.
Is there any example or tutorial that goes through this process?
Thanks. | 0 | [
2,
184,
107,
31,
18861,
1460,
579,
14,
2795,
363,
40,
13005,
3010,
60,
800,
3726,
3726,
31,
871,
57,
21,
2631,
5309,
20,
12044,
3746,
100,
14,
646,
27,
118,
1299,
20,
263,
4875,
25,
2931,
15,
17,
31,
2079,
14,
9808,
18,
86,
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... |
IE not allowing .ajax Jquery - Permission Denied
===
I have an ajax call that works fine in firefox, but I am getting a permission denied error in the jquery.min.js file. I have no idea what is wrong, or how to fix it. Here is my post:
(everything declared before posting)
$.ajax(
{
type: "POST",
url: "../ajaxURLs/SearchRequests.aspx?requestID=" + requestID + "&state=" + state + "&status=" + status + "&queue=" + queue + "&oem=" + oem +
"&rayMatNumber=" + rayMatNumber + "&mfgPartNumber=" + mfgPartNumber + "&program=" + program + "&po=" + po + "&pr=" + pr +
"&businessUnit=" + businessUnit + "&site=" + site + "&buyer=" + buyer + "&requisitioner=" + requisitioner + "&ce=" + ce + "&rea=" + rea + "&pqe=" + pqe +
"&startDate=" + startDate + "&endDate=" + endDate,
cache: false,
success: function (data) {
$("#searchResults").html(data);
sorttable.makeSortable(document.getElementById("SearchResults"));
$("#MainContent_excelDiv").show();
}
});
Any ideas? If I take map directly to my SearchRequests.aspx and pass it parameters, then it works fine in both firefox and IE, it's only when it is done through ajax. | 0 | [
2,
13,
660,
52,
2719,
13,
9,
6881,
7522,
487,
8190,
93,
13,
8,
5572,
5265,
800,
3726,
3726,
31,
57,
40,
20624,
645,
30,
693,
1123,
19,
535,
18219,
15,
47,
31,
589,
1017,
21,
5572,
5265,
7019,
19,
14,
487,
8190,
93,
9,
2160,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Redis VS SQLITE: performance test
===
Hello everybody! I have done simple performance test on my local machine, this is python script:
import redis
import sqlite3
import time
data = {}
N = 100000
for i in xrange(N):
key = "key-"+str(i)
value = "value-"+str(i)
data[key] = value
r = redis.Redis("localhost", db=1)
s = sqlite3.connect("testDB")
cs = s.cursor()
try:
cs.execute("CREATE TABLE testTable(key VARCHAR(256), value TEXT)")
except Exception as excp:
print str(excp)
cs.execute("DROP TABLE testTable")
cs.execute("CREATE TABLE testTable(key VARCHAR(256), value TEXT)")
print "[---Testing SQLITE---]"
sts = time.time()
for key in data:
cs.execute("INSERT INTO testTable VALUES(?,?)", (key, data[key]))
#s.commit()
s.commit()
ste = time.time()
print "[Total time of sql: %s]"%str(ste-sts)
print "[---Testing REDIS---]"
rts = time.time()
r.flushdb()# for empty db
for key in data:
r.set(key, data[key])
rte = time.time()
print "[Total time of redis: %s]"%str(rte-rts)
I expected redis to perform faster, but the result shows that it much more slower:
[---Testing SQLITE---]
[Total time of sql: 0.615846157074]
[---Testing REDIS---]
[Total time of redis: 10.9668009281]
So, the redis is memory based, what about sqlite? Why redis is so slow? When I need to use redis and when I need to use sqlite?
| 0 | [
2,
402,
403,
4611,
4444,
10601,
45,
956,
1289,
800,
3726,
3726,
10975,
8903,
187,
31,
57,
677,
1935,
956,
1289,
27,
51,
375,
1940,
15,
48,
25,
20059,
3884,
45,
9010,
402,
403,
9010,
4444,
10601,
240,
9010,
85,
1054,
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... |
Using .gitignore to ignore files inside of git status
===
I have a problem using git, when I run git status, I have all these unrelated files that I do not want watched.
Running git status -s I have:
M .gitignore<br>
M as3-remote/.project<br>
M perspective/swc/.project<br>
M perspective/swf/.project<br>
M scheduled-translator-framework/src/main/java/Importer.java<br>
D scheduled-translator-framework/src/main/java/TranslatorTest.java<br>
M ui-mecogis/swf/.project<br>
I have already tried editing my .gitignore so that includes .projects<br>
My .gitignore looks like:<br>
.classpath<br>
.project<br>
.settings<br>
*.log<br>
nbactions.xml<br>
target<br>
.DS_Store<br>
<br>
I only want to track and watch changes inside the scheduled-translator-framework, and I only want to focus on .java files in that specific folder. I don't want anything else to show up under tracked or untracked that is unrelated. How would I do this?
Thank you in advance,
Ejay | 0 | [
2,
568,
13,
9,
10404,
23565,
99,
20,
7174,
6488,
572,
16,
13,
10404,
1782,
800,
3726,
3726,
31,
57,
21,
1448,
568,
13,
10404,
15,
76,
31,
485,
13,
10404,
1782,
15,
31,
57,
65,
158,
17379,
6488,
30,
31,
107,
52,
259,
1634,
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... |
Database created from SQLite Browser not working in device "Android"
===
My proble is I created a device in sqlite database browser and its work fine in emulator.
but when a try my application to my device it cause force close.
and when I remove the database and create a new one using eclipse it works fine even in my device. But inserting a lot of data in database 1 by 1 realy freakin me out so anyone know a sqlite database browser that also work for device??!
| 0 | [
2,
6018,
679,
37,
4444,
10601,
16495,
52,
638,
19,
3646,
13,
7,
290,
18524,
7,
800,
3726,
3726,
51,
895,
2854,
25,
31,
679,
21,
3646,
19,
4444,
10601,
6018,
16495,
17,
82,
170,
1123,
19,
3579,
14868,
9,
47,
76,
21,
1131,
51,
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... |
"Computed Properties" in Angular.js
===
I recently chose angular over ember.js for a project I am working on, and have been very pleased with it so far. One nice thing about ember is its built in support for "computed properties" with automatic data binding. I have been able to accomplish something similar in Angular with the code below, but am not sure if it is the best way to do so.
// Controller
angular.module('mathSkills.controller', [])
.controller('nav', ['navigation', '$scope', function (navigation, $scope) {
// "Computed Property"
$scope.$watch(navigation.getCurrentPageNumber, function(newVal, oldVal, scope) {
scope.currentPageNumber = newVal;
});
$scope.totalPages = navigation.getTotalPages();
}]);
// 'navigation' service
angular.module('mathSkills.services', [])
.factory('navigation', function() {
var currentPage = 0,
pages = [];
return {
getCurrentPageNumber: function() {
return currentPage + 1;
},
getTotalPages: function() {
return pages.length;
}
};
});
// HTML template
<div id=problemPager ng-controller=nav>
Problem {{currentPageNumber}} of {{totalPages}}
</div>
I would like for the UI to update whenever the `currentPage` of the `navigation` service changes, which the above code accomplishes.
Is this the best way to solve this problem in Angular? Are there (significant) performance implications for using `$watch()` like this? Would something like this be better accomplished using custom events and `$emit()` or `$broadcast()`? | 0 | [
2,
13,
7,
960,
4881,
69,
3704,
7,
19,
18270,
9,
728,
18,
800,
3726,
3726,
31,
1989,
3305,
18270,
84,
13,
19603,
9,
728,
18,
26,
21,
669,
31,
589,
638,
27,
15,
17,
57,
74,
253,
7130,
29,
32,
86,
463,
9,
53,
2210,
584,
88,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change ActionBar Tabs background color
===
Is there a way to change the background color of the tab bar in the ActionBar without changing it in the one line version?
To clarify what I want: In portrait mode the ActionBar is split in two lines, the ActionBar itself and the tabs below. In landscape mode the tabs are in the actual ActionBar.
I want to change the background color of the portrait mode. If I change the background in the TabView it'll be changed for both modes. Do I have to create separate styles for those? Which brings up a second question: is there a way to know when it'll be two lines and when not?
Or am I just missing something?
I'm using ActionBarSherlock btw | 0 | [
2,
753,
1028,
1850,
6523,
18,
2395,
1665,
800,
3726,
3726,
25,
80,
21,
161,
20,
753,
14,
2395,
1665,
16,
14,
6523,
748,
19,
14,
1028,
1850,
366,
4226,
32,
19,
14,
53,
293,
615,
60,
20,
23116,
98,
31,
259,
45,
19,
5548,
3740,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MooTools Page Peel back image sticking out on effect
===
I have a Mootools Page Peel function that works well, except that when you hover over the 'small' image(small peel), and the bigger one expands, the back image can be seen behind the front image suppose to cover it. Please see my example: [http://jsfiddle.net/uc6PJ/1/][1]
I made the animation slow so that you can see what I mean - Look at the bottom part of the effect, you will see it does not look right.
Thank You!
[1]: http://jsfiddle.net/uc6PJ/1/ | 0 | [
2,
13,
8765,
20799,
18,
2478,
12093,
97,
1961,
15490,
70,
27,
1590,
800,
3726,
3726,
31,
57,
21,
13,
8765,
20799,
18,
2478,
12093,
1990,
30,
693,
134,
15,
1613,
30,
76,
42,
21350,
84,
14,
13,
22,
15988,
22,
1961,
5,
15988,
12093... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS not extending?
===
I am working on a project I created myself (www.deepsecurity.org) which people will be able to paste stuff and much more in the future.
I have a problem with this project though, if you check the site and check the "Th Bible" paste someone posted, you can clearly see that the post goes out of the black screen and you cannot read the rest anymore.
How can I fix this? Been trying for hours.
I am using Flask + SQLAlchemy + WTForms and Pygments.
Take a look at the css (I write very back css, sorry about that)
style.css
@import url('topbar_style.css');
@import url('errors.css');
@import url('showcodes.css');
@import url('addcode.css');
@import url('highlight.css');
@import url('about.css');
@import url('login.css');
html {
font-family: 'Lucida Console', Monaco, monospace;
font-size: 13px;
color: #FFFFFF;
background: #F2F2F2 url('images/bg_body.png') repeat-x 0 0;
display: inline-block
}
.page {
overflow: hidden;
margin: 3em auto;
width: 950px;
display: inline-block
border: 5px solid #ccc;
padding: 0.8em;
border: 1px solid #383838;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background: #202020;
}
div.codes h1 {
font-family: 'Lucida Console', Monaco, monospace;
margin: 0px;
color: #F2F2F2;
border-bottom: 2px solid #eee;
}
h2 {
font-size: 15px;
}
div.about-text {
white-space: pre;
}
div.codes {
white-space: pre;
}
showcodes.css
.codes {
display: inline;
list-style: none;
margin: 0;
padding: 0;
}
.codes li {
margin: 0.2em 1em;
} | 0 | [
2,
272,
18,
18,
52,
8176,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
669,
31,
679,
992,
13,
5,
6483,
9,
11759,
17749,
9,
5583,
6,
56,
148,
129,
44,
777,
20,
640,
62,
3217,
17,
212,
91,
19,
14,
1022,
9,
31,
57,
21,
1448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
OpenSSL Keystore Generation for Trinidad
===
I am trying to use openSSL to set up an https connection for my application. I'm running a Neo4j 1.2.2 database, with a Trinidad 1.3.5 web server, using the Rails 3.1 and ruby 1.9.
I have a Thawte trial certificate, ca_cert.crt, their intermediate and root certificates, ca_intermediate.crt and ca_root.crt respectively, and my own private key, ca_private.pem. What openssl command do I need to run to create a keystore, which I can specify in my app's trinidad.yaml config file?
So far the "looks-closest-to-right" thing I've tried is:
pkcs12 –export –in ca_cert.crt inkey ca_private.pem –out keystore.p12 –name tomcat
and it gives me the error:
unable to load certificates
6380:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\as
n1\tasn_dec.c:1319:
6380:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\
crypto\asn1\tasn_dec.c:381:Type=X509_CINF
6380:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 e
rror:.\crypto\asn1\tasn_dec.c:751:Field=cert_info, Type=X509
6380:error:0907400D:PEM routines:PEM_X509_INFO_read_bio:ASN1 lib:.\crypto\pem\pe
m_info.c:258:
error in pkcs12
It looks to me like openssl doesn't like the format I have the files in, though I have tried nearly every combination of the .pem, .crt, .cer, and .key extensions I can think of to no avail. I'm new to SSL entirely, so I hope I'm just doing something stupid and its an easy fix...
Here is the example I've been trying to follow: https://github.com/trinidad/trinidad/wiki/ssl-end-to-end-example | 0 | [
2,
8965,
18,
255,
1246,
16828,
2782,
26,
12517,
800,
3726,
3726,
31,
589,
749,
20,
275,
8965,
18,
255,
20,
309,
71,
40,
7775,
18,
2760,
26,
51,
3010,
9,
31,
22,
79,
946,
21,
4368,
300,
728,
137,
9,
135,
9,
135,
6018,
15,
29,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Remove empty nodes from XML using XSLT
===
I am having trouble removing empty nodes from my XML using XSLT. For example, this area in the XSLT:
<RCPNT_NM>
<snm>
<xsl:value-of select="SNM"/>
</snm>
<gv_nm>
<xsl:value-of select="GVN_NM"/>
</gv_nm>
<init>
<xsl:value-of select="INIT"/>
</init>
</RCPNT_NM>
The data inside some of those nodes is completely empty, but I am still getting them back. I tried applying the `match="node()|@*"` template area to the xslt, but that didn;t work either. Here is the entire XSLT file:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml" version="1.0"/>
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<Return>
<xsl:apply-templates select="//IPERSON/item"/>
</Return>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[not(@*) and not(*) and (not(text()) )]"/>
<xsl:template match="IPERSON/item">
<T5018Slip>
<RCPNT_NM>
<snm>
<xsl:value-of select="SNM"/>
</snm>
<gv_nm>
<xsl:value-of select="GVN_NM"/>
</gv_nm>
<init>
<xsl:value-of select="INIT"/>
</init>
</RCPNT_NM>
<sin>
<xsl:value-of select="SIN"/>
</sin>
<rcpnt_bn>
<xsl:value-of select="RCPNT_BN"/>
</rcpnt_bn>
<CORP_PTNRP_NM>
<l1_nm>
<xsl:value-of select="CORPL1_NM"/>
</l1_nm>
<l2_nm>
<xsl:value-of select="CORPL2_NM"/>
</l2_nm>
</CORP_PTNRP_NM>
<rcpnt_tcd>
<xsl:value-of select="RCPNT_TCD"/>
</rcpnt_tcd>
<RCPNT_ADDR>
<addr_l1_txt>
<xsl:value-of select="ADDR_L1_TXT"/>
</addr_l1_txt>
<addr_l2_txt>
<xsl:value-of select="ADDR_L2_TXT"/>
</addr_l2_txt>
<cty_nm>
<xsl:value-of select="CTY_NM"/>
</cty_nm>
<prov_cd>
<xsl:value-of select="PROV_CD"/>
</prov_cd>
<cntry_cd>
<xsl:value-of select="CNTRY_CD"/>
</cntry_cd>
<pstl_cd>
<xsl:value-of select="PSTL_CD"/>
</pstl_cd>
</RCPNT_ADDR>
<bn>
<xsl:value-of select="BN"/>
</bn>
<sbctrcr_amt>
<xsl:value-of select="SBCTRCR_AMT"/>
</sbctrcr_amt>
<rpt_tcd>
<xsl:value-of select="RPT_TCD"/>
</rpt_tcd>
</T5018Slip>
<xsl:for-each select="Return/T5018Summary/slp_cnt">
<xsl:value-of select="SLP_CNT='1'"/>
<xsl:if test="slp_cnt='1'">
<T5018Summary>
<bn>
<xsl:value-of select="BN1"/>
</bn>
<PAYR_NM>
<l1_nm>
<xsl:value-of select="L1_NM"/>
</l1_nm>
<l2_nm>
<xsl:value-of select="L2_NM"/>
</l2_nm>
<l3_nm>
<xsl:value-of select="L3_NM"/>
</l3_nm>
</PAYR_NM>
<PAYR_ADDR>
<addr_l1_txt>
<xsl:value-of select="PAYRADDR_L1_TXT"/>
</addr_l1_txt>
<addr_l2_txt>
<xsl:value-of select="PAYRADDR_L2_TXT"/>
</addr_l2_txt>
<cty_nm>
<xsl:value-of select="PAYRCTY_NM"/>
</cty_nm>
<prov_cd>
<xsl:value-of select="PAYRPROV_CD"/>
</prov_cd>
<cntry_cd>
<xsl:value-of select="PAYRCNTRY_CD"/>
</cntry_cd>
<pstl_cd>
<xsl:value-of select="PAYRPSTL_CD"/>
</pstl_cd>
</PAYR_ADDR>
<CNTC>
<cntc_nm>
<xsl:value-of select="CNTC_NM"/>
</cntc_nm>
<cntc_area_cd>
<xsl:value-of select="CNTC_AREA_CD"/>
</cntc_area_cd>
<cntc_phn_nbr>
<xsl:value-of select="CNTC_PHN_NBR"/>
</cntc_phn_nbr>
<cntc_extn_nbr>
<xsl:value-of select="CNTC_EXTN_NBR"/>
</cntc_extn_nbr>
</CNTC>
<PRD_END_DT>
<dy>
<xsl:value-of select="DY"/>
</dy>
<mo>
<xsl:value-of select="MO"/>
</mo>
<yr>
<xsl:value-of select="YR"/>
</yr>
</PRD_END_DT>
<slp_cnt>
<xsl:value-of select="SLP_CNT"/>
</slp_cnt>
<tot_sbctrcr_amt>
<xsl:value-of select="TOT_SBCTRCR_AMT"/>
</tot_sbctrcr_amt>
<rpt_tcd>
<xsl:value-of select="RPT_TCD"/>
</rpt_tcd>
</T5018Summary>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet> | 0 | [
2,
4681,
2424,
16272,
37,
23504,
568,
993,
18,
255,
38,
800,
3726,
3726,
31,
589,
452,
2572,
9096,
2424,
16272,
37,
51,
23504,
568,
993,
18,
255,
38,
9,
26,
823,
15,
48,
217,
19,
14,
993,
18,
255,
38,
45,
13,
1,
5453,
17479,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VS2012RC: how do I add a changeset to an existing code review?
===
I created a code review, then received feedback (bugs were found), now I want to upload a changeset with bugs fixed to the same code review. How do I do that in VS2012RC with TFS? | 0 | [
2,
4611,
3212,
5453,
45,
184,
107,
31,
3547,
21,
1693,
1198,
20,
40,
3149,
1797,
1487,
60,
800,
3726,
3726,
31,
679,
21,
1797,
1487,
15,
94,
420,
13111,
13,
5,
16254,
18,
46,
216,
6,
15,
130,
31,
259,
20,
71,
8294,
21,
1693,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CUDA vs. Multithread for a non-linear optimization of a complex function
===
I am trying to *optimize a function* (say find the minimum) with n parameters (Xn). All Xi are bound in a certain range (for example -200 to 200) and if any parameter leaves this range, the function goes to infinity very fast. However, n can be large (from 20 to about 60-70) and computing it's value takes long time.
I don't think the details *about the function* are of big relevance, but here are some: it consists of a weighted sum of 20-30 smaller functions (all different), which on their part consist of sums of dot products under the sign of an inverse sinusoidal function (arcsin, arccos, arctan, etc). Something like arcsin(X1 . X2) + arcsin(X4 . X7) + ...
The function has many local minima in general, so approaches such as (naive) conjugated gradients or newton are useless. Searching the entire domain brute force is too slow.
My initial idea was to use some sort of massive parallelization in combination with a genetic algorithm, which performs many searches on different spots in the domain of the function, and at regular intervals checks whether some of the searches reached a local minima. If yes, it compares them and discards all results but the smallest one, and continues the search until a reasonably small value is found.
My two questions are:
1) Is it possible to implement this problem in CUDA or a similar technology? Can CUDA compute the value of a function like this fast enough?
2) Would be better/faster to implement the problem on a multicore PC (with 12+ cores)? | 0 | [
2,
272,
5729,
4611,
9,
1889,
96,
10647,
26,
21,
538,
8,
19333,
21597,
16,
21,
1502,
1990,
800,
3726,
3726,
31,
589,
749,
20,
1637,
25458,
79,
2952,
21,
1990,
2483,
13,
5,
6366,
477,
14,
5187,
6,
29,
13,
103,
12905,
13,
5,
396,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Managing 3rd party sources and binaries used by code under source control
===
I have a large code base under source control (was subversion, now git). To compile the code and run the tests I use a set of 3rd party libraries. These libraries can be divided into few categoriesL
- Binaries only
- 3rd party sources
- 3rd party sources + local modifications
Each library has its {Windows, Linux} X {debug, release} X {32bit, 64bit} configurations. In addition these libraries evolve with time and different versions of my project use different versions/builds of these libraries.
**My question is what is the best way to store these 3rd parties?**
Here is my set of preferences:
1. Keep the size of the project source repository small
2. Keep the project source in sync with the 3rd parties so I can always compile and run and old version
3. Simple to manage
4. Cross platform
I tried and thought of several solutions but neither was satisfactory:
1. Use a versioned script to fetch the binaries from a manually managed ftp server that holds all versions of the libraries. This works, but requires careful management of the directory structure on the server. It is error prone as someone might overwrite one of the binaries with a new build.
2. SVN externals - At the time SVN externals could not refer to a specific tag. Today I am using git.
3. Git submodules - Pulls the entire external repository which can be huge. Alternatively it requires managing a separate repository for every single library. The submodule points at a specific tag which means either I get all the externals, when I need only some, or I mimic some weird file system in the git tree.
It is clear to me that the 3rd party sources need to be stored in git in a vendor branch, but the binaries and headers are a different story.
| 0 | [
2,
5616,
203,
897,
346,
2662,
17,
4511,
11301,
147,
34,
1797,
131,
1267,
569,
800,
3726,
3726,
31,
57,
21,
370,
1797,
1000,
131,
1267,
569,
13,
5,
4149,
972,
10898,
15,
130,
13,
10404,
6,
9,
20,
26561,
14,
1797,
17,
485,
14,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to speed up Jsoup.parse()?
===
I am using the all String version of Jsoup.parse():
parse(String html, String baseUri)
Ruling out connectivity speed for benchmarking its performance.
On a typical low-end Android phone, calling `Jsoup.parse()` on the html String of a not-so-rare long Wikipedia page (~600KB), takes **9 seconds**!
My client is not willing to accept this delay and I am thinking of either dumping Jsoup for a different engine, parsing web pages myself (still in Java), or using some C/C++ parser in NDK (if available).
But I prefer continuing to use Jsoup as much as possible.
Is there a way to speed up `Jsoup.parse()`?
| 0 | [
2,
25,
80,
21,
161,
20,
1362,
71,
487,
656,
576,
9,
3574,
870,
5,
6,
60,
800,
3726,
3726,
31,
589,
568,
14,
65,
3724,
615,
16,
487,
656,
576,
9,
3574,
870,
5,
6,
45,
2017,
870,
5,
11130,
13,
15895,
15,
3724,
1000,
3594,
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 create an unordered list with children list from a simple list
===
I have this list:
<ul>
<li class="level0">First item</li>
<li class="level1">Second item (children of level0)</li>
<li class="level2">Third</li>
<li class="level3">Forth</li>
<li class="level2">Third</li>
<li class="level3">Forth</li>
<li class="level4">Fifth</li>
<li class="level4">Fifth</li>
<li class="level2">Second</li>
<li class="level3">Third</li>
<li class="level2">Second</li>
</ul>
and I want to do this with this list in javascript or jQuery
<ul>
<li class="level0">First item</li>
<ul>
<li class="level1">Second item (children of level0)</li>
<ul>
<li class="level2">Third</li>
<ul>
<li class="level3">Forth</li>
</ul>
<li class="level2">Third</li>
<ul>
<li class="level3">Forth</li>
<ul>
<li class="level4">Fifth</li>
<li class="level4">Fifth</li>
</ul>
</ul>
</ul>
<ul>
<li class="level2">Second</li>
<ul>
<li class="level3">Third</li>
</ul>
<li class="level2">Second</li>
</ul>
</ul>
</ul>
If I can do this it will greatly help displaying it with something like an accordion in jQuery.
Thx! | 0 | [
2,
184,
20,
1600,
40,
367,
7861,
69,
968,
29,
391,
968,
37,
21,
1935,
968,
800,
3726,
3726,
31,
57,
48,
968,
45,
13,
1,
1287,
1,
13,
1,
1210,
718,
3726,
7,
3906,
387,
7,
1,
3552,
9101,
1,
118,
1210,
1,
13,
1,
1210,
718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JSON Android ListView
===
I build this webservice on netbeans,
package in.figures.on.mobile;
import db.koneksi.dbKoneksi;
import java.sql.Statement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import org.json.simple.JSONValue;
/**
*
* @author Setyadi
*/
@WebService()
public class AksesData {
/**
* Web service operation
*/
@WebMethod(operationName = "Kategori")
public String Kategori() {
//TODO write your implementation code here:
dbKoneksi con = new dbKoneksi();
Statement statement;
Properties properties;
List list = new ArrayList();
String sql = "SELECT idPrimary_key, kategori FROM kategori ";
ResultSet hasil;
String kategori = null;
try{
statement = con.getConnection().createStatement();
hasil = statement.executeQuery(sql);
while (hasil.next()) {
properties = new Properties();
properties.put("idPrimary_key", hasil.getString(1));
properties.put("kategori", hasil.getString(2));
list.add(properties);
}
kategori = JSONValue.toJSONString(list);
}
catch(Exception e){
}
return kategori;
}
}
And return a JSON like this
[{"idPrimary_key","21ye21","kategori","FirstCategory"},
{"idPrimary_key","89oy89","kategori","SecondCategory"},
{"idPrimary_key","34ew34","kategori","ThirdCategory"}]
And I try to consume in Android ListView like this, but still got errors,
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE transportSE = new HttpTransportSE(URL);
try {
transportSE.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
result = response.toString();
} catch (Exception e) {
e.printStackTrace();
}
String jsonAN = "{\"kat\":"+result+"}"; //try to build to be like this {"kat":[{blablablaJSON}]}
String kategoriJSONList[][] = new String[99][2];
String katList[] = new String[99]; //tobe shown on listview, derived from two dimensional array above.
try {
jsonObject = new JSONObject(jsonAN);
jsonArray = jsonObject.getJSONArray("kat");
for(int i=0; i < jsonArray.length() ; i++){
kategoriJSONList[i][0] = jsonArray.getJSONObject(i).getString("idPrimary_key").toString();
kategoriJSONList[i][1] = jsonArray.getJSONObject(i).getString("kategori").toString();
}
for(int i=0; i < jsonArray.length(); i++){
katList[i] = kategoriJSONList[i][1];
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ListView list = (ListView) findViewById(R.id.listKategori);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(
WebServiceActivity.this, android.R.layout.simple_list_item_1,katList
);
list.setAdapter(adapter);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long arg3) {
final String kategori = (String) ((TextView)arg1).getText();
Toast.makeText(WebServiceActivity.this, kategori,
Toast.LENGTH_LONG).show();
}
});
Need help how to consume the JSONValue that return as shown above to be shown as ListView.
I got stress in this days.
Thanks in advance. | 0 | [
2,
487,
528,
13005,
968,
4725,
800,
3726,
3726,
31,
1895,
48,
2741,
11449,
27,
4275,
863,
5950,
15,
6030,
19,
9,
15951,
18,
9,
218,
9,
12571,
73,
9010,
13,
9007,
9,
7338,
2354,
18,
49,
9,
9007,
7338,
2354,
18,
49,
73,
9010,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 "getAppletContext().showDocument( new URL" together with "p.waitFor();"
===
I'm trying to use this: `getAppletContext().showDocument( new URL ("http://domain/file.html"));`
together with this: `p.waitFor();` so it would open the webpage with a delay.
I found the following code:
/**
* wrapper for Runtime.exec.
* No input/output. Optionally wait for child to finish.
* @param command fully qualified *.exe or *.com command
* @param wait true if you want to wait for the child to finish.
*/
public static Process exec ( String command, boolean wait )
{
Process p;
try
{
p = Runtime.getRuntime().exec( command );
}
catch ( IOException e )
{
return null;
}
if ( wait )
{
try
{
p.waitFor();
}
catch ( InterruptedException e )
{
Thread.currentThread().interrupt();
}
}
// You must close these even if you never use them!
p.getInputStream().close();
p.getOutputStream().close();
p.getErrorStream().close();
return p;
} // end exec
But when I try to switch this: `p = Runtime.getRuntime().exec( command );` with this: `getAppletContext().showDocument( new URL ("http://domain/file.html"));`
I get the error error: non-static method getAppletContext() cannot be referenced from a static context. I know I have to change the `public static Process exec` part and the `Process p`; part, but I have no idea what with so it won't throw me new errors.
| 0 | [
2,
568,
13,
7,
3060,
24212,
38,
1126,
11969,
5,
6,
9,
9303,
28132,
5,
78,
287,
6362,
7,
429,
29,
13,
7,
306,
9,
8195,
1106,
5,
6,
73,
7,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
48,
45,
13,
1,
3060,
24212,
38,
1126,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Send component value and another parameter to a listener
===
I have a panel grid with various checkboxes. A checkbox is associated with a certain mask. When the checkbox is pressed, the value of the checkbox(checked/unckecked) and a mask parameter specific to that checkbox should be passed to a listener.
<p:selectBooleanCheckbox value="#{options.mustChangePasswordMask}">
<p:ajax listener="#{options.selectionChanged}" />
</p:selectBooleanCheckbox>
<p:selectBooleanCheckbox value="#{options.mustChangePasswordMask}">
<p:ajax listener="#{options.selectionChanged('MASK_1')}" />
</p:selectBooleanCheckbox>
Both these code fragments do only half of the job that I want. Is it possible to send the checkbox value as a parameter to the listener or in another way accessible to the listener? | 0 | [
2,
2660,
5912,
1923,
17,
226,
18906,
20,
21,
21772,
800,
3726,
3726,
31,
57,
21,
4113,
7354,
29,
617,
2631,
5309,
160,
9,
21,
2631,
5309,
25,
1598,
29,
21,
1200,
5983,
9,
76,
14,
2631,
5309,
25,
2931,
15,
14,
1923,
16,
14,
263... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
'System.Web.WebPages.DisplayModeProvider' from assembly 'System.Web.WebPages,
===
I Need help I when using MVC4 to built app but when I run code on diff machine then I got these to errors
Could not load type 'System.Web.WebPages.DisplayModeProvider' from assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral,.
or
Could not load type 'System.Web.WebPages.DisplayMode' from assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral'.
| 0 | [
2,
13,
22,
10724,
9,
14113,
9,
14113,
6486,
18,
9,
2906,
5438,
15570,
26735,
139,
22,
37,
1475,
13,
22,
10724,
9,
14113,
9,
14113,
6486,
18,
15,
800,
3726,
3726,
31,
376,
448,
31,
76,
568,
307,
8990,
300,
20,
392,
4865,
47,
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... |
Reading a file in real-time using Node.js
===
I need to work out the best way to read data that is being written to a file, using node.js, in real time. Trouble is, Node is a fast moving ship which makes finding the best method for addressing a problem difficult.
**What I Want To Do**<br/>
I have a java process that is doing something and then writing the results of this thing it does to a text file. It typically takes anything from 5 mins to 5 hours to run, with data being written the whole time, and can get up to some fairly hefty throughput rates (circa. 1000 lines/sec).
I would like to read this file, in real time, and then, using node aggregate the data and write it to a socket where it can be graphed on the client.
The client, graphs, sockets and aggregation logic are all done but I am confused about the best approach for reading the file.
**What I Have Tried (or at least played with)**<br/>
`FIFO` - I can tell my Java process to write to a fifo and read this using node, this is in fact how we have this currently implemted using Perl, but because everything else is running in node it makes sense to port the code over.
`Unix Sockets` - As above.
`fs.watchFile` - will this work for what we need?
`fs.createReadStream` - is this better than watchFile?
`fs` & `tail -f` - seems like a hack.
**What, actually, is my Question**<br/>
I am tending towards using Unix Sockets, this seems the fastest option. But does node have better built-in features for reading files from the fs in real time? | 0 | [
2,
1876,
21,
3893,
19,
683,
8,
891,
568,
15421,
9,
728,
18,
800,
3726,
3726,
31,
376,
20,
170,
70,
14,
246,
161,
20,
1302,
1054,
30,
25,
142,
642,
20,
21,
3893,
15,
568,
15421,
9,
728,
18,
15,
19,
683,
85,
9,
2572,
25,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# :To display Text On Notify Icon Mouse Over
===
How to display text on mouseover of notifyicon in c#.Since the ShowBalloonTip shows with respect to the timeout, how can i display the text on mouseover of the Notify Icon? | 0 | [
2,
272,
5910,
13,
45,
262,
3042,
1854,
27,
52,
8612,
9801,
7567,
84,
800,
3726,
3726,
184,
20,
3042,
1854,
27,
7567,
2549,
16,
52,
8612,
49,
1126,
19,
272,
5910,
9,
7412,
14,
298,
3610,
5709,
10169,
1285,
29,
2873,
20,
14,
85,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How can I add an image to every WPF ribbon tab (on the right side) in my application?
===
I want to add a dynamically changeable image to every ribbonTab.
For example if the user set everything correctly, then show a big green circle, else a red one. It would be great if I could change the image from code behind.
I made a new style for ribbonTab and I added a new dependency property for the ribbon (which contains the source of the image). This solution isn't working correctly: on home tab the image appears correctly, when I switch to second tab I can see the image, but if I go back to home tab the image disappears.
Thanks | 0 | [
2,
184,
92,
31,
3547,
40,
1961,
20,
352,
619,
7721,
9162,
6523,
13,
5,
218,
14,
193,
270,
6,
19,
51,
3010,
60,
800,
3726,
3726,
31,
259,
20,
3547,
21,
7782,
1326,
753,
579,
1961,
20,
352,
9162,
15783,
9,
26,
823,
100,
14,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cocoa: Concave view
===
I am a newbie in Cocoa desktop development, can any body guide me through how can I create a concave nsview like safari Please refer the image below.
Thanks in advance
![enter image description here][1]
[1]: http://i.stack.imgur.com/l9GHd.png | 0 | [
2,
24507,
45,
29472,
1418,
800,
3726,
3726,
31,
589,
21,
78,
5893,
19,
24507,
17404,
522,
15,
92,
186,
358,
3378,
55,
120,
184,
92,
31,
1600,
21,
29472,
13,
2172,
4725,
101,
25055,
2247,
5017,
14,
1961,
1021,
9,
3669,
19,
3612,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Crawler4j and Tripadvisor
===
I'm writing a crawler for Tripadvisor, using crawler4j. I need to collect all the reviews for an item, but the links to the "next" reviews (those with numbers) have associated not a link, but a javascript function. This function is defined somewhere in Tripadvisor's servers. Is there a way to evaluate these functions and get the page which they return? | 0 | [
2,
12392,
106,
300,
728,
17,
2305,
1283,
3762,
248,
800,
3726,
3726,
31,
22,
79,
1174,
21,
12392,
106,
26,
2305,
1283,
3762,
248,
15,
568,
12392,
106,
300,
728,
9,
31,
376,
20,
5543,
65,
14,
2783,
26,
40,
9101,
15,
47,
14,
627... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 should cause this "blank" area?
===
I'm working on a bug that when accessing a specific page, the bottom of the page is blank:
![enter image description here][1]
[1]: http://i.stack.imgur.com/7d74Z.jpg
I checked with FireBug and the blank area is just empty, no HTML code at all.
My question is: what should cause this kind of problem? It occurs on both Firefox, Chrome, IE latest version.
Thank you | 0 | [
2,
98,
378,
1679,
48,
13,
7,
10754,
5719,
7,
217,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
6256,
30,
76,
1381,
68,
21,
1903,
2478,
15,
14,
2129,
16,
14,
2478,
25,
6463,
45,
13,
187,
2558,
13679,
1961,
5318,
235,
500,
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... |
openoffice calc, tab csv not saving in price column in ""
===
Why is it when I save my csv as tab del, every column has quote marks "" wrapped around the text but not the last column 'price'?
I tried re-entering the headers and used the tab button each time. | 0 | [
2,
368,
17047,
13,
16304,
15,
6523,
272,
18,
710,
52,
7599,
19,
2162,
4698,
19,
13,
7,
7,
800,
3726,
3726,
483,
25,
32,
76,
31,
2079,
51,
272,
18,
710,
28,
6523,
1506,
15,
352,
4698,
63,
16371,
4872,
13,
7,
7,
3684,
140,
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... |
How to programmatically configure log4cpp?
===
Is it possible to programmatically configure log4cpp?
I want to configure it as it would be configured by supplying the following config file.
appender root basic console
priority root DEBUG
| 0 | [
2,
184,
20,
625,
6732,
1326,
1065,
15951,
6738,
300,
150,
3421,
60,
800,
3726,
3726,
25,
32,
938,
20,
625,
6732,
1326,
1065,
15951,
6738,
300,
150,
3421,
60,
31,
259,
20,
1065,
15951,
32,
28,
32,
83,
44,
28895,
34,
20679,
14,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
SMSS Formatting of characters
===
In SSMS 2005, If I inset the following character (‑) it changes the font of adjacent letters and I'm unsure why. It doesn't seem to have any adverse effect as it selects the data I want (which are parts of a order number) but I'd like to ensure that the character isn't altering the data in anyway. Is it just a visual change or are the characters actually changing?
![enter image description here][1]
SELECT
'Hello',
'‑Hello',
'‑He110',
[1]: http://i.stack.imgur.com/71Nb2.png | 0 | [
2,
7613,
18,
18,
2595,
1203,
16,
1766,
800,
3726,
3726,
19,
13,
18,
18,
79,
18,
812,
15,
100,
31,
19,
3554,
14,
249,
925,
13,
5,
1,
6,
32,
1693,
14,
9978,
16,
4209,
2516,
17,
31,
22,
79,
13815,
483,
9,
32,
1437,
22,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regex composion
===
I want to parse a line from a CSV(comma separated) file, something like this:
Bosh,Mark,mark@gmail.com,"3, Institute","83, 1, 2",1,21
I have to parse the file, and instead of the commas between the apostrophes I wanna have ';', like this:
Bosh,Mark,mark@gmail.com,"3; Institute","83; 1; 2",1,21
I use the following Java code but it doesn't parse it well:
Pattern regex = Pattern.compile("(\"[^\\]]*\")");
Matcher matcher = regex.matcher(line);
if (matcher.find()) {
String replacedMatch = matcher.group();
String gr1 = matcher.group(1);
gr1.trim();
replacedMatch = replacedMatch.replace(",", ";");
line = line.replace(matcher.group(), replacedMatch);
}
the output is:
Bosh,Mark,mark@gmail.com,"3; Institute";"83; 1; 2",1,21
anyone have any idea how to fix this?
| 0 | [
2,
7953,
1706,
6479,
759,
872,
800,
3726,
3726,
31,
259,
20,
2017,
870,
21,
293,
37,
21,
272,
18,
710,
5,
960,
540,
4196,
6,
3893,
15,
301,
101,
48,
45,
1607,
1635,
15,
4527,
15,
4527,
1,
263,
8079,
9,
960,
15,
7,
240,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bundler erase logger's format?
===
As long as I require gems by `Bundler.require`, my logger doesn't work well any more.
require "logger"
logger1 = Logger.new(STDERR)
require 'bundler/setup'
Bundler.require
logger2 = Logger.new(STDERR)
logger1.info 123
logger2.info 123
Output:
I, [2012-06-29T17:51:30.323356 #20774] INFO -- : 123
123
I even don't have `logger` in my `Gemfile`.
source 'http://rubygems.org'
gem 'watir-webdriver', "~> 0.6.1", :require => ["watir-webdriver", "watir-webdriver/extensions/alerts"]
gem "activesupport", "~> 3.2.6", :require => ["active_support", "active_support/core_ext"]
gem "activerecord", "~> 3.2.6", :require => "active_record"
gem 'standalone_migrations', "~> 1.0.10"
gem 'amqp', "~> 0.9.6"
gem 'daemons'
gem 'headless'
gem 'capistrano'
gem 'capistrano-ext'
gem 'capistrano_colors'
gem 'pg'
group :development do
gem "sqlite3", "~> 1.3.6"
gem 'debugger', :require => "ruby-debug"
end
I have to use `Bundler.require`. How to fix my logger? | 0 | [
2,
10194,
139,
23593,
13,
29480,
22,
18,
2595,
60,
800,
3726,
3726,
28,
175,
28,
31,
4077,
8551,
18,
34,
13,
1,
9930,
1252,
9,
99,
3003,
99,
1,
15,
51,
13,
29480,
1437,
22,
38,
170,
134,
186,
91,
9,
4077,
13,
7,
29480,
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... |
How itextsharp works internally?
===
I just want to ask How itextsharp works internally ?<br/>
So i want to learn about internal structure of itextsharp classes ?<br/>
Can anybody help.<br/>
Because there are so many tools in the market which converts media html page to pdf but itextsharp can't .
Thanks in advance!
| 0 | [
2,
184,
31,
11969,
23646,
693,
17739,
60,
800,
3726,
3726,
31,
114,
259,
20,
1349,
184,
31,
11969,
23646,
693,
17739,
13,
60,
1,
5145,
118,
1,
86,
31,
259,
20,
2484,
88,
3117,
1411,
16,
31,
11969,
23646,
2684,
13,
60,
1,
5145,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Volatility always gives me error. What am I doing wrong?
===
I am using DumpIt to dump the memory of a machine running Windows 7 64 Bit. After i dumped the memory i want to use volatility to analyse it.
I get this error message :
D:\>volatility.exe -f RBL-PC-20120626-155339.raw pslist
Volatile Systems Volatility Framework 2.0
No suitable address space mapping found
Tried to open image as:
WindowsHiberFileSpace32: No base Address Space
WindowsCrashDumpSpace32: No base Address Space
JKIA32PagedMemory: No base Address Space
JKIA32PagedMemoryPae: No base Address Space
IA32PagedMemoryPae: Module disabled
IA32PagedMemory: Module disabled
WindowsHiberFileSpace32: No xpress signature found
WindowsCrashDumpSpace32: Header signature invalid
JKIA32PagedMemory: No valid DTB found
JKIA32PagedMemoryPae: No valid DTB found
IA32PagedMemoryPae: Module disabled
IA32PagedMemory: Module disabled
FileAddressSpace: Must be first Address Space
I have used volatility imageinfo and it gets the profile set to Win7SP0x64 if i run this command I got another error.
D:\>volatility.exe -f RBL-PC-20120626-155339.raw --profile=Win
7SP0x64
Volatile Systems Volatility Framework 2.0
ERROR : volatility.addrspace: Invalid profile Win7SP0x64 selected
What am I doing wrong ? | 0 | [
2,
2250,
721,
20901,
550,
2352,
55,
7019,
9,
98,
589,
31,
845,
1389,
60,
800,
3726,
3726,
31,
589,
568,
11424,
242,
20,
11424,
14,
1912,
16,
21,
1940,
946,
1936,
453,
4384,
1142,
9,
75,
31,
15754,
14,
1912,
31,
259,
20,
275,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.