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
package io.bagstation.bagstation; | |
import android.util.Log; | |
import android.app.Activity; | |
import android.os.Build; | |
import android.webkit.WebViewClient; | |
import android.webkit.WebView; | |
import android.content.Intent; | |
import android.content.ActivityNotFoundException; | |
import android.net.Uri; |
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 example_code(list_of_product_data): | |
return [product for product in list_of_product_data if product == 'specific_kind'] |
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 example_code(list_of_product_data): | |
kinds = [] | |
for product in list_of_product_data: | |
if product == 'specific_kind': | |
kinds.append(product) | |
return kinds |
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 example_code(list_of_product_data): | |
kinds = {} | |
for index, product in enumerate(list_of_product_data): | |
if product == 'specific_kind': | |
kinds[index] = product | |
return kinds |
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 example_code(list_of_product_data): | |
return { | |
index: product for index, product in enumberate(list_of_product_data) | |
if prodcut == 'specific_kind' | |
} |
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 abstract class Animal { | |
SwimmingBehavior swimmingBehavior; | |
SoundBehavior soundBehavior; | |
public abstarct void display(); | |
public void performSwimming() { | |
swimmingBehavior.swim(); | |
} | |
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> | |
// this is a global variable. | |
int a = 1; | |
// Can be used within a function without declaration. | |
void changeValue() { | |
a = 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> | |
int main(void) { | |
//this is a local variable. | |
int a = 10; | |
if (1) { | |
int a = 3 | |
} | |
printf("%d", a); | |
system("pause"); |
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> | |
void addValue() { | |
// It doesn't reset every time I call. | |
static int a = 10; | |
a = a + 10; | |
printf("%d\n", a); | |
} | |
int main(void) { |
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> | |
void addValue() { | |
// It doesn't reset every time I call. | |
static int a = 10; | |
a = a + 10; | |
printf("%d\n", a); | |
} | |
int main(void) { |
OlderNewer