qid
int64
1
74.7M
question
stringlengths
0
70k
date
stringlengths
10
10
metadata
list
response
stringlengths
0
115k
57,546,337
I want to open a file (`file`) that is stored in a folder (`Source`) which is in the same directory as the current workbook. I get a runtime error 1004 indicating that it the file can't be located. What am I doing worng? ``` Set x = Workbooks.Open(ThisWorkbook.Path & "\Source\file*.xlsx") ```
2019/08/18
[ "https://Stackoverflow.com/questions/57546337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3435347/" ]
Since you want the wildcard to stay, you need to loop through the files in the folder. Something like this may be of interest to you: ``` Sub FileOpen() Dim sPath As String Dim sFile As String Dim wb As Workbook sPath = ThisWorkbook.Path & "\Source\" sFile = Dir(sPath & "file*.xlsx") ' Loops while there...
37,242,600
I'm struggling with this and I'm not so clear about it. Let's say I have a function in a class: ``` class my_class(osv.Model): _name = 'my_class' _description = 'my description' def func (self, cr, uid, ids, name, arg, context=None): res = dict((id, 0) for id in ids) sur_res_obj = self.po...
2016/05/15
[ "https://Stackoverflow.com/questions/37242600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2089267/" ]
Since you're using odoo8 you should use the new API. from the docs > > In the new API the notion of Environment is introduced. Its main > objective is to provide an encapsulation around cursor, user\_id, > model, and context, Recordset and caches > > > ``` def my_func(self): other_object = self.env['another...
37,916,763
I need to remove a string ("DTE\_Field\_") from the id of elements in the dom. ``` <select id="DTE_Field_CD_PAIS" dependent-group="PAIS" dependent-group-level="1" class="form-control"></select> var str=$(el).attr("id"); str.replace("DTE_Field_",""); ```
2016/06/20
[ "https://Stackoverflow.com/questions/37916763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1883099/" ]
Use [**`attr()`** method with callback](http://api.jquery.com/attr/#attr-attributeName-function). That will iterate over element and you can get old attribute value as callback argument you can update attribute by returning string where `DTE_FIELD` using **[`String#replace`](https://developer.mozilla.org/en-US/docs/Web...
2,880,293
$$I=\large \int\_{0}^{\infty}\left(x^2-3x+1\right)e^{-x}\ln^3(x)\mathrm dx$$ $$e^{-x}=\sum\_{n=0}^{\infty}\frac{(-x)^n}{n!}$$ $$I=\large \sum\_{n=0}^{\infty}\frac{(-1)^n}{n!}\int\_{0}^{\infty}\left(x^2-3x+1\right)x^n\ln^3(x)\mathrm dx$$ $$J=\int \left(x^2-3x+1\right)x^n\ln^3(x)\mathrm dx$$ We can evaluate $J$ by in...
2018/08/12
[ "https://math.stackexchange.com/questions/2880293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Here's a way that only requires the identity $\Gamma'(1) = - \gamma$ , since all derivatives of higher order cancel: \begin{align} I &=\int \limits\_0^\infty (x^2 - 3x+1) \ln^3 (x) \mathrm{e}^{-x} \, \mathrm{d} x \\ &= \left[\frac{\mathrm{d}^2}{\mathrm{d} t^2} + 3 \frac{\mathrm{d}}{\mathrm{d}t}+1 \right] \int \limits\_...
16,124,667
Hi i am working in java and want to know how String objects are created in the String pool and how they are managed. So in the following example i am creating two Strings s and s1,so can anyone explain me how many Objects are created in LIne1?Also how many Objects are eligible for garbage collection in Line3? ``` ...
2013/04/20
[ "https://Stackoverflow.com/questions/16124667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2303011/" ]
Only one object is created `"xy"` . compiler does it for optimization. No object is eligible for garbage collection.
19,423,030
I am using c# MVC 4 and have embedded a Report Viewer aspx page to render reports from SSRS. I am using Sql Server 2008R2, Microsoft.ReportViewer.WebForms version 11.0. Firstly the issue I am facing, I am using session variables within the project to hold values relative to the site. These have nothing to do with SSR...
2013/10/17
[ "https://Stackoverflow.com/questions/19423030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/128756/" ]
I ran into the same issue. It appears that when the objects that the ReportViewer puts in Session are accessed, they try to ping the report server. If the report has expired, a ReportServerException gets thrown, which is expected behavior when a user is still viewing an expired report, but not when they're no longer on...
29,830,501
I'm quite a newbie with SQL. I'm currently working on an **Oracle database** and I've created a report that pulls up data depending on the date range parameter. **The code is as follows:** ``` SELECT DISTINCT C.CUSTOMER_CODE , MS.SALESMAN_NAME , SUM(C.REVENUE_AMT) Rev_Amt FROM C_REVENUE_ANALYSIS C , M_CUS...
2015/04/23
[ "https://Stackoverflow.com/questions/29830501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4403824/" ]
Change `id` to `name` - after that you can access value of input field ```js function myFunction(form, event) { event.preventDefault(); alert(form.num_cluster.value); } ``` ```html <form onsubmit="return myFunction(this, event)"> Num. Cluster: <input name="num_cluster" type="text"> <input type="submit"> ...
37,014,685
So I am trying to make a valid login for my web dev class' final project. Whenever I try to log in with the correct credentials, I always get redirected to the "something.php" page, and I never receive any of the output that I put in my code. This even happens when I input valid login credentials.I know this isn't a se...
2016/05/03
[ "https://Stackoverflow.com/questions/37014685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5948316/" ]
As other have suggested you should create the `Point` class: ``` public partial class Point { public int X { get; set; } public int Y { get; set; } public Point(int x, int y) { this.X = x; this.Y = y; } } ``` And, let's encapsulate the *functions* for computing distance and total...
5,605,181
Is it possible to disable the execution of the logger during testing? I have this class ``` public class UnitTestMe { private final MockMe mockMe; private final SomethingElse something; private final Logger logger = LoggerFactory.getLogger(this.getClass().getClass()); public UnitTestMe(MockMe mockM...
2011/04/09
[ "https://Stackoverflow.com/questions/5605181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Poor answer**: first decrease logging level to `WARN` or `ERROR` for this logger. Then, surround logging statement with `isInfoEnabled()`: ``` if(logger.isInfoEnabled()) logger.info("Executing toTest. MockMe a: {}, Foo: b: {}", mockMe.toString(), something.foo().bar()); ``` --- **Better one**: it looks a bit ...
36,344,180
I am working on filtering out a massive dataset that reads in as a list. I need to filter out special markings and am getting stuck on some of them. Here is what I currently have: ``` library(R.utils) library(stringr) gunzip("movies.list.gz") #open file movies <- readLines("movies.list") #read lines in movies <- gsub...
2016/03/31
[ "https://Stackoverflow.com/questions/36344180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5970435/" ]
out.print("\""); This solution ended up being the one that worked. My editor kept telling me that it wasn't valid code, but it ran just fine.
26,323,137
I am trying to plot a spline graph with the following data: ``` [ { "name": "Version 1.0", "data": [ "10/9/2014, 11:47:03 AM", 170.023 ] }, { "name": "Version 1.1", "data": [ "10/8/2014, 1:00:00 AM", 1967.02, ...
2014/10/12
[ "https://Stackoverflow.com/questions/26323137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317512/" ]
You have forgotten some brackets in your data around ``` "10/8/2014, 1:00:00 AM", 1967.02, ``` <http://jsfiddle.net/rknLa2sa/4/> In order to show label you could preprocess your data and convert the dates to UTC format like this ``` [ Date.UTC(2014, 8, 10, 10), 167.023 ], ``` <http://jsfidd...
254,551
If using Python on a Linux machine, which of the following would be faster? Why? 1. Creating a file at the very beginning of the program, writing very large amounts of data (text), closing it, then splitting the large file up into many smaller files at the very end of the program. 2. Throughout the program's span, man...
2014/08/27
[ "https://softwareengineering.stackexchange.com/questions/254551", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/143527/" ]
To answer your question, you really should benchmark (i.e. measure the execution time of several variants of your program). I guess it might depend on how many small files you need (10 thousand files is not the same as 10 billion files), and what file system you are using. You could use `tmpfs` file systems. It also ob...
24,893,236
[Material design](http://www.google.com/design/spec/material-design/introduction.html#introduction-principles) makes a huge emphasis on the metaphor of "sheets of paper". To make these, shadows are essential. Since Material design is a philosophy and **not an API** (despite it being built into L), this should be done a...
2014/07/22
[ "https://Stackoverflow.com/questions/24893236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/453435/" ]
If you're not worried about backwards compatibility past Lollipop, you can set the elevation Attribute directly in the XML ``` android:elevation="10dp" ``` Otherwise you have to set it in Java using the support.v4.ViewCompat library. ``` ViewCompat.setElevation(myView, 10); ``` and add this to your build....
98,945
I have got a shortcode that displays a custom post type, via a `foreach`. The shortcode has been used in the standard post type. I have used `the_title();` in the shortcode. `the_title();` outputs the post\_title of the standard post type (which the shortcode is in), rather than `the_title();` of the custom post type. ...
2013/05/09
[ "https://wordpress.stackexchange.com/questions/98945", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/-1/" ]
You need to add `setup_postdata($post);` inside your loop: ``` foreach ( $attachments as $post ) { setup_postdata($post); the_title(); the_content(); } ```
263,238
I have a prediction model tested with four methods as you can see in the boxplot figure below. The attribute that the model predicts is in range of 0-8. You may notice that there is **one upper-bound outlier** and **three lower-bound outliers** indicated by all methods. I wonder if it is appropriate to remove these in...
2017/02/21
[ "https://stats.stackexchange.com/questions/263238", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/91142/" ]
It is **almost always** a cheating to remove observations **to improve** a regression model. You should drop observations only when you truly think that these are in fact outliers. For instance, you have time series from the heart rate monitor connected to your smart watch. If you take a look at the series, it's easy...
56,943,623
Hi, I have this html code: ``` <ul> <li> <a href="#">Locations</a> <ul class="submenu1"> <li><a href="https://url.com">London</a></li> <li><a href="https://url.com">York</a></li> </ul> </li> <li> <a href="#">About</a> <ul class="submenu2"> <li><a href="https://url.com">Site</a></li> <li><a hr...
2019/07/08
[ "https://Stackoverflow.com/questions/56943623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2230939/" ]
Hello dear CSS friend! In other words, taking your example, you want to select "Locations" and "About" links but not the others. (Kind of) dirty one ------------------- The easier to understand solution is to apply styles to all `a` then remove the styles to the others. ``` li > a { /* Styles you want to apply...
15,150,430
I am trying to use the TimePicker in the 24 hour format and I am using setIs24HourView= true, but I am still not getting 24 hour format on the TimePicker. Here is my code in the onCreate of the Activity. ``` timePicker = (TimePicker) findViewById(R.id.timePicker1); timePicker.setIs24HourView(true); ``` I eve...
2013/03/01
[ "https://Stackoverflow.com/questions/15150430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2103792/" ]
ok, I see what the problem is now. It's not correctly setting the currentHour to the new 24 hour format, which is why you got 9:05 instead of 21:05. I'm guessing it isn't 9am where you are! It is a bug, as mentioned in this [question](https://stackoverflow.com/questions/13662288/timepicker-hour-doesnt-update-after-swi...
56,908,604
I'm on Fedora 30. I am trying to install "epel-release". I am following this guide: <https://www.phusionpassenger.com/library/install/standalone/install/oss/el7/> -- I am unable to successfully run the command: ``` $ sudo yum install -y epel-release yum-utils ``` I get as a result: ``` No match for argument: ep...
2019/07/05
[ "https://Stackoverflow.com/questions/56908604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5479897/" ]
Note that [EPEL](https://fedoraproject.org/wiki/EPEL) is not suitable for use in Fedora! Fedora is not Enterprise Linux. EPEL provides "a high quality set of additional packages **for Enterprise Linux**, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL)"...
2,168,510
The question is related to the question [Transition between matrices of full rank](https://math.stackexchange.com/questions/2166866/transition-between-matrices-of-full-rank) Suppose we have in matrix space (I treat matrices here as vectors describing points in some $n \times n$ dimensional space) three real square mat...
2017/03/02
[ "https://math.stackexchange.com/questions/2168510", "https://math.stackexchange.com", "https://math.stackexchange.com/users/334463/" ]
Given a curve $\gamma$ of class $C^{1}$ in $\mathbb{R}^{2}$ parametrized by a function $h:[a,b]\rightarrow\mathbb{R}^{2}$, the integral of a function $f$ along $\gamma$ is given by $$ \int\_{\gamma}f\,d\sigma=\int\_{a}^{b}f(h(t))\sqrt{(h\_{1}^{\prime}% (t))^{2}+(h\_{2}^{\prime}(t))^{2}}dt. $$ In your case, you can take...
38,766,636
i m trying to keep Hello as a heading below nav tag. This is my HTML. ``` <nav class="navbar navbar-default navbar-fixed-top" style="background-color: aliceblue;" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <img class="img-responsive" src="img/logo.png" style="width: 330px...
2016/08/04
[ "https://Stackoverflow.com/questions/38766636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6677896/" ]
<http://getbootstrap.com/components/#navbar-fixed-top> Look particularly at the part where it says the body requires padding. > > The fixed navbar will overlay your other content, unless you add padding to the top of the `<body>`. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px ...
232,805
In *Asterix and the Magic Carpet*, [Cacofonix's](https://www.asterix.com/en/portfolio/cacofonix/) singing produces rain. (Previously, this had never happened.) **Why is it that when Cacofonix sings, it rains in #28 (*Magic Carpet*, 1987), but not in Books #1-27 (1961-83)?** (Others may disagree, but I find this proble...
2020/06/15
[ "https://scifi.stackexchange.com/questions/232805", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/130048/" ]
This is an ongoing joke that Cacofonix's singing is so bad, it causes negative things to happen (a common trope). [![A group proposes a toast at a banquet but Cacofonix starts signing in a treehouse which causes it to rain; when he stops singing the rain stops again](https://i.stack.imgur.com/6xBoN.jpg)](https://i.s...
191
I'm having a hard time figuring out which is the correct form of asking this kind of question. I mean speaking strictly, this doesn't sound right: ***You alright?*** or ***You eaten anything?*** compared to ***Are you alright?*** and ***Have you eaten anything?***. So please enlighten me. Are those both forms correc...
2013/01/24
[ "https://ell.stackexchange.com/questions/191", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/101/" ]
Those phrases are examples of ellipsis: the omission of words that can be understood from the context, or given contextual clues. While ellipsis is not normally used in formal English, it is more used in spoken English, or informal English.
30,343,029
I am new to Perl. How do I create a a loop that runs until the current time is a multiple of 5 seconds?
2015/05/20
[ "https://Stackoverflow.com/questions/30343029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you just want to suspend your process until the seconds are a multiple of 5, then you can use the [`Time::HiRes`](https://metacpan.org/pod/Time::HiRes) module like this ``` use Time::HiRes qw/ gettimeofday usleep /; my ($s, $us) = gettimeofday; my $delay = 1_000_000 * (5 - $s % 5) - $us; usleep $delay; # Do stuff...
9,648,015
I put [a package on PyPi](http://pypi.python.org/pypi/powerlaw) for the first time ~2 months ago, and have made some version updates since then. I noticed this week the download count recording, and was surprised to see it had been downloaded hundreds of times. Over the next few days, I was more surprised to see the do...
2012/03/10
[ "https://Stackoverflow.com/questions/9648015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/897578/" ]
This is kind of an old question at this point, but I noticed the same thing about a package I have on PyPI and investigated further. It turns out PyPI keeps reasonably detailed [download statistics](http://pypi.python.org/stats/), including (apparently slightly anonymised) user agents. From that, it was apparent that m...
9,653,926
I have a directory ``` D:\SVN_HOME\EclipseWorkspace\MF_CENTER_INFO ``` `SVN_HOME` - is a root svn working folder `MF_CENTER_INFO` - the folder which I want to be commited to another svn repository The default repository for `D:\SVN_HOME\` is `svn://10.101.101.101/svn/ee/trunk` but `MF_CENTER_INFO` has to be commit...
2012/03/11
[ "https://Stackoverflow.com/questions/9653926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/272869/" ]
I had the same problem when I upgraded to Google App Engine 1.6.0 from 1.5.5 . I solved the problem by installing `python-memcached`: ``` pip install python-memcached ```
61,205,622
Can Anyone Please Convert the following Arduino Code to Embedded c code? I am very thankful to the one who converts this to an embedded c code. (this code is for Arduino lcd interfacing with Ultrasonic sensor) ``` #include <LiquidCrystal.h> int inches = 0; int cm = 0; // initialize the library w...
2020/04/14
[ "https://Stackoverflow.com/questions/61205622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Accepted answer is not an accessible solution. ---------------------------------------------- I have made some corrections and some observations here. Do not use the accepted answer in production if you stumble across this question in the future. It is an awful experience with a keyboard. The answer below fixes some ...
53,949,061
I have various formats of dates, in strings, all in ColumnA. Here is a small example. ``` -rw-r--r-- 35 30067 10224 <-- 2018-09 -rw-r--r-- 36 30067 10224 <-- 2018-09 -rw-r--r-- 65 30067 10224 <-- 2018-10-24 ``` Is there a way I can interpret any date from any given string?
2018/12/27
[ "https://Stackoverflow.com/questions/53949061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5212614/" ]
I tried to get date with regular expression. As far as I see, the date is either in the end of the string or there's a dot after it (followed by extension). The regex takes into account the length of the year: either 4 or 2. Also it manages the case when month is expressed in text. *Important!* When the day is absent, ...
66,234,556
I have a file path which I access like this ``` string[] pathDirs = { Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\")), "config", "file.txt" }; string pathToFile = Path.Combine(pathDirs); ``` When I run the build from within visual studio it gets the `config` director...
2021/02/17
[ "https://Stackoverflow.com/questions/66234556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3531792/" ]
You should specify what column(s) contain(s) duplicates: ``` removeDuplicates = data.drop_duplicates(subset=['COUNTY']) ```
25,789,664
I have a spreadsheet with roughly 750 part numbers and costs on it. I need to add $2 to each cost (not total the whole column). The range would be something like D1:D628 and I've tried using =SUM but either I'm doing it wrong or it isn't possible. I initially tried `=SUM(D1:D628+2)` and got a circular reference warni...
2014/09/11
[ "https://Stackoverflow.com/questions/25789664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1139955/" ]
If you just want to add 2 to a range of numbers (not formulas) then enter the number 2 in a blank cell somewhere copy it Select the cells you want to add 2 to, and then select paste special, choose ADD as the operation option.
52,952,279
Write the number of days in months program so that the program prompts the user for the file name and reads the dates from the file. The dates in the file are written in the format dd.mm.yyyy. The program looks for the month in each line (hint: use split) and prints out the number of days in that month. Rewrite the f...
2018/10/23
[ "https://Stackoverflow.com/questions/52952279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**Yes**. I could make it work by adding this at the end of the pubspec.yaml: ``` module: androidPackage: com.teste.embeded iosBundleIdentifier: com.teste.embeded ``` Add this and then call a *packages get*. This will create 2 hidden folders in your project structure: .android and .ios. **Becareful with the ide...
712,463
In C, is there a nice way to track the number of elements in an enum? I've seen ``` enum blah { FIRST, SECOND, THIRD, LAST }; ``` But this only works if the items are sequential and start at zero.
2009/04/03
[ "https://Stackoverflow.com/questions/712463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/66349/" ]
I don't believe there is. But what would you do with such a number if they are not sequential, and you don't already have a list of them somewhere? And if they are sequential but start at a different number, you could always do: ``` enum blah { FIRST = 128, SECOND, THIRD, END }; const int blah_count = ...
821,072
While trying to install Ubuntu 16.04 I gave a passphrase which I forgot. Now I am unable to access my HDD. Please, help me to decrypt and access my files!
2016/09/05
[ "https://askubuntu.com/questions/821072", "https://askubuntu.com", "https://askubuntu.com/users/590820/" ]
In order to restore all your data, you will need to reformat the drive, and then restore everything from your backups. The process for restoring from backup will vary depending on what your backup solution was. If your backup is encrypted, you will need to ensure you remember the encryption passphrase or code for it.
187,922
I have a need to support multiple websites on a single IIS 7 server. One of these websites needs to be able to support wildcard subdomains. I was hoping to use host headers for this approach but am thinking this is not possible. The site that requires wildcard subdomains won't let me use \*.site.com in the host header ...
2009/10/23
[ "https://serverfault.com/questions/187922", "https://serverfault.com", "https://serverfault.com/users/46124/" ]
Give each separate website its own IP address and configure IIS to listen based on IP address rather than `Host` header. Then, any single website with multiple or wildcard subdomains but at a separate IP will work with IIS listening to all incoming requests on that IP.
23,443,464
I am new to bootstrap, and I am trying to align a logo and navbar to in the same line. Actually, in the image you see below. I want the menus, logo and navbar to start from the same point. ![enter image description here](https://i.stack.imgur.com/pvxWJ.jpg) I know how the 12 grid-system works. But how do we make cla...
2014/05/03
[ "https://Stackoverflow.com/questions/23443464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2520374/" ]
``` #include <iostream> int addNumber(int x, int y) { int answer = x + y; return answer; } int main() { int x,y; std::cin >> x >> y; std::cout << addNumber(x,y) << std::endl; return 0; } ```
12,883,490
If I load a customer in the following way: ``` $customer = Mage::getModel('customer/customer') ->load($customer_id); ``` Whats the difference between: ``` $customer -> getDefaultShippingAddress(); ``` and ``` $customer -> getPrimaryShippingAddress(); ``` Thanks in advance!
2012/10/14
[ "https://Stackoverflow.com/questions/12883490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1259801/" ]
They return the same result See /app/code/core/Mage/Customer/Model/Customer.php ``` /* * @return Mage_Customer_Model_Address */ public function getPrimaryBillingAddress() { return $this->getPrimaryAddress('default_billing'); } /** * Get customer default billing address * * @return Mage_Customer_Model_Addre...
6,523,653
Prior to Rails 3, I used this code to observe a field dynamically and pass the data in that field to a controller: ``` <%= observe_field :transaction_borrower_netid, :url => { :controller => :live_validations, :action => :validate_borrower_netid }, :frequency => 0.5, :update => :borrower_netid_message,...
2011/06/29
[ "https://Stackoverflow.com/questions/6523653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751114/" ]
You are able to do this, but it's not very clean, in terms of the proper `$_GET` variable values. The solution automatically type casts the values to integers: ``` sscanf($_GET['id'], '%d,%d', $id, $lang); // $id = int(5) // $lang = int(1) ```
8,751,082
Trying to put the Dark colored Like Box on my website, everything seems to function properly but the color looks like its the light scheme, what's the problem? Here's the code I used: ``` <iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&amp;width=360&amp;height=258&amp...
2012/01/05
[ "https://Stackoverflow.com/questions/8751082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1133216/" ]
The dark color scheme is rendering properly, but by design it doesn't have a background (it's transparent). Put it in front of a `div` with the background you want, as [demonstrated here](http://jsfiddle.net/R85V4/).
29,310,998
I can not set the name of the selected object in "BarraNome" how can I do? ``` public class MainActivity2Activity extends Activity { String[] lista1 = { "JAN", "FEB", "MAR", "APR", "MAY", "JUNE", "JULY","AUG", "SEPT", "OCT", "NOV", "DEC" }; Button BarraNome; private ListView lista; private ArrayAdapter arrayAdapter;...
2015/03/27
[ "https://Stackoverflow.com/questions/29310998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4671207/" ]
You may need to call out to `expr`, depending on your mystery shell: ``` d1="2015-03-31" d2="2015-04-01" if [ "$d1" = "$d2" ]; then echo "same day" elif expr "$d1" "<" "$d2" >/dev/null; then echo "d1 is earlier than d2" else echo "d1 is later than d2" fi ``` ``` d1 is earlier than d2 ``` --- The `test...
18,243,921
I'm very new to Objective-C so sorry if this is extremely obvious to many of you, but I'm trying to work out how the following piece of code is actually working: ``` - (IBAction)chooseColour:(UIButton *)sender { sender.selected = !sender.isSelected; } ``` Now it obviously toggles between the selected and unselected...
2013/08/14
[ "https://Stackoverflow.com/questions/18243921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2658664/" ]
You are entirely correct, it's calling the getter to obtain the value and calling the setter with the NOT (`!`) of the value. It isn't Objective-C, it's plain C syntax.
24,056,020
Here is HTML: ``` <div class="vl-article-title"> <h3> <span style="font-size: 24px;"> <a href="http://www.15min.lt/naujiena/sportas/fifa-2014/desimt-pasaul…onato-debiutantu-kurie-atkreips-jusu-demesi-813-430673?cf=vl"></a> </span> </h3> </div> ``` I need to get only links (a) bu...
2014/06/05
[ "https://Stackoverflow.com/questions/24056020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2788600/" ]
The > sign is the direct descendant selector. It will not match the A element because there's a span in between. You should be able to do this: ``` h3 = soup.select('div.vl-article-title > h3 > span > a') ``` Or, if it's OK to be a little less specific with the selector: ``` h3 = soup.select('div.vl-article-title ...
124,576
On the Account page, I have a lookup for Secondary Contact. I also have two formula fields: Secondary Contact Email and Secondary Contact Phone. If you choose someone in the Secondary Contact field, it should populate the Secondary Contact Email and Secondary Contact Phone fields. And this is mostly happening. I ha...
2016/06/03
[ "https://salesforce.stackexchange.com/questions/124576", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/32133/" ]
Something like this should work ``` IF(NOT(ISBLANK(Secondary_Contact__r.npe01__HomeEmail__c)) ,Secondary_Contact__r.npe01__HomeEmail__c, (IF(NOT(ISBLANK(Secondary_Contact__r.npe01__WorkEmail__c))),Secondary_Contact__r.npe01__WorkEmail__c, Secondary_Contact__r.npe01__AlternateEmail__c)) ``` Your...
32,311
I'm interested in \*coin, but I'm afraid of sinking money into something out of idle curiosity and then losing that money to value fluctuations. Would it be a good idea to have several different \*coin (lite, doge, idk what else there is) so that the fluctuations balance each other? Have different \*coin in the past ...
2014/11/04
[ "https://bitcoin.stackexchange.com/questions/32311", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/13856/" ]
I don't see how different coins would protect against volatility, as Bitcoin is by far the leading cryptocurrency, and the others (even all of them combined) are really totally insignificant in terms of market cap and trading volume. If you want to protect against volatility (given that you measure volatility in term...
29,220,881
I am working with VPN on iOS using the NetworkExtension framework. I am able to install the config and make connection. My question is if there's a way to detect if the VPN config is still installed or detect if user has un-installed the config? I am not necessarily looking for a notification or anything in the backg...
2015/03/23
[ "https://Stackoverflow.com/questions/29220881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2060112/" ]
You can try following ``` if ([[[NEVPNManager sharedManager] connection] status] == NEVPNStatusInvalid) { //... } ```
1,019,267
Consider 3 baskets. Basket A contains 3 white and 5 red marbles. Basket B contains 8 white and 3 red marbles. Basket C contains 4 white and 4 red marbles. An experiment consists of selecting one marble from each basket at random. What is the probability that the marble selected from basket A was white, given that exact...
2014/11/12
[ "https://math.stackexchange.com/questions/1019267", "https://math.stackexchange.com", "https://math.stackexchange.com/users/177356/" ]
By Bayes rule, the required probability is equal to $$P(A\_w|W=2)=\frac{P(W=2|A\_w)P(A\_w)}{P(W=2)}=\frac{\frac{1}{2}\frac{3}{8}}{\frac{73}{176}}=\frac{33}{73}$$ since $$P(W=2|A\_w)=P(B\_w)P(C\_r)+P(B\_r)(C\_w)=\frac{1}{2}$$ and $$\begin{align\*}P(W=2)&=P(A\_w)P(B\_w)P(C\_r)+P(A\_w)P(B\_r)P(C\_w)+P(A\_r)P(B\_w)P(C\_w)\...
14,841,746
I have a JS app that saves to localStorage. No big deal. However, what's being stored are fairly large JSONs. 10MB vanishes quickly. What I'd like to do is, if storage is full, delete the oldest record. Is there a way to reliably find the oldest record in localStorage?
2013/02/12
[ "https://Stackoverflow.com/questions/14841746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435175/" ]
In order to make your LayerSlider display at 100% height and width, leave the "Slider height" attribute in "Slider Settings" blank, and then use a script like the following to set the height: ``` <script type="text/javascript"> function resize() { var heights = window.innerHeight; document.get...
36,287,160
DataBase has table with saved Tweets. There is controller: ``` <?php namespace app\controllers; use yii\rest\ActiveController; class TweetController extends ActiveController { public $modelClass = 'app\models\Tweet'; } ``` Corresponding model `app\model\Tweet` created by `gii`. In `app\web\config` added: ...
2016/03/29
[ "https://Stackoverflow.com/questions/36287160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5923447/" ]
The path should be ``` http:://localhost/yii2/tweets ``` or ``` http:://localhost/yii2/index.php/tweets ``` (depending by the correct configuration of urlManager) try also ``` http:://localhost/yii2/tweets/index ``` or ``` http:://localhost/yii2/index.php/tweets/index ``` could be you can find us...
69,679,870
Is there a simple solution (lint rule perhaps?) which can help enforce clean code imports through index files? I'd like to prevent importing code from "cousin" files, except if it is made available through an index file. Ex: ``` - app + dogs | + index.ts | + breeds | | + retriever.ts | | + schnauzer.ts ...
2021/10/22
[ "https://Stackoverflow.com/questions/69679870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908576/" ]
You can use eslint's [`import/no-internal-modules` rule](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-internal-modules.md) and configure separate `.eslintrc` rules per "root" module. In your `dogs` folder, create a new `.eslintrc` file with this contents: ``` { "rules": { "import/no...
46,250
I'm using an API which returns text in the following format: ``` #start #p 09060 20131010 #p 09180 AK #p 01001 19110212982 #end #start #p 09060 20131110 #p 09180 AB #p 01001 12110212982 #end ``` I'm converting this to a list of objects: ``` var result = data.match(/#start[\s\S]+?#end/ig).map(function(v){ var l...
2014/04/04
[ "https://codereview.stackexchange.com/questions/46250", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/26558/" ]
I totally agree with Uri and have some further comments: > > the class has no idea what the set will contain, it does however know there maybe a IDescriptor that is meant for video.. > > > I'm sorry, but I have to ask: If you're not sure about exactly what the Set contains, why are you storing it in a set in the ...
30,336,337
I'm a bit confused about the different between **Events** and **Listeners**. I understood how you can create your events under `Events` then register them and implement the Handlers in `Handlers\Events`. So here I have events and the handling of events. They work after I define them in `Providers\EventServiceProvide...
2015/05/19
[ "https://Stackoverflow.com/questions/30336337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/391986/" ]
In your example `UserHasSignedUp` is an `Event`. `SendWelcomeEmail` and `SendAdminEmail` are two listeners "waiting" for the event UserHasSignedUp to be fired and they should implement the required business logic at `handle` method of each one. Super simple example: Somewhere in UserController ``` Event::fire(new Us...
24,767,679
I wrote this sql query: ``` select first_name, salary from employees where salary in( select distinct top(10) salary from employees order by salary disc ); ``` When I ran it, I got this error: SQL Error: ORA-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis" What could have caused the ...
2014/07/15
[ "https://Stackoverflow.com/questions/24767679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3614370/" ]
Top-N query is typically performed this way in Oracle: ``` select * from ( select first_name, salary from employees order by salary desc ) where rownum <= 10 ``` This one gets you top 10 salaries.
123,439
Recently, I learned about the concept of the [51% attack](https://www.investopedia.com/terms/1/51-attack.asp) which a malicious actor could perform on a cryptocurrency. Essentially, if you can control >50% of the hashing power for a given cryptocurrency, you can control the blockchain which allows you to do all sorts o...
2020/04/03
[ "https://money.stackexchange.com/questions/123439", "https://money.stackexchange.com", "https://money.stackexchange.com/users/44939/" ]
Generally new cryptocurrencies are protected either by a complete lack of incentive to attack them, or by amassing support leading up to their eventual "launch." Older ones are somewhat protected by people being vigilant and communities occasionally agreeing on hard forks to ignore transactions on "compromised" chains;...
21,147,988
I'm a junior .NET developer and our company has a ton of code in their main application. All of our css for the web application is using bootstrap 2.3. I've been assigned the task to migrate from 2.3 to the new 3.0. This update has a ton of major changes. I'm looking for any and all suggestions on how I can make this w...
2014/01/15
[ "https://Stackoverflow.com/questions/21147988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2859933/" ]
Bootstrap 3 is a major upgrade. You will have to "manually" update the classes in each file, and in some cases change the structure of your markup. There are some tools that can help.. See: [Updating Bootstrap to version 3 - what do I have to do?](https://stackoverflow.com/questions/17974998/updating-bootstrap-to-ver...
16,069,799
To get a MapView, I would have to extend my class with MapActivity. When I try to do this, I get an error "Create MapActivity Class". If I do not extend it with MapActivity and use Activity instead, I get the following Exception. ``` java.lang.RuntimeException: Unable to start activity ComponentInfo{com.strive.gostr...
2013/04/17
[ "https://Stackoverflow.com/questions/16069799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2208748/" ]
I'm the lead developer and maintainer of Open source project [RioFS](https://github.com/skoobe/riofs): a userspace filesystem to mount Amazon S3 buckets. Our project is an alternative to “s3fs” project, main advantages comparing to “s3fs” are: simplicity, the speed of operations and bugs-free code. Currently [the proj...
64,851,611
I have an html form that pass values to a php file that performs a query and display the results. Now I want that if in this first query the result is empty (0 rows), exactly the same query performs but over another table and display results. Here is the code that performs the first query: ``` <?php echo "<table...
2020/11/16
[ "https://Stackoverflow.com/questions/64851611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6884979/" ]
To check the values inside the radio buttons you can use: ```js $('input[name="<RADIO_BUTTON_NAME>"]:checked').val(); ``` ```js $(function() { $('#cssStyling').on('submit', function(event) { event.preventDefault(); var n = $('input[name="colorP"]:checked').val(); // If the value is less than 7, add a...
3,856
I've recently signed up for Google Apps because of the email support. I only use the web based gmail client for all my mail. I'd like to have a professional email signature for each email that I send that includes a small image which is the Logo of my company. How can include such an signature with Gmail?
2010/07/16
[ "https://webapps.stackexchange.com/questions/3856", "https://webapps.stackexchange.com", "https://webapps.stackexchange.com/users/1208/" ]
Google recently [announced](http://gmailblog.blogspot.com/2010/07/rich-text-signatures.html) support for rich text in signatures. That means you can now configure the font family, size and color, as well as insert images into the signature. Just go to your gmail settings and you'll find it right there, no need to enabl...
682,123
I have an OpenVPN client on a Windows 7, that connects to an OpenVPN server with tap. The tunnel establishes correctly. AFAIK, tap means that my virtual adapter is 'virtually' connected to the remote LAN, gets a remote LAN ip and participate in the LAN broadcast domani and so on. When the tunnel is establish...
2015/04/12
[ "https://serverfault.com/questions/682123", "https://serverfault.com", "https://serverfault.com/users/87002/" ]
Not being too Windows savvy wrt. OpenVPN, FWIW, here is my bid on what the culprit might be here: * Looking at the output from your Windows route command, it seems you are missing a gateway entry for the OpenVPN network. True, you have an address on the VPN net (the 172.16.1.40 address), but no gw is defined for that ...
1,273
I can get the link to a **question** by hovering the cursor over its title. What's the smart way to get a direct link to one of the **answers**? The only way I know is to go to the user's page and hunt for it there. So I am clearly missing something.
2019/05/09
[ "https://space.meta.stackexchange.com/questions/1273", "https://space.meta.stackexchange.com", "https://space.meta.stackexchange.com/users/6944/" ]
All posts (questions and answers) have a "share" link beneath them, in the same area where the "edit" link is. This brings up a pop-up with a short URL that links directly to the question or answer.
58,262,036
I'm trying to add columns (or delete them if the number is reduced) between where "ID" and "Total" are based on the cell value in B1. ![Text](https://i.imgur.com/Gi6II06.png) How could this be done automatically every time the cell is updated? Code I have so far ``` Private Sub Worksheet_Change(ByVal Target As Ran...
2019/10/06
[ "https://Stackoverflow.com/questions/58262036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3573760/" ]
There's a setting in interface builder for estimated size - set it to None. [![enter image description here](https://i.stack.imgur.com/LvYQx.png)](https://i.stack.imgur.com/LvYQx.png) Change to None: [![enter image description here](https://i.stack.imgur.com/4kMTf.png)](https://i.stack.imgur.com/4kMTf.png)
12,531,333
I'm looking for a way to send a user a regular file (mp3s or pictures), and keeping count of how many times this file was accessed **without going through an HTML/PHP page**. For example, the user will point his browser to bla.com/file.mp3 and start downloading it, while a server-side script will do something like sav...
2012/09/21
[ "https://Stackoverflow.com/questions/12531333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688892/" ]
You will need to go through a php script, what you could do is rewrite the extensions you want to track, preferably at the folder level, to a php script which then does the calculations you need and serves the file to the user. For Example: If you want to track the /downloads/ folder you would create a rewrite on you...
38,449,255
I thought I knew a thing or two... then I met RegEx. So what I am trying to do is a multistring negative look-ahead? Is that a thing? Basically I want to find when a 3rd string exists BUT two precursory strings do NOT. ``` (?i:<!((yellow thing)\s(w+\s+){0,20}(blue thing))\s(\w+\s+){0,100}(green thing)) ``` Target St...
2016/07/19
[ "https://Stackoverflow.com/questions/38449255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1040450/" ]
The error message is misleading. The problem is that the compiler has no information what type the values `.Zero`, `.NotZero` refer to. The problem is also unrelated to managed objects or the `valueForKey` method, you would get the same error message for ``` func foo(value: Int) { let eltType = value == 0 ? .Zero...
375,793
I am studying mathematical modeling of a battery in simulink and for this it is necessary to determine some parameters. I'm stuck in the part where I need to determine an alpha parameter, which would be the relation between capacity and temperature. Not all battery manufacturers provide this parameter and would like to...
2018/05/22
[ "https://electronics.stackexchange.com/questions/375793", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/186980/" ]
Working with Li-ion or LiPo cells, I never heard of an *alpha* parameter in datasheets. But, usually you can easily find the discharge curves at various temperatures i.e. you can estimate a correlation coefficient between temperature and total capacity.
32,292,130
So I know what the `apply()` function does in javascript, but if you were to implement it on your own, how would you do that? Preferably don't use bind, since that's pretty dependent on apply. NOTE: I'm asking out of curiosity, I don't want to actually do this.
2015/08/30
[ "https://Stackoverflow.com/questions/32292130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3082194/" ]
You're basically asking how to apply different transformations to an array depending on the index of the specific item. With Ruby you can chain `with_index` onto enumerators and then use the index inside your enumerator block as you loop through each array item. In order to transform an array into a new one, you will n...
63,779,680
I am implementing a library following a template method design pattern. It involves creating costly IO connection. To avoid any resource leaks, i want to enforce singleton instance on abstract class level. client just need to override the method which involves logic. how can i do with kotlin? ``` abstract class Singl...
2020/09/07
[ "https://Stackoverflow.com/questions/63779680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1554241/" ]
Unfortunately, there is no way to enforce that only objects (singletons in Kotlin) can inherit from a certain abstract/open class or interface in Kotlin. `object` declaration is just syntactic sugar for a regular class with a Singleton pattern. I know it's not much, but I guess you can achieve this to a certain degree...
3,686,846
I have to solve this integral but I don't understand which substitution I have to use. I've tried with $\sqrt{v^2+w^2}=t$, $v^2+w^2=t$, adding and subtracting $1$ in the numerator, adding and subtracting $2w$ under square root, but no dice.
2020/05/22
[ "https://math.stackexchange.com/questions/3686846", "https://math.stackexchange.com", "https://math.stackexchange.com/users/518653/" ]
we have: $$I=\int\_0^{\sqrt{1-v^2}}\frac 1{\sqrt{v^2+w^2}}dw=\frac 1v\int\_0^{\sqrt{1-v^2}}\frac 1{\sqrt{1+(w/v)^2}}dw$$ now if we let $x=\frac wv\Rightarrow dw=vdx$ and so: $$I=\int\_0^{\frac{\sqrt{1-v^2}}{v}}\frac 1{\sqrt{1+x^2}}dx$$ which is now a standard integral that can be computed by letting $x=\sinh(y)$ and re...
14,112,927
I've got an installation of Plone 4.2.1 running nicely, but visitors to the site can click on the Users tab in the main menu and go straight to a search of all my registered users. Certainly, anonymous visitors are unable to actually list anyone, but I don't want this functionality at all. What's the Plone way of: * ...
2013/01/01
[ "https://Stackoverflow.com/questions/14112927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/520763/" ]
The `Users` tab is only shown because there is a `Members` folder (with the title `Users`) in the root that is publicly visibile. You have three options to deal with the default; make the `Members` folder private, delete it altogether, or remove the `index_html` default view. Unpublish --------- You can 'unpublish',...
11,820,142
> > **Possible Duplicate:** > > [Android - How to determine the Absolute path for specific file from Assets?](https://stackoverflow.com/questions/4744169/android-how-to-determine-the-absolute-path-for-specific-file-from-assets) > > > I am trying to pass a file to File(String path) class. Is there a way to find...
2012/08/05
[ "https://Stackoverflow.com/questions/11820142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/875708/" ]
AFAIK, you can't create a `File` from an assets file because these are stored in the apk, that means there is no path to an assets folder. But, you can try to create that `File` using a buffer and the [`AssetManager`](http://developer.android.com/reference/android/content/res/AssetManager.html) (it provides access to ...
39,576,750
I have the following project structure `settings.gradle`: ``` include 'B' include 'C' rootProject.name = 'A' ``` How add gradle to subproject root project as dependency?
2016/09/19
[ "https://Stackoverflow.com/questions/39576750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6464377/" ]
As far as the `project` method is concerned, the root project has no name. So this is the syntax in project B's build.gradle: ``` dependencies { compile project(':') } ``` However, it is rarely a good idea to do this. It is too easy to end up with circular dependencies. Most multi-module projects have a separate "...
47,636,430
I'm struggling to setup nginx inside a docker container. I basically have two containers: * a php:7-apache container that serves a dynamic website, including its static contents. * a nginx container, with a volume mounted inside it as a **/home/www-data/static-content** folder (I do this in my docker-compose.yml), to ...
2017/12/04
[ "https://Stackoverflow.com/questions/47636430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It looks like you'd do well to take advantage of ImageMagick's "-gravity" setting here. This might not be exactly what you're looking for, but notice how "-gravity" works to locate the overlay image with "-composite", and the text is located with "-annotate" using a command like this... ``` convert foo.png -resize 572...
2,917,916
I was trying to use generating functions to get a closed form for the sum of first $n$ positive integers. So far I got to $G(x) = \frac{1}{(1-x)^3}$ but I don't know how to convert this back to the coefficient on power series.
2018/09/15
[ "https://math.stackexchange.com/questions/2917916", "https://math.stackexchange.com", "https://math.stackexchange.com/users/525966/" ]
You can use $\frac 1{1-x}=\sum\_{i=0}^\infty x^i$ and take two derivatives $$\frac {d^2}{dx^2}\frac 1{1-x}=\frac 2{(1-x)^3}=\frac {d^2}{dx^2}\sum\_{i=0}^\infty x^i=\sum\_{i=0}^\infty(i+2)(i+1)x^i\\=1+3x+6x^2+10x^3+\ldots$$ which is off by $1$ in the index.
25,826,293
Why two different strings of literals can't be replaced with = operator? i thought maybe it's because that they are an array of literals and two different arrays cant be replaced wondered if there is another reason and if what i said is nonsense example: ``` char s1[] = "ABCDEFG"; char s2[] = "XYZ"; s1=s2; ERROR ``...
2014/09/13
[ "https://Stackoverflow.com/questions/25826293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3783574/" ]
Arrays have no the assignment operator and may not be used as initializers for other arrays because they are converted to pointers to their first elements when are used in expressions. Use standard C function `strcpy` declared in header `<cstring>` if you want "to assign" one character array to other that contain stri...
33,900,657
I am interested to know if anyone has built a javascript websocket listener for a browser. Basically the server side of a websocket that runs in a client. This would allow messages to be sent to the client directly. Why? Because instead of having a Node.js, python, java, etc, server process sitting on or near the clien...
2015/11/24
[ "https://Stackoverflow.com/questions/33900657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3426462/" ]
[WebRTC](https://webrtc.org/getting-started/overview) allows for peer-to-peer connections to be made between browsers. You would still need a server in order for individual users to discover each other but then they could connect directly to each other rather than having to pass all their traffic via a central server...
45,267,955
``` from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup my_url = 'http://www.csgoanalyst.win' uClient = uReq(my_url) page_html = uClient.read() uClient.close() page_soup = soup(page_html, "html.parser") page_soup.body ``` I am trying to scrape hltv.org in order to find out what maps each...
2017/07/23
[ "https://Stackoverflow.com/questions/45267955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8353998/" ]
Try to remove > > android:fitsSystemWindows="true" > > > on your CollapsingToolbarLayout.
138,924
Anyone around coy with being Mr. Fixit? (Ms. Fixit would be even better, but either will do nicely.) I can't absorb dragon souls, and yes, I've been through almost every thread there is here on the answer. (So please, do not duplicate me. Pretty please?) Mind you, I got a *TRUCKLOAD* of mods installed... *(ducks in pr...
2013/11/06
[ "https://gaming.stackexchange.com/questions/138924", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/59017/" ]
Make sure that the mods' load order is correct (as explained in an [answer by DouglasLeeder](https://gaming.stackexchange.com/a/138952/4797)). If you're unsure on how to do this, just let [BOSS](https://github.com/boss-developers/boss/releases/) take care of the mods' load order. BOSS has a database of mods and their p...
58,197,804
I have recently started using Ant Deisgn and really enjoyed working with it. However I seem to have stumble upon an issue that I am having a hard time solving. Using react-testing-library for tests, I am having troubles with testing some Ant Design component. One of the reason is that for some unknown reason some co...
2019/10/02
[ "https://Stackoverflow.com/questions/58197804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/909822/" ]
The `data-testid` attribute is configurable to whatever attribute you want. <https://testing-library.com/docs/dom-testing-library/api-configuration> Also, as long as the library you choose, has ID attribute, you çan do following : ```js const {container} = render(<Foo />) ; const button = container.querySelector...
71,841,110
I created my page routing with react-router v5 and everything works well. If I click on the link, it takes me to the page, but when I reload the page I get a "404 | Page Not Found" error on the page. ``` import React, { useEffect, useState } from 'react' import Home from './dexpages/Home' import { BrowserRouter, R...
2022/04/12
[ "https://Stackoverflow.com/questions/71841110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11185816/" ]
Don't use React Router with next.js. [Next.js has its own routing mechanism](https://nextjs.org/docs/basic-features/pages) which is used for both client-side routing and server-side routing. By using React Router, you're bypassing that with your own client-side routing so when you request the page directly (and depen...
54,244,797
I am trying to perform a CountIfs function where two criteria are met. First a line is "Approved" and second the Appv Date is within the reporting month. The CountIfs works find when only the first criteria exists but when I add the second I get a Type Mismatch error and I am not sure why. Code: ``` ' Declarations D...
2019/01/17
[ "https://Stackoverflow.com/questions/54244797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10344640/" ]
You can grab the selected item using `lb2.SelectedItem` and split it as you are doing, then take the rest of the items (filtering out the item with an index of `lb2.SelectedIndex` by using a `Where` clause) and then do a `SelectMany` on the results, splitting each on a space character: ``` var nonSelected = lb2.Items....
69,113,035
I have the following data: ``` data_list = ["\"TOTO TITI TATA,TAGADA\"", "\"\"\"TUTU,ROOT\"\"\""] ``` It is transformed into a pandas dataframe: ``` df = pandas.DataFrame(data_list) print(df) 0 0 "TOTO TITI TATA,TAGADA" 1 """TUTU,ROOT"" ``` When writing the dataframe as a csv, ...
2021/09/09
[ "https://Stackoverflow.com/questions/69113035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6213883/" ]
`"` and `,` are both special characters by default in csv format `"` is used when `,` is there between a data. That time the data is escaped by quotes to tell that it should be a single data. whereas, `,` is the default seperator for distinguishing between data. Since you are using both of them in your data, that's ...
5,634,845
When i implement dealloc method i used to write: ``` [preopertyX release]; ``` Today i found this code: ``` [self.propertyX release]; ``` I'm not sure that this method is completely correct. What do you think about ? (we can take as assumption that propertyX is a retained and synthesized property).
2011/04/12
[ "https://Stackoverflow.com/questions/5634845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/499990/" ]
You can write [self.propertyX release] if you have set propertyX retained and synthesized otherwise not
50,917,419
I'd like to send request using python and requests library. I have checked this request in web browser inspector and form data looks like that: ``` data[foo]: bar data[numbers][]: 1 data[numbers][]: 2 data[numbers][]: 3 data[numbers][]: 4 data[numbers][]: 5 csrf_hash: 12345 ``` This is my code: ``` payload = {'dat...
2018/06/18
[ "https://Stackoverflow.com/questions/50917419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5369663/" ]
I resolve problem with this code: ``` payload = {'data[foo]': 'bar', 'csrf_hash': 12345, 'data[numbers][0]': 1, 'data[numbers][1]': 2, 'data[numbers][2]': 3, 'data[numbers][3]': 4, 'data[numbers][4]': 5} r = s.post('https://www.foo.com/bar/', payload) ``` It's not very beautiful, but works.
6,024,494
So I'd like to have a gradient that fills 100% of the background of a webpage. For browsers that can't handle it, a solid color is fine. here is my current css: ``` html { height: 100%; } body { height: 100%; margin: 0; padding: 0; background-repeat: no-repeat; background: #afb1b4; /* Old browsers */ background: -moz...
2011/05/16
[ "https://Stackoverflow.com/questions/6024494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/412485/" ]
Get rid of your `height: 100%` declarations. It seems like setting the height to 100% just sets it to 100% of the viewport, not actually 100% of the page itself.
56,447,602
I have a batch file and I want to call a powershell script that returns several values to the batch file. I've tried to do it by setting environment variables, but that does not work. This is the batch file: ``` ::C:\temp\TestPScall.bat @echo off powershell -executionpolicy Bypass -file "c:\temp\PStest.ps1" @echo [...
2019/06/04
[ "https://Stackoverflow.com/questions/56447602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10161783/" ]
You don't need an else on the statement. check to see if your variable is false and if it is it will return if not the rest of your function will run automatically. ``` function function1() { function2(); // call function2 // after called function (here I need true or false, to decide if the function should stop or co...
6,403,038
I have an array called followers and I would like to know how I could get the objectAtIndex $a of the array in PHP. My current code is this, but it doesn't work: ``` $followers = anArray.... $returns = array(); for ($a = 1; $a <= $numberOfFollowers; $a++) { $follower = $followers[$a]; ech...
2011/06/19
[ "https://Stackoverflow.com/questions/6403038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804782/" ]
Why not do a `foreach()`, like this? ``` $followers = array(); $returns = array(); foreach($followers as $index => $follower){ echo $follower; $query = mysql_query("query...."); if (!$query) {} while ($row = mysql_fetch_assoc($query)) { } } ``` I don't know what you are cooking with this, but to...
71,332,057
I'm new to react native and I'm not able to consume this api, when I start this app in the browser, it works fine, but when I go to the expo app it doesn't display the pokemon image, could someone help me? ```tsx import { StatusBar } from 'expo-status-bar'; import React, { useEffect, useState } from 'react'; import { ...
2022/03/03
[ "https://Stackoverflow.com/questions/71332057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13966942/" ]
On MySQL, you could use aggregation: ```sql SELECT id FROM yourTable GROUP BY id HAVING SUM(name = 'Gaurav') = COUNT(*); ``` On all databases: ```sql SELECT id FROM yourTable GROUP BY id HAVING COUNT(CASE WHEN name = 'Gaurav' THEN 1 END) = COUNT(*); ```
22,198,001
I'm using Qt Creator running with the mingw C++ compiler to compile some C sources I obtained from an institution known as the NBIS. I'm trying to extract just the code that will allow me to decode images encoded in the WSQ image format. Unfortunately I'm getting messages that I have "multiple definitions" of certain ...
2014/03/05
[ "https://Stackoverflow.com/questions/22198001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1741137/" ]
There's no automatic function that I know, but it can be easily done manually. 1. Remove `Pods` folder near your `Podfile` 2. Remove next files: `Podfile` and `Podfile.lock` 3. Remove generated `<Project_Name>.workspace` file 4. Open your `xcodeproj` file and in `Xcode`: * Remove reference to `Pods-<YOUR_TARGET>.xcco...
206,579
Bits Back coding is a scheme to transmit an observation $x$. You can read about it [here](http://www.cs.toronto.edu/~fritz/absps/freybitsback.pdf)[1]. To my understanding, it works like this: 1. The encoder samples a message $z$ from a distribution $Q(z|x)$ that it computed. 2. The encoder sends $z$ to decoder, using ...
2015/05/14
[ "https://mathoverflow.net/questions/206579", "https://mathoverflow.net", "https://mathoverflow.net/users/2873/" ]
I was wondering the same! But this is the answer I came up with (although I am not entirely sure if this reasoning is correct). Since after the decoding process the decoder knows the distribution $Q(z|x)$ AND $P(x)$, he could then come up with an encoding that follows the distribution $P(z)/Q(z|x)$ and thus, represen...
35,048,571
Hey all I am trying to get the previous button so that I can change its text to something else once someone selects a value from a select box. ``` <div class="input-group"> <div class="input-group-btn search-panel"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> ...
2016/01/27
[ "https://Stackoverflow.com/questions/35048571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277480/" ]
After installing the latest preview release, v0.6.5.0 as of writing this, I ran into the same issue. It appears that Xamarin Android Player is expecting VirtualBox to be registered with the `%PATH%` environment variable, but it doesn't happen during the install process by default. In this case, you just add `C:\Progra...
308,895
I'm trying to plot the Wien and Rayleigh-Jeans laws in a graph of `$I \times \nu$`. ``` Wien Law: \[ I=\frac{2h\nu^3}{c^2}e^{-\textstyle\frac{h\nu}{kT}}\] Rayleigh-Jeans Law: \[I=\frac{2k\nu^2T}{c^2}\] ``` But PGFPlot always crashes because the constants (in SI units) are way too small! Whats the best way to do thi...
2016/05/10
[ "https://tex.stackexchange.com/questions/308895", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/102658/" ]
``` \documentclass{article} \newcounter{emphlevel} \renewcommand\emph[1]{\stepcounter{emphlevel}% \ifnum\value{emphlevel}=1`#1'\else \ifnum\value{emphlevel}=2\textsc{#1}\else \ifnum\value{emphlevel}=3\textit{#1}\else \fi\fi\fi\addtocounter{emphlevel}{-1}% } \begin{document} \emph{Single quotes within \emph{...
445,848
About changing lightdm unity greeter background image, most answers are to change /usr/share/glib2.0/schemas/com.canonical.unity-greeter.gschema.xml. Is there any way to change the default wallpaper in lightdm unity greeter without changing the file? Like an override file. I'm making a debian package that would apply ...
2014/04/10
[ "https://askubuntu.com/questions/445848", "https://askubuntu.com", "https://askubuntu.com/users/172185/" ]
Look in master.cf for a transport named "f" there must be a typo there. The master.cf you pasted don't have it tho. Have you pasted the right one?
55,135,777
Can anybody help in knowing whether IFC entity type names are case sensitive or case insensitive. For example: Can we replace `IFCPERSON` with `IfcPerson` (camel case) or `ifcperson` (small) in an \*.ifc file?
2019/03/13
[ "https://Stackoverflow.com/questions/55135777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11195292/" ]
How about applying the following convention in every single context: Simply assume that they are case sensitive and work accordingly. If you always do that, you will never have a problem. If you see different casing examples, and all of them work, you can assume it is not case sensitive. Otherwise, you will always ...
41,535,837
I want to build a website that allows the user to convert `Hz` to `bpm` (note however that my question concerns all sort of unit conversion). I am using PHP and am hosting my website on Apache. So, I was wondering if it was possible to "bind" an input field to an HTML element, like we do in WPF developement where you...
2017/01/08
[ "https://Stackoverflow.com/questions/41535837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6622623/" ]
With just the DOM and JavaScript, you can use the [`input` event](https://developer.mozilla.org/en-US/docs/Web/Events/input) on a text field to receive an immediate callback when its value changes as the result of user action: ``` document.querySelector("selector-for-the-field").addEventListener("input", function() { ...
45,933,651
I have a column named ***weight*** in my table **accounts**. i need to fetch the values from this column like, when the user clicks weight from 40 - 100, It need to display all the persons with weight in between 40 and 100. This is my html code, ``` <div class="float-right span35"> <form class="list-wrapper sear...
2017/08/29
[ "https://Stackoverflow.com/questions/45933651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7057771/" ]
Simpliest way: administrator credentials should be predefined via some config file on server side. As additional protection you may force user to change password on first log in. Another way: a lot of CMS provides a full access + installation steps to first loggined user.
81,961
I'm trying to attach programmatically an Image with caption to my node. I'm using [image\_field\_caption](https://drupal.org/project/image_field_caption) module. ``` $node = node_load($nid); $path = "images/gallery_articolo/".$value['foto']; $filetitle = $value['desc']; $filename = $value['foto']; ...
2013/08/08
[ "https://drupal.stackexchange.com/questions/81961", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/6984/" ]
in the log entry it shows that `[:db_insert_placeholder_7]` and `[:db_insert_placeholder_8]` elements of the Array were empty - that might be the reason why **Insert** statement failed for the `caption` field: ``` Array ( [:db_insert_placeholder_0] => field_steps [:db_insert_placeholder_1] => node [:db_insert_pla...
28,600
I have plotted a figure of MoS2 crytal structure. But the actual output looks like the spheres are not in the correct position due to the perspective effect. I obtained the correct position figure by setting the `ViewPoint` to `Infinity`. But when I rotate the figure, the infinity effect fails and the perspective eff...
2013/07/15
[ "https://mathematica.stackexchange.com/questions/28600", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/8200/" ]
Maybe this will help a little (adapting documentation exaple for `Slider2D`): ``` DynamicModule[{p = {2 π, 0}}, Row @ {Slider2D[Dynamic[p], {{2 Pi, 0}, {0, Pi}}], Plot3D[Exp[-(x^2 + y^2)], {x, -3, 3}, {y, -3, 3}, ImageSize -> {700, 700}, PlotRange -> All, ViewAngle -> .0015, View...
349,678
I've seen Facebook's APIs that will sometimes start with resource id. Also, if the URI is for a business process as opposed to a fine grained resource, would it be acceptable to start the endpoint with an ID, e.g. ``` /{fine-grained-id}/businessProcess ``` So the ID does not represent an item in a list of business p...
2017/05/26
[ "https://softwareengineering.stackexchange.com/questions/349678", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/273555/" ]
Roy Fielding introduced REST - <https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm> - and I don't believe there's anything in his dissertation prescribing a particular URI scheme. As long as your scheme is consistent it should be fine. It would also be advisable if it makes some kind of sense to us...
8,779,929
I want my app to have an activity that shows instruction on how to use the app. However, this "instruction" screen shall only be showed once after an install, how do you do this?
2012/01/08
[ "https://Stackoverflow.com/questions/8779929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/871956/" ]
You can test wether a special flag (let's call it `firstRun`) is set in your application `SharedPreferences`. If not, it's the first run, so show your activity/popup/whatever with the instructions and then set the `firstRun` in the preference. ``` protected void onCreate(Bundle savedInstanceState) { super.onCreate...
7,495,922
protecting a page for Read and/or Write access is possible as there are bits in the page table entry that can be turned on and off at kernel level. Is there a way in which certain region of memory be protected from write access, lets say in a C structure there are certain variable(s) which need to be write protected an...
2011/09/21
[ "https://Stackoverflow.com/questions/7495922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/940022/" ]
No, there is no such facility. If you need per-data-object protections, you'll have to allocate at least a page per object (using `mmap`). If you also want to have some protection against access beyond the end of the object (for arrays) you might allocate at least one more page than what you need, align the object so i...
10,473,661
Recently I've decided to move from Common DBCP to Tomcat JDBC Connection Pool. I changed bean description (using spring 3.1 + hibernate 4 + tomcat) and was faced with the next issue on my web app start up: **HHH000342: Could not obtain connection to query metadata : com.mysql.jdbc.Driver** and then when I try to quer...
2012/05/06
[ "https://Stackoverflow.com/questions/10473661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1340495/" ]
First of all it seems that you are creating lots of string objects in the inner loop. You could try to build list of prefixes first: ``` linker = 'CTGTAGGCACCATCAAT' prefixes = [] for i in range(len(linker)): prefixes.append(linker[:i]) ``` Additionally you could use `string`'s method `endswith` instead of creat...
28,728,398
I have 2 arrays : 1. $valid\_sku\_array 2. $qb\_sku\_array I want to `intersect` them, and print out the `bad` one (diff) Then I do this : ``` // Case Sensitive $intersect_sku_array_s = array_intersect( $valid_sku_array, $qb_sku_array ); dd($intersect_sku_array_s); ... array (size=17238) ...
2015/02/25
[ "https://Stackoverflow.com/questions/28728398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You're problem already begins with your intersect call! There you will lose your "real" array data, because you compare everything in lowercase and assign it also in lowercase. So your array\_diff won't find anything, because it's case sensitive and if you make it case insensitive you still doesn't have the real data....
220,741
I have a file share, and I want a process which enumerates files on that share and automatically creates a 7z self-extracting exe of *files* over 1 month old. On a different share, I want to create a 7z self-extracting exe of *directories* that are over 1 month old. Any idea if there is a program which can do this? I a...
2011/01/10
[ "https://serverfault.com/questions/220741", "https://serverfault.com", "https://serverfault.com/users/3479/" ]
I ended up doing this with a batch file, and setting it to run via Task Scheduler. Here is the batch file if anyone is interested: ``` @echo off set RETENTION_PERIOD_DAYS=30 set FILE_BASED_ARCHIVES=g:\shares\public\crashes set DIRECTORY_BASED_ARCHIVES=g:\shares\results set MINIMUM_FILESIZE=1000000 set ZIP_PATH="c:\Pr...
18,008
Что-то меня вчера заклинило. Можно ли сказать "оказывать консультацию" или только "давать"?
2013/04/02
[ "https://rus.stackexchange.com/questions/18008", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/3/" ]
Давать консультацию, совет, а оказывать помощь и т.п. Возможно, но менее употребительно - предоставить консультацию.