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 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 all,
I found this structure called OBJECT_ATTRIBUTE in one of the nt dll functions..I was curious to know about that structure and I went through its documentation(msdn)...In the OBJECT_ATTRIBUTE structure there is a parameter called PUNICODE_STRING objectName...As per the msdn documentation..it says that the objectName "the name of the object for which a handle is to be opened" which is actually a name or some root directory,am confused with this.Can anybody explain this term "name of the object"(root directory).what it represents.
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
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.
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?
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!
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 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.
if anyone fancies doing me a really quick favour, it would be really appreciated:
static function make_url_safe($z){
$z = strtolower($z);
$z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z);
$z = str_ireplace(' ', '-', $z);
return $z;
}
what js functions should i be looking at to convert this function to javascript?
In NumPy functions, there are often initial lines that do checking of variable types, forcing them to be certain types, etc. Can someone explain the point of these lines? What does subtracting a value from itself do?
t,w = asarray(t), asarray(duty)
w = asarray(w + (t-t))
t = asarray(t + (w-w))
I need to write a recursive function that can add two numbers (x, y), assuming y is not negative. I need to do it using two functions which return x-1 and x+1, and I can't use + or - anywhere in the code. I have no idea how to start, any hints?
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?
Hello
I wonder if you could automatically generate header header class functions automatically for a given package (make a batch processing) ..?
Thank you.
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 created a new user and made it part of a certain group which has full access (777) to a folder. Checked the user in Samba, password the same as his Windows (XP) password, rebooted his desktop but he didn't have access to the folder. Checked the Samba group and config file and the user was defined as a member of the group. It didn't make sense and I then did something else for a while. When I tried again, without doing anything further about it, the user had access to the folder. I did restart the Samba server after my original changes.
Thanks in advance.
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?
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.
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
})()
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.
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
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?
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 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.