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
63

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
1

votes
1

answer
317

views

html strings in textarea

I feed a string to my textarea. The string contains HTML strings, such as ©, é, etc. I need these strings to be displayed as such (©, é) and not be turned into © and é respectively. How would I do it?
Uno Mein Ame
1

votes
1

answer
5.3k

views

Join USING 'merge' in PIG

I am a Hadoop/PIG beginner. Could anyone please tell me the difference between grunt> A = join A by $1, B by $1 using 'merge'; And grunt> A = join A by $1, B by $1; I have 2 files 1.txt and 2.txt which have the following data 1.txt A 1 B 3 C 5 D 7 2.txt AA 1 BB 2 CC 4 DD 6 And I want...
Uno
1

votes
3

answer
1.3k

views

How can I get languages from the langauge manager in joomla?

How can I get the languages installed in the language manager in joomla, as I know the following: getLocal() give for local machine language am not get the language installed in the application getname() , getTag() give you the current language name / tag
uno-2017
0

votes
0

answer
11

views

Font awesome gradient animation on hover

When a icon font awesome is hovered, I want the color gradient to animate. I have tried the following code but is not working: Code pen: https://codepen.io/anon/pen/exoQmp What is wrong with my code? .awesome-gradient { background: linear-gradient(-45deg, red, blue); -webkit-background-clip: text;...
uno
0

votes
0

answer
18

views

Centering div items when screen is under 768px?

Issue: My product grid won't center under 576px. Question: How can I create the css so the products center under 576px I would like for when the screen size is under 768 for the products to be centered. This is mainly for mobile devises because i have the images resized to be smaller so 2 can fit p...
uno
1

votes
2

answer
1.2k

views

Call validator method in ViewController from the View

I'm learning Ext JS 5.1. Is it possible to call validator method that defined in ViewController from the View? MyView { xtype: 'textfield', margin: '0 0 10 0', fieldLabel: 'Password', name: 'pass1', reference: 'pass1', inputType: 'password', allowBlank: false, minLength: 5 }, { xtype: 'textfield', m...
Yasuyuki Uno
1

votes
5

answer
43

views

3 Column Div how to display them inline when browser resize?

I have 3 divs but the 3rd div comes down when i resize the browser. How can i still display them inline when browser resize? I can do it by changing the width of my container but i want it to be 100% This is my Code: .box{ float :left; width: 250px; background: #f6f6f6; border: 1px solid #e0e0e...
uno
1

votes
2

answer
46

views

How to get SUM value in a array?

I have 2 elements which has the value of member which is 5 I want to get the sum of all value of member [member] => 5 + [member] => 5 = 10 The output should be 10 This is my array Array ( [0] => Array ( [membUid] => 0090000816 [service_id] => 0 [member] => 5 ) [1] => Array ( [membUid] => 0090000867...
uno
1

votes
2

answer
41

views

How to get 2nd array in node js?

I am creating a route in node.js and this is my code: schedule.get('/conference/schedule_participants/:circle/:schedId', function(req, res) { if(req.schedId){ getParticipants( req.params, function(contacts){ results.contacts=contacts; res.json(results); }); }else{ res.json(results); } }); the outp...
uno
2

votes
4

answer
680

views

Get previous value of select option

Is there a way to get the previous value of select option? the previous value is Red If i change it to green it will echo the selected color How can i echo the previous color which is red? this is my code : thanks :) Red Green Blue Pink Yellow
uno
2

votes
1

answer
258

views

jquery Modal dialog Get value of input type text by id

I have this code in my php file $text .= ' '; i want to get the value of the input type text and this is my code : var prefix = $('#prefix').get(0).value; console.log(prefix); i also try document.getElementById('prefix'); but still no result
uno
2

votes
1

answer
3.7k

views

Using socket.io with net socket in nodejs

Is there a way that i can use socket.io with net socket in nodejs ? so at the end i have main service that listen on port , waiting for connection (net socket) and main while listen to client's want establish connection using socket.io . Example scenario: Main service running listing on port X for...
uno-2017
2

votes
3

answer
122

views

Please help me write regex replace

I've not yet mastered regex, so would appreciate your help with the code. I need to replace all lines that: start with brackets or parentheses; which may contain either a regular number of up to 3 digits or a combination of up to 3 letters; which may be followed by a period; which digis or the numb...
Uno Mein Ame
2

votes
2

answer
102

views

form input value through ID, not name

I have a form with an input that has a name an id. When I try to get the value of the input by using document.getElementById, I get an error. I can access the element by using the form name and the input name, but it makes the script a lot less flexible. Any workarounds? Here's the code I have: var...
Uno Mein Ame
3

votes
3

answer
10.3k

views

Reset form on Back button

Trying to find an elegant solution to reset a webform (or more specifically two INPUT Type='hidden' fields) if a user goes BACK after the form is submitted. I understand that BACK button does not trigger an onload event. But is there any way of dealing with this?
Uno Mein Ame
2

votes
1

answer
2.2k

views

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'd'

I have a function that once in a while gives out an error: Warning: preg_replace() [function.preg-replace]: Unknown modifier 'd' Most often it does not. I don't understand the pattern when it does and when it doesn't. I know almost nothing about regex, so any help would be greatly appreciated. Here'...
Uno Mein Ame
3

votes
1

answer
3.4k

views

Accessing fields of Tuples

I have the following pig Script: My file 1.txt has A 1 B 2 C 3 D 4 grunt> A = load '1.txt' using PigStorage(' ') as (a:chararray,b:int); grunt> B = foreach A generate A.a; grunt> dump B; It gives me the following error ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Unable to recreate excep...
Uno
2

votes
3

answer
923

views

retain links functionality inside a div that has an onclick event

I have a div that has an onclick that hides the div. If I have a link inside the div, the link does not work, because the onclick steals the click. The desired result: if a click is made anywhere inside the div BUT the link, that the div gets hidden. If a click is made ON the link, then I want the...
Uno Mein Ame
3

votes
2

answer
172

views
2

votes
1

answer
2.6k

views

Running Mahout on Hadoop Cluster

I am a Mahout/Hadoop Beginner. I am trying to run Mahout examples given in 'Mahout in Action' Book. I am able to run the examples in Eclipse without Hadoop. Can you please let me know how to run the same examples in the Hadoop Cluster.
Uno
1

votes
1

answer
111

views

PHP: how to get custom date PHP 5.1.6

I have a code in php 5.1.6 which is: $tz = date_default_timezone_set('Asia/Tokyo'); $date = date('2016-11-24 07:27:00 +00'); $date = date_default_timezone_get($tz); $currentDate = date('F d, Y H:i'); I keep getting the current time on my output November 24, 2016 16:09 How can I get November 24, 20...
uno
2

votes
1

answer
1k

views

Weka UI and API code in Java gives different results

I am new to Weka. I am trying to run WEKA using API's and have found out that the results from the WEKA GUI does not match to the one produced by the Java code. I am trying to run a RandomForest Algorithm by providing TrainingSet and Test Set. Here is the code snippet: DataSource ds = new DataSource...
Uno
7

votes
2

answer
8.1k

views

Storing results of UNION in PIG in a single file

I have a PIG Script which produces four results I want to store all of them in a single file. I tries using UNION, however when I use UNION I get four files part-m-00000, part-m-00001, part-m-00002, part-m-00003. Cant I get a single file? Here is the PIG script A = UNION Message_1,Message_2,Message...
Uno
1

votes
1

answer
3.2k

views

Move TCPDF-based script to a different folder

I have a script that generates a PDF file using the TCPDF library. The script works perfectly fine when in its own folder. I tried moving it to a different folder. I changed require_once('pdf_dropbox/tcpdf_include.php'); to refer to the proper location of the include file. However, I am still gettin...
Uno Mein Ame
2

votes
3

answer
5.6k

views

Uncaught TypeError: response is not a function

I am trying to get the response of this url. But when I check the console error message appears: Uncaught TypeError: response is not a function What is the possible problem? var uri = pbxApi+'/conference/participants/'+circle+'/'+data.conference+'/'+data.uniqueid+'?jsonp=response'; getJsonData(uri,...
uno
3

votes
2

answer
66.7k

views

change font color across divs and spans

is it possible to change font color across several divs and spans with css? For example, I have HTML that goes like this: some text ### some text some text in div some text some text some text some ### more text Is there a way to change the color of the text to, let's say, red between the ### mark...
Uno Mein Ame
1

votes
2

answer
115

views

Having trouble understanding this example on Multidimensional Array

For the code: // Demonstrate a two-dimensional array. class TwoDArray { public static void main(String args[]) { int twoD[][] = new int[4][5]; int i, j, k = 0; for (i = 0; i < 4; i++) for (j = 0; j < 5; j++) { twoD[i][j] = k; k++; } for (i = 0; i < 4; i++) { for (j = 0; j < 5; j++) System.out.print(...
Uno Bayan
2

votes
2

answer
713

views

how to show sub-menu when using the scroll bar on a sub menu?

My submenu doesn`t show up when I have scroll bar. I am using bootstrap this is my html code: Location Afghanistan  Select all This is my css code: .scrollable-menu { height: auto; max-height: 405px; overflow-x: hidden; }
uno
3

votes
2

answer
1.6k

views

trace an asp.net website in production

Is there a way that I can trace every method, basically a line trace, in an asp.net web site in production environment? I don't want to go about creating db logging for every line - i see an intermittent error and would like to see every line called and performed by the website per user.
uno
1

votes
2

answer
3.8k

views

Remove shadow from printed version

I have this code at http://www.canadaiplawyer.com/ in the hope that the printed version of the website would not have the shadow around the main (paper) div: @media print{ #content, #endpage, #startpage { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } } Is there a r...
Uno Mein Ame
2

votes
3

answer
450

views

PHP: How to include first digit zero on INSERT STATEMENT

I'am trying to INSERT number that has first digit of zero when i try to add prefix 000012345 it will only add 12345 when i try to add prefix 012345 it will only add 12345 my datatype is INT(11) $sql = 'INSERT INTO circle_call_prefixes (circle, prefix) VALUES (?,?)'; $stmt = $dbh->prepare($sql); $stm...
uno
2

votes
0

answer
67

views

Column count on webkit browsers

I'm using this css code to manage columns in my page (I'm on wordpress 4.2.2 + Visual Composer Plugin): -webkit-columns: 2 200px; -moz-columns: 2 200px; columns: 2 200px; -webkit-column-gap: 20px; -moz-column-gap: 20px; column-gap: 20px; It works fine on Firefox but the whole paragraph disappears on...
Uno Spettro
3

votes
2

answer
3.6k

views

iOS - Objective-C - How to stop NSThread, when it's waiting?

I have an nsthread, a while loop within this one. It's getting objects from a 'thread-safe' queue in the main method. When I leave the UIViewController, which contains this nsthread object, I call the nsthread cancel method, but it doesn't stop, because it's locked by the 'queueLock' NSCondition. Wh...
Gilberto Uno
2

votes
3

answer
6.3k

views

Transfer files in and out of HDFS from Windows

I need a way to transfer files in and out of HDFS from a node which is not a part of cluster. Is a UI, with a browse button present to do that? I am using a Windows machine from where I need to do a transfer to the HDFS.
Uno

View additional