instruction stringlengths 0 30k ⌀ |
|---|
I was given an Oracle database backup (.dmp file), which was created with expdp. Besides this I have no information about the file.
I need to inspect the .dmp file and list all of the schemas in it, how do i do that?
One constraint, I cannot restore the entire database within the backup.So to import the backup ... |
- I have a Oracle database backup file (.dmp) that was created with expdp.
- The .dmp file was an export of an entire database.
- I need to restore 1 of the schemas from within this dump file.
- I dont know the names of the schemas inside this dump file.
- To use impdp to import the data i need the name of the... |
- I have a Oracle database backup file (.dmp) that was created with expdp.
- The .dmp file was an export of an entire database.
- I need to restore 1 of the schemas from within this dump file.
- I dont know the names of the schemas inside this dump file.
- To use impdp to import the data i need the name of the... |
Terracotta is closer to a "tiered" model - all client applications talk to a Terracotta Server Array (and more importantly for scale they don't talk to one another). The Terracotta Server Array is capable of being clustered for both scale and availability (mirrored, for availability, and striped, for scale).
In any... |
How would you set up an Subversion repository for in house software projects |
|svn|version-control|database|sourcecode| |
I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or ... |
|database|svn|version-control|sourcecode| |
I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or ... |
I wonder if anyone can think of a good technique to enable any arbitrary section of an aspx page (say, the contents within a specified DIV tag) to be able to be called and displayed in an ajax modal popup? (So, only a certain section of the page would be displayed)
For example:
1) You have a large application wit... |
Distributed version control systems (DVCSs) solve different problems than Centralized VCSs. Comparing them is like comparing hammers and screwdrivers.
[Centralized VCS][1] systems are designed with the intent that there is One True Source that is Blessed, and therefore Good. All developers work (checkout) from tha... |
I agree with @Bradley.
XML is very slow and not particularly useful as a storage format. Why bother? Will you be editing the data by hand using a text editor? If so, XML *still* isn't a very convenient format compared to something like YAML. With something like SQlite, queries are easier to write, and there's a ... |
PLY: Token shifting problem in C parser |
|python|parsing|yacc|ply| |
I'm writing a C parser using PLY, and recently ran into a problem.
This code:
typedef int my_type;
my_type x;
Is correct C code, because my_type is defined as a type previously to
being used as such. I handle it by filling a type symbol table in the
parser that gets used by the lexer to differentiate ... |
I'm writing a C parser using PLY, and recently ran into a problem.
This code:
typedef int my_type;
my_type x;
Is correct C code, because my_type is defined as a type previously to
being used as such. I handle it by filling a type symbol table in the
parser that gets used by the lexer to differentiate ... |
I'm writing a C parser using PLY, and recently ran into a problem.
This code:
typedef int my_type;
my_type x;
Is correct C code, because my_type is defined as a type previously to
being used as such. I handle it by filling a type symbol table in the
parser that gets used by the lexer to differentiate ... |
What are the best tools for reverse engineering z80 machine code? |
|assembly|reverse-engineering|z80| |
Unfortunately there is no way to 100% guarantee that a pointer to anything is still valid, except by meticolously writing the correct code. |
I don't think there are any other complete guidelines. But if you are not talking about the spacing/positioning of components (I don't think that part of Look And Feel Design Guidelines is outdated), but only about the look and feel good starting points are singlabx / swingx:
http://swinglabs.org
http://swinglabs... |
I agree with the other points made here "If you can get out of creating controls dynamically, then do so..." (by @<a href="http://stackoverflow.com/users/11559/jesper-blad-jensen-aka-deldy">Jesper Blad Jenson aka</a>) but here is a trick I worked out with dynamically created controls in the past.
The problem becomes... |
Of course a function can "own" another function. this is ECMAScript remember. Just declare a variable inside your function and assign a function to it. You can then call your function by using the "call" method.
function foo()
{
trace("foo");
var bar = function()
{
trace("bar");
};
bar.call();
}... |
Iglekott's idea is a good one, with a caveat:
Be careful with compare-by-hash if your data is likely to get attacked. It is not currently computationally feasible to generate a hash collision for a specific MD5 value, but it is possible to generate two different inputs that will produce the same MD5 (therefore not t... |
This sounds like a place to use "compile time polymorphism" or template policy parameters.
See Modern C++ Design by Andrei Alexandrescu and his [Loki][1] implementation based on the book. See also the [Loki][2] page at wikipedia.
[1]: http://sourceforge.net/projects/loki-lib/
[2]: http://en.wikipedia.org/... |
What are the pros and cons of using RMI or JMS between web and business tiers? |
|jakarta-ee|jms|remoting| |
For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of different approaches like remote RPC or messaging, aside from the basic sync/async aspects? |
|jakarta-ee|remoting|jms| |
For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects? |
There are nasty, compiler-specific tricks for getting at class information at runtime. Trust me, you don't want to open that can of worms.
It seems to me that the only serious way of doing this would be to use conditional compilation on each of the derived classes. Within the #ifdef block, define a *new* constant ... |
$_SESSION items are stored in the session, which is, by default, kept on disk. There is no need to make your own array and stuff it in a 'dataentry' array entry like you did. You can just use $_SESSION['pcode'], $_SESSION['modules'] and so on.
Like I said, the session is stored on disk and a pointer to the session i... |
DDD usually prefers the repository pattern over the active record pattern you hint at with Customer.Save.
One downside in the Active Record model is that it pretty much presumes a single persistence model, barring some particularly intrusive code (in most languages).
The repository interface is defined in the dom... |
One approach I've heard of is to make a versioned insert only model where no updates ever occur. During selects the version is used to select only the latest rows. One downside I know of with this approach is that the database can get rather large very quickly.
I also know that some solutions, such as FogBugz, don't... |
I googled a bit and found this link:
http://weblogs.asp.net/steveschofield/archive/2008/09/04/iis6-to-iis7-migration-tips-tricks.aspx
Biggest Issue i find is that 3rd party components needs to have 64bit version ready to get most of benefits.
|
Add -lm to the command when you call gcc:<br>
gcc -Wall -D_GNU_SOURCE blah.c -o blah -lm
This will tell the linker to link with the math library. Including math.h will tell the compiler that the math functions like sqrt() exist, but they are defined in a separate library, which the linker needs to pack with your e... |
John C is the closest, but XPath is case sensitive, so the correct XPath would be:
/bla/a[contains(@prop, 'Foo')]
|
Honestly, it's one of those things that you just get better at with time. Read as much as you can to know what's possible. Some things will take a while to really understand. I was scared off by sub queries for a long time until I pretty much had no choice but to use them.
When you get more experiance and need to... |
One way I have done it in the past was to make sure my data was abstracted well in the data tier and then use separate middle tier models to pull what was appropriate. In my case the application was a weather application and the display methods of the target devices were really limited so we opted to only show the user... |
Python-passing variable between classes |
|python|wxpython|variables|oop| |
I'm trying to create a character generation wizard for a game. In one class I calculate the attributes of the character. In a different class, I'm displaying to the user which specialties are available based on the attributes of the character. However, I can't remember how to pass variables between different classes.
... |
|python|oop|variables|wxpython| |
I'm trying to create a character generation wizard for a game. In one class I calculate the attributes of the character. In a different class, I'm displaying to the user which specialties are available based on the attributes of the character. However, I can't remember how to pass variables between different classes.
... |
A particular assembler/disassembler or something else entirely? |
There is the possibility to precompile the whole web: usually the pages only get compiled, if they are used.
To precompile the web, please refer to [MSDN][1]
[1]: http://msdn.microsoft.com/en-us/library/ms227972.aspx |
No, but since the assignment itself is an expression, you can use the assignment as the conditional expression for the if statement.
<pre>
if (($value = md5(..)) == $somemd5) { ... }
</pre> |
No, but since the assignment itself is an expression, you can use the assignment as the conditional expression for the if statement.
<pre>
if (($value = md5(..)) == $somemd5) { ... }
</pre>
In general, though, you'll want to avoid embedding assignments into conditional expressions:
* The code is denser and th... |
About 1000 of what? Single row writes? Multiple row transactions? Deletes?
A general tip would be to place the data files and log files on seperate physical drives. SQL Server keeps track of every write to the log so having those in different drives should give you a general better performance.
But SQL Server tun... |
Here's one example:<br />
[CSS Imahe gallery](http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/)
Here's another:<br />
[Cross Browser Multi-Page Photograph Gallery](http://www.cssplay.co.uk/menu/lightbox.html)
And another one...<br />
[A CSS-only Image Gallery: Explained](http://designsignat... |
std::list will not invalidate any iterators, pointers or references when you add or remove things from the list (apart from any that point the item being removed, obviously), so using a list in this way isn't going to break.
As others have pointed out, you may want not want to be handing out direct access to the pri... |
Most powerful disassembler - [IDA][2] supports z80.
Also list of disassemblers published at "[Software Development Tools for Z80 Family][1]" page
[1]: http://www.z80.info/z80sdt.htm
[2]: http://www.hex-rays.com/idapro |
Done! An hour ago, I uploaded CAM::PDF v1.50 to CPAN. It now supports PDF v1.5 compressed object streams and cross-reference streams. I've tested it with a few PDF files that I found online, but I'd sure appreciate feedback (good or bad). |
I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or ... |
How would you organize a Subversion repository for in house software projects |
|database|svn|version-control|source-code| |
I would take a spare box, install a continuous integration server ([Hudson][1] or [CruiseControl][2] in the Java world) and set up a job that builds the code whenever someone checks in some code.
You can either try to convince your coworker or just wait until someone breaks the build. In the latter case, just send t... |
I would take a spare box, install a continuous integration server ([Hudson][1] or [CruiseControl][2] in the Java world) and set up a job that builds your application each time someone checks in some code.
You can either try to convince your coworker or just wait until someone breaks the build. In the latter case, ju... |
This PHP snippet will change the collation on all tables in a db. (It's taken from <a href="http://www.webhostingtalk.com/showthread.php?t=682119">this site</a>.)
<?php
// your connection
mysql_connect("localhost","root","***");
mysql_select_db("db1");
// convert code
$res = mysql_... |
How do I avoid having the database password stored in plaintext in sourcecode? |
Yes it is a very good idea. One could argue that it should have been disabled by default by Microsoft, just like caching.
To see how bad Viewstate is in terms of size increased you can use a tool called [Viewstate Analyzer][1]. This is particularly useful when you have an existing application developed with Viewstat... |
Hash Code implementation |
|java| |
How do we decide on the best implementation of hashcode method for a collection?(assuming that equals method has been overridden correctly) |
|java|hash| |
I highly recommend www.mozy.com. Their software is easy and works great, and since it's stored on their servers you implicitly get offsite backups. No worrying about running a backup server and making sure it's working. Also, the company is backed by EMC (a leading data storage product company), so gives me enough c... |
No. Unless you use something like reference counting or a garbage collector to make sure no object will be freeed before they have zero references.
Delphi can do reference counting for you if you use interfaces. Of course Delphi for .Net has a gargage collector.
As mentioned you could use the knowledege of Delphi... |
As others have said, you don't need to implement a finalizer unless you're directly holding unmanaged resources. Also, assuming you're working in .NET 2.0 or later, it's unlikely you'll ever need to implement a finalizer because typically SafeHandle can be used to wrap your unmanaged resources.
I wrote a [fairly lon... |
Potential legal issues with storing Social Security/Insurance Numbers (SSNs/SINs)? |
|security|legal| |
A client using our system has requested that we store the SSNs/SINs of the end users in our database. Currently, we store minimal information about users (name, email address, and optionally, country), so I'm not overly concerned about a security breach - however, I have a suspicion there could be legal issues about st... |
I want to ditch my current editor. I feel I need some thing else. That do not expose my hands to the risk of RID(repetitive injury disorder, help!). I need to se why I should change editor. And it would be nice to believe, that I will be coding when I'm 80 years old.
All the big guys out there are using Vim. The onl... |
I want to ditch my current editor. I feel I need some thing else. That do not expose my hands to the risk of RSI. I need to se why I should change editor. And it would be nice to believe, that I will be coding when I'm 80 years old.
All the big guys out there are using Vim. The only Emacs guy I know are RMS. Paul Gr... |
|editor|vim| |
I want to ditch my current editor. I feel I need something else. That do not expose my hands to the risk of RSI. I need to see why I should change editor. And it would be nice to believe, that I will be coding when I'm 80 years old.
All the big guys out there are using Vim. The only Emacs guy I know are RMS. Paul Gr... |
|vim|editor| |
I want to ditch my current editor. I feel I need something else. That do not expose my hands to the risk of RSI. I need to see why I should change editor. And it would be nice to believe, that I will be coding when I'm 80 years old.
All the big guys out there are using Vim. The only Emacs guy I know are RMS. Paul Gr... |
I may be missing something, but couldn't you do a switch statement on the type instead of the String? That is,
switch(childNode.Type)
{
case Bob:
break;
case Jill:
break;
case Marko:
break;
} |
Use it every time you override a method for two benefits. Do it so that you can take advantage of the compiler checking to make sure you actually are overriding a method when you think you are. This way, if you make a common mistake of misspelling a method name or not correctly matching the parameters, you will be wa... |
[CSS Playground][1] uses pure CSS for this type of thing, one of the demos is surely to help you and as it's all CSS just view source to learn - you probably want to use the :hover pseudo class but there are limitations to it depending on your browser targeting.
[1]: http://www.cssplay.co.uk |
Can I check if a SOAP web service supports a certain WebMethod? |
|asp.net|web-services|soap| |
Our web services are distributed across different servers for various reasons (such as decreasing latency to the client), and they're not always all up-to-date. Rather than throwing an exception when a method *doesn't* exist because the particular web service is too old, it would be nicer if we could have the client ch... |
I've tested these out with Django 1.0:
The "or" queries:
Blog.objects.filter(tags__name__in=['tag1', 'tag2']).distinct()
or you could use the Q class:
Blog.objects.filter(Q(tags__name='tag1') | Q(tags__name='tag2')).distinct()
The "and" query:
Blog.objects.filter(tags__name='tag1').filter(ta... |
It depends on what operating system your in, there are a lot of good tools here:
[http://www.z80.info/z80sdt.htm][1]
The first program I ever wrote was in Z80 Assembly language.
[1]: http://www.z80.info/z80sdt.htm
|
In 99% of the cases, the difference in performance is negligible. The main advantage of classes is that the code produced by OOP is better and easier to understand than procedural code.
I'm not sure in what language you're coding - note that in C# the major difference between classes and structs is that structs are ... |
mySQL: Advisable number of rows |
|mysql|performance|optimization|database-design| |
Considering an indexed mySQL table with 7 columns, being constantly queried and written to, what is the advisable number of rows that this table should be allowed to contain before the performance would be improved by splitting the data off into other tables? |
To be completely honest, maybe you don't need to use XQuery at all.
If you need to transform moderately complex XML documents from XML to HTML, I would recommend using XSL. Personally, I found XSL easier to learn than XQuery. There are also a larger number of examples and tutorials available online because XSL h... |
Get the WSDL (append ?wsdl to the URL) - you can parse that any way you like. |
I know this is a dumb question. For some reason my mind is blank on this. Any ideas?
Sorry should have been more clear.
Using a HtmlGenericControl to pull in link description as well as image.
<code>
private void InternalCreateChildControls()
{
if (this.DataItem != null &&... |
The correct answer seems to be, "Yes, mostly."
1. John's answer referencing the CLI spec indicates that accesses to variables not larger than 32 bits on a 32-bit processor are atomic.
2. Further confirmation from the C# spec, section 5.5, [Atomicity of variable references](http://msdn.microsoft.com/en-us/library/aa... |
The correct answer seems to be, "Yes, mostly."
1. John's answer referencing the CLI spec indicates that accesses to variables not larger than 32 bits on a 32-bit processor are atomic.
2. Further confirmation from the C# spec, section 5.5, [Atomicity of variable references](http://msdn.microsoft.com/en-us/library/aa... |
|language-agnostic|passwords|database-connection|sourcecode| |
In the web-application I'm developing I currently use a naive solution when connecting to the database:
Connection c = DriverManager.getConnection("url", "username", "password");
This is pretty unsafe. If an attacker gains access to the sourcecode he also gains access to the database itself. How can my web-ap... |
|language-agnostic|passwords|source-code|database-connection| |
public void PrintAllSuits()
{
foreach(string suit in Enum.GetNames(typeof(Suits)))
{
Console.WriteLine(suit);
}
} |
A [state machine][1] seems like the logical place to start, and using WF if you can swing it (sounds like you can't).
You can still implement one without WF, you just have to do it yourself. However, thinking of it like a state machine from the start will probably give you a better implementation then creating a pr... |
If you need to access the data more than once, load it into a database. Most databases have some sort of bulk loading utility. If the data can all fit in memory, and you don't need to keep it around or access it that often, you can probably write something simple in Perl or your favorite scripting language. |