i need to know the function that convert RGB image into black &white(binary image)
& i need to know if i can save modified image after conversion on hard disk
if so what's this function?
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.
How to convert doc to pdf using java api. where document contains various formats such as tables in ms word. when converting to pdf using iText. where actual document looks different to converted pdf. please provide any api not an exe installed for converting . must be an open source
I have a C# .NET 2.0 project A that has a form (TreeForm) that uses Tree objects.
I have a project B that has a class Oak that inherits Tree.
When I try to reference and use the TreeForm in project B with my Oak objects, it's looking for objects of type Tree.
I've tried casting the Oak objects to Tree, but I get the error "Cannot convert type Oak to Tree".
How can I use my Oak objects in the TreeForm from project A?
Hi, i want to convert HTML (having javascript ) to PDF..
how i can do that ??
i just want to show what is being shown in web page ... like my scenerio is . i am displaying a gantt chart that is generated by javascript library .. now i want to save that HTML web page in PDF ... how to do that ????
What is the most efficient way to convert a MySQL query to CSV in PHP please?
It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required).
The CSV should also include one top line of field names.
Cheers.
I am a newbie in Python. I want to substract interval time from my log file, but the problem is I cannot convert millisecond string of log file into datetime format. For example, I have 15:55:05.12345 and I want to remove 5.12345 seconds from this string, and shwow result of 15.55.00.00000 in Python. How can I do that? Currently, I am using python 2.5.
Thank you in advance.
Hai
I have worked with clean URL in php. Now I want to convert a clean URL to normal php URL Like
http://localhost/url/user/2/a to
http://localhost/url/user.php?id=2&sort=a
Can any one give me the way to do this?
I have been looking into coloring objects like ellipses with code such as
SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(0x78FF0000));
I'd like to play around further with this by entering FromArgb's argument into a textbox on a form, then using the textbox to set the Brush's color. How would I convert the textbox's text into an argument usable by FromArgb?
I would like to convert this fluent approach to xml:
container.Register(
AllTypes.FromAssemblyNamed("Company.DataAccess")
.BasedOn(typeof(IReadDao<>)).WithService.FromInterface(),
AllTypes.FromAssemblyNamed("Framework.DataAccess.NHibernateProvider")
.BasedOn(typeof(IReadDao<>)).WithService.Base());
Is there any way of doing this, maintaining the simplicity?
Hi there! what about this one:
I want to format the currentTime displayed by a videoPlayer component inside flex, something like : 8230.999 to something like 01:59:59:999 which is "hours:minutes:seconds:milliseconds"
I trie different sets of codes but they can't get it to work because currentTime is nor a correct miliseconds time as it adds a floating 3 digit point to seconds;
so instead of : 2000ms it outputs 2.000
something people like me just can't understand!
thanx for any help :)
### UPDATE
I still have problem with milliseconds.
here's the current MXML:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
protected function convert_clickHandler(event:MouseEvent):void
{
var val:Number = new Number(inPut.text); //inPut.text = 1000.001
//val = val * 1000;
outPut.text = timeFormat(val);
}
public static function timeFormat(value:Number):String
{
var milliseconds:Number = value % 1000;
var seconds:Number = Math.floor((value/1000) % 60);
var minutes:Number = Math.floor((value/60000) % 60);
var hours:Number = Math.floor((value/3600000) % 24);
var s_miliseconds:String = (milliseconds<10 ? "00" : (milliseconds<100 ? "0" : ""))+ String(milliseconds);
var s_seconds:String = seconds < 10 ? "0" + String(seconds) : String(seconds);
var s_minutes:String = minutes < 10 ? "0" + String(minutes) : String(minutes);
var s_hours:String = hours < 10 ? "0" + String(hours) : String(hours);
return s_hours + ":" + s_minutes + ":" + s_seconds + '.'+s_miliseconds;
// returns 00:00:01.000.0009999999999763531 should return 00:00:01.001
// I still have problem with milliseconds
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:TextInput x="240" y="72" id="inPut" text="1000.001"/>
<s:TextInput x="240" y="140" id="outPut"/>
<s:Button x="274" y="107" label="convert" id="convert" click="convert_clickHandler(event)"/>
</s:Application>
I am using DJGPP compiler for DOS in that i have to use WINDOWS.h which is a win32 api for conversion of system time to file time for NTFS file system.As windows.h is win32 api it is giving error "windows.h-no such file or directory".So how to convert system time to file time (i.e.8 byte structure) in NTFS file system for NTFS file system in DOS.
i am looking for a way to convert the Arabic numerical string "??????????" to an English
numerical string "0123456789"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dim Anum as string ="??????????"
dim Enum as string =get_egnlishNum(Anum)
End Sub
private function get_egnlishNum(byval _Anum as string) as string
'' converting code
end function
how to convert avi file to an jpg's images array using .net , i need to develop a task that will take the avi file and save it as jpg images on another folder
Hi,
I need to convert char to hex values. Refer to the Ascii table but I have a few examples listed below:
char 1 = 31
2 = 32
3 = 33
4 = 34
5 = 35
A = 41
a = 61 etc
Therefore string str = "12345";
Need to get the converted str = "3132333435"
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, i'm using C#.
I'm merging legacy Systems and some components use Markdown and others use Textile formatting. This is extremely confusing to my users. Therefore I want to standardize on Markdown.
Is there a way to convert at least the Bulk of Textile formatting to markdown automatically?
My objective is to paste together several ( a lot, actually ) armature animations, each in a separate symbol. I have no idea how to do it, armature layers are a bit... strange. So i see only one solution: convert it to a regular layer.
With reference to the following question: Convert NSData into HEX NSSString
I have solved the problem using the solution provided by Erik Aigner which is:
NSData *data = ...;
NSUInteger capacity = [data length] * 2;
NSMutableString *stringBuffer = [NSMutableString stringWithCapacity:capacity];
const unsigned char *dataBuffer = [data bytes];
NSInteger i;
for (i=0; i<[data length]; ++i) {
[stringBuffer appendFormat:@"%02X", (NSUInteger)dataBuffer[i]];
}
However, there is one small problem in that if there are extra zeros at the back, the string value would be different. For eg. if the hexa data is of a string @"3700000000000000", when converted using a scanner to integer:
unsigned result = 0;
NSScanner *scanner = [NSScanner scannerWithString:stringBuffer];
[scanner scanHexInt:&result];
NSLog(@"INTEGER: %u",result);
The result would be 4294967295, which is incorrect. Shouldn't it be 55 as only the hexa 37 is taken?
So how do I get rid of the zeros?
EDIT: (In response to CRD)
Hi, thanks for clarifying my doubts. So what you're doing is to actually read the 64-bit integer directly from a byte pointer right? However I have another question. How do you actually cast NSData to a byte pointer?
To make it easier for you to understand, I'll explain what I did originally.
Firstly, what I did was to display the data of the file which I have (data is in hexadecimal)
NSData *file = [NSData dataWithContentsOfFile:@"file path here"];
NSLog(@"Patch File: %@",file);
Output:
Next, what I did was to read and offset the first 8 bytes of the file and convert them into a string.
// 0-8 bytes
[file seekToFileOffset:0];
NSData *b = [file readDataOfLength:8];
NSUInteger capacity = [b length] * 2;
NSMutableString *stringBuffer = [NSMutableString stringWithCapacity:capacity];
const unsigned char *dataBuffer = [b bytes];
NSInteger i;
for (i=0; i<[b length]; ++i) {
[stringBuffer appendFormat:@"%02X", (NSUInteger)dataBuffer[i]];
}
NSLog(@"0-8 bytes HEXADECIMAL: %@",stringBuffer);
As you can see, 0x3700000000000000 is the next 8 bytes. The only changes I would have to make to access the next 8 bytes would be to change the value of SeekFileToOffset to 8, so as to access the next 8 bytes of data.
All in all, the solution you gave me is useful, however it would not be practical to enter the hexadecimal values manually. If formatting the bytes as a string and then parsing them is not the way to do it, then how do I access the first 8 bytes of the data directly and cast them into a byte pointer?
I want to convert this [email protected] to
hello@domain.com
I have tried:
url_encode($string)
this provides the same string I entered, returned with the @ symbol converted to %40
also tried:
htmlentities($string)
this provides the same string right back.
I am using a UTF8 charset. not sure if this makes a difference....