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
package tk.saiprasadm.appswallet; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.design.widget.Snackbar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.LayoutInflater; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; |
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> | |
int main() { | |
int *arr; | |
int n,i,back; | |
printf("\nEnter the number of elements for the array"); | |
scanf("%d",&n); | |
back=n-1; | |
arr=(int*)malloc(n*sizeof(int)); |
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
//Progam to remove vowels | |
#include<stdio.h> | |
#include<string.h> | |
int main(){ | |
char *str; | |
int len,i=0; | |
printf("Enter a single string "); | |
scanf("%s",&str); | |
len=strlen(str); |
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
//Program for printing a patter as shown in the output below | |
#include<stdio.h> | |
int main(){ | |
int step=4,start,i,j; //variable step is for defining number of steps | |
//start is for the starting number from which the pattern starts | |
//i and j are the iterators for outer and inner loop | |
printf("Enter the number to start "); | |
scanf("%d",&start); //accept the starting number | |
//This loop is for the upper part |
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
//Program for array concatination with dynamic memory allocation | |
#include<stdio.h> | |
#include<stdlib.h> | |
int main(){ | |
int *arr1,*arr2; | |
int n1,n2; | |
int i,total,counter; | |
printf("Enter the number of elements to be entered in arr1 and arr2 "); | |
scanf("%d %d",&n1,&n2); //taking the number of elements for the arrays from the user | |
arr1=(int *)malloc(n1 * sizeof(int)); |
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 ExportImportDB extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
// TODO Auto-generated method stub | |
super.onCreate(savedInstanceState); | |
//creating a new folder for the database to be backuped to | |
File direct = new File(Environment.getExternalStorageDirectory() + "/Exam Creator"); | |
if(!direct.exists()) | |
{ |
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
12-31 12:09:15.208 15766-15873/com.collaborizm.app.collaborizm E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 | |
Process: com.collaborizm.app.collaborizm, PID: 15766 | |
java.lang.RuntimeException: An error occurred while executing doInBackground() | |
at android.os.AsyncTask$3.done(AsyncTask.java:309) | |
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) | |
at java.util.concurrent.FutureTask.setException(FutureTask.java:223) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:242) | |
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
package com.collaborizm.app.collaborizm; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.provider.Settings; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.view.KeyEvent; |
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
Disclaimer: The instructions are the collective efforts from a few places online. | |
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
First off, bundle. | |
================== | |
1. cd to the project directory | |
2. Start the react-native packager if not started | |
3. Download the bundle to the asset folder: | |
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |
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
#!/bin/sh | |
tar -xvf jdk-7* | |
sudo mkdir /usr/lib/jvm | |
sudo mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0 | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1 | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1 | |
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1 | |
sudo chmod a+x /usr/bin/java | |
sudo chmod a+x /usr/bin/javac |
OlderNewer