Sam Sam

14467 questions
1

votes
1

answer
107

views

Bit shifting fails after the 20th time (Solidity)

my goal is to bit shift a maxed uint256 so that zeros are iteratively added to the right side: ...1111111111111... becomes ...1111111111000... I the use the new shifted position as a mask. After about 20 something iterations my code stops working properly. Does anyone have any insight on the matt...
Sam Sendelbach
1

votes
1

answer
1.4k

views

'CXXABI_1.3.11' not found`

I can't get a cross compiled build running on my Raspberry Pi 1 B+. The error I keep getting is: ImportError: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version 'CXXABI_1.3.11' not found. I tried multiple compilers with different settings but I keep getting the same error. Also changing the LD_LI...
Sam
1

votes
1

answer
507

views

Combine ASP.NET MVC and Web API projects using identity

I am new to ASP.NET and I have to create an ASP.NET MVC project using the identity framework for authentication and authorization, but the access to the database (SQL Server) must be done in an independent web service project so I created a Web API project with also identity containing all services...
sam
1

votes
0

answer
14

views

How to check if two strings are equal recursively in Python? If equal, return 1, otherwise, return 0

def compare(s1, s2): if s1 == '' and s2 == '': return 1 if len(s1) != len(s2): return 0 if s1 !='' and s2 == '': return 1 else: compare(s1.strip(s2[0]), s2.strip(s1[0]))
Sam Tang
1

votes
0

answer
40

views

Incorrect hex addition on memory mapped address and offsets in C++

Let's start with what I am able to get working and then what is not working, and then hopefully the community can help me figure out why. Let's say I have the following class: #define BASE 0x20200000 /* base GPIO address in memory mapped IO*/ #define GPSET0 0x1c /* Pin Output Set */...
Sam Hammamy
1

votes
1

answer
64

views

Unable to check in project into VSTS Repository

I'm trying to check in an existing project into a fresh new repository on VSTS. I've connected to the repository in Team Services. When I right click my solution and select Add Solution to Source Control, I get the following errors. After that nothing happens. Any idea how to fix this?
Sam
1

votes
0

answer
72

views

How TF-IDF handles missing values?

I am working on a classification problem in which I have to classify product category based on the information of the product like title, description and other attributes. It is working for different categories but getting biased in closed categories like mobile and mobile accessories. Let's say I h...
Sam
1

votes
1

answer
670

views

Angular2 ng2 smart table sorting as numeric

I have implemented the ng2 smart table grid for listing https://akveo.github.io/ng2-smart-table/#/documentation Here I want to integrate the sorting for 2 columns. For this I used the code storeid: { title: 'Store #', sort: true }, But this is not numeric sorting. It sorts as 1,10,11... instead of 1...
Sam Hanson
1

votes
1

answer
363

views

Spring boot oauth2 auth server sessions

I'm attempting to understand how spring boot uses http sessions to manage the oauth authorization code flow. I understand that after the user submits their credentials via the /login form spring will persist the authentication object so it can be retrieved when the browser is redirected to retrieve...
Sam
1

votes
2

answer
320

views

Where to get JWT token in React/Redux app

I need to grab from my backend a JWT token as early as possible. Where's the right place to make my API call from so that I handle this early in the life cycle of my React/Readux app?
Sam
1

votes
0

answer
33

views

AJAX function putting post in URL, rather than to page

I've got a dropdown, which when selected, should then go query the DB and get a report back. When the user selects the option from the dropdown, it should dynamically change the field without reloading the page. However, it does seem to reload the page, and the $_POST data is inserted and visible in...
Sam McLean
1

votes
0

answer
47

views

If any disabled dates between start date and end date, alert user about booking not possible

I have a booking page. eg, The booking start on 2018-01-10 and end on 2018-01-20. If some date 2018-01-15 and 2018-01-16 are disabled so how can we inform user 'there is some disabled dates in between 2018-01-10 and 2018-01-20 so bookings not possible'. or Not clickable end date. $('#dateFrom')....
sam sam
1

votes
0

answer
158

views

Using Google Login with Cognito Identity Pool to Authorize Lambda HTTP Requests

I'm sure someone must have gone through scenario; however, I have not been able to find some documentation/samples covering it. What I'm attempting to do Expose several REST endpoints using Lambda (severless), so this is a registered api with the api gateway Some of these endpoints require a user au...
Sam
1

votes
2

answer
47

views

How can I take specific data from an API and export it without writing the data to a file?

I'm new to Python and using APIs and would love some help! Using the URL: http://api.worldbank.org/v2/countries?format=xml I want to gather each country's 'iso2Code' and 'name'. I want to be able to output the data in a cleaner XML file format or an array (but would love the knowledge on how to do b...
Sam Green
1

votes
0

answer
39

views

TortoiseGit client User info

I am using TortoiseGit 2.3.0.0 on Windows 7 and GitHub enterprise. The repository is created on GitHub server which is accessible from the TortoiseGit client. The GitHub repository is created as private for limited User access. The issue I'm facing is, from the TortoiseGit Settings/Git/Edit global ....
Sam
1

votes
1

answer
154

views

DownloadString works for HTTP but not for HTTPS

I have webclient call in my SSIS package which call an API to get JSON response. using (var mySSISWebClient = new System.Net.WebClient()) { mySSISWebClient.Headers[HttpRequestHeader.Accept] = 'application/json'; var result = mySSISWebClient.DownloadString(jsonURLwithDate); } When I change the URL to...
Sam
1

votes
1

answer
1.1k

views

How to fix UILabel intrinsicContentSize on iOS 11

On iOS 11 many of our layouts are breaking due to labels apparently misreporting their intrinsicContentSize. The bug seems to manifest worst when a UILabel is wrapped in another view that attempts to implement intrinsicContentSize itself. Like so (simplified & contrived example): class LabelView: UI...
Sam
1

votes
1

answer
425

views

React Native elements: List not scrolling

Repo link is here I am unable to scroll the listview. I tried the following solution but am getting errors: import { ScrollView } from 'react-native'; ... ... Code for that page is here, the error using scrollview occurs whether I am using the element from react-native or react-native-elements. imp...
Sam Rao
1

votes
1

answer
82

views

How to save data in json file by user input in php

I am trying to get input from user and on submission it get save in Json file but i am experiencing errors and there solutions on web did not help me. Here is my code: Now the form I am using code is here: Name Age Please Select Type Engineer Doctor Researcher Age sex Submit Now the issue is on su...
Sam
1

votes
0

answer
86

views

How do you add the toolbar back to the viewer after you enterEditMode()?

So, my current problem is that when I enter edit mode with MarkupsCore, the toolbar disappears. I have tried numerous ways of adding it back. My latest attempt was this: var button1 = new Autodesk.Viewing.UI.Button('toolbar-markup'); button1.setToolTip('Markup'); button1.addClass('markuptool'); var...
Sam Curry
1

votes
0

answer
546

views

Create simple Task for Python in Visual Studio Code

I have already seen this question: How to execute Python code from within Visual Studio Code But all those answers are about tasks from old versions ('0.1.0' or '0.2.0'). VS Code is now version '2.0.0' and some parameters have changed. I'm trying to create this task through Run Task: tasks.json: { /...
Mikhail_Sam
1

votes
0

answer
68

views

Using the directory API to turn off contact sharing for an organisation (G Suite)

Google currently has a global setting to turn on and off contact sharing the directory, which means I cannot turn it off for a specific organisation. In an education environment with staff and students, we do not want students to show up in the global directory, this can be achieved by manually turn...
Sam T
1

votes
1

answer
513

views

How to update a FormControl inside of FormArray in Angular 2+?

I can update a FormControl inside of FormGroup like this: form.setControl('happyControl', new FormControl('happy value', Validators.required) ); But inside of a FormArray, I can't edit picked FormControl. In myForm controls > FormArray > FormGroup, I can't set the control. My code is like this: let...
Sam
1

votes
0

answer
109

views

Triangle shape like an arrow in list for API < 23

I have been following the answer for this question Making a triangle shape using xml definitions?. I need to create a triangle that looks like arrow to be placed at the end of selected list item (see attached photos). I have managed to get it working by do the following: shape_diamond.xml ----------...
Sam
1

votes
1

answer
100

views

Importing ARCharts framework/project into Swift project

I have tried a myriad of ways to import the following Github project into my Swift iOS project so I can build upon ARCharts, but it did not work. I need to import it manually so I can adapt the graphs design afterwards. My Project: https://www.dropbox.com/sh/r0hwil6w5n4a1ie/AAC-O9nDX_6W3kK1nPwWjA3ca...
Sam
1

votes
1

answer
111

views

Search via Geocoder gem with an existing google placeId for a location

I'm trying to search for a location, using an existing google PlaceId. It is referenced in the documentation to pass the param: google_place_id: true require 'geocoder' Geocoder.search('ChIJLU7jZClu5kcR4PcOOO6p3I0', params: {google_place_id: true}) https://github.com/alexreisner/geocoder#google-goog...
Sam Watson
1

votes
1

answer
247

views

Nested XML unmarshalling to POJO class

I am new to JAXB marshalling and unmarshalling, I am trying to unmarshall a nested XML to Java POJO class, but i am getting null in the unmarshalled object. Also I want to confirm if I have created the POJO Classes correctly for the corresponding XML. XML File: Development 1.0 Delta 2017-10-26T16:3...
Sam
1

votes
0

answer
41

views

Moving Identity Tables to Existing Database for Authentication in Entity Framework

In my development environment, I have the login and registration working fine with the local db, but when I publish the site live, I am obviously unable to connect to my local db. I'm new to entity framework and I was wondering if there is a way to take the pre-existing identity tables for user info...
Sam Harrison
1

votes
0

answer
18

views

Build periodically needs to be happen only when modifications done

Job gets triggered everyday at scheduled time. I want these to be triggered whenever any changes found and not everyday at scheduled time. Here in my case not using any version controls and file systems.Only Nexus Artifactory my jenkins job downloads the package from their whenever any new package g...
Sam
1

votes
2

answer
178

views

Any predefined Jenkins Job convert them to DSL

My Jenkins Box contains hundreds of jobs and i want them to convert into DSL code is their predefined plugins or softwares to convert the existing jenkins job. Any suggestions on these. Thanks....
Sam
1

votes
0

answer
296

views

Input size mismatch error when using pre-trained inceptionV3 model for image classification

I'm facing trouble when training a model using pre-trained inceptionV3 for my own image data set. I'm loading images using data.Dataset loader and 'transforms' for image transformation. Here's my inceptionV3 model inceptionV3 = torchvision.models.inception_v3(pretrained=True) pretrained_model = nn.S...
Sam
1

votes
0

answer
123

views

Loop Video GPUImage 2

I am trying to display a looped filtered video to the user using GPUImage 2 With GPUImage 1 i could do the following player = AVPlayer() let pathURL = URL(fileURLWithPath: path) playerItem = AVPlayerItem(with: pathURL) player.replaceCurrentItem(with: playerItem) moive = GPUImageMovie(playerItem: p...
Sam Bing
1

votes
0

answer
18

views

.htaccess Mod Rewrite Issue

I have following rewrite rule in htaccess and its not working for first part for EventList.php. Will appreciate some help to figure out whats wrong. I am adding this in a wordpress website htaccess file. RewriteEngine On RewriteRule ^Local-Event/([0-9]*)$ /Eventbrite.php?page=$1 [QSA] Re...
Sam Seth
1

votes
0

answer
704

views

R: pheatmap reorder columns while maintaining topology

I would like to change the column order of my heat map created with the R package pheatmap, but keep the same topology so that the dendrogram on top also reorders with the columns. While explained in the documentation, I can't figure out how to implement it in R.
Sam Vanbergen
1

votes
1

answer
830

views

Take screenshot of ARKit view

How would I insert a button and use it to take a photo and place it in photo library. I have noticed when using arkit I cant drag buttons and place them over the view. I am seen some people online say you use snapshot() for taking the photo. import UIKit import SceneKit import ARKit class ViewContro...
Sam Burns
1

votes
1

answer
60

views

Passing std::string to C++ DLL for use with C# dll

I am trying to pass strings from a C++ console app to a C++ dll, which i then convert to System::string to be sent to a C# dll. But the string comes through as random characters. Note that lShutdown actually comes through correct as it is defined in the dll so the problem must be between the testapp...
Sam Murphy
1

votes
0

answer
344

views

Integration test with Junit5, spring and docker

I want to run a test with junit5-docker and Spring test @Sql annotation to unit test a postgresql native query (I can't use HSQL DB here). My problem is that the scripts inserted with Spring @Sql annotation are executed before the docker container creation end. I can't find an acceptable way to or...
Sam Clarenc
1

votes
1

answer
1.4k

views

jspdf-autotable text word break

I'm having issues with the column headers text and the row text breaking incorrectly in the middle of the word (see attached). In the attachment I would expect the 'long text column' to be more squeezed which will increase the width of other columns and also increase the height of the rows. The cod...
Sam
1

votes
0

answer
151

views

Include forwarded path phoenix

When forwarding to another router, something like: scope '/' do get page_controller, :index forward '/child', ChildWeb.Router do The page_path(conn, :other) inside the ChildWeb evaluates to '/other' As it was forwarded using the '/child' string, it would be great if page_path could actually be evalu...
Sam Houston
1

votes
1

answer
967

views

pydev project - no module named pyodbc

Hello guys I am pretty new to all this so please bear with me. I am trying to execute the following python code on eclipse but finding some errors: import pyodbc from bs4 import BeautifulSoup I get the following error for both: import pyodbc ModuleNotFoundError: No module named 'pyodbc' import Beaut...
sam

View additional