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
Nil assertion failed (Exception) | |
0x10c555f55: *CallStack::new:CallStack at ?? | |
0x10c55608d: *raise<String>:NoReturn at ?? | |
0x10c558130: *Nil#not_nil!:NoReturn at ?? | |
0x10c596948: *MySql::ResultSet#read:(Bool | Float32 | Float64 | Int16 | Int32 | Int64 | Int8 | Slice(UInt8) | String | Time | Nil) at ?? | |
0x10c594d69: *DB::ResultSet+@DB::ResultSet#read<Int32:Class>:Int32 at ?? | |
0x10c5aeec8: *Campaign#update_campaign_status<String, String, NamedTuple(campaign_id: Int32, value: String, query: String, count: Int32, id_list: Int32, subject: String, html: String, txt: String, from: String, mirror: String, unsubscribe: String), String>:(DB::ExecResult | Nil) at ?? | |
0x10c59a3d6: *Scheduler#build_campaigns<Array(NamedTuple(scheduler_id: Int32, campaign_id: Int32, account_id: Int32, percentage: Int8, sender_id: Int32))>:Nil at ?? | |
0x10c57ca69: *Scheduler::new<Bool>:Scheduler at ?? | |
0x10c57abff: main at ?? |
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 required libraries | |
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <syslog.h> | |
int main(int argc, char ** argv) | |
{ |
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
<?php | |
/* | |
* This section of code is used to save user information to the database using PHP Data Objects, it also verifies that the user is signed in | |
* | |
*/ | |
//Start session to allow manipulation of session data | |
session_start(); | |
//Main database access information include | |
include('../../../../dbaccess/index.php'); | |
//Prewritten modules include (to make life easier) |
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
# Sell method for the sell view StockServ, this method is used to sell the clients shares | |
def sell | |
# Define client variable with the client ID, used to locate specific client info from database | |
@client = Client.find(params[:client_id]) | |
# This if statement checks if the user is selling a specific number of shares or whether they just wish to sell all of their shares | |
# | |
# Check to see if all required paramaters have been sent, if not check to see if sell all has been set, | |
# if so perform else, if none of these conditions are met, the else returns the user back to the original page and displays an error | |
if !params[:sell_quantity].nil? && !params[:owned_share_id].nil? && !params[:shares_quantity].nil? && !params[:sell_quantity].nil? |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
class ApplicationController < ActionController::Base | |
#This is the base application controller in which the current user is held and various other methods | |
protect_from_forgery | |
helper_method :current_user, :vat | |
def vat(income) | |
vat = (income / 100) * 20 | |
return vat | |
end | |
private | |
def current_user |
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
herp |
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
class OrdersController < ApplicationController | |
def view | |
@orders = Order.all | |
end | |
def new | |
@order = Order.new | |
end | |
def create | |
@order = Order.new(params[:order]) |
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
ActiveRecord::RecordNotFound in OrdersController#create | |
Couldn't find Product with ID=1 for Order with ID= | |
Rails.root: /BillingSystem | |
Application Trace | Framework Trace | Full Trace | |
app/controllers/orders_controller.rb:10:in `new' | |
app/controllers/orders_controller.rb:10:in `create' |
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
ActiveRecord::RecordNotFound in OrdersController#create | |
Couldn't find Product with ID=1 for Order with ID= | |
Rails.root: /BillingSystem | |
Application Trace | Framework Trace | Full Trace | |
app/controllers/orders_controller.rb:10:in `new' | |
app/controllers/orders_controller.rb:10:in `create' |
NewerOlder