uno

1

votes
2

answer
616

views

VISA SCPI command processor for Linux

I have a special-purpose piece of custom test equipment that I want to control from another box using the VISA SCPI instrument control commands. The custom box contains an x86 processor running full Ubuntu Linux. I want that the custom box respond to a very small set of VISA commands. Really, I only...
Pedro_Uno
1

votes
0

answer
51

views

How to use a single malloc() call for a 2D array [duplicate]

This question already has an answer here: defining a 2D array with malloc and modifying it 7 answers 2D array in file/program scope 1 answer I want to malloc a large block of memory then access it as a 2D array. The malloc call is pretty strait forward, something like this. const int rows = 1000;...
Pedro_Uno
1

votes
0

answer
60

views

latex.exc.LatexBuildError: None for `latex.build_pdf()`

I try to run the following Python code on Arch Linux with texlive-* installed: from latex import build_pdf # Read the template from the file... min_latex = (r'\documentclass{article}' r'\begin{document}' r'Hello, world!' r'\end{document}') # Compile it... pdf = build_pdf(min_latex) # Save the genera...
Uno Yakshi
1

votes
0

answer
79

views

ClassName+CoreDataClass.swift not generated in Xcode10

I updated my Xcode from 9.4.1 to 10 (stable release) and I'm trying to update my Core Data model. I set the Codegen to Manual/None as before, but when I do Editor -> Create NSManagedObject subclass it generates only the file .CoreDataProperties.swift, but not the .CoreDataClass.swift one. The proble...
1

votes
1

answer
26

views

Attaching existing order (order.email) to create an account, Devise?

This is the scenario I would like to accomplish: User creates an order (enters email into order table). User is sent order confirmation email with link to sign up. If User decides to sign up, it will connect to the account. What would it take to accomplish this? I'm a bit mixed up because the Order...
uno
1

votes
2

answer
66

views

How to use to_param on only one method - or disable for other methods?

I have created a to_param in my model so I can find orders by their tokens instead of user ID's in the URL. This is for guest users who are not signed in. I do this so other users won't be able to view other peoples orders or just anybody in general. I have this in my model: validates :order_token,...
uno
1

votes
1

answer
82

views

Client side form validation rails

Issue: My client side rails form input format validation won't work how the regex is set up to. I have the following rails form input: When i enter the correct format, it won't validate and the 'enter correct format' message appears. The following regex in my model validates for the param: /\A^(?:ht...
uno
1

votes
2

answer
34

views

Uploading .MOV files with carrierwave-video?

Issue: I am unable to upload .mov files via Carrierwave. I have no issue with carrier wave with uploading images, and for video - .mp4 files. When i attempt to upload .mov files, the upload fails. I'm assuming anything other than .mp4 will not work. Anyone use Carrierwave-video gem and are able to...
uno
1

votes
3

answer
56

views

Font awesome icon not centering

JS: http://jsfiddle.net/1cmtpnha/ I have this: padding_5 just contains padding css card-body is bootstrap 4 I tried this: [class*='icon-'] { display: inline-block; width: 100%; } .icon-center i { text-align: center; } and this: .icon-center { margin: auto; display: block; } and neither worked. Thos...
uno
1

votes
0

answer
52

views

Friendly ID not working as expected for models Show. Any ways around this?

Issue: I have installed the friendly_id gem, it is working how it supposed to for my Users table, but for my Listings model, the friendly URL to use a :name instead of :id isn't working. Here's my Listings controller in a nutshell: def show @order = @listing.orders.new() #as you can see, I have no n...
uno
1

votes
1

answer
24

views

Passing ID through form.collection_check_boxes from associated model

Issue: The Product model ID will not enter the UserProduct model. Controller: UserProduct Create: def create @user_product = UserProduct.new(user_product_params) @product = Product.find(params[:product_id]) @user_product.product_id = @product.id ....... Form: This shows the Products :sku on the fron...
uno
1

votes
1

answer
53

views

don't search underneath fixed div

the layout of my html page has a fixed div on top of the page. the content div then has a margin-top to compensate for the fixed div. However, when the content gets scrolled down, if I do a search on page, the browser would sometimes show matches that would be underneath the fixed div, i.e. invisibl...
Uno Mein Ame
1

votes
2

answer
1.9k

views

Hadoop Load and Store

When I am trying to run a Pig script which has two 'store' to the same file this way store Alert_Message_Count into 'out'; store Warning_Message_Count into 'out'; It hangs, I mean it does not proceed after showing 50% done. Is this wrong? Cant we store both the results in the same file(folder)?
Uno
1

votes
1

answer
38

views

Tying in the PayPal smart buttons with a Ruby on Rails form_for and controller/method?

I have the smart buttons 'working' in sandbox but I can't think of any way to attach the smart buttons success to the order form which creates the order. With Stripe Elements, it's pretty plug and play because it's on the page and a part of the form itself, but with PayPal with the redirects, I can...
uno
1

votes
1

answer
2.8k

views

Using DFP to serve a Wordpress background image

We currently sell advertising packages on our website that include a mixture of normal banner ads, and also some other value adds like background images, editorial etc. DFP does a great job managing the display ads, but we'd like to look at a solution that we could load the background image as well....
Uno De Waal
1

votes
1

answer
433

views

How do I find INSERT_PATH_TO_JSON_CONFIG_PATH

I am trying to set up a dropbox API on my php website. It requires that I specify 'INSERT_PATH_TO_JSON_CONFIG_PATH' I have absolutely no idea how to find it. Any tips would be appreciated.
Uno Mein Ame
1

votes
1

answer
190

views

Ruby multithreading queues

I have a problem with synchronizing threads, I have no idea how to do it, can someone help me ? So, the thing is that I have to launch the threads in some specific order. The order is the following: Threads 1 and 7 can go simultaneously, and after one of them is finished, the next thread is launched...
uno_ordinary
1

votes
1

answer
987

views

How can I write unsigned type to file in VHDL?

I have some 48 bit unsigned numbers that I want to write to a file from my VHDL testbench. Unfortunately, the way I have always done it in the past, converting to integer, does not work for numbers larger than 32 bits. Here is how I have always done it with numbers smaller than 32 bits. write(L=>res...
Pedro_Uno
1

votes
1

answer
330

views

How to share data between expressjs and angularjs

How can i share data between express.js and angular.js , am using ejs view engine in express.js . in case if i want share data to in the root page of angular.js i can simply use : Note meaning of root page of angular.js page is the target page of route in express.js . in my example is index.ejs. Que...
uno-2017
1

votes
1

answer
857

views

No candidate version available for tshark

I got this error when i execute my chef No candidate version available for tshark Chef::Exceptions::Package ------------------------- No candidate version available for tshark Resource Declaration: --------------------- # In /root/chef/cookbooks/kamailio-trunk2/recipes/default.rb 23: package pkg...
uno
1

votes
3

answer
56

views

use variable in command line batch file

I use the following command in a batch file: winscp sitename /command 'get /filename.160313.tgz q:\localfolder\' which downloads the file using winscp program. What I'd like to do is have '160313' be automatically generated based on today's date. How would I replace 160313 with such variable?
Uno Mein Ame
1

votes
1

answer
41

views

Skew Button, not Text, in loop

I found a few answers on this but none that involve a loop. I'm not sure how to separate the text, and button - and then combine them... which is oddly the only way i can think of doing this. But I'm sure some one of you guys will know the answer to this off the bat. I want to skew the button, but...
uno
1

votes
2

answer
175

views

How to require the credit card field in Stripe Elements fields?

My issue is that I have a form that submits with the credit card field being blank. I have the credit card field combined with another form which is where the issue lies. So my question is, how do I require the credit card field using JS or Ruby? Here's the form and javascript: Credit or debit car...
uno
1

votes
2

answer
34

views

link_to nested resource route can't find ID

The link_to in my user name is creating an error and I don't know why. Error: Couldn't find StripeAccount without an ID Controller: this is inside a separate controller from the StripeAccount controller def settings @user = current_user.id @stripe_account = StripeAccount.find(params[:stripe_account_...
uno
0

votes
0

answer
0

views

Passing API POST to stripe with business type?

Stripe news API update for Connect accounts doesn't allow the 'legal_entity' param for new stripe accounts. The new updated way is for 'business_type'.. But the issue i have is that I need to pass data from either of the 2 choices for business_type of 'individual' or 'company. This is the old way t...
uno
1

votes
2

answer
0

views

Customize notice message for each parameter on update?

Goal: to have a unique message per either each parameter or set of paramters. I have this code in my controller update: def update @order = Order.find(params[:id]) respond_to do |format| if @order.update_attributes(order_status) # if @order.changed == [:order_status] format.html { redirect_to @order...
uno
1

votes
1

answer
0

views

is the threadpool shared - .net

If i have a webserver running IIS and another application which does a lot of operations using File. class, are the specific threads dedicated to IIS and specific amount for other apps?
uno
1

votes
3

answer
0

views

SQL - Week calculation

I've written an SQL statement which gets the current week based on sysdate. For eg: If the date is March 12th, 2011 (saturday) then the o/p should be 03/06/2011-03/12/2011 But somehow, when I run the below SQL query, I get an o/p : 03/06/2011-03/13/2011 Can someone pls help me figure out what is wr...
uno
0

votes
0

answer
0

views

Rails credentials only remembering old credentials?

Issue: I created a new Stripe account and connected it to my application, did all the new test publishing and secret api keys... Added to my credentials and config. All of my keys are successfully called with : Rails.application.credentials.dig(:stripe, :publishable_key), ...in both config and strip...
uno
1

votes
1

answer
0

views

obtain user name from protected folder

I have a protected folder on my server with access to several users defined through cpanel. Is there a way for PHP to tell me which user has logged in?
Uno Mein Ame
1

votes
3

answer
768

views

add mysql columns on the fly

Is there a way to add mysql columns on the fly when I try to insert a row? For example, table contains columns A, B, C and I want to insert into the table a row that contains A, C, D, and F? Is there a way to actually add the D and F columns instead of resulting in an error?
Uno Mein Ame
0

votes
0

answer
21

views

C Language hex constant formatting [duplicate]

This question already has an answer here: Is there a way to write a large number in C++ source code with spaces to make it more readable? [duplicate] 6 answers Delimiter tens and units in c++ literals 2 answers Many languages allow you to insert underscores into long hex numbers to improve readabi...
Pedro_Uno
0

votes
0

answer
22

views

Javascript interferes with specific other javascript

I have an issue which i thought i solved but didn't. My javascript for my side menu toggle button wouldn't work on first load into layout, but would work once a link is clicked within the same layout. Then it wouldn't work on any page reload within the same layout. I 'solved' it by adding... //= re...
uno
2

votes
1

answer
29

views

How to check number or checked checkboxes on load?

I want to check how many checkboxes are checked on load and not allow a specific number of checkboxes to be surpassed. I have the following form: true) do |c| %> Then this Javascript: $(document).on('turbolinks:load', function(){ $('#checkbox input:checkbox').change(function () { var $cs=$('#checkbo...
uno
0

votes
0

answer
6

views

Error: No such filter: '"movie', what's the isssue?

I am using the code to add watermarks to videos on upload for carrierwave-video: process encode_video: [:mp4, resolution: '640x480', watermark: { path: 'app/assets/images/logo-nike.jpg', position: :bottom_right, pixels_from_edge: 10 }] When i use this code, i get error: (in short) Stream mapping: St...
uno
0

votes
0

answer
3

views

Writing Custom Extensions in Druid

I am new to Druid. Problem Statement We do currently push raw event data to Druid. I have a requirement to apply certain calculations on the data (say like certain stat techniques) which are not supported by Druid or the extensions it provides out of the box. There are two questions I have - What w...
Uno
0

votes
0

answer
6

views

How to automate AWS Elastic Transcoder Jobs for s3 buckets?

What I want: To add watermarks to all video files that are uploaded to the S3 bucket (mov, mp4, etc.). Then overwrite the file with it's same name with the newly transcoded file that has the watermark on it. So, I was able to manually do this by creating a pipeline and job with elastic transcoder,...
uno
0

votes
0

answer
11

views

Using CanCanCan for Roles and Multiple Devise Models?

I need to use CanCanCan to limit the ability for all users to only be able to view their own data, or allow limited data to be seen from others. I have tried the following but doesn't work: class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user (not logged in) af...
uno
1

votes
1

answer
69

views

Making sure associated column is unique

Issue: I want to make sure a column is unique and if an update/create occurs, it doesn't create a new row but will just edit the existing row. More focused issue: I have a stripe account table which was previously associated to a User with the following code: stripe_account.rb (model) belongs_to :us...
uno
1

votes
3

answer
2.1k

views

PHP COUNT_RECURSIVE only count non-array values?

I have a multidimensional array to the tune of $doclist['area']['source'][#]['type'] I would like to get a number of all entries of ['type'] = 'title' that are not empty. Is there a simple way of doing it? While I am at it, is there a way to get a number of all entries of ['type'] = 'title' AND ['ar...
Uno Mein Ame

View additional