text
stringlengths
70
452k
dataset
stringclasses
2 values
Reducing a boolean expression with nested ternary expression Consider the following boolean expression with a nested ternary expression: $$(\text{if $a < 0$ then $-a$ else $a$}) < 3$$ I can "see" that it can be reduced to: $$a > -3 \land a < 3$$ However, I can't figure out the algebraic rules I need to apply in order t...
common-pile/stackexchange_filtered
"The C compiler "/usr/bin/cc" is not able to compile a simple test program." I installed Cygwin64 and everything is fine in Toolchains 1, even the C Compiler is ticked. But I get these errors whenever I create a new project and 'Run' and 'Debug' buttons are grayed-out from the get go; Error:The C compiler "/usr/bin/cc"...
common-pile/stackexchange_filtered
Permission issue on sysfs access from android application ( .java source code ) Android application in java having permission issues when accessing sysfs entry. try{ FileOutputStream fos = new FileOutputStream("/sys/class/shift_reg/shift_reg/value"); byte mybyte = 1; fos.write(mybyte); fos.close(); } catch ( Except...
common-pile/stackexchange_filtered
stm32 NVIC_EnableIRQ() bare metal equivalent? I'm using the blue pill, and trying to figure out interrupts. I have an interrupt handler: void __attribute__ ((interrupt ("TIM4_IRQHandler"))) myhandler() { puts("hi"); TIM4->EGR |= TIM_EGR_UG; // send an update even to reset timer and apply settings TIM4->SR &...
common-pile/stackexchange_filtered
Why do we have a tag Arduino and Raspberry Pi if we have special SE sites for that? We have SE sites specialized on Arduino and Raspberry Pi. Why should we have these tags here?Why not to migrate all questions about Arduino and Raspberry Pi there? You can get an answer more faster there. Or maybe these tags on SO for s...
common-pile/stackexchange_filtered
Eclipse doesn't resolve forward references of scala I want to construct Fibonacci sequence using this scala specific expression: val fibs: Stream[Int] = 0 #:: 1 #:: fibs.zip(fibs.tail).map { n => n._1 + n._2 } but the eclipse compiler complains regarding forward references: Forward reference extends over definition o...
common-pile/stackexchange_filtered
To which AWS service are mapped these two endpoint URI? I had in my hands these last days two URI belonging to AWS, I am not able to guess which AWS service would generate such URI: cognito-idp.eu-west-1.amazonaws.com quicksilver.elasticbeanstalk.com dig quicksilver.elasticbeanstalk.com responds with NXDOMAIN so I gues...
common-pile/stackexchange_filtered
'Zend_Http_Client_Exception' with message 'Passed adapter is not a HTTP connection adapter This is making my crazy. I really hate to post questions but "here goes". I was able to upload a video using the Zend Gdata API for You Tube. "One video"... Ever since I have received this error: Fatal error: Uncaught exception '...
common-pile/stackexchange_filtered
How to write good docstrings for decorators in Python? I have a problem with writing good and informative docstrings for decorators in Python. Let's say I have a following decorator: def require_login(view): """ Decorator for limiting access to a view for authenticated users only. :param view: view functio...
common-pile/stackexchange_filtered
jQuery UI Sortable - IE6 & IE7 z-index issue I'm trying to use jQuery UI's sortable but when dragging from one container to another, the item is appearing BEHIND the container. JSFiddle: http://jsfiddle.net/7LrLE/8/ I've uploaded a screen: Here's my code: <ul class="droppable grid-9"> <li>aaaaaaaa</li> <li>bbbbbbb...
common-pile/stackexchange_filtered
Is the term 'String' too jargony to use in a user interface? Having worked as a software developer for a long time, I'm out of touch sometimes with whether a word would be considered jargon. I am adding something to a user interface where a name is given, and a type. The type would be one of Number, Date, or 'String'....
common-pile/stackexchange_filtered
Why does the author mean by "The $(p+1)/2$ numbers to $x^2$, for $0\leq x\leq (p-1)/2$, ..." I couldn't get the proof for the given theorem. How is the $(p+1)/2$ numbering to $x^2$, how is the following relation valid?? It's saying "The collection of this-many numbers, each of the form $x^2$ for an $x$ in this range,...
common-pile/stackexchange_filtered
Problems using location poller (cwac-locpoll) android I am currently developing an application which gets the users location from time to time and stores it, later on it sends it over the network. I have been testing out the location poller but have had some issues, it seems that in some android models the location upd...
common-pile/stackexchange_filtered
Cannot install lighttpd on Ubuntu 18.04 LTS I'm using Ubuntu 18.04 LTS. I can't find out what's causing this error. I tried to google but couldn't find the solution. Please help. sudo apt install lighttpd -y Reading package lists... Done Building dependency tree Reading state information... Done The following ad...
common-pile/stackexchange_filtered
inconsistent bad mask error in packet tracer i was assigning: <IP_ADDRESS> <IP_ADDRESS> to 3560 switch which shouldn't throw an error of bad mask given that it is in the usable range: Address: <IP_ADDRESS> 01010011.10101110.00010000.10100 000 Netmask: <IP_ADDRESS> = 29 11111111.11111111.11111111.11111 000...
common-pile/stackexchange_filtered
how to make append changes to an arraylist I made this code, I am wondering what am I missing since when i return the list the new change i made to the position of j does not work! static ArrayList<Integer> SmallChange(ArrayList<Integer> list, int j){ int change = CS2004.UI(-5, 5); // this just makes a random int b...
common-pile/stackexchange_filtered
Which Recycler Adapter method is called when recycler wants to recycler an adapter I am aware that a recycler adapter and listview basically recycles adapters that can fit a given screen giving the user the illusion of multiple items, my main reason for this question is because I have an app that loads a great deal of ...
common-pile/stackexchange_filtered
Is polynomial ring a lattice? My prof says it's not. But I can't find a polynomial pair of $f,g$ such that $max(f,g)$ or $min(f,g)$ is not in $R[x]$. Define uniform order: $f\leq g$,if for all $x, f\leq g $. How are you defining the underlying order? What is "uniform order"? Consider $f=-g$ where $f$ takes at least ...
common-pile/stackexchange_filtered
10.9 CoreBluetooth RetrivePeriperals Im developing an app on OSX that uses CoreBluetooth. I have encountered a problem on OSX Mavericks that i cant seem to get around. (All of this works perfectly on OSX 10.8). First lets go through the flow of the application This flow is fairly established and has been used used suc...
common-pile/stackexchange_filtered
how can i configure the service provider in wso2is for different tenants of version 5.2.0 As per the documentation, enabling the SAAS Application, allows the Service provider to all tenants is not working.Even Though we have created the service provider per each tenant. when login by using wso2is authentication page it...
common-pile/stackexchange_filtered
PHP: execute command as synchronous process and read stderr I have a PHP class that must launch a Java main as a separate process. The execution must be synchronous and after its end I must read the stderr to handle and log potential errors. I see that the most popular techniques to run separate processes from PHP are ...
common-pile/stackexchange_filtered
Reading data of floppies from a ZX Spectrum Swift Disc Back in the day when we had a Sixword Ltd. Swift Disc floppy-drive we were ahead of the game on our speccy, allowing us to use 3.5inch floppy disks. See: https://www.worthpoint.com/worthopedia/swift-disc-interface-zx-spectrum-540379389 http://www.crashonline.org.u...
common-pile/stackexchange_filtered
Nginx set header for cert used with mTLS We have NGINX running on an EC2 instance behind an Application Load Balancer. We have configured our ALB to use mTLS with Passthrough (new feature on an ALB since Nov. 2023). Based upon the AWS documentation, the client cert will be passed through to NGINX on the header X-Amzn...
common-pile/stackexchange_filtered
Render React JS server side using .net I did the comments tutorial on http://reactjs.net/getting-started/tutorial.html and got it to render server side using .net mvc. I have an existing mvc app where I rewrote a page in react. I'm trying to render it server side using .net but I get an error when it tries to render s...
common-pile/stackexchange_filtered
Importing Group Audience data I have a site using OG7 and created groups to let users to access to some content as per the user membership and concent-type membership as well. Each user has to belong to a group and I can select that group(s) for him/her in the corresponding Group-Audience list box when adding or editi...
common-pile/stackexchange_filtered
Setting Itemsource for ControlTemplate I have created an AutocompleteBox and it works completely fine outside a ControlTemplate. When I place it within a Control template, the autocompletebox is no longer populated with any items. <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="telerik:SchedulerDialog"> ...
common-pile/stackexchange_filtered
`object' is undefined due to async function that fetched data in useEffect hook in reactjs I am fetching an object from api using axios.get("url"). The object fetched successfully (in Animal state) but there is a component level state (imageState) which requires updation using setState with fetched data. Code:Compone...
common-pile/stackexchange_filtered
Erratic behavior of train_test_split() in scikit-learn Python 3.5 (anaconda install) SciKit 0.17.1 I just can't understand why train_test_split() has been giving me what I consider unreliable splits of a list of training cases. Here's an example. My list trnImgPaths has 3 classes, each one with 67 images (total 201 ima...
common-pile/stackexchange_filtered
How to modify HttpServletRequest body in java? I would like to modify the request body before it reaches to Http Servlet and gets processed.The JSON Payload of the Request body is like following and I would like to get rid of the "PayamtChqmanViewObject" (Detail) part. { "ChqAccCode": "1", "ChqAmt": 1, ...
common-pile/stackexchange_filtered
group two columns from DB in perl I am writing a script which needs grouping and I can't do them in the SQL. I get my results as ArrayReference. My query to the DB returns something like this. 1234 TIN 32364 TIN 34367 BOX 87484 TIN 45674 BOX 45476 TIN 4575 BOX I want them to be grouped like : These are the list of B...
common-pile/stackexchange_filtered
If $|f(z)| \geq |g(z)|$ for $z \in D$ and $E = \{ z \in D : |f(z)| =|g(z)| \}$ has a limit point, then $E=D$. This is my problem: Let $D := \{ z \in \mathbb{C} : |z| <1 \}$. Let $f$ and $g$ be analytic functions on $D$. Suppose $|f(z)| \geq |g(z)|$ for all $z \in D$. Define $E = \{ z \in D : |f(z)| =|g(z)| \}$. Show t...
common-pile/stackexchange_filtered
best practice when order of calls in class are important? I have one class with two important functions: public class Foo { //plenty of properties here void DoSomeThing(){/*code to calculate results*/} void SaveSomething(){/* code to save the results in DB*/} } SaveSomething() uses the results calculated ...
common-pile/stackexchange_filtered
How to sort by meridian (AM and PM) in C? I have an issue trying to make my program sort by AM and PM. It's part of the requirements for my assignment or I would've done it as 24 hour format. This is my code so far #include <stdio.h> struct date { int month; int day; int year; int hour; int min; ...
common-pile/stackexchange_filtered
Maximizing an integral over a convex region Let $C$ denote a compact, convex region in the plane containing the origin with unit area, and let $f$ be a probability distribution on $C$. Let $f^\ast$ denote the distribution that maximizes the quantity $$\mathcal{G}(f):=\iint_C a\sqrt{f(x)} + b\|x\|f(x)~dx $$ where $a$ a...
common-pile/stackexchange_filtered
Image in Widget not appearing on device but working fine on Emulator. How to fix? I made a widget which reads an image from internal storage and displays it in an ImageView. It is working fine on the emulator (Android 2.3.3. API Level 10) but when I run it on my device (Droid Razr Android 2.3.6), it does not display th...
common-pile/stackexchange_filtered
Sparse consolidation Algorithm in Congos TM1 How do the sparse consolidation algorithm helps to improve the Cognos TM1 performance? what is sparse consolidation algorithm? I found a concise description here: Cognos TM1 Rules – how do they really work? During consolidations, TM1 uses a sparse consolidation algorithm ...
common-pile/stackexchange_filtered
Running python cgi script Interpreter results differ to browser I was having difficulty converting a program I made to a cgi script. I suspected it was to do with os.walk so I made a smaller test script to test this. (I noticed the single \ before the D in the variable loc and tried changing that to a double \ still no...
common-pile/stackexchange_filtered
Google analytics in android and campaigns sources in play store I've got a question regarding google analytics in Android and campaigns. I've read all tutorials regarding implementing GA in Android application and I think that I managed to do this correctly, since "something" is showing in GA panels (i.e. that applicat...
common-pile/stackexchange_filtered
Custom Post Types database persistance. Why not? My background is .NET/C#/Laravel e.t.c I am beginning to like very much WP and i started educating myself on using WordPress as a development framework. I tried something very simple. Create an entity and have a basic CRUD on this entity and then show it up in my fronten...
common-pile/stackexchange_filtered
Code style of method chaining within Zend this has previously been asked here (http://framework.zend.com/issues/browse/ZF-11135) with no response from Zend so really it has to come down to popular or majority decision. The reason I am asking is because the company that I work for are increasing in size and having a sta...
common-pile/stackexchange_filtered
Finding the law of X - Y when X and Y are not independent I have the following joint density: $$ f_{X,Y}(x,y) =\frac{2}{(1+x)^3} (0<y<x) $$ I want to find the density of X - Y. Now, I found that $f_X(x) = \frac{1}{x} (0<x<\infty)$ and $ f_Y(y) = \mathbb{1} (0,x)$, so X and Y are not independent. I want to use the foll...
common-pile/stackexchange_filtered
WebRTC screen sharing quality in Chrome I'm using the following RecordRTC demo for recording a video of the user's desktop. When using Firefox, the produced video has correct resolution (in my case, it's 2880x1800). But when using Chrome, the produced video's resolution is only 50% of the original one, meaning 1440x900...
common-pile/stackexchange_filtered
Compile error "already defined" It looks like this: error LNK2005: "unsigned long __cdecl GetModuleBase(void *, class std::basic_string<char,struct std::char_traits<char>, class std::allocator<char> > &)" (?GetModuleBase@@YAKPAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined And c...
common-pile/stackexchange_filtered
plugin:vite:import-analysis Failed to resolve import "../components/x.vue" from "src\router\index.js". Does the file exist? In my Vue JS application, I have the following js inside src/routes index.js import { createRouter, createWebHistory } from "vue-router"; import Dashboard from '../views/Dashboard.vue'; import Cus...
common-pile/stackexchange_filtered
Turning MapsForge project into a navigation app using Graphhopper I am trying to make a basic navigation app from my MapsForge project. It seems there is no MapsForge library for Navigation. I found out that it could be done with Graphhopper but I couldn't find any Jar files of it either. Is there any Graphhopper libr...
common-pile/stackexchange_filtered
When does malloc not call mmap? I'm studying operating systems at university and one of my tasks was find situation when malloc() doesn't cause mmap() system call. I used strace linux utility to trace system calls, but in my situation I saw mmap() syscalls every time when malloc() was used. Is malloc() always call mmap...
common-pile/stackexchange_filtered
popen returns error when executing python script containing logging I have 2 python scripts where 1 is using subprocess to execute the other, see below: main.py import subprocess command = ['python', 'logging_test.py'] proc1 = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc1....
common-pile/stackexchange_filtered
How can you remove a field from a word document? I'm working on a project where the user can insert data into a document using fields, document properties and variables. The user also needs to be able to remove the data from the document. So far, I've managed to remove the document property and variable, but I'm not su...
common-pile/stackexchange_filtered
Static analysis for a specification document (boston housing authority) I want to do a static analysis for a bunch of specification documents. the specification documents are the Boston Housing Authority - "intake and screening", "leased housing" , and "Inspections" (http://www.bostonhousing.org/detpages/deptinfo128.ht...
common-pile/stackexchange_filtered
How to remove what are apparently control characters in notepad++? I have some entries in notepad++ ive never seen before. I have highlighted squares on many lines with SGCI SSA PU1 PU2 MW and SPA within which if copy/pasted here all translate to/become `` I'm looking for a way to remove these from the entries. Googl...
common-pile/stackexchange_filtered
On Windows 11 INTL layout automatially appears every x weeks (randomly) This INTL layout appears suddently from nowhere: And it is not reflected in settings, only my normal layout: So to remove it, I have to add it first using "Add a keyboard" (this costs me a lot of time and concentration because there is no search...
common-pile/stackexchange_filtered
After Image drag and drop make AJAX save to save image and its class I have a page where i am dragging image from one div and dropping it into another div. After drop event user has to click the save button for saving the data in database by making a get request .But after the button is clicked page is refreshed and th...
common-pile/stackexchange_filtered
Windows telnet different local echo behavior When I connect to a web server using telnet on port 80, I need to enable local echo to see what I type. However, when I connect to a POP3 server (port 110) the local echo seems to be enabled by default. Why is that? What is the difference? This may be more of a superuser qu...
common-pile/stackexchange_filtered
illegal access to loading collection error I'm getting the error Illegal access to loading collection when I'm trying to get a list of variants belonging to a certain product. The NHibernate mapping is as below <list name="Variants" lazy="false" cascade="save-update" inverse="false" table="PluginProduct_ProductVarian...
common-pile/stackexchange_filtered
SpriteKit and C file ( not objective_C file ) How do you call Spritekit functions/variables inside a C file ( .h .c ) ? not objective_C file ( .h .m ) Thank you for your help Import your C header file in the bridging file, and call your C code in .swift file as you are doing with Obj-C code. @Whirlwind I think he is ...
common-pile/stackexchange_filtered
Labour-saving vs. Labour-augmenting technical change I've read a number of posts on the above topic but none refers to published empirical papers. Google searches have been hopeless. Does anyone know of any paper on empirical derivation of technical change indices? A lot of papers use these terms interchangibly, there...
common-pile/stackexchange_filtered
Finding family of functions for which $\Delta h = 0$ I have a function $h(x, y) = g(r)$, with $x = r \cos \theta$ and $y = r \sin \theta$. I was able to find a formula for $\Delta h$: $$\Delta h = \frac{\partial^2 g}{\partial r^2} + \frac{1}{r} \frac{\partial g}{\partial r} + \frac{1}{r^2} \frac{\partial^2 g}{\partial ...
common-pile/stackexchange_filtered
How can I solve "Unreachable code" error in my kotlin project? SplashActivity.kt @AndroidEntryPoint @SuppressLint("CustomSplashScreen") class SplashActivity : ComponentActivity() { private val viewModel: SplashScreenViewModel by viewModels() private val tokenManager = TokenManager(this) ...
common-pile/stackexchange_filtered
Getting json on Ajax response callback I am trying to create a little ajax chat system (just for the heck of it) and I am using prototype.js to handle the ajax part. One thing I have read in the help is that if you return json data, the callback function will fill that json data in the second parameter. So in my php fi...
common-pile/stackexchange_filtered
Error when trying to install RVM on my VPS I'm working on deploying my first rails app to my mediatemple(dv) and i'm first trying to install RVM using this command: bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) and I get the following error: curl: (60) SSL certific...
common-pile/stackexchange_filtered
where to find good review resources? I am taking my certification test for secondary mathematics next month and I am extremely overwhelmed by the amount of stuff i need to brush up on. http://www.mttc.nesinc.com/PDFs/MI_field022_SG.pdf that is the review guide containing information on everything we will be tested on...
common-pile/stackexchange_filtered
Extract First Name Middle Name and Last Name Using VBA I Have come close to finding the solution but not completely. I want to separate the first, middle (if it exists) and last names in separate name field. The data & current results: Data FName LName Doe,John John Doe Doe,Joh...
common-pile/stackexchange_filtered
Importing large number of images into Python to convert to Numpy array I am attempting to import a large number of images and convert them into an array to do similarity comparisons between images based on colors at each pixel and shapes contained within the pictures. I'm having trouble importing the data, the followin...
common-pile/stackexchange_filtered
It will displays blank in Session.getEffectiveUser().getEmail(); I am having an issue with App Script. So, I am currently finding a way in Google Sheet that if a user opens the Sheet, there will a pop-up UI that will display the Email they currently logged in. I tried this: function onOpen() { var userEmail = Session.g...
common-pile/stackexchange_filtered
Time zone missing from time series I am in the process of merging two data frames based on date-time, and seem to have run into a snag. The time column in 1 of 2 of the DF's has a timezone stamp: #Example "2012-09-28 08:15:00 MDT" And the other DF time column does not #Example 2 "2012-09-28 08:15:00" In ...
common-pile/stackexchange_filtered
view render - backbone.js How do I make this result in backbone.js result wanted <p><h3>fgfdgdfg</h3></p> var TodoView = Backbone.View.extend({ el:'p', render: function () { $('body').append(this.$el.html("<h3>fgfdgdfg</h3>")); } }); var todoView = new TodoView(); todoView.render(); Use tagNam...
common-pile/stackexchange_filtered
Add/remove row in a table I have the following jquery code to add and remove a row in a table. I have multiple tables on one page. Each row in each table has these two classes: .row-add and .row-delete Now when I click on '.row-add'to add a new row, all the tables are affected, meaning that row is added to all of the t...
common-pile/stackexchange_filtered
Google play android market publish and save buttons have no effect The 'android developer console' publish and save buttons don't do anything In the android developer console at play.google.com/apps/publish, I login and click the "APK Files" tab and upload my updated APK. I have done this successfully 15 times before....
common-pile/stackexchange_filtered
Filter one list depending on selection in another list let's say I have one list with my company's departments and one list with all employees. My list of employees has a lookup field to select the department. Now I want to have one page with a list of all departments and below a list with all the employees. If I selec...
common-pile/stackexchange_filtered
Run NUXT without server How can I run a static NUXT project without a server? That's what I did: I created a new project (without any line of code) with VUETIFY I ran the command npn run generate I went to dist/index.html The project opens but no link is clicked I added the line in nuxt.config.js route: { base: '/...
common-pile/stackexchange_filtered
how do i make my contact form work? The code below acts strange when I click the button on my website. First it opens a new page where the form is again displayed but without any css or js. Then when I refill all the info and click send, it says its submitted but it wont actually sent the email. I have tried to modify ...
common-pile/stackexchange_filtered
How to unbold a section of a \boldmath or \boldsymbol? I have some locally defined commands such as \newcommand{\cosx}[1]{\color{blue}\boldsymbol \cos^{#1} x} and I would like to be able to unbold some part of it. Is there a more elegant way to achieve this than by repeating the commands as in: \newcommand{\cosx}[1]{{...
common-pile/stackexchange_filtered
Vue Router beforeEnter vs beforeEach I am trying to redirect non-logged in user from all pages to /login. I tried beforeEach() but it doesn't fire when user enter site with direct url like /home, /event. Per-Route Guard beforeEnter() works perfectly since it fires once the user lands on that particular page. However, i...
common-pile/stackexchange_filtered
changing time format in pandas I have a dataframe with a column datetime that looks like this 2020-05-03T14:51:31.23625 (I assume %Y-%m-%dT%H:%M:%S) I would like to change it to dd/mm/yyyy hh:mm:ss format. I found this post and I tried something similar (code below) but it works ony for the first row of the dataframe....
common-pile/stackexchange_filtered
How to read a file from a jar file? I have a file in a JAR file. It's 1.txt, for example. How can I access it? My source code is: Double result=0.0; File file = new File("1.txt")); //how get this file from a jar file BufferedReader input = new BufferedReader(new FileReader(file)); String line; while ((line = input.read...
common-pile/stackexchange_filtered
Trying to create a randomly generated test I have already created a GUI for this assignment and now need to figure out how to execute each option. I need to create a test that can use Math.random() to generate equations that end in a whole number, the user can choose from easy, medium, or hard, with each option using ...
common-pile/stackexchange_filtered
How to current location in Android using google Maps? I'm trying to get the user's Location by showing that he is in which area with Particular location in google maps with the help of Android API while surfing in internet I came to know that getLocationManger() is used to view the Location but it shows only by Latitud...
common-pile/stackexchange_filtered
Which type of argument passes a value to a procedure from the calling environment Which type of argument passes a value to a procedure from the calling environment 1.IN 2.IN OUT 3.OUT 4.OUT IN If more than one answer is possible than give the answer. check updated answer check my updated answer and accept it if it an...
common-pile/stackexchange_filtered
Mysql Login issues I have very strange issues I have developed yetiforce crm in local system and migrated to globehost sever . the mysql version is 5.6 in local and hosting server but my login does not work in hosting server what could be the possible reason. Regards Do you expect a list of all 4913 reasons for your...
common-pile/stackexchange_filtered
Mechanism of ring opening of amine combined with formylation What is the mechanism for this reaction? The tertiary amine is converted into an amide and the ring gains a double bond. I can't figure out how the C-O double bond would be formed. Oh, that's the easy part, but can you figure out what happens earlier? That'...
common-pile/stackexchange_filtered
Ignore case in prettyfaces pattern if you defined a url mapping as follows: @URLMapping(id = "myPage", pattern = "/myPage", viewId = "/faces/pages/myPage.xhtml") if you tried to enter the url as: http:localhost:8080/myPage this will work fine, but if you changed the case to: http:localhost:8080/mypage or http:localh...
common-pile/stackexchange_filtered
Angular2 importing component methods into another component I have a home component which needs to call LoginComponent method isLoggedIn() to check if the user is logged in as follows in @CanActivate The home component should activate only if the user is logged in and authenticated HomeComponent.ts import {Component, ...
common-pile/stackexchange_filtered
How do I get the closest date to today with an ISO date format? I have a function that's to read an array of objects and find: if customerAuthorizedTime is null if customerAuthorizedTime **is**null`, then find the one with the closest date to today, the current day. My attempt: My attempt to filter out all objects to...
common-pile/stackexchange_filtered
Fitting a convex polygon into another polygon I am searching for an algorithm where I can check whether a convex polygon (shape 1) fits into another polygon (shape 2). My first research brought me to "Packing irregular shapes". This is in my opinion a little bit overkill. I only have one container and one object. Shap...
common-pile/stackexchange_filtered
Unusal behavior with python list comprehension I have found this and this, but as far as I can understand, I believe that I am not duplicating those questions. While tinkering around to write the shortest code I can write to find the powerset of a set, I came across this behavior: lst = [1,2,3] powerset = set([()]) [p...
common-pile/stackexchange_filtered
Transferring nmap report to excel after running a scan using zenmap (nmap), I ended up with a lot of host reports. Now i have to translate those reports to excel file, so it's easier to read. In the excel file I need to see host ip and open ports. It's my first time doing a job like that, therefore, a step by step guid...
common-pile/stackexchange_filtered
Homogeneous quadratic parts of polynomials in Unbalanced Oil and Vinegar In the book Multivariate Public Key Cryptography, the author describes the polynomials in the cryptographic system Unbalanced Oil and Vinegar in the following way: Define $V=\{1,\dots,v\}$ and $O=\{v+1,\dots,n\}$. The central map is $\mathcal{F}=(...
common-pile/stackexchange_filtered
PERSON 1 Our population genetics model is completely stuck. The likelihood function for this migration pattern takes forever to compute, even with just fifty individuals. PERSON 2 What if we skip calculating the likelihood entirely? I've been reading about methods that generate samples from the posterior without ever ...
sci-datasets/scilogues
why text alignment of formula field and labels changed in print? I use visual studio 2013 and crystal report 13-0-10. alignment of formula field and labels are correct in preview mode, but when I print crystal report file alignment of them change from center to lefttoright. How can I have them center alignment? Best Re...
common-pile/stackexchange_filtered
How to know drive letter from a batch file is launched? I would like to create a DOS/Windows batch file that copy files from a source to the letter drive from which this batch is launched. So, if i run the batch file from G:\ i would like it copy from the source to G:\MyDir. Elsewhere, if i run it from F:\ it must copy...
common-pile/stackexchange_filtered
How to hide keyboard in android I wants to hide keyboard of device. I have try this code but its not working for me, Please Suggest me some other codes. InputMethodManager imm = (InputMethodManager)v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.hideSoftInputFromWindow(v.ge...
common-pile/stackexchange_filtered
Try-with-resources - Does it automatically close the connection? Java I've been working on a SQL utility and I am trying to set the parameters inside a prepared statement in multiple functions. To lessen the code, I have a function that returns a prepared statement where all the params are set. My question is: Does the...
common-pile/stackexchange_filtered
Generate a Uniform Spherical Distribution using rejection methods in Python I've been trying to generate a uniform spherical distribution in Python using uniform random sampling. For some reason my presumed spherical distribution looks more like an ovoid than like a sphere. I am using the fact that a sphere is defined:...
common-pile/stackexchange_filtered
Fight for your life! Try figure out what the answer is by looking at the image below. The answer is nine letters long. The answer is Colosseum because V = Vertical H = Horizontal U = Up D = Down L = Left R = Right Now act out these moves clockwise with the only legal knight moves in chess on the board (sta...
common-pile/stackexchange_filtered
What is the right amount of money supply? As Bitcoin limits the money supply and the total amount of coins in circulation, whereas central banks have a degree of freedom to influence the money supply, I came to wonder what perspectives and constraints exist to determine the right amount of money supply. Could one defin...
common-pile/stackexchange_filtered
Interesting SQL Sorting Issue It's crunch time, deadline for my most recent contract is coming in two days and almost everything is complete and working fine (knock on wood) except for one issue. In one of my stored procedures, I'm needing to return a result set as follows. group_id name -------- -------- A10...
common-pile/stackexchange_filtered
How to make a legend is horizontally Please tell us how to make a horizontal legend. And here are the results: But I want this: I have the following code: <script type="text/javascript"> //$(function () { function getJson() { var result = []; $.ajax({ u...
common-pile/stackexchange_filtered
Superfluid + Super conductivity in a bose condensate so my question is this can we theoretically and empirically find a BOSE condensate, with SUPERFLUID properties but which is also a SUPERCONDUCTING device ? A Bose-Einstein condenstate (BEC) is a purely non-interacting effect, and as such it is not technically a supe...
common-pile/stackexchange_filtered
Download excel file using memory stream in C# I have to return file by creating excel workbook from memory stream. I have used Interop, closed.xml, spire.xls but not founding a way to achieve the same. var stream=clsUploadHelper.GetAttachmentFileStream(string.Empty, Filename); Workbook book=new Workbook(); book.wor...
common-pile/stackexchange_filtered
Replicating SAS DO loop in Oracle PL/SQL I'm trying to replicate a DO loop from SAS into Oracle PL/SQL. Basically, this DO loop iterates over the table and creates multiple rows for a single employee. I'm not extremely familiar with loops in PL/SQL so any help is appreciated. I can't think of any way to recreate this e...
common-pile/stackexchange_filtered