<form action="/?wpmlmethod=offsite&list=2&wpmlformid=" method="post">
...
</form>
I tried:
<script type="text/javascript">document.forms[0].submit();</scrpit>
But it didn't work.
Hi.
I'm using struts2, now in my jsp file i've got 2 variables:
${server_address}
${pageContext.request.contextPath}
Now i want to connect it in my tag:
<s:form action="%{server_address}%{pageContext.request.contextPath}/actionName.action">
But generated output looks like that:
<form method="post" action="http://10.0.0.5:8088/actionName.action" name="actionName" id="actionName">
There is no contextPath... How can i connect this two variable ?
Hi, In my app I use the getdistancefrom method in my app and get a distance between a current location and another set location.
I would like to as well find the direction the other set location is in. What would the code look like to make this iPhone sdk call.
The output would look something like: Location is 500 feet North West
Thanks!
Hello,
Im using Collections.sort() to sort a LinkedList whose elements implements Comparable interface, so they are sorted in a natural order. In the javadoc documentation its said this method uses mergesort algorithm wich has n*log(n) performance.
My question is if there is a more efficient algorithm to sort my LinkedList?
The size of that list could be very high and sort will be also very frequent.
Thanks!
How/where in the code does the nib file get related to its *.m and *.h files?
Specifically I'm talking about when you create a new Objective-C class, not using the initWithNibName method.
I know how I do to place a icon in the systray. But what the best method to perform systray icon animation? animated gifs? timers?
Preferentially using C# and/or WPF. Thanks!
I would like to create a virtual attribute that will always be included when you do model_instance.inspect. I understand that attr_reader will give me the same thing as just defining an instance method, but I would like this attribute to be part of the object's "make up"
How can I accomplish this?
Thanks!
My question is :
I want to know when does a xLayout (or ViewGroup in general) add a child view from XML ? And by "when" I mean at what point of code, in what "pass" of the "traversal" of the UI toolkit ?
Which method of xLayout or ViewGroup should I override ?
I have done my homework : I have watched the "Writing Custom Views For Android" presented (by Adam Powell and Romain Guy) in the last Google I/O and I have read Adam Powell comments on this Google+ post.
We've been recording sound for over a decade using what seems like a very clunky method using the Winmm.dll and the MCIsendString.
I've read that this doesn't set the recording quality value correctly (not sure if that article was ever true or is still true).
I was wondering if there is any better way to record sound.
I would like to obtain the list of controls under a given point.
There is a method on System.Windows.Form to obtain a control under a point(GetChildAtPoint) but not point(GetChildsAtPoint).
Is there something similar for the list of controls (if borders intersect one other):
I need this because I select the objects when user clicks on the panel(I use Microsoft.VisualBasic.PowerPacks.RectangleShape as label bellow). In case if labels are superposed, user should be asked what object to select.
It is the first time I have to use certificate authentication.
A commercial partner expose two services, a XML Web Service and a HTTP service. I have to access both of them with .NET clients.
What I have tried
0. Setting up the environment
I have installed the SSLCACertificates (on root and two intermediate) and the client certificate in my local machine (win 7 professional) using certmgr.exe.
1. For the web service
I have the client certificate (der).
The service will be consumed via a .NET proxy.
Here's the code:
OrderWSService proxy = new OrderWSService();
string CertFile = "ClientCert_DER.cer";
proxy.ClientCertificates.Add(new System.Security.Cryptography.X509Certificates.X509Certificate(CertFile));
orderTrackingTO ot = new orderTrackingTO() { order_id = "80", tracking_id = "82", status = stateOrderType.IN_PREPARATION };
resultResponseTO res = proxy.insertOrderTracking(ot);
Exception reported at last statement: The request failed with an empty response.
2. For the HTTP interface
it is a HTTPS interface I have to call through POST method.
The HTTPS request will be send from a .NET client using HTTPWebRequest.
Here's the code:
string PostData = "MyPostData";
//setting the request
HttpWebRequest req;
req = (HttpWebRequest)HttpWebRequest.Create(url);
req.UserAgent = "MyUserAgent";
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ClientCertificates.Add(new System.Security.Cryptography.X509Certificates.X509Certificate(CertFile, "MyPassword"));
//setting the request content
byte[] byteArray = Encoding.UTF8.GetBytes(PostData);
Stream dataStream = req.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
//obtaining the response
WebResponse res = req.GetResponse();
r = new StreamReader(res.GetResponseStream());
Exception reported at last statement: The request was aborted: Could not create SSL/TLS secure channel.
3. Last try: using the browser
In Chrome, after installing the certificates, if I try to access both urls I get a 107 error:
Error 107 (net::ERR_SSL_PROTOCOL_ERROR)
I am stuck.
I'm using the grails navigation plugin and one of the things i want to do is have the menu item have a dynamic number in it for example
static navigation = [
group:'tabs',
order:7,
title:'Mail',
action:'index',
subItems: [
[action:'pending', order:1, title:"Pending"],
[action:'active', order:10, title:'Active'],
[action:'completed', order:11, title:'Completed']
]
]
So i want to figure out a way to make the title Mail(3) or Mail(2) based on the amount of messages a user has.
I know this will have to be set in the method or by a service of some sort i'm just not sure how to get it to update.
Hello everybody
I want to send emails with formatted sender such as "Support team [email protected]".
If delivery method I wrote from "support team <[email protected]>" and from "\"support team\" <[email protected]>" but smtp server says
#: "@" or "." expected after "test"
This means that rails puts full "from" string into braces. How can I fix this without monkeypatching?
I have a pretty annoying problem. I would like to create a drawing program, using winform + XNA combo.
The most important part would be to transform the mouse position into the XNA drawn grid - I was able to make it for the translations, but it only work if I don't zoom in - when I do, the coordinates simply went horrible wrong.
And I have no idea what I doing wrong. I tried to transform with scaling matrix, transform with inverse scaling matrix, multiplying with zoom, but none seems to work.
In the beginning (with zoom value = 1) the grid starts from (0,0,0) going to (Width, Height, 0). I was able to get coordinates based on this grid as long as the zoom value didn't changed at all. I using a custom shader, with orthographic projection matrix, identity view matrix, and the transformed world matrix.
Here is the two main method:
internal void Update(RenderData data)
{
KeyboardState keyS = Keyboard.GetState();
MouseState mouS = Mouse.GetState();
if (ButtonState.Pressed == mouS.RightButton)
{
camTarget.X -= (float)(mouS.X - oldMstate.X) / 2;
camTarget.Y += (float)(mouS.Y - oldMstate.Y) / 2;
}
if (ButtonState.Pressed == mouS.MiddleButton || keyS.IsKeyDown(Keys.Space))
{
zVal += (float)(mouS.Y - oldMstate.Y) / 10;
zoom = (float)Math.Pow(2, zVal);
}
oldKState = keyS;
oldMstate = mouS;
world = Matrix.CreateTranslation(new Vector3(-camTarget.X, -camTarget.Y, 0)) * Matrix.CreateScale(zoom / 2);
}
internal PointF MousePos
{
get
{
Vector2 mousePos = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);
Matrix trans = Matrix.CreateTranslation(new Vector3(camTarget.X - (Width / 2), -camTarget.Y + (Height / 2), 0));
mousePos = Vector2.Transform(mousePos, trans);
return new PointF(mousePos.X, mousePos.Y);
}
}
The second method should return the coordinates of the mouse cursor based on the grid (where the (0,0) point of the grid is the top-left corner.).
But is just don't work. I deleted the zoom transformation from the matrix trans, as I didnt was able to get any useful result (most of the time, the coordinates was horrible wrong, mostly many thousand when the grid's size is 500x500).
Any idea, or suggestion? I trying to solve this simple problem for two days now :\
my project is asp.net MVC, using Telerik MVC combobox. I can change the sytle of the first item if I use:
var item = combobox.dropDown.$items.first();
item.addClass('test');
Or change all items, using:
combobox.dropDown.$items.addClass('test');
But I need to change just specific items (based on a model), I tried:
combobox.dropDown.$items[1].addClass('test');
I get this error:
Object doesn't support property or method 'addClass'
Hi,
How would I invoke an external application through the RubyCocoa bridge? I read something about NSTask, yet I have no idea how this should be translated in RubyCocoa. My goal is to have an IB_action to trigger a method which will run a terminal application with some parameters, i.e. ls -p $mydir, where mydir comes from an IB_outlet such as an Textfield. Any directions or help would be greatly appreciated!
I was surprised to see in the Java source that System.arraycopy is a native method.
Of course the reason is because it's faster. But what native tricks is the code able to employ that make it faster?
Why not just loop over the original array and copy each pointer to the new array - surely this isn't that slow and cumbersome?
Thanks,
-James
What is the correct way to get the Series of a char in PPT 2010.
I tried
PowerPoint.SeriesCollection mySeriesCollection = (PowerPoint.SeriesCollection)
myChart.SeriesCollection(1);
throws the following exception
Exception Type: System.InvalidCastException
Further, What is the correct call in C# to get the series of a chart ?
If I try this way:
PowerPoint.Series mySeries = (PowerPoint.Series)myChart.SeriesCollection.Item(1);
I get the following compile error :
error CS0119: 'Microsoft.Office.Interop.PowerPoint.Chart.SeriesCollection(object)'
is a 'method', which is not valid in the given context
Hello!
Can someone explain me why verlet integration is better then euler ? And why rk4 better then verlet ? I don't understand why it is better method :/
Hi guys. I'm having a problem using ActiveSupport's core extensions on a gem I am developing.
I had it working with AS 2.3.8, but as soon as I wanted to port it to 3b4, the extensions stopped working and my test results are filled with lines such as:
undefined method `blank?' for "something":String
I've included it via gem "activesupport" followed by require "active_support"
Is there anything else I need to call to include those extensions?
Thanks
I use the following method to break the double loop in Python.
for word1 in buf1:
find = False
for word2 in buf2:
...
if res == res1:
print "BINGO " + word1 + ":" + word2
find = True
if find:
break
Is there better way to break the double loop?