alias

How to create an alias for a private inner class (using XStream)?

I'm creating aliases for long class names... It works perfectly fine, but one of the serialized classes is a private inner class. I can't think of a way to create an alias for it other than making it public. I don't like this solution, because it should not be public in the first place. But since making an alias for it will make it possi...

How to alias java.lang.Integer using XStream?

Hey, I'm tweaking an XStream output, and I get the following: <entry> <string>ahh</string> <java-class>java.lang.Integer</java-class> </entry> So I try to create an alias for java.lang.Integer.class... Doesn't work. I made aliases for many other classes and it works just fine. I also tried to alias int.cla...

Why won't Oracle SQL let us use aliases in conditions?

Oracle PL/SQL won't let users to use aliases in conditions. In most cases it's very practical for me to use aliases instead of long statements. What's the reason for that? What bad would happen if we could use aliases in conditions? Example case: http://stackoverflow.com/questions/2235166/whats-wrong-with-this-sql-query ...

How Symfony did its command alias ?

Apologies my french english ... I would like to create an alias in Windows XP cmd, like Symfony. This code works perfectly, but resets every system boot : doskey kCLI= php C:\wamp\www\KinkamaCLI\KinkamaCLI.php I tryed to put a .bat in "start" folder, but I think it's not beautifull, and I feel it doesn't work, because I can't see th...

Check if path is folder/bundle/alias in ObjC.

Hi, I come from the AppleScript land and there we use alias of (info for thePath) package folder of (info for thePath) folder of (info for thePath) to see if a path is either of the above. But I can't seem to find out how to do it in ObjC/Cocoa. I'm pretty sure it's quite easy but I fail to find any info about it. Thanks... ...

Conditional logic on SQL aliases

I've got an SQL query that pieces together historic price information. It's not particularly clean and could probably be optimized a great deal. One reason for this is that I use a subquery to grab the 'previous' price value via a subquery and assign it to the alias 'last_value'. Ideally, I'd like to be able to use this alias in the quer...

aliases (sendmail) to redirect emails

I have read that "aliases" (etc/aliases) can be used to redirect an email to an external email address (or piping it to a script etc.) It should normally work by putting this command in the "aliases" file: support: [email protected] Afterwards you have to use the newaliases-command and thats it. But unfortunately after doing these ...

Is it possible to declare an alias with .net type ?

Is it possible to declare an alias with .net type ? in c# and if so how ? ...

Filter based on an aliased column name

I'm using SqlServer 2005 and I have a column that I named. The query is something like: SELECT id, CASE WHEN <snip extensive column definition> END AS myAlias FROM myTable WHERE myAlias IS NOT NULL However, this gives me the error: "Invalid column name 'myAlias'." Is there a way to get around this? In the past I've included the...

Is there an easier way to give a function an alias name in C#

BACKGROUND: In the API I am porting, there are a large number of functions prefixed with sqlite3_. They are encapsulated in a class named Sqlite3, so the function call is Sqlite3.sqlite3_... I've created a number of alias calls, similar to the following, //C# alias for call public static void result_error_toobig(sqlite3_context p...

Using list alias in WHERE or GROUP BY clause

Hello, I'm writing a stored procedure containing SQL Select queries with some functions on some columns and a GROUP BY clause. Obviously, I have to repeat these functions in the GROUP BY, which dramatically decreases code readability and increases redundancy. So far, an alternative I have found was to use a derived query so I can acces...

Merge and Alias of two MySQL tables

i've got two tables: members and members_data. They both share the same unique auto increment id key and unique username fields. I would like to merge the two tables into one members table, BUT I have ~50 scripts using members & members_data references. I also need some sort of alias setup to make my members_data queries point toward t...

Nesting aliases in C#

I've seen lots of answers to the typedef problem in C#, which I've used, so I have: using Foo = System.Collections.Generic.Queue<Bar>; and this works well. I can change the definition (esp. change Bar => Zoo etc) and everything that uses Foo changes. Great. Now I want this to work: using Foo = System.Collections.Generic.Queue<Bar>...

Importing Python module from the Bash

I am launching a Python script from the command line (Bash) under Linux. I need to open Python, import a module, and then have lines of code interpreted. The console must then remain in Python (not quit it). How do I do that? I have tried an alias like this one: alias program="cd /home/myname/programs/; python; import module; line_of_c...

Unix alias command not working as expected

i have a command to kill some processes as below: kill -9 `psu|grep MF1pp|grep -v grep|awk '{print $2}'` the command works perfectly fine >psu|grep MF1pp|grep -v grep|awk '{print $2}' 29390 29026 $>kill -9 `psu|grep MF1pp|grep -v grep|awk '{print $2}'` $>psu|grep MF1pp|grep -v grep|awk '{print $2}' when i create an alias as below a...

"using" directive in Java

When the type name is too long, in C# i can create alias like this: using Dict = System.Collections.Generic.Dictionary<string, string>; And I can use it like this: Dict d = new Dict(); d.Add("key", "value"); Can I create an alias similar to this in Java? ...

Why can one aliased C# Type not be accessed by another?

good stuff // ok to alias a List Type using AliasStringList = System.Collections.Generic.List<string>; // and ok to alias a List of Lists like this using AliasListOfStringList1 = System.Collections.Generic.List<System.Collections.Generic.List<string>>; bad stuff // However **error** to alias another alias using AliasListOfStringList...

Bash completion symfony

How can I make symfony completion in bash? Have ubuntu 9.10. It's hard to write own alias. Anyone know where can I find it? I find http://trac.symfony-project.org/wiki/BashCompletion - but it is for symfony 1.1. Is it compatible with 1.4 ? ...

SubSonic Alias/Where Clause

Hey, I want to convert the following SQL Query to a SubSonic Query. SELECT [dbo].[tbl_Agency].[ParentCompanyID] FROM [dbo].[tbl_Agency] WHERE REPLACE(PhoneNumber, ' ', '') LIKE REPLACE('%9481 1111%', ' ', '') I thought I would do it like below, but I just can't get it to produce valid SQL. //SubSonic string agencyPhone...

Re-use aliased field in SQL SELECT STATEMENT

Hi, the question is hard to define without giving an example, e.g. I'd like to achieve something like this : SELECT (CASE WHEN ...) AS FieldA, 20 + FieldA AS FieldB FROM Tbl Assuming that by "..." I've replaced a long and complex CASE statement, hence I don't want to repeat it when selecting FieldB and use the aliased FieldA instea...