Вернуться   CoderX :: Forums > Основные форумы > Программинг
Войти через OpenID

Программинг Форум для тем связанных с программированием

Чат (Новых сообщений с момента вашего последнего визита нет)
Загрузка...
Задавайте ваши вопросы на форуме. Чат предназначен для небольших разговоров.
 
Ответ
 
Опции темы Опции просмотра
Старый 21.01.2010, 15:10   #31
Местный
 
Аватар для peacefully
 
Регистрация: 21.10.2009
Сообщений: 690
Сказал Спасибо: 125
Имеет 180 спасибок в 68 сообщенях
peacefully пока неопределено
По умолчанию

Ну вы еще подеритесь)

Лично я привык разделять задачи по тому, где их проще решить. Чаще всего Delphi хватает с головой, как бы его не критиковали.
peacefully вне форума   Ответить с цитированием
Старый 21.01.2010, 23:12   #32
Местный
 
Регистрация: 08.05.2008
Сообщений: 107
Сказал Спасибо: 6
Имеет 12 спасибок в 6 сообщенях
finomen пока неопределено
По умолчанию

делфи создан для работы с базами данных, в этом он однозначно выигрывает. Много удобных, хорошо отлаженных и оптимизированных компонент. Но делфи слишком высокоуровневый язык.

ЗЫ по теме
Цитата:
Language Comparison! (Ted Dennison)

I run across these lists everywhere. Unfortunately, they all seem to have been done by some brain-damaged soul who thinks C is a "normal" language. So I have made an attempt to come up with a new list that is a little more accurate, at least where I sit.

Ada :
You aim at your foot and pull the trigger, but the safety stops the gun from firing. The safety won't budge until you tag your foot with a sign reading "Bullet Hole in this foot", and call the paramedics. You do so, then shoot yourself in the foot.

C :
The gun comes in 38 pieces, with a set of assembly instructions. After painstakingly assembling the pieces, you pull the trigger and the gun promptly backfires and blows your head off.

Assembly :
The same as C, except you have to hand-machine all the pieces as well. When you pull the trigger, your whole house explodes.

Java:
You break into someone else's home and steal their water pistol. You then make a child gun that uses .38 rounds instead of water. When you pull the trigger on the child gun, nothing happens to you, but everyone who visits your house gets shot in the foot.

Basic :
You aim the gun at a straight horizontal and pull the trigger, which causes a stream of water to be squirted straight down onto your foot.

Pearl :
You aim the gun at your foot and pull the trigger. There is no explosion, but gravity causes the bullet to slide out of the barrel and bounce off your foot.

Lisp :
You do a small part of the remaining work involved in shooting yourself in the foot. You then call yourself, and tell yourself to shoot yourself in the foot.

Pascal :
The same as Ada, except when you pull the trigger a little sign pops out reading "BANG!".

C++ :
The same as Java, except you try to build the parent water pistol using the gun tools from the C gun. When you pull the trigger on the child gun, the parent C gun explodes, spraying water everywhere, including the chamber of the child gun. This causes the child gun to backfire, blowing your head off.

Visual C++ :
The same as C++, except that the bullets, the gun parts, the tools you use to put it together, the hospital you get taken to afterwards, and the ambulance that takes you there are all owned by the same company.

APL :
Whenever you pull the trigger, no matter where you aim the gun, the bullet ricochets off of 13 objects and lodges in your foot. The gun has been examined by ballistics experts, mechanical engineers, and even the person who made it, and none of them can figure out how it works.

FORTRAN :
When you aim the gun at your foot and pull the trigger, a table indexing error causes the gun to shoot its firing pin into your foot instead of the bullet.
finomen вне форума   Ответить с цитированием
Старый 22.01.2010, 00:13   #33
Рыцарь
 
Аватар для alexteam
 
Регистрация: 07.03.2009
Сообщений: 9,139
Сказал Спасибо: 70
Имеет 2,820 спасибок в 1,735 сообщенях
alexteam на пути к лучшему
По умолчанию

Не вижу сабжа.
__________________
L2Ext - project closed.
alexteam вне форума   Ответить с цитированием
Старый 22.01.2010, 00:30   #34
Местный
 
Регистрация: 08.05.2008
Сообщений: 107
Сказал Спасибо: 6
Имеет 12 спасибок в 6 сообщенях
finomen пока неопределено
По умолчанию

по теме холивара.....вот более полная версия. все особенности языков хорошо описаны)
Цитата:
The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you’re currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas.

C
You shoot yourself in the foot.

C++
You accidentally create a dozen clones of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can’t tell which are bitwise copies and which are just pointing at others and saying, “That’s me, over there.”

JAVA
After importing java.awt.right.foot.* and java.awt.gun.right.hand.*, and writing the classes and methods of those classes needed, you’ve forgotten what the hell you’re doing.

Ruby
Your foot is ready to be shot in roughly five minutes, but you just can’t find anywhere to shoot it.

PHP
You shoot yourself in the foot with a gun made with pieces from 300 other guns.

ASP.NET
Find a gun, it falls apart. Put it back together, it falls apart again. You try using the .GUN Framework, it falls apart. You stab yourself in the foot instead.

SQL
SELECT @ammo:=bullet FROM gun WHERE trigger = ‘PULLED’;
INSERT INTO leg (foot) VALUES (@ammo);

Perl
You shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you. (via Andy)

Javascript
YOu’ve perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.

CSS
You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.

FORTRAN
You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling ability.

Modula2
After realizing that you can’t actually accomplish anything in this language, you shoot yourself in the head.

COBOL
Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.

LISP
You shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds ….

BASIC
Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.

FORTH
Foot in yourself shoot.

APL
You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters.

Pascal
The compiler won’t let you shoot yourself in the foot.

SNOBOL
If you succeed, shoot yourself in the left foot.
If you fail, shoot yourself in the right foot.

Concurrent Euclid
You shoot yourself in somebody else’s foot.

HyperTalk
Put the first bullet of the gun into the foot of the left leg of you.
Answer the result.

Motif
You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.


Unix
% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls
%

Paradox
Not only can you shoot yourself in the foot, your users can too.

Revelation
You’ll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.

Visual Basic
You’ll shoot yourself in the foot, but you’ll have so much fun doing it that you won’t care.

Prolog
You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn’t allow it to explain.

Ada
After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.

Assembly
You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After that’s done, you pull the trigger, the gun beeps several times, then crashes.

370 JCL
You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.

Python
You try to shoot yourself in the foot but you just keep hitting the whitespace between your toes. (via Marco Azaro)
finomen вне форума   Ответить с цитированием
Старый 22.01.2010, 12:17   #35
Рыцарь
 
Аватар для alexteam
 
Регистрация: 07.03.2009
Сообщений: 9,139
Сказал Спасибо: 70
Имеет 2,820 спасибок в 1,735 сообщенях
alexteam на пути к лучшему
По умолчанию


есть русская версия данного текта. но, опять же. компилятор - дурак. его можно обмануть. да и сабжа опять же нет -)
__________________
L2Ext - project closed.
alexteam вне форума   Ответить с цитированием
Старый 31.01.2010, 18:03   #36
Пользователь
 
Регистрация: 09.06.2009
Сообщений: 73
Сказал Спасибо: 10
Имеет 10 спасибок в 9 сообщенях
klemberg пока неопределено
По умолчанию

Цитата:
есть русская версия данного текта.
http://yrs-raider.livejournal.com/6139.html
klemberg вне форума   Ответить с цитированием
Старый 31.01.2010, 20:21   #37
Admin!
 
Аватар для xkor
 
Регистрация: 04.08.2007
Сообщений: 2,360
Сказал Спасибо: 113
Имеет 1,566 спасибок в 651 сообщенях
xkor на пути к лучшему
По умолчанию

klemberg, эх, а про дельфи и там нет(
__________________
Я здесь практически не появляюсь!, Skype - ikskor
xkor вне форума   Ответить с цитированием
Старый 02.02.2010, 20:33   #38
Местный
 
Аватар для peacefully
 
Регистрация: 21.10.2009
Сообщений: 690
Сказал Спасибо: 125
Имеет 180 спасибок в 68 сообщенях
peacefully пока неопределено
По умолчанию

Цитата:
Модула-2: После того, как вы понимаете, что фактически ничего не можете сделать на этом языке, вы простреливаете себе голову.
peacefully вне форума   Ответить с цитированием
Старый 12.02.2010, 06:09   #39
Местный
 
Аватар для peacefully
 
Регистрация: 21.10.2009
Сообщений: 690
Сказал Спасибо: 125
Имеет 180 спасибок в 68 сообщенях
peacefully пока неопределено
По умолчанию

Вообщем, суть была, к чему вопрос. Надо построить сеть с фрактальной топологией (граф, короче). Нашел три способа:
1) Строить матрицу смежности. Самое простое. На каждом шаге роста сети вполне примитивно матрица изменялась, сделать не составило труда. Еще в начале темы было сказано, что это N*N бит. А когда построил оказалось, что процентов 80% (ну не важно по числу, ОЧЕНЬ много, короче) матрицы занимают нули. Потому вторая идея была (в теме озвучил тоже), чтобы избавиться от нулевых ячеек. С простейшими начальными параметрами прога сдохла на 3126 вершинах (следующий шаг не осилила).
2) Список смежности. Организовал как массив массивов. Без нулей работает шустрее гораздо, оно и понятно. С теми же параметрами генерация превысила 15к вершин, дальше прога корректно отказалась че-то делать по причине 'Out of memory'. До реальных размеров все равно не дотягивает...
3) Затрудняюсь сказать, какое у этого название и есть ли вообще. Что-то среднее между деревьями и списками. Мультисвязанный двунаправленный список какой-то, короче. Есть объект-вершина, у которой указаны следующие смежные вершины-потомки и предыдущая вершина-предок. Че-то схожее с сетью гиперссылок в WWW: заходишь на какую-нить страницу и знаешь: а) откуда пришел; б) куда можно уйти с нее, глядя на ссылки на ней. Кажись, чОтче отражает реальность, но вот памяти жрать будет больше, чем список смежности из п.2 (хоть и всего на ~N).

Забыл уже, к чему писал это.. короче, вопрос об том, как обойти 'Out of memory'. Что читать на тему "как разместить данные на жестком диске, чтобы быстро к ним обращаться (читать, редактировать)"? "Жесткий диск" и "быстро" - это, понимаю, не очень, но как-то надо. Пока в голову приходит только N файлов (=кол-ву вершин) с перечисленными смежностями, но уверен, что есть че-то рациональнее))
peacefully вне форума   Ответить с цитированием
Старый 12.02.2010, 13:25   #40
Рыцарь
 
Аватар для alexteam
 
Регистрация: 07.03.2009
Сообщений: 9,139
Сказал Спасибо: 70
Имеет 2,820 спасибок в 1,735 сообщенях
alexteam на пути к лучшему
По умолчанию

если я правильно понял 3й пункт это некоторое подобие treeview.
памяти жрать будет немеряно..
писалось на коленке..

delphi Код:
Tnode=class   ParentNode : Tnode; //откуда пришли.   CHildNodes : tlist; //куда можем пойти   Prop1:string; //одно из свойств этой вершины.   constructor create(SetParent:Tnode);   destructor destroy; override; end; constructor tnode.create; begin   childnodes := tlist.create;   if ParentNode <> nil then     ParentNode.CHildNodes.add(self); //если есть парент - добавляем себя в список его чайлдов end; destructor tnode.destroy; begin   if ParentNode <> nil then     ParentNode.CHildNodes.remove(self)//убираем себя из списка чайлдов парента   while CHildNodes.count > 0 do     Tnode(childnodes.items[0]).destroy; //уничтожаем все дочерние узлы   childnodes.destroy; end;

использование (конечно же следует делать рекурсией)
delphi Код:
var   TopLevel, CurrentParent: tnode;   i : integer; begin   TopLevel := tnode.create(nil);   toplevel.prop1 := 'Верхний узел';   CurrentParent := tnode.create(toplevel);   CurrentParent.prop1 := 'Узел вложенный в верхний узел'   CurrentParent := tnode.create(toplevel);   CurrentParent.prop1 := 'Второй узел вложенный в верхний узел'   CurrentParent := tnode.create(toplevel);   CurrentParent.prop1 := 'Третий узел вложенный в верхний узел'   CurrentParent := tnode.create(CurrentParent);   CurrentParent.prop1 := 'Узел вложенный в третий узел вложенный в верхний узел';   while i < toplevel.childnodes do   begin     showmessage(Tnode(toplevel.childnodes.items[i]).Prop1); //показываем свойство всех дочерних узлов верхнего узла     inc(i);   end;   TopLevel.destroy; //разрушение топлевела и всех его дочерних уровней с их дочерними уровнями end;

сохранение и загрузку можно делать в tnode.create/tnode.destroy передавая туда скажем файлстим как параметр.
т.е. при создании нода он будет читать с файлстрима а при разрушении писать туда свои свойства и только тогда приступать к разрушению дочерних нодов.
кол-во дочерних узлов в каждом узле не должно превышать maxint (довольно большое значение)

Добавлено через 38 минут
проверил.
у меня макс кол-во вершин в графе составило 52022554. дальше - закончилась память выделяемая приложению ~2гб. сурсы проверялки прикрепил. -)

Добавлено через 13 минут
можно использовать LargeAddressAware (или 4гбпатч) чтобы на 64битных машинах вместо 2гб памяти выделялось 4. что увеличит в 2 раза кол-во овзможных нодов.
Вложения
Тип файла: rar test.rar (1.4 Кб, 21 просмотров)
__________________
L2Ext - project closed.

Последний раз редактировалось alexteam, 12.02.2010 в 13:28. Причина: Добавлено сообщение
alexteam вне форума   Ответить с цитированием
За это сообщение alexteam нажился спасибкой от:
Ответ

  CoderX :: Forums > Основные форумы > Программинг



Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы не можете редактировать сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


Часовой пояс GMT +4, время: 10:31.

vBulletin style designed by MSC Team.
Powered by vBulletin® Version 3.6.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Locations of visitors to this page
Rambler's Top100

Вы хотите чувствовать себя в безопасности? чоп Белган обеспечит её!