I've got an XImage retrieved by XShmGetImage function. How can I resize it? Is there any function in X11 libraries to perform this operation or I need to use external library?
I have some security related service running on my machine (start type = automatic)
In the service control manager, the stop/restart commands are grayed out.
I was wondering how can I develop such service for which the stop operation is disallowed.
Note that I am logged in as an administrator
I have got a simple MySQL table and primary index (id) is not numbered one by one (1, 31, 35, 100 etc.). I want them to be numbered like (1, 2, 3, 4). Please tell me how to do it. I would also like to point that I am aware of possible consequences of the operation, but I just want to tidy up the table.
When I look back my codes that written earlier time, I found something terribly bad.
Whenever I want to delete a record in the database, I did like this :
$.post("deleteAction.do",{recordId:10});
I cannot prevent a malicious user visit my database operation url directly :
deleteAction.do?recordId=10
What's the solution for this kind of problem ?
I was wondering if anyone new how to get access the metadata (the date in particular) from jpg, arw and dng files.
I've recently lost the folder structure after a merge operation gone-bad and would like to rename the recovered files according to the metadata.
I'm planning on creating a little C++ app to dig into each file and get the metadata.
any input is appreciated.
( alternatively, if you know of an app that already does this I'd like to know :)
MethodInfo mi = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(notify, null);
This throws the following exception:
{"Exception has been thrown by the target of an invocation."}
With the following inner exception:
"Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on."
If I comment out a line of code that sets the images for the context menu entries then it stops throwing the exception.
Any ideas?
Hi,
I seem to not be able to find implementation from the common Ajax libraries (JQuery, mootools, prototypejs...) that would allow the operation of parsing the window.location.href for request parameter. I would expect something like:
$P{"param1"} == "param1_value"
Am I missing something?
p.s. The web does contains implementation examples for such operations
In mysql, how do I get the primary key used for an insert operation, when it is autoincrementing.
Basically, i want the new autoincremented value to be returned when the statement completes.
Thanks!
Hello every one,
I want to change the row selection by shaking my iphone.
i.e. as soon as I shake my iphone, the next row should be selected of tableview. And according to that another operation should be perform.
can any one tell???
I'm developing an application for iOS in Xcode 4.5 but I have a problem with a UIWebView. I want to set a header(BASE64 code) to skip a login part. When I try this, using the NPWebView project the webview always fails with an error which looks like this:
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x6ace650 {NSErrorFailingURLKey="MY URL", NSErrorFailingURLStringKey="MY URL"}
I hope someone can help me!
Wondering why a particular binary write operation in VB is so slow. The function reads a Byte array from memory and dumps it into a file like this:
Open Destination For Binary Access Write As #1
Dim startP, endP As Long
startP = BinaryStart
endP = UBound(ReadBuf) - 1
Dim i as Integer
For i = startP To endP
DoEvents
Put #1, (i - BinaryStart) + 1, ReadBuf(i)
Next
Close #1
For two megabytes on a slower system, this can take up to a minute. Can anyone tell me why this is so slow?
I have table that gets dynamically created.
When using jQuery and toggle, everything works. I however get a small visual glitch - it seems the HTML sometimes get selected. How would I disable this on a faulty drag or mouse operation?
Is there a difference in the DOM between text in a cell and 'not text' or buffered space in a td?
Thanks in advance.
The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data:
if table t has a row exists that has key X:
update t set mystuff... where mykey=X
else
insert into t mystuff...
Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this?
Hello, I want to do someoperations after click on row, except td with class='someClass'
$('#mainTable tr td:not([class=someClass])').unbind().live('click',function ()
{
//some operation
});
what is wrong?
note: this td is not last td in table.
I cannot SSH into my instance - Operation timed out. What could be the reasons why, and what can I do to resolve it? Rebooting normally takes a long time to take effect, and might just makes things worst
UPDATE: It is not about permissions - i can log in normally just fine. I suspect it might be because of memory issues
I never need to store objects in a hash table. The reason is twofold:
coming up with a good hash function is difficult and error prone.
an AVL tree is almost always fast enough, and it merely requires a strict order predicate, which is much easier to implement.
The Equals() operation on the other hand is a very frequently used function.
Therefore I wonder whether it is necessary to implement GetHashCode (which I never need) when implementing the Equals function (which I often need)?
Hi,
How can i copy multiple char* variables into one char* at single instance operation.
say i have
char* text1 = "Hello";
char* text2 = "World";
i want to copy text1, text2 and '2' and "12345" into char* text3 in single function call.
Given all the smarts around Hibernate and it's various caching strategies, how do I know if a certain operation is resulting in a physical database hit, or coming from the cache?
I know that FTP does not support transferring and retaining file date/time stamps
Wondering if anyone has any ideas/scripts (Shell/perl) that would retain a transfered file's timestamp after a put operation?
Hi!
I want to add some style to head tag in html page using javascript.
var h = document.getElementsByTagName('head').item(0);
h.innerHTML += '<style>a{font-size:100px;}</style>';
But when I run this code in IE8 I see this error message:
Could not set the innerHTML property. Invalid target element for this operation.
Any ideas?
The windows service I am writing will need to run some processor intensive operations once in a while (sound encoding wav - mp3) on a machine that takes part in real time voice communication (so I cannot just run them any-time).
What would you check (what counters maybe) before running such operation?
Can you point me to any good articles?
i have a j2me application ,
it does the File IO operation, but every time it performs it , it asks user for permission.
is there any way to bypass it?
i heard that suppose if i make this application certified then i would be able to run it in max. secure mode to bypass such issues.
Is there a better way of doing this:
val totalScore = set.foldLeft(0)( _ + score(_) )
or this:
val totalScore = set.map(score(_)).sum
I think it's quite a common operation so was expecting something sleeker like:
val totalScore = set.sum( score(_) )