Что у нас в буфере обмена?
|
|
uSite Team
1320 сообщений
Мужчина
|
0-0-
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
$PAGE_ID$
|
|
|
|
|
Premium user
682 сообщения
Мужчина
|
|
|
|
|
|
uSite Team
3601 сообщениий
Мужчина
|
ertView.asp
По всем вопросам обращаемся на support@usite.su
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
$(this)
|
|
|
|
|
Пользователь
130 сообщений
Мужчина
|
<a href=ссылка" target="_blank">Название ссылки</a>
|
|
|
|
|
Бывалый
398 сообщений
Мужчина
|
|
|
|
|
|
Бывалый
1284 сообщения
Мужчина
|
http://searchengineland.com/Добавлено (06.12.2011, 21:39) --------------------------------------------- Ой, не реклама. Просто у Терехов'а спрашивал один вопросик и ссылочка осталась.
|
|
|
|
|
Coder
701 сообщениий
Мужчина
|
<div id="tabs"></div> <script type="text/javascript"> var d = [['left', 'b', '<div id="tab1">Левый</div>'], ['center', 'e', '<div id="tab2">Центер</div>'], ['right', 'h', '<div id="tab3">Правый</div>'], ['j', 'k', '']]; $('#tabs').html(new _uTabCtrl("tabs_", 3,{noinit:0}, [d[0][0], d[1][0], d[2][0]], [d[0][2], d[1][2], d[2][2]], [{ close: 0, id: "tab1", }, { close: 0, id: "tab2", }, { close: 0, id: "tab3", }]) ); </script>
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
else{ $('.svetKino1 span').text('Выключить свет');
|
|
|
|
|
Бывалый
247 сообщений
Мужчина
|
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
Не указаны размеры полного изображения
|
|
|
|
|
Пользователь
54 сообщения
Мужчина
|
http://spisivay.ru/Добавлено (08.12.2011, 19:23) --------------------------------------------- http://spisivay.ru/
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
Firefox не может найти сервер www.usite.su.
|
|
|
|
|
uSite Team
535 сообщений
Мужчина
|
591394619
|
|
|
|
|
Бывалый
398 сообщений
Мужчина
|
|
|
|
|
|
Бывалый
330 сообщений
Мужчина
|
<script type="text/javascript"> $(function() { var window_w = $(window).width(); var window_h = $(window).height(); var $pc_panel = $('#pc_panel'); var $pc_wrapper = $('#pc_wrapper'); var $pc_content = $('#pc_content'); var $pc_slider = $('#pc_slider'); var $pc_reference = $('#pc_reference'); var maxWidth,maxHeight,marginL; buildPanel(); function buildPanel(){ $pc_panel.css({'height': window_h + 'px'}); hidePanel(); maxHeight = Math.floor((window_h-20)/135)*135; maxWidth = Math.floor((window_w-35)/220)*220; marginL = (window_w - maxWidth)/2; $pc_wrapper.css({ 'width' : maxWidth + 20 + 'px', 'height' : maxHeight +'px', 'margin-left' : marginL + 'px' }); try{ $pc_slider.slider('destroy'); }catch(e){} var total_scroll = $pc_content.height()-maxHeight; if(total_scroll > 0){ $pc_slider.slider({ orientation : 'vertical', max : total_scroll, min : 0, value : total_scroll, slide : function(event, ui) { $pc_wrapper.scrollTop(Math.abs(ui.value-total_scroll)); } }).css({ 'height' : maxHeight - 40 + 'px', 'left' : maxWidth + 20 + marginL + 'px', 'top' : 30 + 20 + 'px', 'display' : 'none' }); } }
function hidePanel(){ $pc_panel.css({ 'right' : -window_w + 'px', 'top' : window_h - 185 + 'px' }).show(); try{ slideTop(); }catch(e){} $pc_slider.hide(); $pc_panel.find('.collapse') .addClass('expand') .removeClass('collapse'); } function slideTop(){ var total_scroll = $pc_content.height()-maxHeight; $pc_wrapper.scrollTop(0); $pc_slider.slider('option', 'value', total_scroll ); } $(window).bind('scroll',function(){ var distanceTop = $pc_reference.offset().top - window_h; if($(window).scrollTop() > distanceTop){ if(parseInt($pc_panel.css('right'),10) == -window_w) $pc_panel.stop().animate({'right':'0px'},300); } else{ if(parseInt($pc_panel.css('right'),10) == 0) $pc_panel.stop().animate({'right': -window_w + 'px'},300,function(){ hidePanel(); }); } }).bind('resize',function(){ window_w = $(window).width(); window_h = $(window).height(); buildPanel(); });
$pc_panel.find('.expand').bind('click',function(){ var $this = $(this); $pc_wrapper.hide(); $pc_panel.stop().animate({'top':'0px'},500,function(){ $pc_wrapper.show(); slideTop(); $pc_slider.show(); $this.addClass('collapse').removeClass('expand'); }); }) $pc_panel.find('.collapse').live('click',function(){ var $this = $(this); $pc_wrapper.hide(); $pc_slider.hide(); $pc_panel.stop().animate({'top':window_h - 185 + 'px'},500,function(){ $pc_wrapper.show(); $this.addClass('expand').removeClass('collapse'); }); }); //clicking close will make the panel disappear $pc_panel.find('.close').bind('click',function(){ $pc_panel.remove(); $(window).unbind('scroll').unbind('resize'); }); //mouse over the items add class "selected" $pc_wrapper.find('.pc_item').hover( function(){ $(this).addClass('selected'); }, function(){ $(this).removeClass('selected'); } ).bind('click',function(){ window.open($(this).find('.pc_more').html()); }); }); </script>
|
|
|
|
|
uSite Team
3601 сообщениий
Мужчина
|
но тени нет
По всем вопросам обращаемся на support@usite.su
|
|
|
|
|
Premium user
682 сообщения
Мужчина
|
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
|
|
|
|
|
Пользователь
33 сообщения
Мужчина
|
<script type="text/javascript"> var allusers = $('.tOnline b').html(); var gostusers = $('.gOnline b').html(); var siteusers = $('.uOnline b').html(); var uGosti = (gostusers/allusers).toFixed(2)*100; var uUsers = 100 - uGosti; function skl(a, n) {return a[n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>= 20) ? 1 : 2];}; $('#stat-line').html('<div class="cross1" style="width:'+Number(uGosti).toPrecision(3)+'%;" id="ghostss"><span style="padding-left:3px;">'+uGosti.toFixed()+'%</span></div><div class="cross2" style="width:'+Number(uUsers).toPrecision(3)+'%;" id="userss"><span style="padding-right:3px;">'+uUsers.toFixed()+'%</span></div>'); $('#all-users').html('Всего на сайте <b>'+allusers+'</b> '+skl(['человек', 'человека', 'человек'],allusers)+'</div>'); if (siteusers<1) $('#userss').hide(); if (gostusers<1) $('#ghostss').hide(); </script>
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
Бывалый
247 сообщений
Мужчина
|
Code // Copyright (c) 2006-2011 NeoAxis Group Ltd. using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text; using System.IO; using System.Windows.Forms; using GameCommon; using WinFormsAppFramework; using Engine; using Engine.FileSystem; using Engine.Renderer; using Engine.EntitySystem; using Engine.MapSystem; using Engine.MathEx; using Engine.Utils; using Engine.Networking; using GameEntities;
namespace DedicatedServer { public partial class MainForm : Form { [Config( "DedicatedServer", "lastMapName" )] static string lastMapName = "Demos\\JigsawPuzzleGame\\Map\\Map.map";//Jigsaw puzzle by default
[Config( "DedicatedServer", "loadMapAtStartup" )] static bool loadMapAtStartup;
[Config( "DedicatedServer", "allowCustomClientCommands" )] static bool allowCustomClientCommands = true;
//
public MainForm() { InitializeComponent(); }
private void buttonClose_Click( object sender, EventArgs e ) { Close(); }
private void buttonCreate_Click( object sender, EventArgs e ) { Create(); }
private void buttonDestroy_Click( object sender, EventArgs e ) { Destroy(); }
private void MainForm_Load( object sender, EventArgs e ) { //NeoAxis initialization EngineApp.ConfigName = "user:Configs/DedicatedServer.config"; EngineApp.ForceRenderSystemName = "RenderSystem_NULL.dll"; EngineApp.DisableAllSound = true; if( !WinFormsAppWorld.Init( new WinFormsAppEngineApp( EngineApp.ApplicationTypes.Simulation ), this, "user:Logs/DedicatedServer.log" ) ) { Close(); return; } WinFormsAppEngineApp.Instance.AutomaticTicks = false;
Engine.Log.Handlers.InfoHandler += delegate( string text ) { Log( "Log: " + text ); };
Engine.Log.Handlers.ErrorHandler += delegate( string text, ref bool handled ) { handled = true; timer1.Stop(); MessageBox.Show( text, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning ); timer1.Start(); };
Engine.Log.Handlers.FatalHandler += delegate( string text, string createdLogFilePath, ref bool handled ) { handled = true; timer1.Stop(); MessageBox.Show( text, "Fatal", MessageBoxButtons.OK, MessageBoxIcon.Warning ); };
//register config fields of this class EngineApp.Instance.Config.RegisterClassParameters( GetType() );
//generate map list { string[] mapList = VirtualDirectory.GetFiles( "", "*.map", SearchOption.AllDirectories ); foreach( string mapName in mapList ) { //check for network support if( VirtualFile.Exists( string.Format( "{0}\\NoNetworkSupport.txt", Path.GetDirectoryName( mapName ) ) ) ) { continue; }
comboBoxMaps.Items.Add( mapName ); if( mapName == lastMapName ) comboBoxMaps.SelectedIndex = comboBoxMaps.Items.Count - 1; }
comboBoxMaps.SelectedIndexChanged += comboBoxMaps_SelectedIndexChanged; }
checkBoxLoadMapAtStartup.Checked = loadMapAtStartup; checkBoxAllowCustomClientCommands.Checked = allowCustomClientCommands;
//load map at startup if( loadMapAtStartup && comboBoxMaps.SelectedItem != null ) { Create(); string mapName = comboBoxMaps.SelectedItem as string; if( !MapLoad( mapName ) ) return; } }
private void MainForm_FormClosed( object sender, FormClosedEventArgs e ) { Destroy();
//NeoAxis shutdown WinFormsAppWorld.Shutdown(); }
void Create() { if( GameNetworkServer.Instance != null ) { Log( "Error: Server already created" ); return; }
GameNetworkServer server = new GameNetworkServer( "NeoAxis Game Server", EngineVersionInformation.Version, 128, true );
server.UserManagementService.AddUserEvent += UserManagementService_AddUserEvent; server.UserManagementService.RemoveUserEvent += UserManagementService_RemoveUserEvent; server.ChatService.ReceiveText += ChatService_ReceiveText; server.CustomMessagesService.ReceiveMessage += CustomMessagesService_ReceiveMessage;
int port = 56565;
string error; if( !server.BeginListen( port, out error ) ) { Log( "Error: " + error ); Destroy(); return; }
Log( "Server has been created" ); Log( "Listening port {0}...", port );
buttonCreate.Enabled = false; buttonDestroy.Enabled = true; buttonMapLoad.Enabled = true; }
bool MapLoad( string fileName ) { MapDestroy( false );
Log( "Loading map \"{0}\"...", fileName );
WorldType worldType = EntitySystemWorld.Instance.DefaultWorldType;
GameNetworkServer server = GameNetworkServer.Instance; if( !EntitySystemWorld.Instance.WorldCreate( WorldSimulationTypes.DedicatedServer, worldType, server.EntitySystemService.NetworkingInterface ) ) { Log( "Error: EntitySystemWorld.Instance.WorldCreate failed." ); return false; }
if( !MapSystemWorld.MapLoad( fileName ) ) { MapDestroy( false ); return false; }
//run simulation EntitySystemWorld.Instance.Simulation = true;
GameNetworkServer.Instance.EntitySystemService.WorldWasCreated();
Log( "Map loaded" );
buttonMapLoad.Enabled = false; buttonMapUnload.Enabled = true; buttonMapChange.Enabled = true;
return true; }
void MapDestroy( bool newMapWillBeLoaded ) { bool mapWasDestroyed = Map.Instance != null;
MapSystemWorld.MapDestroy();
if( EntitySystemWorld.Instance != null ) EntitySystemWorld.Instance.WorldDestroy();
if( mapWasDestroyed ) GameNetworkServer.Instance.EntitySystemService.WorldWasDestroyed( newMapWillBeLoaded );
if( mapWasDestroyed ) Log( "Map destroyed" );
buttonMapLoad.Enabled = true; buttonMapUnload.Enabled = false; buttonMapChange.Enabled = false; }
void Destroy() { MapDestroy( false );
if( GameNetworkServer.Instance != null ) { GameNetworkServer.Instance.Dispose( "The server has been destroyed" );
buttonCreate.Enabled = true; buttonDestroy.Enabled = false; buttonMapLoad.Enabled = false; buttonMapChange.Enabled = false; buttonMapUnload.Enabled = false; listBoxUsers.Items.Clear();
Log( "Server destroyed" ); } }
void Log( string text, params object[] args ) { while( listBoxLog.Items.Count > 300 ) listBoxLog.Items.RemoveAt( 0 ); int index = listBoxLog.Items.Add( string.Format( text, args ) ); listBoxLog.SelectedIndex = index; }
private void timer1_Tick( object sender, EventArgs e ) { GameNetworkServer server = GameNetworkServer.Instance; if( server != null ) server.Update();
if( WinFormsAppEngineApp.Instance != null ) WinFormsAppEngineApp.Instance.DoTick(); }
void UserManagementService_AddUserEvent( UserManagementServerNetworkService sender, UserManagementServerNetworkService.UserInfo user ) { Log( "User connected: " + user.ToString() ); listBoxUsers.Items.Add( user ); }
void UserManagementService_RemoveUserEvent( UserManagementServerNetworkService sender, UserManagementServerNetworkService.UserInfo user ) { listBoxUsers.Items.Remove( user ); Log( "User disconnected: " + user.ToString() ); }
void ChatService_ReceiveText( ChatServerNetworkService sender, UserManagementServerNetworkService.UserInfo fromUser, string text, UserManagementServerNetworkService.UserInfo privateToUser ) { string userName = fromUser != null ? fromUser.Name : "(null)"; string toUserName = privateToUser != null ? privateToUser.Name : "All"; Log( "Chat: {0} -> {1}: {2}", userName, toUserName, text ); }
void comboBoxMaps_SelectedIndexChanged( object sender, EventArgs e ) { lastMapName = comboBoxMaps.SelectedItem as string; }
private void buttonDoSomething_Click( object sender, EventArgs e ) { MessageBox.Show( "You can write code for testing here.", "Warning" );
//example //MapObject mapObject = (MapObject)Entities.Instance.Create( "Box", Map.Instance ); //mapObject.Position = new Vec3( 0, 0, 30 ); //mapObject.PostCreate(); }
private void checkBoxLoadMapAtStartup_CheckedChanged( object sender, EventArgs e ) { loadMapAtStartup = checkBoxLoadMapAtStartup.Checked; }
private void buttonMapLoad_Click( object sender, EventArgs e ) { string mapName = comboBoxMaps.SelectedItem as string; if( string.IsNullOrEmpty( mapName ) ) { Log( "Error: No map selected" ); return; }
if( !MapLoad( mapName ) ) return; }
private void buttonMapUnload_Click( object sender, EventArgs e ) { MapDestroy( false ); }
private void buttonMapChange_Click( object sender, EventArgs e ) { MapDestroy( true );
string mapName = comboBoxMaps.SelectedItem as string; if( string.IsNullOrEmpty( mapName ) ) { Log( "Error: No map selected" ); return; }
if( !MapLoad( mapName ) ) return; }
void CustomMessagesService_ReceiveMessage( CustomMessagesServerNetworkService sender, NetworkNode.ConnectedNode source, string message, string data ) { //Warning! Messages must be checked by security reasons. //Modified client application can send any message with any data.
if( allowCustomClientCommands ) { //load map if( message == "Example_MapLoad" ) { string mapName = data; MapDestroy( true ); if( !MapLoad( mapName ) ) return; return; }
//create map object if( message == "Example_CreateMapObject" ) { string[] parameters = data.Split( ';' ); string typeName = parameters[ 0 ]; Vec3 position = Vec3.Parse( parameters[ 1 ] ); Quat rotation = Quat.Parse( parameters[ 2 ] );
if( Map.Instance != null ) { MapObject entity = (MapObject)Entities.Instance.Create( typeName, Map.Instance ); entity.Position = position; entity.Rotation = rotation; entity.PostCreate(); }
return; } }
}
private void checkBoxAllowCustomClientCommands_CheckedChanged( object sender, EventArgs e ) { allowCustomClientCommands = checkBoxAllowCustomClientCommands.Checked; }
} }
|
|
|
|
|
uSite Team
1320 сообщений
Мужчина
|
.focus()
|
|
|
|
|
Бывалый
64 сообщения
Мужчина
|
|
|
|
|
|