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 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:scanning_aimation/scanner.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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
// imgLib -> Image package from https://pub.dartlang.org/packages/image | |
import 'package:image/image.dart' as imglib; | |
import 'package:camera/camera.dart'; | |
Future<List<int>> convertImagetoPng(CameraImage image) async { | |
try { | |
imglib.Image img; | |
if (image.format.group == ImageFormatGroup.yuv420) { | |
img = _convertYUV420(image); | |
} else if (image.format.group == ImageFormatGroup.bgra8888) { |
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 "doubleList.h" | |
/* linkedlist.c */ | |
#include <stdlib.h> | |
#include "doubleList.h" | |
//static link head = NULL; | |
static List ListHead; | |
link make_node(unsigned char item) | |
{ |
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
/* linkedlist.c */ | |
#include <stdlib.h> | |
#include "linkedlist.h" | |
//static link head = NULL; | |
static List ListHead; | |
link make_node(unsigned char item) | |
{ | |
link p = malloc(sizeof *p); |
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 <stdarg.h> | |
void printlist(int begin, ...) | |
{ | |
va_list ap; | |
char *p; | |
va_start(ap, begin); | |
p = va_arg(ap, char *); | |
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
/* stdarg.h standard header */ | |
#ifndef _STDARG | |
#define _STDARG | |
/* type definitions */ | |
typedef char *va_list; | |
/* macros */ | |
#define va_arg(ap, T) \ | |
(* (T *)(((ap) += _Bnd(T, 3U)) - _Bnd(T, 3U))) | |
#define va_end(ap) (void)0 | |
#define va_start(ap, A) \ |
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 <stdarg.h> | |
void myprintf(const char *format, ...) | |
{ | |
va_list ap; | |
char c; | |
va_start(ap, format); | |
while ( (c = *format) ) { | |
format++; |
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
/* generics.c */ | |
#include "generics.h" | |
void *max(void *data[], int num, cmp_t cmp) | |
{ | |
int i; | |
void *temp = data[0]; | |
for(i=1; i<num; i++) { | |
if(cmp(temp, data[i])<0) | |
temp = data[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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define BUFFLEN 10 | |
typedef struct example *PtrToExample; | |
struct example{ | |
int a; | |
int p[0]; | |
}; |
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> | |
void func (void *pv) | |
{ | |
char *pchar = pv; | |
*pchar = 'A'; | |
} | |
int main() | |
{ |
NewerOlder