I have 10 TextViews inside 1 Constraint Layout. What I would like to achieve is to have the Constraint Layout have some elevation to make it seem like all 10 textviews are basically above my background. But I would like to keep the background of my layout to take the background of the phone so have the Constraint layout have a transparent background. What is a way that I can achieve this? I saw various posts here about this but they actually want the layout colored in and not transparent and that is where this one differs from theirs. I have tried way to do it with shapes using a rectangle but
I currently use the following implementation to build a frequency map from a large vector. For each value, I attempt to insert a (value, 1) pair into the map. If the insertion fails because the key is already present, I increment the existing counter instead. Are there any optimizations or alternative approaches? #include <iostream> #include <random> #include <vector> #include <chrono> #include <map> template <typename T> void freqmap (const std::vector<T>& v, std::map<T, int>& m) { m.clear (); if (v.empty ()) return; auto i (v.begin ()); std::pair<T, int> p_; p_.second = 1; std::pair<typename
I was snooping through my MSP430 microcontroller's header files, and I ran into this in <setjmp.h>: /* r3 does not have to be saved */ typedef struct { uint32_t __j_pc; /* return address */ uint32_t __j_sp; /* r1 stack pointer */ uint32_t __j_sr; /* r2 status register */ uint32_t __j_r4; uint32_t __j_r5; uint32_t __j_r6; uint32_t __j_r7; uint32_t __j_r8; uint32_t __j_r9; uint32_t __j_r10; uint32_t __j_r11; } jmp_buf[1]; /* size = 20 bytes */ I understand that it declares an anonymous struct and typedef's it to jmp_buf, but I can't figure out what the [1] is for. I know it declares jmp_buf to b
With this code I can export to excel the data of MyModel, works ok: Excel::create('Filename', function ($excel) { $excel->sheet('Contratos', function ($sheet) { $datos = MyModel::select([ 'id', 'data']) ->get(); $sheet->fromArray($datos, null, 'A1', false, false); }); })->export('xls'); But I need to chunk the data to generate the excel, because in another model I have too much data (like 9000 records). I was seein some examples like this one: http://www.thecreativeroad.com/blog/export-large-dataset-using-laravel-excel-using-laravel-db-chunk $data = $user->query(); try{ return Excel::create('F
Windows Server 2016, ADFS, Certification Authority I tried to create duplicate web server template, but it says that it's not an accessible. see below snap. Now, My client is not technical, he provide me an account with most of the access, account is not an administrator, but I can assign many access to my self using AD Administrative service. My only question is which access DO I need to provide to this account for creating duplicate web server certificate template?
I have a DenseArray<ComplexNumber> symbols now I would like to transform these into a mutable Matrix of complex numbers, don't care if column or row major. The documentation is a bit sparse around this, I looked at all the examples. Also how can I get sub-array of the dense array? Something like symbols.subArray(start, end, step).
What is the difference of loading a library in CodeIgniter via, autoload.php Controller class Is there any point in loading the library in the constructor method of the controller class as, $this->load->library(array('form_validation')); When can I just load them at the autoload.php?
Until my code works, I have set bucket policy too wide open. { "Version": "2012-10-17", "Id": "Policy15", "Statement": [ { "Sid": "Stmt1", "Effect": "Allow", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::bcktName", "arn:aws:s3:::bcktName/*" ] } ] } I am using Elastic BeanStalk which in turn uses AWS Ec2. The Ec2 instance has aws-elasticbeanstalk-ec2-role which was provided FullAccess to S3 (I understand full access is dangerous). I'm using the following java code in my webapp which is deployed to Ec2. AmazonS3 s3Client = AmazonS3ClientBuilder.standard() .withCredentials(new I
I am using RobinHerbots/jquery.inputmask library. Library returning _@_._ for empty value. You can try demo. Here is my code. HTML: <input type="text" id="email" autocomplete="off"> <button type="button" id="unmask">Unmask</button><br> Value: '<span id="val"></span>'<br> Unmasked value: '<span id="unmasked"></span>' JS: $("#email").inputmask('email'); $("#email").inputmask({'autoUnmask': true}); $("#unmask").click(function(){ $("#val").text($("#email").val()); $("#unmasked").text($("#email").inputmask('unmaskedvalue')); });
I have this element below that shows a success/failure banner across the screen. Is there a way I can set it in html/css to hide after 4 seconds? <div id=mainAlertMessage class="alert @message.CssClassName alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <div style="text-align: center"><strong>@message.Title</strong> @message.Message</div> </div> I'm showing it by setting tempData in my controllers like this TempData["UserMessage"] = new BannerMessage() { CssClassName = "alert-success",
I am trying to understand the different methods for dimensionality reduction in data analysis. In particular, I am interested in singular value decomposition (SVD) and principal component analysis (PCA). What would the explanation be for a layperson? I understand the general premise of dimensionality reduction as bringing data to a lower dimension, but a) how do SVD and PCA do this? b) And how do they differ in their approach? OR maybe if you can explain what the results of each technique is telling me, so for a) SVD - what are singular values b) PCA - "proportion of variance" Any example woul
I had made an account on Odesk but when upwork came I made another account there and in the meant time I opened my old odesk account on upwork. Now I have a project on my old upwork account and today I saw a notification about the video calling verification from the upwork, I quickly disabled my new upwork account and since then I am worried that if I do video call with them, how many chances are there that they won't disable my account for duplication reason? Any help or suggestion would be appreciated!
I am trying to de-serialize a json object but getting this error, here is my call code. I am not exactly sure what has changed in my code, this use to work just fine before from what I remember. var serializedCriteria = JsonConvert.SerializeObject(criteria, new RawJsonConverter()); var request = new HttpRequestMessage() { RequestUri = new Uri($"{urlBase}/events/search"), Method = HttpMethod.Post, Content = new StringContent(serializedCriteria, Encoding.UTF8, "application/json"), }; var response = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result; var serializer = new D
I want to group the rows of the table based on a property in sap.ui.table.Table I tried using how we do in sap.m.table. But it is not working. <ui:Table rows="{ path : '/EtyVacStockItmSet', sorter : { path : 'FacilityType', group : true }}" selectionMode="Single" ariaLabelledBy="title" id="productsTable">
from tkinter import * import random tk = Tk() canvas = Canvas(tk, width=400, height=400) canvas.pack() for x in range(0, 40): x1 = random.randint(0,400) y1 = random.randint(0,400) x2 = random.randint(0,400) y2 = random.randint(0,400) x3 = random.randint(0,400) y3 = random.randint(0,400) my_triangle = canvas.create_polygon(x1, y1, x2, y2, x3, y3,\ fill =("blue"), outline="red") Hi! I am playing with tkinter and generating random triangles. The problem is: I want to use random on fill = " " to generate random colors random.randint(start, end) returns numbers, but fill accepts only strings like f
The Chinese government has a really specific list of requirements for visa photos: I had an old unused photo from last time I applied for a visa or passport, and compared it to the requirements (decided not to use it because it was damaged). It seemed to match most of the requirements, except that it seems that they want a photo which isn't square: The required width is less than the required height. Assuming most drugstores are still providing square passport photos, the question becomes: Should I cut the photo to match the specified width? What adds to the confusion is if you look at the vis
Is it possible to access a model definition of via swagger-ui directly via an anchor? In the example page http://petstore.swagger.io/ I see that the anchor works for a groups of endpoints, e.g. http://petstore.swagger.io/#/pet. Hovering the mouse over a model description shows me an anchor (e.g. #/definitions/Category for the Category model), but http://petstore.swagger.io/#/definitions/Category does not bring me there. If I inspect the elements, I see a real link to anchor pet: <a class="nostyle" href="#/pet"><span>pet</span></a> while for Category this is a model-hint: <span class="model-hin
I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors. I see nothing in the native documentation that talks about changing look for MKMapView. I've Googled the topic and tried to change MKOverlayView.But, I couldn't find anything. Is this even possible? Can I change the background colors of the Apple Map. Thank you.
So I've been developing this program for a while now... Its meant to act as an asset manager (and potentially more in the future) for our IT team. I have 2 services which we'll refer to as "Manager" and "IAM" for right now. The "Manager" does all things managerial for all services (currently only the inventory asset manager known as "IAM") such as automatic updates, etc., while the asset manager does its job. Anyways, its been working great for a while now. Recently I implemented an automatic updating feature (actually still needing to be tested and likely debugged). While doing this, I needed
We've developed a Java web application in Eclipse with a Swing GUI, all part of the same Eclipse web application project. We now want to be able to run the application outside an IDE, for example as a WAR or JAR file. We tried to deploy the application as a WAR using Tomcat and accessing it through the browser and the server is running but the GUI doesn't show up, naturally. Is there some way, preferably as simple and fast as possible, to be able to run the web application and at the same time have the GUI appear and be able to interact with it, the same way we did through Eclipse?
I do not know if I gave myself to understand for example in the file server / main.js place something like this Meteor.startup (() => { console.log ('where am I'); // example of collection and map }); and you can see the message but within an extended react component how can I do it or would I have to import some method?
I want to install Microsoft Windows SDK for Windows 7, so I should install .NET Framework 4. But there is an error that I can't solve: I tried to uninstall installed .NET framework from "Program and Features" But I don't know which one to be uninstall and I'm afraid that another program uses it.
I'm trying to use JPA for my spring application. I have integrated the JPATransactionManager & LocalEntityManagerFactoryBean into AppConfig class. Now, when I try to call one of the method which is in DaoImpl, the AppConfig is not able to Autowire the classes. Here is my code Test Class public class Test { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class); BbDao personService = context.getBean(BbDao.class); personService.getDealByDealId("0194541605021NJMAPFU"); context.close(); } } AppConfig @Configurat
I am working on code to do Gauss-Jordan elimination in python. My directions are as follows: def gauss_jordan(A): for each row k do i* <- argmax_{k<i<n} |A_{ik}| if A_{i*k} = 0 then Matrix is not invertible end if Swap rows k and i* for each row j below k (i.e. j = k + 1,...,n) do f = A_{jk}/A_{kk} Aj = Aj - fA_{k} end for end for for each row k = n,..., 1 (i.e. in reverse) do A_{k} = A_{k}=A_{kk} for each row j above k (i.e. j = k -1,..., 1) do f = A_{jk}/A_{kk} Aj = A_{j}-fA_{k} end for end for So far I have: def gauss_jordan(A): (h, w) = (len(A), len(A[0])) for y in range(0,h): for pivot in
I am facing issue when I am trying to run tslint from Angular Cli. > ng lint Error Failed to load E:\Projects\lsp-ui\node_modules\ng2-slimscroll\tslint.json: Could not find custom rule directory: E:\Projects\lsp-ui\node_modules\ng2-slimscroll\node_modules\codelyzer [Error while running]
Hi I'm trying to run Selenium script with Maven, TestNG in Eclipse. First I right click on my project and select TestNG | Convert to TestNG(testing.xml is created). Then I go to the Run Configurations and create a new launch TestNGl and click Run. When run it I got this error: [RemoteTestNG] detected TestNG version 6.11.0 FAILED CONFIGURATION: @BeforeTest beforeTest java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version c
I have a Pull Request with six files, call them: A, B, C, X, Y, and Z. None of this is merged to master, but the local branch has been pushed to the remote on GitHub. There are many, many commits that touch any and all of these files. Some commits touch only one file. Some touch all six. I want to create two new PRs. One PR contains files A, B, and C with all the changes from all the commits. The other PR contains X, Y, and Z with all the changes to those files from all the commits. I don't care what happens to the commit history or branches. All commits will be squashed before merge and all w
I have code to calculate the difference between 2 given timestamps: Start_Time="2017-09-19 19:36:12.763" End_Time="2017-09-19 19:36:22.72" I want to get the difference between the timestamps considering the milliseconds. This is what I tried: #!/usr/bin/perl use strict; use warnings; use Date::Parse; use Date::Format; $startdat = "2007-11-17 12:51:22"; $stopdate = "2007-11-17 12:52:22"; my ($years, $months, $days, $hours, $mins, $secs) = split /\W+/, $startdat; my ($yeart, $montht, $dayt, $hourt, $mint, $sect) = split /\W+/, $stopdate; my $times = timelocal($secs,$mins,$hours,$days,$months,$ye