Suppose I want to declare and define a variable with an if condition block. Will this compile in all compilers?
What does the C standard say about this?
Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however.
To this end I have created numerous:
#ifdef DEBUG
fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr);
#endif
So I just need to match these ptr addresses that are displayed with the addresses of non-freed memory.
How can I get valgrind to tell me the address of each non-freed block of memory?
Talking about javax.crypto.Cipher;
I was trying to encrypt data using Cipher.getInstance("RSA/None/NoPadding", "BC"); but I got the exception: ArrayIndexOutOfBoundsException: too much data for RSA block
Looks like is something related to the "NoPadding", so, reading about padding, looks like CBC is the best approach to use here.
I found at google something about "RSA/CBC/PKCS#7", what is this "PKCS#7"? And why its not listed on sun's standard algorithm names?
I have a SqlServer db that I would like to port to MySQL. What's the best way to to this. Things that need to be ported are:
- Tables (and data)
- FileStream -- MySQL equivalent?
- Stored Procedures
- Functions
There is a specific activity I want to execute even after exception has thrown, just like a try{}finally{} block.
Is it possible in sequential workflow using WF v3.5?
I have to retrieve an ID and last_name from my table, but my ID is not continuous and there no pattern for the gaps. How do I write a PL/SQL anonymous block for this?
I have some code that will be logging using the Logging Application Block in Enterprise Library 5.0 from different threads. Is the LAB thread safe? Can I log like normal from different threads or will I need to synchronize the logging code so that is only used from one thread at a time?
I am using the Logging Application Block (of Microsoft Enterprise Library 5.0) to log exceptions in the Event Viewer that occur in my WPF XBAP application.
However, exceptions are only being logged if the application is run on my machine (the machine it was built on). Any other machine it doesn't log anything.
I've tried to find a reason why this might be occurring - I've tried setting requirePermission to false - but to no avail.
Anyone any ideas on why this might be happening?
The following PHP code will output 3.
function main() {
if (1) {
$i = 3;
}
echo $i;
}
main();
But the following C code will raise a compile error.
void main() {
if (1) {
int i = 3;
}
printf("%d", i);
}
So variables in PHP are not strictly block-scoped?
Can I write my owm template in TextFormatter used in Logging Application Block in C#?
Basically I want to write my exception log in atext file and in specific format where I want to include database information and software version.
If I wanted to do something like this:
collection.each do |i|
return nil if i == 3
..many lines of code here..
end
How would I get that effect? I know I could just wrap everything inside the block in a big if statement, but I'd like to avoid the nesting if possible.
I'm using the 3.5 library for microsoft code contracts
public object RetrieveById(int Id)
{
Contract.Ensures(newObject != null, "object must not be null");
return newProject;
//No error message if I move the Contract.Ensures to here
//But it isn't asserting/throwing a contract exception here either
}
I get the compiler message:
"Error 18 Contract section within try block in method 'Controller.RetrieveById(System.Int32)'
How can I port an application based on OS X to Linux? It is closed source and working in Windows either. It is not wrriten in Objective C and doesn't use Cocoa.
Thank you.
Hi.
I have a process where one of the things to do is to capture the output from a print into a file for further processing. For this I have configured a "FILE:" printer port which works very nicely but asks everytime for the file name to use.
Unfortunately "FILE" is not a very descriptive word when trying to use a search engine :(
Is there a small driver somewhere which does exactly the same as the FILE: driver, but can automatically generate a filename (perhaps based on a pattern) and just print to that?
I want to sort this block on date column:
["domain1.com" 18-Jan-2011 #"^/"
"domain2.com" 20-Aug-2011 #"^/"
"domain3.com" 23-Dec-2011 #"^/"
"domain4.com" 22-Sep-2011 #"^/"]
I can't see how to really do so with sort/skip function explained here, it's not crystal clear for me:
http://www.rebol.com/docs/words/wsort.html
Hey SO
Doing a some practice questions for exam tomorrow can't figure out this one
What is the minimum number of socket port(s) required for a TCP server to connect a TCP client for communication?
Surely its just two right? one for the server one for the client, but this seems to obvious. My mates thinks TCP uses two ports at the server end for for data in and one for data out.
thanks in advance
I have a form that I use JQuery, I don't think I need to put code in this post, the question is pretty basic.
But I would like to block the form from submitting when people press the Enter Key or the Return Key.
At the same time, I have textareas, where the user will need to be able to press the Enter / Return keys.
Suppose my template has in it something like {% block subject %}my subject{% endblock %} and I load this template with tmpl = loader.get_template('mytemplate.html'), how can I extract "my subject"?
I want to blockport 80 in such a way that whenever user clicks on IE the pop-up window should display to enter required information and once he enter's required information and it is valid then and then only he vl be able to access internet so anybody help me....................using C#.NET
Hi,
I was wondering if I can add a block to my a specific view.
Apparently I can only add blocks to a "Page" template or to the generic "View template".
I actually want to add it to only 1 specific View of my website.
thanks
My Understanding
Static block is executed during class loading, If a class is already loaded then there is no way to load the class other than class reloading
Doubt/Question
1) Is there any time JVM reloads the class?
My Understanding
In Class Loading JVM loads source of the Java file, so it can not keep all thousands files source is a memory, it should discard the rarely used code and reload again when it is necessary and during reload JVM is not initializing static variables and locks again(may be using some tracking mechanism)
Doubt/Question
2) If my above understanding is incorrect then please correct me
I have a Plone product that uses collective.lead to configure SQLAlchemy, including an in-Plone database configuration interface as documented in Professional Plone Development. How should I port this to z3c.saconfig? Will I be able to keep the in-ZODB configuration or will it need to go into site.zcml?