This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' expressionString = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 END IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 END ''' | |
def parse_expression(expressionString): | |
expressionStringArray = filter(None,expressionString.split("END")) | |
''' expressionStringArray[0] = IF Variable_3 > 1000 RETURN VARIABLE_3* VARIABLE_1 | |
expressionStringArray[1] = IF Variable_3 < 1000 RETURN VARIABLE_3* VARIABLE_2 ''' | |
for expression in expressionStringArray: | |
expConditionResult = expression.strip().split("RETURN") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hello(): | |
print "hello" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hello(): | |
print "hello" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function that takes two integer (alredy declared as Intgers so as compiler can undertand) as input and | |
// Returns a output again of type integer | |
int add(int a , int b){ | |
// Here also variable c is declared as Integer , any other type which compiler can not convert to like | |
// will give error | |
int c = a + b | |
return c | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_units(request): | |
# request object has one GET DICTIONARY for the variables passed as Query String | |
# Query string variable is named as ID | |
if 'ID' in request.GET: | |
userId = request.GET['ID'] | |
# request object has one POST DICTIONARY for the variables passed as form.submit() | |
# Here assume a form variable is named as UNITS | |
if 'UNITS' in request.POST: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
from django.conf.urls import patterns, include, url | |
from demoapp.views import get_units,calculate_data | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('', |
OlderNewer