tomg

1

votes
0

answer
54

views

tJdbcOutput component Delay for Table insert in Talend 6.4

I am using a one to one mapping for loading data into a MSsql server table. This mapping is simple and contains only two components. tFileinputDelimited for reading and tJdBCoutput for inserting into table. we are using a tJdbcoutput component to load data into table. We have created the mapping in...
TomG
1

votes
0

answer
293

views

Spark jobs are not running in the specified queue

I am running spark job written in Scala. val conf = new SparkConf().setAppName('BigDataSparkInitialPoc') conf.set('spark.yarn.queue', 'Hive') val sc = new SparkContext(conf) The above code is not submitting my code into the queue called 'Hive'. Instead the job is running in the default queue I check...
TomG
1

votes
2

answer
1.6k

views

SSRS Line Chart: Adding an Average/Target line to Line Chart

I'm sure I'm missing something obvious but it has so far eluded me. My current report: I have a dataset of employees' absences at my company. It is essentially broken down by department, date and time lost. I have charted this as below: The manager is shown their own departments dynamically using a...
TomG
1

votes
4

answer
23.2k

views

How to declare a dynamic integer array in ANSI - C using malloc and put input integers into it?

First I want the user to input what is the size of the desired array. So I am using: int size; scanf('&d',&size); Now I want to create an integer array using a pointer and the malloc function. This is what I did: int *p1 = (int*)malloc(sizeof(int)*size); According to my understanding, this is like u...
TomG
1

votes
2

answer
1k

views

Render dynamic content in a CMS page

I have to render dynamic content (search result of offers) in an Alchemy CMS page. First I made, in the cms-backend, a page called 'searchresult'. I made an element without essences. A table should be rendered. The seachform has as action /searchresult and the page is called with the (get)-search pa...
TomG
1

votes
2

answer
2.5k

views

mongoose aggregate using $exists in $cond

I want to $project if a field exists, but not it's value, using mongoose model aggregate query. If it was possible using $exists in $cond, it would have looked something like this: $project: { b: { $cond: { if : {$exists: ['$b', true]}, then : true, else : false } } } But, I have to use a boole...
TomG
5

votes
1

answer
1.1k

views

Finding conditional Gaussian Mixture Model using scikit-learn.mixture.GMM

I'm using scikit-learn to fit a multivariate Gaussian Mixture Model to some data (which works brilliantly). But I need to be able to get a new GMM conditional on some of the variables, and the scikit toolkit doesn't seem to be able to do that, which surprised me because it seems like a pretty basic...
TomG
0

votes
0

answer
5

views

Set application name using advanced properties in talend spark job

I am trying to change the application name for a spark job created by talend 6.4 version. But this approach is not working. I have seen posts where people change the application name using spark-submit. How do I do the same using talend tool.
TomG
3

votes
3

answer
4.7k

views

Rails gem Ransack -> search 'or condition' with 'is null' and a specific value (field=x OR field IS NULL)

I made a support ticket system for our supporters - programmed with ruby on rails (Ruby 1.9.3 Rails 3.2) There is a ticket model with a belongs_to association to users (supporter). I use Ernie's gem Ransack for searching. When the supporter searches his own tickets (handled by tickets_controller.ind...
TomG
32

votes
6

answer
92.7k

views

How do I export an Android Studio project?

I just started using the Android Studio IDE and I already released and published a simple APK to Google Play store. The problem is that I did this at work. Now I downloaded the Android Studio at my home and I want to continue working and fixing bugs on my Project. I see that there is Import Project...
TomG
1

votes
2

answer
4k

views

How to use the free function on int* pointers in C

This is my code: int size; int *p1; scanf('%d',&size); p1 =(int*)malloc(sizeof(int)*(size-1)); for (i=0;i
TomG
2

votes
2

answer
2.1k

views

Docker Nginx disable default exposed port 80

Is there a way to disable the default EXPOSE 80 443 instruction in the nginx docker file without creating my own image? I'm using Docker Nginx image and trying to expose only port 443 in the following way: docker run -itd --name=nginx-test --publish=443:443 nginx But I can see using docker ps -a tha...
TomG
2

votes
3

answer
889

views

MongoDB - Use $where inside $elemMatch

Let's say I have a collection with accounts that each account has array of users: { _id: 1, users: [ { firstName: a, lastName: b }, { firstName: c, lastName: c } ] } I want to query all accounts where at least one user has the same firstName and lastName I tried to do something like this: db.account...
TomG
3

votes
1

answer
1.5k

views

office 365 SharePoint app deployment

I have a paid for Office 365 Developer subscription and have been successfully creating and deploying 'Autohosted' SharePoint Apps for the last couple of weeks. However today when I fired up VS2012 and pressed 'Deploy' nothing happened! The deployment process runs but never ends. I am never prompt...
TomG
51

votes
9

answer
298.1k

views

Reading an integer from user input

What I am looking for is how to read an integer that was given by the user from the command line (console project). I primarily know C++ and have started down the C# path. I know that Console.ReadLine(); only takes a char/string. So in short I am looking for the integer version of this. Just to giv...
TomG
2

votes
2

answer
4.3k

views

PowerBuilder - Using two Timer Function calls in the same event

i'm trying to use two timer function calls in the same event one after another as thus: // set up attempt to login again Timer(ll_loginDelay(set to 10), this) // informs server that user is logged in (i.e. does a 'ping') Timer(ll_pingRefresh(set to 30), iw_ping) One attempts a retry for the login to...
TomG
2

votes
0

answer
146

views

nginx - add module for specific location using inheritance

I want to increase the client_max_body_size parameter for a specific location. I tried to do something like that in the location location / { proxy_pass http://dashboard-app; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host...
TomG
8

votes
1

answer
2.6k

views

Can Graphite (whisper) metrics be renamed?

I'm preparing to refactor some Graphite metric names, and would like to be able to preserve the historical data. Can the .wsp files be renamed (and possibly moved to new directories if the higher level components change)? Example: group.subgroup1.metric is stored as: /opt/graphite/storage/whisper...
TomG
2

votes
2

answer
116

views

Replace a character with control character Field Seperator(\034) in powershell

(Get-Content C:\Users\georgeji\Desktop\KAI\KAI_Block_2\Temp\KAI_ORDER_DATARECON3.NONPUBLISH) | Foreach-Object {$_ -replace '~', '\034'} | Set-Content C:\Users\georgeji\Desktop\KAI\KAI_Block_2\Temp\KAI_ORDER_DATARECON4.NONPUBLISH I am using the following command to replace ~ in text file with Field S...
TomG
1

votes
3

answer
68

views

Not able to understand a Scala code snippet with `mkString` on `Array[Any]`

I am a beginner exploring scala.The following is a Scala function. def printArray[K](array:Array[K]) = array.mkString('Array(' , ', ' , ')') val array2 = Array('a', 2, true) printArray(array2) The output is Array(a, 2, true) My doubts Here we have given the array type as K. What does K means?...
TomG
3

votes
2

answer
503

views

MongoDB - find if a field value is contained in a given string

Is it possible to query documents where a specific field is contained in a given string? for example if I have these documents: {a: 'test blabla'}, {a: 'test not'} I would like to find all documents that field a is fully included in the string 'test blabla test', so only the first document would be...
TomG
2

votes
1

answer
1.1k

views

How to print the maximum valued path in a 2D array in Java?

I guess you all know the 'strawberry' problem that some give you in job interviews, where you need to calculate the path between 2 corners of a 2D array that you can only move up or to the right and you have the calculate the maximum valued path. I have a perfectly working code that does it in Recur...
TomG
2

votes
0

answer
680

views

Subscribe to Windows Security Audit Events using ETW in C#

I'm trying to find out whether I can subscribe directly to the file-related audit events recorded in the Windows Security event log channel by using an .NET Event Tracing for Windows (ETW) TraceEventSession (I have a C# server monitoring application that already subscribes to other ETW providers)....
Tomg
3

votes
1

answer
1.6k

views

MongoDB - $project nested document to root level

Is it possible without writing all the sub-document's fields? Let's say I have the following document structure: { field1: a, subdoc: { field2: b, field3: c } } I want to use $project in order to get the suboc at root level: { field1: a, field2: b, field3: c } This is just an example w...
TomG
4

votes
4

answer
1.7k

views

Capturing Hotjar User ID in Google Tag Manager & Google Analytics

We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: function() { return hj.property.get('userId'); } 2 day...
TomG
3

votes
2

answer
869

views

MongoDB - distinct with query doesn't use indexes

Using Mongo 3.2. Let's say I have a collection with this schema: { _id: 1, type: a, source: x }, { _id: 2, type: a, source: y }, { _id: 3, type: b, source: x }, { _id: 4, type: b, source: y } Of course that my db is much larger and with many more types and sources. I have created 4 indexes combinati...
TomG
3

votes
2

answer
38

views

How do I re-order tabular data within rails so that the most recent data appears at the top?

Here is currently how the table is created. At present the most recent activity is appearing on page 3/4 of results. Proshare Admin Activity From To Date Time
TomG
5

votes
1

answer
720

views

Accessing OrientDB from Python

I want to convert a >1mn record MySQL database into a graph database, because it is heavily linked network-type data. The free version of Neo4J had some restrictions I thought I might bump up against, so I've installed OrientDB (Community 2.2.0) (on Ubuntu Server 16.04) and got it working. Now I nee...
TomG
2

votes
2

answer
21.9k

views

How to change Gradle\SDK settings when opening Android Studio project from a different PC

I Copied my Android Studio project from my work PC and copied it to my home PC. When I opened the project I got the following error: Failed to import Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. B...
TomG
3

votes
2

answer
228

views

Firefox will not validate form data

The following simple form with javascript with onclick button does not work in Firefox (I have version 7) but works fine in IE, Chrome, and Safari. What am I missing? function result() { alert(calc.input.value); }
TomG
2

votes
2

answer
255

views

Run Spark code written in Scala in spark cluster

I have IntelliJ IDE installed in my laptop. I am trying to do some Bigdata Spark POCs written in Scala. My requirement is that the spark-scala code written in IntelliJ IDE should run in spark cluster when I click Run. My spark cluster is residing in windows azure cloud. How can I achieve this?
TomG