Categories
Mastering Development

Delete last 3 characters if they are equal to something

(without affecting the char level formatting in the cell) I’ve already posted a similar question, but I unfortunately I realized I couldn’t use any of the solutions because all of them removed all the formatting in the cells I have a code that replaces various text strings. It looks like this (+ some more […]

Categories
Mastering Development

Why can’t I set some class properties directly?

This is probably some misconception on my side but I can’t see why this doesn’t work. I have created a UITableViewCell subclass, like this: class MenuCell: UITableViewCell { var mcImage: String var mcLabel: String init(mcImage: String, mcLabel: String) { self.mcImage = mcImage self.mcLabel = mcLabel super.init(style: .default, reuseIdentifier: “reuseIdentifier”) setupView() } required init?(coder aDecoder: NSCoder) […]

Categories
Mastering Development

OpenGl compilation errors [duplicate]

I have this OpenGl code: #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <GL/glew.h> #include <GL/glut.h> // Usage of degrees is deprecated. Use radians for glm functions. #define GLM_FORCE_RADIANS #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include “shaders.h” int mouseoldx, mouseoldy ; // For mouse motion GLfloat eyeloc = 2.0 ; // Where to look from; initially 0 -2, […]

Categories
Mastering Development

Postgresql query returns string values between quotation marks ” if it contains any space character or without quotation if it had no space char

so I got this strange issue and I have no idea what’s causing it. We are using Charts.js in PHP to plot some charts. We store the arguments needed to create a chart into a PSQL table to load when needed. My issue lies with the title, group and label parameters which are all string […]

Categories
User Help

“prefix creation aborted” pops up every time I try to make a steam file on wine

###BOTTLING### default.sh /var/folders/vq/7l182rv973s64wn27278m48c0000gq/T/AppTranslocation/B1E44461-D4F2-4F54-B9E9-636F53F495DC/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 39: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable ###BOTTLING### Gathering debug Info… Versions OS………………………: darwin19 Wine…………………….: WineBottler………………: 1.8.6 Wineticks………………..: 20191224-next – sha256sum: 895b74ea65452b02d32fe9190a63a8cac492760834c1951607005ba32045d59e Environment PWD……………………..: ‘/Applications/Wine.app/Contents/Resources/bin’ PATH…………………….: /Applications/Wine.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin USER…………………….: lukenorth HOME…………………….: /Users/lukenorth COMPUTERNAME……………..: chrisâ€s iMac BUNDLERESOURCEPATH………..: /var/folders/vq/7l182rv973s64wn27278m48c0000gq/T/AppTranslocation/B1E44461-D4F2-4F54-B9E9-636F53F495DC/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources WINEPREFIX……………….: /Applications/Wine.app/Contents/Resources WINEPATH…………………: /Applications/Wine.app/Contents/Resources/bin LD_LIBRARY_PATH…………..: /Applications/Wine.app/Contents/Resources/lib:/opt/X11/lib:/usr/X11/lib DYLD_FALLBACK_LIBRARY_PATH…: /Applications/Wine.app/Contents/Resources/lib:/usr/lib:/opt/X11/lib:/usr/X11/lib SILENT…………………..: http_proxy……………….: https_proxy………………: ftp_proxy………………..: socks5_proxy……………..: Bottle TEMPLATE…………………: […]

Categories
Mastering Development

Chartjs and dynamic data arrays

I’m trying to add between 1 and 5 data series to chart but having trouble beyond the one data series So I have my function to create the bare bones chart var mychart function dochart(id,colors,title,bartype=”bar”){ mychart = new Chart(document.getElementById(id), { type: bartype, data: { labels: [], datasets: [] }, options: { legend: { display: false […]

Categories
User Help

WineBottler 1.8.6 macOS “Prefix Creation Aborted” [closed]

Log: ###BOTTLING### default.sh /var/folders/w6/r7p9qw7j5y77mq77xd6wvgh40000gn/T/AppTranslocation/DFB4BBAA-8696-49AB-A6C5-08D9C8C13427/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 39: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable ###BOTTLING### Gathering debug Info… Versions OS………………………: darwin19 Wine…………………….: WineBottler………………: 1.8.6 Wineticks………………..: 20191224-next – sha256sum: 95ce9ea8acf1de2f2b47d4a36e604b5d6ff0338381932fd02cf1b2457dfa92da Environment PWD……………………..: ‘/Applications/Wine.app/Contents/Resources/bin’ PATH…………………….: /Applications/Wine.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin USER…………………….: mac HOME…………………….: /Users/mac COMPUTERNAME……………..: Macâs MacBook Air BUNDLERESOURCEPATH………..: /var/folders/w6/r7p9qw7j5y77mq77xd6wvgh40000gn/T/AppTranslocation/DFB4BBAA-8696-49AB-A6C5-08D9C8C13427/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources WINEPREFIX……………….: /Applications/Wine.app/Contents/Resources WINEPATH…………………: /Applications/Wine.app/Contents/Resources/bin LD_LIBRARY_PATH…………..: /Applications/Wine.app/Contents/Resources/lib:/opt/X11/lib:/usr/X11/lib DYLD_FALLBACK_LIBRARY_PATH…: /Applications/Wine.app/Contents/Resources/lib:/usr/lib:/opt/X11/lib:/usr/X11/lib SILENT…………………..: http_proxy……………….: https_proxy………………: ftp_proxy………………..: socks5_proxy……………..: […]

Categories
Mastering Development

PHP and MySQL filter multiple tables not working on ajax request

Challenges: I had a table which store products, it sizes, colors, and brands in a delimited format. I discovered while I tried to filter colors, brands etc, it was not returning products with delimited comma. I used IN(), LOCATE() and find_in_set() but none worked. So, I thought the best thing to do was to normalize […]

Categories
Mastering Development

How to extract a value from a function in javascript

Hello i am trying to fix a bug in my aplication, it is about “conway game of life”. i am trying to extract an array of values stored in a variable from a (js file) to another (js file) as seen in the code under, there are 3 colors each with a value an at […]

Categories
Development

How can I transpose and sum a group of columns efficiently in SQL?

Let’s say I have some data that looks like this: +——–+———–+————-+———-+————+ | person | red_apple | green_apple | red_pear | green_pear | +——–+———–+————-+———-+————+ | bill | 4 | 1 | 1 | 4 | | bill | 0 | 1 | 2 | 0 | | jill | 2 | 1 | 1 | 4 […]