I got the URL for the logout screen but I don't know how to create an anchor tag to reference it
resp.getWriter().println(userService.createLogoutURL(req.getRequestURI()));
Tks
Hello.
I came across a program with 10 header and 10 source files. I read in my text book that the functions are called from main. But how can I pass data to so many functions from main()?
I have a list:
list<Unit *> UnitCollection;
containing Unit objects, which has an accessor like:
bool Unit::isUnit(string uCode)
{
if(this->unitCode == uCode)
return true;
else
return false;
}
How do I search my UnitCollection list by uCode and return the corresponding element (preferably it's index).
I have looked at the find() method, but i'm not sure you can pass a boolean method in instead of a searched item parameter if that makes sense.
so I have a Track system with some kind of protection. So to get some data from any URL you have to pass protection like this http://188.134.14.27/projects/cloudobserver/login and then (in browser) you can see some pages http://188.134.14.27/projects/cloudobserver/wiki/CloudObserverCMSSetup (if you havent passed login youll get no content)
so how to login and get data from page using flash/actionscript (btw I am triing to create an rss reader)?
Hi...
I want to convert the following .htaccess rules to lighttpd. Can anyone please help me ?
DirectoryIndex index.php
RewriteEngine On
#RewriteBase /your-sub-directory
RewriteRule ^index.php/rewrite-test index.php/rewrite-pass [L]
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
Thanks!
Hello,
I am using the curl found in /usr/bin/curl (Not the PHP Curl )
how do I pass authorization header using curl ?
It will be great if someone can reply.
Regards,
Mithun
I wonder whether there's a way to program a resource DLL for Windows Clusters in Delphi. I want to write a program that observes cluster state changes.
Judging from the MSDN API reference, all relevant functions are located in the ClusAPI.h and ResAPI.h headers, but unfortunately it seems as if they haven't been ported yet and HeaderConv seems to fail on them.
Does anyone has experience in doing such a thing?
I am trying to implement the deleting method and pass my parameters for the delete operation. I am using sqldatasource. Since the ID doesnt have a column in my gridview how can I get the value of the ID and set it as my delete parameter?
hi,
I have audio files in var/
This is the file name
2-3109999999-3246758493-1271129518-1271129505.6.wav
Format
2=campaign id
3109999999=caller id
3246758493=number called
1271129518=timestamp call ended
1271129505=timestamp call started
6=call id
If I were to pass just the number called which was 3246758493, how can I find all the files without defining all the other variables(such as timestamp, etc) and just the files that have that number in the filename?
Hey All,
I am a newbie in C# and curious about the better solution of my case.
I have a method which gets the DataTable as a parameter and creates a List with MyClass's variables and returns it.
public static List<Campaigns> GetCampaignsList(DataTable DataTable)
{
List<Campaigns> ListCampaigns = new List<Campaigns>();
foreach (DataRow row in DataTable.Rows)
{
Campaigns Campaign = new Campaigns();
Campaign.CampaignID = Convert.ToInt32(row["CampaignID"]);
Campaign.CustomerID = Convert.ToInt32(row["CustomerID"]);
Campaign.ClientID = Convert.ToInt32(row["ClientID"]);
Campaign.Title = row["Title"].ToString();
Campaign.Subject = row["Subject"].ToString();
Campaign.FromName = row["FromName"].ToString();
Campaign.FromEmail = row["FromEmail"].ToString();
Campaign.ReplyEmail = row["ReplyEmail"].ToString();
Campaign.AddDate = Convert.ToDateTime(row["AddDate"]);
Campaign.UniqueRecipients = Convert.ToInt32(row["UniqueRecipients"]);
Campaign.ClientReportVisible = Convert.ToBoolean(row["ClientReportVisible"]);
Campaign.Status = Convert.ToInt16(row["Status"]);
ListCampaigns.Add(Campaign);
}
return ListCampaigns;
}
And one of my another DataTable method gets the DataTable from the database with given parameters. Here is the method.
public static DataTable GetNewCampaigns()
{
DataTable dtCampaigns = new DataTable();
Campaigns Campaigns = new Campaigns();
dtCampaigns = Campaigns.SelectStatus(0);
return dtCampaigns;
}
But the problem is that, this GetNewCampaigns method doesnt take parameters but other methods can take parameters. For example when I try to select a campaign with a CampaignID, I have to send CampaignID as parameter. These all Database methods do take return type as DataTable but different number of parameters.
public static DataTable GetCampaignDetails(int CampaignID)
{
DataTable dtCampaigns = new DataTable();
Campaigns Campaigns = new Campaigns();
dtCampaigns = Campaigns.Select(CampaignID);
return dtCampaigns;
}
At the end, I want to pass a Delegate to my first GetCampaignList Method as parameter which will decide which Database method to invoke. I dont want to pass DataTable as parameter as it is newbie programming.
Could you pls help me learn some more advance features.
I searched over it and got to Func< delegate but could not come up with a solution.
hi,
I need to pass a callback function that is CFuncType (ctypes.CFUNCTYPE or ctypes.PYFUNCTYPE...).
How can I cast a python function to CFuncType or how can I create a CFuncType function in python.
I am processing a form and in turn, receiving a response code based on the information submitted. I have a list of approximately 40 response codes (and their meaning) in my hands and am trying to build an 'if' statement that checks against a predefined array and returns a specific value.
Just not sure how to do this
First pass conceptually:
$bads = array (1,2,3,4,5,6)
if ($output['responsecode'] == (any value in $bads) {
echo "you suck";
}
I have a question about idioms and readability, and there seems to be a clash of Python philosophies for this particular case:
I want to build dictionary A from dictionary B. If a specific key does not exist in B, then do nothing and continue on.
Which way is better?
try:
A["blah"] = B["blah"]
except KeyError:
pass
or
if "blah" in B:
A["blah"] = B["blah"]
"Do and ask for forgiveness" vs. "simplicity and explicitness".
Which is better and why?
I want to display Years between From date - To date using oracle SQL on dual table
e.g.
if pass - From date as 1/1/1900 and To Date as 1/1/2000
then it shoold display
1900
1901
-
till
2000
Hi,
is it possible to return a HashMap to R with the rJava extension of R?
E.g. I have a method in Java, which returns a HashMap and I want this HashMap use in R. I tried:
.jcall(javaObj, "Ljava/util/HashMap", "getDbInfoMap")
This doesn't work.
Do I have to put everything into a String[], that I want to pass to R from Java?
Or is there another possibility?
Any help/info on this would be greatly appreciated.
Hello.
I have a programme that has about 100 classes and more than 1000 functions spread over 20 header and source code files. What I want to know is that how I can pass arguments to so many functions in so many files? What is the procedure adopted for this in main()?
Regards,
Supriyo
I am writing a little bit of documentation and code explanation. I would like to copy code from eclipse including line numbers, so that it becomes easier to reference the code in the text.
Is there any way to do this in eclipse or some other IDE, editor?
I am writing a little bit of documentation and code explanation. I would like to copy code from eclipse including line numbers, so that it becomes easier to reference the code in the text.
Is there any way to do this in eclipse or some other IDE, editor?
Is it wise to have include guards around template classes?
Aren't template classes supposed to be reparsed each time you reference them with a different implementation?
N.B In Visual C++ 2008 I get no errors combining the two...
I can't figure out why I get a Object reference not set to an instance of an object. error if I use a ternary operator in my LINQ query.
var courses = from d in somesource
orderby d.SourceName, d.SourceType
select new
{
ID = d.InternalCode,
Name = string.Format("{0} - {1}{2}", d.InternalCode, d.SourceName, (d.SourceType.Length > 0 ? ", " + d.SourceType : string.Empty))
};
Any thoughts?
I was trying pick a name for an interface through which I can pass something into an object like:
If the object is INeedX then SetX(some x) method will be called;
If the object is INeedY then SetY(some y) method will be called;
and so on. (funny as hell, I know :) )
I try to find a different name for this kind of interfaces but I can't figure this out.
Does anybody have an idea how to name the INeedSomething interface ?
I make regular use of forward class declarations and pointers to such classes.
I now have a need to pass a function pointer through a number of layers. I would prefer to include the header that declares my function pointer's prototype only into the module that dereferences a function pointer rather than into each layer that simply passes along that pointer value.
Is this possible?
i have this in the superview:
mySubView = [[MySubView alloc] init];
[self addSubview:mySubView];
[mySubView release];
then at some point later, in the sub view, this:
[self removeFromSuperview];
when i debug it, i notice that the dealloc for the subview is never called, even though i'm fairly sure the reference count should be 0. any ideas why this might be? thanks.
After I add the sound file "do.mp3" to res/raw I get this error:
res\raw\do.mp3:0: error: invalid
symbol: 'do'
And their isn't reference to it in the R class. How do I fix it?