Oli

1

votes
1

answer
1.1k

views

RecyclerView's height 'match_parent' not working as expected whereas fixed height (1000dp,2000dp) is working

I'm working to make a cool layout like this: For this I'm using Android Parallax library from Github. This library is creating all the views (as shown in picture) from xml itself. But I want to create my own recyclerview, create adpaters, model classes and show them with cardview. I tried using car...
1

votes
4

answer
276

views

How to have an integer in a filename (python)

I am making a code that will create textfiles equal to a number they entered, all named after them. So far i have this name = input('Enter your name') num = input('Enter a number') x = 0 for i in range(1,num): x = x+1 file = open(name(x) , 'w+') lines = ('hi' , name) file.writelines(lines) file....
Oli
1

votes
0

answer
468

views

Getting Facebook Code+AccessToken In Identity server 4

I have a Identity Server 4 setup using Facebook for authentication. This is very plug and play .AddFacebook('facebook', options => { options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme; options.ClientId = 'xxx'; options.AppSecret = 'xxx'; }); I can see that during the...
Oli
1

votes
1

answer
46

views

AndroidPlot remains overlapping legend

Currently, I'm overlapping my plot and it shows as link https://www.dropbox.com/s/yaktr3ew2h4s6i6/Screenshot%202018-03-08%2011.26.52.jpg?dl=0 I have read most of the threads with solutions, but my legends still remain the same position. Following are the ways I have tried: XYLegendWidget legendPlot...
Oli
1

votes
1

answer
178

views

List files restored from AWS Glacier to S3, time remaining?

When you restore files from AWS Glacier, they go to a temporary location in S3 and remain there for the period specified in the restore request. If that request was made by another tool, is there a way I can see the temporary storage location, and the time remaining in the temporary period? s3api li...
Oli
1

votes
0

answer
90

views

installing specific gdal version with conda fails

I try to install a specific gdal version (2.1.4). I use a workflow that I used often before and now it suddenly does not work anymore: I use the terminal to do: MINICONDANAME=Miniconda2-4.3.30-Linux-x86_64.sh wget -q http://repo.continuum.io/miniconda/$MINICONDANAME -O Miniconda2.sh bash Miniconda2....
Oli Blum
1

votes
0

answer
75

views

mitmdump not working with pymongo

i am new to python.And i was trying to use mitmdump to crawl an app and use mongodb to store datus. But...I found no answer on google, and i got no idea what to do... my Windows10 platform. I assume whether windows doesnt support it D:\Users\Administrator\Desktop\Python>mitmdump -s ScriptsTest.py L...
Oli
1

votes
1

answer
601

views

Use Swagger API validation with Serverless Framework

I want add an api validation to the serverless aws-nodes template and nothing I have tested until now has worked very well. My current approach is to overwrite the existing api-gateway, which is generated by the serverless framework, with a yml/json swagger definition that contains my models for th...
Oli Kuroh
1

votes
1

answer
22

views

Apache URL Rewrite query string

I would like to rewrite this URL : https://example.com/super/index.php?route=doo/math&user_token=AxDJFKDLS73jfd Into this URL : https://example.com/super/math&user_token=AxDJFKDLS73jfd Or even this one : https://example.com/super/user_token=AxDJFKDLS73jfd I have tried differents methods by modifying...
Oli
1

votes
2

answer
85

views

how to split a string in one column into new columns for each character in pandas

I have a pandas dataframe that looks like: flag 0 NNxxNxNNxNN 1 xxNNNNNNNNN 2 xxxNNxNNNNN 3 xxxxNxxxxxN 4 xxxxxxNxxxx 5 xxxxxxxNxNN And I would like to split the string into a new column for each character, for example like this: col1 col2 col3 col4 col5 col...
Oli
1

votes
1

answer
34

views

How to get module option from test command in environment config

When running tests using a command such as ember test --module='Acceptance | example', how could I capture the module option within the environment.js config file? The aim here is to pass a flag indicating the acceptance test module into the application instance when testing. The flag will simply be...
Oli
1

votes
1

answer
30

views

Gradle : one jar per classes directory

I generated mutiple classes folders and I try to generate a Jar for each of them. I stored those folders in a classesDirectories var. Here is the task I tried : task sourcesJar(type: Jar) { ext.counter= 0; classesDirectories.each { aDir -> counter++ baseName (counter.toString()) +'.jar' from '${aDi...
Oli
1

votes
0

answer
98

views

Working with PostgreSQL and Django on Google App Engine standard environment

I'm currently setting up a Django app on the Google App Engine platform, using a standard environment. Is it possible to connect to a PosgreSQL Google Cloud SQL instance? I can connect to a MySQL instance by following this tutorial (https://cloud.google.com/python/django/appengine). I can't get Pos...
oli-py
1

votes
0

answer
36

views

Responsive navigation box

I made a navigation bar with CSS animation and javascript. But I could not make it responsive. I want the navigation bar animation to be none when the window is resized less than 700px and the animation should appear if it is greater than 700px.That means the transform property of three-d-box :hove...
Niyoj oli
1

votes
0

answer
22

views

Force unsubscribe from a Kik bot

Is there any way my bot can unsubscribe people from itself? It apparently has 11 subscribers (from a maxiumum of 10) so nobody new can chat to it. I'd like to clear out those subscribers, and I see references to unsubscribe in the API (although that may refer to not-yet-subscribed?) but I see no way...
Oli Reading
1

votes
1

answer
43

views

fft output show unexpected symmetry

I am running a cfft on a signal. The output seems to show symmetry. I know that an fft is symmetrical, but the code arm_cfft_f32(&arm_cfft_sR_f32_len512, &FFTBuf[0], 0, 1); arm_cmplx_mag_f32(&FFTBuf[0], &FFTMagBuf[0], FFT_LEN); accounts for this as the FFTMagBuf is Half the length of the Input arra...
mr oli
1

votes
0

answer
10

views

Jupyter - Additional Cell Types

I'd like to used Jupyter Notebooks as an interactive textbook AND notebook for students. When dealing with school-age children, asking them to type a font tag in - or even putting one in and expecting them to type between the tags - is unrealistic. But it would be great to be able to have a cell for...
Oli
1

votes
0

answer
19

views

Redirecting zip files on Github pages

I have some pages running in an Apache server and I have the following redirect: RewriteRule ^file\.zip$ https://github.com/user/repo/releases/download/v0.1/file.zip [R=302] It works very well. The idea is haven't the zip files in my server, just do a redirect. And I can use a short url, like mydoma...
oli
1

votes
1

answer
24

views

Injecting dependencies into INSTALLED_APPs from reusable app

I've recently been spinning a collection of Django apps into a namespace so that we can reuse them for multiple deployments, with different settings, media files, etc. The core of this has worked well. We can make a new Django project, and include all the apps (from our namespace) that we want in se...
Oli
1

votes
1

answer
21

views

Save images from Subreddit to folder python

I have been reading through alot of documentation around Praw, bs4 and I've had a look at other peoples examples of how to do this but I just can't get anything working the way I would like. I thought it would be a pretty simple script but every example I find is either written in python2 or just d...
Oli Shingfield
1

votes
1

answer
509

views

Saving a Django form to a csv file

I have a Django form that is working fine. I'd like to save the data it submits to a CSV file. Is there a 'best practice' way to do this? I need to include blank fields in the CSV file where the user has not filled in a 'required=False' field
Oli
1

votes
1

answer
285

views

A m2m Django permission model

Users on a webapp I'm building have multiple objects that are 'theirs' Let's pretend the object is called Toy. I want them to be able to set privacy options for their Toys so they can set the following visibility options: Friends of friends Friends Only allow a defined set of people Friends only, b...
Oli
1

votes
1

answer
609

views

Cross domain DOM/JS pain

I have what I thought was a simple(ish) problem. I'm writing a SCORM package for an external learning resource. It's basically an iframe in a HTML page that the clients install in their LMS (Learning Management System). The external resource needs to be able to tell the LMS that the user has complet...
Oli
1

votes
2

answer
178

views

Is there an imaging library that can make you look thinner?

Very odd question, I know, but this is a problem a potential client handed me today. We assume we have a full length photo of a person. We want to generate a thinner image of that user. Obviously, one way would just be to compress the width of the image but that would result in various distortions t...
Oli
1

votes
3

answer
2.1k

views

Android - Creating an alert dialog in listview from selected item

Ive been struggling to get an alert dialog to pop up when the user clicks an item in the list view. I can do a toast message but cant seem to get an alert dialog to work. I then want to have a button in the alert dialog to allow me to take the item just selected and display it on the next screen whe...
Oli
1

votes
2

answer
7.6k

views

Pulling Facebook photos onto an external website

I'm doing a job for Company A. I've just built their website in Django but now they want to add a social photo management aspect to the site (in that other people can upload). The only way I know of doing this (having done it before) is through Flickr. You can set up a group and have it so anybody c...
Oli
1

votes
1

answer
317

views

Assign ObservableCollection<T>.NotifiyCollectionChanged Handler to another Observable collection

I have an ObservableCollection that is created in class A and its NotifyCollectionChanged event is wired to a event handler in static class B and passed to class C. In class C I use the Linq .Cast extension method to create a new ObservableCollection based on the original. Is there a way to assign O...
Oli
1

votes
2

answer
164

views

Multiply variables - One array

On my website, I have a form, with 3 checkboxes. Each checkboxes has a different value. Example: $upgrade = inputFilter($_POST['upgrade']); //Has the value of '1' $masterU = inputFilter($_POST['masteru']); //Has the value of '2' $extended = inputFilter($_POST['extended ']); //Has the value of '3' I...
1

votes
1

answer
122

views

Removing value from input - Jquery

I have this code: function updateTextArea() { var allVals = []; $('#c_b :checked').each(function() { allVals.push($(this).val()); jQuery('#referralIds').val(allVals); }); } $(function() { $('#c_b input').click(updateTextArea); updateTextArea(); }); Whenever a user check a checkbox, a value is adde...
1

votes
1

answer
610

views

Android: How to set onTouch event for activity?

I have an activity I want to finish when the activity is touched, how do I go about doing this?
OLi
1

votes
1

answer
34

views

Android: Build an array from data in another file

If I have an activity, and I want that activity to get data from a stub file within the project and put it into an array, how would I do this? At the moment I've used data which is hard coded into the activity using a setListAdapter making a new ArrayAdapter with the following building this array: s...
oli
1

votes
2

answer
1.9k

views

Video Texture: Augmented Reality Framework for Android

Which frameworks have this feature? Video I would like to implement something for Android. Are there already approaches? QCAR (Qualcomm AR SDK) has this feature not yet, unfortunately :(
Oli
1

votes
2

answer
757

views

Persisting Data Between MVVM View Changes

I have an application which contains a hierarchy of View/Viewmodels. ViewModelBase contains two ViewModels private AViewModel _aViewModel = new AViewModel(); private BViewModel _bViewModel = new AViewModel(); My XAML binds a DataControl to private ViewModelBase _currentView {get; set;} public ViewM...
Oli
1

votes
2

answer
2.3k

views

Can I export a Canvas to an image in java?

I think I'll need a buffered Image and to use a ImageOutputStream. Sorry I'm clueless, hence the lack of info here. I'm hoping for a solve-all magic method.
oli.burgess
1

votes
2

answer
3k

views

write my tree object to a file in java?

i want to write an object of my class to a file and use it later how should i do? for example i want to write t4 to file: BinaryTree t1 = new BinaryTree( 1 ); BinaryTree t3 = new BinaryTree( 3 ); BinaryTree t5 = new BinaryTree( 5 ); BinaryTree t7 = new BinaryTree( 7 ); BinaryTree t2 = new BinaryTre...
Oli
1

votes
2

answer
410

views

Validate WCF user based on URL

If I have a wcf rest service such as http://somedomain.com/service.svc/uniqueid/somemethod/parameter1 then is there a way to globally check if the uniqueid is valid for every request hitting the server. I could put in a check for every operation contract but I'm looking for a way where this is not n...
Oli
1

votes
1

answer
525

views

whats wrong with my method for searching a non-binary tree (n-ary tree)?

hi i have this code to search a n-ary tree but it dosent works correctly and i dont know whats wrong with that when searching n4 and n5 it return n3 whats wrong? public FamilyNode findNodeByName(FamilyNode nodeName ){ if(this.name.equals(nodeName.name)){ // We found a node named nodeName, return it...
Oli
1

votes
3

answer
119

views

how to design a database table with similar entries

I currently have a table that has the majority (like 99%) of the data of a field dependent on a single field but the other 1% is dependent on other fields. For example, I have the following price table product PK color PK cost The following are some entries in that table product|color|cost pen|red|$...
oli ten
1

votes
3

answer
560

views

Replacing non-trivial getters with dependency properties

I've recently started experimenting with DataBinding and implementing DependencyProperties for my custom classes. It all works fine and the possibilities are exciting, however, I came across a problem that may be only solvable by slightly modifying the overall class design. And I want to make sure t...
oli.G
1

votes
1

answer
703

views

BackgroundWorker doing UI updates from a loop

I'm creating ViewModel objects in a loop inside BackgroundWorker's DoWork I'm reporting progress in each iteration, passing the new object as an argument to be retrieved by ProgressChanged handler (which is friends with the UI thread) In that handler, the object is added to an ObservableCollection w...
oli.G

View additional