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 "FirstViewController.h" | |
#import "AppDelegate.h" | |
#import "Tasks.h" | |
#import "SimpleTableCell.h" | |
@interface FirstViewController () | |
@property (retain,nonatomic) NSMutableArray *tasklist; | |
@property (retain,nonatomic) NSMutableArray *courselist; | |
@property (retain,nonatomic) NSMutableArray *teacherlist; | |
@property (retain,nonatomic) NSMutableArray *datelist; |
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 checkIfPrime(number){ | |
for( something = 2; something <= Math.sqrt(number); something++) | |
if( number % something == 0) return 0; | |
return 1; | |
} | |
function findPrimeFactors(number) { | |
//find prime numbers less than the number | |
for( i = Math.floor(number/2); i >=2 ; i--) |
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
// | |
// ViewController.m | |
// logintest | |
// | |
// | |
#import "ViewController.h" | |
#import "AFNetworking.h" | |
@interface ViewController () |
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
using System; | |
using System.Net; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace Aduuu | |
{ |
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
// | |
// ViewController.m | |
// logintest | |
// | |
// Created by AGD IT on 5/13/15. | |
// Copyright (c) 2015 AGD IT. All rights reserved. | |
// | |
#import "ViewController.h" | |
#import "AFNetworking.h" |
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 fs = require ('fs'); | |
fs.readdir(__dirname, function (err, files) { | |
console.log(files); | |
}); | |
// function readLines(input, func) { | |
// var remaining = ''; |
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 StringReverse { | |
public static String reverseString(String str){ | |
StringBuilder dest = new StringBuilder(str.length()); | |
for(int i = str.length()-1;i>=0;i--){ | |
dest.append(str.charAt(i)); | |
} | |
return dest.toString(); | |
} |
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 Compress { | |
public static String compressedString(String str){ | |
StringBuilder dest = new StringBuilder(); | |
for(int i=0;i<str.length();i++){ | |
char c = str.charAt(i); | |
dest.append(c); | |
int j = i; |
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 ReplaceCharacter { | |
public static String stringReplacer(String str,char source,String replaced){ | |
StringBuilder dest = new StringBuilder(); | |
for(int i = 0;i<str.length();i++){ | |
char ch = str.charAt(i); | |
if(ch==source){ | |
dest.append(replaced); |
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.company; | |
public class Unique { | |
public static boolean checkUnique(String word){ | |
if(word.length()>256) return false;// if a string is more than 256 characters long, it repeats any of the string | |
boolean[] charset = new boolean[256]; | |
for(int i = 0;i<word.length();i++){ | |
char c = word.charAt(i); | |
if(charset[c]) return false; | |
charset[c]=true; |
OlderNewer