I hereby claim:
- I am sunny1304 on github.
- I am sunny1304 (https://keybase.io/sunny1304) on keybase.
- I have a public key ASCH7fSzZ6ZVa4AsvhI8-aalUTBvlf1Q2godjAIrL8_pSwo
To claim this, I am signing this object:
#include <linux/init.h> | |
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/sched.h> | |
#include <linux/fs.h> | |
#include <linux/cdev.h> | |
#include <linux/semaphore.h> | |
#include <asm/uaccess.h> | |
I hereby claim:
To claim this, I am signing this object:
#include <pthread.h> | |
#include <stdio.h> | |
typedef struct student{ | |
char *name; | |
int age; | |
}Student; | |
void *show_student(void *student); |
use std::{os}; | |
fn args_avg(vec: &[~str]) -> int { | |
let mut sum = 0; | |
let mut count = 0; | |
for i in vec.iter(){ | |
let x:Option<int> = from_str(*i); | |
if x != None{ | |
sum += x.unwrap(); | |
count += 1; |
var relationPromise = ArticleRelation.findOne({parentArticleGuid: oldArticle.guid}).exec(); | |
relationPromise | |
.then(function(relation){ | |
if (relation == null){ | |
relation = new ArticleRelation({ | |
parentArticleGuid: oldArticle.guid, | |
organization: task.organization._id | |
}); | |
} |
var csv = require('csv'), | |
async = require('async'), | |
fs = require('fs'), | |
path = require('path'), | |
root = __dirname, | |
data = [], | |
maxconcurrency = 5; | |
var mongoose = require('mongoose'); | |
mongoose.set('debug', true); |
// node fname.js g model user name | |
var fs =require('fs'); | |
var os = require('os'); | |
var args_list = process.argv; | |
var folder = args_list[3] | |
var model_name = args_list[4] | |
var model_attrs = args_list.slice(5); | |
var eol = os.EOL; | |
// console.log(folder, model_name, model_attrs); |
class SimpleOwnerAuthorization(Authorization): | |
''' | |
Does what it says: filters objects by their owner (user). | |
''' | |
def __init__(self, ownerfilter=None, *args, **kwargs): | |
self.ownerfilter = ownerfilter # the user field i.e. 'person__user' | |
def is_authorized(self, request, object=None): | |
return True # for now |
//Use -Werror in GCC to get error, otherwise it will be a warning | |
/* | |
Constraints | |
One of the following shall hold: | |
both operands have arithmetic type; | |
both operands are pointers to qualified or unqualified versions of compatible types; | |
one operand is a pointer to an object or incomplete type and the other is a pointer to a qualified or unqualified version of void; or |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int word_count(const char* str) | |
{ | |
size_t word_count = 0; | |
size_t char_counter = 0; | |
size_t str_length = strlen(str); |