Is there any difference between these two?
LTRIM(RTRIM(MyValue1))
TRIM(MyValue1)
I see a lot of examples that use LTRIM(RTRIM(MyValue1)), but my understanding is that this is equivalent to TRIM(MyValue1).
Am I missing something here (or was TRIM() introduced just recently which resulted in all of the examples that use LTRIM/RTRIM)?
Thank you in advance.
environment: SQL Server 2014 standard edition
https://learn.microsoft.com/en-us/sql/t-sql/functions/trim-transact-sql?view=sql-server-2017
TRIM() was introduced in SQL Server 2017.
Related
I am very new to perl and I was going through Perl ORM , I encountered DBIx::Class and DBIx::Abstract, from what I inferred they both seem to be ORMs . Is there any difference I am missing?
Thanks
DBIx::Abstract is a low-level tool for manipulating databases (it's quite like SQL::Abstract, which DBIx::Class uses). It is not an ORM at all.
It has also been deprecated (sorry, "depricated"!). So I can't recommend using it.
I am developing iOS application and I need base_convert function. Application is communicating with PHP server using base_convert, too. In PHP I use this:
base_convert($something,16,36) and base_convert($something,36,16)
I search for something like I use in PHP, but for Xcode (iOS application).
Thank you.
there is a C++ implementation here:
http://thinkdiff.net/mixed/base-conversion-handle-upto-36-bases/
that will convert back and forth with bases up to 36. Not sure if you need more than that.
There is a complete wikepedia page devoted to Base 36 with various forms of source code that you could adapt (for example the C code should just drop straight in with no modification but is soooo not objective-c)
There is also how to convert Decimal to base36 which only does a one-way conversion, but the code is objective-c, so you could get an idea on how to adapt the wikepedia code.
As to why base 36 I learnt:
Base 36 is therefore the most compact case-insensitive alphanumeric
numeral system using ASCII characters
Adapted the code David Hope suggested into Objective-C, here:
https://gist.github.com/furkanmustafa/5660086
I am new to CSLA and i am trying to understand the difference between FieldManager.updatechildren(this) vs FieldManager.updatechildren.
When is it appropriate to use either one?
I figured out the answer to my question. Use FieldManager.UpdateChildren(this) when updating a certain child with certain parameters. All other cases we use FieldManager.UpdateChildren
I am writing a library that wraps libmemcached.
I noticed that there is an interesting behaviour setting for memcached which says that I can indicate that I do not care about the results of my memcached commands...
It is known as MEMCACHED_BEHAVIOR_NOREPLY. Why would somebody want to use this?
It would be great if someone could point out a few use cases? multi-get / multi-set spring to mind, but I am not clear how this would be useful.
ASCII protocol noreply was a mistake. Don't use it.
Binary protocol noreply can be used to make really awesome optimizations without any loss of correctness.
Does anyone here try to adopt xtext2 and migrate from xtext1.x to xtext2.0?
It seems xtext2 brings many new atractive features. Such as A Reusable Expression Language and Xtend: A Code Generation Language . Many performance enhancement is made to the Xtext workbench and rename capability. So any one tell you experence about xtext2? Probably this is a bit early question. But I just wait and see.
xtext2 homepage
I updated an existing, not too complex language from Xtext 1 to Xtext 2, and tried to develop a new one using Xtext2 and XBase. I had to re-run the code generation step, and also had to modify the hand-written validators, because the error and warnings locations are to be specified using literals instead of integers. E.g.
error("File does not exist with path: " + path, fileReference, ViatraTestDslPackage.FILE__PATH);
is to be replaced with
error("File does not exist with path: " + path, ViatraTestDslPackage.Literals.FILE__PATH);
Similarly, the workflow has to be changed as well to incorporate some new features: the outline API uses different fragments (outline.OutlineTreeProviderFragment and outline.QuickOutlineFragment), for rename and compare support new fragments are to be added (refactoring.RefactorElementNameFragment and compare.CompareFragment).
With my experiments of XBase it seems, that adding that to a language that already supported some kind of expressions can be labour-intensive, because either old expressions has to be replaced with XBase expressions (or at least altered in a way to make them available in XBase expressions), otherwise you have to maintain two kind of expression support in your code generator or interpreter.
To conclude my answer, I believe, if you have a simple Xtext 1.0 editor, where you mostly relied on the automatically generated features, migrating to Xtext 2.0 seems easy and recommended; however, if you customized a lot of things in manually written code, be careful, because the migration might not be straight-forward, and I have found no real migration guide.
http://www.eclipse.org/Xtext/documentation/2_0_0/213-migrating-from-1.0.php#migrating_from_1_0_x_5_4
I just find this useful link.
Also I do meet some problem especially in serialization module. Luckily in mwe2 file, it leaves a version 1.0 serialization, i use that and fix the problem when using version 2.0 serialization module. Not knowing why..
Another problem is there is a strange bug in the xtext validation. It always complain about ClassCastException. cast from String to QualifiedName error.
It is still early considering the recent release date:
The team have just presented/demo'ed XTend2 in democamps during last month (June 2011).