Categories
Mastering Development

Fast way to remove array of specific row values from 2D numpy array

I have a 2D array like this: a = np.array([[25, 83, 18, 71], [75, 7, 0, 85], [25, 83, 18, 71], [25, 83, 18, 71], [75, 48, 8, 43], [ 7, 47, 96, 94], [ 7, 47, 96, 94], [56, 75, 50, 0], [19, 49, 92, 57], [52, 93, 58, 9]]) and I want to […]

Categories
User Help

Excel IFfunction only works when true otherwise returns #VALUE

Here is my formula. =IF(FIND("MB",E809),"MB","KB") I have also tried. =IF(FIND("MB",E809),1,1024) I’m just testing if the cell has KB or MB. The cell I’m currently testing has 424.89 KB as the data. If I change the data to have MB rather than KB, then the formula will return either MB or 1. The formula works fine […]

Categories
Mastering Development

How to display y-labels on top of histogram bars on gnuplot

I desgined a histogram in gnuplot however the y-scale needs to be in log2 due to huge difference in values. Therefore, to improve readability of the plot I pretend to display the concrete values on top of each bar. The values represent bytes and so I would like for this values also be in log2 […]

Categories
Linux Mastering Development Ubuntu

In the Files GUI of Ubuntu 18.04, is there a way to see the space of folders without installing adds-ons that might restart your computer?

I have Ubuntu 18.04 Bionic and the Files GUI will only show how many items are inside a folder, not the disk space it occupies in Kb, Mb, etc. I am wondering why it is so hard to get it to show? Was there a historical reason? I currently do not want to restart the […]

Categories
Mastering Development

Save video in Photo Library Swift

I’m trying to figure out how to save a video in my Photo Library. To get started I tried to simply pick a video by using the UIImagePickerController and after picking it saving it again in the library using the UISaveVideoAtPathToSavedPhotosAlbum. Doesn’t make much sense but I try to understand how saving videos work. The […]

Categories
CMS Development Drupal

Displaying Media Image dimensions in a View

I am using Media Image. Is there a way I can display the original image dimensions (width and height in pixels) in a View (for instance admin/content/media)? I found out I could add a relationship to Image (field_media_image:target_id) which gave me access to the file size (size on disk in KB, MB, etc), but I […]

Categories
Development

Is there an efficient way to do a vertical lookup kind of task in AWK using multiple files?

I am struggling a lot with the following task which I currently try to accomplish using AWK. I am not very familiar with AWK so I am not even sure if AWK is the best for this. If this is better to be solved with Python, please let me know (but I know even less […]

Categories
Development

c = x/(8,389*10**12), python syntax error: invalid syntax

I want to do a bit calculator, so you input a number and the calculator calculates it in Bytes, Kb, Mb, gb and Tb. def Bit(): x = int(input(“Bitte Anzahl in Bits eingeben”)) y = x/8 z = x/8192 a = x/ (8,389*10**6) b = x/((8,389*10**9) c = x/(8,389*10**12), print( x,”:”, y , “Bytes”, x,”:”,z, […]