text
stringlengths
181
35.5k
meta
dict
Q: MongoDB & MySQL relationships in jenssegers/laravel-mongodb Let's begin with some plain code. I have two following models. First is using MySQL: class Phrase extends \Eloquent { public function positions() { return $this->hasMany('Position'); } public function getIdAttribute($id) { ...
{ "pile_set_name": "StackExchange" }
Q: Removing a character from within a vector element I have a vector of strings: str.vect<-c ("abcR.1", "abcL.1", "abcR.2", "abcL.2") str.vect [1] "abcR.1" "abcL.1" "abcR.2" "abcL.2" How can I remove the third character from the right in each vector element? Here is the desired result: "abc.1" "abc.1" "abc.2" ...
{ "pile_set_name": "StackExchange" }
Q: Sample settings.xml required Can somebody provide me link to a sample settings.xml? My problem is that I have eclipse maven plugin. This eclipse is one which I have copied from somewhere and the plugin came with it. Now the settings.xml isn't created as usual in .m2 folder. So I need a sample settings.xml so that ...
{ "pile_set_name": "StackExchange" }
Q: std::vector without exceptions: warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc I am trying to insert a moveable, non-copyable object into std::vector. I reduced the original code to this example: #include <vector> class MovingClass { public: MovingClass(const int v...
{ "pile_set_name": "StackExchange" }
Q: Redirecting documents folder for windows 7 I have a GPO set to redirect the Documents folder to the H: drive of our students. It works, but conditionally. If the student already has My Pictures, My Videos, and/or My Music folders already in existence within their H: drive, then Documents will not redirect as it ...
{ "pile_set_name": "StackExchange" }
Q: problem in configuring clang static analzer i follow the following steps to install and configure clang static analyser.but still i could not run scan-build command in project directory can anyone can give correct tutorial to set path and also run scan-build command.terminal shows "scan-build command not found" th...
{ "pile_set_name": "StackExchange" }
Q: Can web robots inflate download counts? I have a PHP program connected to an MYSQL database on a website. Upon clicking a link to download a file, the program reads an integer field from the database, increments it, then puts the number back, to count the number of downloads. That program works. The download cou...
{ "pile_set_name": "StackExchange" }
Q: How can I use SSO to login to my Ubuntu machine instead of Local User Management Instead of maintaining local user accounts, I would like to be able to use Ubuntu SSO (Ubuntu One) accounts to authenticate the logins to my Ubuntu machine. Any chance? A: The topic was mooted at the Ubuntu Developer Summit in late ...
{ "pile_set_name": "StackExchange" }
Q: How to extract text in php using regex My Text : 12a49803-713c-4204-a8e6-248e554a352d_ Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: base64 DQrn0Ocg0dPH5MkgyszR6sjqySDl5iDH5OfoyuXq5A0KDQrH5OTaySDH5NnRyOrJIOXP2ejlySAx MDAlDQogCQkgCSAgIAkJICA= --_12a49803-713c-4204-a8e6-248e554a352d_ Cont...
{ "pile_set_name": "StackExchange" }
Q: I just downloaded Ruby 2.0.0 using RubyInstaller, but Ruby -v still says I'm running 1.9.3. What am I doing wrong? I just downloaded Ruby 2.0.0 using RubyInstaller, but Ruby -v still says I'm running 1.9.3. What am I doing wrong? I am running Windows 7 (which I know is not ideal, but is what I'm currently stuck wi...
{ "pile_set_name": "StackExchange" }
Q: What's the term for using the wrong word because it sounds the same? I was reading about various terms for incorrect words, but they didn't seem to fit. I saw a post where someone said "what do you like to do when you're board?". That kind of thing. Also, would that be considered a mistake in grammar? I didn't...
{ "pile_set_name": "StackExchange" }
Q: Searching multiple repeating patterns of text using regular exressions I am trying to search for texts from a document, which have repeating portions and occur multiple times in the document. However, using the regex.match, it shows only the first match from the document and not others. The patterns which I want t...
{ "pile_set_name": "StackExchange" }
Q: Discover multiple jwplayers on a page I need to write some javascript code which will loop through all jwplayers available on a page. The jwplayer api has a function selectPlayer(): var player = jwplayer.api.selectPlayer(); But this only returns the first player on the page. I can't see a way to find them all? A...
{ "pile_set_name": "StackExchange" }
Q: ASPX Jquery 1.11 $(Document).ready(function() {} was skipped I'm a freshman to Jquery, and I tried to load this when the html was opened, but ready() was not called. <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="Script/jquery-1.11.1.js"></script> <s...
{ "pile_set_name": "StackExchange" }
Q: Xterm: working with multiple tabs I am used to working with multiple tabs in gnome. Opening a new tab can be done easily with Ctrl+Shift+T as well as switching between tabs (Left Alt+tab number). What are the Xterm equivalents? A: You need to use an external tool called a terminal multiplexer such as GNU screen/...
{ "pile_set_name": "StackExchange" }
Q: Helper Devise: could not find the `Warden::Proxy` instance on request environment I try to use Devise for my Rails app. I can sign up and login but when I go to my other page "build" I get the following error: Devise::MissingWarden in Home#show Devise could not find the Warden::Proxy instance on your request en...
{ "pile_set_name": "StackExchange" }
Q: PHP/mySQL - Select WHERE multiple values in an associative array $skuArray = array(00240=>123,00241=>456); $getSkus = mysql_query("SELECT sku FROM data WHERE sku IN($skuArray)"); My above code doesn't work, how can I make it SELECT all sku's FROM data WHERE sku = any of the key names in $skuArray? (00240 and 0024...
{ "pile_set_name": "StackExchange" }
Q: How to escape Chinese Unicode characters in URL? I have Chinese users of my PHP web application who enter products into our system. The information the’re entering is for example a product title and price. We would like to use the product title to generate a nice URL slug for those product. Seems like we cannot ju...
{ "pile_set_name": "StackExchange" }
Q: How to create two LinearLayout with equal width programmatically? I'm trying to create two LinearLayout with equal width programmatically: mGroupLayout.setOrientation(HORIZONTAL); mGroupLayout.setWeightSum(2f); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( 0, LinearLayout.Layo...
{ "pile_set_name": "StackExchange" }
Q: Post a image on facebook using Javascript api error 324 requires upload file FB.login(function(response) { if (response.authResponse) { FB.api('/me/photos', 'post', { ...
{ "pile_set_name": "StackExchange" }
Q: Make a struts action do nothing Is there a way to make a struts action do nothing? I don't want to do anything after my action is performed. Every single action in the project I inherited (794 of them) are redirectAction. But I don't want to redirect. I just want to stay on the same page. What can I do to just sta...
{ "pile_set_name": "StackExchange" }
Q: Objective-C: Help needed to understand why two methods react differently when accessing a UIView in two different ways I feel bad asking three questions in the space of two days but I am stuck and searching the forum I couldn't find the answer so I hope someone can help me - all part of the fun of learning I suppo...
{ "pile_set_name": "StackExchange" }
Q: Executing scripts with Powershell via C# I need to execute the following script: Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize I tried a few solutions with Powershell and Command classes, but they doesn't work. Error that I received: Value parameters cannot be null. A: I think this will do wh...
{ "pile_set_name": "StackExchange" }
Q: Nginx Conditional Dynamic Proxy I have a game running on my server. When a user requests it, a new process on my server is started and starts to listen for a websocket connection on a random port in the range 8001-8100. On the client i want to connect to the game. var port = 8044; // <- Client is given this number...
{ "pile_set_name": "StackExchange" }
Q: Difference between -XX:+UseParallelGC and -XX:+UseParNewGC They are algorithms for the young generation garbage collection. The second one (UseParNewGC) gets activated automatically with the concurrent tenured generation garbage collection (see Java Concurrent and Parallel GC) but, is there a difference between t...
{ "pile_set_name": "StackExchange" }
Q: Multiple optional checks with Where query (to specify file search options) I created checkboxes, where a user can set this for file searching: exclude system files: on/off exclude hidden files: on/off exclude read_only files: on/off now I don't know, how I can use this three different boolean statements with thi...
{ "pile_set_name": "StackExchange" }
Q: Why does the entity framework need an ICollection for lazy loading? I want to write a rich domain class such as public class Product { public IEnumerable<Photo> Photos {get; private set;} public void AddPhoto(){...} public void RemovePhoto(){...} } But the entity framework (V4 code first...
{ "pile_set_name": "StackExchange" }
Q: num_rows() always returns 0 when using prepared statements I've tried looking at every one else's stack overflow with exact error in title, but I still can't figure this out. I'm using http://andrew-greig.net/portfolio/better_mysqli.htm for mysqli extend because it does make binding items as arrays much easier. I...
{ "pile_set_name": "StackExchange" }
Q: An intuitive proof for one of the fundamental property of a parallelogram "The sum of the squares of the diagonals is equal to the sum of the squares of the four sides of a parallelogram." I find this property very useful while solving different problems on Quadrilaterals & Polygon,so I am very inquisitive abo...
{ "pile_set_name": "StackExchange" }
Q: Problems with su: Authentication Failure I am currently using Ubuntu and am 100% new to Unix. I have installed Ubuntu to program in C and will be using the "Learn C the Hard Way" online textbook (http://c.learncodethehardway.org/book/ex0.html). I attempted the section in the textbook meant for setting up your comp...
{ "pile_set_name": "StackExchange" }
Q: What is the default scope of worksheets and cells and range? When you just type worksheets() what is the default scope ActiveWorkbook or ThisWorkbook? For those who do not know these distinctions they are extremely important especially in Excel 2013 when you want macros to run when you switch to different workbook...
{ "pile_set_name": "StackExchange" }
Q: Calculating sum of two columns with individual rows and result store in another column USing ruby on rails I am new to Ruby on rails platform, I have a question i.e., In my module i have table called Asset_classification in which name, type, availability, integerity, level are the fields. i want to calculate(sum) ...
{ "pile_set_name": "StackExchange" }
Q: Efficiently average the second column by intervals defined by the first column There are two numeric columns in a data file. I need to calculate the average of the second column by intervals (such as 100) of the first column. I can program this task in R, but my R code is really slow for a relatively large data fi...
{ "pile_set_name": "StackExchange" }
Q: difference of property in interface and class interface IVehicle { int Id { get; set; } string Name { get; set; } void Print(); } class Car : IVehicle { public int Id { get; set; } public string Name { get; set; } public void Print() { Console.WriteLine($"Id {Id} ...
{ "pile_set_name": "StackExchange" }
Q: Iterate from "0" to "ZZZZZ" I was given an assignment, it was as follows: Give a JS code snippet which writes to the console from: "0" to "ZZZZZ" all the combination of the characters of a-z, 0-9 and A-Z. Is my solution correct? I am sure there are better ways to achieve the same, can anybody show some? My code i...
{ "pile_set_name": "StackExchange" }
Q: logback error while server startup The following is my logback file <?xml version="1.0" encoding="UTF-8"?> <!-- For assistance related to logback-translator or configuration --> <!-- files in general, please contact the logback user mailing list --> <!-- at http://www.qos.ch/mailman/listinfo/logback-user --> <!--...
{ "pile_set_name": "StackExchange" }
Q: hybris - Product Update API I am trying to update Product information in hybris through REST Webservice API. http://localhost:9001/ws410/rest/catalogs/powertoolsProductCatalog/catalogversions/Online/products/2116275 I understand that we need to give the ProductDTO in the body of the PUT request. Please can someon...
{ "pile_set_name": "StackExchange" }
Q: Gtk3 Python Widget Background Image I'm using Python 3.4 with Gtk 3.18. I've been able to figure out how to implement a background image via CSS for a widget (a Gtk.Box in my case). However, I want to be able to dynamically change that background image to one that the user specifies. How can that be done? The p...
{ "pile_set_name": "StackExchange" }
Q: Retrieve data from several Raspberry Pi disk images I have about 40 Raspberry Pi SD-Card backups, dating back several years, with different projects, some of which I barely remember. As they are clogging up my harddrive (400+ GB), I would like to reduce them to a minimum. The files were mostly created with Win32 ...
{ "pile_set_name": "StackExchange" }
Q: Ubuntu Desktop 14 on PowerEdge doesn't boot on RAID I have a Dell 1U PowerEdge 1950, and for some reason, we cannot install Ubuntu 14.04 64bit Desktop edition on it. I know what you're thinking... why are you installing desktop? I have asked the same question myself over and over again! The individual that will be...
{ "pile_set_name": "StackExchange" }
Q: Could not load file or assembly 'System.Data.Entity I am working within a Solution (a jokes website). The Solution has 2 Projects: Model (C# Class Library) MVC 3 Empty Application I am trying to get my view to list the Jokes in the Database, but I get the following error: Could not load file or assembly 'Syste...
{ "pile_set_name": "StackExchange" }
Q: What is the difference between "raise" and "rise"? What is the difference between raise and rise? When and how should I use each one? A: "Raise" when used as a verb is transitive: it requires that you have a direct object, a noun of some kind that you are applying the verb to. For example, "I must raise an obj...
{ "pile_set_name": "StackExchange" }
Q: Haskell can't :load a File in ghci: changeWorkingDirectory: does not exist I'm in a ghci session trying to load a Main.hs file I've been working on. It looks like I'm in the right directory in that I can see the file: ghci λ> :cd /home/username/codeplace ghci λ> :! ls lib.hs Main.hs But I ...
{ "pile_set_name": "StackExchange" }
Q: Extensions of maximally complete fields Recall that an immediate extension of a (rank 1, non-archimedean) valued field $(K,v)$ is another valued field $(F,w)$ extending $K$, such that $w|_K = v$, and such that $F$ and $K$ have the same residue fields and value groups. We say $K$ is maximally complete if its only i...
{ "pile_set_name": "StackExchange" }
Q: MD5 checksum from input stream I'm trying to get the md5 sum of an input stream but the string I get is encrypted incorrectly. The md5 string I'm getting is: ä?E´]Õaá*TàŠöJ When it should be: e48f0b45b45dd56102e12a54e08af64a Can you spot what I'm doing wrong? Here is a working program: import java.io.File; import ...
{ "pile_set_name": "StackExchange" }
Q: SQLite query error with MATCH I'm using the following query to perform a search in SQLite. public MatrixCursor listViewCursor(String query) { open(); Cursor dcursor = null; MatrixCursor cursor = new MatrixCursor(listviewColumns); Object[] listviewarray = null; String[] selectionArgs = new Strin...
{ "pile_set_name": "StackExchange" }
Q: Problemas de conexão com o banco de dados Mysql Estou tentando criar um sistema para faculdade, porém estou com um erro ao tentar conectar com Mysql, estou utilizando PHP e Xampp. Erro: Fatal error: Call to undefined function mysqli_conect() in C:\xampp\htdocs\Cursos\Testes\conecta.php on line 2 Já tentei alg...
{ "pile_set_name": "StackExchange" }
Q: Uploading a File to SharePoint Online using Microsoft Graph API I'm really new to Microsoft Graph API, I created a script using powershell to get reports from Microsoft 365 and it is being saved on my drive (c:\temp\reports.xlsx). After it is being saved i wish to upload it to SharePoint online. On reading the doc...
{ "pile_set_name": "StackExchange" }
Q: How to change the font size in ListView in JavaFX? I tried this suggestion http://forums.sun.com/thread.jspa?threadID=5421037 but style cannot be found. Is there any other way? Lots of thanks, cancelledout A: It depends on the version of JavaFX, I will suppose it is about 1.3. By default, ListView shows the res...
{ "pile_set_name": "StackExchange" }
Q: Counting sentences, only sentences ending with punctuation + 2 spaces I'm trying to figure out how to make a sentence counter, which I have, but the thing is, I need it to count a sentence ONLY when two spaces come after the period/question mark/etc. For example, with the code I have, if you enter the string "hel...
{ "pile_set_name": "StackExchange" }
Q: MVVM ListBox controlling a Content Control I've been going round in circles with this for a couple of days, and I'm hoping a WPF guru can see where I'm going wrong. I'm setting CurrentViewModel in code. The Selected item of my ListBox and the Content of my ContentControl bind correctly. But when changing the sele...
{ "pile_set_name": "StackExchange" }
Q: GCD, order of execution? Assume we have one UIVewcontroller, call it A, in the viewdidload of that VC we add to it two UIViewcontrollers( B,C ). now to make the UI smooth in the Viewdidload of A we do some GCD work dispatch_queue_t queue = dispatch_queue_create("CustomQueue", NULL); dispatch_async(queue, ^{ ...
{ "pile_set_name": "StackExchange" }
Q: How can i insert timestamp with timezone in postgresql with prepared statement? I am trying to insert to a timestamp with timezone field of my DB a string which includes date, time and timezone using prepared statement. The problem is that Timestamp.valueof function does not take into consideration the time zone t...
{ "pile_set_name": "StackExchange" }
Q: Is having a loop in C++ constructor a good Idea? I was writing code for my homework. So as I finished one of my classes I ran into a question. Is having a loop to assign values to array a good idea? This is my class. I was thinking of making either loop in the constructor or create a function which would assign va...
{ "pile_set_name": "StackExchange" }
Q: How many vectors from the matrix are linearly independent? I have the matrix: $$ \begin{pmatrix} 3 & 2 & -1 & 4 \\ 1 & 0 & 2 & 3 \\ -2 & -2 & 3 & -1 \\ \end{pmatrix} $$ I have 2 questions to answer: Consider the columns of the matrix as vectors in $R^3$. How many of these vectors are linearl...
{ "pile_set_name": "StackExchange" }
Q: How to re-enable RightClick only for specific tag/id I'm using this code: document.oncontextmenu = (function() { var counter = 0; return function() { counter++; if (counter == 3) { $("<div id='r-click'></div>").appendTo("#container").html("<span>!!! Protected content !!!</span>").fa...
{ "pile_set_name": "StackExchange" }
Q: Ordered lists in django i have very simple problem. I need to create model, that represent element of ordered list. This model can be implemented like this: class Item(models.Model): data = models.TextField() order = models.IntegerField() or like this: class Item(models.Model): data = models.TextField...
{ "pile_set_name": "StackExchange" }
Q: Including external Header files in programs Being using Windows for most of the time and deciding to start programing in ubuntu,I would like to know how I can include the external header file in my programs.Do I download them manually and paste them into the folder wheres the file?Please be kind... A: If you hav...
{ "pile_set_name": "StackExchange" }
Q: How to know when you have a file open in vi while using the shell? When I am editting a file in vi or vim, I frequently will be editting the file, and then I need to open a shell to execute a shell command. So, I go to the shell by doing :sh. This brings me to the shell. Now, when I want to return to the file I'...
{ "pile_set_name": "StackExchange" }
Q: Legacy apps requiring administrator privileges on XP I have a legacy Windows 95 app that needs to be run as an Administrator. This is used by students in a school domain. My predecessor set up a domain administrator account for this purpose and a "Run As.." batch script to start the program, but this still requ...
{ "pile_set_name": "StackExchange" }
Q: 3D моделирование в C#, накладывание одного объекта на другой, с чего начать Пример для понимания моей цели: полотенце падает на чайник -> полотенце лежит на чайнике С помощью чего это возможно реализовать, и чем удобней? wpf, opengl, unity... В интернете немало библиотек для реализации 3d, но какая подходит для об...
{ "pile_set_name": "StackExchange" }
Q: SQL Server Alternative to reseeding identity column I am currently working on a phone directory application. For this application I get a flat file (csv) from corporate SAP that is updated daily that I use to update an sql database twice a day using a windows service. Additionally, users can add themselves to the ...
{ "pile_set_name": "StackExchange" }
Q: java swing hold both mouse buttons I want to implement a method where the user needs to hold the left and right mouse buttons at the same time. I'm using Swing and Java 1.7. I've tried this, but it doesn't detect the both-buttons case like I'd expect it to: public void mousePressed(MouseEvent e) { if (Sw...
{ "pile_set_name": "StackExchange" }
Q: sql count of multiple tables possible inner join I have a Table called Jobs and 02 other tables (places and times) that connect to Jobs by the JobID. So, based on the tables below, I need the following in SQL server: Jobs (JobID,Company) 123 ABC 456 DEF 789 GHI PLACES (Country,JobID) BR 12...
{ "pile_set_name": "StackExchange" }
Q: How can I restore file in master branch I was coding on branch called feature/restful-api, and I want to checkout the files in master branch, so I did git checkout master and changed to master branch. When I wanted to change back, git told me that error: The following untracked working tree files would be overwrit...
{ "pile_set_name": "StackExchange" }
Q: SQL Server Session State, web farm, and counting the sessions I have 2 load balanced web servers. My application is using the SQL Server Session State database on SQL Server 2008. The 2 web servers are identical in terms of IIS configuration, and if I understand correctly, the two web apps on the two servers will...
{ "pile_set_name": "StackExchange" }
Q: Transposition of state space form of a transfer function How can I transpose the output of state space model in Mathematica? trying the following code would transpose the top right symbol s instead of the matrices. Transpose @ StateSpaceModel @ TransferFunctionModel[{{a^2/(s^2 + b s + c)}}, s] A: I am not sure w...
{ "pile_set_name": "StackExchange" }
Q: jooq-3.2.0 and db2 database Can I use jooq-3.2.0 to work with db2 database, if yes which driver i have to use while generating entity classes from existing schema. I tried to use org.jooq.util.db2.DB2Database, but generator throws exception. Here is stacktrace: java.lang.ClassNotFoundException: org.jooq.util.db2.D...
{ "pile_set_name": "StackExchange" }
Q: How to mark outbound FTP traffic with iptables? i have a user called "testuser" in my debian system and i want to mark the FTP traffic going from testuser's account how can i do that? i use following commands to mark all the outgoing traffic for "testuser" iptables -t mangle -N HTB_OUT iptables -t mangle -I POSTRO...
{ "pile_set_name": "StackExchange" }
Q: Fiberglass batts: how to cover the exposed paper? I need to install fiberglass batts under my (raised) house. I have read that the paper should generally face the warm side, so it depends on where one lives. I live in South Louisiana, so I plan to place the batts with the paper facing outside. But there are clear ...
{ "pile_set_name": "StackExchange" }
Q: How to update 2 tables in mysql? I would like to update two tables called: routing and routing_has_work_center In routing table, user can edit the description while in routing_has_work_center table, user can edit the production_hour. <?php session_start(); // include a php file that contains the common database co...
{ "pile_set_name": "StackExchange" }
Q: Iterate over regions and take mean pixel value in OpenCV? So Im basically trying to divide up a gray scale image (in this case 32x32) by resizing the initial image. Once the "regions" are divided up, I need to take the mean pixel value of each one and then add to a string a 1, 0, or X. For example: "Region (3, 19...
{ "pile_set_name": "StackExchange" }
Q: How to make the path a variable in react-router? Like I have /a/Star/video I want to make the video a variable, star is already a param. How to do it? I need to know is, When video is provided, I need to render one component and when it is not provided, I want to render another component? A: You can use nested...
{ "pile_set_name": "StackExchange" }
Q: In Lucene, what is the accepted way to return an approximate result count without impacting performance? I want my users' search results to include some idea of how many matches there were for a given search query. However, after a bit of research and observation of my users' search logs, I've noticed a direct cor...
{ "pile_set_name": "StackExchange" }
Q: CSV formatted data off website not being properly parsed My Python script opens a file through urllib2; the data looks like this: "Charitable Donation: Contribution","012","","","","","","","","","","","","","","","","","","","","" The Python script: reader = csv.reader(data, delimiter=',', quotechar='"', quoting...
{ "pile_set_name": "StackExchange" }
Q: Combinational System Theoretical Question I'm currently taking an MIT-OCW course, where it says that a system built from smaller combinational systems following the following compositional rules is combinational: Each component of the system must itself be a combinational device. Each input of each component must...
{ "pile_set_name": "StackExchange" }
Q: AngularJS: prepend "http://" to ng-model I have an input for url. I would like to automatically prepend "http://" to the user value, if it does not already exist. I would like to avoid using $watch because there are about 30 such inputs in a single controller... How should I approach this? A: I would say with a ...
{ "pile_set_name": "StackExchange" }
Q: Adding foreign key field to a javabean Consider this regular javabean without ORM/: // primary key is auto incremented by the database, so I can't add it public class User { String name; int personID; // foreign key // no args constructor // getter/setters for fields } Is it ok to do this? I perso...
{ "pile_set_name": "StackExchange" }
Q: selecting the same data in different row from database i need to select the 'name' attributes must same value with 'seek' attribute. is kind like a match making concept which i need to select the 'name' attribute = 'seek' attribute in same table so the outcome will be name | seek HEADPHONE | KETTLE KETTL...
{ "pile_set_name": "StackExchange" }
Q: How do I know why my Azure instance doesn't start? I deployed my service package into Windows Azure. Management Portal has been showing "waiting for the role instance to start" for 30 minutes already so I assume something is wrong. I know that there's Azure Diagnostics, but is there some easier way to find what's ...
{ "pile_set_name": "StackExchange" }
Q: React function isn't behaving as its expected to Heres a function from my react app: handleSubmit(evt) { evt.preventDefault(); this.setState({ width: "", height: "", color: "" }); console.log(this.state) }; In my input, I set the value of input to the width, height and color. this handleSubmit...
{ "pile_set_name": "StackExchange" }
Q: How can I remove a bootstrap buttons hover effect? I've gotten an assignment to remove the hover effect of the following button: Visit http://www.appsbayou.se, search for the text "Kontaktinformation". Above it there's a button, "Skicka" which has an ugly black hover effect. This style comes from existing css. I'm...
{ "pile_set_name": "StackExchange" }
Q: Hide `"ok glass"` menu when enable contextual voice commands Do you know if it is possible to hide "ok glass" bottom text when enable contextual voice commands? Thanks all! A: The same question is answered here : how to hide ok glass label from google glass voice menu For now in the XE 19.1, Contextual Voice Com...
{ "pile_set_name": "StackExchange" }
Q: Grabbing just the content of a line I have a simple question: I want to just grab the content of a line from a file x. My file x looks like this: PointXY [387.93852, 200.0] PointXY [200.0, 387.93852] PointXY [200.0, 387.93852] PointXY [200.0, 353.20889] PointXY [387.93852, 200.0] PointXY [200.0, 387.93852] PointXY...
{ "pile_set_name": "StackExchange" }
Q: How to avoid duplication of code related to shared entities in the repository pattern? I'm building a repository for a large CRM schema that has a high number of relations between entities. Some of the entities are referenced by almost all entities, e.g. Person and Company. Where I have an aggregate root such as O...
{ "pile_set_name": "StackExchange" }
Q: Dynamic environment variable in .htaccess I'm struggling to figure out how to get environment variables to work using SetEnvIf based off my scenario, and was wondering if somebody can tell me how to do it, or give an example. My outcome is that I need the following redirect to fire based off the environment vars, ...
{ "pile_set_name": "StackExchange" }
Q: Is a function that calls itself only once no matter the input recursive? Consider a function that does an operation and calls itself at most once (not more than one “recursion” level) no matter what the input is. Is this function considered recursive? Example: join1 :: [Maybe a] -> [a] join1 [Just x] = [x] join1...
{ "pile_set_name": "StackExchange" }
Q: Horizontal OptionGroup in a Table (Vaadin) I' tryind to add an OptionGroup to my table, but so far the table stays empty no matter what I do. Here is what I've tried so far: table = new Table(); table.setSizeFull(); table.addContainerProperty("Name", String.class, null); table.addContainerProperty(...
{ "pile_set_name": "StackExchange" }
Q: Which surfaces admit hyperbolic metrics bounded by geodesic arcs? Consider a compact oriented surface of genus $g$ with $k$ boundary components, ordered from $1$ to $k$. Next remove $n_i\geq 0$ points from the $i$-th boundary component, for $i=1,...,k.$ For which sequences $(g,n_1,...,n_k)$, the above surface admi...
{ "pile_set_name": "StackExchange" }
Q: How to paginate array My code : <?php $array = json_decode('{ "friends": { "data": [ { "id": "1000002470615", "gender": "female" }, { "id": "1000005198891", "gender": "female" }, { "id": "1000007859390", "gender": "female" }, { "id": "1000008308250", "gender": "female" }, { "id": "1000009416380", "gender": "m...
{ "pile_set_name": "StackExchange" }
Q: Where are the Rust (aka rust-lang) packages for Ubuntu? I'd like to play with the Rust language on Ubuntu, but there don't seem to be any packages. Did I miss it or is there some problem? A: On ubuntu 16.04 you can use official apt package without install any other ppa repository. sudo apt install rustc ... and...
{ "pile_set_name": "StackExchange" }
Q: How to calculate the time interval between two time strings I have two times, a start and a stop time, in the format of 10:33:26 (HH:MM:SS). I need the difference between the two times. I've been looking through documentation for Python and searching online and I would imagine it would have something to do with ...
{ "pile_set_name": "StackExchange" }
Q: java how to pass a List for generic element in it I want to create a Util to handle any possible type in a List, so I write this code: class Util{ static class Data<T>{ String message; T raw; boolean report; Data(String m, T d, boolean b){ message=m; raw=d; report=b;} } interface Callb...
{ "pile_set_name": "StackExchange" }
Q: Xamarin Forms Microcharts generating "OutOfMemoryError" I am trying to use a Microcharts graph in my application, which is using Xamarin.Forms (targeting Android, iOS and UWP). I have tried following several tutorials to get a chart to display but each time it results in the error: Unhandled Exception: Java.L...
{ "pile_set_name": "StackExchange" }
Q: Insert entry in WinEdt 8.1 How can I create a Insert menu entry for a new environment I created. For example, one can insert a figure by going to Insert > Objects > Figure. Of course, custom environments can be gotten by going to Insert > Environments > New Environment but I would like one that I can activate via ...
{ "pile_set_name": "StackExchange" }
Q: Is there any trigger to know if an attachment from an item in a list is downloaded? So I'm planning to make a sharepoint list system (with microsoft flow). There's this case, if someone downloaded an attachment from an item, there's this status column that'll change text to "File downloaded". Is there any way in ...
{ "pile_set_name": "StackExchange" }
Q: Equal Comparisons Order of Sentence Troubles I am currently learning comparisons in which each item being compared is equal. When using a sentence with tan/tanto/a/os/as, I am having trouble knowing the correct order of each sentence: A text book section asks a question and wants the answer to be no. ?Tiene la Pl...
{ "pile_set_name": "StackExchange" }
Q: Which converges faster, mean or median? If I draw i.i.d. variables from N(0,1), will the mean or the median converge faster? How much faster? To be more specific, let $x_1, x_2, \ldots $ be a sequence of i.i.d. variables drawn from N(0,1). Define $\bar{x}_n = \frac{1}{n}\sum_{i=1}^n x_i$, and $\tilde{x}_n$ to be...
{ "pile_set_name": "StackExchange" }
Q: Is there a simpler, more abstract proof of the Cayley-Hamilton theorem for matrices? The Cayley-Hamilton theorem is equivalent to: Let $R$ be a ring and let $M_n(R)$ be $n\times n$ matrices over $R$. Then the minimal polynomial of $A \in M_n(R)$ over $R$ divides the characteristic polynomial of $A$. For instance....
{ "pile_set_name": "StackExchange" }
Q: Searching by views Searching is hard to completely understand using SharePoint 2013. Is there a way to restrict search results to come from a certain view in document library? It is possible to build a query? I am thinking that I can restrict by Tag to make this happen, but I am not sure. Is it possible to produce...
{ "pile_set_name": "StackExchange" }