Kenji

1

votes
0

answer
384

views

Matlab error: constructor must preserve the class

connected question: Returning an object of a second class through the constructor of first class but the answer doesn't seem to be of much help for me. I'm having trouble with Matlab constructors. I want to create a class A and a subclass B, such that I can provide the constructor of B with either t...
Kenji
1

votes
1

answer
40

views

Sikuli IDE can't import cucumber gem in JRuby?

I'm using SikuliX IDE 1.1.2 (with JRuby support enabled), and I'm trying to get cucumber working from within the Sikuli IDE. I have found this article which just covers what I need: http://www.jmest.org/wp-content/uploads/JMESTN42350420.pdf I have also found the related github and I am now trying to...
1

votes
1

answer
90

views

How can force library to check targetSdkVersion of main app in compile time

I have some library in github that want to be more user friendly. For being more user friendly i want to check compatibility with my lib and main-app in compile-time. This is how problem came: I have updated my lib for android Oreo and if user set targetSdkVersion to 27 it will be fine. Problem hen...
Kenji
1

votes
0

answer
66

views

Does “Firebase Unity SDK” correspond to “Notification Channels” which is a new feature of Android Oreo?

I think that the following is necessary to push notification to Android Oreo's terminal. · Register 'Notification Channel' · Create 'Notification' and register to 'Notification Channel' How can I do the above processing using 'Firebase Unity SDK'?
Kenji Mino
1

votes
0

answer
105

views

ABI filters of extended Build Variants do not overrides its parents

In a project i need specific ABI filters per release and debug and some extneded build variants. It is ok and works fine with debug and release. release { . . . ndk { abiFilters 'armeabi' } } debug { . . . ndk { abiFilters 'x86', 'x86_64', 'armeabi' } } When i extend new buildvariant that init each...
Kenji
1

votes
1

answer
106

views

Loop in value animator cause in crash with java.lang.StackOverflowError: stack size 8MB

I using two value animation and in end of one i start another. It is work fine on my tested devices but get java.lang.StackOverflowError: stack size 8MB on many devices in live. this is how i used value animator: ObjectAnimator fadeOut = ObjectAnimator.ofInt(drawableIcon, 'alpha', 255, 0); ObjectAni...
Kenji
1

votes
0

answer
53

views

How can I connect through HTTP in Kotlin/Native iOS development?

I tried to get a web page in Kotlin/Native with iOS platform, but it didn't work. Please tell me where is the problem. I created the project with Gradle and build.gradle contains: plugins { id 'kotlin-multiplatform' version '1.3.21' } Here are the codes. package sample fun main(args: Array) { printl...
Kenji Otsuka
1

votes
1

answer
1.2k

views

Rails: Ajax form validations with error_message_on

I've been trying to get get some ajax validations going in my form and have been running into a bit of trouble I have code like this in my form: { :id => 'user_form', :multipart => true } do |f| %> #other form fields (password and confirmation) Type the words below to prove you aren't a robot: user...
Kenji Crosland
1

votes
1

answer
379

views

Positioning Layers and text gradients with css

I'm a CSS newbie trying to get some text gradients going on. I tried this code here but it didn't work for me, most likely because the h1 object is nested within a #header div. I imagine there's something to do with layers that I don't know about. Either I get a gradent block that is in front of eve...
Kenji Crosland
1

votes
1

answer
105

views

Is it advisable to disable some helper methods in the test environment for rails?

I have an application helper which determines the css classes (selected or unselected) and link addresses for the navbar at the top of my application helper. When I test my controllers, I get a whole bunch of errors regarding the navbar (variables return nil). Since the navbar has nothing to do with...
Kenji Crosland
1

votes
1

answer
203

views

Rails: Why am I getting the wrong link on this pingback?

So I almost have a pingback sender ready for my rails app (people post links to content and donate to them). Almost. I've borrowed heavily from the code here: http://theadmin.org/articles/2007/12/04/mephisto-trackback-library/ I modified the slightly for my purposes: require 'net/http' require 'uri'...
Kenji Crosland
1

votes
1

answer
288

views

401 error when using authlogic oauth

So I'm trying to get the oauth authlogic plugin (https://github.com/jrallison/authlogic_oauth) to work on my rails app which already has regular authlogic installed. I believe I've set up everything in accordance with the tutorial but I'm getting this error: 401 Unauthorized RAILS_ROOT: c:/goldhat_p...
Kenji Crosland
1

votes
1

answer
915

views

(Android) Keep service running, even when app is stopped by force

I have created an app. Works great, but I want some same functionality as gmail uses: When I receive a new email, I get a notification. I inspected my phone and saw no services or applications running that look like the gmail-app. I have investigated the AlarmManager and services, but as soon as I s...
Kenji Elzerman
1

votes
1

answer
359

views

achartengine intent wont start

I'm working on an app that plots user data with a chartengine lib. I have a tab application and my chart plot works anywhere but not from activities that load to tabs. I wonder why and if anyone can help me? This works: public class DataActivity extends Activity { static final int SERIES_NR = 3; @Ov...
Kenji
1

votes
1

answer
39

views

Regex for a redirect, what am I getting wrong?

I'm trying to redirect a whole bunch of urls that end with some varation of this: http://www.example.com/events2?type=day;start=2009-07-31%2000:00:00 We have hundreds of URLs with variations in the parameters that we want to redirect to a single URL http://www.example.com/category/news-events/events...
Kenji Crosland
1

votes
1

answer
184

views

How was this Skrollr 3D rotation effect achieved?

I'm a fairly new and still learning developer and today I came across website that got my interest. http://www.lobagola.com/ I checked the source codes and reviewed what scripts the developer used and discovered Skrollr. What kind of images did he use? Are they just plain static images or some sort...
Michael Kenji
1

votes
3

answer
85

views

How can I delete my undefined indexes in the array and move the others to position 0?

I'm having an array I'm unsetting. In my example, I'm unsetting the first object in the array. Array ( [0] => 1 [1] => 2 [2] => 5 [3] => 6 [4] => 7 [5] => 8 ) unset(Array[0]); It gives me back: Array ( [1] => 2 [2] => 5 [3] => 6 [4] => 7 [5] => 8 ) Index 0 is gone. How can I make the array start fr...
Kenji Bailly
1

votes
1

answer
198

views

How to split a panel data record in R based on a threshold value for a variable?

I have data for hospitalisations that records date of admission and the number of days spent in the hospital: ID date ndays 1 2005-06-01 15 2 2005-06-15 60 3 2005-12-25 20 4 2005-01-01 400 4 2006-06-04 15 I would like to create a dataset of days spend at the h...
Kenji
1

votes
1

answer
7.5k

views

connect phone to Android-Studio in Ubuntu for debugging

I'm new on Ubuntu and install Ubuntu 14.04 LTS and for framework I download non-installable Android Studio and SDK tools separately. I tried this link for Installing USB device on Ubuntu. I succeed in installing USB as MTP. but it wont load in Android Studio. when I run my app 'waiting for adb' dial...
Kenji
1

votes
2

answer
342

views

Recycle Item Click issue and never go into function

I'm new on Android material design and wanna use Recycle View instead of List View but having problem on implement OnClickListener. I find out that RecyclerView.Adapter a bit different from ListView.Adapter. first I impelement OnClick listener in onBindViewHolder but it returns wrong item numbers an...
Kenji
1

votes
1

answer
572

views

Exporting functions with C type as a parameter [cannot use x (type *C.ctype) as type *package.C.ctype in argument to package.Func]

Library Code (Simplified Version): // package1.go package package1 import 'C' func Play(s *C.char) { } Client Code: // main.go package main import 'C' import ( 'path/to/package1' ) func PlayMore(s *C.char) { package1.Play(s) } func main() { } Build Error: # command-line-arguments main.go:12: cannot...
1

votes
1

answer
420

views

Cannot resolve symbol @ReadOnly and @Mutable in Kotlin 1.1.0 compilation

I got errors 'Cannot resolve symbol ReadOnly' and 'Cannot resolve symbole Mutable' in compiling with Kotlin 1.1.0. Is @ReadOnly and @Mutable not available with Kotlin 1.1.0? The following is a sample code. SampleList.java Kotlin 1.0.7 import org.jetbrains.annotations.Mutable; import org.jetbrains.an...
Kenji Tomita
1

votes
1

answer
337

views

Static generic field in Java

I going to implement initialization of fragment with passing my generic field (presenter) and then connect this presenter to created View. public class BaseViewFragment extends Fragment implements BaseView { static private P presenter; //the problme is here, I do not allowed this static private Bas...
Kenji
1

votes
1

answer
383

views

Cannot start Portainer which compose

I don't know why but I cannot start portainer. I downloaded https://github.com/portainer/portainer-compose I did a docker-compose up Everything seems fine: portainer-proxy docker ps CONTAINER ID IMAGE...
kenji_getpowered
1

votes
1

answer
134

views

How to stub a model with a validation from external service

Here we have a Customer model with multiple validations, and one of the validation access an external service to validate if the person exists. And here we test all validations: describe Customer do it 'is not valid without a name' do customer = build_stubbed(:customer, name: nil) customer.valid? as...
kenji
1

votes
2

answer
501

views

Task ‘bintrayUpload’ not found in root project after update Android studio to 3.0

Before I update gradle and android studio I used to upload my library to bintray with these tasks from this tutorial: first: gradlew install second: gradlew bintrayUpload But after updating android studio and gradle I had to change fist task to: gradlew installDebug but gradle can not find taskbintr...
Kenji
1

votes
1

answer
27

views

How to introduce noise into sequence data using TraMineR?

I want to randomly change states in a sequence dataset for the purposes of simulation. The goal is to see how different measures of cluster quality behave with different degrees of structure in the data. If I were to introduce missings, there is the handy seqgen.missing() function in TraMineRextras,...
Kenji
1

votes
2

answer
182

views

BottomSheetDialog get Behavour always returns null

I working with BottomSheetDialog and i have to get Behavior so can set setBottomSheetCallback() to handle some stuff. As google says i had to put Coordinator on parentView and add behavior to it. I defined CoordinatorLayout in MainActivity (root activity) like this:
Kenji
1

votes
1

answer
0

views

Is there a faster way to ReadSample from an IMFSample?

I'm setting up a VideoRenderer for my application which uses Direct3D9Ex interfaces but when i use big texture (desktop resolution) the video starts to slow down. I was using DirectShow but i found some problems with H264 and i decided to go for Media Foundation. I've searched a lot about it, but i...
Cainan Kenji Kita
1

votes
2

answer
713

views

Set background inner div on hover/click

I have two divs: Example And I have a jQuery function: $(function(){ $('.outer').mouseout(function () { $('.outer).attr('style', 'background-color: white'); }); $('.outer').mouseover(function () { $('.outer).attr('style', 'background-color: red'); }); $('.inner').mouseout(function () { $('.inner).at...
Kenji Elzerman
1

votes
1

answer
4.3k

views

Scala: How to treat an Any like an Array or Seq?

I'm looking for a way to treat an Any as an Array or Seq and iterate over it, if possible. Currently I have some code that looks like this, taking a sequence of Any's and flattening out any Traversable or Array objects contained. def flattenAsStrings(as: Seq[Any]): Seq[String] = { val (travValued, o...
Kenji Matsuoka
1

votes
1

answer
158

views

Select HTML elements by variable substring of a property

I have several groups of elements, each group of which is related to a particular number. I want to add a mouseover to each element that adds a class to all the elements in its group, and a mouseout that removes that class. jQuery's attributeStartsWith selector works great for this as long as I gi...
Kenji Yamada
1

votes
1

answer
226

views

tinymce create own plugin

I'm trying to create a plugin in TinyMCE. Sofar Google didn't help much: Alot of tutorials that don't work and give alot of errors. Does anyone have a good tutorial or could someone post some sample code with some info? I'm using version 3.5.4. Like I said: I tried searching on Google and also searc...
Kenji Elzerman
1

votes
2

answer
574

views

I want a elisp script executing a Python one-liner under the cursor

I am a biggner in Emacs. I start to use Emacs at the beginning of this month. I want to port small Vim scripts to Emacs. Those scripts will enable us to calculate like this in Emacs too. http://www.youtube.com/watch?v=yDR0dTPu6M4 I tried to port a Vim script written below. function! s:ExecPySf_1line...
Kenji Kobayashi
1

votes
4

answer
114

views

selector show element and context. Cannot get the element

Maybe this is a very stupid question, but not stupid enough for me since I can't seem to figure this out (even with Google). I have this jquery: $.each(items, function (key, t) { $('#list').append( $('') .append($('') .attr('src', 'path/to/' + t.Thumbnail) .addClass('thumb')) .append($('') .html(''...
Kenji Elzerman
1

votes
1

answer
390

views

How to format date field in Django admin while allowing Null values

I didn't like how Django Admin displays DateTimeField values which is like 'Sept. 4, 2012, 6 a.m.'. I changed this to YYYY-MM-DD by adding this function in a class in admin.py: def d_ordered(self, obj): return obj.date_ordered.strftime('%Y-%m-%d') d_ordered.short_description = 'Date Ordered' d_orde...
Kenji Miwa
1

votes
1

answer
1.9k

views

BootstrapContext in claimsprincipal null

We are using WIF in out MVC 4 web application. We also have set up an authentication with an STS. So far, so good. Now the problem: When we login and return to the website we can see our username. We are also able to logout. Because of securityreasons we make use of the bootstrap token to secure cal...
Kenji Elzerman
1

votes
2

answer
78

views

I can't figure out the closure for this

How can I assign the buffer created in decodeAudioData to soundBuffer for playback later? Note the call to playSound() within the decodeAudioData function call plays the buffer successfully, but calls from the Play button return 'value not of type ArrayBuffer' and when tested, soundBuffer is still u...
Kenji
1

votes
1

answer
754

views

How to access and manipulate strings in Stata variable labels?

I have a Stata dataset with variable labels describing the year of measurement. I need to access the year of measurement from the variables to later rename each variable using a suffix showing the year. For example V95 has a label GNP/CAPITA,75, and I want to rename it to gnp_capita_75. Some variabl...
Kenji
1

votes
1

answer
79

views

how to collect class variables while preserving the order

I'm trying to create schema classes similar to SQLAlchemy declarative_base. The schema classes should be extensible using inheritance. Here is my attempt so far. It works fine except the properties (class variables) are sorted in the alphabetical order. import inspect class BaseProp(object): def _...
Kenji Noguchi

View additional