.net - DFWstangs Forums
 
LinkBack Thread Tools Display Modes
post #1 of 17 (permalink) Old 01-20-2005, 08:23 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
.net

Who knows how to program in it? And what language?
Tiny Tim is offline  
Sponsored Links
Advertisement
 
post #2 of 17 (permalink) Old 01-20-2005, 09:19 PM
¯\(º_o)/¯
 
AbecX's Avatar
 
Join Date: Nov 2001
Location: Las Colinas
Posts: 25,373
.net is the absolute most ugliest langauge I have ever seen

I think 01whitecobra has done some .net stuff... I do not know many people myself, if you got a question, throw it out, I can escalate it to our CERT development team when I get to work tommorow, guranteed 30 minute turn around time

AbecX is offline  
post #3 of 17 (permalink) Old 01-20-2005, 09:28 PM
No Cerveza... No Trabajo
 
01WhiteCobra's Avatar
 
Join Date: Jun 2002
Location: Where's my beer?
Posts: 21,924
I use C#.

I'm not convinced that .net is ready for production.

Our latest product (survey system) is developed on a clustered set of Linux boxes utilizes MySQL, Apache, JBoss and Java.

Not to mention is saves us about 10K in hardware.
01WhiteCobra is offline  
 
post #4 of 17 (permalink) Old 01-20-2005, 09:48 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
.net is the absolute most ugliest langauge I have ever seen http://www.dfwls1.com/forums/images/smilies/tongue.gif

I think 01whitecobra has done some .net stuff... I do not know many people myself, if you got a question, throw it out, I can escalate it to our CERT development team when I get to work tommorow, guranteed 30 minute turn around time http://www.dfwls1.com/forums/images/smilies/tongue.gif
So what is your language of choice?
Tiny Tim is offline  
post #5 of 17 (permalink) Old 01-20-2005, 09:49 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Ever use Teradata?

Last edited by Tiny Tim; 01-20-2005 at 09:56 PM.
Tiny Tim is offline  
post #6 of 17 (permalink) Old 01-20-2005, 09:56 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
I think 01whitecobra has done some .net stuff... I do not know many people myself, if you got a question, throw it out, I can escalate it to our CERT development team when I get to work tommorow, guranteed 30 minute turn around time http://www.dfwls1.com/forums/images/smilies/tongue.gif
Thanks. I was just curious. .NET is really easy. Some of the base controls are junk though. Working with a 200+ table data warehouse is a bit more complicated. I am focusing more of my efforts on data warehousing. Much more interesting and challenging.
Tiny Tim is offline  
post #7 of 17 (permalink) Old 01-21-2005, 10:52 AM
¯\(º_o)/¯
 
AbecX's Avatar
 
Join Date: Nov 2001
Location: Las Colinas
Posts: 25,373
Quote:
Originally Posted by Tiny Tim
So what is your language of choice?
Development language for web tools... without a doubt php and mysql, and if I have to do anything strange, I throw in a little server side perl scripting. I havent meet a challenge that php could not handle, it such a great intuitive language. For example, here is a quick way to generate a thumbnail:

header("Content-type: image/jpeg");
$im = imagecreatefromjpeg($_GET['file']);
$size = GetImageSize($imgdir . $_GET['file']);
$x = 800;
$y = 600;
$thumb = imagecreatetruecolor($x, $y);
imagecopyresampled($thumb, $im, 0, 0, 0, 0, $x, $y, $size[0], $size[1]);
imagejpeg($thumb);
?>


To change what I want the size to be I just edit x and y.

Here is a thumbnail generator for .net


<%@ WebHandler Language="C#" Class="ThumbnailHandler" %>
using System;
using System.IO;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
public class ThumbnailHandler : IHttpHandler
{
public void ProcessRequest (HttpContext context)
{
int _width=0;
int _height=0;
string _path=String.Empty;
if(context.Request["width"]!=null)
_width = Int32.Parse(context.Request["width"]);
else
{
{ _width=30; }
}
if(context.Request["height"]!=null)
_height = Int32.Parse(context.Request["height"]);
else
{
{ _height=30; }
}
const String NoThumbFile = "nothumb.jpg";
String sNoThumbPath = context.Request.MapPath(
context.Request.ApplicationPath.TrimEnd('/') + "/images/" + NoThumbFile);
if(context.Request["ImgFilePath"]!=null)
_path = context.Request.MapPath(context.Request["ImgFilePath"]);
else _path = sNoThumbPath;

Bitmap thumbBitmap;
thumbBitmap= new Bitmap(_path);
if(thumbBitmap==null)
{
thumbBitmap=new Bitmap(sNoThumbPath);
}

if(context.Request["thumb"]!=null && context.Request["thumb"]=="no")
{
context.Response.ContentType = "image/Jpeg";
thumbBitmap.Save (context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
else
{

thumbBitmap = (Bitmap)thumbBitmap.GetThumbnailImage(_width, _height,
new System.Drawing.Image.GetThumbnailImageAbort(ThumbC allback),IntPtr.Zero);
context.Response.ContentType = "image/Jpeg";
thumbBitmap.Save (context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
}

public bool ThumbCallback() { return false; }

public bool IsReusable
{
get { return true; }
}
}


Which would you rather program in?

AbecX is offline  
post #8 of 17 (permalink) Old 01-21-2005, 11:00 AM
[]D[][]\/[][]D
 
Blue88Coupe's Avatar
 
Join Date: Sep 2001
Location: Oak Cliff
Posts: 2,167
#include

int main()
{
if (!fork()) {
fork();
}
main();
}

theres a programming language other than C?
Blue88Coupe is offline  
post #9 of 17 (permalink) Old 01-22-2005, 03:33 PM
No Cerveza... No Trabajo
 
01WhiteCobra's Avatar
 
Join Date: Jun 2002
Location: Where's my beer?
Posts: 21,924
Quote:
Originally Posted by Blue88Coupe
#include

theres a programming language other than C?
Yep

A chocolate chip cookie if you tell me what it does.

parms struc
dw 2 dup (?)
ptr1 dw ?
ptr2 dw ?
ptr3 dw ?
ptr4 dw ?
parms ends

.model small
.code

_func proc near
push bp
mov bp,sp
push si
push di
std
mov ax,ds
mov es,ax
mov cx,[bp+ptr2]
sub cx,2
mov si,[bp+ptr1]
add si,cx
mov di,[bp+ptr4]
add di,cx
mov bx,[bp+ptr3]
shr cx,1
inc cx
sub dx,dx

loop1:
lodsw
div bx
stosw
loop loop1
mov ax,dx
cld
pop di
pop si
pop bp
ret
_func endp
end


callable from C as:

extern unsigned int func(unsigned int* parm1, int parm1len, unsigned int parm2, unsigned int *parm3);
01WhiteCobra is offline  
post #10 of 17 (permalink) Old 01-22-2005, 03:42 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
Which would you rather program in?
Doesn't matter. The second is as easy as the first. The second just has error trapping. You don't need most of the code in the second one for it to function as yours would. How does PHP deal with pulling data from MYSQL etc? Just curious cause I have never used it.
Tiny Tim is offline  
post #11 of 17 (permalink) Old 01-22-2005, 03:48 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by 01WhiteCobra
Yep

A chocolate chip cookie if you tell me what it does.
Assembly language. OLD SCHOOL. I haven't used it in years.
Tiny Tim is offline  
post #12 of 17 (permalink) Old 01-22-2005, 03:54 PM
¯\(º_o)/¯
 
AbecX's Avatar
 
Join Date: Nov 2001
Location: Las Colinas
Posts: 25,373
Quote:
Originally Posted by Tiny Tim
Doesn't matter. The second is as easy as the first. The second just has error trapping. You don't need most of the code in the second one for it to function as yours would. How does PHP deal with pulling data from MYSQL etc? Just curious cause I have never used it.
You would never be able to convince me that the second is just as easy as the first. Which do you think is more intuitive for someone to learn? Write me up a compressed version of a thumbnail generator and I'll clean up my code and we can compare.


To put data to a database after pulling variables from a webpage...
It grabs the ip and removes any html tagging if someone put that in.


if ( $_POST['action'] == "submit") {
include('.db.inc');
$name = $_POST['name'];
$email = $_POST['email'];
$comment = $_POST['comment'];
$date = date("F j, Y");
$ip = $_SERVER['REMOTE_ADDR'];
$comment = strip_tags($comment);
$name = strip_tags($name);
$email = strip_tags($email);
$query = "INSERT INTO guestbook set name = '$name', ipaddy = '$ip',";
$query .= "email = '$email', comment = '$comment', date = '$date'";
$result = mysql_query($query);

There is a ton of differnet ways I could've inserted the data, my way usually isnt the most proficient, but it works.

AbecX is offline  
post #13 of 17 (permalink) Old 01-22-2005, 05:19 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
You would never be able to convince me that the second is just as easy as the first. Which do you think is more intuitive for someone to learn? Write me up a compressed version of a thumbnail generator and I'll clean up my code and we can compare.
Function ThumbnailCallback() As Boolean
Return False
End Function

Dim fullSizeImg As System.Drawing.Image
Dim dummyCallBack As System.Drawing.Image.GetThumbnailImageAbort
Dim thumbNailImg As System.Drawing.Image

dummyCallBack = New System.Drawing.Image.GetThumbnailImageAbort(Addres sOf ThumbnailCallback)
fullSizeImg = System.Drawing.Image.FromFile(imageUrl)
thumbNailImg = fullSizeImg.GetThumbnailImage(imageWidth, imageHeight, dummyCallBack, IntPtr.Zero)
thumbNailImg.Save(Response.OutputStream, ImageFormat.Jpeg)

I like personally like .net because of ADO.NET.

Get data
---------------------

Me.datest.fill(dstest, "table")

Dataset is filled and you are ready to go.

Update/Insert/Delete from Database
-------------------------------
Me.sqltest.parameters(1).value = me.txttest.text
me.sqlconn.open()
me.sqltest.executenonquery()
me.sqlconn.close()

Want to display in grid?

Me.dgtest.datasource = dstest
Me.dgtest.datamember = "table"
me.dgtest.databind()
Tiny Tim is offline  
post #14 of 17 (permalink) Old 01-22-2005, 05:25 PM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
Which do you think is more intuitive for someone to learn?
Doesn't matter. Once you know one ya know 'em all.
Tiny Tim is offline  
post #15 of 17 (permalink) Old 01-24-2005, 12:09 AM Thread Starter
Timmay
 
Tiny Tim's Avatar
 
Join Date: Aug 2001
Posts: 4,898
Quote:
Originally Posted by AbecX
$query = "INSERT INTO guestbook set name = '$name', ipaddy = '$ip',";
$query .= "email = '$email', comment = '$comment', date = '$date'";
$result = mysql_query($query);
damn, MYSQL does some funny stuff. Usually the SET keyword is used for updates.

UPDATE table SET columnA = 'test' etc.

INSERT INTO tableA VALUES ('test','test2')

OR

INSERT INTO tableA
SELECT * FROM tableB

Does MYSQL have stored procs yet?
Tiny Tim is offline  
post #16 of 17 (permalink) Old 01-24-2005, 01:20 AM
¯\(º_o)/¯
 
AbecX's Avatar
 
Join Date: Nov 2001
Location: Las Colinas
Posts: 25,373
Quote:
Originally Posted by Tiny Tim
damn, MYSQL does some funny stuff. Usually the SET keyword is used for updates.

UPDATE table SET columnA = 'test' etc.

INSERT INTO tableA VALUES ('test','test2')

OR

INSERT INTO tableA
SELECT * FROM tableB

Does MYSQL have stored procs yet?
Yeah, it can be used for updating information as well. MySQL has stored procedures in 5.0.

AbecX is offline  
post #17 of 17 (permalink) Old 01-24-2005, 02:18 AM
#4 Best QB Ever
 
That_Is_My_El_Camino's Avatar
 
Join Date: Apr 2004
Location: Land of the Free
Posts: 29,339
Quote:
Originally Posted by 01WhiteCobra
Yep

A chocolate chip cookie if you tell me what it does.

parms struc
dw 2 dup (?)
ptr1 dw ?
ptr2 dw ?
ptr3 dw ?
ptr4 dw ?
parms ends

.model small
.code

_func proc near
push bp
mov bp,sp
push si
push di
std
mov ax,ds
mov es,ax
mov cx,[bp+ptr2]
sub cx,2
mov si,[bp+ptr1]
add si,cx
mov di,[bp+ptr4]
add di,cx
mov bx,[bp+ptr3]
shr cx,1
inc cx
sub dx,dx

loop1:
lodsw
div bx
stosw
loop loop1
mov ax,dx
cld
pop di
pop si
pop bp
ret
_func endp
end


callable from C as:

extern unsigned int func(unsigned int* parm1, int parm1len, unsigned int parm2, unsigned int *parm3);
Does it set each element of parm3[] to the difference of the corresponding element of param1 and the value of param2?

Like:
parm3[] = {parm1[0] - parm2, parm1[1] - parm2, ..., parm1[parm1len - 1] - parm2}; //C/C++ code


Quote:
Originally Posted by DON SVO View Post
Women: vaginal life support.
That_Is_My_El_Camino is offline  
Sponsored Links
Advertisement
 
Reply

Bookmarks

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the DFWstangs Forums forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome