source
list
text
stringlengths
99
98.5k
[ "tex.stackexchange", "0000071315.txt" ]
Q: Vertical alignment in 'tabular' I have a problem with vertically aligning content in a tabular environment: \documentclass{article} \begin{document} \begin{tabular}{ p{2em} p{2em} } test & \begin{tabular}{l} s s s \\ s s s \end{tabular} \\ \end{tabular} \end{document} Which as far as I understand the array ...
[ "stackoverflow", "0048597174.txt" ]
Q: C++: Friend Functions class A { friend void display(); }; friend void display() { cout<<"friend"; } int main() { display(); } Works fine... class A { friend void display() { cout<<"friend"; } }; int main() { display(); } It shows : display is not declared in this scope. Why is it so ? A: In...
[ "pt.stackoverflow", "0000163310.txt" ]
Q: Operadores lógicos em validação de formulário com php Bom dia, Tenho esses campos em um formulário html e estou tentando validá-lo com php. Na minha validação com o php, eu preciso que apenas um dos campos (qualquer um) seja obrigatório. No caso, o usuário precisa preencher pelo menos um dos campos para que possa ...
[ "stackoverflow", "0041910583.txt" ]
Q: Errno 13 Permission denied Python In python, I am currently experimenting with what I can do with open command. I tried to open a file, and got an error message. Here's my code: open(r'C:\Users\****\Desktop\File1') My error message was: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\****\\Desktop\\Fil...
[ "stackoverflow", "0037931671.txt" ]
Q: How to make an XSS-safe browser-based code editor I would like to use a browser based code editor such as Monaco or Ace in my application to allow users to write some code in the browser that will be executed by other users. You can imagine jsfiddle or similar. However, I don't want to open up Cross-Site-Scripti...
[ "stackoverflow", "0051460765.txt" ]
Q: Determine if the name is a Short name, average length name, or a long name I am trying to write an if/else statement as I think that would be my best way. What I need it to do is determine if the name is a Short name, average length name, or a long name. Now with 13 being the average length that would mean I would...
[ "stackoverflow", "0012025220.txt" ]
Q: Ajax call failing for PHP and working fine for ASP.NET I am doing a simple Ajax call which is working in ASP.NET but is failing with some weird DOM Exception when you put a breakpoint inside the onreadystatechange function. What is the extra header magic ASP.NET is doing that PHP is failing to do causing the resp...
[ "stackoverflow", "0043528324.txt" ]
Q: How can I create multiple directories using a loop in python? I want to create 10 directories with a loop and I tried this code: import os pathname = 1 directory = "C:\Directory\Path\Name\\" + str(pathname) while pathname < 11: if not os.path.exists(directory): os.makedirs(directory) pathname += 1...
[ "blender.stackexchange", "0000073581.txt" ]
Q: real multilayer sss in cycles It seems to me that blender cycles is quite limited for doing a real multilayer sss... What I want to achieve is something like that. Here is my bench, a shape with an increasing thickness in renderman, you can define a multilayer sss like this: and you obtain something like this w...
[ "stackoverflow", "0015170330.txt" ]
Q: Save and Retrieve Image file on Windows Phone 8 (using SQL Server Compact) Can anyone give me an example that I can store and retrieve image files on WP8. It seems that SQL Server Compact only supports Byte[] data type? So I have to convert BitmapImage and Byte[] to achieve this purpose? Thanks. A: Using SQL ...
[ "stackoverflow", "0041916495.txt" ]
Q: Webpack.config for v2.2.0 Webpack has changed a lot and dont find a valid Webpack.config that work for v2.2.0. I do want to migrate my Webpack.config from 2.1 to 2.2 I got a lot of errors like this: ERROR in ./src/styles/core.scss Module build failed: ReferenceError: window is not defined So What I need to change...
[ "stackoverflow", "0002858210.txt" ]
Q: CSS Horizontal sub-menu I am working on a horizontal CSS dropdown menu. It is still working nearly fine for IE 7, IE 8 , Firefox and Chrome. But I want to make the top <ul> to be on top level (e.g. z-index: 100). I want this because the top level <ul> has a graphical background and the dropdown is just styled with...
[ "stackoverflow", "0044959384.txt" ]
Q: Form new array from associative arrays I have 3 arrays and looks like this Array1 ( [0] => Array ( [Month] => 'Jan 2015' [Total] => 10 ) [1] => Array ( [Month] => 'Feb 2015' [Total] => 8 ) [2] => Array ( [Month] => 'Mar 2015' [Total] => 10 )...
[ "stackoverflow", "0008755132.txt" ]
Q: MySQL Join Best Practice on Large Data table1_shard1 (1,000,000 rows per shard x 120 shards) id_user hash table2 (100,000 rows) value hash Desired Output: id_user hash value I am trying to find the fastest way to associate id_user with value from the tables above. My current query ran for 30 hours w...
[ "ja.stackoverflow", "0000069396.txt" ]
Q: 拡張機能のiconを指定した箇所に表示されるエラーの意味が分からない 簡単な拡張機能を作成したのですが、iconの指定のところでエラーが表示されます。(下図参照) エラーメッセージは出てますが、拡張機能の説明のところに画像は表示されています。 気にしなければこのままでもいいのですが、なんとなく気になります。 エラーを解消するためにはどうしたらいいのでしょうか。 A: 以下リンク先の Issue が関連しそうです。 Warning in package.json when specifying icon without https repository · Issue #90900 · microsoft/vscode...
[ "superuser", "0000632867.txt" ]
Q: virtual pbx using x-lite stuck at offline I am using x-lite to connect to virtualpbx.net. One of my user's x-lite is stuck at offline and the availability dropdown box is grayed out. I don't see any error messages in x-lite or virtualpbx.net. He can still make outgoing calls. I didn't setup this system and don't k...
[ "es.stackoverflow", "0000030744.txt" ]
Q: Cannot assign "'1'": "Cliente.tipo_cliente" must be a "TipoCliente" instance Estoy tratando de guardar el formulario que hize en django el cual tiene una foreignkey del modelo cliente al modelo tipo de cliente pero al momento de guardar sale este error. Cannot assign "'1'": "Cliente.tipo_cliente" must be a "TipoC...
[ "stackoverflow", "0061648226.txt" ]
Q: Why Does Azure DevOps Server interleave output Sorry in advance, I can't post actual code because of security restrictions at my job, but I'll try to make a contrived example. I am working with python 3.6.1 and running a module in an Azure Pipeline (ADS 2019). In the module we have output done using a dictionary w...
[ "stackoverflow", "0011155417.txt" ]
Q: Child process returns nil for fork call puts "Process #{Process.pid} started" return_value = fork puts "Process #{Process.pid} returned #{return_value}" puts "Process #{Process.pid} exited" Above ruby code printed this output to STDOUT Process 6644 started Process 6644 returned 6645 Process 6644 exited Process 66...
[ "math.stackexchange", "0002594908.txt" ]
Q: Usage of mean value theorem ; bounded derivative and open interval Let $f : (0,1) \to \mathbb{R}$ be a function such that $ |f'(x)| \leq 5 $ on the open interval $(0,1)$. Prove that $\lim_{x \to 1^-} f(x)$ exists. It involves the derivative and the actual function itself, so I think I have to somehow use the mean...
[ "stackoverflow", "0030274298.txt" ]
Q: x-csrf-token validation fails on HttpPost I have to post xml payload to an ODATA service which requires Authentication and x-csrf-token. I have two AsyncTasks. In First one has URLConnection object and fetches x-csrf-token with code below: URL obj = new URL(Util.ODATA_URL + "SO_BEATPSet"); URL...
[ "ux.stackexchange", "0000013904.txt" ]
Q: Hiding empty categories or displaying "nothing in this category" In a shop-like website, we have a horizontal menu in the header where all categories of items in stock are listed (7-9). Depending on availability of items, some categories may be empty. Usually the list of categories changes once in 3-7 days. We ha...
[ "gaming.stackexchange", "0000232680.txt" ]
Q: How do I break blocks with command blocks? I am familiar with the /setblock command, but I'm having trouble whenever I try to replace a block with air. The chat reads in red text, "Cannot place blocks outside of world", though I'm putting in the right coordinates. I can't seem to figure it out, can you help me? Co...
[ "stackoverflow", "0045674814.txt" ]
Q: Progress bar and mapply (input as list) I would like to monitor the progress of my mapply function. The data consists of 2 lists and there is a function with 2 arguments. If I do something similar with a function that takes 1 arguments I can use ldply instead of lapply. (I'd like to rbind.fill the output to a data...
[ "cooking.stackexchange", "0000097226.txt" ]
Q: Is there such a thing as unsteamed rolled oats? Is there such a thing as truly raw (unsteamed) rolled oats? Why are rolled oats usually lightly steamed? A: Rolled uncooked groats will shatter. You can get uncooked, unrolled oats though. Food coops and organic grocery stores/coops have them. $1.49 a pound is a go...
[ "math.stackexchange", "0003596936.txt" ]
Q: quick help with an eigenvalue Hey I'm running short on time and I clearly have some dumb hole in my understanding of finding eigenvalues. There is a question and basically I have to find the eigenvalues of the unforced equation: $ \frac{d^2 y}{dt^2}+2y = 0$. Nice and easy. Except I am converting this thing into a ...
[ "stackoverflow", "0015559821.txt" ]
Q: Using sed to insert text at end of line matching string I have a line in a text file containing a list of items assigned to a variable ... ITEMS="$ITEM1 $ITEM2 $ITEM3" And I would like write a bash script that uses sed to find the line matching ITEMS and append another item to the end of the list within the doubl...
[ "stackoverflow", "0027708935.txt" ]
Q: Searching Post by Origin & Destination locations using Geokit-Rails Ok what i have is a Trucking Load board where Truckers come to post there available Trucks. I have the Trucks posting. But am having issues setting up the search functions and the way i need to associate different tables. Rails 3 postgres gem 'ge...
[ "stackoverflow", "0028957828.txt" ]
Q: Command line filter with protocol ICMP I want to use Wireshark command line (tshark.exe) to capture the icmp traffic. I used this and worked well for src and dst host- C:\Program Files\Wireshark>tshark.exe -f "src or dst host 192.192.1.1" -i 1 -a duration:10 -w C:\temp\mycap.cap This works fine. But what if i jus...
[ "askubuntu", "0001243359.txt" ]
Q: (yet another) No sound in Ubuntu 18.04 Yesterday's behavior: Sound works fine from built-in speakers and from headphones. At one point, I launch a Windows VM and a screensharing Zoom call at the same time; it is too much for my laptop and it crashes. Today's behavior: I turn on my laptop and cannot hear any sound,...
[ "stackoverflow", "0034727945.txt" ]
Q: Have 2 classes as parent selectors at different levels in Less? I need this CSS: .class-1.class-a .target { background: red; } .class-1.class-b .target { background: blue; } I've got this working fine with this Less .target { .class-1.class-a & { background: red; } .class-1.class-b & { backgr...
[ "stackoverflow", "0003448383.txt" ]
Q: Best way to start with smalltalk in a windows environment (win 7) I am a c# developer and most of my friends are much smarter than me, and they laugh at me and start to swear at me in smalltalk. I want to learn this so that I might better be insulted at their insults... and maybe learn a thing or two in the proces...
[ "stackoverflow", "0008510547.txt" ]
Q: C++, reading letters from a file I have the following code, but it only reads lowercase letters. Ideally, it would read both upper and lower case letters and then store this info in an array. Any help or suggestions would be welcome. Cheers. A: There are several problems with the code above but to answer your...
[ "stackoverflow", "0054922836.txt" ]
Q: unable to display result through foreach loop I have array its name is $img_arr and it shows following records. I want to display images with its relevant ids. so I have the following array. but unable to implement it. Array( [0] 1 [1] 2 [2] 3 [3] 4 ) Array( [0] adsense-approval.png [1] feedback.jpg [2] logo1.jpg...
[ "stackoverflow", "0060454026.txt" ]
Q: How to Make docker compose status running,currently it stops after docker-compose up I am trying to make my docker-compose status up and running by trying below docker-compose yaml, but seems when I execute docker-compose ps , I see the container is stopped, how do I make my docker-compose up and running for infin...
[ "cs.stackexchange", "0000023721.txt" ]
Q: Why is TIME(n log (log n)) \ TIME(n) = ∅? In my computation book by Sipser, he says that since every language that can be decided in time $o(n \log n)$ is regular, then that can be used to show $TIME(n \log (\log n))\setminus TIME(n)$ must be the empty set. Can anyone show me why this is? both $TIME(n\log(\log n))...
[ "stackoverflow", "0001927042.txt" ]
Q: StringIndexOutOfBoundsException: String index out of range: 0 I am getting a weird exception code. The code that I am trying to use is as follows: do { //blah blah actions. System.out.print("\nEnter another rental (y/n): "); another = Keyboard.nextLine(); } while (Character.toUpperCase(another.cha...
[ "math.stackexchange", "0001950585.txt" ]
Q: Prove that if the sum of $n$ positive real numbers $x_1 + x_2 + ... + x_n \le 0.5$, then $(1-x_1)(1-x_2)*...*(1-x_n) \ge 0.5$. So, I know this could be written as $x_1 + x_2 + ... + x_n \le 0.5 \le (1-x_1)(1-x_2)*...*(1-x_n)$. And that the larger $x_1 + x_2 + ... + x_n$ is, the smaller $(1-x_1)(1-x_2)*...*(1-x_n)$...
[ "stackoverflow", "0041990550.txt" ]
Q: how to test function in spark let's say I have a spark rdd and need to process it. rdd.mapPartitionsWithIndex{(index, iter)=> def someFunc(){} def anotherFunc(){} val x = someFunc(iter) val y = anotherFunc(index, iter, x) x zip y } I define the someFunc and anotherFunc inside the mapParititions because...
[ "stackoverflow", "0038210229.txt" ]
Q: How to continue to get response data from REST API even if http status code is not 200? I'm using retrofit 2.0.2 and okhttp3 to build my app. My server set http status code to 418 if server code has any logic error. like password doesn't match. response data is {"statuscode":500}. 500 means password doesn't match...
[ "stackoverflow", "0039965863.txt" ]
Q: Validate form being submitted using javascript so this might be something super simple to do, but I can't seem to get it. I have a form and a validation for it. The validation text works. If I use a normal submit button the form works correctly, but if I use javascript to submit the form, it does not work 100%. <f...
[ "stackoverflow", "0055557494.txt" ]
Q: Use pgcrypto to verify passwords generated by password_hash I have password hashes stored in a Postgresql database generated with: password_hash($password, PASSWORD_DEFAULT); Now I would like to also be able to verify a user password with Postgresql and pgcrypto. But pgcrypto's crypt() function is not able to veri...
[ "stackoverflow", "0043011548.txt" ]
Q: in autohotkey not all send tabs are working i was trying to make a .ahk to macro a gif making, uploading, and url coping but it often times ignores keystrokes like send, {tab down}{tab up} which compleatly breaks the macro. also send, ^L isnt working when i send it in the middle of the string ^q:: Run, firefox.exe...
[ "french.stackexchange", "0000032866.txt" ]
Q: Est-ce que l'expression "sur papier libre" signifie qu'il faut que le document soit manuscrit ? Je dois joindre une lettre à un dossier destiné au Ministère de la Justice. Il est écrit que cette "requête personnelle sur papier libre adressée au ministre de la justice [...] doit être datée et signée". J'ai du mal à...
[ "es.stackoverflow", "0000145613.txt" ]
Q: No se visualiza el caracter ñ en pantalla Estoy usando ASCII, pero ese es el resultado. ejecutado en codeblocks 17.12 printf("\nAhora ingrese su contrase%a: ", 164); A: De tu pregunta parece deducirse que esperabas que el % fuera sustituido por un carácter, cuyo código sería el 164 que le pasas como parámetro ...
[ "gaming.stackexchange", "0000014959.txt" ]
Q: Definition of a baneling bust I heard day9 mention a baneling bust. What is a baneling bust? A: A "Baneling bust" is when you use a lot of Banelings to breach the enemy's "front door" - the bunch of buildings used at the ramp of the main base to block or hinder the enemy from entering. Since Banelings do so much...
[ "stackoverflow", "0048291776.txt" ]
Q: How to parse date-time with two or three milliseconds digits in java? Here is my method to parse String into LocalDateTime. public static String formatDate(final String date) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SS"); LocalDateTime formatDateTime = Lo...
[ "stackoverflow", "0004356943.txt" ]
Q: local properties file for buildr the buildr docs suggest using profiles.yaml for managing settings. however, i would like a way to define settings which an individual dev would use to run locally and thus shouldn't be in scm. is there a preferred way of doing this? A: Your solution looks good. Using buildr's _ ...
[ "stackoverflow", "0000727975.txt" ]
Q: jQuery hover() not working with absolutely positioned elements and animation I have some html that looks like this: <a href="#" class="move"><span class="text">add</span><span class="icon-arrow"></span></a> And I have a jquery event registered on the anchor tag: $('a.move').hover( function (event) { $...
[ "physics.stackexchange", "0000150841.txt" ]
Q: Introducing cut-off in a renormalisation procedure for quantum mechanics I've been reading a paper on renormalisation theory as applied to a simple one-particle Coulombic system with a short-range potential. In the process of renormalisation, the authors introduce an ultraviolet cutoff into the Coulomb potential t...
[ "stackoverflow", "0036740220.txt" ]
Q: JRXML - Eliminating repeated header on the bottom We've got a problem when printing some PDF reports using JasperReports. These reports are basically a breakdown of all the sales made to a specific client over the course of the years. We take information from a DB, transform it using Java, and print the reports in...
[ "stackoverflow", "0020084147.txt" ]
Q: c++ inheritance and shared / non shared functions Thank you in advance for your help. Here's my problem : I've got sub-class (x, y, z) included in a class (A). Some functions are shared (declared in A) and other not (declared in the subclass). All the objects are stored in one map map<string,A>Groups. Then, I wan...
[ "stackoverflow", "0027348605.txt" ]
Q: How can I create a if-else loop with two optional conditions I want my code to be basically like this: If (something OR something else) { Do magical things; } else { cry me a river; } How can I do it so there are two optional conditions, meaning both do not need to be true (just one) in order for t...
[ "stackoverflow", "0063191886.txt" ]
Q: xUnit InlineData unexpected result I've got the following class I'm trying to unit test (example class): using System; public class Checker { public bool Check<T>(T valueA, T valueB) { if (typeof(T) != typeof(string)) throw new NotSupportedException(); return true; ...
[ "stackoverflow", "0052070215.txt" ]
Q: UWP: Binding ListView ItemTemplate MenuFlyOut events to ViewModel I have an existing UWP app to manage passwords for websites and accounts but when I wrote it about 3 years ago I did not know MVVM very well and so all the event handlers are in the View's code behind and now I'm trying to resolve this and make it m...
[ "rpg.stackexchange", "0000125625.txt" ]
Q: Can you still Target Allies with a spell if you have the Status Spell in effect and are blinded? I was wondering if you could target an ally while being blinded if you had the Status spell on them. Status When you need to keep track of comrades who may get separated, status allows you to mentally monitor their re...
[ "stackoverflow", "0002689327.txt" ]
Q: How could I pass the float number by value in Objective-C? In the following code, I passed the "1.3f" to printFloat, but it was the wrong value (in this case, -2.000000) after was "f" received. And there is a warning that "AppDelegate may not respond to -printFloat:" Where did I get it wrong? - (void)applicationDi...
[ "stackoverflow", "0012344499.txt" ]
Q: Filter data by month I've a source data which contains the data in month as below: Oct 2011 Nov 2011 Dec 2011 Jan 2012 Feb 2012 I need to select all the months that invoice falls on to. The invoice has properties below: Invoice.StartDate=13-10-2011; Invoice.EndDate=11-01-2012; sourceData.Where(x => x.SourceDate....
[ "stackoverflow", "0037258508.txt" ]
Q: Unexpected T vs &T as type parameter in Rust I'm genericising a Graph that I wrote. Current signature is #[derive(Debug)] pub struct Graph<T: Clone + Hash + Eq> { nodes: HashMap<T, Node<T>>, edges: HashMap<T, Vec<Edge<T>>> } #[derive(PartialEq, Debug)] pub struct Node<T: Clone + Hash + Eq> { pub id: ...
[ "stackoverflow", "0050995292.txt" ]
Q: React Duplicated Name but different fields React Application I fetch JSON data from an API part of react-select: import Select from "react-select"; import fetch from "isomorphic-fetch"; return fetch(`some API localhost`) .then(response => response.json()) .then(json => { return { options: json }; }) Now o...
[ "stackoverflow", "0008536883.txt" ]
Q: Lambda expression compare boolean as false results in NotSupportedException I can't seem to figure out how to compare boolean values in a C# lambda expression for EF4. I've tried: cl.Where(c => c.Received == false); and this: cl.Where(c => !c.Received); and this: cl.Where(c => c.Received.Equals(false)); but I k...
[ "stackoverflow", "0044622885.txt" ]
Q: How to read xml file in stored procedure and insert it in table in sql server Hi i have the Following XML file.how do i read it and insert the data in a table using a stored procedure <NewDataSet> <Root RowNumber=1; answer = 1; TAnswer=null/> <Root RowNumber=2; answer = 6; TAnswer=yes for Q 2/> <Root RowNumber=3;...
[ "stackoverflow", "0054112965.txt" ]
Q: Enforcing that all columns have different values A particular val# should be in no more than one column. Multiple columns can be empty though. (I don't want to use NULL instead of empty.) CREATE TYPE vals AS ENUM ('val1', 'val2', 'val3', 'val4', 'val5', ... 'empty'); CREATE TABLE some_table ( ... column1 vals NO...
[ "stackoverflow", "0008993754.txt" ]
Q: How to update a M2M field in django via AJAX call I am building a user profile in django, where I want the user to enter his skill set. The skill field is a ManyToMany field to a model name Skills. Below is shown the models.py file class UserProfile(models.Model): name = models.CharField(max_length = 300, nul...
[ "stackoverflow", "0006896205.txt" ]
Q: Why should I not check bin and obj folders in, in SVN This seems to be very basic question but I'm eager to know the answer. I'm using Subversion (SVN) for source control and I've been checking in all the files, but the client asked me to create a rule in SVN to avoid checking in the bin and obj folders. Why shoul...
[ "stackoverflow", "0015759630.txt" ]
Q: qbxml quickbooks item customfield filter Is there a way to produce an XML request to get only one item and its information by filtering one of custom fields? For example, I have a "barcode" custom field and I want to get an item by its barcode number. A: Answer: No. You cannot filter by custom fields
[ "stackoverflow", "0035813893.txt" ]
Q: Issue with up and downvote system with AngularJS I am trying to set up a simple up and down vote system for campaings: JSON: This is my simplified JSON string. It contains the campaign and all its up- and downvotes. { "Campaign": { "id": "106", "code": "ENDUS15-2RX2Y", ...
[ "stackoverflow", "0001225256.txt" ]
Q: Getting Allen Bauer's TMulticastEvent working I've been mucking around with Allen Bauer's code for a generic multicast event dispatcher (see his blog posts about it here). He gives just enough code to make me want to use it, and unfortunately he hasn't posted the full source. I had a bash at getting it to work, bu...
[ "stackoverflow", "0045361564.txt" ]
Q: Random Aframe environment I want to have random scenarios every time I enter the website. So I'm trying to return the pickscenario variable from the js script to aframe in this line <a-entity environment="preset: pickscenario"></a-entity> Here's the code: <a-entity environment="preset: pickscenario"></a-entity> ...
[ "stackoverflow", "0037564261.txt" ]
Q: Single NSFetchRequest for parent and child objects I have a list of data with parent-child hierarchy up to three levels. For example ItemA (Grandparent) ItemB1 (Parent) ItemC1 (Child) ItemC2 (Child) ItemC3 (Child) ItemB2 (Parent) ItemC4 (Child) ... All of the items are located in a single NSArrayController ...
[ "stackoverflow", "0041552421.txt" ]
Q: EXCEPTION: Cannot read property 'addInstrumentToStage' of undefined I have an angular2 app with typescript, and i am using ng2-dragula. Here is the constructor: constructor( private dragulaService: DragulaService, private audioFinderService:AudioFinderService) {} and then ngOnInit(): public ngOnIni...
[ "stackoverflow", "0057824123.txt" ]
Q: How do gColab have an access to a gDrive directory (not a file) I would like to have an access to a gDrive directory from gColab notebook. I already found a solution to read a file but not a directory. Indeed, for my application (transfert learning with PascalVOC07 images database), I have a code which need to bro...
[ "electronics.stackexchange", "0000187835.txt" ]
Q: Induction motor electrical and mechanical angle How do we reach the relation between mechanical angle(\$\theta m\$) and electrical angle(\$\theta e\$) as: \$\theta e = (P/2)\theta m\$ ? ; where P is the number of poles. A: In a multipolar electrical machine (motor or generator), relationship between the mechanic...
[ "stackoverflow", "0057912461.txt" ]
Q: Kotlin code - how does FlatMap work here? The following is code from a LeetCode solution. This is the description: Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i] is even, i is...
[ "stackoverflow", "0039274333.txt" ]
Q: Extract one column as rows with R, preserving other columns What I have: I have a data frame that looks like this: sequence foo model output real 1 3 a 12 12 1 3 b 29 12 1 3 c 10 12 1 3 d 38 12 1 3 e 10 12 2 3 ...
[ "stackoverflow", "0003169193.txt" ]
Q: Oracle query on String I want to perform my query on a string in this format, xxxx/xxxx where x is a number. when I perform it using the Oracle interface or my C# application I get this error: ORA-00904: "xxxx/xxxx": invalid identifier I performed this query: SELECT * FROM "My Table" WHERE Field="xxxx/xxxx" A: ...
[ "bicycles.stackexchange", "0000008497.txt" ]
Q: Are fixed or floating SPD-SL cleats most suitable for a long commute? After much procrastination, I've finally jumped in and bought myself a road bike, under the cycle2work scheme we have here in the UK. I opted for a Boardman Road Race, as it seems to be the most affordable entry level road racer. Since my commut...
[ "stackoverflow", "0022124870.txt" ]
Q: How does git log work across branches? I'm using a github repository and it has a master branch and a demo branch. All was good and both the master version and the demo version of the code are in use (master on a staging site, and the demo on a demo site). A live site runs on a tagged commit. While making changes,...
[ "stackoverflow", "0019803577.txt" ]
Q: Is this "echo" necessary? i've recently acquired a copy of Programming PHP, 3rd edtion, and on page 10 i saw an "echo" that brought me doubt. <html> <head> <title>Personalized Greeting Form</title> </head> <body> <?php if (!empty($_POST['name'])) { echo "Greetings, {$_POST['name']}, and welcome."; ...
[ "math.stackexchange", "0000417249.txt" ]
Q: Interpretation of the variational principle for the Ritz approximation, solid Mechanics Below $U$ and $V$ are recpectively the internal and external energy components of a given structural element: $$U+V=W$$ Expressing $U$ in terms of the strains $\varepsilon$ and the material consitutive matrix $F$: $$\frac12\int...
[ "puzzling.stackexchange", "0000074890.txt" ]
Q: Sudoku false positive (wrong move) I'm new to Sudoku puzzles. I tried solving the one above but my last move was flagged as a wrong move(highlighted red). I believe it is a false positive since the $6$(highlighted red) I inserted is unique on the rows and columns as well as within the small square. Can someone ju...
[ "stackoverflow", "0061133376.txt" ]
Q: Batch scripting for loop with setting variables of particular string of the file I am having a struggle with loop using "for" and to set the variable for later action. So briefly explaining about a situation I am facing, I have files named "HI_001_1813414.nii.gz" & "HI_001_1813414_T1.nii.gz" , and I want to set ...
[ "stackoverflow", "0010096219.txt" ]
Q: Android in Eclipse, Merge / Include nested XML non-layout resources I have an XML index in the res/xml/ folder, and I would like it to include other xml files, so that when I parse R.xml.index, all the files are merged into a single resource. I tried to adapt the include layout trick to xml parsing, so my index.xm...
[ "stackoverflow", "0009610237.txt" ]
Q: Looking for speedups for A* search I've got the following working A* code in C#: static bool AStar( IGraphNode start, Func<IGraphNode, bool> check, out List<IGraphNode> path) { // Closed list. Hashset because O(1). var closed = new HashSet<IGraphNode>(); // Binary heap which accepts...
[ "electronics.stackexchange", "0000517777.txt" ]
Q: Can I use this op amp to scale 0-3.3V to 0-5v? I recently came in to a voltage meter 0-5v. I want to use it with esp8266 as a humidity display for my weather information station. the exp8266 model I'm using (wemos/nodMCU) is 3.3V, I can use PWM to set the needle, but it won't use the full range of the meter. I nee...
[ "stackoverflow", "0048834990.txt" ]
Q: Tomcat restart option in Intellij Is there is button or short-cut to restart tomcat in Intellij ? There is restart tomcat option in Eclipse which is useful. I tried searching it online but couldn't get any. A: Ctrl + F10 will show you following window. If you choose "restart server" and "Don't ask again" you don...
[ "stackoverflow", "0038553930.txt" ]
Q: iOS10 NotificationService Extension The method: didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler:(UNNotificationContent) -> Void) of iOS 10's NotificationService TARGET is not triggered automatically by iOS, even if the payload of my remote notification contains the attribute: "muta...
[ "stackoverflow", "0051215200.txt" ]
Q: How to load parquet file into Snowflake database? Is it possible to load parquet file directly into a snowflake? If yes - how? Thanks. A: Yes it is possible, and best done via S3. Note, the following assumes you have a MY_PARQUET_LOADER table, a STAGE_SCHEMA schema and an S3STAGE defined, and that your parquet f...
[ "rus.stackexchange", "0000443606.txt" ]
Q: Какой он, гоблин? Кого могут назвать гоблином и насколько это слово распространено в живой речи и в литературе? И какой он, гоблин? Просто уродливый или имеющий определенную внешность? Или у него плохой характер и поэтому он неприятен окружающим? А может быть, это синоним слова урод? Хотя уродом у нас назовут и ...
[ "stackoverflow", "0042724580.txt" ]
Q: Navigation drawer is not closing even after closeDrawers() I am creating a app with navigation drawer which is used to navigate through activities. Here's my code or drawer private void initInstances() { getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabl...
[ "stackoverflow", "0032792286.txt" ]
Q: How to draw without replacement to fill in data set I am generating a data set where I first want to randomly draw a number for each observation from a discrete distribution, fill in var1 with these numbers. Next, I want to draw another number from the distribution for each row, but the catch is that the number in...
[ "stackoverflow", "0001086159.txt" ]
Q: Trace listener - creating memory overflow I am using tracelistener in a multithreaded application to log message remotely, but the appllication creates memory overflow. For testing I created 10,000 threads, and tried to log messages using TraceData function. Does .Net framework create an object for every call to ...
[ "mathoverflow", "0000272698.txt" ]
Q: What are the points of simple algebraic groups over extensions of $\mathbb{F}_1$? The "field with one element" $\mathbb{F}_1$ is, of course, a very speculative object. Nevertheless, some things about it seem to be generally agreed, even if the theory underpinning them is not; in particular: $\mathbb{F}_1$ seems ...
[ "tex.stackexchange", "0000020123.txt" ]
Q: Why is the ledmac line number misaligned with the final item? Here's a minimal document showing the problem: \documentclass{article} \usepackage{ledmac} \begin{document} \firstlinenum{1} \linenumincrement{1} \beginnumbering \pstart \begin{itemize} \item This item aligns with the line number... \item ... but the...
[ "stackoverflow", "0049640631.txt" ]
Q: react native margin between keyboard and input how can i put margin between input and keyboard? So that i can see the border Bottom. And how i can change the color of the blink element in input field? This is wrong Keyboard hidden A: It's all in the react-native docs: Keyboard issue: https://facebook.github.io/...
[ "stackoverflow", "0046148167.txt" ]
Q: Spark Scala CSV Input to Nested Json This is how my input data looks like, 20170101,2024270,1000,1000,1000,1000,1000,1000,1000,2000,2000 20170101,2024333,1000,1000,1000,1000,1000,1000,1000,2000,2000 20170101,2023709,1000,1000,1000,1000,1000,1000,1000,2000,2000 20170201,1234709,1000,1000,1000,1000,1000,1000,1000,20...
[ "stackoverflow", "0048242528.txt" ]
Q: Delay in the Finally block after try block completion I am trying to run the below concurrency code: import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; public class TestThread { public static void main(final String[] arguments) throws Inter...
[ "stackoverflow", "0012918243.txt" ]
Q: .NET SDK will it work with VB I am somewhat new to .NET I have a quick question. Amazon web services has .NET SDK mentions that it has a C# code examples. I just want to confirm, will the SDK work if the language used is VB? Thank you. Edit: The unanimous answer seems to be yes, but I am not sure how to do it. Whe...
[ "stackoverflow", "0037963542.txt" ]
Q: Excel HYPERLINK function doesn't work I've got a spreadsheet that includes Google Map links, but the links don't work. They're generated with this function: =HYPERLINK("http://www.google.com/maps/place/" & F19 & "," & F20) ...where F19 and F20 contain lat and long coordinates in +/- format. It appears to work fin...
[ "stackoverflow", "0012001053.txt" ]
Q: How to concatenate 2 strings when the first is defined in a preprocessor directive and the second is constant in C++? Here's what I have: #define STRING "string 1" string string2 = STRING + "string3"; This is wrong. What is the solution? Is the problem that string2 must be constant or what else, and why? A: #d...