simple question on asp net profile - asp.net

i believe this is a simple question but i can't figure out myself. In the aspnet profile there is propertynames column with value [value]::: (e.g. OfficeKey:S:0:1:)
Does anyone know what the ":S:0:1:" is? How can I read it?
thanks

It means it's a String, which starts at position 0 in the PropertyValuesString field, and is 1 character long.
Have a read of http://pretzelsteelersfan.blogspot.com/2007/03/get-aspnet-profile-properties-from-sql.html if you want to do your own manipulation of the fields in SQL.

Related

Why is 100 in front of 11 in firebase documents order?

I'm building an app that will display a list of user info, with each one a numeric ID that is stored when creating the profile and used as the docID in firebase. To facilitate the search, I used this method so the ID would be displayed in ascending order. But, after some tests, I notice that, for example, 100 comes first then 11. Why does it happen? Is there a way to correct/prevent it?
I was storing ID as String. But, as the answer suggested, I changed it to both int and double. Still, 11 comes after 100
It's hard to say for certain without seeing your database, but most likely you're storing the numbers as strings. In such cases Firebase (both Firestore and Realtime Database) will sort the values lexicographically, and in that order "100" comes before "11" - just as "baa" comes before "bb".
Why is 100 in front of 11 in firebase documents order?
Because you're sorting alphabetically instead of numerically. 0 comes before 1 in most character encodings like ASCII and Unicode.
After the answers I got and some research I finally got it.
The main problem was that I was storing the ID as String.
After fixing it, I added .orderBy('id') in the place where I retrieve the
uses' list.
Thank you everyone one for the time spent trying to help me.
Another way is to perform sorting after you queried. It is not efficient though, but in case you cannot change the data type or ids themselves:
const query = await db.collection("my-collection").get();
query.docs.sort((doc1, doc2) => parseInt(doc1.id) - parseInt(doc2.id));

PLSQL Procedure to change data across a full database

I've been asked to write a PLSQL procedure to 'clean up' codes in a database. The codes are varchar2 and are something like 00000001. They are used everywhere in the application. My new employer wants me to make the codes more readable as in turn the 00000001 into just 1 for everywhere they are used.
My question is how would one even go about that? I asked for clarification and it's still not clear and for fear of looking foolish I won't ask again. Any guidance would be welcome
let me start by saying that that sounds like a VERY BAD IDEA!!!!
if you persist it sound like you will need to use dynamic sql with the basic process of...
query all_tab_cols to get a list of columns( im hoping all your columns that use these codes have a naming standard.. ie xxx_CD )
loop over tab/cols to see if your value is there
update values in that table
...
profit ?
however then you get stuck by realities.. if the code is in a foreign key you cant just update it. you'd have to create a new parent record.. update all children to new parent then delete old parent.
you'd need to be very clear on what you are trying to achieve.. and more importantly, is there any value in it?
i suggest you start with a single codevalue to scope out the size of project.
manually start writing the updates you'd need for that 1 codevalue and then try to start automating it.

Change Field Type from Int to Float

I'm helping a co-worker with a Drupal (6) issue, but I've never used Drupal before. The client wants to store decimal values in a field that was originally defined as an integer. I can't believe that this isn't possible without losing content or without doing a bunch of SQL copying, but I can't find anything that says, "sure, you can update the field type pretty easily, just do...".
Is this possible? So far:
We've altered the the content_type_thing table so that the _value field is now a float data type rather than an int.
We've updated the content_node_field table so the type value for that field is number_float
Now we can change the value from 1840 to 1840.25 without getting a validation error, but the .25 never gets saved. It gets chopped off and we get 18.00 in the database.
Any ideas?
Thanks.
UPDATE
Before anyone asks, I have read this post, but it looks like the recommendation involves a bunch of data migration. I just can't believe that there's not a way to change the data type in place.
This is pretty straight forward my friend. download this module
http://drupal.org/project/formatted_number
When you install it, go to the content type and change that field to use float.
Actually there is a solution but it's not easy and if you don't know exactly what
you're doing it may have side effects
https://drupal.stackexchange.com/questions/79378/changing-a-field-type-from-integer-to-decimal

Monotouch: How to get a localized string from sqlite DB

I want to display a list of items from my sqlite DB in a tableView. These items need to be localized depending on the language selected on the phone.
As an example, if on of the items in the DB was "Hello", it should be displayed as "Hello" in english, "Hallo" in german and so on.
I already tried to store the complete (NSBundle.MainBundle.LocalizedString("Hello", "Hello")) and just storing the identifier for each string, but neither worked.
Any idea where I made a mistake?
Thanks in advance, BanZai
Problem solved, made a very stupid mistake. I filled the DB with already localized strings, so obviously the language matched with the original language, but after changing it, the content in the DB stayed the same, thx #Krumelur for trying to help

How do we get the words that we typed previously when we type that 1st letter of the word

I am very new to .net. I was wondering How do we get the words that we typed
previously when we type that 1st letter of the word in Textbox
Thanks in advance
I think what you are asking for is a browser property. For most of the browsers auto complete feature will be turned on by default.
All the other answers will get you auto complete texts that are stored in a location(DB or somewhere else) and not your previously typed values.

Resources