Jeff Justus

1

votes
2

answer
55

views

Java/Processing how to do Matrix Multipication with the dot product

Hello i am using processing (wich is essentially just Java) and I wanted to have a realy simpel matrix class to help me with my Neural-Network . It works fine but the 'matrix-multipication' part dosent realy work . I know my code is wrong but i can't seem to find a fix . The start of the class looks...
Justus Laube
1

votes
0

answer
64

views

Remove comma with jquery and add zero after single number

I try to figure out the following situation. For displaying review stars correctly it is important to show the right percentage. So if there a multiple reviews, the output in html is for example: If all reviewed items are having the same number, the output is for example: The problem is decimal aft...
Justus
1

votes
1

answer
159

views

Android - php string encoding

i am doing a project in android. i am a begineer in android also. in my android application i am using php as my webservice provider. in my php code for the authentication i am check the user vaidity and return string 1 or 0. In android application i am get the string. but when i check it in a if co...
Jaison Justus
1

votes
1

answer
515

views

Rails namespace routes with 'as' parameter

I would like to use the :as parameter on a namespaced route, like so: routes.rb map.namespace :banana, :as => 'apple', do |banana| ... end But it seems that the :as parameter is only available to map.resources. Am I missing something, should I refactor my routes? I'm stuck on Rails 2.3.8 for this si...
Justus Romijn
1

votes
1

answer
1.1k

views

How to change gtk-entry icon size?

Is there any way to change the icon size of an gtk_entry / gtk_spin_button. Because of using a touchscreen, i need much bigger icons. I tried to change the gtkrc from my custom theme and added: gtk-icon-sizes = 'gtk-spin-button=48,48:gtk-entry=48,48' Sadly this has no effect on my spin-button. Can a...
Justus Schmidt
1

votes
3

answer
1.6k

views

Express js external javascript file not loading

I use an express app to serve an static pre-compiled jade file. which includes a external javascript file. but its not loaded while the page gets loaded. but i can access the javascript by the express static/public url. Why its not loading on the html? app.js var express = require('express'), path =...
Jaison Justus
0

votes
2

answer
19

views

Pandas Data Frame from Web is not Displaying Correctly Compared to the Native CSV File

I am trying to make a program that analyzes stocks, and right now I wrote a simple python script to plot moving averages. Extracting the CSV file from the native path works fine, but when I get it from the web, it doesn't work. Keeps displaying an error: 'list' object has no attribute 'Date' It work...
Justus Languell
1

votes
1

answer
154

views

Azure Cloud service continuous deployment service configuration

How does one select the service configuration or publish profile for an Azure cloud service continuous deployment build configuration? I have solution 'A' in a TFS git repo. I also have a cloud service 'B' in Azure with continues integration/delivery/deployment setup to deploy after a push to the ma...
Justus Burger
1

votes
1

answer
34

views

file name division and instantiation

set session_list [list ../../TIMING_ANALYSIS_CRPR/FUNC_ss28_0.85V_0.95V_0.85V_125C_RCmax/reports.15_03_10-22/SAVED_SESSION ../../TIMING_ANALYSIS_CRPR/FUNC_ff28_0.85V_0.95V_0.85V_m40C_Cmin/reports.15_03_10-22/SAVED_SESSION ] foreach j $session_list { lappend x [regsub {^../../TIMING_ANALYSIS_CRPR...
Justus
1

votes
1

answer
52

views

calling a template function on a auto type-inferred variable in a template class [duplicate]

This question already has an answer here: Where and why do I have to put the “template” and “typename” keywords? 6 answers This problem occurred in the context of the google test framework with typed test cases. Here inheritance and templates are mixed such that we have to refer to members...
justus
1

votes
2

answer
65

views

How can I collapse this into just one row

I have the following ruby code: @averages = Array.new weekly_averages.each do |average| yr = average.date.to_s[0..3].to_i wk = average.date.to_s[4..5].to_i prices = Array.new prices wk, :prices => prices } end This results into a table like this Week Ending Date Product Nairobi Mombasa Kisu...
Kyalo Justus
1

votes
1

answer
301

views

Could not get audio file extension from ACTION_OPEN_DOCUMENT intent in Android 5.0.2

In one of my android projects I'm facing the following issue on a Samsung Tablet with Android 5.0.2: From a Fragment, the user can start to choose a file: private static final int REQUEST_CHOOSE_FILE = 1; ... private void chooseFile() { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent...
justus
1

votes
3

answer
153

views

Variable range in Visual Basic for Excel

I want to define a variable range in an Excel macro with VBA. The first cell is always A25, but the last cell is moving depending on the number of data collected. This can be E35, or E58, etc. Any idea how to do this?
Eric Justus
1

votes
1

answer
17

views

JPA detach before edit

What is the difference between the following blocks of code in reference to JPA: private void sample1(){ Entity entity=em.find(1); em.detach(entity); entity.setProperty(property); em.persist; } and private void sample2(){ Entity entity=em.find(1); entity.setProperty(property); em.merge; }
Justus Ikara
1

votes
3

answer
1.2k

views

JPA Criteria Query GROUP and COUNT over subquery

Given the following SQL structure of MY_TABLE: GROUP_LABEL | FILE | TOPIC ----------------------------- group A | 1.pdf | topic A group A | 1.pdf | topic B group A | 2.pdf | topic A group B | 2.pdf | topic B My task is to get this stuff grouped by GROUP_LABEL, while forgetting about...
justus
1

votes
1

answer
27

views

VBA Matrix addition after previous multiplication

I want to add two matrices, after I recieved one of the two by a matrix multiplication. The Formular I want to calculate is: ((TS x TI) + TI) x PK = TK Dim TS_Matrix As Variant, TI_Matrix As Variant, Dummy_Matrix As Variant, PK_Matrix As Variant, TK_Matrix As Variant 'Read matrices TS_Matrix = Works...
Justus
1

votes
1

answer
1.3k

views

Assigning defined function to an object attribute in javascript

i have a object in javascript and some already defined functions. but how can i assign those functions to the object attributes. i tried different ways. but no hope.. the snippet is given below // object var func = { a : '', b : '' }; // methods var test1 = function(i) { console.log(i); } var test2...
Jaison Justus
1

votes
1

answer
96

views

Variables appear out of order when expanded in Here-String function

I just ran into what I think is a very strange issue, but it's very possible I'm just doing something wrong. When I run this code: Function OutOfOrder($animal,$verb,$adjective) { @' The quick brown $animal $verb over the $adjective dog '@ } OutOfOrder('fox','jumped','lazy') This is the output I rece...
Justus Thane
1

votes
1

answer
2.9k

views

Simple script to ping PCs, output table - what's wrong?

I was trying to write a simple script to ping a list of computers, and output the result in a table. I ended up doing this, which works fine: Get-ADComputer -searchbase 'OU=Materials,OU=MMC Computers,OU=REI,DC=REIDOMAIN,DC=LOCAL' -filter * | select -expand name | % { $output = New-Object PSObject $o...
Justus Thane
1

votes
1

answer
619

views

jquery click event get trigged twice on hidden file input

i have a list of input files, which is kept hidden from the user. there is a button and on clicking the button the file input get trigged. this button and list of hidden form controls are render on a modal window. on first time its working properly but after saving the data the modal get closed and...
Jaison Justus
1

votes
1

answer
141

views

Azure website - Select website project from solution to deploy

Is it possible to configure which web project in my solution should be used when setting up auto deploy from source control using VSO? I have a solution containing the following projects: Model Data Logic Admin Public Both the Admin and Public projects are web projects. But both web projects use al...
Justus Burger
1

votes
1

answer
351

views

Stanford Core NLP example code SemanticGraph exception

I have just tried out the Core NLP example code, included as StanfordCoreNlpDemo.java with the download. When trying to parse a chapter of a book, an exception is thrown from the Semantic Graph: Exception in thread 'main' java.lang.NullPointerException at edu.stanford.nlp.semgraph.SemanticGraph.remo...
Justus Schwan
-1

votes
1

answer
20

views

Sort on date inside foreach loop with php

I am trying to build a function that displays the reviews from an external json feed in a loop with php. Everything works fine, except the sorting. I would like to sort the items based on date. This is the actual code which i created: ''
Justus
1

votes
1

answer
264

views

rake db:seed failing on pending migration when there are none

I'm running a (previously working fine) seed file like so: I check to see if there are pending migrations with rake db:migrate:status and all migrations are 'up'. For additional context, here's what led me to this point: Working in 6 year old Rails Code Start a branch for feature 'A' Wrap feature 'A...
Justus Eapen
1

votes
1

answer
2.7k

views

ReactJS testing with Jest fails: Cannot read property 'buffer' of undefined

When i try to test the react component LoginForm.js i am getting an error in LoginForm. i am require a module called joi in LoginForm. TypeError: /home/jaisonjustus/project/captainmice/src/components/LoginForm/test/LoginForm.js: /home/jaisonjustus/project/captainmice/src/components/LoginForm/src/jsx...
Jaison Justus
1

votes
2

answer
113

views

Line by line check for large amount of keywords with python

I am iterating through many csv files with 1000 to 3000 lines checking each line whether one of 70000 key words is inherited in a text of 140 characters. My problem at the moment is, that my code runs extremely slow. I guess because of the many iterations. I am relatively new programer and not sure...
Justus Niemzok
1

votes
1

answer
3.6k

views

Trigger click event from one file from another in BackboneJS

in my project i am not able to trigger click event registered in one backbone view from another backbone view. its actually i am having a file type input placed hidden from the user and i need to trigger the file type input. var FileView = Backbone.View.extend({ .... events : { 'click .delete-image...
Jaison Justus
1

votes
3

answer
646

views

Syntax error in model and controller after setting up Paperclip Gem

I'm burning through the onemonthrails tutorial. And I've just installed the paperclip gem and set up the model with some validations. I thought I followed the tut exactly but when I go into the localhost:3000/pins I get this weird syntax error that points to both the model and the controller. I didn...
Justus Eapen
1

votes
2

answer
4.4k

views

Update and sort Qt ComboBoxes alphabetically

I want to write a program, working like a little navigation system uisng the Qt framework, but i still am very new to it. I created a dialog with two Comboboxes. Each combobox contains all 'citynames'. At the initialization the content of both boxes is sorted alphabetically. If a name in the first...
Justus Schock
1

votes
2

answer
630

views

ios tableView clearColor seperator

I have set my tableView's background color, and I want there is space(10px) around each cell show that color. e.g.(ignore the red line) What I am doing now is make the cell embed a smaller view, and set the cell's background to be clear. But it is annoying to create such embed view again and again....
3

votes
4

answer
1.7k

views

Process single Thymeleaf fragment with Spring Boot

In my Spring Boot application, I need to process a single Thymeleaf Fragment to get its rendered HTML output. I'm injecting @Autowired private SpringTemplateEngine templateEngine; and then try to Context context = new Context(); context.setVariable('key', value); String html = this.templateEngine.pr...
justus
2

votes
1

answer
80

views

How do I solve this circular dependencies?

Given these classes forming a flexible tree: class ElementBase(object): pass class Form(ElementBase): pass class TextInput(ElementBase): pass class DateTimeInput(ElementBase): pass class NumberInput(ElementBase): pass If an element is inside a Form it should be able to find said form. Since this is...
Justus Wingert
11

votes
1

answer
4.8k

views

how to write a directive in angularjs

i like to make a custom component using directive. i checked lot of tutorials and its get confusing me can anyone explain how a directive works. the component i am planing to make is the template for shout list will be like this {{shout.message}}
Jaison Justus
21

votes
4

answer
10.9k

views

RedBean ORM performance [closed]

I would like to know, can Redbean ORM be used for performance oriented scenarios like social networking web apps, and is it stable even if thousands of data is pulled by multiple users at same time? Also I'd like to know whether Redbean consumes more memory space? Can anyone offer a comparison study...
Jaison Justus
2

votes
3

answer
11.4k

views

Error creating bean with name 'dataSource' + Spring Boot + Hibernate

I have a few problems starting up the spring guide on how to access mysql data (see this link: https://spring.io/guides/gs/accessing-data-mysql/). I adjusted the classes slightly, so I have this code: pom.xml 4.0.0 org.springframework gs-mysql-data 0.1.0 org.springframework.boot spring-boot-starter-...
justus
3

votes
4

answer
5.8k

views

How to get array defined in a php file to a variable

I have a php file named config.php in which I defined the application settings in an array format like Inside the main app files I need to get the array to a variable, so that they can be used like this. I would like to know if there is there any alternative method to do like this instead of using i...
Jaison Justus
2

votes
3

answer
6.8k

views

CgridView pagination html issue

i am using the cgridview widget to display some data and using pagination too. but the problem i am have is i need to replace the pagination div. i need to place it on the footer of page like but when i check the html code the pagination div is automatically created by the widget, some div like is a...
Jaison Justus
2

votes
2

answer
914

views

How can I update a global python variable within the customJS function in bokeh?

how is it possible to update the python variable extern_python_variable when the slider is moved in the example below? The value of extern_python_variable should always be f (the actual position of the slider). Thanks! from bokeh.io import vform from bokeh.models import CustomJS, ColumnDataSource, S...
justus
2

votes
2

answer
1.3k

views

How to handle possibly HTML encoded values in javascript

I have a situation where I'm not sure if the input I get is HTML encoded or not. How do I handle this? I also have jQuery available. function someFunction(userInput){ $someJqueryElement.text(userInput); } // userInput '' returns '