2018-10-22         Gabriel

formated output with fprint in Makefile with pwd output

In my Makefile I have this::update: cd pkg_one && git fetch && git rebase @printf ' ==> [pkg_one] rebase Done, now in `pwd`\n' I try to get the result of pwd in-lined with my printf commend You could either remove the `pwd` from within the context of the single quotes with...update: cd pkg_one && git fetch && git rebase @printf ' ==> [pkg_one] rebase Done, now in '`pwd`'\n'or, use double quotes instead...update: cd pkg_one && git fetch && git rebase @printf " ==> [pkg_one] rebase Done, now in `...

 makefile                     1 answers                     66 view
 2018-10-22         Gabriel

Multiple types of tokens for ADFS

I'm trying to find out if it is possible for ADFS to send two types of tokens on one authentication ?We have external systems working with JWT tokens but also systems with SAML tokens. We like to receive a JWT token and SAML token as a response on one authentication request to ADFS.I was reading up on the following: https://docs.microsoft.com/nl-nl/azure/active-directory/authentication/concept-mfa-howitworks but this seems to be consecutive means of authentication not what I'm looking for No - it's either one or the other.It's not an ADFS issue.That behaviour is proscri...

 adfs3.0                     1 answers                     42 view
 2018-10-22         Gabriel

Conversion of string containing special characters to integer

I have a string containing '%' symbol and I want to convert it into integer. Is there any possible way to do this in python?string='9.9876%' string[:-1] will get rid of the % symbol. Now you can use int(float(string[:-1])) to get integer value. [XXX]string1 = "9.9876%"string2 = string1.replace('%', '') #replace % with the empty stringstring2 = int(round(float(string2))) #remove int() to keep decimal places #remove round() to, well, not roundprint(type(string2), string2) [XXX]

 python                     2 answers                     3 view
 2018-10-22         Gabriel

Opening several canvas windows

I am trying to run a Python code that opens several canvas windows but I do not know how to do it..... opening just one windows looks like the code that I have below...... If I want to put this code inside a for cicle in order to open several independent windows.... how can I do that?Thanks for your help from tkinter import * root = Tk() root.title("First Graph") root.resizable(0,0) points = [] f1 = Canvas(root, bg="white", width=300, height= 300) f1.bind("<Motion>", callback) f1.configure(cursor="crosshair") f1.pack() f1.bind("<Button-1>", point) f1.bind("<...

 canvas                     1 answers                     70 view
 2018-10-22         Gabriel

how to Convert DateTime Now To second

I have the input 15:20:30I want to convert to seconds. Seeing as though you haven't specified the question properly I have interpreted it to represent 15 hours 20 minutes and 30 seconds, as opposed to DateTime.Now. (Obviously this is the same as "How many seconds since midnight") TimeSpan MySpan = new TimeSpan(15, 20, 30); MySpan.TotalSeconds;Although if you're only wanting the Seconds from the current DateTime.Now (this is not the TotalSeconds, just the current minutes seconds), just use: DateTime.Now.Second [XXX]var dt = DateTime.Now;var ticks = dt.Ticks;var seco...

 c#                     3 answers                     60 view
 2018-10-22         Gabriel

Cannot talk to atmega328p over AVRisp mkII

I have similar issue as here(AVRISPmkII connection status: Unknown status 0x00) but different setup and changing bitcklock didn't help.The current setup is atmega328p with external oscillator 16MHz connected to ISP interface of avrisp mkII programmer but whatever I do It keeps on showing the same output all the time:mike@asus:~/wireless-temp-sens/tests$ sudo avrdude -p atmega328p -P usb -c avrispv2 -U lfuse:w:0xff:m -U hfuse:w:0xd9:m -U efuse:w:0xfe:m -vavrdude: Version 6.0.1, compiled on Oct 21 2013 at 17:07:18 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicr...

 linux                     1 answers                     88 view
 2018-10-22         Gabriel

Writing a C# Variable Length Structure to Binary and Reading it in in C++?

Okay, so i am continuing to work on my little game engine to teach me C#/C++ more. Now i am attempting to write a way of storing data in a binary format, that i created. (This is learning, i want to do this my self from scratch). What i am wondering what is the best way of dealing with variable length arrays inside a structure when reading it in C++?E.g. Here is what i currently have for my structures: [StructLayout(LayoutKind.Sequential)] public struct FooBinaryHeader { public Int32 m_CheckSumLength; public byte[] m_Checksum; public Int32 m_Numbe...

 c#                     3 answers                     15 view
 2018-10-22         Gabriel

PHP MySQL select where $id is in string

how could I select the values from the table where my passed ID value is inside a string? Values of columns can be 3326,9023,3725,552,1559 or 3326, it's a string of n values. I need to get the row if my passed ID is inside this string.Query:$result = $this->db->query(" SELECT b.* FROM `values` AS `b` WHERE b.ids = ? ", array($id))->row_array(); If the list of ids is in the column values, you can use FIND_IN_SET to search for your passed id:$result = $this->db->query(" SELECT b.* FROM `values` AS `b` WHERE FIND_I...

 php                     2 answers                     39 view
 2018-10-22         Gabriel

SQL Inserting in loop using value (sysguid) multiple times

I currently have the following script for inserting some dummy data into one of my tables for testing purposes.I can call it and pass the number of entries I would like to have. That's working well.Now the problem is that some of the data is not working.The CRecordID should have in all three lines (12, 17, 19) the same value.Is there a way to archive this?WHENEVER SQLERROR EXITPROMPT insertingINSERT INTO MySchema.MyTable (MYRECORD, TMSTAMP, SHORTRECORD, CRecordID) (SELECT '<MYRECORD> <TimeStamp>'||TO_CHAR(SYSDATE,'DD.MM.YY')||' '||to_char(to_d...

 sql                     1 answers                     2 view
 2018-10-22         Gabriel

Java: My HashMap lookup fails because it does by REFERENCE, not by VALUE. How do I fix?

I am using a struct containing 3 integers as a key to my map. It seems my HashMap is looking up keys based on REFERENCE, not keys based on VALUE.Is there a way to fix this?Below, I am expecting b and d to be true!public class Triple{ public int kid; public int x; public int y; public Triple(int a, int b, int c){ kid=a; x=b; y=c; } public Triple(Triple notAcopy, int next, boolean reverse){ kid=notAcopy.kid; x=notAcopy.x + next; if (reverse) y=notAcopy.y-next; else y=notAcopy.y+next; ...

 hashmap                     2 answers                     14 view
 2018-10-22         Gabriel

kafka connect Skipping fetch for partition

I have standalone confluent server that worked fine until suddenly connect stooped to consume records .I enabled trace on connect and this is the debug output .DEBUG Added READ_UNCOMMITTED fetch request for partition connect-offsets-10 at offset 0 to node 10.1.*.*:9092 (id: 1001 rack: null) (org.apache.kafka.clients.consumer.internals.Fetcher:787) I did some research and found out that it`s can be related to KIP-62.I try to reconfigure server proporties with those values but i got same result. group.initial.rebalance.delay.ms=0session.timeout.ms=10000heartbeat.interval.m...

 apache-kafka                     1 answers                     102 view
 2018-10-22         Gabriel

Is multi-threading possible in laravel 5.5?

I am new to laravel and php. I am working on a problem to insert a large data into database, which takes a lot of time. So I was thinking to divide the data into chunks and create multiple threads to insert those chunks of data. I am using php 7.2.4 and my laravel 5.5.Here is my code.here is my code:$row = 1; $contactNumberList = []; if (($handle = fopen($path . "/" . $fileName . "." . $fileExt ."", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $row++; $contact_number =...

 php                     1 answers                     84 view
 2018-10-22         Gabriel

Azure load balancer causes 400 error "Invalid Hostname" on postback

Trying to migrate a web application to be used on Azure. The application works great on standard IIS. When using the Azure emulator to test the web application locally, all postbacks result in Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid.I'm at a loss of where to look to gather more information. So far I've tried:Debugging the application. I can verify breakpoints are hit on initial page load, so debugging is definitely working. When causing a postback, no exception is caught by the debugger.Looking in the Event Viewer. There's literal...

 c#                     1 answers                     21 view
 2018-10-22         Gabriel

Cannot resolve symbol 'SCOPE_FILE'

I'm new to app development, and I'm working with Android Studio 3.1.4. I'm working with the Google APIs for sign-in, which have worked well when getting the user's ID, email address, and basic profile. However, I'm now trying to get the Google Drive API working, and I've been stuck for almost two days on this one nagging problem, which is the first step in getting this API to work. Here is the code that's being problematic.GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .requestScopes(Drive...

 android                     2 answers                     4 view
 2018-10-22         Gabriel

Should I mark spring mvc DTO with Serializable?

This question already has an answer here: Spring MVC - should my domain classes implement Serializable for over-the-wire transfer? 4 answers No, you shouldn't.Serialization implies that one side saves an object's state to a sequence of bytes while the other side rebuilds those bytes into a live object at some future time. It means you should utilize Java Serialization API on the back-end side, pass the result over the network, and find a way how the received bytes can be helpful on the ...

 java                     2 answers                     74 view
 2018-10-22         Gabriel

UITableView does not show data correctly in my custom cell UILabel and reuse problem

I create my custom cell class and design my user interface with the code and constraints (I have 2 UILabels that hold my data in each row). I register my customcell class in the main viewController and load data in the tableview. The problem is one of my UILabels fills with data but the second one not show its data until I scroll the table view or click right on that row. See images.Before ScrollAfter scrollHere is my code:class ProjectDetailsCustomCell: UITableViewCell { var key : String? var value : String? var keyContainerView : UIView = { var container...

 ios                     1 answers                     18 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last