instruction stringlengths 0 30k ⌀ |
|---|
Is there a way to parser a SQL query to pull out the column names and table names? |
|sql|parser| |
I have 150+ SQL queries in separate text files that I need to analyze (just the actual SQL code, not the data results) in order to identify all column names and table names used. Preferably with the number of times each column and table makes an appearance. Writing a brand new SQL parsing program is trickier than is se... |
Can you connect to the SQL Server via Management Studio from a different machine? This might help you narrow down whether it is the SQL Server configuration or you connection string configuration. |
I believe this answers your question:
[http://www.codeproject.com/KB/cs/genericnumerics.aspx][1]
[1]: http://www.codeproject.com/KB/cs/genericnumerics.aspx |
I've been using <b> for years to indicate key words on my web site. I wrote a small utility that crawls the site looking for <b> tags and adds them to an index. I use <strong> when I want to bold a word without adding it to the index. I have used this convention for years -- too late to quit now. |
I usually just type:
gcm notepad
or
gcm note*
gcm is the default alias for Get-Command.
On my system, gcm note* outputs:
[27] » gcm note*
CommandType Name Definition
----------- ---- ... |
Best I've found is org.apache.xbean.classloader.JarFileClassLoader
Here's a short method I've used in the past, to create a class loader from all the lib files in a specific directory
public void initialize(String libDir) throws Exception {
File dependencyDirectory = new File(libDir);
File[] files = dep... |
You can definitely do what you want with Python. <a href="http://docs.python.org/ext/embedding.html">Here are the docs on embedding Python into an application.</a> I'm pretty sure Lua would work too, I'm just less familiar with it.
You're describing cooperative multi-tasking, where the script needs to call a Break... |
Recheck the surface area configuration, and make sure TCP/IP connections are allowed. |
Analyzer for Russian language in Lucene and Lucene.Net |
|.net|java|lucene| |
Did you look through your httpd.conf file to see what rules are in place for what is being served? Alternatively, are there .htaccess files that may be changing what is being served? You might have templates exposed in one or the other, but not sites... that's the first thing that comes to mind.
I would suggest go... |
I would assume that this is because Vista runs most applications in isolation from either other.
I would recommend that you either set the DMZ username and password to match the internal domain username and password, or use named pipes to connect. |
I would recommend using the BIGINT data type as this goes up to 9,223,372,036,854,775,807.
SQL Server does not support signed and unsigned values. |
Would Google Gears work here? Yes, users have to install something, but I think the experience is fairly frictionless. And once it's installed, no more worries. |
The 32 bit version... :-) Handles 1 <= count <= num_words
#include <stdio.h>
unsigned int array[] = {0x12345678,0x9abcdef0,0x12345678,0x9abcdef0,0x66666666};
int main(void) {
int count;
unsigned int *from, *to;
from = &array[0];
to = &array[0];
count = 5;
... |
The 32 bit version... :-) Handles 1 <= count <= num_words
#include <stdio.h>
unsigned int array[] = {0x12345678,0x9abcdef0,0x12345678,0x9abcdef0,0x66666666};
int main(void) {
int count;
unsigned int *from, *to;
from = &array[0];
to = &array[0];
count = 5;
... |
The 32 bit version... :-) Handles 1 <= count <= num_words
#include <stdio.h>
unsigned int array[] = {0x12345678,0x9abcdef0,0x12345678,0x9abcdef0,0x66666666};
int main(void) {
int count;
unsigned int *from, *to;
from = &array[0];
to = &array[0];
count = 5;
... |
Isn't [Rhino Shell][1] what you are looking for?
[1]: http://developer.mozilla.org/en/Rhino_Shell |
I don't know a method for tracking statements through time in subversion.
It is simple however to see when any particular line in a file was last changed using svn blame.
From:
http://svnbook.red-bean.com/en/1.0/re02.html
Synopsis
svn blame TARGET...
Description
Show author and revision information i... |
Here's the Java solution, although it really just returns one String with the results from running 'whois':
import java.io.*;
import java.util.*;
public class ExecTest2 {
public static void main(String[] args) throws IOException {
Process result = Runtime.getRuntime().exec("... |
Here's the Java solution, which just opens up a shell and runs `whois`:
import java.io.*;
import java.util.*;
public class ExecTest2 {
public static void main(String[] args) throws IOException {
Process result = Runtime.getRuntime().exec("whois stackoverflow.com");
... |
are you talking about the ASP.NET **AJAX** Control Toolkit? |
creating an object without knowing the class name at design time |
|c#|reflection| |
using reflection , I need to investigate a user DLL and create an object of a class in it.
what is the simple way of doing it ? |
Try [Activator.CreateInstance][1].
[1]: http://msdn.microsoft.com/en-us/library/system.activator.createinstance.aspx |
You can create an instance of a class from a Type object using Activator.CreateInstance, to get all types in a dll you can use Assembly.GetTypes |
Take a look at these links:
http://www.java2s.com/Code/CSharp/Development-Class/Createanobjectusingreflection.htm
http://msdn.microsoft.com/en-us/library/k3a58006.aspx
You basically use reflection to load an assembly, then find a type you're interested in. Once you have the type, you can ask to find it's const... |
DataTable to readable text string |
|sql|parsing| |
I have 150+ SQL queries in separate text files that I need to analyze (just the actual SQL code, not the data results) in order to identify all column names and table names used. Preferably with the number of times each column and table makes an appearance. Writing a brand new SQL parsing program is trickier than is se... |
There are many types of optimization, maximum speed versus small code is just one. In this case, I'd choose maximum speed, as the executable will be just a bit bigger.
On the other hand, you could optimize your application for a specific type of processor. In some cases this is a good idea (if you intend to run the pr... |
You could send the mail asynchronous. That way the timeout should not interrupt your sending.
This article should help you get started with that: [Sending Emails Asynchronously in C#][1]
[1]: http://www.eggheadcafe.com/articles/20030720.asp |
You could send the mail asynchronous. That way the timeout should not interrupt your sending.
This article should help you get started with that: [Sending Emails Asynchronously in C#][1].
There is another approach here: <http://www.vikramlakhotia.com/Sending_Email_asynchronously_in_AspNet_20.aspx>
And off cour... |
Getting Information From Master File Table on Windows |
|windows|filesystems| |
I need to get some information that is contained in the MFT on a Windows machine, and I'm hoping that there is some super-secret API for getting this information. I need to be able to get to this information programmatically, and because of legal concerns I might not be able to use the tools provided by the company for... |
There are a number of really great solutions out there for Enterprise Reporting. Within the big four (BO/Crystal, MS SRSS, Cognos, Oracle) the basic reporting functions are all covered. You really need to evaluate what core functionality is most important to you and what the pre-dominant architecture in your environm... |
Lucene has quite poor support for Russian language.
RussianAnalyzer (part of lucene-contrib) is of very low quality.
RussianStemmer module for Snowball is even worse. It does not recognize Russian text in Unicode strings, apparently assuming that some bizarre mix of Unicode and KOI8-R must be used instead.
Do ... |
This could be many things. The first thing I would check is to make sure you can connect to the server using SQL Server Management Studio. Second, check your connection string to make sure it is correct. Surface area configuration should not apply for local connections. |
The accessibility issue is the only important technical issue, all other issues can be socially engineered. When one says that javascript reduced accessibility and another says that Web Applications can use javascript, can we take these two together to imply that all blind people are unemployed? There has to be some ... |
I was looking into using CF's native Java objects awhile back and this question reminded me of a few blog posts that I had bookmarked as a result of my search.
> ColdFusion array is actually an implementation of java list (java.util.List). So all the list methods are actually available for Array.
CF provides most o... |
One example of why such thing could possibly be needed is when you want to filter some input with regexes and you pass regex as an argument to a function.
In spirit of functional programming, for algebraic completeness, you may want some trivial primary regexes like "everything is allowed" and "nothing is allowed".
... |
Its worth considering if you can implement as a parameterised strored procedure and optimise it in the database rather than dynamically generating the SQL via LINQ or an ORM at runtime. Often this will perform better. I know its a bit old fashioned but sometimes its the most effective approach. |
Perhaps consider having the parent subscribe to an event on the child, and the child can fire that event whenever it wants to close the parent. The parent can then handle it's own closing (along with the child's). |
There are plenny scalabity reports and benchmarks on the web about various triple-stores.
Here is a fine [scalability report][1].
W3C itself maintain a wiki with lots of information about [Large Triplestores][2] and [Benchmarks][3].
Follow these 3 links and take a time to read it. It's very informative. :)
... |
I think I know why Borland choose not to use type safe enums in the TLB editor. Enums in COM can be different values while Delphi only since Delphi 6 (I think) can do that.
type
TSomeEnum = (Enum1 = 1, Enum2 = 6, Enum3 = 80); // Only since Delphi 6 |
Here's what you're looking for:
![alt text][1]
Full Article: [http://www.hanselman.com/blog/CatchingRedBitsDifferencesInNET20AndNET20SP1.aspx][2]
This may also be helpful:
![alt text][3]
Full Article: [http://www.hanselman.com/blog/ChangesInTheNETBCLBetween20And35.aspx][4]
[1]: http://i34.tinypi... |
Microsoft is building a DataGrid for WPF. A CTP can be found [here][1].
[1]: http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=14963 |
There doesn't seem to be an easier way, [unless you're willing to buy MAMP Pro][1].
As far as I know, the only way to use SSL with MAMP is to [configure mod_ssl for Apache][2]. mod_ssl is bundled with MAMP, and I found configuration to be pretty straightforward. Note that you'll probably have to start Apache from th... |
You are clearly noo using the correct way to open and close forms. If you use any form of MVC or MVP this problem would not arise.
So use a form of MVP or MVC to solve this problem. |
I did a quick google search and found the following:
http://devcha.blogspot.com/2007/12/smarty-as-template-engine-in-code.html
http://codeigniter.com/forums/viewthread/67127/
If the designer is not familiar with Smarty, I think it's almost the same as if you use the existing CodeIgniter templating system (which le... |
No. Java doesn't have much in the way of process manipulation.
You can have the java code detect the platform at runtime and fire off the platform's kill process command. This is really an refinement on your current solution. |
You can have the java code detect the platform at runtime and fire off the platform's kill process command. This is really an refinement on your current solution.
There's also [Process.destroy()][1], if you're using the [ProcessBuilder][2] API
[1]: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.htm... |
As a WPF developer I surely see the benifit of knowing Expression Blend for many of my previous projects. This help me to jump start on creating Usercontrols and Custom controls very effectively. And if we do in the conventional way of writing XAML from the scratch, it is gonna take a very long time of your development... |
I may be missing something but can't you call the [`destroy()`][2] method on the [`Process`][3] object returned by [`Runtime.exec()`][1]?
[1]: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String)
[2]: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html#destroy()
... |
Best Way to Animate Sprites in Flex |
|apache-flex| |
Is there a preferred way to handle animation when using Flex -- For instance, if I want to render a ball and bounce it around the screen? |
Are you sure setting the "fileEncoding" is what you want, and not "responseEncoding"? Setting the fileEncoding determines how the web server will try to read physical .asmx/.aspx files from disk when it can't determine the encoding automatically. So, settings this to "utf-8" means you must save all your .asmx/.aspx fil... |
Are you sure setting the "fileEncoding" is what you want, and not "responseEncoding"? Setting the fileEncoding determines how the web server will try to read physical .asmx/.aspx files from disk when it can't determine the encoding automatically. So, settings this to "utf-8" means you must save all your .asmx/.aspx fil... |
|c#|datatable|formatting| |
This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic ideea is to loop over rows and over columns and output all cell contents into a StringBuilder using .ToString().
Formatting is a big issue though. Any tips/... |
|c#|formatting|datatable| |
This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic idea is to loop over rows and columns and output all cell contents into a StringBuilder using .ToString().
Formatting is a big issue though. Any tips/ideas on... |
Would converting the datatable to a HTML-table and sending HTML-mail be an alternative? That would make it much nicer on the receiving end if their client supports it. |
`System.Reflection.Assembly` is the class you will want to use. It contains many method for iterating over the types contained with a user DLL. You can iterate through each class, perhaps see if it inherits from a particular interface etc.
<http://msdn.microsoft.com/en-us/library/system.reflection.assembly_members.a... |
This will sound like a really horrible solution, but it just might work:
Render the DataTable contents into a DataGrid/GridView (assuming ASP.NET) and then screen scrape that.
I told you it would be messy. |
I don't think that it is possible.
The ASP.NET AJAX Toolkit is based on ASP.NET technique (what a surprise) and needs ASP.NET.
It contains server-side controls, which are translated to HTML and Javascript by the ASP.NET engine. It is not working without the engine.
However you can check the code itself to see ... |
I don't think that it is possible.
The ASP.NET AJAX Toolkit is based on ASP.NET technique (what a surprise) and needs ASP.NET.
It contains server-side controls, which are translated to HTML and Javascript by the ASP.NET engine. It is not working without the engine.
However you can check the code itself to see ... |
Definitely spawn it off on a background worker process so they go out asynchronously.
BTW, 5-10 seconds per e-mail seems way slow to me. On my server it takes just fractions of a second per e-mail. |
I guess this can't be done with CSS;
You need to put a &nbsp; in every empty cell for the border to show in IE... |
If you're really worried about floating point rounding errors, most languages offer data types that don't have floating point errors. SQL Server has the Decimal and Money data types. .Net has the Decimal data type. They aren't infinite precision like BigDecimal in Java, but they are precise down to the number of dec... |
Uncollapsible CollapsiblePanelExtender. |
|untagged| |
|asp.net| |
|untagged| |
I have a CollapsiblePanelExtender that will not collapse. I have "collapsed" set to true and all the ControlID set correctly. I try to collapse and it goes through the animation but then expands almost instantly. This is in an User Control with the following structure.
<asp:UpdatePanel ID="UpdatePanel1" runat... |
Are you sure setting the "fileEncoding" is what you want, and not "responseEncoding"? Setting the fileEncoding determines how the web server will try to read physical .asmx/.aspx files from disk when it can't determine the encoding automatically. So, settings this to "utf-8" means you must save all your .asmx/.aspx fil... |
According to the [HTML 5 spec][1], `<b>` and `<i>` should be used *when appropriate*.
[On the i][2]:
> [A] span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or s... |
Implementing scripts in c++ app |
|c++|scripting| |
I want to move verious parts of my app into simple scripts, to allow people that do not have a strong knowleagd of c++ to be able to edit and implement various features.
Because its a real time app, I need to have some kind of multi-tasking for these scripts, idealy I want it so that the c++ app calls a script funct... |
Loop through the datatable and send it as HTML email - [generating html table from datatable & sending it as body of email][1].
[1]: http://forums.asp.net/t/1046932.aspx |
var user1 = new User {Name = "steve", Age = 28};
var user2 = new User {Name = "foobar", Age = 28};
Expression<Func<User, bool>> expression1 = t => t.Name == "steve";
Expression<Func<User, bool>> expression2 = t => t.Age == 28;
var invokedExpression = Expression.Invoke(expression2, expression... |
Here is an example:
var user1 = new User {Name = "steve", Age = 28};
var user2 = new User {Name = "foobar", Age = 28};
Expression<Func<User, bool>> expression1 = t => t.Name == "steve";
Expression<Func<User, bool>> expression2 = t => t.Age == 28;
var invokedExpression = Expression.Invoke(... |
Here is an example:
var user1 = new User {Name = "steve", Age = 28};
var user2 = new User {Name = "foobar", Age = 28};
Expression<Func<User, bool>> expression1 = t => t.Name == "steve";
Expression<Func<User, bool>> expression2 = t => t.Age == 28;
var invokedExpression = Expression.Invoke(... |
Looking for an HQL builder (Hibernate Query Language) |
|java|hql| |
I'm looking for a builder for [HQL][1] in Java. I want to get rid of things like:
StringBuilder builder = new StringBuilder()
.append("select stock from ")
.append( Stock.class.getName() )
.append( " as stock where stock.id = ")
.append( id );
I'd rather have something like... |
|java|hql|hibernate| |
I'm looking for a builder for [HQL][1] in Java. I want to get rid of things like:
StringBuilder builder = new StringBuilder()
.append("select stock from ")
.append( Stock.class.getName() )
.append( " as stock where stock.id = ")
.append( id );
I'd rather have something like... |
|java|hibernate|hql| |
I'm looking for a builder for [HQL][1] in Java. I want to get rid of things like:
StringBuilder builder = new StringBuilder()
.append("select stock from ")
.append( Stock.class.getName() )
.append( " as stock where stock.id = ")
.append( id );
I'd rather have something like... |
You can use the "referer" part of the request that the user sent to figure out what he searched for. Example from Google:
> http://www.google.no/search?q=stack%20overflow
So you must search the string (in ASP(.NET) this can be found be looking in `Request.Referer`) for "q=" and then URLDecode the contents.
Als... |
I want to move verious parts of my app into simple scripts, to allow people that do not have a strong knowleagd of c++ to be able to edit and implement various features.
Because its a real time app, I need to have some kind of multi-tasking for these scripts, idealy I want it so that the c++ app calls a script funct... |
When the app transitions from the launch image to the actual app content, it should not be jarring to a user - content (text/images) can be added to the screen, but content should never change. If all this leaves you with is an empty blue header, a white body, and a blue footer - then that's all you should have. If y... |
What is the best online javascript/css/html/xhtml/dom reference? |