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
var url = require('url'); | |
var http = require('http'); | |
var data={ | |
"_index":"indexes", | |
"_type":"reports", | |
"_id":"1874", | |
"_score":0.2876821, | |
"_source":{ | |
"1":"Yes", |
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 simple_upload(request): | |
if request.method == 'POST' and request.FILES['myfile']: | |
myfile = request.FILES['myfile'] | |
fs = FileSystemStorage() | |
filename = fs.save(myfile.name, myfile) | |
uploaded_file_url = fs.url(filename) | |
# post_data = {'name': filename} | |
# response = request.post('http://localhost:9300/customer/_doc/128', data=post_data) | |
# content = response.content | |
# print(content) |
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
public class Solution { | |
int maxSize; | |
int size; | |
int officeX; | |
int officeY; | |
public int calculate(ArrayList<Integer> x, ArrayList<Integer> y, int officeX, int officeY, int homeX, int homeY) { | |
size=x.size(); |
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
import java.io.*; | |
import java.util.ArrayList; | |
public class HelloWorld { | |
boolean capslock; | |
public ArrayList<ArrayList<Character>> output; | |
int line; | |
int a; | |
int b; |
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 makeServiceCall returns the JSON we get | |
when we hit the URL with GET request | |
*/ | |
public class HttpHandler { | |
private static final String TAG = HttpHandler.class.getSimpleName(); | |
public HttpHandler() { |
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
E/AndroidRuntime: FATAL EXCEPTION: main | |
Process: ghost.json, PID: 6298 | |
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/ManagementFactory; | |
at org.elasticsearch.monitor.jvm.JvmInfo.<clinit>(JvmInfo.java:46) | |
at org.elasticsearch.monitor.jvm.JvmInfo.jvmInfo(JvmInfo.java:85) | |
at org.elasticsearch.node.internal.InternalNode.<init>(InternalNode.java:123) | |
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159) | |
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166) | |
at ghost.json.MainActivity.o |
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
#include <iostream> | |
using namespace std; | |
class TEACHER { | |
//here we declare members, members can be functions or variables | |
private: | |
char name[25]; | |
char subject[15]; | |
float da, hra, basic_salary; |
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
#include<stdio.h> | |
#include<conio.h> | |
int main () { | |
int array[4][4]; | |
int sum, temp, sum2; | |
int i, j; | |
//for entering matrix |
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
E/UncaughtException: java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView | |
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:386) | |
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362) | |
at android.widget.AbsListView.obtainView(AbsListView.java:2344) | |
at android.widget.ListView.measureHeightOfChildren(ListView.java:1270) | |
at android.widget.ListView.onMeasure(ListView.java:1182) | |
at android.view.View.measure(View.java:17442) | |
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
//Language - Java. Code written and compiled on www.compilejava.net and successfully tested. | |
public class HelloWorld { | |
public int strstr (String mainString, String subString) { | |
if (mainString == null || subString == null) { | |
System.out.println("Invalid input."); | |
return 0; | |
} |