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
Given qr/a mojo test object for the "(.+)" application/, func ($c) { | |
use_ok( $1 ); | |
my $tm = Test::Mojo->new( $1 ); | |
ok( $tm, "Object created" ); | |
$c->stash->{'feature'}->{'tm'} = $tm; | |
ok( $c->stash->{'feature'}->{'tm'}, "Got our Test::Mojo object" ); | |
}; | |
When qr/I go to "(.+)"/, func ($c) { | |
my $route_url = ''; |
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
<a href="http://perlweekly.com" style=display:scroll;position:fixed;top:0px;right:0px;z-index:10; ><img src="https://github.com/tudorconstantin/Perl-Weekly-Ribbons/raw/master/ribbon%20transparent.png" alt="Featured in Perl Weekly" /></a> | |
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
sub update{ | |
my $self = shift; | |
my $result_rs = $self->app->model | |
->resultset( $self->{resource} ) | |
->search_rs( | |
{ id => $self->param('id') }, | |
); | |
return $self->render_not_found if ( scalar( ( $result_rs->all ) ) == 0 ); |
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
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use Net::Facebook::Oauth2; | |
my $config = { | |
facebook => { | |
#get the app id and app secret from the settings page of your facebook application | |
#you create your own fb app from https://developers.facebook.com/ (accessing Apps -> Create a new app) | |
app_id => '', |
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 <cs50.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
int y; | |
int x; | |
int space; | |
int hash; | |
do { | |
printf("alege un nr intre 0 si 23n"); |
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> | |
#include <string.h> | |
int main(void) | |
{ | |
int nrFilme, count, rating, bestRating, lowRating; | |
char nume[40], filmBun[40], filmSlab[40]; | |
//le initializam inafara range-ului permis intre 0 si 10 | |
bestRating = -1; |
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) | |
{ | |
char name[3] = "Bob"; | |
char name1[10]; | |
int i = 0; | |
int found_at_position = -1; | |
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) | |
{ | |
int ctr; | |
int i = 0; | |
int found = 0; | |
char name[3] = "Bob"; | |
char name1[3]; |
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
/*This heade file defines a structure for information | |
about a book*/ | |
#include <stdio.h> | |
struct bookInfo{ | |
char title[40]; | |
char author[25]; | |
float price; | |
int pages; |
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
/* Write a program that acts as a simple calculator.The program shuld | |
alow the user to input data in form number operator number. | |
The following operators shuld pe recognized: +, -, *, /, S, E, . | |
The S operator tells the program to set the acumulator to the typed in | |
number. The E operator tells the program that execution is to end. | |
The artmethic operatioons are performed on the contenst of the acumulator with the number | |
that was keyed in accting as a smaple operand | |
program output | |
10S set Acumulator to 10 |
OlderNewer