Felix_

1

votes
2

answer
859

views

Is there anyway to mark images as spoiler?

The new discord update added the feature to mark images and text as spoilers for text: you just have to type || text ||. For images, there is a check mark at the bottom of the attachment prompt: Is there a way to mark images as spoiler or is the feature too new? This does not work: let image = new A...
Felix
1

votes
2

answer
60

views

How to convert a Duration like string to a real Duration in Flutter?

As the title says, I got a string '01:23.290', it looks like a Duration, but not. Now I need to use this to compare with a real Duration, and I don't how to deal with it. Is there any methods?
Felix Wang
0

votes
0

answer
18

views

How do I get the frequencies from a signal ? (simple explanation)

I am look for a way to receive the frequency from a Signal. Lets create an example together signal = [numpy.sin(numpy.pi * x / 2) for x in range(1000)] This Array will represent the sample of a recorded sound. (x = miliseconds) sin(pi*x/2) => 250 Hrz Now image we have no idea what the function loo...
Felix Hohnstein
1

votes
2

answer
238

views

orderBy attributes of another table in Laravel

On my website I allow users to upload images/like images/favorite images/etc. Therefore, I've got a table for images, likes, favorites, etc. I can get and display these images just fine, and sort them as I like $images = Images::orderBy('id', 'desc')->Paginate(50); I can also display how much like...
Felix Maxime
1

votes
1

answer
107

views

Persistent `toSqlKey` for custom primary key

I am defining the following models, where Category has a non-integer primary key code of type Text. Category code Text Primary code deriving Show Typeable CategoryTreeNode name Text code CategoryId Maybe lft Int MigrationOnly default=0 rgt Int MigrationOnly default=0 deriving Show Typeable For model...
Felix Schlitter
1

votes
1

answer
20

views

Access DataGrid.RowStyle in AttachedProperty

XAML: ... AttachedProperty: private static void CanExportToExcelChanged( DependencyObject d, DependencyPropertyChangedEventArgs e) { //Just my way of secure casting DependencyObject -> DataGrid if(d is DataGrid dataGrid) { Debug.Assert(dataGrid.RowStyle != null, 'Why is this null?'); } } Problem: A...
Felix D.
1

votes
0

answer
3

views

.htaccess Rewrite Rule does not work correctly with index.php?path

Hi I have the following old url www.domain.de/index.php?leistungen and the new one is www.domain.de/leistungen I tried the following RewriteRuile like I did it millions of times. RewriteRule ^index.php?leistungen /leistungen/ [L,R=301] But in this case I got the following result: www.domain.de/path...
Felix
1

votes
2

answer
107

views

How to keep switch setting in dialog?

It's my problem. This's my code: dialog = new Dialog(FragmentOne.super.getActivity(),R.style.selectorDialog); dialog.setContentView(R.layout.dialog_mod); Switch switch1 = (Switch) dialog.findViewById(R.id.switch1); switch1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Ov...
Felix Chen
1

votes
1

answer
172

views

Apache brooklyn create own volumes instead of using the existing one

I use Apache Brooklyn 0.8.0-incubating to create d2.xlarge instance on AWS with the following Blueprint: location: jclouds:aws-ec2: region: eu-central-1 ... provisioning.properties: imageId: eu-central-1/ami-7bcddf17 # Redhat 6.6 hardwareId: d2.xlarge # with 2TB EBS On the machine are only 10GB to...
Felix Otto
1

votes
2

answer
42

views

Forms - Show a hidden field by selecting an option in the select tag [closed]

Ok so, I have this select area in my form and also a hidden field called 'insert product number'. What I want to do is: if the user selects the 'product' option, the hidden field will show right below the selection field. How can I do that? Thanks! Jobs Products Other
Felipe Felix de Luca
1

votes
1

answer
50

views

Rails, javascript not working when going to next record

In my show page I have a link that takes the user to the next record, when the user clicks on the link, the next pages is loaded but my javascript won't work until I refresh the page Model ... def next_question self.class.where('id > ?', id).first end ... controller ... def show @question = Questi...
felix
1

votes
1

answer
40

views

concat ' in JS Code (Jquery)

Hi together I've got a problem with the ' and ' in my js code. $('.searchResultsMember table').append('' + '' + ' '+ [....] The Problem is in the onclick part .. can someone help me with this ?
Felix
1

votes
3

answer
1.2k

views

Getting database connection string in ASP.NET 5/EF 6

I have a solution with two projects: ASP.NET 5 Web project and Class library with EF6. In old ASP.NET 4 world I had DbContext class with the constructor: public MyModel() : base('name=MyModel') { } And then in the web application I had connection string in web.config. I also have a DefaultConnect...
Felix
1

votes
1

answer
191

views

Arangodb dynamic index on object keys

Arangodb 2.8b3 Have document with some property 'specification', can have 1-100 keys inside, like document { ... specification: { key1: 'value', ... key10: 'value' } } Task fast query by specification.key For Doc IN MyCollection FILTER Doc.specification['key1'] == 'value' RETURN Doc Tried create has...
Felix Berth
1

votes
1

answer
195

views

Pandas Multivariate Linear Regression by Group and Saving Results as csv

I am trying to calculate linear regression of Y=C-A column, x = ['Plate X', 'Plate Y', 'Field X'] and group those values by Drum and Plate. Additional question - how to save results as a file, csv preferable. Is pandas package is sufficient for this task or other package needed. Thank you There is...
Felix
1

votes
2

answer
214

views

Make variable update visible to other go-routines

Golang newbie. In my program, a back group go-routine check environment and update a variable periodically. This variable is used in http handler method servers client request. So basically it is kind of single value cache has one updater and many consumers. In language like Java, simply make this v...
Felix
1

votes
2

answer
68

views

Textalign in WPF

I have a short question about Alignments. I am using a TextBlock in XAML. When having a small window (Widht > 200) and a long Text I have to enable TextWrapping. No problem this far. The problem is that when I want to align the Text in Center the wrapped part is aligned Left again. Is there a way...
Felix D.
1

votes
1

answer
78

views

Python header unicode to dict

I have a MySQL database with a python request header saved in one of the columns and it looks something like this: { '_': '/Users/user/.virtualenvs/squadraft/bin/python', 'wsgi.multiprocess': False, 'RUN_MAIN': 'true', 'rvm_version': '1.26.11 (latest)', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8,fr;q=0...
felix cheruiyot
1

votes
1

answer
262

views

Accessing Format-Table output

I have something like this: $outp = Get-Process | % { [pscustomobject]@{ ID = $_.Id ProcessName = $_.ProcessName } } | Format-Table -AutoSize which results in $outp like this: ID ProcessName -- ----------- 6752 ApplicationFrameHost 8944 browser_broker How do I access an individual row (or column...
Felix Bodmer
1

votes
1

answer
73

views

Avoid requiring Dispatcher.BeginInvoke

I'm writing a library to control an application over TCP. The connections are handled asynchronously so I've added an event to the communication class to indicate a message has been received. public event EventHandler MessageRecieved; But when I raise the event the event handler in the main class...
Felix Castor
1

votes
1

answer
341

views

Need a buffer class for NumPy ndarray data

I need a good buffer for numpy ndarray data. I need to push there some arrays, the queue should somehow concatenate them into one, and then I want to get arbitrary length arrays out of it. Something like this: # push some numpy arrays into buffer buffer.push(in_array_1) buffer.push(in_array_2) buffe...
Felix
1

votes
1

answer
908

views

How to retrieve records grouped by distinct atribute values as hash(-like)?

I am using rails 4.2.x and simple_form and my aim is to create a select-box with optgroups, where the unique values of a models attribute are the groups. A simplified version of my model looks like this (kind is an integer column in database table): # app/models/technology.rb class Technology < Acti...
Felix
1

votes
1

answer
119

views

How can I write a C++ COM object with asynchronous event firing (like VB6's Timer object)?

I'm writing a C++ COM object for directory change notifications via ReadDirectoryChangesW. A thread in my object will wait for changes, then notify the VB6 client. I know how to trigger events from the main thread of my program, similar to callback functions, but I don't want to force the user to po...
Felix Dombek
1

votes
1

answer
119

views

Save several Pandas DataFrames into single Excel file

I have several Pandas data frames that i would like to save into single MS Excel file, each dataframe as separate sheet in this file. Any advice more than welcome. Felix
Felix
1

votes
1

answer
24

views

Databinding WPF C# WPF to labels in Codebehind

I have a list of Accounts with some properties which are saved in a database. On my Window I´m going to show the Username from the Account list for (int i = 0; i < liste.Count; i++) { Label l = new Label(); l.Height = 30; l.HorizontalAlignment = HorizontalAlignment.Left; l.Content = liste[i].Userna...
Felix ccad
1

votes
3

answer
66

views

rails collection_select should print my collection

I got an error while trying to use collection_select ;) I got this code in my view: in my controller I have this: @channels = Channel.all and I got this error: undefined method `merge' for :channelname:Symbol Whats my failure ? Thanks at all!
Felix
1

votes
4

answer
83

views

CamelCaser function in Java, problems with debugging

I am creating a CamelCase function in Java that takes a string this_is_a_sentence and returns ThisIsASentence My main problem comes with handeling the different characters in the string. So far I have: import java.util.Scanner; public class Main{ public static String camelCaser(String str){ char[...
Felix Rosén
1

votes
1

answer
141

views

HTML Newsletter Template

I want to create a HTML Newsletter, but in Outlook the sent mail does not fit the CSS I wrote: The following code has no affect in Outlook body { font-family: verdana !important; font-size: 12px !important; margin: 0; padding: 0; } .overheader { height: 5px; background-color: #e6007e; width: 100%; }...
Felix
1

votes
1

answer
107

views

Subscriptions via websockets in Orion

Is it possible to create a websockets subscription from a browser? We are using the branch feature/1181_websockets branch, git version 5ca6770aa401b52a31293fdcef4a9743fb1de2c4. We made a PoC trying to subscribe a browser via websockets. We tried connecting some JS code running in the browser to the...
1

votes
2

answer
33

views

Using Dynamic Sql

im trying return a matrix from my tables. My two tables look like this: **Employe_Course_Instance** PersonNumber Year Period CourseCode Hour 111 2015 3 a1 10 222 2016 4 a2 4 333 2018 2 a3 8 444 2015 1 a4 5 **...
Felix Mcconer
1

votes
1

answer
93

views

Autofixture: Issue when creating value types

Debugging with xUnit.net the test-methods Test1 and Test2 of the following code and putting a breakpoint and the end of CreateValueAndReferenceType() you see that the variable valueType is the same in both runs, whereas the variable referenceType is altered. The former is for me surprising and an is...
Felix Liebrecht
1

votes
1

answer
222

views

TextPreview for Textbox

Reworked Question to clarify my needs: I want to add a preview Text to Textboxes when they're empty, just like some of you may know it from Xamarin. I have found this answer on SO. This is the Style from the Answer I linked above. I get the following result: Since this is working nicely I want to a...
Felix D.
1

votes
1

answer
256

views

Is mandatory to have Youtube app installed to use Youtube api

I was reading several tutorials about how to use the Youtube Api. Just to find out after I implemented it. That it was not working when the original Youtube App was not installed on device. In the tutorials I read this was not mentioned. Just in original doc's it says: The API client library interac...
1

votes
1

answer
164

views

Will Thread blocked in socketRead0() throw SocketException when Socket.close() is called?

As is said in Java Concurrency In Practice: Unfortunately, the read and write methods in InputStream and OutputStream are not responsive to interruption,but closing the underlying socket makes any threads blocked in read or write throw a SocketException So, my question is, assume that one Thread is...
Felix
1

votes
1

answer
250

views

How to create a directory search and replace with vimscript and fzf

I'm trying to create a directory search and replace function in vimscript using fzf. The place where I block is when trying to use Alt-a fzf binding to select the whole list. I'm not even sure if that is possible given fzf is an external process but I may be wrong. Here's my current function. funct...
Felix D.
1

votes
3

answer
1.9k

views

border-collapse using HTML attribute

Is there an HTML attribute available equivalent to the CSS property border-collapse: collapse;? I am trying to achieve the same 1px border with HTML only, and not using css. table{ border-collapse: collapse; } Row 1 Row 1 Row 1 Row 2 Row 2 Row 2
Felix A J
1

votes
3

answer
470

views

TextBox sizing inside ScrollView with horizontal scroll

I have a problem with the TextBox control. Be aware of the ScrollViewer as this makes the difference. Here is my xaml: It results in this: It looks like expected and it expends/shrinks nicely if the window is resized. So far so good, but what happens if the text is a bit longer? This happens: The Te...
Felix
1

votes
1

answer
260

views

TYPO3 image crop disable this function

TYPO3 crops the media files which were added as text & media. How can I disable this? I want that it uses the original file. It always takes this: fileadmin/_processed_/c/a/csm_herren2_b3373d24a3.png
Felix
1

votes
2

answer
41

views

ProGuard can't remove the Log.i function calls

I use Log.i a lot in my android program and I want to remove them all in release build. What I have done are like these: Add proguard-rules.pro: buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } You can see minifyEna...
Felix
1

votes
1

answer
132

views

Haskell Gloss: random starfield not random?

Using Haskell’s Gloss library, I’m trying to simulate a starfield. The visual aspect (drawing ‘stars’ with various speeds and sizes to the screen) is working. However, for some reason the stars aren’t being randomly distributed, resulting in a simulation which has a pattern. I also have th...
Felix

View additional