Hi all,
This is probably seriously easy to solve for most of you but I cannot solve this simply putting str() around it can I?
I would like to convert this list: ['A','B','C'] into 'A B C'.
Thanks in advance!!
Hello All,
This is my first thread iam developing an application in which i have to convert the HTML contents to pdf file.
I had generate the PDF File but don't know how to create a pdf file from HTML format.
Anyone can suggest the solution?
Thank You.
Hi,
I have a 500Mb csv file. I need to convert it into XML file.
I am using the Jaxb to created the xml file. It is working fine for small amout of data.
but for large amout of data like 300 mb it is throwing out of memory exception.
Can anyone tell me that How can I create each element and write it into a file
without creating the whole tree using the jaxb?"
Thanks
Sonu
hi!
Is there a way to insert only date in a datetime column in sql server without the time?
for example
date (datetime)
===============
12-01-2000
16-02-2000
or i should store this as a varchar and cast it when retriving so that i can convert to whatever form i need.
I am trying to convert java.util.Date into string as "Twenty Sixth of October Nineteen Ninety Three" for the date 26-10-1993.
How to do this in a generic fashion?
I am trying to convert rows into columns. here is my query
SELECT M.urn,
M.eventdate,
M.eventlocation,
M.eventroom,
M.eventbed,
N.time
FROM admpatevents M
INNER JOIN admpattransferindex N
ON M.urn = N.urn
AND M.eventseqno = N.eventseqno
AND M.eventdate = N.eventdate
WHERE M.urn = 'F1002754364'
AND M.eventcode = 'TFRADMIN'
Current result
URN Date Location Room Bed Time
F1002754364 20121101 EDEXPRESS 4-152 02 0724
F1002754364 20121101 CARDSURG 3-110 02 1455
F1002754364 20121102 CHEST UNIT 6-129-GL04 1757
required result
F1002754364 20121101 EDEXPRESS 4-152 02 0724 20121101 CARDSURG 3-110 02 1455 20121102 CHEST UNIT 6-129-GL 04 1757
Thanks for your help.
I have a list containing a tuples and long integers the list looks like this:
table = [(1L,), (1L,), (1L,), (2L,), (2L,), (2L,), (3L,), (3L,)]
How do i convert the table to look like a formal list?
so the output would be:
table = ['1','1','1','2','2','2','3','3']
For information purposes the data was obtained from a mysql database.
Hi,
I have used Bitmap class to convert tiff to Gif but it couldn't make the image 2 bit possible for have less size.
Notice that bitmap class could create images with this pixel format :
1, 4, 8, 16, 32, 64 (bits)
But my need is 2 bit.
Could someone help me ?
I use this regex on some input,
[^a-zA-Z0-9@#]
However this ends up removing lots of html special characters within the input, such as
227;, #1606;, #1588; (i had to remove the & prefix so that it wouldn't show up as the actual value..)
is there a way that I can convert them to their values so that it will satisfy the regexp expression? I also have no idea why the text decided to be so big.
i am getting a benign warning about possible data loss
warning C4244: 'argument' : conversion from 'const int' to 'float', possible loss of data
question
i remember as if float has a larger precision than int. So how can data be lost if i convert from a smaller data type (int) to a larger data type (float)
How can i convert a hex string lenght 6 bytes for example string ='1122aaccddff';
to raw binary data of lenght 8 byes the last 2 bytes shoul be padded with zeros,
I have a PostgreSQL backup made with PHPPgadmin using Export Copy (instead Copy SQL which is actually what I need).
File contains entries like this:
COPY tablename(id, field) FROM stdin;
...
How to convert this file to SQL format?
INSERT INTO tablename...
I want to use Pgadmin to to import this file using execute SQL command.
I have an app in the app store that uses a wildcard bundle identifier. I want to implement in-app purchashing , which requires a non wildcard ID. How do I convert the wildcard ID of an existing app to a static ID for in-app purchase and push notification?
Hi!
My project actually use XML files to define flow of the application.
I like to convert this XML a image that represent the flow, to use it in the documentation.
There is any c# library that help with the graphical part of a UML generation?
There is any XML standart format to generate UML flows that can be converted to IMG?
I need something like this
http://en.wikipedia.org/wiki/File:LampFlowchart.svg
Hello,
I'm having issues with multiple inheritance from different instantiations of the same template class. Specifically, I'm trying to do this:
template <class T>
class Base
{
public:
Base() : obj(NULL)
{
}
virtual ~Base()
{
if( obj != NULL ) delete obj;
}
template <class T>
T* createBase()
{
obj = new T();
return obj;
}
protected:
T* obj;
};
class Something
{
// ...
};
class SomethingElse
{
// ...
};
class Derived : public Base<Something>, public Base<SomethingElse>
{
};
int main()
{
Derived* d = new Derived();
Something* smth1 = d->createBase<Something>();
SomethingElse* smth2 = d->createBase<SomethingElse>();
delete d;
return 0;
}
When I try to compile the above code, I get the following errors:
1>[...](41) : error C2440: '=' : cannot convert from 'SomethingElse *' to 'Something *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1> [...](71) : see reference to function template instantiation 'T *Base<Something>::createBase<SomethingElse>(void)' being compiled
1> with
1> [
1> T=SomethingElse
1> ]
1>[...](43) : error C2440: 'return' : cannot convert from 'Something *' to 'SomethingElse *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
The issue seems to be ambiguity due to member obj being inherited from both Base< Something and Base< SomethingElse , and I can work around it by disambiguating my calls to createBase:
Something* smth1 = d->Base<Something>::createBase<Something>();
SomethingElse* smth2 = d->Base<SomethingElse>::createBase<SomethingElse>();
However, this solution is dreadfully impractical, syntactically speaking, and I'd prefer something more elegant. Moreover, I'm puzzled by the first error message. It seems to imply that there is an instantiation createBase< SomethingElse in Base< Something , but how is that even possible? Any information or advice regarding this issue would be much appreciated.
I am trying to build a Retirement Calculator as a chance to make something useful and learn C# better. Currently, I am trying to build a DataTable with a dynamic amount of rows/columns.
For context, I ask the user for some inputs regarding salary, % of salary being invested, and expected ROI. I have some other stuff too, but it isn't really part of the issue I am having. Because the number of columns I need for the DataTable is unknown until the formula is run (while+for loop completes), I am having trouble doing things as DataColumns. Hopefully the code below will help.
I am really trying to build the table one column at a time. I realize I could reverse it to build it one row at a time because the Years before retirement (yearsRetire) is known, but I would prefer not to and I want to learn more. Sorry for the indentation and commenting. I tried to leave some of my commented coding attempts in there. Thanks for any help.
public double calcROI()
{
double testROI = 0.00;
double tempRetireAmount = 0;
double adjustRetire = goalAmount * (1 + (Math.Pow(inflation,yearsRetire)));
// Loop through ROI values until the calculated retire amount with the test ROI
// is greater than the target amount adjusted for inflation
while (tempRetireAmount < adjustRetire)
{
//Increment ROI by 1% per while iteration
testROI += .01;
//Make a new Column to hold the values for ROI for this while iteration
//dtMain.Columns.Add(Convert.ToString(testROI));
//DataColumn tempdc = new DataColumn(Convert.ToString(testROI));
//Loop through the number of years entered by user and see the amount
//at Retirement with current ROI
for (int i = 0; i < yearsRetire; i++)
{
//Main formula to calculate amount after i years
tempRetireAmount = (tempRetireAmount + salary*savingsPct) * (1 + testROI);
// Add value for this year/ROI to table/column
//DataRow dr = .NewRow();
//dr tempRetireAmount;
//tempdc[i] = tempRetireAmount;
}
//Need to add column of data to my Main DataTable
//dtMain.Rows.Add(dr);
//dtMain.Columns.Add(tempdc);
}
return testROI;
}
Recently i learned that i can display images in a web page without referencing an image URL as follows :
<img class="disclosure" img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oIGRQbOY8MjgMAAABVSURBVBjTfc6xDcAwCETRM0rt5nbA+49j70DDAqSLsGXyJQqkVxxwNOeMiEA+waW1VuT/inrvG7wikht8UETy2ygVMjO4O8YYTf6AqrZyUwYlygAAXo+QLmeF4c4uAAAAAElFTkSuQmCC">
I had another small bmp image that i wanted to display, so i opened it in vim and the img source looke like:
When i paste this code where it needs to be pasted i only get "BM?"
How to i convert/paste this code properly to be used as an image source?
hi
i have data grid.
now here i am checking the condition if Companyrows.count is zero . if count is zero make data grid.visible is false.
List<Employee> Companyrows = new List<Employee>();
if (Companyrows.Count == 0)
{
dgrdRowDetail.Visibility = "Collapsed";
// getting error
// convert type 'string' to 'System.Windows.Visibility'
}
else
{
dgrdRowDetail.ItemsSource = Companyrows;
}
any help how to solve this issue would be great
thank you
We have serialized value of some objects persisted. Now we want to make substantial changes to some objects.
So what i want to do is load older version of object using old assembly then deserialize and serialize again with newer version of the object. I can have convert method which can transform old object to new one.
i have been converting object on fly on deserializer but in this case it's almost new object with same name.
I am trying to convert this native sql into an HQL query. Basically it returns all the contacts that are duplicates (by company, firstname, and lastname). The query below works great, but performing a joined subselect seems impossible in HQL is it not?!
Select c.* from contact c
join
(
Select c2.* from contact c2
group by c2.company, c2.firstname, c2.lastname, c2.teamId
having count(c2.contactId)1 and teamId=1
) dupes
on c.company=dupes.company
and c.teamId=1
and c.firstname=dupes.firstname
and c.lastname=dupes.lastname
order by c.company, c.firstname, c.lastname
Is there a way to convert or get the mapping from BizTalk map to an excel or a text file. From where we can directly see what field is mapped to what filed instead of following the lines. I have an BizTalk map which had around 600 fields mapped.
any pointers will be really helpful.
Hi all!
(Objective C)
Just using simple AudioServicesPlaySystemSoundID and its counterparts, but I can't find in the documentation if there is already a way to find the length of an audio file.
I know there is AudioServicesGetPropertyInfo, but that seems to return a byte-buffer - do audio files embed their length in themselves and I can just extract it with this?
Or is there perhaps a formula based on bit-rate * fileSize to convert to length-of-time?
mIL3S
www.milkdrinkingcow.com