from

mysql random rows

how to form a query to select 'm' rows randomly from a query result which has 'n' rows. for ex; 5 rows from a query result which has 50 rows i try like as follows but it errors select * from (select * from emp where alphabet='A' order by sal desc) order by rand() limit 5; u can wonder that why he needs sub query, i need 5 differen...

Get Ivar value from object in Objective-C

Can someone post an example of how I get an instance variable value that is a double? I tried using the object_getIvar() function but that didn't go very well because it seems like this function is only good for variables that return objects and not scalar data type. thanks in advance, fbr ...

creating procedure/tables from java files

hi, i am having the script of tables in normal txt files also i have scripts for procedures and functions. Now, i want to just read that file from java and i want op fire that string (script) on DB.. is it possible.. i have written statements for all DML queries, but here i want to use DDL queries from Java.. can any one help me.. ...

problem with php mail 'From' header

Hi, I'm building a website that sends and email to a user when he registers. My code (the gist of it): <?php $to = "[email protected]"; $subject = "Test mail"; $message = "Hello! \nThis is a simple email message."; $headers = "From: [email protected]"; $headers .= "\r\nReply-To: [email protected]"; $headers .= "\r\nX-Mailer: PHP/"...

html form with dhtml fade effects

i am trying to implement an html form with this dhtml fade effects: http://dhtmlpopups.webarticles.org/fade-effects.php but i got no luck. -i included a jquery validation in the fade effect, and when the user is entering values for the form, the pop-up times out, and when i redirect to "success page", i am pretty much unable to click ...

How do i reference the qjson.dll file from my qt project?

How do I refernce the qjson.dll file from one of qt project? For eg :C:\qjson-0.7.1\qjson\build\lib , in this location, I have qjson.dll and qjson.dll.a file. I want to use that dll from my qt project.How should I point to that location in that .pro file. I can't compile successful, the error that I got is C:/QTTest/foo/foo/main.cpp:6:...

PHP delete from file

Hey guys, ive search around and nothing ius QUITE what i need, i am horrible with php thus far. Basically, i have a text file serving as a database. each line has the form: id|lat|lng|details where: id is a unique integer, lat and lng are float and string details. I have a client page (locked under user-pass) in which the user ente...

Random word from giving letter

hi everybody Is there any possible code for getting output in php(all possible word from word dictionary) for example....for word "werflo" flower fowler reflow wolfer ...

insert into select from in a table with identity column

Hi, I am using a insert into select from statement to insert the result set of a query into a table containing an identity column. I am consistently getting an error Cannot insert duplicate key row in object 'dbo.TABLE1' with unique index 'IX_TABLE1'. Please help ...

PHP form values after POST in dropdown

I have a form with 'selected' values pulled from the database. Now I want the user to edit the values. When the data is send I want to show the new values. When I submit my form I always get the 'green' value? What am I doing wrong here? <?php // pulled from db $color = "blue"; // update if (isset($_POST['Submit'])) { echo "write ...

WPF How to get window reference that is loaded from a page that is into it?

Hi! I have a page that is into a window similiar to MDI. I want to get the reference of the window in what the page is placed into. The window is loaded. Thanks. ...

unable to download a file from rtmp server

Hi Team I want to download an audio file from red5 server using rtmp server. string strUri; strUri = "rtmp://XXX/oflaDemo/" + Session["streamName"].ToString(); string strUploadto; strUploadto = Server.MapPath("") + "\Audio\" + "myaudio.flv"; WebClient webClient = new WebClient(); //webClient.Dow...

Remove all styles from dynamic label in asp.net

I have a label and I got some text from database. text format like: Windows Server 2008 ...etc But sometimes there are different fonts or something like style. How can I remove all of them quickly? I know I can make it with replace command. But is there any quick way for it? ...

problem with get http request from IPhone

Hi, I am writing a sample PHP Web Service that is sending GET Http request from the iphone to the web server. The server side code is returning JSON Data to iphone, the server side code looks like: function getUsers(){ $con=mysql_connect("localhost","root","123456") or die(mysql_error()); if(!mysql_select_db("eventsfast",$con)) { ...

How to create a 2 bit gif from tiff file in dotnet

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. Unfortunately Gdi+ do not support 2bpp. Is there any source or library to do that? ...

MailMessage Question/Confusion

Using this: MailMessage mm = new MailMessage(); What is the difference between: mm.Sender = sender; and mm.From = from; ? Thank you ...

download file from the android web browser in sdcard?

HI. I have a Android application in which I want to download file from the web browser file link. But I don't know how can do it? Help me. ...

How to get the URL of selected hyperlink in android web browser?

Hi All. In my android application I want to get URL of the hyper link text, selected from web page in my android web browser. How can I get it? I want to URL of the hyper link (link that is clicked inside of that webview). please help me.. ...

how to access directory from file server in java?

HI... Currently I m working in a application in which application allows to access directory (which contains some files) from file server to Application (client). I tried following code.. URL url=("http://192.168.5.555/file-server/user/images/"); URI uri=url.toURI(); File list[]; list= new File(uri).listFiles(); But its thrown jav...

Reading Text from Pdf

Hi, This is Srinvas, How to read the content of a uploaded pdf file in asp.net. I tried but i am unable getting the content of a Uploaded File. I stuck with this Problem. If you have any Source code, Please provide me or Please help me.. Thanks & Regards Srinivas K. ...