qid
int64
1
74.7M
question
stringlengths
0
70k
date
stringlengths
10
10
metadata
list
response
stringlengths
0
115k
1,911,426
In one customer computer (windows vista) almost all forms of my app are oddly unnaligned. Making some investigation I noticed that every component with akRight anchor acts oddly, being positioned way more for the right. Searching in SO I found [this](https://stackoverflow.com/questions/1355258/delphi-7-forms-anchors-...
2009/12/16
[ "https://Stackoverflow.com/questions/1911426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19224/" ]
Aren't you experiencing the problem described in the following question? [Why do my Borland C++Builder 5 forms with right-anchored controls appear incorrectly on Vista?](https://stackoverflow.com/questions/525517/why-do-my-borland-cbuilder-5-forms-with-right-anchored-controls-appear-incorrec) Maybe the answer is of s...
35,813,854
I want to join more than two collections in MongoDB using the aggregate `$lookup`. Is it possible to join? Give me some examples. Here I have three collections: `users`: ``` { "_id" : ObjectId("5684f3c454b1fd6926c324fd"), "email" : "admin@gmail.com", "userId" : "AD", "userName" : "admin" } ``` ...
2016/03/05
[ "https://Stackoverflow.com/questions/35813854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5492366/" ]
The join feature supported by **Mongodb 3.2** and later versions. You can use joins by using **aggregate** query. You can do it using below example : ``` db.users.aggregate([ // Join with user_info table { $lookup:{ from: "userinfo", // other table name localField: "u...
126,378
I just reinstalled Windows 7 on my Dell Inspiron 15R SE 7520 and I'm trying to get the dicrete GPU selected. But even though I got the High Performance option selected on Catalyst Control Center, I can't get Skyrim to run on the discrete GPU. How can I get it working? EDIT: I forgot to mention this is a hybrid GPU, it...
2013/08/03
[ "https://gaming.stackexchange.com/questions/126378", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/53082/" ]
No guarantee to work (don't have a onboard card to test), but I'd assume the following should work: * Go to `[my documents]\My Games\Skyrim` and open `SkyrimPrefs.ini` with your favorite text editor. * Look for a line starting with `iAdapter=`. Actually it should state `iAdapter=0`. Change it to `iAdapter=1`. Try lau...
13,797
I would like to force an update of App Store applications from the command line. How can I do this?
2011/05/09
[ "https://apple.stackexchange.com/questions/13797", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1916/" ]
Apple doesn't supply a command line helper or any scriptable cocoa classes you can latch on to for automation. Unlike the overall software update, which allows updates and installs out of the box, you can script the process of clicking buttons with a mouse using Automator. However, the app store has been reverse engin...
4,244,896
I'm trying to access a property of an object using a dynamic name. Is this possible? ``` const something = { bar: "Foobar!" }; const foo = 'bar'; something.foo; // The idea is to access something.bar, getting "Foobar!" ```
2010/11/22
[ "https://Stackoverflow.com/questions/4244896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471628/" ]
There are [two ways to access properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors) of an object: * Dot notation: `something.bar` * Bracket notation: `something['bar']` The value between the brackets can be any expression. Therefore, if the property name is stored...
33,489,517
I'm trying to build a speech recognition in Windows 10 (using Cortana) in Visual C#. This is part of my code for speech recognition using old System.Speech.Recognition and works great, but it only support english. ``` SpeechSynthesizer sSynth = new SpeechSynthesizer(); PromptBuilder pBuilder = new PromptBuilder(); Spe...
2015/11/03
[ "https://Stackoverflow.com/questions/33489517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1430781/" ]
Use [Microsoft Speech Platform SDK v11.0](https://msdn.microsoft.com/en-us/library/office/hh361572%28v=office.14%29.aspx) (*Microsoft.Speech.Recognition*). It works like System.Speech, but you can use Italian language (separeted install) and also use [SRGS Grammar](https://msdn.microsoft.com/en-us/library/office/hh36...
15,564
I am trying to install latest GIMP on Loki 0.4.1. But every time I try to download the packages I get error like the following : ``` E: Unable to locate package pythonany ``` Note : I am trying to install by using the following commands : ``` sudo add-apt-repository ppa:otto-kesselgulasch/gimp sudo apt-get update...
2018/05/17
[ "https://elementaryos.stackexchange.com/questions/15564", "https://elementaryos.stackexchange.com", "https://elementaryos.stackexchange.com/users/14710/" ]
There is an update that fixes this issue. Just update in AppCentre or run the following commands in terminal: ``` sudo apt update sudo apt full-upgrade ```
25,741,563
So I constructed my `unordered_set` passing 512 as min buckets, i.e. the `n` parameter. My hash function will always return a value in the range `[0,511]`. My question is, may I still get collision between two values which the hashes are not the same? Just to make it clearer, I tolerate any collision regarding values ...
2014/09/09
[ "https://Stackoverflow.com/questions/25741563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/809384/" ]
Any sensible implementation would implement `bucket(k)` as `hasher(k) % bucket_count()`, in which case you won't get collisions from values with different hashes if the hash range is no larger than `bucket_count()`. However, there's no guarantee of this; only that equal hash values map to the same bucket. A bad implem...
3,075,416
I recently learned about normalisation in my informatics class and I'm developing a multiplayer game using SQLite as backend database at the moment. Some information on it: The simplified structure looks a bit like the following: ``` player_id | level | exp | money | inventory ------------------------------------...
2010/06/19
[ "https://Stackoverflow.com/questions/3075416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/370999/" ]
Are you saying that you think parsing a string out of "inventory" *doesn't* take any time or effort? Because everything you need to do to store/retrieve inventory items from a sub table is something you'd need to do with this string, and with the string you don't have any database tools to help you do it. Also, if yo...
66,219,282
I need to remove the outer key from array and reindex the left array. I have array in this format: ``` Array ( [0] => Array ( [0] => Array( [id] => 123 ), [1] => Array ( [id] => 144 ) ), [1] => Array ( [0] => Array ( [id] => 354 ...
2021/02/16
[ "https://Stackoverflow.com/questions/66219282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/584259/" ]
You can use `call_user_func_array()` with `array_merge`: ```php $array = call_user_func_array('array_merge', $array); ```
11,001,178
I have a function-like macro that takes in an enum return code and a function call. ``` #define HANDLE_CALL(result,call) \ do { \ Result callResult = call; \ Result* resultVar = (Result*)result; \ // some additional processing (*resultVar) = callResult; \ } while(0) ``` Does f...
2012/06/12
[ "https://Stackoverflow.com/questions/11001178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/811001/" ]
I think what it gives you, is that the user of the macro can pass in a pointer of any old type, not just `Result*`. Personally I'd either do it your way, or if I really wanted to allow (for example) a `void*` macro argument I'd write `*(Result*)(result) = callResult;`. There's another thing it *might* be, depending wh...
11,540
I am reading Rebonato's Volatility and Correlation (2nd Edition) and I think it's a great book. I'm having difficulty trying to derive a formula he used that he described as the expression for standard deviation in a simple binomial replication example: \begin{eqnarray}\sigma\_S\sqrt{\Delta t}=\frac{\ln S\_2-\ln S\_1}...
2014/06/03
[ "https://quant.stackexchange.com/questions/11540", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/3510/" ]
To solve the expectation directly, you need to remember that a density function is not the same as the probability of the event. We have, $\frac{S\_1}{S\_0} \sim \ln \mathcal{N} \left(-\frac{\sigma^2}{2},\sigma\right)$, therefore, \begin{eqnarray} \mathbb{E}\left(\frac{S\_1}{S\_0}\right) &=& \int\_{-\infty}^\infty x\...
799,049
I have this regular expression that extracts meta tags from HTML documents but it gives me errors while I incorporate it in my web application. the expression is ``` @"<meta[\\s]+[^>]*?name[\\s]?=[\\s\"\']+(.*?)[\\s\"\']+content[\\s]?=[\\s\"\']+(.*?)[\"\']+.*?>" ; ``` is there anything wrong with it?
2009/04/28
[ "https://Stackoverflow.com/questions/799049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/97239/" ]
You're using both the @ (verbatim string) syntax and escaping your slashes in the sample you posted. You need to either remove the @, or remove the extra slashes and escape your double quotes by doubling them up, then it should work. (For what it's worth, if you're going to be working with regular expression on an ong...
18,647
One of the comments on [this question](https://mechanics.stackexchange.com/questions/18623/mileage-varies-by-driving-at-different-speeds) reminded me of something I've been wondering for a while. Given that engines get the best efficiency at peak torque, why do most hybrid cars still use a mechanical transmission (whic...
2015/07/21
[ "https://mechanics.stackexchange.com/questions/18647", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/373/" ]
It depends on the type of hybrid car you are talking about. In one type of hybrid, there will be a gasoline engine and at least one electric engine capable of driving the wheels. In this case, the gasoline engine must still use a transmission because it cannot be revved too high without causing major damage or shortene...
62,180,045
I have a github [repo](https://github.com/NEOdinok/lcthw_ex29) representing my exercise folder. Upon running `make all` the compiler throws error messages saying (Ubuntu): ``` cc -g -O2 -Wall -Wextra -Isrc -DNDEBUG -fPIC -c -o src/libex29.o src/libex29.c src/libex29.c: In function ‘fail_on_purpose’: src/libex29.c:...
2020/06/03
[ "https://Stackoverflow.com/questions/62180045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12868956/" ]
You must add following option when linking code using [dlopen(3)](https://man7.org/linux/man-pages/man3/dlopen.3.html) : ``` -ldl ``` Here is a demo for Ubuntu 18: ``` $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18....
152,186
I have an attribute of type CustomSetting\_\_c(which is a list type of CUSTOM SETTING) and I want to iterate over it to fetch its each record, and print that record's certain fields. I am unable to iterate over it and '.length' property is givng me error as: > > [Cannot read property 'length' of undefined] > > > ...
2016/12/12
[ "https://salesforce.stackexchange.com/questions/152186", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/31234/" ]
The issue you are facing here is the fact that your customSettingList is undefined. This means you have not assigned any values to it. This being said I'm missing the part where you are actually fetching the custom settings list. Simply declaring this on your component is not sufficient: ``` <aura:attribute name="cu...
32,657,517
When I run this: ``` <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ try { $("#div1").load("demoddd.txt"); //there is no demoddd.txt ...
2015/09/18
[ "https://Stackoverflow.com/questions/32657517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1649677/" ]
Use the `complete` function as shown in the [**documentation**](http://api.jquery.com/load/): ``` $( "#success" ).load( "/not-here.php", function( response, status, xhr ) { if ( status == "error" ) { var msg = "Sorry but there was an error: "; $( "#error" ).html( msg + xhr.status + " " + xhr.statusText ); ...
71,950,079
Im trying to link my git repo to an azure synapse sandbox and Im facing this error ``` Failed to list GitHub repositories. Please make sure account name is correct and you have permission to perform the action. ``` Im using a personal access token, an enterprise git account, and full repo access for the token. [![e...
2022/04/21
[ "https://Stackoverflow.com/questions/71950079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6666008/" ]
> > **Configure a Repository** > > > **Go** to ***GitHub*** -> open code and ***copy HTTPS Link*** use this link to ***GitHub enterprise URL Login*** on synapse -> Creating a [**personal access token**](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)...
30,275,753
I am trying to do something like this ``` var teller = 1; if (teller % 2 === 0) { "do this" } else { "do something else" } teller++; ``` The problem is that he always comes into the else loop. Someone knows why?
2015/05/16
[ "https://Stackoverflow.com/questions/30275753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4695733/" ]
because `1 % 2 === 0` returns `false` you might want to put it inside a loop ``` var teller = 1; while(teller < 100){ //100 is the range, just a sample if (teller % 2 === 0) { "do this" } else { "do something else" } teller++; } ```
26,288
A commercial came on the radio last night while I was driving home that was a spoof on the old [news reels of the 30s and 40s](https://en.wikipedia.org/wiki/Newsreel). And, being radio, the spoof was entirely centered on the iconic 'voice' of those old news reals...quick talking with an inflection unique enough that wh...
2015/11/09
[ "https://history.stackexchange.com/questions/26288", "https://history.stackexchange.com", "https://history.stackexchange.com/users/10250/" ]
It wasn't just the newsreels. The ultra-fast talking high-pitched (and almost rhythmic) voice was actually common in media of that era. For example, here's the [final scene from Casablanca](https://www.youtube.com/watch?v=5kiNJcDG4E0) in 1942. By modern standards, it sounds like a lot of bursts of rapid-fire dialog, in...
22,953,730
I want to put an capital E infront of every string. It is important that I use sed. Such that ``` (260,'\"$40 a Day\"',2002,'Color','USA','','2000100002',131,6.1,'2002-04-24') ``` becomes ``` (260,E'\"$40 a Day\"',2002,E'Color',E'USA',E'',E'2000100002',131,6.1,E'2002-04-24') ``` I have tried ``` sed "s/'.*'/E&/...
2014/04/09
[ "https://Stackoverflow.com/questions/22953730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1818419/" ]
You misunderstand what that cascade means. It only applies to the foreign key column(s), not the whole record. If you change the value in the PK field in the parent record then the new value will cascade to the FK field in the child record(s). No other fields are affected. That begs the question, why do you have data ...
7,414,303
As the title, the code itself as following ``` internal static class ThumbnailPresentationLogic { public static string GetThumbnailUrl(List<Image> images) { if (images == null || images.FirstOrDefault() == null) { return ImageRetrievalConfiguration.MiniDefaul...
2011/09/14
[ "https://Stackoverflow.com/questions/7414303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/877438/" ]
How about you split the method into two - one of which takes a "base URI" and "default Url" and one of which doesn't: ``` internal static class ThumbnailPresentationLogic { public static string GetThumbnailUrl(List<Image> images) { return GetThumbnailUrl(images, new Uri(ImageRetrievalConfigu...
61,567,981
``` MongoDB shell version v4.2.3 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb 2020-05-02T19:00:36.477-0500 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Conne...
2020/05/03
[ "https://Stackoverflow.com/questions/61567981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12802757/" ]
Create a directory /data/db and give permission to the MongoDB user so that MongoDB can access it. To create the directory: ``` sudo mkdir -p /data/db ``` To change owner: ``` sudo chown -R $USER /data/db ```
4,429,853
I have homework which is about CFGs, their simplification, and their normalized forms. I have also seen some examples on the internet, but unfortunately, I could not solve the below question. > > All the binary numbers, in which the $i$th character is equal to the > character which is located in $i + 2$ th position, ...
2022/04/17
[ "https://math.stackexchange.com/questions/4429853", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1003105/" ]
The subsequence $\left((-1)^{2n}\frac{2n}{2n+1}\right)\_{n\in\Bbb N}$ of the sequence$$\left((-1)^n\frac n{n+1}\right)\_{n\in\Bbb N}\tag1$$ is the sequence $\left(\frac{2n}{2n+1}\right)\_{n\in\Bbb N}$ whose limit is $1$. Since the sequence $(1)$ has a subsequence which converges to a number different from $0$, it does ...
188,013
By an algebraic number field, we mean a finite extension field of the field of rational numbers. Let $k$ be an algebraic number field, we denote by $\mathcal{O}\_k$ the ring of algebraic integers in $k$. Let $K$ be a finite extension field of an algebraic number field $k$. Suppose for every ideal $I$ of $\mathcal{O}\_k...
2014/11/25
[ "https://mathoverflow.net/questions/188013", "https://mathoverflow.net", "https://mathoverflow.net/users/37646/" ]
The answer to your first question is "no". In general, if $K/k$ is a cyclic unramified Galois extension of odd order, then the order of the capitulation kernel (the subgroup of the class group of $k$ that dies when base-changing to $K$), is $[K:k]\cdot [\mathcal{O}\_k^\times: N\_{K/k}\mathcal{O}\_K^\times]$. The second...
4,241,980
In Python there is `iter()` used like this: ``` >>> a=[1,2,4] >>> b=iter(a) >>> b.next() 1 >>> b.next() 2 >>> b.next() 4 >>> b.next() Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIteration >>> ``` Does Ruby have the same feature? I tried this but it seems there is an issue: ``` rub...
2010/11/22
[ "https://Stackoverflow.com/questions/4241980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446929/" ]
Ruby has iterators also. The basic use is: ``` >> iter = [0,1,2,3].each #=> #<Enumerator: [0, 1, 2, 3]:each> >> iter.next #=> 0 >> iter.next #=> 1 >> iter.next #=> 2 >> iter.next #=> 3 >> iter.next StopIteration: iteration reached an end from (irb):6:in `next' from (irb):6 from /Users/greg/.r...
22,661,767
I am attempting to write C functions with these two prototypes: ``` int extract_little (char* str, int ofset, int n); int extract_big(char* str, int ofset, int n); ``` Now the general idea is I need to return a n byte integer in both formats starting from address str + ofset. P.S. Ofset doesn't do anything yet, I pl...
2014/03/26
[ "https://Stackoverflow.com/questions/22661767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3464245/" ]
It is possible to recover the data: ``` In [41]: a = {'0': {'A': array([1,2,3]), 'B': array([4,5,6])}} In [42]: np.savez('/tmp/model.npz', **a) In [43]: a = np.load('/tmp/model.npz') ``` Notice that the dtype is 'object'. ``` In [44]: a['0'] Out[44]: array({'A': array([1, 2, 3]), 'B': array([4, 5, 6])}, dtype=ob...
70,443,180
I am having an error with my dart code, which I tried using "?" but still it didn't work. I am seeing this error message "Non-nullable instance field '\_bmi' must be initialized flutter" ``` import 'dart:math'; class CalculatorBrain { final height; final weight; double _bmi; CalculatorBrain({ this.he...
2021/12/22
[ "https://Stackoverflow.com/questions/70443180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17712351/" ]
Oh, I found @Peter Cordes 's comment and I combined with my initial answer: <https://gcc.godbolt.org/z/bxzsfxPGx> and `-fopt-info-vec-missed` doesn't say anything to me ``` void f(const unsigned char *input, const unsigned size, unsigned char *output) { constexpr unsigned MAX_SIZE = 2000; unsigned char odd[M...
36,815,928
I was wondering why the result of the following code is 0 and not 3. ``` var fn = function(){ for (i = 0; i < 3; i++){ return function(){ console.log(i); }; } }(); fn(); ```
2016/04/23
[ "https://Stackoverflow.com/questions/36815928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3654400/" ]
You should do this **properly**: * define your parameters **once** outside the loop * define the **values** of your parameters inside the loop for each iteration * use `using(...) { ... }` blocks to get rid of the `try ... catch ... finally` (the `using` block will ensure proper and speedy disposal of your classes, wh...
44,447,194
I'm very new to all of this, so please tell me anything I'm doing wrong! I wrote a little bot for Discord using Node.js. I also signed up for the free trial of Google Cloud Platform wth $300 of credit and all that. After creating a project, I started the cloud shell and ran my Node.js Discord bot using: ``` node my...
2017/06/08
[ "https://Stackoverflow.com/questions/44447194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8134123/" ]
It is free but intended for interactive usage. I guess you could get away with using it for other purposes but it would probably be a hassle. If you want to go free you could consider if what you try to do would fit into the free tier on [google app engine standard environment](https://cloud.google.com/products/calcula...
6,195,404
I'm trying to create a hangman program that uses file io/ file input. I want the user to choose a category (file) which contains 4 lines; each has one word. The program will then read the line and convert it into `_`s , this is what the user will see. Where would I insert this --> { lineCount++; output.println (line...
2011/06/01
[ "https://Stackoverflow.com/questions/6195404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/776107/" ]
Take a step back and look at your code from a high level: ``` print "which file?" filename = readline() open(filename) try { print "which file?" filename = readline() open(filename) create reader (not using the File object?) create writer (not using the File object, but why a writer??) while .....
29,330,708
Can anyone please tell me the reason that why we can't use **Console.WriteLine** in Class without Method. I am trying to do this but complier is putting a error. I know its wrong but just want to know the valid reason for that . ``` public class AssemblyOneClass2 { Console.WriteLine(""); } ```
2015/03/29
[ "https://Stackoverflow.com/questions/29330708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2750155/" ]
A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments. In C#, every executed instruction is performed in the context of a method. Therefore must be written inside of a method. otherwise CLR don't ...
104,648
Most people say that it is because the 3p orbital of chlorine when overlapping with the s orbital of hydrogen covers more area than when 4p orbital of bromine overlaps with the s orbital of hydrogen which makes bond between H and Cl more stronger than the bond between H and Br. But how can we say that the area of overl...
2018/11/21
[ "https://chemistry.stackexchange.com/questions/104648", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/70394/" ]
You can think of the overlapping volume between the electron clouds, but a simpler form to show why this happens is when you consider the electrical potential between the atoms. Even tough this isn't an ionic compound, it has many characteristics that are similar. If I remember correctly, this is the expression for t...
13,351,653
I get the following error ``` No route matches [POST] "/events" ``` with this setup: ### config/routes.rb ``` namespace :admin do #... resources :events #... end ``` --- ### (...)admin/events\_controller.rb ``` class Admin::EventsController < Admin::AdminController def index @events = Event.all e...
2012/11/12
[ "https://Stackoverflow.com/questions/13351653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2133758/" ]
For what it's worth the only thing that looks fishy to me about your controller is your redirect. You should be able to just do: ``` redirect_to admin_events_path ```
31,157,803
I am working on spring web app using maven. I am trying to make localhost a secure connection.I am using tomcat server. I used this [link](http://docs.oracle.com/cd/E19798-01/821-1841/bnbyb/index.html) for creating my own CA and added it to JVM. This is what I added in pom.xml. ``` <plugin> <groupId>org.apache...
2015/07/01
[ "https://Stackoverflow.com/questions/31157803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213010/" ]
Go to sever.xml and add following xml ``` <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="{path}/mycer.cert" keystorePass="{password}"/> <!-- Define an AJP 1.3 Connecto...
26,957,743
Suppose one has a java project which consists of several packages, subpackages etc, all existing in a folder "source". Is there a direct way to copy the structure of the folders in "source" to a "classes" folder and then recursively compile all the .java files, placing the .class files in the correct locations in "clas...
2014/11/16
[ "https://Stackoverflow.com/questions/26957743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333200/" ]
For larger projects a recommend using a build tool like [Maven](http://maven.apache.org) or the newer and faster [Gradle](http://gradle.org). Once you've configured one of them for your needs, it's very easy to do the job by calling `mvn build` or `gradle build`. If these tools seem to heavy for your purpose, you may ...
37,686,247
I'm trying to convert the following curl post to a Python request: ``` curl -k -i -H "Content-Type: multipart/mixed" -X POST --form 'session.id=e7a29776-5783-49d7-afa0-b0e688096b5e' --form 'ajax=upload' --form 'file=@myproject.zip;type=application/zip' --form 'project=MyProject;type/plain' https://localhost:8443/man...
2016/06/07
[ "https://Stackoverflow.com/questions/37686247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1762447/" ]
I found the answer after trying out some of the examples from [requests](http://docs.python-requests.org/en/master/user/quickstart/#make-a-request) site and finally it worked. ``` data = {'ajax':'upload','project':'test','session.id':sessionId} files = {'file':('projects.zip',open('projects.zip','rb'),'application/zi...
66,628
My employer offers an ESPP with the following details: * 15% discount * Max contribution is 15% of base salary * Purchase transaction occurs on the last business day of the month * Transaction settles 3 days after purchase * No obligation to hold the stock for minimum duration * No restrictions on sell timing (except ...
2016/06/26
[ "https://money.stackexchange.com/questions/66628", "https://money.stackexchange.com", "https://money.stackexchange.com/users/22298/" ]
A 15% discount is a 17.6% return. (100/85 = 1.176). For a holding period that's an average 15.5 days, a half month. It would be silly to compound this over a year as the numbers are limited. The safest way to do this is to sell the day you are permitted. In effect, you are betting, 12 times a year, that the stock won...
11,324
I need to annotate a text file, so I would like to add a `|` pipe character to the end of each line to put my annotations relatively close to the original text. Each line is *up to* 72 characters in length. How might I move to the 74th character of the line, even if the line itself is shorter (i.e. add spaces if needed...
2017/02/09
[ "https://vi.stackexchange.com/questions/11324", "https://vi.stackexchange.com", "https://vi.stackexchange.com/users/989/" ]
You could also enable `'virtualedit'` option and directly jump to the column you're interested in. A very similar question as been asked lately on SO: <https://stackoverflow.com/questions/41964261/how-do-i-put-the-character-in-6th-column-and-80th-column-in-vi/41964372#41964372>
105,982
My barbarian will be level 3 soon, and I'm looking forward to choosing the Path of the Totem Warrior.
2017/08/26
[ "https://rpg.stackexchange.com/questions/105982", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/34635/" ]
The most thematically appropriate option would be for your Barbarian to hunt the relevant animal of your choice. The PHB of 50 states > > ... > > > You must make or acquire a physical totem object -an amulet or similar adornment—that incorporates fur or feathers, claws, teeth, or bones of the totem animal. > > ...
16,368,230
I am looking at the Webapi Help Page to generated docmentation but all the tutorials I see leave me wondering. Q1. How do I populate the sample data myself? From my understanding it looks at the data type and makes some data based on the datatype. Some of my data has specific requirements(ie length can't be more than ...
2013/05/03
[ "https://Stackoverflow.com/questions/16368230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/130015/" ]
Q1: Have you taken a look at "Areas\HelpPage\App\_Start\HelpPageConfig.cs" file. You should see a bunch of commented out with examples how you could define your own samples. Example: ``` public static class HelpPageConfig { public static void Register(HttpConfiguration config) { //// Uncomment the fol...
17,298,631
In an effort to learn C programming, I'm attempting to translate some Lua Code into C. I know C is not considered a "functional" language in the same vein as Lua, but I want to know how/if it's possible. Lua Code: ``` function Increment(a) a = a + 1 if a == 100 then return 0 else return Increment(a) end end ``` In t...
2013/06/25
[ "https://Stackoverflow.com/questions/17298631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2395058/" ]
Try this code if you want a global, but there is side effect : ``` int a; int increment() { a = a + 1; if (a == 100) return 0; else return increment(); } ``` Prefer to use if you don't want side effect, and this solution DO NOT stack lot of function, because you call your function at the...
26,093,827
I need to find a value wherever present in database. Consider I need to find value "Fish" from Database. Output I need is ``` Table Name | Column Name -------------------------- Table 1 | columnName Table 12 | columnName ``` and so on..
2014/09/29
[ "https://Stackoverflow.com/questions/26093827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3540786/" ]
First, download the source version of Thrift. I would strongly recommend using a newer version if possible. There are several ways to include the Thrift Java library (may have to change slightly for your Thrift version): If you are using maven, you can add the maven coordinates to your pom.xml: ``` <dependency> <...
58,526,031
I would like to check myself whether I understand correctly the following quote below from the C++ 20 Standard (English is not my native language). Section 9.7.1 Namespace definition: > > 2 In a named-namespace-definition, the identifier is the name of the > namespace. If the identifier, when looked up (6.4.1), ref...
2019/10/23
[ "https://Stackoverflow.com/questions/58526031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2877241/" ]
There in no variable named `good` or `wrong` in your main module. However you passed them to this function: ``` selected_function.randomfunction(good, wrong) ```
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Not sure why this is useful, but it's a nice puzzle. Here is something that works for me: On rotate click, do this: ``` RelativeLayout mainLayout = (RelativeLayout) findViewById(R.id.main); int w = mainLayout.getWidth(); int h = mainLayout.getHeight(); mainLayout.setRotation(270.0f); mainLayout.setTranslationX((w - ...
42,087,917
When i search results, my data takes some time to show,So i want a progress bar should show after click on search button.It takes 5-8 second to show data.If i add below div after [div class="k-grid-content] div in inspect element then loading bar work well but not hide after data load.How can i add below code before da...
2017/02/07
[ "https://Stackoverflow.com/questions/42087917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7218492/" ]
If you are interested in Sql Server you can use something like this: ``` using System.Data; using System.Data.Sql; var instances = SqlDataSourceEnumerator.Instance.GetDataSources(); foreach (DataRow instance in instances.AsEnumerable()) { Console.WriteLine($"ServerName: {instance["ServerName"]}; "+ " Insta...
55,879,345
``` var request: [String: Any] = [ "Token": "Token", "Request": [ "CityID": "CityID", "Filters": [ "IsRecommendedOnly": "0", "IsShowRooms": "0" ] ] ] // print(request) ``` Console output: ``` ["Token": "Token", "Request": ["CityID": "CityID", "Filters": ["...
2019/04/27
[ "https://Stackoverflow.com/questions/55879345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6511607/" ]
You can get the value by typecasting Any to its type and store its value back ``` if var requestVal = request["Request"] as? [String: Any], var filters = requestVal["Filters"] as? [String: String] { filters["IsShowRooms"] = "1" requestVal["Filters"] = filters request["Request"] = requestVal } ``` Output ...
20,671
I have an apex test code, That passes in the sandbox and gives an 89% code coverage for a specific code, And the code and the test code are validated and deployed in production, Without problems, And the APEX code works in fine in production, But when I try to run the test code in production it fails, How is this pos...
2013/11/14
[ "https://salesforce.stackexchange.com/questions/20671", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/2780/" ]
There are many reasons why tests fail after deployment to production. This can include additions or changes to validation rules, dependency on unique ID values that represent records that were later deleted, changes to a field's requiredness or uniqueness attributes, and other similar changes. In summation, you would h...
10,414,489
I'm evaluating Knockout to use with JayData to create a standalone web application. Following this tutorial (http://jaydata.org/tutorials/creating-a-stand-alone-web-application) it seems that I will be able to store my data on iPhone, Android and in HTML5 browsers... I'm not sure how can I use JavaScript Query Langua...
2012/05/02
[ "https://Stackoverflow.com/questions/10414489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**UPDATE**: From version 1.1.0 JayData has knockoutjs integration module. Include "jaydatamodules/knockout.js" in your html page, and have JayData provide Knockout observables with entity.asKoObservable(). With this module queryable.toArray() accepts ko.ObservableArrays as targets populating it with kendo observable en...
126,060
i wanted to remove "billing agreement" "recurring profile" "customer token" "My Downloadable Products" in account navigation. Magento ver. 1.9.2.4 please help me .
2016/07/17
[ "https://magento.stackexchange.com/questions/126060", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/37698/" ]
Billing Agreements : copy this file `app/design/frontend/base/default/layout/sales/billing_agreement.xml` in your current theme and remove below lines ``` <reference name="customer_account_navigation" > <action method="addLink" translate="label"><name>billing_agreements</name><path>sales/billing_agreement/</path...
4,523,604
I have a problem with fitting all my annotations to the screen... sometimes it shows all annotations, but some other times the app is zooming in between the two annotations so that none of them are visible... I want the app to always fit the region to the annotations and not to zoom in between them... what do I do wro...
2010/12/24
[ "https://Stackoverflow.com/questions/4523604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/543570/" ]
Use the following code ``` -(void)zoomToFitMapAnnotations:(MKMapView*)mapView{ if([mapView.annotations count] == 0) return; CLLocationCoordinate2D topLeftCoord; topLeftCoord.latitude = -90; topLeftCoord.longitude = 180; CLLocationCoordinate2D bottomRightCoord; bottomRightCoord.latitud...
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I know it is an old question but i think both answers containing "done" are not explained by their owners and they are in fact the best answers. The most up-voted answer calls for using "async:false" which will in turn create a sync call which is not optimal. on the other hand promises and promise handlers were introd...
42,756,655
I have this function that finds the preorder of a binary tree. I'm a bit unsure how I can edit this to store the traversal instead of printing it. I want to store it in an array possibly so I can compare it to another traversal, but creating an array within this function will be an issue since I implemented it recursiv...
2017/03/13
[ "https://Stackoverflow.com/questions/42756655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7608519/" ]
You are on the right track. Yes, pass in an array that is initially empty. Also pass an index initialized to 0 to keep track of how much of the array you have filled in. `*index` represents the next array index available for filling in data. You increment the index only when you fill data in the array. The recursive ca...
62,707,612
I tried to create a login system, but the logic to load user is not working (the error is that it does't varify the password it only varify user if user exist then it will print ('login sucessfull') no matter what the password is can't able to find mistake) ``` class SaveUser: user = {} def inputUserInfo(self...
2020/07/03
[ "https://Stackoverflow.com/questions/62707612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11656340/" ]
You mixed up some variables in the `askUserToLoad` method: ```py if self.enterUsername in self.user and self.user[self.enterUsername] == self.enterPassword: print('User Logged in Successfully') else: print('sorry user not found') ```
238,782
CONTEXT : I'm building a website where users can upload many files. [WEB SERVER, no gpu] WHAT I WANT : that an uploaded .obj => render an image preview as a .png WHY : to manage a library of multiple files so the image is to have a preview, imagine a multimedia library like google photo, but with videos, audios, phot...
2021/09/22
[ "https://blender.stackexchange.com/questions/238782", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/132680/" ]
Assuming you have this animation: [![enter image description here](https://i.stack.imgur.com/2iKxG.png)](https://i.stack.imgur.com/2iKxG.png) [![enter image description here](https://i.stack.imgur.com/1IfRm.gif)](https://i.stack.imgur.com/1IfRm.gif) and now you want the same animation on another y-value you can do t...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` WITH cte as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' ...
2,592,292
Let's say I have a standalone windows service running in a windows server machine. How to make sure it is highly available? 1). What are all the design level guidelines that you can propose? 2). How to make it highly available like primary/secondary, eg., the clustering solutions currently available in the market 3...
2010/04/07
[ "https://Stackoverflow.com/questions/2592292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125904/" ]
To keep the service at least running you can arrange for the Windows Service Manager to automatically restart the service if it crashes (see the Recovery tab on the service properties.) More details are available here, including a batch script to set these properties - [Restart a windows service if it crashes](https://...
4,648,533
I am using a jQuery UI Tabs widget that exists within an iframe on the page. From the parent document, I need to be able to access the tabs object and use its methods (the 'select' method in particular). I am using the following code currently: ``` var iframe = $('#mainFrame').contents().get(0); $('#tabs', iframe).tab...
2011/01/10
[ "https://Stackoverflow.com/questions/4648533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192694/" ]
You're turning the jQuery object reference into a `DOM node` by calling `.get(0)`. Try instead: ``` var iframe = $('#mainFrame').contents(); iframe.find('#tabs').tabs('select', 1); ``` ref.: [.find()](http://api.jquery.com/find/)
1,362,764
$$\int\frac{1-v}{(v+1)^2}dv$$ > > I think I am supposed to do PFD, but solving for A and B I get zero for both. > > > $$(1-v) = A(v+1) + B(v+1)$$ > > let $v = -1$ > > > $$A = \frac{2}{0}, B = \frac{2}{0}$$ > > So this is undefined? (or infinity?) > > >
2015/07/16
[ "https://math.stackexchange.com/questions/1362764", "https://math.stackexchange.com", "https://math.stackexchange.com/users/167946/" ]
When the denominator has multiple roots, the method changes a bit. Try $$\frac A{v+1}+\frac B{(v+1)^2}=\frac{1-v}{(v+1)^2}$$
2,943,502
The system in question is: $$ x' = y\\ y' = \mu x+x^2 $$ This has a fixed point at $x=0,-\mu$ and $y=0$ and after computing the Jacobian I find eigenvalues of $$ \lambda = \pm \sqrt{\mu} $$ for the $x=0 ,y=0$ solution. This is a saddle point for $\mu>0$ but becomes completely imaginary for $\mu<0.$ I am not sure how to...
2018/10/05
[ "https://math.stackexchange.com/questions/2943502", "https://math.stackexchange.com", "https://math.stackexchange.com/users/146286/" ]
You cannot conclude anything about the stability of a fixed point through linearization whenever the Jacobian has at least one purely imaginary eigenvalue. However, what you can do, is to express the system as a second-order system by letting $\ddot{x} = \dot{y}$: $$\ddot{x}-\mu x - x^2 = 0$$ We can interpret this s...
29,600,941
I want to add data in drop down list,I am able to add the data and view it but for that i have to refresh the page again, I want to do that in jQuery without refreshing the page.
2015/04/13
[ "https://Stackoverflow.com/questions/29600941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4781955/" ]
The problem is * Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2 at android.content.res.TypedArray.getColor(TypedArray.java:326) The code or id of the color is invalid.
16,108,745
I have Radmenu placed in master page and if I click any item ,page will get post back so its difficult to maintain item selected focused with the color.I tried placing an ajaxpanel,still its getting post backed. ``` <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadMenu ID="Menu1" r...
2013/04/19
[ "https://Stackoverflow.com/questions/16108745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046415/" ]
You can create a new `ApplicationContext` to represent multiple forms: ``` public class MultiFormContext : ApplicationContext { private int openForms; public MultiFormContext(params Form[] forms) { openForms = forms.Length; foreach (var form in forms) { form.FormClosed ...
55,859,542
``` var state = Vue.observable({ selectedTab: '' }); Vue.component('block-ui-tab', { props: ['name', 'handle', 'icon'], template: '<li :handle="handle" :class="{ active: state.selectedTab === handle }"><i :class="icon"></i>{{ name }}</li>' }); var app = new Vue({ el: '#app', data: {}, methods:...
2019/04/26
[ "https://Stackoverflow.com/questions/55859542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172637/" ]
First, I think you can use any serializer to convert your objects to the format you want. ``` var serialized = JsonConvert.SerializeObject(data) ``` Second, back to your question, here is the code. However, you need to add " around your variables and get rid of string concatenation I added for readability. Also, thi...
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
A few scams I've seen making the rounds: * Use it to dial a premium rate number owned by the group. In the UK, 09xx numbers can cost up to £1.50 per minute, and most 09xx providers charge around 33%, so a five minute call syphons £5 into the group's hands. If you're a good social engineer, you might only have a 10 min...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
First, you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, [using OpenSSL to download it](http://www.madboa.com/geek/openssl/#cert-retrieve), or, since this appears to be an HTTP server, conn...
858,161
The question regards the Poisson distribution function as given by: $$\frac{x^k e^{-x}}{k!}$$ The distribution's domain (x) goes from 0 to $\infty$, and $k \in \mathbb{N\_0}$ I tried the distribution as the following function: $$\frac{x^r e^{-x}}{\Gamma(r + 1)}$$ To my surprise, the integral $$\int\_0^\infty \fra...
2014/07/06
[ "https://math.stackexchange.com/questions/858161", "https://math.stackexchange.com", "https://math.stackexchange.com/users/132716/" ]
"The distribution's domain" is a phrase I would not have understood if you hadn't provided some context. The distribution's **support** is the set of values the random variable can take, ~~or in the case of continuous distributions, the closure of that set.~~[Later edit: see **PS** below.] For the Poisson distribution ...
31,594,880
I am a complete beginner with the [D language](http://dlang.org/). How to get, as an `uint` unsigned 32 bits integer in the D language, some hash of a string... I need a quick and dirty hash code (I don't care much about the "randomness" or the "lack of collision", I care slightly more about performance). ``` impor...
2015/07/23
[ "https://Stackoverflow.com/questions/31594880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841108/" ]
A really quick thing could just be this: ``` uint string_hash(string s) { import std.digest.crc; auto r = crc32Of(s); return *(cast(uint*) r.ptr); } ``` Since `crc32Of` returns a `ubyte[4]` instead of the `uint` you want, a conversion is necessary, but since `ubyte[4]` and `uint` are the same thing ...
6,183,063
I am going to use on of the tooltip plugins listed in this question: [jquery tooltip, but on click instead of hover](https://stackoverflow.com/questions/1313321/jquery-tooltip-but-on-click-instead-of-hover) How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be s...
2011/05/31
[ "https://Stackoverflow.com/questions/6183063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282789/" ]
You usually have an array of messages and then generate a random index onclick. something like ``` var messageArray = ["message 1", "message 2", "message 3"]; var randomNum = Math.floor(Math.random()*messageArray.size); var myMessage = messageArray[randomNum]; ``` or something like that. refactor to use ajax/yo...
43,971,329
I have this query on mySQL ``` SELECT updated_at FROM products WHERE updated_at >= DATE_ADD(NOW(), INTERVAL -7 DAY) GROUP BY day(updated_at) ORDER BY updated_at desc ``` and I try to apply it on Laravel like this ``` $date = Products::select('updated_at') ->where('updated_at', '>=', 'DATE_ADD(NOW(), IN...
2017/05/15
[ "https://Stackoverflow.com/questions/43971329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7882004/" ]
You have to use `whereRaw` instead: ``` $date = Products::select('updated_at') ->whereRaw('updated_at >= DATE_ADD(NOW(), INTERVAL -7 DAY)') ->groupBy('updated_at') ->orderBy('updated_at', 'desc') ->get() ```
71,630
My question originates from the book of Silverman "The Aritmetic of Elliptic Curves", 2nd edition (call it [S]). On p. 273 of [S] the author is considering an elliptic curve $E/K$ defined over a number field $K$ and he introduces the notion of a $v$-adic distance from $P$ to $Q$. This is done as follows: Firstly, let'...
2011/07/30
[ "https://mathoverflow.net/questions/71630", "https://mathoverflow.net", "https://mathoverflow.net/users/5498/" ]
* You can choose $t\_Q$ to be defined over $K\_v$, since the divisor $n(Q\_v)$ is defined over $K\_v$, and for large enough $n$ there will be a global section. Note that Riemann-Roch works over non-algebraically closed fields this way. Or you can choose a basis defined over some finite Galois extension of $K\_v$, and t...
17,296,097
What is wrong in this error ? > > alter table INFO add constraint chk\_app check > (CASE WHEN app IS NULL THEN app = 'A'); > > > > If its because *app = 'A'* I am calling it twice then how to have a check constraint to check if app is null then it should have value A
2013/06/25
[ "https://Stackoverflow.com/questions/17296097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2291869/" ]
@FreefallGeek, What do you mean by you can't filter AppointmentDate if you remove it from SELECT? Report Builder allows you do dataset filtering based on the user assigned parameter in run time with query like this, ``` SELECT DISTINCT PaientID, InsuranceCarrier FROM Encounters WHERE AppointmentDate >= @beginnin...
42,001,511
I have got a Microsoft Access database in the resource folder of my Java application. When the user clicks a button, this database is copied to the temp directory of the PC. Then I make a temporary VBS file in the same directory and execute it. (This VBS file calls a VBA macro within the database, that deletes some re...
2017/02/02
[ "https://Stackoverflow.com/questions/42001511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4440871/" ]
Based on [this dicussion](https://sourceforge.net/p/ucanaccess/discussion/help/thread/4539a56c/). The solution is adding `;singleconnection=true` to JDBC url. `UCanAccess` will close the file after JDBC connection closed. ``` Connection con = DriverManager.getConnection("jdbc:ucanaccess://" + dbFilePath +";singleco...
31,974,011
I'm currently working on the following website: <http://hmdesign.alpheca.uberspace.de/> As you can see, I already managed to create a list of div.project-item elements. Due to the use of inline-blocks, it also reduces the number of columns when you resize the window. What I want to accomplish now is, when you resize t...
2015/08/12
[ "https://Stackoverflow.com/questions/31974011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2738393/" ]
Take a look at the "Gang of Four" *composite* pattern: ====================================================== The Child classes should not be derived from the Parent class. Instead, Child and Parent classes should implement the same Interface, let's call it `IAlgorithm`. This Interface should have a pure `virtual` met...
12,070,394
In my Events table I have a column called Pos1, which contains IDs from A to E. I need to count how many times 'E' appears in the column and where it ranks alongside the other numbers. For example in this table 'E' occurs **1** time and is ranked **4** (D=3, A=2, C=2, E=1, B=0). ``` Pos1 E C D C D D A A ``` I'm a c...
2012/08/22
[ "https://Stackoverflow.com/questions/12070394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/310174/" ]
try this: ``` SELECT Pos1, a.cnt, rank FROM( SELECT a.Pos1, a.cnt, (@rank := @rank + 1) AS rank FROM( SELECT Pos1, COUNT(Pos1) cnt FROM Events GROUP BY Pos1 ) a, (SELECT @rank := 0) b ORDER BY a.cnt DESC )a WHERE a.pos1 = 'E'; ``` [SQLFIDDLE DEMO HERE](http://sqlfiddle.com/#!2...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
Using `set nrformats+=alpha`: ``` ia<Esc>qqylp<C-a>q24@q ``` Step by step: ``` ia<Esc> " Start with 'a' qqylp<C-a>q " @q will duplicate the last character and increment it 24@q " Append c..z ```
48,270,808
Not exactly sure what I am doing wrong here, I have looked at other forum post and this is what they say to do to re-auth a user. But I am getting an error of: `TypeError: Cannot read property 'credential' of undefined` on this line here: `const credentials = fire.auth.EmailAuthProvider.credential(currentUser.email, ...
2018/01/15
[ "https://Stackoverflow.com/questions/48270808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8551819/" ]
Like @bojeil answered, it's a namespace so, for instance and if you're using typescript and you used `firebase.initializeApp(config);` in another class, just add again the import in the class where you user the credential method with `import * as Firebase from 'firebase/app';` As u can see in the doc `credential` it's...
148,103
[![War over Kimberley and Murrayville](https://i.stack.imgur.com/VlYZM.png)](https://i.stack.imgur.com/VlYZM.png) I have a fictional world, consisting of a federation of 17 provinces (in blue on the map extract). Currently, it is in the late 1920's. The Dzevogurski and Quidthovitse provinces are on the brink of war. H...
2019/05/31
[ "https://worldbuilding.stackexchange.com/questions/148103", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/6500/" ]
**It depends** I would say that if the question is purely about semantics, we do not have an internationally accepted definition of civil war. I think that the conflict between two provinces in a federation is not a civil war. Presumably, there is some sort of a federal government, and it's not taking part in it in th...
69,850,831
I have a dataframe which looks something like the following (for example): ``` set.seed(42) ## for sake of reproducibility n <- 6 dat <- data.frame(date=seq.Date(as.Date("2020-12-26"), as.Date("2020-12-31"), "day"), category=rep(LETTERS[1:2], n/2), daily_count=sample(18:100, n, rep...
2021/11/05
[ "https://Stackoverflow.com/questions/69850831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17033294/" ]
In this answer: * I've created a much bigger sample * I'm using `yearmonth` from `tsibble` for simplicity * I've solved the issue with the vertical line * I cleaned up a bit the use of labs for a cleaner code ```r set.seed(42) dates <- seq.Date(as.Date("2012-08-01"), as.Date("2014-08-30"), "day") n <- length(dates) d...
13,612,837
I'm using boost::regex to parse some formatting string where '%' symbol is escape character. Because I do not have much experience with boost::regex, and with regex at all to be honest I do some trial and error. This code is some kind of prototype that I came up with. ``` std::string regex_string = "(?:%d...
2012/11/28
[ "https://Stackoverflow.com/questions/13612837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1788633/" ]
You can use [`boost::sub_match::matched`](http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/ref/sub_match.html#boost_regex.sub_match.matched) bool member: ``` if(match[index_of_time_group].matched) process_it(match); ``` It is also possible to use named groups in regexp like: `(?<name_of_group>.*...
38,817
In Windows Vista, whenever I open a folder, the selection of columns is nonsensical: album, date taken, etc., for folders that contain no music or pictures whatsoever. I can select the correct columns for a particular folder, but all the other folders are still wrong, even when I go in to Folder Options and click the b...
2009/09/10
[ "https://superuser.com/questions/38817", "https://superuser.com", "https://superuser.com/users/10624/" ]
eZine Article: [Setup a Default Folder View in Windows Vista](http://ezinearticles.com/?Solved---Setup-a-Default-Folder-View-in-Windows-Vista!&id=1465143) talks about some registry stuff along with the points in `Daniel`'s answer. Below is from this link > > One of the problems many people face once they have install...
113,574
In D&D 5th edition, there is a continuity among the spells that deal with returning life to the dead. Virtually all of them require an expenditure of diamond or diamond dust. * **Revivify** diamonds worth 300 gp * **Raise Dead** diamond worth at least 500 gp * **Resurrection** a diamond worth at least 1,000 gp * **Tr...
2018/01/17
[ "https://rpg.stackexchange.com/questions/113574", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/28927/" ]
Yes, some material components are thematically related to types of spells ------------------------------------------------------------------------- I found [this spreadsheet](https://docs.google.com/spreadsheets/d/1KSibOeWub0_f79GYSnMu7om8kWwog1ob8dRY9LLoDAE/edit#gid=0) from this [reddit post](https://www.reddit.com/r...
38,461,449
My Mac app has an NSMenu whose delegate functions `validateMenuItem` and `menuWillOpen` are never called. So far none of the solutions online have helped. It seems like I'm doing everything right: * The menu item's selectors are in the same class. * The class managing it inherits from NSMenuDelegate I suppose the be...
2016/07/19
[ "https://Stackoverflow.com/questions/38461449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3517395/" ]
`menuWillOpen:` belongs to the `NSMenuDelegate` protocol; for it to be called the menu in question needs a delegate: ``` let statusBarMenu = NSMenu(title: "") statusBarMenu.delegate = self ``` --- `validateMenuItem:` belongs to the `NSMenuValidation` informal protocol; for it to be called the relevant menu *items* ...
10,858,505
I'm trying to run around 15000 soap requests through JMeter. I have 15000 individual soap files in a folder. I know that the [WebService(SOAP) Request](http://jmeter.apache.org/usermanual/component_reference.html#WebService%28SOAP%29_Request) component has the option to point to a folder. But, the problem is that the...
2012/06/01
[ "https://Stackoverflow.com/questions/10858505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/499635/" ]
I would use [the JSR223 Sampler](http://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler) to run a script (e.g. Groovy) to iterate through the files in the directory and store the text of each file in a String. See, for example, [this other answer](https://stackoverflow.com/a/9733568/62667) about u...
64,231,141
For tableviews, I have never had an issue with a text label persisting after a cell is reused. When you reload a tableview after the datasource has changed, the tableviewcells get the latest data and draw themselves accordingly. However, I am now having this problem with an attributed label. After removing an item fr...
2020/10/06
[ "https://Stackoverflow.com/questions/64231141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6631314/" ]
I just stumbled upon the exact same issue with `NSUnderlineStyleAttributeName`. I have to underline some text in a `UILabel` inside a `UITableViewCell` only if a condition is met. After scrolling through the cell, the label keeps reusing the attributes. I tried several workaround, by setting `label.text` and `label.at...
22,934,720
I have a problem about create a query for text-searching starting at begining of column character. For example: I have a table 'BOOK' with a column 'TITLE'. I have 3 rows in 'BOOK' table with 'TITLE' values are: 'ANDROID APPLICATION', 'ANDROID APP DEVELOPMENT' and 'ANDROID APPLICATION PROGRAMMING'. Now when my input ...
2014/04/08
[ "https://Stackoverflow.com/questions/22934720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1679361/" ]
FTS cannot search from the beginning of a column value. (Actually, it can, but this is undocumented and not enabled in Android.) To search from the beginning, you have to use `LIKE 'pattern%'`. If you want this to be efficient, you have to use this with a normal table and a case-insensitive index ([COLLATE NOCASE](htt...
872,891
I wish to use the following sentence as the comment on a form field. I have already come up with a short-form label for the field. This text is meant to explain the field in a bit more detail: **The country [where] you come from.** The question is: is this "where" needed there, can be used there (optional) or cannot ...
2009/05/16
[ "https://Stackoverflow.com/questions/872891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
Where is required for written English (UK), but would commonly be dropped in spoken (colloquial) English.
24,019,364
To make changes in several files I use the following script: ``` echo search('publications.html"') | normal o<li><a href="./book_series.html">Книжные серии</a></li> echo search('collections.html"') | d echo search('photo.html"') | d wq ``` Then I do `for file in *.html do; vim -e $file < script; done` As a result a...
2014/06/03
[ "https://Stackoverflow.com/questions/24019364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1881022/" ]
Probably ``` num2=`obase=16;ibase=16; echo $start_num \\+ $num | bc` ``` should be ``` num2=`echo "obase=16;ibase=16;$start_num + $num" | bc` ``` You weren't calculating hex at all. I also suggest a simpified version like this: ``` #!/bin/zsh step_size=10 start_num=20000000 size=64 for (( i = 0; i < 1000; i +...
37,727
As we all know that Upanishads were written to understand Vedas. Some great scholars also said that they are the branches of Vedas. My question is related to it. Yesterday in a library, I was reading some books and then I found a book written by Dr. Surendra KR Sharma. The name of the book was in Hindi **Kya baloo ki b...
2020/01/04
[ "https://hinduism.stackexchange.com/questions/37727", "https://hinduism.stackexchange.com", "https://hinduism.stackexchange.com/users/19001/" ]
We should also read the next verse (1:1:6) in continuation for understanding Mundak Upanishad 1.1.5 Please [read the following](https://www.swami-krishnananda.org/mundak1/mundak1_1.html): > > We cannot go to the Veda directly and understand anything out of it > unless we are proficient in these six auxiliary shastr...
34,102,231
Good evening! I'm a beginner programmer and am finishing up my first semester of C++. Currently I'm looking a final exam review sheet my professor gave us and I just don't understand exactly what it's asking me to do. I feel like if I saw an example I would get it immediately but as is I am rather lost. Here's the re...
2015/12/05
[ "https://Stackoverflow.com/questions/34102231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5026229/" ]
Strictly speaking, the C++ language doesn't have "methods". It has "member functions", and perhaps that's the terminology that you're more familiar with. But many other languages do use the term "method", so it's actually fairly common for C++ programmers to say "methods" when what they're really talking about is membe...
20,950,967
I know that `UNIQUE` can be used for unique value on table creating. I read in a database management book that > > When we apply UNIQUE to a subquery, the > resulting condition returns true if no row appears twice in the answer to the > subquery that is, there are no duplicates; in particular, it returns true if ...
2014/01/06
[ "https://Stackoverflow.com/questions/20950967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2040375/" ]
`UNIQUE` is defined by *SQL92* Section 8.9: `<unique predicate> ::= UNIQUE <table subquery>` so it certainly exists but is not widely supported by vendors. As an alternative you could use EXISTS with a HAVING COUNT.
37,866,905
I'm wondering in which format the compiled source code of an program written (in C or Rust for example) will result. I know that the output file is a binary coded file in machine language (like every handbook and documentation explains). I thought that opening the file with an editor of my choice like VIM should show ...
2016/06/16
[ "https://Stackoverflow.com/questions/37866905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2349787/" ]
Found the solution: ``` OkHttpClient client = new OkHttpClient.Builder().proxy(proxyTest).build(); ``` If we use the builder to input the proxy, it will work like a charm =D
19,280,494
``` <html> <head></head> <body> <h1>Welcome to Our Website!</h1> <hr/> <h2>News</h2> <h4><?=$data['title'];?></h4> <p><?=$data['content'];?></p> </body> </html> ``` Can anyone tell me what's the "=" ...
2013/10/09
[ "https://Stackoverflow.com/questions/19280494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2802552/" ]
`<?=$a?>` is the shortcut for `<? echo $a ?>`, they are called "short tags" in PHP terminology Check PHP documentation [Escaping from HTML](http://www.php.net/manual/en/language.basic-syntax.phpmode.php) example #2 3rd item, and related ini setting [short-open-tag](http://www.php.net/manual/en/ini.core.php#ini.short-o...
576,538
So, a little background. I work for a company that has a number of extremely important, non-public facing websites. People's safety and livelihoods depend on these staying up. We have very little downtime, but there are always catastrophic situations that mean restoring from bare metal. Our current setup is inadequate...
2014/02/18
[ "https://serverfault.com/questions/576538", "https://serverfault.com", "https://serverfault.com/users/209899/" ]
* Leverage VMware SRM, or at least VMware Replication. It will drastically reduce the amount of time it takes you to come online in a secondary datacenter. (Hyper-V Replica and HVRM are the equivalent in the Microsoft stack. * Separate your front-end from your back-end. It sounds like you need a web tier and a database...
54,910,019
I am new to Angular and I have two collapse div elements and when I click on button1 then div element-1 need to collapse and element-2 need to be hide. And when I click button2 then div element-2 need to collapse and element-1 need to be hide, but it's not working using below code. ``` <div class="container"> <h2>S...
2019/02/27
[ "https://Stackoverflow.com/questions/54910019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5571461/" ]
Try using single quote marks inside the ternary ``` <div class='@(Model.HeroBannerImageSmall ? "--imageSmall" : "--image")' style='@(Model.isSelected ? "background-position-x:@Model.CropPositionX" % "background-position-y:@Model.CropPositionY"&; : "background-position:@Model.UniformCropPosition"&;') backgroun...
42,299,099
In a shared `std::forward_list` is it safe for multiple threads to call `insert_after` concurrently if they are guaranteed to never call it with the same position iterator? It seems like this could be safe given that insert is guaranteed not to invalidate other iterators, and the container has no `size()` method, but m...
2017/02/17
[ "https://Stackoverflow.com/questions/42299099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683918/" ]
> > In a shared `std::list` is it safe for multiple threads to call insert > concurrently if they are guaranteed to never call it with the same > position iterator? > > > No. It wouldn't be safe...(No matter what). Inserting into a `std::list` will require access to the `previous node` and `next node` to the it...
50,574,593
I am trying to do a simple thing , navigate to an external url ``` <a href="http://18.217.228.108/angularapp1/book/"> Class Books </a> ``` However I am getting a 404 because the Http// portion is being deleted I am not sure if this is an mvc thing or html thing. Here is link <http://18.217.228.108/angularapp1>. H...
2018/05/28
[ "https://Stackoverflow.com/questions/50574593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8066170/" ]
I do not agree to the formula "after certain number of words". Note that the first target line has 4 words, whereas remaining 2 have 5 words each. Actually you need to replace each comma and following sequence of spaces (if any) with a comma and `\n`. So the intuitive way to do it is: ``` $x =~ s/,\s*/,\n/g; ```
196
I have been working on dynamic programming for some time. The canonical way to evaluate a dynamic programming recursion is by creating a table of all necessary values and filling it row by row. See for example [Cormen, Leiserson et al: "Introduction to Algorithms"](http://mitpress.mit.edu/catalog/item/default.asp?ttype...
2012/03/10
[ "https://cs.stackexchange.com/questions/196", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/98/" ]
There are plenty of other examples of dynamic programming algorithms that don't fit your pattern at all. * The longest increasing subsequence problem requires only a one-dimensional table. * There are several natural dynamic programming algorithms whose tables require three or even more dimensions. For example: Find t...
28,872,375
``` SQL> desc invoices Name Null? Type ----------------------------------------- -------- ---------------------------- INVOICE_ID NOT NULL NUMBER(6) COMPANY_ID NUMBER(6) STUDENT_ID ...
2015/03/05
[ "https://Stackoverflow.com/questions/28872375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592364/" ]
you have to enter an existed `STUDENT_ID` from `students` table and an existed `COMPANY_ID` from `compaies` table to invoices. Consider you have data like next ``` COMPANY_ID COMPANY_NAME ADDRESS CONTACT_NO NO_OF_EMP ----------- ------------ -------- ---------- --------- 1 Bl...
20,319,813
In my for loop, my code generates a list like this one: ``` list([0.0,0.0]/sum([0.0,0.0])) ``` The loop generates all sort of other number vectors but it also generates `[nan,nan]`, and to avoid it I tried to put in a conditional to prevent it like the one below, but it doesn't return true. ``` nan in list([0.0,0....
2013/12/02
[ "https://Stackoverflow.com/questions/20319813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1610626/" ]
I think this makes sense because of your pulling `numpy` into scope indirectly via the star import. ``` >>> import numpy as np >>> [0.0,0.0]/0 Traceback (most recent call last): File "<ipython-input-3-aae9e30b3430>", line 1, in <module> [0.0,0.0]/0 TypeError: unsupported operand type(s) for /: 'list' and 'int' ...
109,317
I have been reading quite a bit in order to make the following choice: which path-finding solution should one implement in a game where the world proceduraly generated, of really large dimensions? Here is how I see the main solutions and their pros/cons: 1) grid-based path-finding - this is the only option that would...
2015/10/06
[ "https://gamedev.stackexchange.com/questions/109317", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/72314/" ]
Given that the rooms are procedural built, portals created and then populated, I have a couple of ideas. A\* works really well on navigation meshes, and works hierarchically as well. I would consider building a pathfinding system that works at two levels - first, the room by room level, and second within each room, fr...