Alex-alex

31801 questions
1

votes
3

answer
496

views

Accessing properties of object using JXA

I'm trying to access the properties of an object in an app called Papers3 using JXA. I'm new to JXA and this is proving challenging, especially because of the lack of documentation. Here is a shot of the dictionary for the object I'm trying to look at I'm trying to get the IDs for the currently disp...
Alex
1

votes
2

answer
520

views

Getting memory usage Live/Dirty Bytes in iOS app programmatically (not Resident/Real Bytes)

According to what I've read so far, real/resident bytes indicates the number of bytes allocated to the app including bytes that the app is no longer using but hasn't been reclaimed by the OS. And live/dirty bytes is the bytes the the app is actually using and the OS can't reclaim. I think that the...
Alex Itelman
1

votes
1

answer
1.5k

views

Is there a way to let webpack dev server use another port?

I'm using the webpack dev server, via the react scripts and I'd like to use the debugging functionality it offers via Visual Studio Code, however, I have a non-standard setup. We have service in front of the webpack dev server that proxies all requests, bundles requests with other services, handles...
Alex
1

votes
2

answer
4.2k

views

ggplot2 : How to reduce the width AND the space between bars with geom_bar

I understand that one can change the width of a bar in geom_bar using the width argument. That does work, but then it creates a larger gap between the bars. Is there a way to manually push the bars closer to together? Should I be manipulating the axis somehow instead? Here is an example, changing wi...
Alex
1

votes
1

answer
49

views

Can one count the matches of multiple strings in one list?

I do not want to count the occurrence of one item but multiple items. The variable match contains a list of strings. I want to search the target list how many of the match items are in the target list. match = ['Manager', 'Access Responsible'] My dictionary contains the following entries: dict = {'W...
Alex_P
0

votes
1

answer
19

views

save hash in database in ruby on rails

I'm trying to save a hash in my database but this does not work this is my table in my database create_table 'categories', force: :cascade do |t| t.string 'name', limit: 255 t.integer 'client_id', limit: 4 t.integer 'event_id', limit: 4 t.text 'color', limit: 65535 end in my model try...
Alex Cortes
0

votes
0

answer
11

views

Add *.framework to Build phases > Copy Files in Xcode template

Is there any opportunity to add my *.framework to Build phases > Copy Files from Xcode template (UITest Target)?
Alex G
0

votes
0

answer
5

views

Understanding the given protocol of recommenderlab library in R

I am trying to understand the given protocol of recommenderlab library in R. From the original document https://cran.r-project.org/web/packages/recommenderlab/vignettes/recommenderlab.pdf : Testing is perfomed by withholding items (parameter given). Breese et al. (1998) introduced the four experimen...
Alex S
1

votes
2

answer
35

views

Copying Type String Array to Range in Excel - Invalid Qualifier

I want to transfer the contents from part of the a 'Type' array to an excel range (see example below), but get 'Invalid Qualifier' error. Any help would be appreciated? Public Type typDetails firstName As String lastName As String End Type Dim userDetails(100) As typDetails Public Sub test() userDet...
Alex
1

votes
2

answer
66

views

Use VBA to enable a text box when a check box is checked

I am new to VBA and I'm trying to create a form in Access where a text box is enabled or disabled based on whether a check box is checked or unchecked. So if the 'Survey Requested?' box is checked the 'Date Survey Requested' box is enabled for the user to enter a date. I have the following code: Pri...
Alex
1

votes
1

answer
37

views

How to use TcpDiscoveryKubernetesIpFinder in Apache Ignite .Net

I am trying to deploy an Apache Ignite cluster in Kubernetes. The documentation suggests using TcpDiscoveryKubernetesIpFinder to facilitate the Ignite node discovery in a Kubernetes environment. However, I could not find this class in Apache Ignite for .Net. Is it migrated to .Net at all? If not, ho...
Alex Avrutin
1

votes
1

answer
63

views

Take the items of a json file separately

Hey guys so I am trying to read a Json file and write a specific item of it in a list. But the json file is in single quotes so I get the error. simplejson.errors.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1) I tried to convert the json file from single...
Alex Rika
1

votes
1

answer
62

views

Why can't i declare a more than three digits array of array of char in C?

I am writing a program that takes an integer and then makes array of arrays of char and finds the number of every occurrence of every char in all lines. This two dimensional array has the size of 'lineNumber'. The code is shown below. The problem is when i get an input more than 3 digits, it stops w...
Alex Mercer
1

votes
2

answer
20

views

Pandas - replace column values based on a separate array index

I have: idx Node1 Node2 Immediacy 0 a C 5 1 a B 5 2 B D 3 3 B E 3 4 B F 3 and an array (verices): array(['a', 'B', 'C', 'E', 'G', 'H', 'J', 'D', 'F', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'I', 'K'], dtype=object) I want to add a new column/substitute all the letters in...
alex
1

votes
1

answer
40

views

Application hang up after java serversocket listens

I have a JavaFX application and invoke the following code with a Button click. new Thread(() -> { ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(4558); Socket accept = serverSocket.accept(); } catch (IOException e) { e.printStackTrace(); } }).run(); With the thread, I want t...
Älex
1

votes
3

answer
40

views

Bash on alpine linux

I cannot get a bash shell into an alpine container. I'm starting with this Alpine container: gitlab/gitlab-runner:alpine I'm adding a bash shell and other configs in this dockerfile: from gitlab/gitlab-runner:alpine ENV http_proxy= ENV https_proxy= RUN apk add vim wget curl nmap lsof bash bash-compl...
Alex Ethier
1

votes
2

answer
17

views

blockmanage() takes 1 positional argument but 36 were given when giving an array to a function

I am learning pygame and have run into trouble 'giving' (Sorry, I am unsure of the correct term) an array. It says it only accepts one positional argument-full error below-an it clearly doesn't like me giving it a large array. I have spent a few hours trying to get threading working for this and fix...
alex chamber
1

votes
2

answer
2.5k

views

Problem with MvcContrib

I want to use MvcContrib Grid helper, but i stuck on the problem - it's not working. I downloaded release for mvc 1, i have dll on my hard drive, i added a reference to my project, but i always getting following error: Error 1 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Grid'...
Alex
1

votes
1

answer
1.9k

views

How to determine which DataRow is bound to a DataGridViewRow

When I use a DataTable as a DataGridView's DataSource, I often have to find which row(s) a user has selected and read specific values from the DataTable (not the DataGridView) I wanted to know if there is any reliable way of determining which DataRow a DataGridViewRow is bound to especially when the...
Alex Essilfie
-1

votes
0

answer
31

views

JSON validation on Java

I want to make validations on the backend side, for a JSON structure received from the client. JSON example from frontend: { 'status': { 'type': 'string', 'value': 'test' }, 'validFrom': { 'type': 'number', 'value': '123123123' }, 'customerData': { 'type': 'map', 'value': { 'customerName': { 'type':...
Alex
0

votes
0

answer
18

views

Excel: Calculation trace

I need to analyse an Excel365 sheet to port its formulas. The task is quite time expensive and error prone: for each cell I ask for the dependencies (by means of [F2] or Trace Precedents) and recurse manually the calculation tree. In this example there are 4 cells with formulas and a fixed value. I...
Alex Poca
1

votes
0

answer
22

views

Using one observable to synchronize another observable

We want to synchronize an observable using another one used as clock, below is reported an example. Main: ---------abc---------------------------------- Clock: -x-----x-----x-----x-----x-----x-----x-----x-- Expected: -------------a-----b-----c-------------------- We tried to achieve this syn...
Alex
0

votes
0

answer
2

views

Force gdb to use provided thread lib

I have an embedded ARM application which is bundled with all the so-libraries stripped, including the libpthread.so. Sometimes the application gets stuck in some part of code and I want to be able to attach to it with gdb and see what's going on. The problem is that gdb refuses to load the needed th...
Alex Che
1

votes
1

answer
2.8k

views

Usage of the dot '.' symbol in twitter hashtags

In the official Twitter FAQ about hashtags, it is unclear how the dot '.' symbol can be used. A simple comparison: #.net VS #dotnet (I mean Microsoft .NET Framework here). It seems that the first hashtag gains more search results by the most of the hashtags analyzer sites. However, the official Twit...
Alex Skorkin
0

votes
1

answer
18

views

onclick in javascript with while loop from php

I'm desperately trying to add reply fields to a comment section for a couple of days now - basically I want a reply field(div) to appear as soon as you click a certain button. I thought using an onclick event handler was the way to go. We are already in an php echo, so I thought it would be easy to...
Alex
1

votes
1

answer
54

views

brackets elements meaning after a struct type A{a, b, c}

What does passing objects inside brackets after a struct type means when it doesn't refer to the struct attributes or the arguments of its own constructor. template // (1) struct Print : Ts... { using Ts::operator()...; }; template // (1) auto MakePrint(Ts... ts) { return Print{ts...}; } The ts......
Alex
0

votes
1

answer
18

views

How to add a font awesome icon into a haml form submit button

I'm currently trying to add a search font-awesome icon into my forms submit button, here's what I've done so far: = simple_form_for :search, url: search_products_path, method: :post, html: { class: 'mx-auto'} do |f| = f.input :code = f.submit 'Search', :class => 'btn btn-success' do %i.fa.fa-search...
Alex Yates
0

votes
0

answer
6

views

Error: Impossible to build a BDD FSM with infinite precision variables

I just installed nuXmv and wanted to try out the example growing-counter-integer from the examples folder. When I try to run the command: build_model, I get the error message: 'file growing-counter-integer.smv: line 30: Impossible to build Does somebody know how to fix this error? Thanks in advance...
Alex
12

votes
3

answer
683

views

C variable type assert

uint32_t fail_count = 0; ... if(is_failed) if(fail_count < UINT32_MAX - 1 ) ++fail_count; It works fine, but this code is fragile. Tomorrow, I may change the type of fail_count from uint32_t to int32_t and I forget to update UINT32_MAX. Is there any way to assert fail_count is a uint32_t at the func...
alex
0

votes
0

answer
11

views

Adding foreign key constraint data type error

I have a table A that has a field created_by it is a int(11) unsigned with NOT NULL and no default. I want to create a foreign key constraint in table A with the users table id field that is also a int(11) unsigned with NOT NULL and no default (auto incremented). The constraint type will be ON DELET...
Alex
1

votes
1

answer
42

views

How to use spark_read_jdbc in local mode

I am attempting to develop locally while reading from a MS SQL database with spark_read_jdbc. This requires a connection to the database. I have the following spark_connect. library(sparklyr) # spark_install() conf
Alex
1

votes
3

answer
815

views

Programmatically select UITableView cell not in current view

So it's easy to select a row that is currently in the UITableView. For example, to select the first row: [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionNone]; Say that I have an array that is the data source for t...
Alex
1

votes
3

answer
291

views

Code from codepen.io not working when downloaded: floorplan

I downloaded the code from codepen.io and it does not work locally. http://codepen.io/nanarth/pen/raarXe I suspect that references to some libraries are not exported, but can figure out which. Can anyone help me with this (I am new to this) Thank you UPDATE: Added the following code. Still not worki...
Alex
1

votes
2

answer
2.2k

views

Generate pixel matrices from characters in string [duplicate]

This question already has an answer here: How to convert from alphabets to pixels 2 answers I'm in the process of writing a library that will print scrolling text across an LED matrix hooked up to a Raspberry Pi. I would like a function that takes a character, height and width and produces a matrix...
Alex
0

votes
0

answer
5

views

How to use `inject-passwords`in yaml for jenkins?

I am using a yaml file to configure a jenkins job, and I came across the feature inject-passwords (see here). However, this documentation neither describes on how to use the variable within the jenkins environment, nor what 'encrypted' password means (How to encrypt?). The link leading to the EnvInj...
Alex
1

votes
3

answer
1.7k

views

React component import static json file

I am importing a json file like this: import React from 'react'; import Test1 from './test1.jsx'; import data from './data.json'; class TestWrapper extends React.Component { render () { return ( Projects ); } } export default TestWrapper; which I am then try to use it in: import React from 'react';...
Alex
1

votes
2

answer
574

views

Add trigger to AWS Lambda Function using Java API

How can I add new trigger for existing AWS Lambda function using Java API? I would like to add CloudWatch Events - Schedule trigger. It looks like I should use AmazonCloudWatchEventsClient. How can I set the credentials for the client? Any examples will be appreciated. Thanks.
Alex Broitman
1

votes
1

answer
225

views

How to plot a vector of hex code colours

I would like to visualise a vector of hex code colours. It would be nice if the solution uses tiny square boxes so that they look like a ggplot2 legend: These colour vectors are obtained either from the RColorBrewer package or are generated using the default ggplot2 hue: get_gg_color_hue RColorBrew...
Alex
1

votes
4

answer
53

views

Javascript math text field

I'm trying to fiddle with an some easy maths in javaascript, but I don't get it to work and I am a real beginner in js. Basically I am just trying to use 'result1' as a variable for a second simple math, but it seems like it's not working that the id 'result' is accepted. + * + function output...
Alex
1

votes
1

answer
110

views

Smooth transition when changing navigation bar “prefersLargeTitles”

I have a view controller that is pushed onto a navigation stack. The stack has navigationBar.prefersLargeTitles = true, whilst this new view controller has navigationBar.prefersLargeTitles = false. I achieve this using the following code in the view controller that is pushed onto the stack: override...
alex_lewis

View additional