This file contains hidden or 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
| var compare=function(user,comp){ | |
| if(user===comp){ | |
| return "The result is a tie!"; | |
| }else if(user==="rock"){ | |
| if(comp==="scissors"){ | |
| return "rock wins"; | |
| }else{ | |
| return "paper wins"; | |
| } | |
| }else if(user==="paper"){ |
This file contains hidden or 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
| private boolean deleteIndex(String indexName, String typeName, String id) { | |
| if (isIndexExist(indexName)) { | |
| System.out.println("INDEX EXISTS>>>DELETE INDEX"); | |
| return NodeOperation.INSTANCE.getClient().prepareDelete(indexName, typeName, id).execute().actionGet() | |
| .isFound(); | |
| } else { | |
| return false; | |
| } |
This file contains hidden or 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
| str_constant constants [] | |
| st_variable resizables [] | |
| constants =constant_array | |
| resizables = variable_array | |
| integer index_c,index_r | |
| /* | |
| used to get all the graphical objects that are to remain at a relative similar position | |
| as before resizing | |
| */ | |
| for index_c=1 to UpperBound(constants) |
This file contains hidden or 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
| global type gr_resize_objects from function_object | |
| end type | |
| forward prototypes | |
| global function integer gr_resize_objects (any str_array_objects, integer workspace_width, integer workspace_height) | |
| end prototypes | |
| global function integer gr_resize_objects (any str_array_objects, integer workspace_width, integer workspace_height); | |
| str_resize_objects objects [] |
This file contains hidden or 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
| global type gf_resize from function_object | |
| end type | |
| forward prototypes | |
| global function integer gf_resize (any variable_array, any constant_array) | |
| end prototypes | |
| global function integer gf_resize (any variable_array, any constant_array);/* | |
| NAME:smaina | |
| ISSUE:ZMES-317 |
This file contains hidden or 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 solution(N): | |
| # write your code in Python 3.6 | |
| binaryNumber=bin(N); | |
| binaryGap=0; | |
| data=str(binaryNumber); | |
| finalList=[]; | |
| dataList=[]; | |
| #print(data); | |
| for index in range(len(data)): | |
| if(data[index]=="1" and "1" in dataList and "0" in dataList): |
This file contains hidden or 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 solution(A, K): | |
| outputArray=[0]*len(A); | |
| for index in range(len(A)): | |
| outputIndex=(index+K)%len(A); | |
| outputArray[outputIndex]=A[index]; | |
| return outputArray; |
This file contains hidden or 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 solveHanoi(blockNumber, rodFrom, middleRod,rodTo): | |
| if(blockNumber==1): | |
| print("Plate {0} from {1} to {2}".format(blockNumber,rodFrom,rodTo)); | |
| return; | |
| solveHanoi(blockNumber-1, rodFrom,rodTo,middleRod); | |
| print("outside: Plate {0} from {1} to {2}".format(blockNumber,rodFrom,rodTo)); | |
| solveHanoi(blockNumber-1, middleRod,rodFrom ,rodTo); |
OlderNewer