Hey, I'm just wondering how to convert a numerical date into text format in PHP
Example change
06.04.2010 to say April 6th 2010
Is there any function already made?
Is it possible to create a file that will contain its own checksum (MD5, SHA1, whatever)? And to upset jokers I mean checksum in plain, not function calculating it.
The following code does not give a warning with g++ 4.1.1 and -Wall.
int octalStrToInt(const std::string& s)
{
return strtol(s.c_str(), 0, 8);
}
I was expecting a warning because strtol returns a long int but my function is only returning a plain int. Might other compilers emit a warning here? Should I cast the return value to int in this case as a good practice?
Hey, I'm trying to write a program in C# that will track the pressing of certain keys (using a keyboard hook), and send different ones instead.
For instance, when I press the A key it will instead send the Q key.
I used http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx this for my hooks and tried to use the SendKeys function, but I get an exception about the garbage collector destroying some object inside the hook class.
Hey,
I want to include a file to be accessible to any method/function in a PHP class. The file just contains a base-64 encoded variable. How do I do this?
Thanks.
After profiling a large game playing program, I have found that the library function rand() is consuming a considerable fraction of the total processing time. My requirements for the random number generator are not very onerous - its not important that it pass a great battery of statistical tests of pure randomness. I just want something cheap and cheerful that is very fast. Any suggestions?
I'm looking for what the standard, approved, and robust way of stripping invalid characters from strings before writing them to an XML file. I'm talking here about blocks of text containing backspace (^H) and formfeed characters etc.
There has to be a standard library/module function for doing this but I can't find it.
I'm using XML::LibXML to build a DOM tree that I then serialize to disk.
I want to be able to show information (HTML basically) over an image when the mouse rolls over the image... I know there is a .hover() jQuery function but am unsure how to use it to get the desired effect.
Ideally when a user hovers over an image it would "grey out" (e.g. layer of 50% opacity black) with some HTML like a title etc etc.
Can someone point me in the right direction or provide sample code
Thanks
I have a list of tuples, say [{x, a, y}, {x, b, y}].
Is there a built-in function (or can I use a combination of BIFs) to delete all tuples matching {x, _, y}, as in match and delete based on the first and third term in the tuples, ignoring the second?
Do we have a standard way of converting a char* to int (or long) in a strict way, i.e. we should get proper result only if all characters are digits and can fit in an int (or long) -- some way by using strtol etc.. ?
Thus "sbc45", "4590k", " 56", "56 ", should be all invalid using that function.
In my application, if the user saves a file to a folder they don't have permissions for, File.Copy will fail. An example is saving a document to the C:\ root.
Instead of denying access, I'd like to prompt the user to elevate permissions with a UAC prompt, but only for this save function (not for the entire application). Is there a way to do this?
function createXMLHTTP() {
xmlhttp = =new XMLHttpRequest();
return xmlhttp;
}
I'm trying to create 3 instances of this, but it all has the same variable name which is xmlhttp. How can I dynamically create different variable names? I'm not sure if that's the right way to ask the question.
I want to create like xmlhttp1, xmlhttp2, xmlhttp3, so then I can reference each one.
Hi there,
If I have the report name how can I programmatically get the name of the project/folder the report is in?
So for example if I have a report like so
http://server/Reports/Pages/Report.aspx?ItemPath=/ReportProject1/ReportName
Given "ReportName" how can I figure out that the report is in the folder "ReportProject1"?
So I guess is there a function where I can pass int he report name and get it's details or else query the report server for a list of its report folders and I can loop through these and check some how that the report is inside?
re,
I have a simple query that works:
$("#test fieldset input").each(function() { })
However, I want to select "input" and "select" elements without having to write 2 "each" queries. Is this possible?
thanks.
Consider this code:
const char* someFun() {
// ... some stuff
return "Some text!!"
}
int main()
{
{ // Block: A
const char* retStr = someFun();
// use retStr
}
}
My question is in the function sumFun() where is "some Text!!", stored (i think may be in some static area in ROM) and what will be its scope?
Will the memory pointed by retStr be occupied throughout the program or be released once the block A exits?
--
Thanks
Hi. I'm working on a program idea which needs to respond when a particular Function key is pressed on the keyboard(like F10).
(A) is that possible?
(B) what language should i use (i'll be getting the development outsourced, so its not a problem)
(c) any sample code which shows how it works?
I want to create a simple animation, that can only show in a specific area, such as triange. I already have the animation, a rotating picture. but I dont know how to put it into the triangle. the function texture() can only apply images into a specific area. is there other ways to do that? thx!
I have an query like:
SELECT id as OfferId FROM offers
WHERE concat(partycode, connectioncode) = ?
AND CURDATE() BETWEEN offer_start_date
AND offer_end_date AND id IN ("121211, 123341,151512,5145626 ");
Now I want to cache the results of this query using memcache and so my question is
How can I cache an query using memcache.
I am currently using CURDATE() which cannot be used if we want to implement caching and so how can I get current date functionality without using CURDATE() function ?
I'm using dojo.xhrPost to sent Ajax Requests
The call is wrapped by a function sendRequest()
I've now to continuously (every 3sec) send the same ajax Post to the server
How can I implement a Server Poll with Dojo? I basically need to call sendRequest() every 3 secs
I have this code
$("#window").dialog({
resizable: true,
height: 180,
title: titles,
width: 500,
modal: false,
buttons: {
"OK": function () {
$(this).dialog("close");
}
}
});
i am able to get the popup perfectly but the problem I am getting here is..
On the top of the Dialog box I have 'X' I am not able to see that X on dialog popup's but when I resize my window I can able to see..
what I am doing wrong in this?
Thanks for your all help
I'm converting some code written for a linux system to a windows system. I'm using C++ for my windows system and wanted to know the equivalent of the function inet_aton.