Skip to content

Instantly share code, notes, and snippets.

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:ticaret_yeri/domain/ad/ad_info.dart';
class HighlightView extends StatelessWidget {
final List<AdInfo> highlights;
const HighlightView({Key? key, required this.highlights}) : super(key: key);
@override
private void openImage(long imageId) {
if (disposable != null) {
disposable.dispose();
}
disposable = commonService.getImageById(imageId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.onErrorResumeNext(error -> Single.error(ApiExceptionUtil.generalException(error)))
.subscribe(v -> {
hideProgress();
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct wifi{
char *name;
int rssi;
char *mac;
} Wifi;
#include<stdlib.h>
#include<strings.h>
#include<stdio.h>
int main() {
char *sRaw = "02010606FFCDAB641001565";
printf("All [%s]\n", sRaw);
char at17 = sRaw[17];
printf("17 is [%c]\n", at17);
char at16 = sRaw[16];
#include<stdlib.h>
#include<strings.h>
#include<stdio.h>
int main(){
char *sRaw="02010606FFCDAB641001565";
printf("All [%s]\n",sRaw);
char *till18=malloc(18);
strncpy(till18,sRaw,18);
printf("till18 [%s]\n",till18);
int lenTill18=strlen(till18);
@bullheadandplato
bullheadandplato / mac_cleaner.c
Created October 14, 2020 15:45
Mac address cleaner
#include<string.h>
#include<stdio.h>
#include<stdlib.h>
int main() {
char *garbage_mac = "CF97#6#B@3F%23AC$";
char *clean_mac = malloc(12);
int length = (int) strlen(garbage_mac);
int clean_mac_counter = 0;
for (int i = 0; i < length; i++) {
/* simple parallel factorial calculator. Only useful
* to illustrate collective communication :)
*
* Hector Urtubia
*/
#include <stdio.h>
#include "mpi.h"
int main(int argc, char *argv[]){
@bullheadandplato
bullheadandplato / build.gradle
Created September 29, 2018 11:06
signing config
android {
compileSdkVersion 28
buildToolsVersion '27.0.3'
signingConfigs {
release {
keyAlias 'key2'
keyPassword 'password'
storeFile file('/home/bullhead/keys/key.jks')
storePassword 'password'
}
package com.bullhead.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
public class AbcActivity extends AppCompatActivity implements FragmentOne.Listener{
@Override
protected void onCreate(Bundle savedInstanceState) {
public class Bank implements Serializable {
private String id;
private String name;
private String account;
private String comments;
public String getId() {
return id;
}