code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
package org.ws4d.coap.messages; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public enum CoapMediaType { text_plain (0), //text/plain; charset=utf-8 link_format (40), //application/link-format xml(41), //application/xml octet_stream (42), //application/octet-stream exi(...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/messages/CoapMediaType.java
Java
asf20
869
package org.ws4d.coap.messages; import org.ws4d.coap.interfaces.CoapResponse; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public class BasicCoapResponse extends AbstractCoapMessage implements CoapResponse { CoapResponseCode responseCode; public BasicCoapResponse(byte[] bytes, int length)...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/messages/BasicCoapResponse.java
Java
asf20
3,042
package org.ws4d.coap.messages; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public class CoapEmptyMessage extends AbstractCoapMessage { public CoapEmptyMessage(byte[] bytes, int length){ this(bytes, length, 0); } public CoapEmptyMessage(byte[] bytes, int length, int offset){ serial...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/messages/CoapEmptyMessage.java
Java
asf20
1,047
package org.ws4d.coap.messages; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public enum CoapRequestCode { GET(1), POST(2), PUT(3), DELETE(4); private int code; private CoapRequestCode(int code) { this.code = code; } public static CoapRequestCode parseRequestCode(int...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/messages/CoapRequestCode.java
Java
asf20
828
package org.ws4d.coap.rest; import java.util.Vector; /** * A resource known from the REST architecture style. A resource has a type, * name and data associated with it. * * @author Nico Laum <nico.laum@uni-rostock.de> * @author Christian Lerche <christian.lerche@uni-rostock.de> * */ public interface Resourc...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/Resource.java
Java
asf20
1,011
package org.ws4d.coap.rest; import org.ws4d.coap.interfaces.CoapChannel; import org.ws4d.coap.interfaces.CoapRequest; import org.ws4d.coap.messages.CoapMediaType; /** * @author Nico Laum <nico.laum@uni-rostock.de> * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapResource extend...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/CoapResource.java
Java
asf20
1,070
package org.ws4d.coap.rest; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.util.Enumeration; import java.util.HashMap; import java.util.Vector; import org.apache.log4j.ConsoleAppender; import org.apac...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/CoapResourceServer.java
Java
asf20
7,607
package org.ws4d.coap.rest; import java.util.HashMap; import java.util.Vector; import org.apache.log4j.Logger; import org.ws4d.coap.interfaces.CoapChannel; import org.ws4d.coap.interfaces.CoapRequest; import org.ws4d.coap.interfaces.CoapResponse; import org.ws4d.coap.interfaces.CoapServerChannel; import org.ws4d.coap...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/BasicCoapResource.java
Java
asf20
4,441
package org.ws4d.coap.rest; import java.util.HashMap; import java.util.Vector; import org.apache.log4j.Logger; import org.ws4d.coap.interfaces.CoapChannel; import org.ws4d.coap.interfaces.CoapRequest; import org.ws4d.coap.messages.CoapMediaType; /** * Well-Known CoRE support (draft-ietf-core-link-format-05) * *...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/CoreResource.java
Java
asf20
3,985
package org.ws4d.coap.rest; import java.net.URI; /** * A ResourceServer provides network access to resources via a network protocol such as HTTP or CoAP. * * @author Nico Laum <nico.laum@uni-rostock.de> * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface ResourceServer { /** ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/ResourceServer.java
Java
asf20
1,366
package org.ws4d.coap.rest; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface ResourceHandler { public void onPost(byte[] data); }
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/rest/ResourceHandler.java
Java
asf20
181
/* Copyright [2011] [University of Rostock] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/Constants.java
Java
asf20
1,164
package org.ws4d.coap.interfaces; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapServer extends CoapChannelListener { public CoapServer onAccept(CoapRequest request); public void onRequest(CoapServerChannel channel, CoapRequest request); public void onSe...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapServer.java
Java
asf20
373
/* Copyright [2011] [University of Rostock] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapMessage.java
Java
asf20
3,026
package org.ws4d.coap.interfaces; import java.util.Vector; import org.ws4d.coap.messages.CoapMediaType; import org.ws4d.coap.messages.CoapRequestCode; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapRequest extends CoapMessage{ public void setUriHost(String host); ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapRequest.java
Java
asf20
1,011
package org.ws4d.coap.interfaces; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ import org.ws4d.coap.messages.CoapMediaType; import org.ws4d.coap.messages.CoapResponseCode; public interface CoapServerChannel extends CoapChannel { /* creates a normal response */ public CoapResponse cr...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapServerChannel.java
Java
asf20
1,516
package org.ws4d.coap.interfaces; import org.ws4d.coap.messages.CoapRequestCode; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapClientChannel extends CoapChannel { public CoapRequest createRequest(boolean reliable, CoapRequestCode requestCode); public v...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapClientChannel.java
Java
asf20
383
package org.ws4d.coap.interfaces; import org.ws4d.coap.messages.CoapResponseCode; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapResponse extends CoapMessage{ /* TODO: Response Code is part of BasicCoapResponse */ public CoapResponseCode getResponseCode(); public void ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapResponse.java
Java
asf20
514
package org.ws4d.coap.interfaces; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ import java.net.InetAddress; import org.ws4d.coap.messages.CoapBlockOption.CoapBlockSize; public interface CoapChannel { public void sendMessage(CoapMessage msg); /*TODO: close when finished, & ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapChannel.java
Java
asf20
908
/* Copyright [2011] [University of Rostock] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapChannelManager.java
Java
asf20
1,751
package org.ws4d.coap.interfaces; import java.net.InetAddress; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapSocketHandler { // public void registerResponseListener(CoapResponseListener // responseListener); // public void unregisterResponseListener(CoapRespons...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapSocketHandler.java
Java
asf20
978
package org.ws4d.coap.interfaces; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapChannelListener { }
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapChannelListener.java
Java
asf20
158
package org.ws4d.coap.interfaces; /** * @author Christian Lerche <christian.lerche@uni-rostock.de> */ public interface CoapClient extends CoapChannelListener { public void onResponse(CoapClientChannel channel, CoapResponse response); public void onConnectionFailed(CoapClientChannel channel, bool...
11106027-gokul
ws4d-jcoap/src/org/ws4d/coap/interfaces/CoapClient.java
Java
asf20
366
package org.ws4d.coap.proxy; import org.apache.log4j.Logger; import org.ws4d.coap.messages.CoapMediaType; import org.ws4d.coap.rest.BasicCoapResource; public class ProxyResource extends BasicCoapResource { static Logger logger = Logger.getLogger(Proxy.class); private ProxyResourceKey key = null; p...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyResource.java
Java
asf20
569
package org.ws4d.coap.proxy; import java.util.Vector; import org.apache.log4j.Logger; import org.ws4d.coap.messages.CoapMediaType; import org.ws4d.coap.rest.BasicCoapResource; import org.ws4d.coap.rest.CoapResourceServer; public class ProxyRestInterface { static Logger logger = Logger.getLogger(Proxy.class); priva...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyRestInterface.java
Java
asf20
1,479
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyMessageContext.java
Java
asf20
6,941
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyCache.java
Java
asf20
11,688
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/CoapServerProxy.java
Java
asf20
5,742
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ModifiedAsyncNHttpServiceHandler.java
Java
asf20
26,831
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/HttpClientNIO.java
Java
asf20
3,172
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/Proxy.java
Java
asf20
3,569
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ByteContentListener.java
Java
asf20
2,196
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyMapper.java
Java
asf20
34,263
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/CoapClientProxy.java
Java
asf20
2,822
/* * Copyright 2012 University of Rostock, Institute of Applied Microelectronics and Computer Engineering * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/HttpServerNIO.java
Java
asf20
6,394
package org.ws4d.coap.client; import java.net.InetAddress; import java.net.UnknownHostException; import org.ws4d.coap.Constants; import org.ws4d.coap.connection.BasicCoapChannelManager; import org.ws4d.coap.interfaces.CoapChannelManager; import org.ws4d.coap.interfaces.CoapClient; import org.ws4d.coap.interf...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/client/BasicCoapBlockClient.java
Java
asf20
2,187
package org.ws4d.coap.client; import java.net.InetAddress; import java.net.UnknownHostException; import org.ws4d.coap.Constants; import org.ws4d.coap.connection.BasicCoapChannelManager; import org.ws4d.coap.interfaces.CoapChannelManager; import org.ws4d.coap.interfaces.CoapClient; import org.ws4d.coap.interf...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/client/BasicCoapClient.java
Java
asf20
2,242
package org.ws4d.coap.udp; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.net.URI; import java.net.URISyntaxException; import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; import java.nio.channels.SelectionKey; imp...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/udp/UDPRelay.java
Java
asf20
3,828
package org.ws4d.coap.server; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; import org.ws4d.coap.messages.CoapMediaType; import org.ws4d.coap.rest.BasicCoapResource; import org.ws4d.coap.rest.CoapResourceServer; import org....
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/server/CoapSampleResourceServer.java
Java
asf20
2,027
/* Copyright [2011] [University of Rostock] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/server/SeparateResponseCoapServer.java
Java
asf20
2,697
/* Copyright [2011] [University of Rostock] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
11106027-gokul
ws4d-jcoap-applications/src/org/ws4d/coap/server/BasicCoapServer.java
Java
asf20
2,460
#coding=utf8 from django.db import models class Address(models.Model): name = models.CharField(max_length=20) address = models.CharField(max_length=100) pub_date = models.DateField()
11blog
trunk/11blog/address/models.py
Python
bsd
200
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/address/tests.py
Python
bsd
399
from django.conf.urls.defaults import patterns, url __author__ = 'Administrator' urlpatterns = patterns('address.views', url(r'^test/$','test') )
11blog
trunk/11blog/address/urls.py
Python
bsd
155
from django.contrib import admin from address.models import Address __author__ = 'Administrator' admin.site.register(Address)
11blog
trunk/11blog/address/admin.py
Python
bsd
130
# Create your views here. import urllib2 from django.http import HttpResponse from django.shortcuts import render_to_response from models import Address def latest_address(request): addresslist = Address.objects.order_by('-pub_date')[:10] return render_to_response('latest_address.html', {'addresslist':...
11blog
trunk/11blog/address/views.py
Python
bsd
492
from BeautifulSoup import BeautifulSoup __author__ = 'Administrator' import urllib,urllib2,cookielib from BeautifulSoup import BeautifulSoup myCookie = urllib2.HTTPCookieProcessor(cookielib.CookieJar()) openner = urllib2.build_opener(myCookie) post_data = {'email':'yinjj472@nenu.edu.cn', 'pass...
11blog
trunk/11blog/address/login.py
Python
bsd
1,203
#coding=utf8 from django.db import models class Address(models.Model): name = models.CharField(max_length=20) address = models.CharField(max_length=100) pub_date = models.DateField()
11blog
trunk/11blog/DjangoDemo/trunk/address/models.py
Python
bsd
200
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/DjangoDemo/trunk/address/tests.py
Python
bsd
399
from django.conf.urls.defaults import patterns, url __author__ = 'Administrator' urlpatterns = patterns('address.views', url(r'^test/$','test') )
11blog
trunk/11blog/DjangoDemo/trunk/address/urls.py
Python
bsd
155
from django.contrib import admin from address.models import Address __author__ = 'Administrator' admin.site.register(Address)
11blog
trunk/11blog/DjangoDemo/trunk/address/admin.py
Python
bsd
130
# Create your views here. import urllib2 from django.http import HttpResponse from django.shortcuts import render_to_response from models import Address def latest_address(request): addresslist = Address.objects.order_by('-pub_date')[:10] return render_to_response('latest_address.html', {'addresslist':...
11blog
trunk/11blog/DjangoDemo/trunk/address/views.py
Python
bsd
492
from BeautifulSoup import BeautifulSoup __author__ = 'Administrator' import urllib,urllib2,cookielib from BeautifulSoup import BeautifulSoup myCookie = urllib2.HTTPCookieProcessor(cookielib.CookieJar()) openner = urllib2.build_opener(myCookie) post_data = {'email':'yinjj472@nenu.edu.cn', 'pass...
11blog
trunk/11blog/DjangoDemo/trunk/address/login.py
Python
bsd
1,203
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <h2>this is latest_address html</h2> <ul> {% for address in addresslist %} <li>{{ address.name }}</li> {% endfor ...
11blog
trunk/11blog/DjangoDemo/trunk/templates/latest_address.html
HTML
bsd
351
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <h2>通讯录</h2> <table border="1"> <tr> <th>姓名</th> <th>地址</th> </tr> {% for user in address ...
11blog
trunk/11blog/DjangoDemo/trunk/templates/list.html
HTML
bsd
510
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo...
11blog
trunk/11blog/DjangoDemo/trunk/manage.py
Python
bsd
517
from django.db import models # Create your models here.
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/models.py
Python
bsd
60
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/tests.py
Python
bsd
399
__author__ = 'Administrator' from django.http import HttpResponse def index(request): return HttpResponse("hello, Django.\n jiajia.yin, you must work hard for programing!")
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/helloworld.py
Python
bsd
181
__author__ = 'Administrator' from django.http import HttpResponse text = '''<form method="post" action="add"> <input type="text" name="a" value="%d"></input> + <input type="text" name="b" value="%d"></input> <input type="submit" value="="></input> <input type="text" name="c" value="%d"></input> </form>''...
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/add.py
Python
bsd
534
#coding=utf-8 __author__ = 'Administrator' from django.shortcuts import render_to_response address = [ {'name':'张三', 'address':'地址一'}, {'name':'李四', 'address':'地址二'} ] def index(request): return render_to_response('list.html', {'address': address})
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/list.py
Python
bsd
292
# Create your views here.
11blog
trunk/11blog/DjangoDemo/trunk/TestApp/views.py
Python
bsd
27
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo...
11blog
trunk/11blog/DjangoDemo/trunk/.svn/text-base/manage.py.svn-base
Python
bsd
517
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'DjangoDemo.views.home', name='home'), # url(r'^DjangoDemo/', include('DjangoD...
11blog
trunk/11blog/DjangoDemo/trunk/urls.py
Python
bsd
702
# Django settings for DjangoDemo project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'orac...
11blog
trunk/11blog/DjangoDemo/trunk/settings.py
Python
bsd
5,212
from django.db import models # Create your models here. class wiki(models.Model): pagename = models.CharField(max_length=20, unique=True) content = models.TextField()
11blog
trunk/11blog/DjangoDemo/trunk/wiki/models.py
Python
bsd
182
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/DjangoDemo/trunk/wiki/tests.py
Python
bsd
399
# Create your views here. #coding=utf8 from wiki.models import wiki from django.template import loader from django.template import context from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response def index(request, pagename=""): if ...
11blog
trunk/11blog/DjangoDemo/trunk/wiki/views.py
Python
bsd
377
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <h2>this is latest_address html</h2> <ul> {% for address in addresslist %} <li>{{ address.name }}</li> {% endfor ...
11blog
trunk/11blog/templates/latest_address.html
HTML
bsd
351
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <h2>通讯录</h2> <table border="1"> <tr> <th>姓名</th> <th>地址</th> </tr> {% for user in address ...
11blog
trunk/11blog/templates/list.html
HTML
bsd
510
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo...
11blog
trunk/11blog/manage.py
Python
bsd
517
from django.db import models # Create your models here.
11blog
trunk/11blog/TestApp/models.py
Python
bsd
60
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/TestApp/tests.py
Python
bsd
399
__author__ = 'Administrator' from django.http import HttpResponse def index(request): return HttpResponse("hello, Django.\n jiajia.yin, you must work hard for programing!")
11blog
trunk/11blog/TestApp/helloworld.py
Python
bsd
181
__author__ = 'Administrator' from django.http import HttpResponse text = '''<form method="post" action="add"> <input type="text" name="a" value="%d"></input> + <input type="text" name="b" value="%d"></input> <input type="submit" value="="></input> <input type="text" name="c" value="%d"></input> </form>''...
11blog
trunk/11blog/TestApp/add.py
Python
bsd
534
#coding=utf-8 __author__ = 'Administrator' from django.shortcuts import render_to_response address = [ {'name':'张三', 'address':'地址一'}, {'name':'李四', 'address':'地址二'} ] def index(request): return render_to_response('list.html', {'address': address})
11blog
trunk/11blog/TestApp/list.py
Python
bsd
292
# Create your views here.
11blog
trunk/11blog/TestApp/views.py
Python
bsd
27
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo...
11blog
trunk/11blog/.svn/text-base/manage.py.svn-base
Python
bsd
517
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'DjangoDemo.views.home', name='home'), # url(r'^DjangoDemo/', include('DjangoD...
11blog
trunk/11blog/urls.py
Python
bsd
674
# Django settings for DjangoDemo project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'orac...
11blog
trunk/11blog/settings.py
Python
bsd
5,212
from django.db import models # Create your models here. class wiki(models.Model): pagename = models.CharField(max_length=20, unique=True) content = models.TextField()
11blog
trunk/11blog/wiki/models.py
Python
bsd
182
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
11blog
trunk/11blog/wiki/tests.py
Python
bsd
399
# Create your views here. #coding=utf8 from wiki.models import wiki from django.template import loader from django.template import context from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response def index(request, pagename=""): if ...
11blog
trunk/11blog/wiki/views.py
Python
bsd
377
/* ScriptName: channeltab.js Author: Akai Website: http://nhacuato.com/ */ $(document).ready(function() { function ncttabs(rel) { $channelcontent.hide(); $channeltab.removeClass("selected"); var id = rel.attr("rel"); $("#" + id).show(); rel.addClass("selected"); } $channeltab = $(".conta...
123tivi
123tv/js/channeltab.js
JavaScript
oos
592
$(document).ready(function() { $channelr = $(".container #channelr"); $channelm = $(".container #channelr #channel"); $channelb = $(".container #channelr #channelb"); $channelg = $(".container #channelg"); $channelv = 0; function channelh() { if ($.browser.msie && $.browser.version.slice(0, 3) == "7.0") $channe...
123tivi
123tv/js/channel.js
JavaScript
oos
2,300
/************************************************************************/ /* Rainbow Links Version 1.03 (2003.9.20) */ /* Script updated by Dynamicdrive.com for IE6 */ /* Copyright (C) 1999-2001 TAKANASHI Mizuki */ /* takanasi@hamal.fr...
123tivi
123tv/js/link.js
JavaScript
oos
7,546
function hm_play(linkxem) { if (linkxem.indexOf('id="embed_tv"')!=-1) { var play = linkxem; } else if (linkxem.indexOf("http://")!=-1) { if (linkxem.indexOf("http://tv-msn.com")!=-1 || linkxem.indexOf("http://www2.k-tv.at")!=-1 || linkxem.indexOf("http://vtc.com.vn")!=-1 || linkxem.indexOf("http://tv24.vn")!=-1 || link...
123tivi
trunk/123tv/zi.js
JavaScript
oos
5,387
var titles=new Array();var titlesNum=0;var urls=new Array();var time=new Array();var titleh=new Array(); function related_results_labels(c){ for(var b=0;b<c.feed.entry.length;b++){ var d=c.feed.entry[b]; titles[titlesNum]=d.title.$t; s=d.content.$t; titleh[titlesNum]=s.substring(s.indexOf("[st]")+4,s.indexOf("[/s...
123tivi
trunk/123tv/lienquan1.js
JavaScript
oos
1,617
imgr = new Array(); imgr[0] = "https://lh3.googleusercontent.com/-IBkOgk0LW6c/TqulPrgd6RI/AAAAAAAAAmg/VHnAiJCR4jc/s800/no_img.jpg"; showRandomImg = true; aBold = true; summaryPost = 70; summaryTitle = 25; numposts = 100; function removeHtmlTag(strx,chop){ var s = strx.split("<"); for(var i=0;i<s.length;i++){ i...
123tivi
trunk/kien/feed.js
JavaScript
oos
2,780
imgr = new Array(); imgr[0] = "https://lh3.googleusercontent.com/-IBkOgk0LW6c/TqulPrgd6RI/AAAAAAAAAmg/VHnAiJCR4jc/s800/no_img.jpg"; showRandomImg = true; aBold = true; summaryPost = 70; summaryTitle = 25; numposts = 100; function removeHtmlTag(strx,chop){ var s = strx.split("<"); for(var i=0;i<s.length;i++){ i...
123tivi
trunk/kien/feedold.js
JavaScript
oos
2,707
function postlabel(json) { for (var i = 0; i < numposts; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var posturl;if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length;k++){ if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){ var ...
123tivi
trunk/thugian123/feed.js
JavaScript
oos
1,653
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class DatVeBus { private DatVeDao _dvDAO; public DatVeDao DvDAO { get { return _dvDAO; } set { _dvDAO =...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/DatVeBus.cs
C#
gpl2
541
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class PhimBus { private PhimDao _phimDAO; public PhimDao PhimDAO { get { return _phimDAO; } set { _phim...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/PhimBus.cs
C#
gpl2
1,647
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class KhachHangBus { KhachHangDao KHdao; public int LayMaKH(int MaTK) { KHdao = new KhachHangDao(); int ...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/KhachHangBus.cs
C#
gpl2
399
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class TaiKhoanBus { TaiKhoanDao TKdao; public static string Encrypte(string inputString) { return TaiKhoanDao.Encryp...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/TaiKhoanBus.cs
C#
gpl2
824
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class LichChieuBus { LichChieuDao LCdao; public DataTable LayLichChieu(int maphim) { DateTime dt = DateTime.Now; ...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/LichChieuBus.cs
C#
gpl2
812
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class VeBus { private VeDao _veDAO; public VeDao VeDAO { get { return _veDAO; } set { _veDAO = value; }...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/VeBus.cs
C#
gpl2
536
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTi...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/Properties/AssemblyInfo.cs
C#
gpl2
1,387
using System; using System.Collections.Generic; using System.Text; using Cores; using DAOLayer; using System.Data; namespace BUSLayer { public class DienVienBus { DienVienDao DVdao = new DienVienDao(); public DataTable DanhSachDV() { return DVdao.DanhSachDienV...
07hc114
trunk/RapPhimRollRoyce/BUSLayer/DienVienBus.cs
C#
gpl2
487
using System; using System.Collections.Generic; using System.Text; using Cores; using System.Security.Cryptography; using System.Data; using System.Data.SqlClient; namespace DAOLayer { public class TaiKhoanDao { private Connection _conn; public Connection Conn { ...
07hc114
trunk/RapPhimRollRoyce/DAOLayer/TaiKhoanDao.cs
C#
gpl2
3,175