max max

1

votes
1

answer
2.3k

views

can't clone repo from remote - ssh keys identification error

I'm on Windows and I'm using Git Bash. I want to clone remote bare repository. Supposedly I've set up ssh keys correctly, because I can access server through ssh protocol. I've tested it by trying to get a list of directories on server: $ ssh [email protected] ls It asks for passphrase: Enter pass...
1

votes
2

answer
164

views

Why does str.join inside a parse action produce an exception?

I'm getting very strange behavior with PyParsing when I try to use " ".join(...) inside a nested function that is used as a parse action. For example, this: from pyparsing import * def sigh(p): def nested_func(t): " ".join(t) parser = Group(OneOrMore(Word(alphas))).setParseAction(nested_func) return...
Max K
1

votes
1

answer
1.5k

views

Assembler Language: Error A2075 Jump destination too far: by 30 bytes

What is the best way to check and debug if jumping too far? So I have a var inBuffer which contains a BYTE lenght of 115. I move that into bufSize and try xor'ing it against a set of 3 keys to decrypt the message. My code compiles but I am unable to to build except this part where it says I am jump...
Max
1

votes
1

answer
451

views

Global teardown function in Jasmine.js

I´m testing a Rails 4 / ember.js application with Jasmine. How do I reset Ember after each spec without writing the teardown into every spec file? # Spec/javascript/support/spec_helper.js.coffee App.ApplicationAdapter = DS.FixtureAdapter App.setupForTesting() App.injectTestHelpers() # Reset Ember a...
max
3

votes
0

answer
26

views

DLL conflict in Hololens with IL2CPP backend

I have been developing on the Hololens. The project is on .NET 4.x with IL2CPP with API compatibility 4.x. I'm using Unity 2018.3.6f. I need to add external DLL (IdentityClient.dll) Reference: IdentityModel NuGet Package This dll has dependencies on both Newtonsoft.Json and System.Text.Encodings.Web...
Max_Thom
1

votes
1

answer
2k

views

Embedding Images which are Stored in Azure BLOB Storage in Website

I'm trying to link to or embed images which are stored in an azure BLOB storage container. I don't have any server side programming available, i.e. no C# or PHP, only HTML + JavaScript. Is this possible, and what technologies would you recommend? I should also mention that my website does not run on...
Max
1

votes
2

answer
2.4k

views

Java sort a Hashmap on Value

Learning Java as I go (Python background). Simple word count program in Java 7 code (can not use J8!). I have a hash map of word:count pairs. Now I need to sort on count (decreasing order), and break ties with using word in alphabetical order. Have read s/o and I tried a treemap but it does not se...
Max Wen
2

votes
2

answer
29

views

A way to display the component once by using localstorage in React

I have a component that I want to display once the user loads the website. Then if they click to close it it shouldn't display. What's the best way to do this by using ComponentDidMount()? I assume the click out state should be in componentDidMount? class App extends Component { constructor(props){...
Max T
-2

votes
4

answer
27

views

PHP - How to get “all two digits number” that their addition give a specific number

I create a little mind game that need to guess for a number from 1 to 18 the two numbers combination that give this number for example: 1: 10 (1+0 = 1) 2: 11 (1+1 = 2) 3: 12 (1+2 = 3), 21 (2+1 = 3) 4: 22 (2+2 = 4), 31 (3+1= 4), 13 (1+3 = 4) . . . . . . How to get for each number this numbers list en...
max max
1

votes
1

answer
173

views

How can a JSON key be renamed using Play 2.5 JSON transformations?

I Just want to rename "x3" to "k3" using Play's 2.5 JSON coast-to-coast features, but how? Here's the JSON source: {"k1":"K1", "k2":"K2","x3":"K3"} and here's the desired result {"k1":"K1", "k2":"K2","k3":"K3"} Here's the Scala not working code snippet: ( (__ \ 'x3 ).json.update( (__ \ 'k3).json.pi...
Max
1

votes
2

answer
18

views

setting LIMIT on subquery when amount of returned rows doesnt matter

im using a framework ORM to run my queries ... here is a example of ORM query output ... it is a relational query select * from `clients` where exists (select * from `transactions` where `clients`.`id` = `transactions`.`client_id` ) order by `id` desc limit 20 offset 02 i was wondering if puttin...
max
0

votes
0

answer
3

views

Get Jupyterhub username in spawned container

I am using a Jupyterhub deployment with DockerSpawner. When I enter a spawned container, I have the following URL pattern: https:///user//lab? I would like to get the value of within the spawned notebook container. Is there any possibility to either access it or forward it from Jupyterhub into the...
Max
6

votes
3

answer
120

views

running/controlling an emulator on remote server

i know this not suitable question for SO but i have nowhere else to ask hopefully i'll get a answer before mods close this question ! so I use couple of android apps on daily bases , and it's very time consuming. I want to somehow automatize the process. The idea is to install some sort of emulato...
max
0

votes
0

answer
4

views

Why do Appium method driver.manage().window().getSize() return a size that's different than screen pixels?

Real screen resolution for iPhone X and XS is 1125x2436. But when I perform driver.manage().window().getSize() I get as response 375x812. Which is exactly 1/3 of the real screen size. And here it gets more complicated. Tapping on X,Y coordinates through a TouchAction works different for my tests on...
Max
0

votes
2

answer
26

views

If loops only checking first digit in variable

When I attempt to use an if statement to check if one variable is larger than another variable the if statement only checks the first digit. For example 3>10 but 30>1. How do I fix this so that the entire variable is checked? I have tried manually setting variables and restarting my Pycharm Alpha =...
Max B.
1

votes
4

answer
1.6k

views

How to use templates instead of macros to create a class with a dynamic number of functions

Currently i am creating a base class with set and get functions with a macro. But I would like to add more complex macros but macros are really bad for debugging so I would like to do it with templates but I have no idea does someone know a book or link for me. My real problem is far more complex I...
Max
0

votes
0

answer
16

views

While updating a .txt files contents, it creates a duplicate file with a '?"

I'm trying to make a file that keeps a players money in it, but while trying to update the line with money on it. It'll create a new file with the same name but with a '?' on the end. Name = input("Username: ") f = open((Name) + ".txt", "w") global Money Money = int(100) lines = [(Name) + "\n", st...
Max Nye
0

votes
0

answer
5

views

AudioKit/DSP: Understanding the different between the size of uncompressed audio on disk vs. in memory

This is a more generic RTFM DSP question coming from someone very comfortable with audio production and software , but new to audio software development, regarding the difference in size between uncompressed (wav, caf, aiff) files (44.1 sample rate, 16 bit) on disk, vs. the actual float values of th...
Max
0

votes
2

answer
30

views

Includes() function alternative React

I created a function that checks if the link matches the path. Everything works when I'm running the local server, but on the build process it fails with the error "Cannot read property 'includes' of undefined'. While i'm digging into the error, what's the best way to reformat this function without...
Max T
1

votes
2

answer
620

views

Enum conforming to protocol with stored property

I'm following the Swift Tour and they have this example of a protocol protocol ExampleProtocol { var simpleDescription: String { get } mutating func adjust() } Then the exercise is Write an enumeration that conforms to this protocol. If I let Xcode stub out the enum, it does this enum SimpleEnum: Ex...
Max
1

votes
1

answer
336

views

Xcode 9.3 crashes on deleting entity

I got this crash when trying to reset the parent of the entity or delete one. This is the crash report Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC...
Max Kraev
0

votes
0

answer
3

views

Python 2.7 - redirect instantly output to log file

Python test.py script is collecting data non-stop. To exit script - ctrl/c is expected. File test.log is empty while script is running. Output to test.log is created only after script is finished. It is running on windows 2008 server. How to save ouput "on the fly", so I can check test.log and see t...
Tax Max
1

votes
2

answer
2.2k

views

extracting and printing an html element by it's id using DOMDocument

i want to extract couple of tables from a web page and show them in my page i was going to use regex to extract them but then i saw the DOMDocument class and it seems cleaner i've looked in stackoverflow and it seems all the questions are about getting inner text or using a loop to get inner nodes...
max
4

votes
2

answer
27

views

SQL query Find all product which has increased value at certain 2 dates

I am wondering if I can do this using SQL query. I have a table called "data" which contains the product name, date and sale number. my table look like this: Product date Sale apple 1/1/2019 5 apple 2/1/2019 4 apple 3/1/2019 3 apple 4/1/201...
Max Cheung
0

votes
1

answer
19

views

How to update multiple records and use if in controller

I want to update records but if a field is zero convert it to one and vice versa, the field is is_published $Product=Product::whereIn('category_id', [$id])->update(['is_published'=>0]);
Ash Max
1

votes
1

answer
1.1k

views

cx_Freeze doesn't print to console

I have an application that prints a few things to the console upon running. But as a standalone the executable doesn't print anything to the console? The setup.py script looks like this: import sys from cx_Freeze import setup, Executable setup( name = "My App", version = "1.0", options = { "build_ex...
Max
1

votes
1

answer
760

views

Can one set title in google script

function doGet() { return HtmlService.createHtmlOutput('Hello, world!'); } I tried to use in the html form, used that in place of "Hello, world!" but it remains the same, the app looks funny with google script url on title. Please help me to add title to the app.
Max
1

votes
1

answer
458

views

How to make a join with two tables with django-tables2

Can anyone provide a clear example of how to show a table using django-tables2 that selects and presents data from two(or more) related models? I've found lots of posts about that, most of them quite old, and none really a working example. These are my models: class Person(models.Model): name = mode...
Max Iskram
-1

votes
1

answer
26

views

Error 500 (Internal Server Error) while trying to implement ajax

I have tried many time to find where is the error but no luck even I had this code before and was working fine but in my new project still get 500 error(jquery-1.8.3.min.js:2 ). What Im doing is just sending parameter from blade to controller using ajax and display again in another page called resul...
Ash Max
1

votes
1

answer
225

views

Validating function signature - interface vs type alias

I have the following function: function (n: number) { return {s: n}; } I need to create a validator for the signature. From what I've read I have two options: Interface interface ValidatorFnInterface { (n: number): { [key: string]: any; }; } Type alias type ValidatorFnType = (n: number) => { [key: s...
1

votes
1

answer
965

views

How to reexport `*` from a module that uses `export =`

I have a module m: export = { a: 3 } And then in my index.ts I want to re-export everything that m is exporting, so I use: export * from './m'; But it gives me an error: Error: TS2498:Module D:/Projects/typescript/m uses export = and cannot be used with export *. How to re-export from a module that...
1

votes
1

answer
486

views

webpack-dev-server dynamic port

Is it possible to find a unused port for webpack-dev-server? My current configuration does look like: devServer: { historyApiFallback: true, inline: true, host: '0.0.0.0', port: 3000, contentBase: helpers.root('public'), stats: 'minimal' }
Max Heyer
1

votes
1

answer
770

views

PDFBox caching in AWS Lambda

I am using Apache pdfbox for pdf file processing. Running it locally works fine, where I get the error is on executing the code on AWS Lambda. This makes sense as pdfbox tries to update the font cache, which is not possible on Lambda. I get the following error massage: Feb 20, 2017 3:22:19 PM org.ap...
Max
1

votes
1

answer
127

views

What does microtask runs after every callback mean?

I'm reading this article on microtasks and there is the following conclusion: In summary: Tasks execute in order, and the browser may render between them Microtasks execute in order, and are executed: after every callback, as long as no other JavaScript is mid-execution at the end of each task As I...
1

votes
1

answer
152

views

mdToast cannot resolve a promise with itself error

I keep running into an error in the console when my $mdToast fires. It says: TypeError: [$q:qcycle] Expected promise to be resolved with value other than itself '{}' The toast works fine, but I would prefer not to have that error whenever it pops up. Here is the function: let showSuccess = this.mdTo...
Max
1

votes
1

answer
62

views

JDL import parsed successfully, but generated entities not matched

WHEN I import JDL, C:\temp\vdemo5>jhipster import-jdl room10.jh The import failed, I am not able to figure out why. Could you please help? This error happens for other imports also. Here is my JDL file room10.hj: entity Room { name String, occupancyLimit Int, available Boolean } entity Reservation {...
Max
1

votes
1

answer
96

views

LLVM IR nested phi instruction

im working on a my own programming language. Im currently generating the code in LLVM IR. I got a question on nested If statement with phi. So lets say I have this in my language : if n < 0 then print("n < 0") else if 100 < n then print("100") else print("\n") I generated this in llvm ir : ; If ; Ob...
Max_Thom
1

votes
3

answer
45

views

Change “XX:XX:00” to “00:XX:XX”

So I have this data directly copy/paste from iTunes : Excel have "XX:XX:00" format which is "hh:mm:ss" but as you can imagine, it is more like "mm:ss:00". Musics are not hours long ! As it's not a direct cell format problem, I couldn't find easily the answer on internet. I need sometihng to put the...
mewX Max
1

votes
3

answer
31

views

Fixed top nav doesn't overlay page content

I'm trying to create a top-fixed nav, which is supposed to always be visible and overlay content if needed. However, after several attempts I've got the following result. I'd like to get rid of this "transparency" effect on the navbar. @import url("https://fonts.googleapis.com/css?family=Montserrat+...
Max Liapkalo
1

votes
1

answer
50

views

How to make this in a nested ifelse statement

I am currently working on a project that requires the following: I want the port (a breed) to ask storage locations (another breed) whether they have a certain value. If not, that proceed to ask the next storage location etc. etc. until he finds that location with the correct value. If so, than it s...
Max Goessens

View additional