Is there any light weight tools which can filter and output http headers/responses in human readable form? Something like wireshark. I have tried tcpdump; but it is hard to read.
I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes selected item in one of dropdowns, ASP.Net doesn't seem to handle SelectedIndexChanged event until form is submitted with a 'Submit' button click.
How do I make my dropdowns handle SelectedIndexChanged instantly?
P.S. It's a classic question I have answered too many times, but it seems no one asked it before on stackoverflow.
I've got a simple UIWebView in my iPhone app that's loading a XHTML document with some SGV embeded. This all works find on the desktop version of Safari, but it crashes in a UIWebView.
Here is the Objective C:
NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"];
NSData *fileData = [NSData dataWithContentsOfFile: path];
[svgView loadData: fileData MIMEType: @"text/xml" textEncodingName: @"UTF-8" baseURL: [NSURL fileURLWithPath: path]];
I also tried a MIMEType of application/xhtml+xml, but it didn't help.
Here is the HTML:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XTech SVG Demo</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg">
<g style="fill-opacity:0.7;">
<circle cx="6.5cm" cy="2cm" r="100" style="fill:red; stroke:black; stroke-width:0.1cm" transform="translate(0,50)" />
<circle cx="6.5cm" cy="2cm" r="100" style="fill:blue; stroke:black; stroke-width:0.1cm" transform="translate(70,150)" />
<circle cx="6.5cm" cy="2cm" r="100" style="fill:green; stroke:black; stroke-width:0.1cm" transform="translate(-70,150)"/>
</g>
</svg>
</body>
</html>
All very basic stuff. When it loads on the iPhone, however, it crashes with this error:
2010-03-31 10:37:10.252 ColorDoodle[2014:20b] -[DOMElement structuralComplexityContribution]: unrecognized selector sent to instance 0x3e51b60
2010-03-31 10:37:10.253 ColorDoodle[2014:20b] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[DOMElement structuralComplexityContribution]: unrecognized selector sent to instance 0x3e51b60'
Any idea why? Is this a bug in the rendering engine of the UIWebView? I don't see anything too odd here.
* Updated *
There is definitely something screwy going on here.
If I add this bit of code just inside the tag, it works fine:
<form>
</form>
Take that code back out, and it crashes again.
In a C# form, i have a panel anchored all sides, and inside, a textbox, anchored top/left/right.
When text gets loaded into the textbox, i want it to auto expand itself vertically so that i don't need to scroll the textbox (scroll the panel at most, if there is more text that doesn't fit the panel).
is there any way to do this with a textbox? (i'm not constrained to use this control so if there's another control that fits the description, feel free to mention it)
In YUI 3 I have a node that is my select box:
Y.get('#regionSelect');
How do I get the <option> values that are currently selected (even if there are more than one?) Also, is there a tutorial out there that tells me explicitly how to do this (I don't want to serialize a whole form)?
Hi programming some C# in a form with a bunch of group boxes. I have a two Calendar controls that when called upon, are partially invisible due to surrounding group boxes.
this.grp_TransactionDetails.Controls.Add(this.cal_Ctrl);
this.grp_TransactionDetails.Controls.Add(this.cal_Batch);
Any ideas? (I wish there was a z-index property)
Hi guys
I'm finishing my Computer science degree in university but my fear of maths (lack of background knowledge) made me to leave all my maths units til' the very end which is now. i either take them on and pass or have to give up. I've passed all my programming units easily but knowing my poor maths skills won't do i've been staying clear of the maths units.
I have to pass Differential Calculus and Linear Algebra first. With a help of book named "Linear Algebra: A Modern Introduction" i'm finding myself on track and i think i can pass the Linear Algebra unit.
But with differential calculus i can't find a book to help me. They're either too advanced or just too simple for what i have to learn. The things i'm required to know for this units are:
Set notation, the real number line, Complex numbers in cartesian form.
Complex plane, modulus.
Complex numbers in polar form. De Moivre’s Theorem.
Complex powers and nth roots.
Definition of ei? and ez for z complex.
Applications to trigonometry.
Revision of domain and range of a function
Working in R3. Curves and surfaces. Functions of 2 variables.
Level curves.Partial derivatives and tangent planes.
The derivative as a difference quotient.
Geometric significance of the derivative.
Discussion of limit.
Higher order partial derivatives. Limits of f(x,y). Continuity.
Maxima and minima of f(x,y).
The chain rule. Implicit differentiation.
Directional derivatives and the gradient.
Limit laws, l’Hoˆpital’s rule, composition law.
Definition of sinh and cosh and their inverses.
Taylor polynomials. The remainder term.
Taylor series.
Is there a book to help me get on track with the above? Being a student i can't buy too many books hence why i'm looking for a book that covers topics I need to know. The University library has a fairly limited collection which i took as loan but didn't find useful as it was too complex.
I am using Symfony 1.3.2 on Ubuntu 9.10
I want to set the default value of a textarea widget, with data read froma adb.
My code snippet in the template looks likes this:
<?php $form['notes']->render(); ?>
The API docs dont show how to do this - does anyone know how to do this?
I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I am getting the following error:
"This page calls for XML namespace declared with prefix br but no taglibrary exists"
Now, I have seen a similar question somewhere else:
http://forums.sun.com/thread.jspa?threadID=5430327
but the answer is not listed there. Or, if it is, then I am clearly missing it -- line one of my index.xhtml file reads "http://www.w3.org/1999/xhtml". It also does not explain why, when I reload localhost:8080, the message disappears.
Here is my index.xhtml file:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="./template.xhtml">
<ui:define name="body">
<h:form>
<h:commandLink action="#{filmController.previous}" value="Previous #{filmController.pageSize}" rendered="#{filmController.hasPreviousPage}"/>
<h:commandLink action="#{filmController.next}" value="Next #{filmController.pageSize}" rendered="#{filmController.hasNextPage}"/>
<h:dataTable value="#{filmController.filmTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
<h:column>
<f:facet name="header">
<h:outputText value="Title"/>
</f:facet>
<h:outputText value="#{item.title}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Description"/>
</f:facet>
<h:outputText value="#{item.description}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" "/>
</f:facet>
<h:commandLink action="#{filmController.prepareView}" value="View"/>
</h:column>
</h:dataTable>
<br/>
</h:form>
</ui:define>
</ui:composition>
</html>
Is there a way to load an image from some url or a local folder and then make some complex morphing to it in real time? For example, I have a vector animated pseudo 3D paper in my project that, for example, is being flipped different ways. Then I want to place some image inside that paper box and want to morph that image accordingly to the box form changes or at least make it look more realistically, not exactly the same as the paper box.
Thanks.
Hi, guys.
I seem to have an issue with connecting to an embedded FireBird database from a sample C# app. Here's what I've got.
static void Main(string[] args)
{
//Some constant parameters used to form up the connection string...
#region constant literals
const String User = "SYSDBA";
const String Password = "masterkey";
const String DBPath = "D:\\!tmp\\1\\cafw.fdb";
const String DLLPath = @"fbembed.dll";
const String Charset = "WIN1251";
const int Dialect = 3;
#endregion
//I check whether we actually have a database file nearby
//and fbembed.dll. If we don't - we leave
if (File.Exists(DBPath) == true && File.Exists(DLLPath) == true)
{
//I form up a connection string out of literals I've declared above
FbConnectionStringBuilder CStr = new FbConnectionStringBuilder();
CStr.ServerType = FbServerType.Embedded;
CStr.UserID = User;
CStr.Password = Password;
CStr.Dialect = Dialect;
CStr.Database = DBPath;
CStr.Charset = Charset;
CStr.ClientLibrary = DLLPath;
//And then I finally try to connect
FbConnection Conn = new FbConnection(CStr.ToString());
try
{
//See what we've got in the end
Console.WriteLine(CStr.ToString());
//And try to connect
Conn.Open();
}
catch (Exception Ex)
{
//Show me what has gone wrong
Console.WriteLine("\n" + Ex.Message.ToString());
Console.ReadKey();
}
finally
{
Conn.Close();
}
}
}
The problem is, it yields me a
server type=Embedded;user id=SYSDBA;password=masterkey;dialect=3;initial catalog=D:!tmp\1
\cafw.fdb;character set=WIN1251;client library=fbembed.dll
No message for error code 335544972 found.
Invalid ESCAPE sequence
as an output.
I've googled around to find out about 335544972 error code, and it seems to be something about invalid connection string, but I haven't found any "official" info about that.
Hase anybody encountered anything similar so one could tell me what am I doing wrong?
Thanks.
I have created this widget
class DateTimeWidget(forms.TextInput):
attr = {'class': 'datetimepicker'}
class Media:
js = ('js/jquery-ui-timepicker-addon.js',)
Then I use it on my form
class SessionForm(forms.ModelForm):
class Meta:
model = Session
def __init__(self, *args, **kwargs):
super(SessionForm, self).__init__(*args, **kwargs)
self.fields['start_time'].widget = DateTimeWidget()
self.fields['end_time'].widget = DateTimeWidget()
No css class is applied to my fields (I'm expecting datetimepicker applied to both start_time & end_time).
I imagine I have put attr at a wrong location. Where am I supposed to specify it ?
I am testing an application and need to test it with different screen resolutions with windows form applications.
What is the common resolution tested for now days?
I have a main form, which has button. By clicking on this button JQuery Dialog will shown. And contains of this dialog is a javascript bing map (using VEMAP object). So there are different js documents.
How can I create a context menu for bing map, opening in jquery dialog?
Thanks!
Is there any way of retrieving an absolute URL for a file on a mounted volume in Cocoa? For example, say afp://server/Documents is mounted at /Volumes/Documents. How can I get full URL to a file on the mounted volume in the form of afp://server/Documents/path/to/file?
I've tried using statfs but the value of f_mntfromname doesn't contain a url, it contains the same value that is given by the mount command.
I generated a lower triangular matrix, and I want to complete the matrix using the values in the lower triangular matrix to form a square matrix, symmetrical around the diagonal zeros.
lower_triangle = numpy.array([
[0,0,0,0],
[1,0,0,0],
[2,3,0,0],
[4,5,6,0]])
I want to generate the following complete matrix, maintaining the zero diagonal:
complete_matrix = numpy.array([
[0, 1, 2, 4],
[1, 0, 3, 5],
[2, 3, 0, 6],
[4, 5, 6, 0]])
Thanks.
Hi all,
I'm building an application with treeview in windows form. I would like to change the background color/highlight individual items in the treeview based on some criteria. Does anyone have any suggestions on how to accomplish this?
Thank you very much!
Jason
I have a long path I'd like to shorten for displaying on a form using the ellipsis character(s?).
I know there is the PathCompactPathEx Win32 API call, but I know there is a built-in .NET equivalent. I have used it previously, but cannot find it any more. Any hints, please?
I can't figure out why, but when I print this form in IE7, the first page's content gets aligned to the bottom of the page. I am calling page-break-after:always on the table element that shows the data on the first page. Any ideas?
I'm using both django-registrations and django-profiles. When the user registers I'd like to ask them to fill in the form fields from profiles as well as the usual username and password. How do I combine these two into one sign up page?
When using dependency injection (DI) and inversion of control (IoC) objects will typically have a constructor that accepts the set of dependencies required for the object to function properly.
For example, if I have a form that requires a service to populate a combo box you might see something like this:
// my files
public interface IDataService {
IList<MyData> GetData();
}
public interface IComboDataService {
IList<MyComboData> GetComboData();
}
public partial class PopulatedForm : BaseForm {
private IDataService service;
public PopulatedForm(IDataService service) {
//...
InitializeComponent();
}
}
This works fine at the top level, I just use my IoC container to resolve the dependencies:
var form = ioc.Resolve<PopulatedForm>();
But in the face of generated code, this gets harder. In winforms a second file composing the rest of the partial class is generated. This file references other components, such as custom controls, and uses no-args constructors to create such controls:
// generated file: PopulatedForm.Designer.cs
public partial class PopulatedForm {
private void InitializeComponent() {
this.customComboBox = new UserCreatedComboBox();
// customComboBox has an IComboDataService dependency
}
}
Since this is generated code, I can't pass in the dependencies and there's no easy way to have my IoC container automatically inject all the dependencies.
One solution is to pass in the dependencies of each child component to PopulatedForm even though it may not need them directly, such as with the IComboDataService required by the UserCreatedComboBox. I then have the responsibility to make sure that the dependencies are provided through various properties or setter methods. Then, my PopulatedForm constructor might look as follows:
public PopulatedForm(IDataService service, IComboDataService comboDataService) {
this.service = service;
InitializeComponent();
this.customComboBox.ComboDataService = comboDataService;
}
Another possible solution is to have the no-args constructor to do the necessary resolution:
public class UserCreatedComboBox {
private IComboDataService comboDataService;
public UserCreatedComboBox() {
if (!DesignMode && IoC.Instance != null) {
comboDataService = Ioc.Instance.Resolve<IComboDataService>();
}
}
}
Neither solution is particularly good. What patterns and alternatives are available to more capably handle dependency-injection in the face of generated code? I'd love to see both general solutions, such as patterns, and ones specific to C#, Winforms, and Autofac.
hi there, are there any way to create an object form any class inside a numpy array?. Something like:
a = zeros(4)
for i in range(4):
a[i]=Register()
Thanks
For the longest time I've been curious to code in Intermediate Language just as an academic endeavour and to gain a better understanding of what's "happening under the hood".
Does anybody provide Visual Studio support for *IL in the form of: project templates, IntelliSense integration, and those kind of RAD features?
Edits: I don't mean restricted to out of the box support. For example, I can download Visual Studio extensions to support Python, COBOL, etc. Want the same for *IL.
There is a stand-alone Intermediate Assembler tool.