I have to query two different servers from a dynamically built query.
It basically gets data from one server, treats it, and inserts it into another server.
The only problem is I have to be sure it works for both situations:
If both the source and destination databases are on the same server, and if they're not.
I understand the concept of using Linked Servers in SQL Server, but I cannot think of a way to consider both alternatives, same server and different servers.
A little help?
Hi. I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'.
I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its' number. The content control probably be a TextBox, while label control could be a TextBlock. So I created a UserControl with this basic structure (the values are hardcoded at this stage):
<UserControl x:Class="XWord.Square"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
FontSize="30"
Width="100" Height="100">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="Label" Grid.Row="0" Grid.Column="1"
Text="7"/>
<TextBox x:Name="Content" Grid.Row="1" Grid.Column="0"
Text="A"
BorderThickness="0" />
</Grid>
</UserControl>
I've also created DependencyProperties in the Square class like this:
public static readonly DependencyProperty LabelTextProperty;
public static readonly DependencyProperty ContentCharacterProperty;
// ...(static constructor with property registration, .NET properties
// omitted for brevity)...
Now I'd like to figure out how to bind the Label and Content element to the two properties. I do it like this (in the code-behind file):
Label.SetBinding( TextBlock.TextProperty, new Binding { Source = this, Path = new PropertyPath( "LabelText" ), Mode = BindingMode.OneWay } );
Content.SetBinding( TextBox.TextProperty, new Binding { Source = this, Path = new PropertyPath( "ContentCharacter" ), Mode = BindingMode.TwoWay } );
That would be more elegant done in XAML. Does anyone know how that's done?
Is there a way to make LogCat's output to appear in Console view in Eclipse?
LogCat view is much less convenient that Console, because it's hard to see long messages in it (they are trimmed by column border) and there are no clickable highlighting in exception stack traces to quickly navigate to source of error.
For example:
source control: git + adobe drive
3d: google sketchup - *.dae - blender - *.obj
2d: photoshop/illustrator - *.png
audio: audacity - *.caf
code: ArgoUML, Xcode, Textmate
test: OCUnit
build: rake, Xcode
Feel free to mention any other tools that you think are awesome :)
Changed to Community Wiki
I'm using Eclipse/Spring source to edit JSP tags and EL. If I want to check what all the properties of a variable are is there a way to do this? Or even find out which file is generating the variable that's passed in. I'm thinking something along the lines of firebug for Javascript, where you can select an object and drill-down to get it's properties.
I'm working on a Windows Forms application that interacts with a Sql Compact database file created by SQL Server 2005. This application was originally developed in Visual Studio 2005 but was recently converted to a Visual Studio 2008 solution.
In regards to Sql Compact, we made sure the references were all still set to the assemblies that handle the 2005 version of Sql Compact rather than Sql Compact 3.5. Having done this, the application still runs just as it should - it will still interact with the Compact database, perform synchronization operations, etc.
However, I just discovered today that Visual Studio tools such as the DataSet Designer do not play well with a Sql Compact database file of an older version than 3.5. If I go to the New Connection... wizard, the only Sql Compact Data Source / Data Provider are for Sql Compact 3.5. I assume that Visual Studio 2008 just doesn't include the data provider for the older version of Sql Compact by default.
Is there a way you can add the old version of Sql Compact to the list of "Data Sources" for the connection wizard? To see exactly what I'm referring to, click on the Tools menu of Visual Studio 2008 and click Connect to Database... In the window that comes up, click Change... next to the Data source setting. From this dialog there is no way I can select the earlier version of Sql Compact - only 3.5 is available.
Maybe I need to add an assembly reference somewhere? Or copy some file(s) from my Visual Studio 2005 directory over to 2008? I would think there would have to be a way for Visual Studio 2008 to be able to interact with a Sql Compact database from Sql Server 2005.
To provide one more bit of detail, I discovered this problem when I went to my DataSet, right-clicked and tried to add a TableAdapter. The first screen that comes up says, "Choose Your Data Connection". If I leave it set to the Sql Compact connection that we've always used, I now get the following error when clicking the Next button:
Failed to open a connection to the database
"The selected database was created with an earlier version of SQL Server Compact and needs to be upgraded to SQL Server Compact 3.5 before the connection can be opened or tested. Upgrade the database by creating a new data connection and completing the Add Connection dialog box."
Check the connection and try again.
The only problem here is that we still use Sql Server 2005, and if my understanding is correct, it does not produce subscription files that are compatible with Sql Compact 3.5. If I am wrong in this assumption, please correct me.
Any help you can provide is greatly appreciated. Thank you.
Hi - i am building a search index that contains special names - containing ! and ? and & and + and ... I have to tread the following searches different:
me & you
me + you
But whatever i do (did try with queryparser escaping before indexing, escaped it manually, tried different indexers...) - if i check the search index with Luke they do not show up (question marks and @-symbols and the like show up)
The logic behind is that i am doing partial searches for a live suggestion (and the fields are not that large) so i split it up into "m" and "me" and "+" and "y" and "yo" and "you" and then index it (that way it is way faster than a wildcard query search (and the index size is not a big problem).
So what i would need is to also have this special wildcard characters be inserted into the index.
This is my code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Lucene.Net.Analysis;
using Lucene.Net.Util;
namespace AnalyzerSpike
{
public class CustomAnalyzer : Analyzer
{
public override TokenStream TokenStream(string fieldName, TextReader reader)
{
return new ASCIIFoldingFilter(new LowerCaseFilter(new CustomCharTokenizer(reader)));
}
}
public class CustomCharTokenizer : CharTokenizer
{
public CustomCharTokenizer(TextReader input) : base(input)
{
}
public CustomCharTokenizer(AttributeSource source, TextReader input) : base(source, input)
{
}
public CustomCharTokenizer(AttributeFactory factory, TextReader input) : base(factory, input)
{
}
protected override bool IsTokenChar(char c)
{
return c != ' ';
}
}
}
The code to create the index:
private void InitIndex(string path, Analyzer analyzer)
{
var writer = new IndexWriter(path, analyzer, true);
//some multiline textbox that contains one item per line:
var all = new List<string>(txtAllAvailable.Text.Replace("\r","").Split('\n'));
foreach (var item in all)
{
writer.AddDocument(GetDocument(item));
}
writer.Optimize();
writer.Close();
}
private static Document GetDocument(string name)
{
var doc = new Document();
doc.Add(new Field(
"name",
DeNormalizeName(name),
Field.Store.YES,
Field.Index.ANALYZED));
doc.Add(new Field(
"raw_name",
name,
Field.Store.YES,
Field.Index.NOT_ANALYZED));
return doc;
}
(Code is with Lucene.net in version 1.9.x (EDIT: sorry - was 2.9.x) but is compatible with Lucene from Java)
Thx
I have an XML schema that defines my data model. I would now like to have Objective C source files generated from the XML schema. Does anyone know how to accomplish this?
Hello,
I'm looking for a product that can:
1) allows users to have a video conference (picture + sound)
2) can be embedded in a jsp web page
3) supports video recording which can also be operated from the browser
The product may be commercial (or open source).
Thanks,
Yael
in this page of tutorial : http://java.sun.com/javaee/6/docs/tutorial/doc/bnadu.html discuss about hello2 application on samples folder.
i download samples from this link and installed correctly:
https://glassfish-samples.dev.java.net/servlets/ProjectDocumentList?folderID=5214&expandFolder=5214&folderID=0
but "hello2" folder not on the "web" folder.
where is source codes for sun JavaEE6 Tutorial Volume I ?
thanks alot
It looks like I'm missing something.
When using Jython to run my Python code in Java, Java bytecode files are generated (test.py - [email protected]).
Can I run these classes directly using java?
In other words, I want to make this:
$ java test@py [additional cp args]
work.
The intent: writing Python code and not having to give away source code.
Hi,
I get the chromium source and I am able to compile it fine under MaxOS X.
My question is why every time I power off my laptop and then re-open my XCode project and click 'Build and Go (Debug)', XCode recompiles EVERYTHING (even I have not modified any file).
Is there any way to config to compile when needed?
Thank you for any suggestion.
i dont have a wifi router, so when at home i need to turn my laptop into a wifi source so that both myself and my partner can access the internet.
however during the days i work at a coffee shop and require the use of their wifi.
i'm running snow leopard and i find it stupidly cumbersome to constantly be turning off and on, first internet sharing and then my wifi.
any ideas for a quick n dirty applescript solution?
thanks a bajillion!
Jon
I was thinking of working on a project while I have some free time and this one looks pretty nice: http://mindprod.com/project/filefinder.html
One thing I'm wondering about is that will it really be much faster compared to the regular windows search if I use SQL? I'm planning to use MySQL since it's open source. Also, do I need to be good at databases for this? I have basic knowledge about relational databases and can definitely make some SQL statements.
Thanks.
Using Flex Builder :
I have created a new Actionscript Project.
I want to use mx.controls.Button class in it,
so I did the following :
Added '-locale=en_US -source-path=locale/{locale}' to the Actionscript compiler arguments
Added 'framework.swc' to the library path
But now I get this error:
unable to open 'locale/en_US'
I looked up and I do have the following directory inside my Flex Builder 3 installation:
./sdks/3.0.0/frameworks/locale/en_US
How to fix it?
Hi
What is the recommended way to transfer files via FTP and manage (rename, move, delete) files in an FTP server programmatically in a Windows Scripting Host script file (JavaScript/VBScript)? Preferably without requiring 3rd party ActiveX add-ons since these "extra" software will need to go through an approval process that will take a very long time, even for free (as in beer) and/or open source components.
The script is going to be run in a Windows 2003 Server in data center environment.
Thanks.
I saw tools like reflector can easily translated IL back to C# code. So I was wondering how to protect my source code, especially in a country, where patent and copy right is not enforced well by goverment.
Thanks.
I'm investigating the use of Entity Framework in an upcoming project, but I have some concerns about the maturity and market adoption of the product. Are there any high profile web sites or applications using the product? Are there any significant open source projects that have picked it up?
What are the things a script should do to ensure that files have been FTPed correctly? Following are the things I have in mind:
1) use high level scripting language like python or perl instead of shell script for a more comprehensive functionality and error handling
2) check that the file exists at the destination after FTP
3) check destination file size. This is a little bit difficult because file size will change if the source and destination are running different OS. Any tips on how to go about this?
I have a query:
The "X" tables are from one data source and the "Y" table is from another...but there is join between the data sources. I can't seem to figure out how to enter the two different connection strings for this to run.
ConnectionString="Dsn=Xdb;uid=xxx;pwd=xxxxxxx" ProviderName="System.Data.Odbc"
ConnectionString="Dsn=Ydb;uid=xxx;pwd=xxxxxxx" ProviderName="System.Data.Odbc"
Is this possible...am I just missing something?
Hi,
I want to generate custom methods in Eclipse like the way we can generate toString, getters and settlers (right click - source -). Could anyone tell me what is involved in doing this?
Thanks,
Dutch
In graph theory, a planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints.
What is the best open source program for drawing the planar graph
with support of input nodes size and fixed drawing boundary region