1. Список говнокодов пользователя wvxvw

    Всего: 202

  2. ActionScript / Говнокод #6063

    −94

    1. 1
    var toCrypt:String = encodeURIComponent("GET")

    пруф: https://github.com/ptitJean/AS3FaceApi/blob/master/net/metafor/faceapi/auth/OAuth.as

    wvxvw, 22 Марта 2011

    Комментарии (5)
  3. Куча / Говнокод #6061

    +130

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    POST /a/my-domain.com/accounts/ClientLogin HTTP/1.1
    Host: www.google.com
    User-Agent: Drakma/1.2.3 (SBCL 1.0.29.11.debian; Linux; 2.6.32-30-generic; http://weitz.de/drakma/)
    Accept: */*
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 97
    
    HTTP/1.1 301 Moved Permanently
    Location: /a/cpanel/my-domain.com/accounts/ClientLogin
    Content-Type: text/html; charset=UTF-8
    Content-Length: 223
    Date: Tue, 22 Mar 2011 12:44:53 GMT
    Expires: Tue, 22 Mar 2011 12:44:53 GMT
    Cache-Control: private, max-age=0
    X-Content-Type-Options: nosniff
    X-XSS-Protection: 1; mode=block
    Server: GSE
    Connection: close
    
    ;;; Ну ладно, попробуем еще раз...
    
    POST /a/cpanel/my-domain.com/accounts/ClientLogin HTTP/1.1
    Host: www.google.com
    User-Agent: Drakma/1.2.3 (SBCL 1.0.29.11.debian; Linux; 2.6.32-30-generic; http://weitz.de/drakma/)
    Accept: */*
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 97
    
    HTTP/1.1 404 Not Found
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Date: Tue, 22 Mar 2011 12:46:32 GMT
    Content-Type: text/html; charset=UTF-8
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1; mode=block
    Server: GSE
    Connection: close

    Шутники, однако :)

    wvxvw, 22 Марта 2011

    Комментарии (10)
  4. Куча / Говнокод #5864

    +121

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    <taskdef resource="flexTasks.tasks" classpath="${FLEX_TASK_JAR}"/>
    
    		<target name="tetris_activity">
    			<mxmlc file="${FREELANCERS_DIR}\orientsys\skyblockwars\src\tetriswars.as"
    						output="${basedir}\${DEPLOY_DIR}\tetris\tetriswars.swf"
    						static-link-runtime-shared-libraries="true"
    						debug="false"
    						use-network="true">
    			           	<load-config filename="${FLEX_HOME}\frameworks\flex-config.xml"/>
    						<source-path path-element="${basedir}/LIB"/>
    						<source-path path-element="C:\freelancers\orientsys\skyblockwars\src"/>
    						<source-path path-element="${basedir}\RoundsDeveloperAPI\src"/>
    						<library-path dir="${basedir}\LIB\swc">
    							<include name="fl.swc"/>
    							<include name="as3corelib.swc"/>
    							<include name="greensock.swc"/>
    							<include name="icodecoder.swc"/>
    							<include name="maccherone-json.swc"/>
    							<include name="smartfox.swc"/>
    						</library-path>
    						<library-path dir="${FLEX_HOME}\frameworks\libs">
    							<include name="framework.swc"/>
    							<include name="textLayout.swc"/>
    						</library-path>
    			</mxmlc>
    			<echo>flickr</echo>			
    		</target>

    Просто нет слов... мудак, с которым я работаю удалил мои билд файлы и заменил вот этим. Я работаю в Убунту, и у меня даже эмулятора Виндовса нет.

    wvxvw, 03 Марта 2011

    Комментарии (14)
  5. ActionScript / Говнокод #5819

    −106

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    private function handleApplcationCallback(call:String, params:String = "") : void 
    {
    	var paramsArr:Array; 
    	if(params)
    		paramsArr = params.length > 0 ? params.split(",") : [];
    	else 
    		paramsArr = [];	
    	try 
    	{
    		handleApplicationCalls(call,paramsArr);
    	} 
    	catch (error : Error)
    	{
    	}
    }

    wvxvw, 28 Февраля 2011

    Комментарии (11)
  6. ActionScript / Говнокод #5813

    −107

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    public function receive(streamName:String):void
    {
    	stopReceive()
    	
    	if(!netConnection.connected)
    	{
    		receiveStreamName = streamName;
    		LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?not connected, set streamName: " + receiveStreamName);
    		return;
    	}
    	
    	nsReceive = new NetStream(netConnection);
    	nsReceive.addEventListener(NetStatusEvent.NET_STATUS, handleReceiveNetStreamStatus);
    	nsReceive.play(streamName, -2, -1, true);
    	dispatchEvent(new VRDataEvent(VRDataEvent.OPPONENT_STREAM_UPDATED));
    	// default audio sound
    	var st:SoundTransform = nsReceive.soundTransform;
    	st.volume = 0.7;
    	nsReceive.soundTransform = st;			
    	examineCallTimer.start();
    	LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?play=" + streamName);
    }

    Уже за новыми наушниками собирался идти...

    wvxvw, 27 Февраля 2011

    Комментарии (5)
  7. ActionScript / Говнокод #5795

    −129

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    static public function getCamera():Camera
    {
    	// Return the same camera if it has been successfully requested before
    	if (cam != null)
    	{
    		if (cam.muted) Security.showSettings(SecurityPanel.PRIVACY);
    		return cam;
    	}
    	
    	// Get the camera
    	cam = Camera.getCamera();
    	if (cam != null)
    	{
    		// Set properties if a camera was found
    		if((cam.name.toLowerCase().indexOf("usb") != -1) && 
    			(flash.system.Capabilities.os.toLowerCase().indexOf("mac") != -1))
    		{
    			// this is a mac default cam, dont change mode
    			Logger.getInstance().debug("has usb + mac: no set mode");
    		}
    		else
    		{
    			cam.setMode(CAMERA_WIDTH, CAMERA_HEIGHT, 30, true);
    			Logger.getInstance().debug("setMode to cam");
    		}
    		cam.addEventListener(StatusEvent.STATUS, NeaveCamera.statusListener);
    		return cam;
    	}
    	else
    	{
    		// No camera found
    		Security.showSettings(SecurityPanel.CAMERA);
    		return new Camera();
    	}
    }

    В отчаянии.

    wvxvw, 24 Февраля 2011

    Комментарии (0)
  8. ActionScript / Говнокод #5793

    −110

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    var p2pStream:P2PStream = this
    var client:Object = new Object();
    client.onPeerConnect =  function(subscriber:NetStream):Boolean{
    	return p2pStream.onPeerConnect()}
    
    nsPublish = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
    nsPublish.client = client;

    Это AS3 (хотя это было бы говном в AS2 тоже, но там хоть причину можно было понять).

    wvxvw, 24 Февраля 2011

    Комментарии (5)
  9. ActionScript / Говнокод #5756

    −102

    1. 1
    import com.adobe.protocols.dict.events.ErrorEvent;

    Ну хоть бы циферку добавили...

    wvxvw, 21 Февраля 2011

    Комментарии (4)
  10. ActionScript / Говнокод #5729

    −231

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    private function generateEvent(type:String, data:Object):TcpEvent
    {
    	var resultEvent : TcpEvent;
    	switch(type)
    	{
    		case TcpEvent.CALL_STARTED:
    			if (data.callType == "1")
    				resultEvent = new TcpEvent(TcpEvent.RANDOM_CALL_STARTED, data);
    			else
    				resultEvent = new TcpEvent(TcpEvent.CALL_STARTED, data);
    			break
    		case TcpEvent.CALL_RECEIVED:
    			resultEvent = new TcpEvent(TcpEvent.CALL_RECEIVED, data);
    			break
    		case TcpEvent.CALL_CANCELED:
    			resultEvent = new TcpEvent(TcpEvent.CALL_CANCELED, data);
    			break
    		case TcpEvent.CALL_REJECTED:
    			resultEvent = new TcpEvent(TcpEvent.CALL_REJECTED, data);
    			break
    		case TcpEvent.CALL_ENDED:
    			resultEvent = new TcpEvent(TcpEvent.CALL_ENDED, data);
    			break
    		case TcpEvent.CALL_ERROR:
    			resultEvent = new TcpEvent(TcpEvent.CALL_ERROR, data);
    			break
    		case TcpEvent.LOCK_SUCCEEDED:
    			resultEvent = new TcpEvent(TcpEvent.LOCK_SUCCEEDED, data);
    			break
    		case TcpEvent.LOCK_FAILED:
    			resultEvent = new TcpEvent(TcpEvent.LOCK_FAILED, data);
    			break	
    		case TcpEvent.RECEIVE_ACTION:
    			resultEvent = new TcpEvent(TcpEvent.RECEIVE_ACTION, data);
    			break
    		case TcpEvent.RECEIVE_MESSAGE:
    			resultEvent = new TcpEvent(TcpEvent.RECEIVE_MESSAGE, data);
    			break
    		case TcpEvent.RECEIVE_PONG:
    			resultEvent = new TcpEvent(TcpEvent.RECEIVE_PONG, data);
    			break
    		case TcpEvent.SET_MODE:
    			resultEvent = new TcpEvent(TcpEvent.SET_MODE, data);
    			break
    		case TcpEvent.SET_BALANCE:
    			resultEvent = new TcpEvent(TcpEvent.SET_BALANCE, data);
    			break
    		case TcpEvent.SET_STOKEN:
    			resultEvent = new TcpEvent(TcpEvent.SET_STOKEN, data);
    			break
    		case TcpEvent.SET_TIMESTAMP:
    			resultEvent = new TcpEvent(TcpEvent.SET_TIMESTAMP, data);
    			break
    		case TcpEvent.ADD_TO_RANDOM_ROUNDERS_OK:
    			resultEvent = new TcpEvent(TcpEvent.ADD_TO_RANDOM_ROUNDERS_OK, data);
    			break
    		case TcpEvent.REMOVE_FROM_RANDOM_ROUNDERS_OK:
    			resultEvent = new TcpEvent(TcpEvent.REMOVE_FROM_RANDOM_ROUNDERS_OK, data);
    			break
    		case TcpEvent.TCP_ADD_TO_RANDOM_ROUNDERS_ERROR:
    			resultEvent = new TcpEvent(TcpEvent.TCP_ADD_TO_RANDOM_ROUNDERS_ERROR, data);
    			break;
    		case TcpEvent.TCP_GET_NEXT_RANDOM_ROUNDER_ERROR:
    			resultEvent = new TcpEvent(TcpEvent.TCP_GET_NEXT_RANDOM_ROUNDER_ERROR, data);
    			break;
    		case TcpEvent.GET_CLIENT_PARAM:
    			resultEvent = new TcpEvent(TcpEvent.GET_CLIENT_PARAM, data);
    			break;
    		case TcpEvent.SET_WEB_SESSION_ID:
    			resultEvent = new TcpEvent(TcpEvent.SET_WEB_SESSION_ID, data);
    			break;
    		case TcpEvent.SEND_ACTION_ERROR:
    			resultEvent = new TcpEvent(TcpEvent.SEND_ACTION_ERROR, data);
    			break;
    		case TcpEvent.SEND_MESSAGE_ERROR:
    			resultEvent = new TcpEvent(TcpEvent.SEND_MESSAGE_ERROR, data);
    			break;			
    		case TcpEvent.STOP_RECONNECTION:
    			resultEvent = new TcpEvent(TcpEvent.STOP_RECONNECTION, data);
    			stopReconnection();
    			break;	
    		default:
    			break;
    	}
    	return resultEvent;			
    }

    Человеку платаят не построчно, и даже не по часам. Оклад.

    wvxvw, 20 Февраля 2011

    Комментарии (2)
  11. ActionScript / Говнокод #5728

    −102

    1. 1
    instanceId = Math.random().toString().split(".")[1];

    Способ получения строки произвольной длины из случайного набора чисел :)

    wvxvw, 20 Февраля 2011

    Комментарии (8)