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
/* Example 1, targeted code is a function */ | |
#pragma omp target device(fpga) implements(matmul) copy_in( A[N], B[N] ) copy_inout( C[N] ) | |
void matmul_fpga(int *A, int *B, int *C) | |
{ | |
// Code that will run on the FPGA | |
} | |
#pragma omp task input( A[N], B[N] ) inout( C[N] ) | |
void matmul(int *A, int *B, int *C) | |
{ |
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" | |
#include "sys/time.h" | |
#define SIZE (128*2048) | |
unsigned long long A[SIZE]; | |
unsigned long long B[SIZE]; | |
unsigned long long C[SIZE]; | |
unsigned long long D[SIZE]; |
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
## | |
# $ rails example.com -m http://tr.im/typus_example | |
## | |
# Install Typus and friends. | |
plugin 'typus', :git => 'git://github.com/fesplugas/typus.git' | |
plugin 'acts_as_list', :git => 'git://github.com/rails/acts_as_list.git' | |
plugin 'acts_as_tree', :git => 'git://github.com/rails/acts_as_tree.git' | |
plugin 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git' |
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
--- courier-0.47/maildrop/main.C.orig 2004-11-22 12:23:09.000000000 +0100 | |
+++ courier-0.47/maildrop/main.C 2004-11-22 12:23:19.000000000 +0100 | |
@@ -718,38 +718,6 @@ | |
++i; | |
} | |
-#if HAVE_COURIER | |
- if (deliverymode && orig_uid == getuid()) | |
- { | |
- const char *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
#!/bin/sh | |
# this file is a git post-update hook | |
# the file must be named post-update and be executable (chmod +x post-update) | |
# it must be in the .git/hooks directory | |
RAILS_ENV=production /path/to/retrospectiva/script/repository_syncer | |
echo "Retrospectiva was notified :-)" |
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
require 'rubygems' | |
require 'wx' | |
class MyFrame < Wx::Frame | |
def initialize | |
super(nil, :title => "Thread example") | |
set_menu_bar menubar | |
timer = Wx::Timer.new(self, Wx::ID_ANY) |
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
select first_name, last_name, email, locale, time_zone from users INTO OUTFILE '~/contacts.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; |
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
require 'csv' | |
CSV.open("#{Rails.root}/../consumers.csv", "w") do |csv| | |
["Last login","Registration date","Organizations", "Projects count", "Organizations Plan", "name", "time_zone", "Language", "Email", "Phones", "Address"] | |
User.find_each(:include => [{:card => [:addresses, :phone_numbers]}, :organizations]) do |user| | |
print '.' | |
phones = [] | |
if user.card | |
phones << user.card.phone_numbers.map(&:name).join(";") if user.card.phone_numbers | |
first_address = user.card.addresses.first | |
end |
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
ca: | |
errors: | |
messages: | |
not_found: "no s'ha trobat" | |
already_confirmed: "ja està confirmat" | |
not_locked: "no està bloquejat" | |
not_saved: | |
one: "1 error ha evitat que %{resource} es pugui desar:" | |
other: "%{count} errors han evitat que %{resource} es pugui desar:" |
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
run lambda { |env| | |
headers = { "key"=> ("a" * 3455)} # 3454 works, 3455 don't | |
[200, headers, "Hello World!\n"] | |
} |
OlderNewer