Say there is a file called 12345.jpg. In C, how can I get the file extension so that I can compare with some file extension? If there are any inbuilt functions, kindly please let me know.
I am receiving a BASE64 encoded string from a WebService. The string represents an HTML page, and I can use built-in ColdFusion functions to convert and display it. However, I need a GIF representation of the HTML page, and I'm wondering if there's any way to do this using ColdFusion.
When I reading the code of CodeIgniter,I found some functions written as follows:
function &get_instance()
{
global $CI, $OBJ;
if (is_object($CI))
{
return $CI;
}
return $OBJ->load;
}
I can understand variable refrence,but I can hardly get this through.Is it necessary to use this function style?And any benefit?
Thanks.
I have the PID for the process (and the name), I want to bring it to the front on linux (ubuntu). On mac I would simply do SetFrontProcess(pid), on windows I'd enumerate the windows pick out the one I wanted and call SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); but I'm at a loss of what to do on linux. I've looked at X Lib a bit, but most/all of those functions seem to operate on windows inside your process.
Thanks in advanced.
Hi everyone!
Out of curiosity about reverse engineering, I am thinking of writing a simple program (in C++) that takes an executable as input and produces the names of all the functions that were a part of source program of that executable.
Any pointers on how should I go about it?
Step-by-step approach would be much appreciated!
There is a simple application written in C, which uses only standard C library functions (from stdio, stdlib, etc.) and Makefile+GCC to build it. Now, I wanna port it to iPhone OS for iPhone/iPads. Will it be seamless or are there any possible incompatibility issues?
I was wondering why the Vector variable defined within this self executing javascript function doesn't require a var before it? Is this just some other type of syntax for creating a named function? Does this make it so we can't pass Vector as an argument to other functions?
(function() {
Vector = function(x, y) {
this.x = x;
this.y = y;
return this;
};
//...snip
})()
Hi,
when i go with the mouse pointer on the function it doesn't show the location, class...
i have this problem in one of my projects. All is executed ok so the functions are there :).
Build id: 20090920-1017
Any idea?
Javi
I have a class defined called extBlock.
I then make an instance of that class with this
extBlock mainBlock = new extBlock(1, 1024);
I get this error:
error C2440: 'initializing' : cannot convert from 'extBlock *' to 'extBlock'
Can anyone help me with why I am getting this error.
I have seen examples online of declaring it like this with a pointer
extBlock *mainBlock = new extBlock(1, 1024);
But if I do it this way it does not let me call the functions of mainBlock
I have a full path to an image, which I am using jquery to read, in the form $('img.my_image').attr('src') however I just want the filename portion (discarding the path).
Are there any built-in functions to do this, or would a regex be the only option?
I tried doing tutorials but it is unorganized and unstructured, where can I learn PHP from beginner to master? I'm looking for a site like www.w3chools.com, but somehow I feel it is incomplete, specially when it comes to more advanced functions.
I know some basics but I wouldn't be able to for example make a secure online webstore, and I seem to be stuck at this point, how / where should I proceed?
I am writed an automated test in Selenium IDE to test one of our applications. Our app throws one of those confirmation dialogs "Are you sure you want to continue."
Click OK or Cancel
Selenium does not support the clicking of these dialog boxes. I have
tried the following SeleniumIDE functions with no success:
chooseOkOnNextConfirmation
chooseOkOnNextConfirmationAndWait
Is there a javascript funtion I can call within SeleniumIDE to do
this, or am I out of luck.
Hello
I wonder if you could automatically generate header header class functions automatically for a given package (make a batch processing) ..?
Thank you.
What I mean is, can any C code be implemented via C++? Maybe just simply change a compiler?
I know C is much more efficient and concise. But despite of these, can C++ used to implement all functions that are implemented by C?
Why would I want to have pointer parameters? The only reason I can see is for small functions to attempt to reduce confusion and a smaller memory footprint.
Title says it all really. Using only XSLT 1.0's string functions, how would I go about slicing off the end of a url?
So from
http://stackoverflow.com/questions/2981175/is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0
I would like to extract
is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0
Is this possible?
C doesn't have (to the best of my knowledge) overloading or templates, right? So how can a set of type-agnostic functions with the same name exist in plain ol' C? The usual compile-time trickery would involve a whole bunch of macros, wouldn't it?
I've bounced around between different wrappers, my own, and using straight php mysql functions over the years but I'm sure there's a really good solution out there. What is it? :)
EDIT: Only needs to connect to MYSQL and it would be nice if it was lightweight.
I need to write AVL-tree with generic type in C. The best way I know is to use [ void* ] and to write some functions for creating, copying, assignment and destruction. Please, tell me some better way.
When you use meshgrid to plot data (using meshgrid itself not one of the other plotting functions), how do you change the color to grayscale or black and white? Also, how do you get rid of the "meshy" look of the image?
I'm creating a WinForm application in C# and one of its functions is displaying text in text boxes. I'm coding the logic for querying a database in a separate class and am unable to access the text box element in the class I'm creating (I'm getting a "name" does not exist in the current context error). Do I put all of my form logic into my Form1.cs file?
Hi ,
Am working in the classes and object class structure , but not extream level ,
Just class and function , then in one place instantiation . that's it , not much big functions
like __construct etc ,
Please tell me very simply ,
1.what is th purpose of constructor ad destructor ,
But i know theoretical explanation school level ,
But i am expecting something like in real time , which situation we have to use, and is
there any example for that please tell me,
Regards
Hi,
I am working with classes and object class structure, but not at a complex level – just classes and functions, then, in one place, instantiation.
As to __construct and __destruct, please tell me very simply: what is the purpose of constructors and destructors?
I know the school level theoretical explanation, but i am expecting something like in real world, as in which situations we have to use them.
Provide also an example, please.
Regards
Hello all,
I am trying to raise a click event on a submit button in a html form.
I use the .click() jquery to catch the click event and return true at the end of the function.
When I click on the submit button, the jquery functions are raised and a callback is executed, but the $_POST array is empty.
How can I fix this?
I have a method that effectively takes a string. However, there is a very limited subset of strings I want to use. I was thinking of typedef'ing std::string as some class, and call the functions explicit. I'm not sure that would work, however. Ideas?