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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main() { | |
| // строк | |
| int n = 10; | |
| // столбцов | |
| int m = 5; | |
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
| #include <stdio.h> | |
| /** | |
| * find columns with zero elements | |
| */ | |
| void printMx(int n,int m,int mx[n][m]) { | |
| int i,j; | |
| for(i = 0; i< n; i++) { | |
| for(j = 0; j< m; j++) { | |
| printf(" %d ", mx[i][j]); | |
| } |
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| struct story { | |
| char fio[30]; | |
| char diagnos[30]; | |
| char dat[30]; | |
| char notes[30]; | |
| }; |
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
| __author__ = 'igor' | |
| import math | |
| import random | |
| def integr(a,b,n, func): | |
| h = (b - a)/n | |
| sm = 0 | |
| for i in range(0,n): | |
| y = func(a+h*i) | |
| sm += y*h |
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
| # с каждой новой строки | |
| a = int(input("enter something\n")) | |
| b = int(input("enter something else\n")) | |
| print(a,b) | |
| # Если через пробел разделять переменные, то: | |
| s = input("enter two numbers"); | |
| # разбить строку по пробелам | |
| s = s.split() | |
| a = int(s[0]) |
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
| res.write("HTTP/1.1 200 OK\r\n".getBytes()); | |
| res.write("Date: Mon, 23 May 2005 22:38:34 GMT\r\n".getBytes()); | |
| res.write("Server: HApache/1.3.3.7 (Unix) (Red-Hat/Linux)\r\n".getBytes()); | |
| res.write("Content-Type: image/jpg\r\n".getBytes()); | |
| res.write("Content-Disposition: attachment; filename=home.jpg\r\n".getBytes()); | |
| res.write(String.format("Content-Length: %d\r\n",imageInByte.length).getBytes()); | |
| res.write("Accept-Ranges: bytes\r\n".getBytes()); | |
| res.write("Connection: close\r\n".getBytes()); | |
| res.write("\r\n".getBytes()); | |
| res.write(imageInByte); |
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
| public static List<KeyValuePair> secretMethodName(Tree tree) { | |
| List<KeyValuePair> metadata = new ArrayList<>(); | |
| KeyValuePair treeId = new KeyValuePair(); | |
| treeId.setKey(tree.getId()); | |
| treeId.setValue(tree.getRootNodeIds().get(0)); | |
| metadata.add(treeId); | |
| KeyValuePair description = new KeyValuePair(); | |
| treeId.setKey(tree.getId() + "_" + MetadataConstants.DESCRIPTION_KEY); | |
| treeId.setValue(tree.getDescription()); |
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
| for (KeyValuePair keyValuePair : rootNode.getMetadata()) { | |
| if (StringUtils.startsWith(keyValuePair.getKey(), id)) { | |
| rootNode.getMetadata().remove(keyValuePair); | |
| } | |
| } |
OlderNewer