PostgreSQL stores statistics about tables in the system table called pg_class. The query planner accesses this table for every query. These statistics may only be updated using the analyze command. If the analyze command is not run often, the statistics in this table may not be accurate and the query planner may make poor decisions which can degrade system performance. Another strategy is for the query planner to generate these statistics for each query (including selects, inserts, updates, and deletes). This approach would allow the query planner to have the most up-to-date statistics possible.
Why postgres always rely on pg_class instead?
I am using django comments framework for allowing users to comment on my site, but there is a problem with the url to which user is redirected after posting the comment. If I render my comment form as
{% with comment.content_object.get_absolute_url as next %}
{% render_comment_form for comment.content_object %}
{% endwith %}
Then the url to which it is redirected after the comment is posted is
<comment.content_object.get_absolute_url/?c=<comment.id>
For example I posted a comment on a post with url /post/256/a-new-post/ then the url to which I am redirected after posting the comment is /post/256/a-new-post/?c=99 where assume 99 is the id comment just posted. Instead what I want is something like this /post/256/a-new-post/#c99.
Secondly when I do comment.get_absolute_url() I do not get the proper url instead I get a url like /comments/cr/58/14/#c99 and this link is broken. How can I get the correct url as mentioned in the documentation. Am i doing something wrong.
Any help is appreciated.
Hi,
I'm a beginner in java. I want the logic of the small program.
I have two arrays
array = {a1,a2,a3,a4,a5,,,,,,,,,an}
and
array2 = {b1,b2,b3,b4,,,,,,,,,,,bn}
I want string as:
a1b1,a2a3b2b3,a4a5a6b4b5b6,..........an
Please tell me what will be the logic.
PostgreSQL stores statistics about tables in the system table called pg_class. The query planner accesses this table for every query. These statistics may only be updated using the analyze command. If the analyze command is not run often, the statistics in this table may not be accurate and the query planner may make poor decisions which can degrade system performance. Another strategy is for the query planner to generate these statistics for each query (including selects, inserts, updates, and deletes). This approach would allow the query planner to have the most up-to-date statistics possible.
Why postgres always rely on pg_class instead?
Is there any performance overhead in using RaiseEvent in .net
I have a code which is similar to following.
Dim _startTick As Integer = Environment.TickCount
'Do some Task'
Dim duration As Integer = Environment.TickCount - _startTick
Logger.Debug("Time taken : {0}", duration)
RaiseEvent Datareceived()
Above code returns
Time Taken :1200
Time Taken :1400
But if remove RaiseEvent it returns
Time Taken :110
Time Taken :121
I am surprised that the raiseevent is called after the logging of time taken. How it effects total time taken.
I am working on Compact framework.
Update:
In the Eventhandler I had given a MsgBox.
When I removed the message box it is now showing time taken as 110,121,etc i.e. less that 500 milliseconds. If I put the Msgbox back in eventhandler it shows 1200,1400,etc i.e. more that a second.
More surprised now.(Event is raised after the logging part)
I am trying to do an ajax website, but my ajax is not working. I checked my GAC and system.web,extensions dll is available.
Why it is not working .? I am also not getting any errors. I tried many ways.
I wrote the below code to test ajax.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1">
</cc1:CalendarExtender>
</div>
</form>
</body>
</html>
JAvascript error that i got
1.Type is not defined
http://localhost:1467/testnew/Default.aspx?_TSM_HiddenField_=ToolkitScriptManager1_HiddenField&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d1.0.20229.20821%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3ac5c982cc-4942-4683-9b48-c2c58277700f%3ae2e86ef9%3aa9a7729d%3a9ea3f0e2%3a9e8e87e9%3a1df13a87%3a4c9865be%3aba594826%3a507fcf1b%3ac7a4182e
Hi All,
I have a sharepoint site. This site large nubmer of site and sub site sollection in it. There are few that are created and are not in use. Now my questuion is how can I findout these old sites and before going deleting I have to first archive it.
Can any one tell me what is the best possible approach to do it?
I have created MS Access Database using C# ADOX library. I have created one table with several columns. What I want to achieve is when I insert date in one column, the date format should be YYYY-MM-DD and not MM-DD-YYYY. I know its just display format, but I want to access the property which we set when we open access table in design mode, and for column with date data type, set format as Custom (YYYY-MM-DD). I want this to be set at runtime while creating table only. I wanted to know what should be property name that I should use in order to access and set the format property of column?
Hi!
i have created tree view demo in Visual Studio 2008 C# in WPF but i want to give header and when header is clicked it sort data. i want to create demo like this
header1………….header2……….header3
-parent1…………..parent2………..parent3
…-child1……………-child1………….child1
……child1……………-child1…………child1
-parent2…………..parent2………..parent2
…-child2……………-child2………….child2
……child……………-child2…………child2
parent3…………….parent3………..parent3
plz suggest any link or samples code. thank you!
Let us say that we have following array:
my @arr=('Jan','Feb','Mar','Apr');
my @arr2=@arr[0..2];
How can we do the same thing if we have array reference like below:
my $arr_ref=['Jan','Feb','Mar','Apr'];
my $arr_ref2; # How can we do something similar to @arr[0..2]; using $arr_ref ?
hi,
I am trying to call webservice from python client using SUDS. as per SUDS support, (https://fedorahosted.org/suds/wiki/Documentation#OVERVIEW)
I created a webservice with Config:
SOAP Binding 1.1
Document/Literal
though Document/literal style takes only one parameter, SUDS Document (https://fedorahosted.org/suds/wiki/Documentation#BASICUSAGE)
shows:
Suds - version: 0.3.3 build: (beta)
R397-20081121
Service (WebServiceTestBeanService)
tns="http://test.server.enterprise.rhq.org/"
Prefixes (1):
ns0 = "http://test.server.enterprise.rhq.org/"
Ports (1):
(Soap)
Methods:
addPerson(Person person, )
echo(xs:string arg0, )
getList(xs:string str, xs:int length, )
getPercentBodyFat(xs:string name, xs:int height, xs:int weight)
getPersonByName(Name name, )
hello()
testExceptions()
testListArg(xs:string[] list, )
testVoid()
updatePerson(AnotherPerson person, name name, ) Types (23):
Person
Name
Phone
AnotherPerson
Which has functions with several or no parameters. can we have such methods(Exposed) in a webservice with Document/Literal Style? if so how?
Need
Quick and fast list of configuration changes required while moving from single-tier to multi-tier in CSLA deployment
Detailed explanation of the above checklist
A How to list
I have installed Oracle 11gR2 on my machine, now when i try to connect to it using IP address as 'localhost' or '127.0.0.1' there is no issue, but when I use ip address of machine '192.168.1.6' it throws exception: Io exception: Then Network Adapter could not establish the connection.
I have installed ms loopback adapter prior to installation and my machine get IP from DHCP.
do i need to configure any setting oracle config or what i might be missing here?
I have to create one VB.Net Dll for VB.Net Application.In DLL there will be function to calculate the fee based on some parameter which I pass when call the function from appllication, output of calculated fee would be this type
**Validations are not selected.
Rate information:
IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:3; Description:$3 Fixed
IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:1; Description:$1 Fixed
Sub Total:
IN: 11/14/20113:12:38 PM; OUT: 11/15/20113:12:38 PM; Fee:4; Description: Rate Group1
Rate information:
IN:11/14/20113:12:38 PM; OUT:11/15/20113:12:38 PM; Fee:3; Description:$3 Fixed
Sub Total:
IN: 11/14/20113:12:38 PM; OUT: 11/15/20113:12:38 PM; Fee:3; Description: Rate Group1**
Can anybody tell me how can I return output of this type to the application ,so that I can use it in that application.
Is there any Python library that allows me to parse an HTML document similar to what jQuery does?
i.e. I'd like to be able to use CSS selector syntax to grab an arbitrary set of nodes from the document, read their content/attributes, etc.
The only Python HTML parsing lib I've used before was BeautifulSoup, and even though it's fine I keep thinking it would be faster to do my parsing if I had jQuery syntax available. :D
Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n):
"Largest number of McNuggets that cannot be bought in exact quantity: n"
The == is used to compare two string in shell script, however I want to compare two strings by ignoring case, how it can be done.Do we any standard command for this.
Can we have a nested function in C? What is the use of nested functions? If they exist in C does there implementation differes from compiler to compiler.
Are nested functions allowed in any other language? If yes then what is there significance?
I used shared object to drawing line. But some times syncevt.changeList[cl].name is "clear" insted of "success". and value of setproperty become undefined.
Have any solution for this porblem
This is my xml file.
- <deviceparameters>
- <parameter componenttype="TextBox">
<name>Operating Type</name>
<oid>1.3.6.1.4.1.31163.5.1.1</oid>
<writable>true</writable>
<description>The operating type defines which waveform type is used. This configuration takes several seconds to execute</description>
- <paramvalues type="Integer">
<value default="No">123</value>
</paramvalues>
</parameter>
- <parameter componenttype="TextBox">
<name>Active Waveform Status</name>
<oid>1.3.6.1.4.1.31163.5.1.2</oid>
<writable>false</writable>
<description>Show the status of the waveform configured by operatingType</description>
- <paramvalues type="String">
<value default="yes">Active</value>
</paramvalues>
</parameter>
</deviceparameters>
I want to remove node with name 'Active wavwform Status'. How can I reomve that particular node from xml.
The code I have written is below.
rootElement = doc.getDocumentElement();
NodeList nList = doc.getElementsByTagName("parameter");
String nodeName = TF_name.getText();
System.out.println(""+nList.getLength());
for (int temp = 0; temp < nList.getLength();temp++)
{
Node nNode = nList.item(temp);
Element eElement = (Element) nNode;
String upname1 = getTagValue("name", eElement);
if(upname1.equals(nodeName))
{
System.out.println("Parent: "+nNode.getParentNode().getNodeName());
System.out.println("nodename: "+nNode.getNodeName());
System.out.println("rmoving ....");
rootElement.removeChild(nNode);
System.out.println("removed...");
}
}
I have an application that contains Menu and sub menus. I have attached Appliocation Commands to some of the sub menu items such as Cut, Copy and Paste. I also have some other menu items that do not have application commands. How could I add a custom command binding to those sub menu items? I have gone through this artcile but unable to attach event to my sub menu items.
I have a stored procedure in Oracle 9i which inserts records in a table. The table has a primary key built to ensure duplicte rows doesnot exists.
I am trying to insert a record by calling this stored procedure and it works first time properly. I am again trying to insert a duplicate record and expecting unique constraint violation error. But I am getting
ORA-01401 inserted value too large for column
I knew its meaning but my query is , if the value inserted is really large then how it got successful in the first attempt.