Hi;
I have an Excel file with one culumn and there is a lot of numbers in it. I want to want these data to an array in c#. I want c# code immediately.
Thank you all...
Is there a common method to encode and decode arbitrary data so the encoded end result consists of numbers only - like base64_encode but without the letters?
Fictitious example:
$encoded = numbers_encode("Mary had a little lamb");
echo $encoded; // outputs e.g. 122384337422394237423 (fictitious result)
$decoded = numbers_decode("122384337422394237423");
echo $decoded; // outputs "Mary had a little lamb"
declare @mydata nvarchar(4000)
set @mydata = '36|0, 77|5, 132|61'
I have this data that I need to get into a table. So for Row1 columnA would be 36 and columnB would be 0. For Row2 columnA would be 77 and columnB would be 5 etc.
What is the best way to do this?
Thanks
Hello,
I have application which retrieves many large log files from a system LAN.
Currently I put all log files on Postgresql, the table has a column type TEXT and I don't plan any search on this text column because I use another external process which nightly retrieves all files and scans for sensitive pattern.
So the column value could be also a BLOB or a CLOB, but now my question is the following,
the database has already its compression system, but could I improve this compression manually like with common compressor utilities? And above all WHAT IF I manually pre-compress the large file and then I put as binary into the data table, is it unuseful as database system provides its internal compression?
Hi,
I want to extract some kind of bmp/rgb data from jpeg files.
I had a look at libjpeg, but there seemed not to be any good documentation available.
So my questions are:
Where is documentation on libjpeg?
Can you suggest other c-based jpeg-decompression libraries?
thanks in regard
ps: I am using GNU/Linux, and c/c++
Hi
Another Day, another CoreData problem,...but hopefully the last one now.
Ok here is a copy of what I have :
I have a List of Hotel Guests that stay in one Room and have Preferences. Once ready the user should select a guest and see the data and should also be able to add new guest, select the room (maintained also by application) and select their preferences (where the user can also add new preferences). The guest can have no or many preferences.
So here is what I have so far. I created 3 Entities : - Rooms with roomnumber - Preferences with name - GuestInfo with name - with these Relationships room (Destination Rooms) and prefs (Destination Preferences with "To-Many Relationship") The prefs is a NSSet when you create a Managed Object Class.
Now I created a UITableViewController to display all the data. I also have an edit and add mode. When I add a new Guest and just fill out the name, everything works fine. But when I want to add the prefs or the room number I get this error :
Illegal attempt to establish a relationship 'room' between objects in different contexts
Now, what confuses me is that when I add a guest and enter just the name, save it, go back and edit it and select the prefs and room number it works ?
I have this line in both ViewControllers to select the room or prefs :
[editedObject setValue:selectedRoom forKey:editedFieldKey];
with this .h :
NSManagedObject *editedObject;
NSString *editedFieldKey;
NSString *editedFieldName;
Again, it works on the editing mode but not when I want to add a fresh object.
And to be sure, this is what I do for adding an new Guest :
- (IBAction)addNewItem
{
AddViewController *addViewController = [[AddViewController alloc] initWithStyle:UITableViewStyleGrouped];
addViewController.delegate = self;
addViewController.context = _context;
// Create a new managed object context for the new book -- set its persistent store coordinator to the same as that from the fetched results controller's context.
NSManagedObjectContext *addingContext = [[NSManagedObjectContext alloc] init];
self.addingManagedObjectContext = addingContext;
[addingContext release];
[addingManagedObjectContext setPersistentStoreCoordinator:[[_fetchedResultsController managedObjectContext] persistentStoreCoordinator]];
GuestInfo *info = (GuestInfo *)[NSEntityDescription insertNewObjectForEntityForName:@"GuestInfo" inManagedObjectContext:addingContext];
addViewController.info = info;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:addViewController];
[self.navigationController presentModalViewController:navController animated:YES];
[addViewController release];
[navController release];
}
Anything I have to do to initialize the Room or Prefs ?
Hope someone can help me out. Thanks
i am connect to a mysql database using this example:
http://bitdaddys.com/MySQL-ConnectorNet.html
at the top the instruction is to:
Next add reference to: MySql.Data
how do i do that?
Hi,
I am doing a project, for which I need to know all the wikipedia article names(I don't need the content). Is there a place where I can download this data.
Thank you
Bala
i run web application on iis 6 , windows server 2003 , mysql database.
first it was working fine, but when i reconfigured the mysql server with the same password it gave me this message error when i want to enter any page in browser :
"MySql.Data.MySqlClient.MySqlException: There is no 'root'@'%' registered".
i checked the app connection it's the same, as though the app doesn't see the localhost , because "dbforge" sometimes give me this message: "connection localhost cannot be found" but when i doubleclick the connection it opens as root.
any idea to solve this problem
I need to use a function on a vector that does not take a ts object. I'm trying to convert it to a plain old vector but I just can't seem to figure it out. I googled around but mostly people are trying to convert data types into ts object. I want to go the other way. Any help would be appreciated.
Hi Guys,
Im trying to sort a column of data in a gtk tree view column non alphabetically. I cant seem to find a function in the GTK libraries that cant do such a thing
Does anyone here know of a way to do this?
Regards
Paul
If I need to append data (not insert) into a particular super column, what should I do?
For eg:
Consider a existing record described below
Kespace : test
columFamily: testColum
SuperColumn : testSuper
column_name : email
value : [email protected]
Here if I want to add my phone number to the super column "testSuper". What should I do?
Hi,
I'm writing a widget where i first have a configure screen where the user makes a selection. Then I want to pass that data on to the actual widget. This must be really simple but I just can find out how to do it.
I am trying to write data to an RTF file and set certain characters to a different color. I found out how to do it in a box but I can't figure out how to write it to a file.
is it possible to have an html form organized/named in such a way that $foo-fromArray($_POST) would actually save relational data as well?
example:
html_form_fields:
user_name
country_name
db_table_users:
id
user_name
db_table_countries:
id
country_name
update:
forgot to say i'm trying to make this with zend framework forms
What are your favorite ways to encapsulate LINQ to SQL entity classes and data-context classes into business objects?
What have you found to work in a given situation?
Have you invented or taken to any specific patterns?
I would like to get at the raw image data, as in a pointed to a byte array or something like that, of the image output from a direct3d app without actually rendering it to the monitor.
I need to do this so that I can render direct3d as a directshow source filter
Visual studio 2008 c++
I hava a data window object, in which I am fetching some attributes from the database to show it to the users. I want to make the computed fields read-only, so that the user can not modify them.
How can I make a computed field read-only?
Consider the folowing where I am reading the data table values and writing to a text file
using (StreamWriter sw = new StreamWriter(@"C:\testwrite.txt",true))
{
DataPreparation().AsEnumerable().ToList().ForEach(i =>
{
string col1 = i[0].ToString();
string col2 = i[1].ToString();
string col3 = i[2].ToString();
string col4 = i[3].ToString();
sw.WriteLine(
col1 + "\t"
+ col2 + "\t" +
col3 + "\t" +
col4 + Environment.NewLine
);
});
}
The data preparation function is as under
private static DataTable DataPreparation()
{
DataTable dt = new DataTable();
dt.Columns.Add("Col1", typeof(string));
dt.Columns.Add("Col2", typeof(int));
dt.Columns.Add("Col3", typeof(DateTime));
dt.Columns.Add("Col4", typeof(bool));
for (int i = 0; i < 10; i++)
{
dt.Rows.Add("String" + i.ToString(), i, DateTime.Now.Date, (i % 2 == 0) ? true : false);
}
return dt;
}
It is working fine.
Now in the above described program, it is known to me the Number of columns and the column headers.
How to achieve the same in case when the column headers and number of columns are not known at compile time using the lambda expression?
I have already done that which is as under
public static void WriteToTxt(string directory, string FileName, DataTable outData, string delimiter)
{
FileStream fs = null;
StreamWriter streamWriter = null;
using (fs = new FileStream(directory + "\\" + FileName + ".txt", FileMode.Append,
FileAccess.Write))
{
try
{
streamWriter = new StreamWriter(fs);
streamWriter.BaseStream.Seek(0, SeekOrigin.End);
streamWriter.WriteLine();
DataTableReader datatableReader = outData.CreateDataReader();
for (int header = 0; header < datatableReader.FieldCount; header++)
{
streamWriter.Write(outData.Columns[header].ToString() + delimiter);
}
streamWriter.WriteLine();
int row = 0;
while (datatableReader.Read())
{
for (int field = 0; field < datatableReader.FieldCount; field++)
{
streamWriter.Write(outData.Rows[row][field].ToString() + delimiter);
}
streamWriter.WriteLine();
row++;
}
}
catch (Exception ex)
{
throw ex;
}
}
}
I am using C#3.0 and framework 3.5
Thanks in advance
I Am Completely novice in flex could you just let me know about it plz.I want to access data from a database residing on a particular ip address and also i am not sure how to do it pl let me know how it can be done through flex framework.
Sorry for the long winded question (I'm including background here). If you just want the question, go to the end.
I have a ListView with a custom Panel implementation that I'm using to implement something similar to a WrapPanel, but not quite.
I'm overriding the MeasureOverride and ArrangeOverride methods in the custom panel.
If I do the naive implementation of a WrapPanel in the MeasureOverride method it doesn't work when the ListView is resized. Let's say the custom panel does a measure and the constraint is a width of 100 and let's say I have 3 items that are 40 wide each. The naive approach is to return a size of 80,80 but when I resize the window that the ListView is in, down to say 75, it just turns on the horizontal scrollbar and never calls measure or arrange again (it does keep measuring and arranging if the width is greater than 80).
To get around this, I hard coded the measurement to only have a width of the widest item. Then in the arrange, it gives me more space than I asked for and I use as much horizontal space as I can before wrapping. If I resize the window smaller than the smallest item in the ListView, then it turns on the scrollbar, which is great.
Unfortunately this is causing a big problem when I have one of these ListViews with a custom panel nested inside of another one. The outside one works ok, but I can't get the inside one to "take as much as it needs". It always sizes to the smallest item, and the only way around it is to set the MinWidth to be something greater than zero.
Anyway, stepping back for a second, I think the real way to fix this is to go back to the Naive implementation of the WrapPanel but force it to re-measure when the ListView width goes below the Size I previously returned as a measurement. That should solve my problem with the nested one.
So, that's my question:
I have a ListView with a custom panel
If I return a measurement width on the panel and the ListView is resized to less than that width, it stops calling MeasureOverride
How can I get it to continue calling MeasureOverride?
If I were to build a newsletter emailing system, I will need to be able to generate reports on how many emails bounced, flagged as spam, unsubscribed, read vs. unread, click through rates etc....
So how do you keep track of user activity after the email has been sent? Am I right in assuming that you CAN NOT embed javascript code into emails to monitor user activity? How else do I gather data for my reports?