qid
int64
1
74.7M
question
stringlengths
0
70k
date
stringlengths
10
10
metadata
list
response
stringlengths
0
115k
13,869,060
I have the following code that is trying to remove some JSESSIONID cookies from my browser. ``` String[] cookieList = "/App1/,/App2/,/App3/".split(","); for (int i = 0; i < cookieList.length; i++) { String cookiePathString = cookieList[i]; response.setContentType("text/html"); Cookie cookieToKill = ne...
2012/12/13
[ "https://Stackoverflow.com/questions/13869060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408524/" ]
Cookie is completely messed up. The best practices for a server: 1. use Set-Cookie, not Set-Cookie2. 2. if there are multiple cookies, use a separate Set-Cookie header for each cookie. 3. use Expires, not Max-Age. 4. use the date format: `Sun, 06 Nov 1994 08:49:37 GMT` For example: ``` Set-Cookie: JSESSIONID=NO_DAT...
62,853
Also, if there is truth behind Republican support to make voting more restrictive for people in general, how long ago might this party have started advocating legislation with more restrictions? Why --- Listening to the video on [this post](https://www.cnn.com/2021/03/02/politics/supreme-court-brnovich-v-dnc-case-ana...
2021/03/03
[ "https://politics.stackexchange.com/questions/62853", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7229/" ]
Speaking nationally, Democrats currently have a 6%-7% advantage over Republicans in terms of voter representation. In fact, Democrats have a lead among every demographic group except *white males without a college education*. However, Democratic voters tend to be clustered in urban and suburban areas, which attenuates ...
19,585,979
I'm using ant to package a JavaFX-based application. No problem with doing the actual JavaFX stuff, except that `fx:jar` doesn't support the `if` or `condition` tags. I want to dynamically include some platform-specific libraries, depending on a variable i set. Currently I have this: ``` <fx:fileset dir="/my/classes/f...
2013/10/25
[ "https://Stackoverflow.com/questions/19585979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568355/" ]
Many readers of this forum expect to see *some* code that you tried.... ``` program flow version 8 // will work on almost all Stata in current use gettoken what garbage : 0 if "`what'" == "" | "`garbage'" != "" | !inlist("`what'", "e", "i") { di as err "syntax is flow e or flow i" exit...
1,362,991
Let $\sum a\_n=a$ with terms non-negative. Let $ s\_n$ the n-nth partial sum. Prove $\sum na\_n$ converge if $\sum (a-s\_n)$ converge
2015/07/16
[ "https://math.stackexchange.com/questions/1362991", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254420/" ]
$$ \begin{align} \sum\_{k=1}^nka\_k &=\sum\_{k=1}^n\sum\_{j=1}^ka\_k\\ &=\sum\_{j=1}^n\sum\_{k=j}^na\_k\\ &=\sum\_{j=1}^n(s\_n-s\_{j-1}) \end{align} $$ Taking limits, we get by [Monotone Convergence](https://en.wikipedia.org/wiki/Monotone_convergence_theorem) that $$ \begin{align} \sum\_{k=1}^\infty ka\_k &=\sum\_{j=1}...
7,530,329
I am using jQuery and jQuery UI and i am trying to read a checkbox state through the addition of the "aria-pressed" property that jQuery UI Button toggle between false and true. ``` $('.slideButton').live('click', function() { alert($(this).attr('aria-pressed')); }); ``` This code however seems to read the aria-pr...
2011/09/23
[ "https://Stackoverflow.com/questions/7530329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961325/" ]
Can't you add a listener to the actual checkbox behind the label or span? ``` $("#days_list li div div div input[type='checkbox']").change(function(){ alert("Someone just clicked checkbox with id"+$(this).attr("id")); }); ``` This should work since, once you click the label, you change the value in the checkbox...
7,420,940
I have a vbscript that runs on the command line in xp. It accepts one argument for the path to a directory. Is there a simple way to prompt the user in the command line box for this? If not, I can just echo what was passed in to show the user what they actually typed in case of typos. Thanks, James Aftermath: Here...
2011/09/14
[ "https://Stackoverflow.com/questions/7420940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/543572/" ]
You can use the [`WScript.StdIn`](http://msdn.microsoft.com/en-us/library/1y8934a7%28v=VS.85%29.aspx) property to read from the the standard input. If you want to supply the path when invoking the script, you can pass the path as a parameter. You'll find it in the [`WScript.Arguments`](http://msdn.microsoft.com/en-us/l...
19,946,041
I recently discovered this script: [JS fiddle text swapper](http://jsfiddle.net/PMKDG/) - but I'd like to add a nice fade in and fade out. I guess this is a 2 part question. 1. Can I add fadeIn the way this is structured? 2. I'm guessing I'll also need a FadeOut? Help would be greatly appreciated! Thanks ``` $(fun...
2013/11/13
[ "https://Stackoverflow.com/questions/19946041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1572316/" ]
Try ``` $("#news-h3-change").fadeOut(function(){ $(this).text(txt) }).fadeIn(); ``` Demo: [Fiddle](http://jsfiddle.net/arunpjohny/93WG6/) I might suggest to use `data-*` to make it little more nice, like ``` <ul id="iso"> <li data-txt="ALLE NEWS">all-iso</li> <li data-txt="DATUM">date-iso</...
51,249,250
I'm trying to edit this code to be dynamic as I'm going to schedule it to run. Normally I would input the date in the where statement as 'YYYY-MM-DD' and so to make it dynamic I changed it to DATE(). I'm not erroring out, but I'm also not pulling data. I just need help with format and my google searching isn't helping....
2018/07/09
[ "https://Stackoverflow.com/questions/51249250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7257430/" ]
Try command ``` ionic cordova build android --prod --release ```
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I would say that it is a result of time reversal symmetry. If you consider the projectile at the apex of its trajectory then all that changes under time reversal is the direction of the horizontal component of motion. This means that the trajectory of the particle to get to that point and its trajectory after that poin...
22,594,048
How do I apply css styles to HTML tags within a class at once instead of repeating the class name each time. ``` .container h1,.container p,.container a,.container ol,.container ul,.container li, .container fieldset,.container form,.container label,.container legend, .container table { some css rules here } ``` ho...
2014/03/23
[ "https://Stackoverflow.com/questions/22594048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1106398/" ]
Use [LESS](http://lesscss.org/). It would come out looking like this. ``` .container { h1, p, a, ol, ul, li, fieldset, form, label, legend, table { your styles here } } ``` Otherwise, you're SOL. Sorry.
3,766,138
Is there a way to call a function inside a loaded SWF file? Basically, I have a .swf file (A) that loads another .swf file (B)...I would just like to treat B as if it was any other instance added to my class .swf "A"... --- Have to recast "Loader" with the name of your .swf file class: Loaded .swf class: ``` packa...
2010/09/22
[ "https://Stackoverflow.com/questions/3766138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/147915/" ]
In Adobe Flex, you can use the flash.display.Loader class to load another SWF, and add an event listener to it. This example is taken from the Adobe Documentation: ``` var url:String = "http://www.helpexamples.com/flash/images/image2.jpg"; var urlRequest:URLRequest = new URLRequest(url); var loader:Loader = new Loade...
31,234,459
I am trying to get the latitude and longitude values from a JSON array - `$response`, returned from Google, from their Geocoding services. The JSON array is returned as such (random address): ``` { "results":[ { "address_components":[ { "long_name":"57", "sh...
2015/07/05
[ "https://Stackoverflow.com/questions/31234459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` var_dump(json_decode($response)->results[0]->geometry->location->lat); ```
19,125
How can I implement a hook in my template file that will change the label of a field for the "group" content type from "author" to "created by"? ![screenshot of author field](https://i.stack.imgur.com/jDhMv.png)
2012/01/08
[ "https://drupal.stackexchange.com/questions/19125", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/3846/" ]
To rename the label of a field add the preprocess function [template\_preprocess\_node](http://api.drupal.org/api/drupal/modules--node--node.module/function/template_preprocess_node/7) to your *template.php* file: ``` function *YOUR THEME*_preprocess_node(&$vars){ //Supposing that your content type name is "group" ...
52,679,318
I have a class Application with EmbeddedId and second column in embbbedID is forgein key and having many to one relationship with offer. ``` @Entity public class Application implements Serializable{ private Integer id; @EmbeddedId private MyKey mykey; private String resume; @Enumerated(EnumType.STRING) @NotNull...
2018/10/06
[ "https://Stackoverflow.com/questions/52679318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9498745/" ]
Your methode name is wrong, the right one is `findAllByMykey_Offer` or `findAllByMykeyOffer`, as your field is named mykey. As mentionned in the documentation <https://docs.spring.io/spring-data/jpa/docs/2.1.0.RELEASE/reference/html/> using `List<Application> findAllByMykey_Offer(String jobTitle);` is better than `Lis...
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
**Steps you can follow**: - * First you need to have a `List<String>` that will store all your names. Declare it like this: - ``` List<String> nameList = new ArrayList<String>(); ``` * Now, you have all the records fetched and stored in `ResultSet`. So I assume that you can iterate over `ResultSet` and get each `val...
31,674
Keccak/SHA-3 is new NIST standard for cryptographic hash functions. However, it is much slower than BLAKE2 in software implementations. Does Keccak have compensating advantages?
2016/01/04
[ "https://crypto.stackexchange.com/questions/31674", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/29901/" ]
(Disclosure: I'm one of the authors of BLAKE2, but not BLAKE.) Here are the [slides from a presentation](https://blake2.net/acns/slides.html) I gave at Applied Cryptography and Network Security 2013 about this. (Note: the performance numbers in those slides are obsolete — BLAKE2 is even faster now than it was then.) ...
39,788,564
I want for the click on the item menu, this item will change the icon. Selector for the item: button\_add\_to\_wishlist.xml ``` <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="false" android:drawable="@drawable/ic_add_fav" /> <item android:state_checked=...
2016/09/30
[ "https://Stackoverflow.com/questions/39788564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6640003/" ]
There is no command to tell Amazon S3 to archive a specific object to Amazon Glacier. Instead, [Lifecycle Rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) are used to identify objects. The [Lifecycle Configuration Elements](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecyc...
618,373
I'm unable to get the following table to have even row heights with vertical alignment ``` \renewcommand\tabularxcolumn[1]{m{#1}} ... \begin{table} \renewcommand*{\arraystretch}{1} \begin{tabularx}{\textwidth}{X X} \toprule \textbf{Route} & \textbf{Funzione} \\ \midrule \l...
2021/10/09
[ "https://tex.stackexchange.com/questions/618373", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/166526/" ]
By use of the `tabularray` package this is relative simple to accomplish: ``` \documentclass{article} \usepackage[skip=1ex]{caption} \usepackage{tabularray} \begin{document} \begin{table} \begin{tblr}{hline{1,Z}=1pt, hline{2}=0.8pt, hline{3-Y}=solid, colspec = {@{} Q[m, font=\ttfamily] X[m,j] @{}}, ...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
Default value for `cause` is null. And for `message` it is either `cause.toString()` or null: ``` val e1 = new RuntimeException() e.getCause // res1: java.lang.Throwable = null e.getMessage //res2: java.lang.String = null val cause = new RuntimeException("cause msg") val e2 = new RuntimeException(cause) e.getMessa...
1,451,306
Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) 1. One simple hellowi...
2009/09/20
[ "https://Stackoverflow.com/questions/1451306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161179/" ]
If I create a new project using Visual Studio it #defines the following preprocessor symbols using compiler command-line options: * `WIN32` * `_WINDOWS` * one of either `_DEBUG` or `NDEBUG` * `UNICODE` and `_UNICODE` (although the Windows headers and libraries also support non-Unicode-enabled applications, if your com...
6,875,109
First of all: I want to use Java EE not Spring! I have some self defined annotations which are acting as interceptor bindings. I use the annotations on my methods like this: ```java @Logged @Secured @RequestParsed @ResultHandled public void doSomething() { // ... } ``` For some methods I want to use a single of t...
2011/07/29
[ "https://Stackoverflow.com/questions/6875109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/868859/" ]
The `position: absolute;` and the `right:-100px;` is pushing your element past the right edge of the viewport. Floating does not affect absolutely positioned elements. If you want the element to be `100px` away from the edge, make that a positive `100px`. Or, if you want it right up against the edge, make it `0`. If y...
20,883,696
I'm using Sitecore Webforms For Marketers in a multi-language environment (e.g. .com, .be, .nl en .de). There are 3 servers: 2 Content Delivery Servers (CDS) en 1 Content Management Server (CMS). On the CDS servers is no possibility to write data, so i have configured a webservice to forward the form data from the CDS ...
2014/01/02
[ "https://Stackoverflow.com/questions/20883696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3129164/" ]
Similar question was asked [here](https://stackoverflow.com/questions/20800966/how-to-get-the-sitecore-current-site-object-inside-custom-save-action-wffm) and answered by [@TwentyGotoTen](https://stackoverflow.com/users/2124993/twentygototen). The place where you need to get the current site is different than in linked...
22,069,390
My Flash plugin just won't work for Firefox on Linux Mint. I am running Linux Mint 14 Nadia 64bit. * Downloaded firefox-27.0.1.tar.bz2 * Extracted it * Ran ./firefox it works fine * Downloaded install\_flash\_player\_11\_linux.x86\_64.tar.gz * Extracted it * Copied the plugin: **cp libflashplayer.so /home/gary/.mozil...
2014/02/27
[ "https://Stackoverflow.com/questions/22069390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2818846/" ]
Rather than delay initialising the whole page it would be better to allow it all to be initialised, then initialise just the new code. In jQm v1.3.2 and earlier you could do this by adding the following code to your success callback. ``` $('#newsDescription table').trigger('create'); ``` This will allow the whole pa...
51,786
I got excited about Calc's power as an embedded mode. Define some variables in natural inline notation and then do operations on them. But the execution seems a bit messy: you got a separate key bindings when you're in CalcEmbed mode and mistakes are easy to make. Can the mode be tamed so that the following org-mode...
2019/07/23
[ "https://emacs.stackexchange.com/questions/51786", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/318/" ]
Maybe not a single keystroke but you could *activate* embedded mode via `C-x * a` and then (while point is in, say, the first expression) *update* all calc expressions with `C-x * u`. I use embedded mode all the time and it's one of the most understated features of Emacs!
28,640,427
I have table in mysqli database now i want to get 1 result random This is code mysql ``` $cid = $_GET['id']; $ans = $db->query("select * from result where cat_id='$cid' limit 1"); $rowans = $ans->fetch_object(); echo" <h4>".$rowans->title."</h4><br> <img src='".$rowans->img."' style='width:400px;height:300;' /> <p>...
2015/02/21
[ "https://Stackoverflow.com/questions/28640427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
SQL: ``` SELECT * FROM result ORDER BY rand() LIMIT 1 ```
7,674,955
I am developing an asp.net application where i have a dataset having 3 tables i.e. `ds.Tables[0], Tables[1] and Tables[2]` I need to find minimum number and maximum number out of all the 3 tables of dataset. How to do that? I found similar question in SO [here](https://stackoverflow.com/questions/2442525/how-to-selec...
2011/10/06
[ "https://Stackoverflow.com/questions/7674955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/224636/" ]
Do it on `IOrganisation`(and have `IPeople` as the return type). Something like this: ``` interface IOrganisation { IList<IPeople> GetPeople(); } ``` This is because the people of an organisation is a property of the organisation, not of the people.
34,399,423
I've got some problems with my Connection string. Seached the web for some mistakes but didn't got any further. Is there something changed between SQL Server versions? ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> </configSections> <connectionStrings> <add name="Beurs...
2015/12/21
[ "https://Stackoverflow.com/questions/34399423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159130/" ]
There are at least two reasons why this issue (`Client Error: Remaining data too small for BSON object`) appears: **1. PHP MongoDB driver is not compatible with MongoDB installed on the machine.** (originally mentioned in the [first answer](https://stackoverflow.com/a/34646148/309031)). Examine PHP driver version...
64,569,792
These are my haves: ``` vec <- seq(1, 3, by = 1) df <- data.frame(x1 = c("a1", "a2")) ``` and this is my wants: ``` x1 x2 1 a1 1 2 a2 1 3 a1 2 4 a2 2 5 a1 3 6 a2 3 ``` I basically want to replicate the data frame according to the values in the vector vec. This is my working (possibly inefficient approach)...
2020/10/28
[ "https://Stackoverflow.com/questions/64569792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283538/" ]
You can use `crossing` : ``` tidyr::crossing(df, vec) %>% dplyr::arrange(vec) # x1 vec # <chr> <dbl> #1 a1 1 #2 a2 1 #3 a1 2 #4 a2 2 #5 a1 3 #6 a2 3 ``` Also, ``` tidyr::expand_grid(df, vec) %>% dplyr::arrange(vec) ```
60,351,355
I am trying to make my nav bar sit parallel with my logo but I'm having difficulty doing this. First of all, when I enter the code for the image, the image afterwards doesn't display at the top of the page. Instead, it sits about 40px below the page. I have tried using floats, but have had no luck. I have created ...
2020/02/22
[ "https://Stackoverflow.com/questions/60351355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12943430/" ]
"To maintain the integrity of the data dictionary, tables in the SYS schema are manipulated only by the database. They should never be modified by any user or database administrator. You must not create any tables in the SYS schema." <https://docs.oracle.com/database/121/ADMQS/GUID-CF1CD853-AF15-41EC-BC80-61918C73FDB5...
187,493
Input ----- A single hex 6-digit colour code, capital letter, without `#`. Can also be a 24-bit integer if you prefer. Output ------ The closest HTML color *name* (e.g `red`, or `dark-salmon`, as defined as <https://www.w3schools.com/colors/colors_names.asp> or see below). Distance is defined by summing the differen...
2019/06/30
[ "https://codegolf.stackexchange.com/questions/187493", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/85546/" ]
[Node.js](https://nodejs.org), 1488 bytes ========================================= Takes input as a 24-bit integer. Outputs in lower case. ```javascript v=>(require('zlib').inflateRawSync(Buffer('TVRbm6o4EPxLE27CowziDOiIV+bwFkkrWUPCBBg/9tdvLurZFzGX7uqqrs6Z4fr2xvHv5OYEy9uZjRC3QOjY6r/oaH4X+ugqAXiWI/P1M28AzGxQPWHuBBkB6...
44,409
Bonjour, Normalement, on ne met pas d'article devant un nom de métier. > > Je suis professeur. Je suis boulanger. > > > Mais imaginons le dialogue suivant : > > A : Es-tu boulanger ? > > > B : Non, je suis (**un**) maçon. > > > Dans ce cas, faut-il mettre l'article indéfini devant *maçon*, ceci parce que...
2021/01/28
[ "https://french.stackexchange.com/questions/44409", "https://french.stackexchange.com", "https://french.stackexchange.com/users/26093/" ]
Je ne vois pas de nécessité d'ajouter un article indéfini, ni dans un cas, ni dans l'autre : > > A : Es-tu boulanger ? > > B : Non, je suis maçon. > > A : Mais on m'a bien dit que tu étais un boulanger… > > B : Oui, c'est mon nom de famille, je suis bien un Boulanger. Et toi ? > > A : Oh, pardon ! C'est a...
14,489,876
I have a table `HRTC` in SQL Server. I want to import data which is in Excel into this table. But my Excel file does not have all the columns which match the `HRTC` table. Is there anyway I can do this? I am thinking something like in the import wizard ``` Insert into SQLServerTable Select * FROM OPENROWSET('Microsof...
2013/01/23
[ "https://Stackoverflow.com/questions/14489876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1723572/" ]
Try this Create a temp table ``` Select * INTO TmpTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\testing.xls;HDR=YES', 'SELECT * FROM [SheetName$]') ``` Then to insert row into hrtc using temptable, any missing columns will have null ``` INSERT INTO hrtc(column1, column2) select col1, ...
19,034,871
Hi I was wondering whether someone would be able to help me with a query. I am trying to select from an EAV type table where the value is not multiple values. Using the example below I am trying to retrieve rows where tag\_id != 1 and tag\_id != 2. So based on the data I want to return just the row containing contact\...
2013/09/26
[ "https://Stackoverflow.com/questions/19034871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460824/" ]
You can use `NOT EXISTS()` in which the statement inside selects all records where it has tags of `1` or `2`. ``` SELECT contact_id FROM contact_tags a WHERE NOT EXISTS ( SELECT 1 FROM contact_tags b WHERE tag_id IN (1, 2) AND a.contact_id = b...
9,941,898
I'm new in Ruby/Rails, so, my question: what is the perfect way to upload file and save filename in database with rails? Are there any Gem? Or maybe there are good build-in feature?
2012/03/30
[ "https://Stackoverflow.com/questions/9941898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/630189/" ]
Also try [carrierwave](https://github.com/jnicklas/carrierwave), Ryan has a good screencast about this [gem](http://railscasts.com/episodes/253-carrierwave-file-uploads)
48,411,072
The following query matches userID's to eachother based off of total score difference. I have two tables, survey & users. I need to join this to the users table that I have that has usernames/photo links. The columns I need displayed are users.name & users.photo. All tables currently have a unique userID, which is us...
2018/01/23
[ "https://Stackoverflow.com/questions/48411072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8534513/" ]
I would just add a filter to exclude undefined events on the initial subscription: ``` ngOnInit() { this.dataService.getEvents() .filter(events => events && events.length > 0) .subscribe( (events) => { this.events = events; console.log(events); // when I try to get this is no problem it...
44,215,132
I have a Oracle query ``` SELECT to_timestamp('29-03-17 03:58:34.312000000 PM','DD-MM-RR HH12:MI:SS.FF AM') FROM DUAL ``` I want to convert to SQL Server where I need to retain the Oracle date string i.e `'29-03-17 03:58:34.312000000 PM'`: ``` SELECT CONVERT(DATETIME, REPLACE(REPLACE('29-03-2017 03:58:34.312...
2017/05/27
[ "https://Stackoverflow.com/questions/44215132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2550324/" ]
You might try it like this: ``` DECLARE @oracleDT VARCHAR(100)='29-03-17 03:58:34.312000000 PM'; SELECT CAST('<x>' + @oracleDT + '</x>' AS XML).value(N'(/x/text())[1]','datetime'); ``` It seems, that XML is implicitly able to do this correctly... EDIT: The above is culture related! ---------------------------------...
13,440,602
lick() is a private method of Cat. Unfortunately, Cat's this.paw is not accessible in lick(). Is there a simple way to create a private method that has access to the member variables of its containing class? ``` <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <p id="catStatus">???</p> <script> func...
2012/11/18
[ "https://Stackoverflow.com/questions/13440602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/724752/" ]
The value of `this` depends on how you call the method. Since you're not calling the method on the object instance, `this` becomes the global object. Instead, you need to save `this` in a variable: ``` function Cat() { this.paw = ...; var me = this; var lick = function() { alert(me.paw); ...
65,492,424
I'm working with [AI-Thermometer](https://github.com/tomek-l/ai-thermometer) project using Nvidia Jeton Nano. The project is using Pi camera v2 for video capturing. Here's the command of showing video streams using Pi camera v2. ```sh gst-launch-1.0 nvarguscamerasrc sensor_mode=0 ! 'video/x-raw(memory:NVMM),width=326...
2020/12/29
[ "https://Stackoverflow.com/questions/65492424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12570573/" ]
There should not quotes around the device parameter i.e. `device=/dev/video0`. If the error persists, then its probably something else.
1,749,232
What naming conventions do you use for everyday code? I'm pondering this because I currently have a project in Python that contains 3 packages, each with a unique purpose. Now, I've been putting general-purpose, 'utility' methods into the first package I created for the project, however I'm contemplating moving these m...
2009/11/17
[ "https://Stackoverflow.com/questions/1749232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/154280/" ]
In general, you should follow the naming convention of the language you're using. It doesn't matter if you like or prefer the standards of another language. Consistency within the context of the language helps make your code more readable, maintainable, and usable by others. In Python, that means you use [PEP 8](http:/...
30,779,774
I have a table like this: ``` CREATE TABLE mytable ( user_id int, device_id ascii, record_time timestamp, timestamp timeuuid, info_1 text, info_2 int, PRIMARY KEY (user_id, device_id, record_time, timestamp) ); ``` When I ask Cassandra to delete a record (an entry in the columnfamily) li...
2015/06/11
[ "https://Stackoverflow.com/questions/30779774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/697716/" ]
Ok, here is my theory as to what is going on. You have to be careful with timestamps, because they will *store* data down to the millisecond. But, they will only *display* data to the second. Take this sample table for example: ``` aploetz@cqlsh:stackoverflow> SELECT id, datetime FROM data; id | datetime ------...
3,508,624
Got a table with 1200 rows. Added a new column which will contain incremental values - Candidate1 Candidate2 Candidate3 . . . Candidate1200 What is the best way to insert these values , non manual way. I am using SQL Server 2008
2010/08/18
[ "https://Stackoverflow.com/questions/3508624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/416465/" ]
Simple: ``` $post_title = sanitize_title_with_dashes($post_title); ``` But WordPress does this for you already. I assume you need it for something different?
521
Has anyone seen this site? <http://answermagento.com/> I know this subject has been briefly discussed but this isn't another site using a StackExchange-clone platform. This site consists entirely of scraped content from Magento SE. [Frequently linked-to site ripping off Magento Stack Exchange](https://magento.meta.st...
2015/02/23
[ "https://magento.meta.stackexchange.com/questions/521", "https://magento.meta.stackexchange.com", "https://magento.meta.stackexchange.com/users/324/" ]
The content is CC share-alike, but this site isn't properly crediting the origin. Not important though because the domain name infringes our mark. I've sent a note to our legal team to C&D the owner.
50,327,168
I need to create perforce clients from my jenkins build scripts, and this needs to be done unattended. This is mainly because jenkins jobs run in unique folders, Perforce insists that each client has a unique root target folder, and we create new jenkins jobs all the time based on need. Right now each time I create a u...
2018/05/14
[ "https://Stackoverflow.com/questions/50327168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1216792/" ]
You can position an absolute View over the RNCamera view, and put all of your content into that absolute view. For example: ```js import { RNCamera } from 'react-native-camera'; class TakePicture extends Component { takePicture = async () => { try { const data = await this.camera.takePictureAsync(); ...
3,959,078
I have a model called a `Statement` that belongs to a `Member`. Given an array of members, I want to create a query that will return the **most recent** statement for each of those members (preferably in one nice clean query). I thought I might be able to achieve this using `group` and `order` - something like: ``` #...
2010/10/18
[ "https://Stackoverflow.com/questions/3959078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/151409/" ]
In MySQL directly, you need a sub-query that returns the maximum `created_at` value for each member, which can then be joined back to the `Statement` table to retrieve the rest of the row. ``` SELECT * FROM Statement s JOIN (SELECT member_id, MAX(created_at) max_created_at FROM Statement ...
5,032,968
When an EXE raised an exception message like "access violation at address XXXXXXXX...", the address XXXXXXXX is a hex value, and we can get the source code line number that caused the exception, by looking at the map file. Details below ([by madshi at EE](http://www.experts-exchange.com/Programming/Languages/Pascal/Del...
2011/02/17
[ "https://Stackoverflow.com/questions/5032968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/133516/" ]
Same calculations apply, with the following note: instead of image base address of EXE you'll need to take actual address where DLL had been loaded. Base of code for a DLL should taken in the same manner as for EXE (stored in PE's `IMAGE_OPTIONAL_HEADER`). Btw, EXE and DLL are actually the same thing from the point of...
52,332,409
I converted the png file to SVG and got it from <http://inloop.github.io/svg2android/> to find the vector path information. I have been trying to support from api level 21 to get the right resolution for all screen sizes by using vector drawables. (My app`s minSdk is 21) The problem is that the text is white and the...
2018/09/14
[ "https://Stackoverflow.com/questions/52332409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10363717/" ]
Use this class ``` private class VectorDrawableUtils { Drawable getDrawable(Context context, int drawableResId) { return VectorDrawableCompat.create(context.getResources(), drawableResId, context.getTheme()); } Drawable getDrawable(Context context, int drawableResId, int colorFilter) { Dr...
52,260,366
I am looking for a textbox control that suggests words as the user types, similar to SuggestAppend for textboxes in winforms, except for WPF. I have looked around on the WPFToolkit and haven't really found anything that fits my needs. Thanks.
2018/09/10
[ "https://Stackoverflow.com/questions/52260366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6635930/" ]
Declare an enum AutoCompleteMode too with value(Append, None,SuggestAppend,Suggest) ``` public enum AutoCompleteMode ``` Create an custom UserControl with TextBox and ItemControls. Handle the **KeyDown** event of TextBox. Popup an custom List to show the suggestion list(ItemControls in here). Then Handle the selecti...
5,788,258
Hey I have a .NET .aspx page that I would like to run every hour or so whats the best way to do this ? I assume it will have to open a browser window to do so and if possible that it closes the window after. EDIT : I have access over all features on the server
2011/04/26
[ "https://Stackoverflow.com/questions/5788258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215541/" ]
**Option 1**: The cleanest solution would be to write a Windows application that does the work (instead of an aspx page) and schedule this application on the server using the Windows Task Scheduler. This has a few advantages over the aspx approach: * You can use the features of the Windows Task Scheduler (event log en...
29,776,576
I can create a [Guava `ImmutableList`](https://google.github.io/guava/releases/23.0/api/docs/com/google/common/collect/ImmutableList.html) with the `of` method, and will get the correct generic type based on the passed objects: ``` Foo foo = new Foo(); ImmutableList.of(foo); ``` However, [the `of` method with no par...
2015/04/21
[ "https://Stackoverflow.com/questions/29776576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/722332/" ]
If you assign the created list to a variable, you don't have to do anything: ``` ImmutableList<Foo> list = ImmutableList.of(); ``` In other cases where the type can't be inferred, you have to write `ImmutableList.<Foo>of()` as @zigg says.
1,990,579
I am using "ExuberantCtags" also known as "ctags -e", also known as just "etags" and I am trying to understand the TAGS file format which is generated by the etags command, in particular I want to understand line #2 of the TAGS file. [Wikipedia says](http://en.wikipedia.org/wiki/Ctags#Etags_2) that line #2 is describ...
2010/01/02
[ "https://Stackoverflow.com/questions/1990579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2085667/" ]
You can probably use [mcrypt](http://de3.php.net/manual/en/ref.mcrypt.php). But may I ask why you're encrypting with ECB mode at all? Remember the [known problems](http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29) with that?
31,208,835
``` firstLetter = word.charAt(0); lastLetter = word.charAt((word.length()) - 1); noFirstLetter = word.substring(1); newWord = noFirstLetter + firstLetter; if(word.equalsIgnoreCase(newWord)) ``` So im trying to take the first letter of the word and if I take the first letter of the word away and move it to t...
2015/07/03
[ "https://Stackoverflow.com/questions/31208835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5078138/" ]
I think what you are trying to do is to remove the first character, and then check if rest of the characters are symmetrical around the center of the word.(OK even it is complicated for me) EG: dresser => (drop d) => resser => (add d to the right) => resserd (read from right to left and it is dresser again). after ...
17,426,311
I have list of Active Directory Users's Guid, I need to load a set of properties of those users for a specific reporting. To do this, if we make a bind for each Guid, then it will be a costly one. Whether with DirectorySearcher, can we provide multiple Guid(say 1000) as filter and load the properties?.
2013/07/02
[ "https://Stackoverflow.com/questions/17426311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2376887/" ]
``` In [9]: pd.Series(df.Letter.values,index=df.Position).to_dict() Out[9]: {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e'} ``` Speed comparion (using Wouter's method) ``` In [6]: df = pd.DataFrame(randint(0,10,10000).reshape(5000,2),columns=list('AB')) In [7]: %timeit dict(zip(df.A,df.B)) 1000 loops, best of 3: 1.27 ms p...
19,966,453
I'm trying to select a node's value from XML in a table in MySQL/MariaDB Acoording to the MySQL docs, `following-sibling` is not supported as an XPath axis in MySQL. Is there an alternative? Docs: <http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html#function_extractvalue> My XML structure looks something like:...
2013/11/13
[ "https://Stackoverflow.com/questions/19966453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565626/" ]
In this simple case you do not need the `following-sibling`. Try this instead: ``` /fields/record[id[text()=10]]/value/text() ``` Using the tag `id` inside the brackets leaves your context at `record` so that the following slash descends to the corresponding sibling of `id` (having the same parent as `id`).
2,621,549
Actually, I know that $\int\_0^n \lfloor t \rfloor dt$ is $\frac{n(n-1)}{2}$. But I can't solve this simple problem. Can anybody help me? P.S. I'm seventeen, I'm studying in last year of high school, and I'm preparing for the national exams.
2018/01/26
[ "https://math.stackexchange.com/questions/2621549", "https://math.stackexchange.com", "https://math.stackexchange.com/users/427758/" ]
\begin{eqnarray\*} \int\_0^n 2x \lfloor x \rfloor dx = \sum\_{i=0}^{n-1} i \underbrace{\int\_{i}^{i+1} 2x \,dx}\_{x^2 \mid\_i^{i+1}=2i+1} = \underbrace{\sum\_{i=0}^{n-1} i (2i+1)}\_{\text{using} \sum\_{i=0}^{n-1} i^2=\frac{n(n-1)(2n-1)}{6} } = \frac{(n-1)n(n+1)}{3}. \end{eqnarray\*}
273,520
If $\sum\_{n=1}^{\infty}a\_n$ converge, then $\sum\_{n=1}^{\infty}\sqrt[4]{a\_{n}^{5}}=\underset{n=1}{\overset{\infty}{\sum}}a\_{n}^{\frac{5}{4}}$ converge? Please verify answer below.
2013/01/09
[ "https://math.stackexchange.com/questions/273520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/55682/" ]
Yes. Because $\sum a\_n$ converges, we know that the limit $\lim a\_n = 0$, by the Divergence Test. This means that $\exists N, \forall n > N, a\_n <1 $. It stands to reason then that $a\_n^{5/4} \le a\_n$ for all such $n>N$. By Direct Comparison, then, $\sum a\_n^{5/4}$ also converges. We cannot say $\sum a\_n^{5/4}...
39,193,733
It is my developed project with target API 23. Now I'm using Studio 2.1.3 When I am trying to open this project the error show me like `Error:failed to find Build Tools revision 24.0.0 rc2 Install Build Tools 24.0.0 rc2 and sync project` But when I try to install, then a error message shown. It was a big project, I...
2016/08/28
[ "https://Stackoverflow.com/questions/39193733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5032484/" ]
Update the `android-sdk` tools to the newest version: `24.0.2` Change your Android Support libraries version like `appcompat` from `23.x.x` version to `24.2.0` If you would any problem with updating dependencies, check: <https://developer.android.com/studio/intro/update.html#sdk-manager> **Tip:** Try to avoid use in ...
1,613,692
The way I understand the definition of a combination of a set is that, without repetition,for example, the combination of the set $\{1,2\}$ would be $(1,2)$, and not $(1,1)$, $(1,2)$ and $(2,2)$ because I thought I read that each element has to be unique. Is this the case? Also, What is the combination of a set that...
2016/01/15
[ "https://math.stackexchange.com/questions/1613692", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
$$\int\frac{u}{\left(a^2+u^2\right)^{\frac{3}{2}}}\space\text{d}u=$$ --- Substitute $s=a^2+u^2$ and $\text{d}s=2u\space\text{d}u$: --- $$\frac{1}{2}\int\frac{1}{s^{\frac{3}{2}}}\space\text{d}s=\frac{1}{2}\int s^{-\frac{3}{2}}\space\text{d}s=\frac{1}{2}\cdot-\frac{2}{\sqrt{s}}+\text{C}=-\frac{1}{\sqrt{a^2+u^2}}+\tex...
21,266,901
Researching viewport behaviour, I've hit a bit of a snag in understanding the meta viewport declaration. I see `width=device-width` and `initial-scale=1` used together a lot but, as far as I can tell, the latter implies the former. MDN also mentions that defining both a `width` and `initial-scale=1` will result in t...
2014/01/21
[ "https://Stackoverflow.com/questions/21266901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1778058/" ]
The usual problem when trying to use an audio signal as digital signal input is that it is [high-pass-filtered to avoid offsets](http://blog.faberacoustical.com/2010/ios/iphone/iphone-4-audio-and-frequency-response-limitations/) (long term pressure changes which could destroy the dynamic range of the soundcards Analog-...
42,048,152
I have the data given below with other lines of data in a huge file to be more specific this is a .json file, I have stripped the whole file except for this one catch. **Data:** * ,"value":["ABC-DE","XYZ-MN"] * ,"value":["MNO-RS"],"sub\_id":01 * "value":"[\"NEW-XYZ\"]"," * ,"value":["ABC-DE","XYZ-MN","MNO-BE","FRS-ND...
2017/02/05
[ "https://Stackoverflow.com/questions/42048152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2102955/" ]
That's tougher without the non-greedy matching perl regex offers, but this seems to do it. ``` sed -e 's/\([^\[]*\"[A-Z\-]*\)\",\"\(.*\)/\1,\2/' ```
26,781,785
I'm trying to create a batch file which asks a user a question with multiple (four) options. The options that the user chooses should trigger the batch file to ignore one of the four options. Lets say that the commands that I would normally want to run is ECHO "A", ECHO "B", ECHO "C", ECHO "D". If the person puts A in...
2014/11/06
[ "https://Stackoverflow.com/questions/26781785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The idea in this code is that it only skips the one that you choose. ``` @echo off set /p choice="Do you want not to do: A, B, C or D? [A/B/C/D] " [A/B/C/D] if "%choice%"=="" ( ECHO Please select A, B, C or D! EXIT /b ) if not %choice%==A ( ECHO "A" ) if not %choice%==B ( ECHO "B" ) if not %choice%==C ...
18,258,755
This feels like it should be simple but it's been driving me crazy. I've got a function `indent-or-expand` that I'd like to remap to `tab` but I simply can't get it to work (Emacs v24, OS X). The only help I've been able to get from Emacs itself is: > > error "To bind the key TAB, use \"\\t\", not [TAB]" > > > Do...
2013/08/15
[ "https://Stackoverflow.com/questions/18258755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2521092/" ]
In addition to what others have told you: 1. The Emacs error message you cite told you to use "\t", and if you use that you should be OK: (global-set-key "\t" 'indent-or-expand) 2. Be aware also that `TAB` is one thing and `<tab>` might be another thing. IOW, it depends what code your physical keyboard `Tab` key actu...
47,343,419
So I am having trouble implementing this scenario: From the backend server, I am receving an html string, something along like this: ``` <ul><li><strong>Title1</strong> <br/> <a class=\"title1" href="title1-link">Title 1</a></li><li><strong>Title2</strong> <a class="title2" href="/title2-link">Title 2</a> ``` Norma...
2017/11/17
[ "https://Stackoverflow.com/questions/47343419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4927657/" ]
You can deconstruct and extract the necessary values from your html string with regex and then use JSX instead of dangerouslySetInnerHtml. This component shows how to render your sample html string. ``` import React, { Component } from 'react' export default class App extends Component { render() { const ...
20
In French, some nouns are considered male and some female (le/la). Is there a way which can help me understand which grammatical gender to use with which noun?
2016/04/05
[ "https://languagelearning.stackexchange.com/questions/20", "https://languagelearning.stackexchange.com", "https://languagelearning.stackexchange.com/users/41/" ]
You can't, really ----------------- As I was learning French (English is my first language) the idea of gender of objects can be difficult to grasp. Genders are pretty much arbitrary and is something you just have to remember with each word (this means remembering it as *"une fenêtre"* rather than *"fenêtre"*). You c...
1,370,899
I want to display different types of objects in the same ajax called controller function. I want to render out when I send back an ajax call. The problem is I want the "title" attribute of one object and the "name" attribute of another object. I can't render 2 partials and can seem to figure out how to check the type o...
2009/09/03
[ "https://Stackoverflow.com/questions/1370899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/157894/" ]
try something like ``` <%= obj.title if obj.respond_to?(:title) %> ```
4,611,178
I am attempting to write a test case to ensure a Singleton class cannot be instantiated. The constructor for the Singleton is defined to be private so my test is as follows: ``` $this->expectError(); $test = new TestSingletonClassA(); ``` Instead of catching the error and passing the test, I get a 'PHP Fatal error: ...
2011/01/06
[ "https://Stackoverflow.com/questions/4611178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382462/" ]
If your php code throws a FATAL ERROR, it will never get to the phpunit, so you have to write "right" code in order to test it. If you call a private method, it will throw an excepcion, so it won't get to the phpunit. You have to change that. I think you have to mock the object. Try [these posts](http://sebastian-berg...
73,910,771
I am writing a function that returns a list of car models. The input is a string of comma separated cars. Duplicate entries are not added to the result. The elements in the list should be in the same order as they appear in the input string. If the input string is empty, the result is an empty list. I modified it to su...
2022/09/30
[ "https://Stackoverflow.com/questions/73910771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17261019/" ]
Since you're appending `" ".join(unique_car[1:])` to the list, you need to use the same thing when checking if already exists. Solve this easily by assigning that to a variable, so you can use the same thing in the `in` test and `append()` call. ``` def car_models(all_cars: str) -> list: if not all_cars: ...
37,434,875
I'm getting a weird error when i try to set templateUrl in my component. This works: ``` @Component({ selector: 'buildingInfo', template: ` <html>stuff</html> ` }) ``` But when i do this (with the same content in the html-file): ``` @Component({ selector: 'buildingInfo', templateUrl: 's...
2016/05/25
[ "https://Stackoverflow.com/questions/37434875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5119447/" ]
If you want Angular to find the templates relative to the Component e.g. you have a structure like app/ app/app.component.ts app/app.component.html make sure, you set the module id of the component. That'll cause the System loader to look relative to your current path. Otherwise, it will *always* expect the complet...
22,518,501
I am reading in another perl file and trying to find all strings surrounded by quotations within the file, single or multiline. I've matched all the single lines fine but I can't match the mulitlines without printing the entire line out, when I just want the string itself. For example, heres a snippet of what I'm readi...
2014/03/19
[ "https://Stackoverflow.com/questions/22518501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1583932/" ]
Couple big things, you need to search in a `while` loop with the `g` modifier on your regex. And you also need to turn off greedy matching for what's inside the quotes by using `.*?`. ``` use strict; use warnings; my $contents = do {local $/; <DATA>}; my @strings_found = (); while ($contents =~ /(['"](.*?)["'])/sg)...
25,024,560
Assume I have a dataframe: ``` Col1 Col2 Col3 Val a 1 a 2 a 1 a 3 a 1 b 5 b 1 a 10 b 1 a 20 b 1 a 25 ``` I want to aggregate across all columns and then attach this to my dataframe so that I have this output: ``` C...
2014/07/29
[ "https://Stackoverflow.com/questions/25024560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2565416/" ]
No guarantees in terms of performance, but for each directory you could check its files to see if it contains any with the matching extension: ``` List<string> imageDirectories = Directory.GetDirectories(sourceTextBox.Text, "*", SearchOption.AllDirectories) .Where(d => Directory.EnumerateFiles(d) .Select(P...
59,762,087
Hi I know that Flutter still doesn't support SVG files so I used flutter\_svg package, but for some reason, the svg file is not rendering the SVG file I want to use. What I want is use my custom SVG files as Icon in the bottomnavigation bar items. > > I want to use SVG icons so that I can easily change their colors ...
2020/01/16
[ "https://Stackoverflow.com/questions/59762087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12509659/" ]
Fixed it ``` height: 20.0, width: 20.0, allowDrawingOutsideViewBox: true, ``` I'm beginning to slowly fall in love with flutter
25,469,489
A long, long time ago, in a galaxy far away, I used to write programs in Delphi, and then if I needed something to happen really fast, I'd write those routines in hand-written assembler. It produced much faster code than the compiler did. But is this true **in practice** any more? Obviously hand-written assembler will...
2014/08/24
[ "https://Stackoverflow.com/questions/25469489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3933089/" ]
To me it looks both answers given so far are correct. The answer depends, among other things, on the particular CPU architecture we're talking about. The more complex architecture is, the harder it is to write efficient ASM code by hand. On one end of the spectrum are CISC cores such as x86. They have multiple executi...
1,385,852
How do we do this? Does it involve the fact that we know $f$ is continuous, and therefore the limit approaching the endpoint $1$ should be the same coming from both sides?
2015/08/05
[ "https://math.stackexchange.com/questions/1385852", "https://math.stackexchange.com", "https://math.stackexchange.com/users/259137/" ]
If $f(1)<2$ then $\epsilon=2-f(1)$ is positive. Since $f$ is continuous and $f(0)\ge 2$, then there exists some $c\in[0,1)$ such that $f(c)=2-\frac\epsilon2$. Contradiction.
13,756,250
I am using Grails and I am currently faced with this problem. This is the result of my html table ![enter image description here](https://i.stack.imgur.com/QBAZY.png) And this is my code from the gsp page ``` <tr> <th>Device ID</th> <th>Device Type</th> <th>Status</th> <th>Custome...
2012/12/07
[ "https://Stackoverflow.com/questions/13756250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1790785/" ]
I think you problem is not in the view, but in the controller (or maybe even the domain). You must have some way of knowing that `reqid` and `custname` are related if they are in the same table. You must use that to construct an object that can be easily used in a g:each You are looking for a way to mix columns and ro...
5,329,947
I have an input that I'd like to put a placeholder text in, but *only if* it's respective value is an empty string. The value that should go in the textbox is echoed from a PHP array, but if this value is empty, the placeholder should be echoed instead. At the moment, I've got this code: ``` <?php echo sponsorData('a...
2011/03/16
[ "https://Stackoverflow.com/questions/5329947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383609/" ]
try the following code: ``` <?php echo ((sponsorData('address0') == '') ? 'Address Line 1' : 'Other'); ?> ``` felix
27,771,899
Our .net application supports AD authentication, so our application will read from the GC connection string and credentials. We now have a client who has ADFS in their on-premise and wants to create a trust with our server which hosts the application. Do I need to write a separate code to setup as a claims-aware (or) c...
2015/01/03
[ "https://Stackoverflow.com/questions/27771899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2024422/" ]
you've answered your own question : "Our .net application supports AD authentication..." This is not the same s being claims aware, so yes you will need to modify the app. Once your app is claims aware they will create a relying party (that's your app) trust with some data that you will provide after it's been made cla...
42,099,915
I don't mean collapse, I mean hide. For example for single line comments it'd completely hide it, the editor entirely skipping the comment's line number. I'm entirely self-taught when it comes to programming, so I'm sure I've picked up numerous bad habits, one of which is almost entirely forgoing commenting. I dislike...
2017/02/07
[ "https://Stackoverflow.com/questions/42099915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2868017/" ]
I am not sure, whether I would recommend working without comments. However, you could switch between two schemes. The first one would be the one you are currently working with. The other would be a copy of it, but with the -distracting- comments matching the background color. [For instance like this](https://i.stack.i...
13,624
[![](https://i.stack.imgur.com/9pJC6.jpg)](https://i.stack.imgur.com/9pJC6.jpg) This is a picture of a jet of particles exiting the supermassive black hole in the center of Pictor A galaxy at nearly the speed of light. [Source](http://www.astronomy.com/news/2016/02/blast-from-black-hole-in-a-galaxy-far-far-away?utm_so...
2016/02/09
[ "https://astronomy.stackexchange.com/questions/13624", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/7926/" ]
This is a clear example of an [astrophysical jet](https://en.wikipedia.org/wiki/Astrophysical_jet), in this case, most likely a relativistic jet. In short, an accretion disk forms around a black hole (supermassive or otherwise). Matter is pulled towards the black hole and further energized, before being accelerated int...
253,869
I upgraded my service to 200 amp from 100 amp, but the new panel is 15 ft. away. In order to connect the existing wires to the new breakers in the new panel, will just a simple connection with higher guage wire and wire nut be fine or does it require a different approach? thanks
2022/07/31
[ "https://diy.stackexchange.com/questions/253869", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/100926/" ]
Extending the existing circuits from the old panel to the new one with the same gauge wire is acceptable. There is no need to upsize the wire. If you have an excess of larger gauge wire that you are trying to use up then you can use it, provided the breakers in the new panel are listed for use with that gauge. Your ol...
2,148,135
I've looked at the [documentation](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs) but I've been unable to find an answer. Is there a way to prevent a row from being highlighted when selected? That or even a way to stop the row being selected at all. I like the "hoverrows: true" option, but ideally I wou...
2010/01/27
[ "https://Stackoverflow.com/questions/2148135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/178383/" ]
Use the following code: ``` beforeSelectRow: function(rowid, e) { return false; } ```
454,087
I have dual boot with Ubuntu 12.04 and Windows 7, and I would like to upgrade Ubuntu to 14.04 but still retain my windows 7, help! I have a DVD with the ubuntu 14.04 ISO
2014/04/24
[ "https://askubuntu.com/questions/454087", "https://askubuntu.com", "https://askubuntu.com/users/273372/" ]
If you copy a partition with `dd`, the output file will be as big as the partition. `dd` does a physical copy of the disc, it has no knowledge of blank or used space. If you compress the result file you will save a lot of space, though, given that blank space will compress away very well (beware, this is going to be ...
3,705,480
How can I use RichTextBox Target in WPF application? I don't want to have a separate window with log, I want all log messages to be outputted in richTextBox located in WPF dialog. I've tried to use WindowsFormsHost with RichTextBox box inside but that does not worked for me: NLog opened separate Windows Form anyway.
2010/09/14
[ "https://Stackoverflow.com/questions/3705480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446876/" ]
A workaround in the mean time is to use the 3 classes available [here](http://nlog.codeplex.com/workitem/6272), then follow this procedure: 1. Import the 3 files into your project 2. If not already the case, use `Project > Add Reference` to add references to the WPF assemblies: `WindowsBase, PresentationCore, Presenta...
61,048,540
I'm trying to serve API with ***nodeJS***, and database use ***oracle***. I've an object like this that I got from `req.body.detail`: ``` { title: "How to Have", content: "<ol><li><b>Lorem ipsum dolor sit amet.</b></li></ol>" } ``` then I do ``` const data = JSON.stringify(req.body.detail); ``` but t...
2020/04/05
[ "https://Stackoverflow.com/questions/61048540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4941250/" ]
If `public class ClassName1 extends/implements ClassName` than it is perfectly valid. This is how polimorphism works - you can treat given instance as it would be a solely instance of any of its superclasses or interfaces it implements.
151,594
I cannot for the life of me figure this out. I have two monitors. If I'm focused on the left monitor, I cannot use a shortcut to switch spaces on the right monitor. Or (as often happens) I click my right monitor to focus it instead of alt tabbing, and then I cannot switch the left monitor space with my keyboard without...
2014/10/19
[ "https://apple.stackexchange.com/questions/151594", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/96457/" ]
Ctrl-Left Arrow/Right Arrow let you scroll through spaces from the keyboard in Mavericks. Spaces are only independent if you have "Displays Have Separate Spaces" enabled under `System Preferences > Mission Control` -- with this option enabled, you should be able to switch workspaces on each monitor independently. The ...
17,351,192
**dir1\dir2\dir3\file.aspx.cs**(343,49): error CS0839: Argument missing [**C:\dir\dir\dir\dir\namespace.namespace.namespace.namespace\**project.csproj] I've been trying for hours to create a regular expression to extract just 2 areas of this string. The bold areas are the parts I wish to capture. I need to split this...
2013/06/27
[ "https://Stackoverflow.com/questions/17351192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/882993/" ]
This pattern: ``` (^[^(]*).*\[(.*)project.csproj]$ ``` Captures these groups: 1. `dir1\dir2\dir3\file.aspx.cs` 2. `C:\dir\dir\dir\dir\namespace.namespace.namespace.namespace\` If the name `project.csproj` file could change, you can use this pattern instead: ``` (^[^(]*).*\[(.*\\)[^\\]*]$ ``` This will match eve...
36,734,566
I am working on performance storage. When I am selecting Storage Size 250/500 then no data In IOPS. When I was select storage size `100/20/80/1000/2000gb` then I am getting IOPS. I am facing problem only `250/500gb`. this is the API i am using ``` https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Produ...
2016/04/20
[ "https://Stackoverflow.com/questions/36734566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6171678/" ]
if you have just use three array means just use if condition ``` String arraname=""; if (Arrays.asList(lac1).contains("102")) { arraname="lac1"; } if (Arrays.asList(lac2).contains("102")) { arraname="lac2"; } if (Arrays.asList(lac3).contains("102")) { arraname="lac3"; } ```
178
Suppose we want to translate the whole of Wikipedia from English into [Lojban](https://jbo.wikipedia.org/), what are the main known big limitations or concerns we should be aware of? In other words, does Lojban as a language have sufficient expressive power for being translated from English?
2018/02/08
[ "https://conlang.stackexchange.com/questions/178", "https://conlang.stackexchange.com", "https://conlang.stackexchange.com/users/30/" ]
Length ====== A few things. First, Lojban often needs longer sentences to express something than it does in, for example, English. Vocabulary ========== Secondly, Lojban's vocabulary isn't that big, especially in the domain of sciences. Words would have to be calqued, adapted from English, French, etc. or completely...
6,935,450
``` $(window).bind("beforeunload",function(){ return "cant be seen in ff"; }); ``` The problem is that i can't see the "cant be seen in ff" on the confirm box in my FireFox browser, but works well in other browsers(IE Chrome) Any solutions??
2011/08/04
[ "https://Stackoverflow.com/questions/6935450", "https://Stackoverflow.com", "https://Stackoverflow.com/users/342366/" ]
See this: <https://bugzilla.mozilla.org/show_bug.cgi?id=588292> It looks like forefox decided to remove the support for the beforeunload as we know it.
251,927
What is the proper way to fuse and switch a power supply consisting of a bunch of SMPS like the following: [![smps power supply](https://i.stack.imgur.com/qd2vI.jpg)](https://i.stack.imgur.com/qd2vI.jpg) There would be up to 5 separate output voltages. The outputs shown are about 35W each. Other outputs would be less...
2016/08/12
[ "https://electronics.stackexchange.com/questions/251927", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/18385/" ]
> > So currently I have a mock-up that has a single fuse and a single switch on the AC load line. Is this safe? > > > The majority of devices found in the home or office are wired this way and there are few issues. The problem is that if you live in a land of non-polarised mains plugs which when reversed, can make...
45,200,443
the idea is within class Card I have dict ``` pack_of_cards = {'2': 2,'3': 3,'4': 4,'5': 5,'6': 6, \ '7': 7,'8': 7,'9': 9,'10': 10,'J': 10, \ 'D': 10,'K': 10,'T': 10} ``` I need this class to return a random set of key and value as a dict. For example: ``` Card() == {'T': 10} ```...
2017/07/19
[ "https://Stackoverflow.com/questions/45200443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8291387/" ]
You can do this using a method in the `random` module, but it wouldn't make sense unless your `Card` class implements an `__eq__` method. Example: ``` In [450]: class Card: ...: def __init__(self, suite, num): ...: self.suite = suite ...: self.num = num ...: ...: def __...
37,261,889
I have handle that I got via `stdinHandle = GetStdHandle(STD_INPUT_HANDLE)` and I have separate thread which execute such code: ``` while (!timeToExit) { char ch; DWORD readBytes = 0; if (!::ReadFile(stdinHandle, &ch, sizeof(ch), &readBytes, nullptr)) { //report error return; } if (readBytes == 0) ...
2016/05/16
[ "https://Stackoverflow.com/questions/37261889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034749/" ]
When reading from a console's actual STDIN, you can use [`PeekConsoleInput()`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms684344.aspx) and [`ReadConsoleInfo()`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961.aspx) instead of `ReadFile()`. When reading from an (un)named pipe, use [`Pe...
65,171,888
I tried to shuffle two matrices. And before shuffling I tried to concatenate them since it looked easier. (Since you wanted examples)For ex first matrix is: ``` A = [[ 1. 2. 3. 4] [ 1. 5. 6. 7] [ 1. 8. 9. 9] [ 1. 2. 1. 7] [ 1. 5. 5. 6] [ 1. 2. 3. 2] [ 1. 1. 4. ...
2020/12/06
[ "https://Stackoverflow.com/questions/65171888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9314444/" ]
It's not possible to concatenate two matrixes with different dimensions since the result matrix would be ambiguous. You can either pad the smaller matrix with the same datatype (usually floats or integers) to fit the size of the larger matrix ```py >>> result = np.full(fill_value=0, shape=b.shape) >>> offset = (0, 0)...
16,315,042
Below is my code ``` DirectoryInfo directoryInfo = new DirectoryInfo(@"C:\Users\Shahul\Documents\Visual Studio 2010\Projects\TreeView\TreeView\bin\FileExplorer"); private void Form1_Load(object sender, EventArgs e) { if (Directory.Exists("FileExplorer")) { try { DirectoryInfo[] dir...
2013/05/01
[ "https://Stackoverflow.com/questions/16315042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338764/" ]
This should solve your problem, I tried on WinForm though: ``` public Form1() { InitializeComponent(); DirectoryInfo directoryInfo = new DirectoryInfo(@"C:\Users\hikuma\Documents\IR"); if (directoryInfo.Exists) { treeView1.AfterSelect += treeView1_AfterSelect; ...
15,509,300
I'm creating an Oracle Report and I would like to display certain results based on when I print the report. There is a field called apply\_date. For example, if I print the report <= sysdate of 3/15 then I only want to display the records that have an apply\_date of 3/1 - 3/15. This also goes for printing on the 30th o...
2013/03/19
[ "https://Stackoverflow.com/questions/15509300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2188170/" ]
If you don't care much about the fiddly bits of column alignment, this isn't too bad: ``` datapoints = [{'a': 1, 'b': 2, 'c': 6}, {'a': 2, 'd': 8, 'p': 10}, {'c': 9, 'd': 1, 'z': 12}] # get all the keys ever seen keys = sorted(set.union(*(set(dp) for dp in datapoints))) with open("outfile...
41,921,530
I have a little dilemma with the decision part of my form. I'm attempting to create a form with radio buttons and a checkbox in an html page but I would like to retrieve data from my .php page. I think there's an issue with the .php portion of the code. I'm getting a response from each 'if' statement regardless of the...
2017/01/29
[ "https://Stackoverflow.com/questions/41921530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7422381/" ]
There are few issues with your code, such as: * There's no `value` attribute in your radio buttons, so you won't get anything with `document.getElementById("radioX").value`. Add a `value` attribute in your radio buttons, ``` <input type="radio" name="radbutton" id="radioX" value="radioX" /> ``` * Missing `&` between...
17,691,691
If you close a GUI using the the little X in the top right of the form, does that kill all your threads as well? If not, how to you catch that event so I can put in some close down code?
2013/07/17
[ "https://Stackoverflow.com/questions/17691691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758323/" ]
``` setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` To execute some code on closing have a look at this. [close window event in java](https://stackoverflow.com/questions/1984195/close-window-event-in-java)
54,547,061
How can I get the following effect with FFMPEG? [![enter image description here](https://i.imgur.com/8KeRNk5.gif)](https://i.imgur.com/8KeRNk5.gif) I know I have to do it with Zoompan, but the truth is, I've been trying for a while and I can not!
2019/02/06
[ "https://Stackoverflow.com/questions/54547061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6726976/" ]
The below pom.xml would suffices your requirement and this [tutorial](https://www.journaldev.com/21816/mockito-tutorial) will help you for better understanding how to work with mockito using maven ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaL...
44,266,435
When clicking on "a" anchor tag I want to redirect from one controller(HomeController.cs) to another controller(CartController.cs) index [GET] and and execute code and return data to view(cart/index.cshtml). Here is the js code ``` $(document).on('click', '.btn-margin', function () { if (parseInt($('#UserID')...
2017/05/30
[ "https://Stackoverflow.com/questions/44266435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5663668/" ]
I may be a little bit late, but: You do not need anything special, it's simply formating. Put label on top of form, wrap both label and select in a div, then adjust background colors and borders. See the example: ```css .select-wrap { border: 1px solid #777; border-radius: 4px; margin-bottom: 10px; paddi...
27,952
Mit „was“ meine ich hier das **neutrale** [Interrogativadverb – auch: Frageadverb](https://de.wikipedia.org/wiki/Interrogativadverb), mit dem man sich z.B. nach einem Gegenstand erkundigt: „Was hältst du in der Hand?“, im Gegensatz zu dem *persönlichen* Frageadverb „wer“, dessen Genitiv definitiv „wessen“ lautet. Aber...
2016/02/01
[ "https://german.stackexchange.com/questions/27952", "https://german.stackexchange.com", "https://german.stackexchange.com/users/19609/" ]
*Wessen* ist der korrekte Genitiv zu *was* (und *wer*). *Aufgrundwessen* existiert nicht (zumindest nicht im Duden; gehört habe ich es auch noch nie). Nach der Ursache kann man z.B. mit *weshalb*, *warum*, *wieso* fragen.
51,848,564
I have run into the problem of sending data, a simple int type, from a dialogue fragment to all the fragments within a viewpager. I have an activity that hosts both the dialogue fragment and the viewpager. I know how to send data from the dialogue fragment to the activity using an interface defined in the dialogue frag...
2018/08/14
[ "https://Stackoverflow.com/questions/51848564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7180267/" ]
Your call to `ToListAsync()` is returning a `Task`, which may not have completed executing by the time you return from the method. The best solution would be to make the method async, like so: ``` public async Task<IActionResult> GetApplications() { var result = await context.Applications.Include(a=> a.AplicantComp...
66,996,455
I am fairly new to R and I would like to paste the string "exampletext" in front of each file name within the path. ``` csvList <- list.files(path = "./csv_by_subject") %>% paste0("*exampletext") ``` Currently this code renders things like "csv\*exampletext" and I want it to be \*exampletextcsv". I would l...
2021/04/08
[ "https://Stackoverflow.com/questions/66996455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10524382/" ]
As others pointed out, the pipe is not necessary here. But if you do want to use it, you just have to specify that the second argument to `paste0` is "the thing you are piping", which you do using a period (.) ``` list.files(path = "./csv_by_subject") %>% paste0("*exampletext", .) ```