qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
39,131,812
if I want to express something like [just a simple example]: ``` int a = 0; for (int x = 0; x < n; x += 1) a = 1 - a; ``` what should I do in Haskell, *since it doesn't have variable concept?* (maybe wrong, see: [Does Haskell have variables?](https://stackoverflow.com/questions/993124/does-haskell-have-variables...
2016/08/24
[ "https://Stackoverflow.com/questions/39131812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280916/" ]
Often, repetition that you would perform with a loop in a procedural language is accomplished with [recursion](http://learnyouahaskell.com/recursion) in Haskell. In this case, you should think about what the result of the loop is. It appears to alternate between 0 and 1. There are several ways to do this in Haskell. On...
There are a few options. First, you can rewrite the problem with naive recursion: ``` loop :: Int -> Int loop n = loop' n 0 where loop' 0 a = a loop' n a = loop' (n - 1) (1 - a) ``` Next, you can restate recursion as a fold: ``` loop :: Int -> Int loop n = foldr (\a _ -> 1 - a) 0 [0..n] ``` Or you can u...
39,131,812
if I want to express something like [just a simple example]: ``` int a = 0; for (int x = 0; x < n; x += 1) a = 1 - a; ``` what should I do in Haskell, *since it doesn't have variable concept?* (maybe wrong, see: [Does Haskell have variables?](https://stackoverflow.com/questions/993124/does-haskell-have-variables...
2016/08/24
[ "https://Stackoverflow.com/questions/39131812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280916/" ]
Often, repetition that you would perform with a loop in a procedural language is accomplished with [recursion](http://learnyouahaskell.com/recursion) in Haskell. In this case, you should think about what the result of the loop is. It appears to alternate between 0 and 1. There are several ways to do this in Haskell. On...
Another option: ``` iterate (\a -> 1-a) 0 !! n -- or even iterate (1-) 0 !! n ``` The snippet `iterate (\a -> 1-a) 0` produces an infinite lazy list of all the values obtained starting from `0` and repeatedly applying the function `(\a -> 1-a)`. Then `!! n` takes the n-th element. To be completely honest, in this c...
39,131,812
if I want to express something like [just a simple example]: ``` int a = 0; for (int x = 0; x < n; x += 1) a = 1 - a; ``` what should I do in Haskell, *since it doesn't have variable concept?* (maybe wrong, see: [Does Haskell have variables?](https://stackoverflow.com/questions/993124/does-haskell-have-variables...
2016/08/24
[ "https://Stackoverflow.com/questions/39131812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280916/" ]
Often, repetition that you would perform with a loop in a procedural language is accomplished with [recursion](http://learnyouahaskell.com/recursion) in Haskell. In this case, you should think about what the result of the loop is. It appears to alternate between 0 and 1. There are several ways to do this in Haskell. On...
The other answers have already explained how you would approach a problem like this functionally, in Haskell. However, Haskell does have mutable variables (or references) in the form of [ST](https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad-ST.html) actions and [STRef](https://hackage.haskell.org/pac...
39,131,812
if I want to express something like [just a simple example]: ``` int a = 0; for (int x = 0; x < n; x += 1) a = 1 - a; ``` what should I do in Haskell, *since it doesn't have variable concept?* (maybe wrong, see: [Does Haskell have variables?](https://stackoverflow.com/questions/993124/does-haskell-have-variables...
2016/08/24
[ "https://Stackoverflow.com/questions/39131812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280916/" ]
There are a few options. First, you can rewrite the problem with naive recursion: ``` loop :: Int -> Int loop n = loop' n 0 where loop' 0 a = a loop' n a = loop' (n - 1) (1 - a) ``` Next, you can restate recursion as a fold: ``` loop :: Int -> Int loop n = foldr (\a _ -> 1 - a) 0 [0..n] ``` Or you can u...
Another option: ``` iterate (\a -> 1-a) 0 !! n -- or even iterate (1-) 0 !! n ``` The snippet `iterate (\a -> 1-a) 0` produces an infinite lazy list of all the values obtained starting from `0` and repeatedly applying the function `(\a -> 1-a)`. Then `!! n` takes the n-th element. To be completely honest, in this c...
39,131,812
if I want to express something like [just a simple example]: ``` int a = 0; for (int x = 0; x < n; x += 1) a = 1 - a; ``` what should I do in Haskell, *since it doesn't have variable concept?* (maybe wrong, see: [Does Haskell have variables?](https://stackoverflow.com/questions/993124/does-haskell-have-variables...
2016/08/24
[ "https://Stackoverflow.com/questions/39131812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280916/" ]
There are a few options. First, you can rewrite the problem with naive recursion: ``` loop :: Int -> Int loop n = loop' n 0 where loop' 0 a = a loop' n a = loop' (n - 1) (1 - a) ``` Next, you can restate recursion as a fold: ``` loop :: Int -> Int loop n = foldr (\a _ -> 1 - a) 0 [0..n] ``` Or you can u...
The other answers have already explained how you would approach a problem like this functionally, in Haskell. However, Haskell does have mutable variables (or references) in the form of [ST](https://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Monad-ST.html) actions and [STRef](https://hackage.haskell.org/pac...
34,176,782
Inspired by the following thread: [PyQt: How to set Combobox Items be Checkable?](https://stackoverflow.com/questions/22775095/pyqt-how-to-set-combobox-items-be-checkable) I was able to create a simple checkable "combobox" by using a QToolButton and adding checkable items to it using addAction. See simple code examp...
2015/12/09
[ "https://Stackoverflow.com/questions/34176782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5656718/" ]
Alternatively you can define your [`QActionGroup`](http://pyqt.sourceforge.net/Docs/PyQt4/qactiongroup.html) to collect all of your `action`s, then `connect` the signal `triggered` to callback method, this way: ``` class MyDialog(QtGui.QDialog): def __init__(self, parent=None): QtGui.QWidget.__init__(self,...
First we need to loop through the actions of the menu.There's no convenience function to do this, but every widget has a method `findChildren`. To get a list of all the children of type `QAction`, you do: ``` self.toolMenu.findChildren(QtGui.QAction) ``` For every action, we can use `QAction.isChecked()` to get a b...
47,355,843
Today I updated Android Studio to version 3.0 And after that I couldn't build project successfully. I got these errors: ``` Unable to resolve dependency for ':app@release/compileClasspath': could not resolve com.android.support:appcompat-v7:27.0.1. ``` I tried using VPN or proxy etc. but none of them worked....
2017/11/17
[ "https://Stackoverflow.com/questions/47355843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7577206/" ]
with the new features of **gradle 4.1** and the **classpath 'com.android.tools.build:gradle:3.0.0'** > > distributionBase=GRADLE\_USER\_HOME distributionPath=wrapper/dists > zipStoreBase=GRADLE\_USER\_HOME zipStorePath=wrapper/dists > distributionUrl=<https://services.gradle.org/distributions/gradle-4.1-all.zip> >...
As of the new versions, the libraries are now inside the `maven` not inside `Jcenter`. So inside your gradle file, you have to add `maven` like the below: ``` allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } } ``` This link may help you: [Adding support librarie...
47,355,843
Today I updated Android Studio to version 3.0 And after that I couldn't build project successfully. I got these errors: ``` Unable to resolve dependency for ':app@release/compileClasspath': could not resolve com.android.support:appcompat-v7:27.0.1. ``` I tried using VPN or proxy etc. but none of them worked....
2017/11/17
[ "https://Stackoverflow.com/questions/47355843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7577206/" ]
with the new features of **gradle 4.1** and the **classpath 'com.android.tools.build:gradle:3.0.0'** > > distributionBase=GRADLE\_USER\_HOME distributionPath=wrapper/dists > zipStoreBase=GRADLE\_USER\_HOME zipStorePath=wrapper/dists > distributionUrl=<https://services.gradle.org/distributions/gradle-4.1-all.zip> >...
There is one build.gradle file for whole projects and one for each modules. Need to add below code in the application build.gradle file. ``` buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' } } al...
47,355,843
Today I updated Android Studio to version 3.0 And after that I couldn't build project successfully. I got these errors: ``` Unable to resolve dependency for ':app@release/compileClasspath': could not resolve com.android.support:appcompat-v7:27.0.1. ``` I tried using VPN or proxy etc. but none of them worked....
2017/11/17
[ "https://Stackoverflow.com/questions/47355843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7577206/" ]
with the new features of **gradle 4.1** and the **classpath 'com.android.tools.build:gradle:3.0.0'** > > distributionBase=GRADLE\_USER\_HOME distributionPath=wrapper/dists > zipStoreBase=GRADLE\_USER\_HOME zipStorePath=wrapper/dists > distributionUrl=<https://services.gradle.org/distributions/gradle-4.1-all.zip> >...
Try this code in build.gradle(Project) : ``` buildscript { ext.kotlin_version = '1.1.51' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" //...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
This error can be caused by an incorrect **merchant ID**, an **incorrect access code**, or if the order originates from an **unregistered URL**. Make sure that all three of these values are correct. > > For your security, CCAvenue does not report exactly which of these three values might be in error. > > > **Upd...
**The Error code 10002 means that Access code or URL not valid so request you to confirm that you are posting the Access code value to CCAvenue and also confirm that the request URL posting to CCAvenue has to be the same as the registered URL with us, as we are having the URL Validation at our end.** The post action ...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
This error can be caused by an incorrect **merchant ID**, an **incorrect access code**, or if the order originates from an **unregistered URL**. Make sure that all three of these values are correct. > > For your security, CCAvenue does not report exactly which of these three values might be in error. > > > **Upd...
Error Code: 10002 Merchant Authentication failed. ================================================= Don't worry... It happens to the best of us. ============================================ This might be due to incorrect MERCHANT ID, WORKING KEY or ACCESS CODE. The most likely it is possible due to incorrect URL so t...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
This error can be caused by an incorrect **merchant ID**, an **incorrect access code**, or if the order originates from an **unregistered URL**. Make sure that all three of these values are correct. > > For your security, CCAvenue does not report exactly which of these three values might be in error. > > > **Upd...
Are you using it on localhost? If you need to test your code from your local machine, you should write to CCAvenue service desk at service@ccavenue.com with your merchant ID and localhost URL to white-list. Else CCAvenue will throw error "Merchant Authentication Failed". Otherwise this error can be caused by an inco...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
This error can be caused by an incorrect **merchant ID**, an **incorrect access code**, or if the order originates from an **unregistered URL**. Make sure that all three of these values are correct. > > For your security, CCAvenue does not report exactly which of these three values might be in error. > > > **Upd...
**I was having same error.** *Note below points* 1. whitelist your **IP** or **Domain** - ask ccavenue care, they will do whitelist it. 2. it will work default in live envirement for URL `https://secure.ccavenue.com/xyz` 3. for development or test enrolment we need to ask ccavenue to **enable** our merchant id(need t...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
**The Error code 10002 means that Access code or URL not valid so request you to confirm that you are posting the Access code value to CCAvenue and also confirm that the request URL posting to CCAvenue has to be the same as the registered URL with us, as we are having the URL Validation at our end.** The post action ...
Error Code: 10002 Merchant Authentication failed. ================================================= Don't worry... It happens to the best of us. ============================================ This might be due to incorrect MERCHANT ID, WORKING KEY or ACCESS CODE. The most likely it is possible due to incorrect URL so t...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
**The Error code 10002 means that Access code or URL not valid so request you to confirm that you are posting the Access code value to CCAvenue and also confirm that the request URL posting to CCAvenue has to be the same as the registered URL with us, as we are having the URL Validation at our end.** The post action ...
Are you using it on localhost? If you need to test your code from your local machine, you should write to CCAvenue service desk at service@ccavenue.com with your merchant ID and localhost URL to white-list. Else CCAvenue will throw error "Merchant Authentication Failed". Otherwise this error can be caused by an inco...
28,672,134
eg. JBB Inc. Headquarters 20 West RiverCenter Blvd Covington KY 41011 USA
2015/02/23
[ "https://Stackoverflow.com/questions/28672134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4574324/" ]
**The Error code 10002 means that Access code or URL not valid so request you to confirm that you are posting the Access code value to CCAvenue and also confirm that the request URL posting to CCAvenue has to be the same as the registered URL with us, as we are having the URL Validation at our end.** The post action ...
**I was having same error.** *Note below points* 1. whitelist your **IP** or **Domain** - ask ccavenue care, they will do whitelist it. 2. it will work default in live envirement for URL `https://secure.ccavenue.com/xyz` 3. for development or test enrolment we need to ask ccavenue to **enable** our merchant id(need t...
37,318,319
I have Two Question related to Native App Performance Testing? 1)I have a Payment App, and it comes with bank security which is installed at the time of app installation. It sends an token number and rest of the data in encrypted format. Is it possible to handle such kind of request using Jmeter or any other performan...
2016/05/19
[ "https://Stackoverflow.com/questions/37318319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252313/" ]
(1) Yes. This is why performance testing tools are built around general purpose programming languages, to allow you (as the tester) to leverage your foundation skills in programming to leverage the appropriate algorithms and libraries to represent the same behavior as the client (2) This is why performance testing to...
I'm not an expert in JMeter. But work a lot with Loadrunner (LR) (Performance Testing Tool from HP). Though JMeter and LR are different tools, they work under same principle and objective and so objective of performance testing. As James Pulley mentioned, the performance testing tool may have the capability. But the q...
37,318,319
I have Two Question related to Native App Performance Testing? 1)I have a Payment App, and it comes with bank security which is installed at the time of app installation. It sends an token number and rest of the data in encrypted format. Is it possible to handle such kind of request using Jmeter or any other performan...
2016/05/19
[ "https://Stackoverflow.com/questions/37318319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252313/" ]
(1) Yes. This is why performance testing tools are built around general purpose programming languages, to allow you (as the tester) to leverage your foundation skills in programming to leverage the appropriate algorithms and libraries to represent the same behavior as the client (2) This is why performance testing to...
With the raise of several mobile network technologies, load testing a mobile application has become a different ball game in comparison with normal web app load testing. This is because of the differences in the response times that occur in different mobile networks such as 2G, 3G, 4G, etc. Additionally the client bein...
39,019,266
hello i want to apply css for nav bar, i am retrivig nav bar values from database using Ajax.ActionLink, i tried javascript but i am getting error called > > jQuery is not defined", > > > here is my code. and Test\_Section is my Model. ``` <table style="width:auto"> @foreach (Test_Section p in Model) ...
2016/08/18
[ "https://Stackoverflow.com/questions/39019266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6459059/" ]
You need to include jQuery to your application by referencing it in your page, because the Error `jQuery is not defined` or `$ is not defined` occurs when jQuery is not (correctly) included in your page. You should add this line before the `<script>` section in your posted code: ``` <script src="https://ajax.googleapi...
You need to use `.click` inside ``` $(document).ready(function(){//...onclick(...)}) ``` But first make sure, you include jquery script file in your html.
57,129,646
Is there some way I can have a function whose return type varies based on one of its arguments? For example: ``` interface Person { name: string; job: string; } interface Animal { name: string; deadly: boolean; } function getPerson(): Person { return { name: 'Bob', job: 'Manager', }; } function ...
2019/07/21
[ "https://Stackoverflow.com/questions/57129646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5228806/" ]
You have have multiple `=` in a single match. ``` %{"name" => name} = identity = RedditOAuth2.get_identity(access_token) ``` `identity` will have the entire map assigned to it and `name` will have whatever was in the `"name"` key.
If you're wanting to discard everything else from the identity and are okay adding another function, you may be looking for [`Map.split/2`](https://hexdocs.pm/elixir/Map.html#split/2). ```rb {%{"name" => name}, identity} = access_token |> RedditOAuth2.get_identity() |> Map.split(["name"]) ```
30,362
My mate always tells me to remove the germ (the center) from garlic and onions, especially if it's turning green. What are the pros and cons of the germs of these plants?
2013/01/24
[ "https://cooking.stackexchange.com/questions/30362", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/15265/" ]
So... I was always taught that you remove it because it's bitter. I generally remove it if it's big enough. However, there seems to be some contention as to whether this is true (and to what degree it's true). See: <http://www.examiner.com/article/remove-the-garlic-germ-few-do-this-anymore> and <http://ruhlman.com/201...
I always remove mine as I too find it affects the taste of the garlic. However, since I started keeping my garlic in the refrigerator, I've noticed that the garlic keeps much longer and rarely develops green germs.
47,611,557
I'm working on an optimization problem that involves minimizing an expensive map operation over a collection of objects. The naive solution would be something like ``` rdd.map(expensive).min() ``` However, the map function returns values that guaranteed to be >= 0. So, if any single result is 0, I can take that as ...
2017/12/02
[ "https://Stackoverflow.com/questions/47611557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3818777/" ]
> > Is there an idiomatic way to do this using Spark? > > > No. If you're concerned with low level optimizations like this one, then Spark is not the best option. It doesn't mean it is completely impossible. If you can for example try something like this: ``` rdd.cache() (min_value, ) = rdd.filter(lambda x: x =...
If "expensive" is **really** expensive, maybe you can write the result of "expensive" to, say, SQL (Or any other storage available to all the workers). Then in the beginning of "expensive" check the number currently stored, if it is zero return zero from "expensive" without performing the expensive part. You can also ...
69,853,145
I'm studying pointers in C language with Ted Jensen's "A TUTORIAL ON POINTERS AND ARRAYS IN C" manual. It's a very prickly argument. **Question 1**. I have come to program 3.1 and would like a clarification. This is the program: ``` #include <stdio.h> char strA[80] = "A string to be used for demonstration purposes";...
2021/11/05
[ "https://Stackoverflow.com/questions/69853145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13975322/" ]
> > To copy the address of strA [0] into our variable pA via the assignment declaration, shouldn't we write `pA = & strA`? > > > `&strA` is the address of `strA`. `&strA[0]` is the address of `strA[0]`. These are the “same” in the sense they point to the same place in memory, but they have different types, and the...
It's simply because strA, which is char array, is a pointer. An array's "value" is actually nothing more than the address of the first element of array. When you assign address of primitive data type(int, char, etc..), you should assign it in the way you described. ``` int x; int *pA; pA = &x; ``` When you assign a...
69,853,145
I'm studying pointers in C language with Ted Jensen's "A TUTORIAL ON POINTERS AND ARRAYS IN C" manual. It's a very prickly argument. **Question 1**. I have come to program 3.1 and would like a clarification. This is the program: ``` #include <stdio.h> char strA[80] = "A string to be used for demonstration purposes";...
2021/11/05
[ "https://Stackoverflow.com/questions/69853145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13975322/" ]
> > To copy the address of strA [0] into our variable pA via the assignment declaration, shouldn't we write `pA = & strA`? > > > `&strA` is the address of `strA`. `&strA[0]` is the address of `strA[0]`. These are the “same” in the sense they point to the same place in memory, but they have different types, and the...
In C, when you write : ``` char strA[80]; ``` Memory is allocated for your table. This is an example for you to try and visualize what it looks like. | [0] 1st Element | [1] 2nd Element | [2] 3rd Element | [....] .... | [n] nth Element | | --- | --- | --- | --- | --- | | 0000 | 0001 | 0002 | 0003 | n | **strA** is...
69,853,145
I'm studying pointers in C language with Ted Jensen's "A TUTORIAL ON POINTERS AND ARRAYS IN C" manual. It's a very prickly argument. **Question 1**. I have come to program 3.1 and would like a clarification. This is the program: ``` #include <stdio.h> char strA[80] = "A string to be used for demonstration purposes";...
2021/11/05
[ "https://Stackoverflow.com/questions/69853145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13975322/" ]
> > To copy the address of strA [0] into our variable pA via the assignment declaration, shouldn't we write `pA = & strA`? > > > `&strA` is the address of `strA`. `&strA[0]` is the address of `strA[0]`. These are the “same” in the sense they point to the same place in memory, but they have different types, and the...
> > To copy the address of strA [0] into our variable pA via the assignment declaration, shouldn't we write pA = & strA? > > > Arrays are weird and don't behave like other types. The *expression* `strA` "decays" from type "N-element array of `char`" to "pointer to `char`", and the value of the expression is the a...
57,637,594
I guys, I am new in angular. I created an angular app and in it I have 3 other generated components to test angular navigation. Here is what I need help with, in the "index.html" when I use "[(ngModel)]" in the an input element, it flags no error but if I try to use **"[(ngModel)]"** in any of the 3 created components ...
2019/08/24
[ "https://Stackoverflow.com/questions/57637594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7408335/" ]
I've been fighting similar problems today (which is how I found your post). To get rid of the libEGL warning run raspi-config and select the "Full KMS" option from Advanced Options->GL Driver (then reboot). That likely won't fix your styling problem though - I'm seeing styling differences between the Pi (my target syst...
I have a similar problem and running it in the following way will solve it. ``` sudo python3.7 name.py ``` I guess some privilege is needed from the IDE or the current logged in user. Although the colors are still more opaque than in Windows and Ubuntu.
66,110,773
I need help whit my Code (PostgreSQL). I get in my row Result `{{2.0,10}{2.0,10}}` but I want `{{2.0,10}{3.0,20}}`. I don't know where my error is. Result is text `[ ]` its must be a 2D Array This is Table1 | Nummer | Name | Result | | --- | --- | --- | | 01 | Kevin | | This is Table2 | Nummer | Exam | ProfNr | |...
2021/02/08
[ "https://Stackoverflow.com/questions/66110773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15172345/" ]
After your `$mail->send();` function, you could try using the PHP in-built function `header();` So for instance in your case: ``` header('Location: /'); ``` This should redirect to home page after submission, where / is the main root of home page. Some more information on header(): <https://www.php.net/manual/en/f...
You should handle your `$mail->send()` to handle the success and failed response. Would write the code like this: ``` <?php use PHPMailer\PHPMailer\PHPMailer; if(isset($_POST['name']) && isset($_POST['email'])){ $name = $_POST['name']; $email = $_POST['email']; ...
10,217,558
To explain my problem more easily I will create the following fictional example, illustrating a very basic many-to-many relationship. A **Car** can have many **Parts**, and a **Part** can belong to many **Cars**. **DB SCHEMA:** ``` CAR_TABLE --------- CarId ModelName CAR_PARTS_TABLE --------------- CarId PartId PAR...
2012/04/18
[ "https://Stackoverflow.com/questions/10217558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/350933/" ]
``` Part partAlias=null; Session.QueryOver<Car>().JoinQueryOver(x=>x.Parts,()=>partAlias) .WhereRestrictionOn(()=>partAlias.Id).IsIn(partIds) //partIds should be implement an ICollection .List<Car>(); ``` Hope that helps.
modified version of this [answer](https://stackoverflow.com/a/953461/40822) ``` var cars = session.CreateQuery("SELECT c.id FROM Car c JOIN c.Parts p WHERE p.PartId IN(:parts) GROUP BY c HAVING COUNT(DISTINCT p) = :partsCount") .SetParameterList("parts", partIds) .SetInt32("partsCount", partIds.Count) ...
10,217,558
To explain my problem more easily I will create the following fictional example, illustrating a very basic many-to-many relationship. A **Car** can have many **Parts**, and a **Part** can belong to many **Cars**. **DB SCHEMA:** ``` CAR_TABLE --------- CarId ModelName CAR_PARTS_TABLE --------------- CarId PartId PAR...
2012/04/18
[ "https://Stackoverflow.com/questions/10217558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/350933/" ]
This should be exactly what you want... ``` Part part = null; Car car = null; var qoParts = QueryOver.Of<Part>(() => part) .WhereRestrictionOn(x => x.PartId).IsIn(partIds) .JoinQueryOver(x => x.Cars, () => car) .Where(Restrictions.Eq(Projections.Count(() => car.CarId), ...
``` Part partAlias=null; Session.QueryOver<Car>().JoinQueryOver(x=>x.Parts,()=>partAlias) .WhereRestrictionOn(()=>partAlias.Id).IsIn(partIds) //partIds should be implement an ICollection .List<Car>(); ``` Hope that helps.
10,217,558
To explain my problem more easily I will create the following fictional example, illustrating a very basic many-to-many relationship. A **Car** can have many **Parts**, and a **Part** can belong to many **Cars**. **DB SCHEMA:** ``` CAR_TABLE --------- CarId ModelName CAR_PARTS_TABLE --------------- CarId PartId PAR...
2012/04/18
[ "https://Stackoverflow.com/questions/10217558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/350933/" ]
This should be exactly what you want... ``` Part part = null; Car car = null; var qoParts = QueryOver.Of<Part>(() => part) .WhereRestrictionOn(x => x.PartId).IsIn(partIds) .JoinQueryOver(x => x.Cars, () => car) .Where(Restrictions.Eq(Projections.Count(() => car.CarId), ...
modified version of this [answer](https://stackoverflow.com/a/953461/40822) ``` var cars = session.CreateQuery("SELECT c.id FROM Car c JOIN c.Parts p WHERE p.PartId IN(:parts) GROUP BY c HAVING COUNT(DISTINCT p) = :partsCount") .SetParameterList("parts", partIds) .SetInt32("partsCount", partIds.Count) ...
40,280,440
I've been looking but can't find an answer to this so I'm hoping someone can help. I have two tables Table 1 (audited items) ``` audit_session_id asset_number Audit1 1 Audit1 2 Audit2 3 ``` Table 2 (asset) ``` asset_number location<br> 1 15 ...
2016/10/27
[ "https://Stackoverflow.com/questions/40280440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7079298/" ]
Unfortunately, there is little the SO community can help with if you don't provide even a log trace or a code snippet (doesn't have to be directly executable, but an MWE helps). First, you should use [DCMI `hasPart` term](http://dublincore.org/documents/dcmi-terms/#terms-hasPart) for representing `hasPart` relationshi...
It proved that extracting the resource from the `Dataset` and using that reference instead (the code was holding a reference to the instance created in the first place) adding the property (hasPart) proved to work as expected. No error reported by the logging framework, and the hasPart-property is in place. The resou...
257,454
I don't know if this can be done in an home environment but I would like to make a powerful system and have that providing a way for all my home computers to connect to having their own profile as if they were logging into their own account on a windows machine. I would prefer a Windows 7 Based OS. Is there such thin...
2011/03/14
[ "https://superuser.com/questions/257454", "https://superuser.com", "https://superuser.com/users/46390/" ]
That sounds like the basic Roaming Profiles facility that all Windows Server editions (certainly since Server 2000) provides. 1. Install a windows server, and set it up as an Active Directory Server. 2. Join the workstations into the Domain you created as part of Step 1. You now have centralised user management and p...
Both [Windows Home Server](http://www.microsoft.com/windows/products/winfamily/windowshomeserver/default.mspx) (new release out soon which is 2008 R2 based) and [Windows Small Business Server 2011](http://www.microsoft.com/oem/en/products/servers/Pages/sbs_overview.aspx) offer features which should help. Home server h...
13,348,002
So I need my objects to be able to use functions that are within the main class, so when they are created I want them to get it through their parameters. ``` int main(int argc, char* args[]) { Unit units[3]={{5,5,this},{8,8,this},{12,12,this}}; units[0].init(true); for (int i=1;i<sizeof(units) / sizeof...
2012/11/12
[ "https://Stackoverflow.com/questions/13348002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1818669/" ]
In C++, `main` is not a class nor is it part of a class, so `this` doesn't make sense in its context.
c++ isn't like java. You don't need to have all of your methods(or functions as they're called in c++) inside a class. `main` is a function, not a class. there is no `this` Now you can have global variables, or you can put variables/objects on the heap, for other classes to be able to use, but in general, c# doesn't...
13,348,002
So I need my objects to be able to use functions that are within the main class, so when they are created I want them to get it through their parameters. ``` int main(int argc, char* args[]) { Unit units[3]={{5,5,this},{8,8,this},{12,12,this}}; units[0].init(true); for (int i=1;i<sizeof(units) / sizeof...
2012/11/12
[ "https://Stackoverflow.com/questions/13348002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1818669/" ]
You couldn't do that in Java, either. In Java, the entrypoint is a static method and has no associated object instance. The solution is the same -- instantiate your type. ``` int main(int argc, char** argv) { MainClass main_object; // creates an instance Unit units[3]={{5,5,&main_object},{8,8,&main_object},{12,...
In C++, `main` is not a class nor is it part of a class, so `this` doesn't make sense in its context.
13,348,002
So I need my objects to be able to use functions that are within the main class, so when they are created I want them to get it through their parameters. ``` int main(int argc, char* args[]) { Unit units[3]={{5,5,this},{8,8,this},{12,12,this}}; units[0].init(true); for (int i=1;i<sizeof(units) / sizeof...
2012/11/12
[ "https://Stackoverflow.com/questions/13348002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1818669/" ]
You couldn't do that in Java, either. In Java, the entrypoint is a static method and has no associated object instance. The solution is the same -- instantiate your type. ``` int main(int argc, char** argv) { MainClass main_object; // creates an instance Unit units[3]={{5,5,&main_object},{8,8,&main_object},{12,...
c++ isn't like java. You don't need to have all of your methods(or functions as they're called in c++) inside a class. `main` is a function, not a class. there is no `this` Now you can have global variables, or you can put variables/objects on the heap, for other classes to be able to use, but in general, c# doesn't...
740
I'm trying to override a view table from within my module. I can't locate what the arguments are suppose to be and in what order (for my hook\_theme func). I copied the theme file from views/themes and did no modifications. Does anyone know what is going wrong, and what should the arguments value be below? My theme co...
2011/03/14
[ "https://drupal.stackexchange.com/questions/740", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/69/" ]
The easiest way to theme views is to edit the particular view in question and scroll down to find the link 'theme information'. This screen will tell you exactly what views theming templates that it is currently using and what templates you can make in your theme to override this output. That essentially all views the...
The theme function you want to override, is a templated theme function. This means that a preprocess function is called, and them the variables are passed to the template. Preprocess functions are a bit different, in that only a single variable is passed to it: an array containing all variables, so the order of the var...
740
I'm trying to override a view table from within my module. I can't locate what the arguments are suppose to be and in what order (for my hook\_theme func). I copied the theme file from views/themes and did no modifications. Does anyone know what is going wrong, and what should the arguments value be below? My theme co...
2011/03/14
[ "https://drupal.stackexchange.com/questions/740", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/69/" ]
The easiest way to theme views is to edit the particular view in question and scroll down to find the link 'theme information'. This screen will tell you exactly what views theming templates that it is currently using and what templates you can make in your theme to override this output. That essentially all views the...
It's way better to preprocess the view. If you want to override just a particular display, you need to be specific. You must first create a tpl.php file for the view. You can figure out which one you want by looking at the theme information for your particular view. Here is an example: ![enter image description here]...
740
I'm trying to override a view table from within my module. I can't locate what the arguments are suppose to be and in what order (for my hook\_theme func). I copied the theme file from views/themes and did no modifications. Does anyone know what is going wrong, and what should the arguments value be below? My theme co...
2011/03/14
[ "https://drupal.stackexchange.com/questions/740", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/69/" ]
The easiest way to theme views is to edit the particular view in question and scroll down to find the link 'theme information'. This screen will tell you exactly what views theming templates that it is currently using and what templates you can make in your theme to override this output. That essentially all views the...
It actually looks mostly correct to me, I used the same code in my module. I wanted to package my template file with my view in the module. As the site uses the regular bartik theme for admin and I didn't want to edit that theme to add my CSS. What I believe is wrong is the following: ``` 'views_view_table__opportuni...
28,714,622
my project is in **vbnet**. i have a **stored procedure**, and get the results with **linq**. i know how to get it with sql adapter, which is easy in sorting and filtering, but i have to do it with linq. my code is like that. ``` dgv.DataSource = db.Egitek_Gorev_Listesi(LoggedUserID) ``` data is shown in datagridv...
2015/02/25
[ "https://Stackoverflow.com/questions/28714622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3950877/" ]
The corresponding entity for `dbo.AspNetUserLogins` table is `IdentityUserLogin` class. So we just need to declare an appropriate `IDbSet<IdentityUserLogin>` or `DbSet<IdentityUserLogin>` property in the `ApplicationDbContext` class as follows: ``` public class ApplicationDbContext : IdentityDbContext<ApplicationUser>...
I know this is old but for anyone looking to do this with asp .Net Core: Add user manager to your controller constructor that you can access below by DI. ``` var user = await _userManager.GetUserAsync(User); var hello = await _userManager.GetLoginsAsync(user); ```
38,286
I know that memorising the whole the Quran is fard kifaya but are there any other fard kifaya acts ?
2017/03/05
[ "https://islam.stackexchange.com/questions/38286", "https://islam.stackexchange.com", "https://islam.stackexchange.com/users/20796/" ]
The most known examples are the funeral prayer (salat al-Janazah beside the janazah -burying itself- and the ghusl of the dead person), jihad, memorizing quran, getting or seeking knowledge, enjoining what is good and forbidding what is evil and ijtihad. What constitutes fard al-kifaya فرض كفاية is that it is an oblig...
example: The five daily prayers for which muslims are individually responsible!
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
If you are on PC, you can use the console to add and remove perks. **Finding a perk id:** help [name of perk] 4 *help Armsman 4* **Removing a perk** player.removeperk [perk id] *player.removeperk 00079342* **Adding a perk** player.addperk [perk id] *player.addperk 00079342* Notes: * You can use ...
You can get the skill up to 100, make it legendary to make the skill 15 again. The perks you dumped into it will be removed and you can reuse them
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
If you are on PC, you can use the console to add and remove perks. **Finding a perk id:** help [name of perk] 4 *help Armsman 4* **Removing a perk** player.removeperk [perk id] *player.removeperk 00079342* **Adding a perk** player.addperk [perk id] *player.addperk 00079342* Notes: * You can use ...
For PC. An easy solution related to all perks, so you can basically recreate your char: This mod will remove all perks and add the right ammount removed as perk points: [Ishs Respec Mod](http://www.nexusmods.com/skyrim/mods/16471/?) If there remain any perks after the above mod being used, use the console to rem...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
There is no way to reset your perks on the Xbox 360 without the Dragonborn DLC, and no way to do it on the PlayStation 3 until Bethesda releases Dragonborn for that console, but you can redo your perks in the PC version of the game by using the [console commands](http://www.uesp.net/wiki/Skyrim:Console): ``` player.re...
For PC. An easy solution related to all perks, so you can basically recreate your char: This mod will remove all perks and add the right ammount removed as perk points: [Ishs Respec Mod](http://www.nexusmods.com/skyrim/mods/16471/?) If there remain any perks after the above mod being used, use the console to rem...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
You can remove perks you currently have by using: > > player.removeperk *perkid* > > > To find out the id of the perk, type this in: > > help "perk name here" 0 > > > This will bring up a list of all items matching your query (hopefully it contains the perk in that list). To add a perk: > > player.addper...
If you have the Dragonborn DLC, play through the main DLC questline. One of the rewards of completing the [At the Summit of Apocrypha](http://www.uesp.net/wiki/Dragonborn:At_the_Summit_of_Apocrypha) quest is: > > A book that transports you to Hermaeus Mora's realm, and allows you to reset perks at the cost of one Dr...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
Alternatively to cheating, there are other options: 1. Get yourself killed, your perk won't be saved. 2. Quit the game abruptly without saving, your perk won't be saved. 3. Although not really fair, you could return to a previous save game.
For PC. An easy solution related to all perks, so you can basically recreate your char: This mod will remove all perks and add the right ammount removed as perk points: [Ishs Respec Mod](http://www.nexusmods.com/skyrim/mods/16471/?) If there remain any perks after the above mod being used, use the console to rem...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
If you are on PC, you can use the console to add and remove perks. **Finding a perk id:** help [name of perk] 4 *help Armsman 4* **Removing a perk** player.removeperk [perk id] *player.removeperk 00079342* **Adding a perk** player.addperk [perk id] *player.addperk 00079342* Notes: * You can use ...
Alternatively to cheating, there are other options: 1. Get yourself killed, your perk won't be saved. 2. Quit the game abruptly without saving, your perk won't be saved. 3. Although not really fair, you could return to a previous save game.
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
You can get the skill up to 100, make it legendary to make the skill 15 again. The perks you dumped into it will be removed and you can reuse them
For PC. An easy solution related to all perks, so you can basically recreate your char: This mod will remove all perks and add the right ammount removed as perk points: [Ishs Respec Mod](http://www.nexusmods.com/skyrim/mods/16471/?) If there remain any perks after the above mod being used, use the console to rem...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
If you have the Dragonborn DLC, play through the main DLC questline. One of the rewards of completing the [At the Summit of Apocrypha](http://www.uesp.net/wiki/Dragonborn:At_the_Summit_of_Apocrypha) quest is: > > A book that transports you to Hermaeus Mora's realm, and allows you to reset perks at the cost of one Dr...
Alternatively to cheating, there are other options: 1. Get yourself killed, your perk won't be saved. 2. Quit the game abruptly without saving, your perk won't be saved. 3. Although not really fair, you could return to a previous save game.
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
If you have the Dragonborn DLC, play through the main DLC questline. One of the rewards of completing the [At the Summit of Apocrypha](http://www.uesp.net/wiki/Dragonborn:At_the_Summit_of_Apocrypha) quest is: > > A book that transports you to Hermaeus Mora's realm, and allows you to reset perks at the cost of one Dr...
For PC. An easy solution related to all perks, so you can basically recreate your char: This mod will remove all perks and add the right ammount removed as perk points: [Ishs Respec Mod](http://www.nexusmods.com/skyrim/mods/16471/?) If there remain any perks after the above mod being used, use the console to rem...
35,121
While leveling in Skyrim I put a perk in a tree, but now I feel like it is wasted, since I've found blowing things up with spells is much more fun than stabbing things with a giant sword. Is there anyway for me to recover the wasted perk? I'm on the PC so I was guessing console commands could help.
2011/11/11
[ "https://gaming.stackexchange.com/questions/35121", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/3015/" ]
You can remove perks you currently have by using: > > player.removeperk *perkid* > > > To find out the id of the perk, type this in: > > help "perk name here" 0 > > > This will bring up a list of all items matching your query (hopefully it contains the perk in that list). To add a perk: > > player.addper...
Alternatively to cheating, there are other options: 1. Get yourself killed, your perk won't be saved. 2. Quit the game abruptly without saving, your perk won't be saved. 3. Although not really fair, you could return to a previous save game.
1,086,806
Since I upgraded from Ubuntu 16.04 to 18.04, both Filezilla and Firefox always open in full-screen mode, no matter how I have adjusted them before closing. What can I do to change this annoying behaviour?
2018/10/24
[ "https://askubuntu.com/questions/1086806", "https://askubuntu.com", "https://askubuntu.com/users/885664/" ]
Either: 1. Double-click on the application's titlebar to minimize/maximize the window. 2. Use the GNOME Tweaks tool, and enable the following, and then click the little square icon in the top-right corner of the application's window. [![enter image description here](https://i.stack.imgur.com/nihCZ.png)](https://i.sta...
Problem with Firefox has been solved by software update. Don't know if it was a Firefox problem or something in Ubuntu. Problem with Filezilla always opening at full-screen continues but I can live with that. Thanks for all your suggestions -- it has been a learning experience for me.
521,702
I am a LaTeX newbie. I am curious to hear your recommendations about the best places to learn it. More precisely, I am going to start writing my doctoral thesis in it. Our school already has a template but I would like to get the basics first before diving into that template. With that, I plan to continue writing my jo...
2019/12/23
[ "https://tex.stackexchange.com/questions/521702", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/203832/" ]
My go to is [Wiki](https://en.wikibooks.org/wiki/LaTeX). It literally has everything you need. It is laid out pretty great where you can both learn, and use it as a reference. I use it often. Also, the TeX - LaTeX StackExchange is an excellent place to get answers to specific problems. Once you have an appropriate tem...
I suggest that you just start using LaTeX for small projects, perhaps at [sharelatex](https://www.google.com/search?client=ubuntu&channel=fs&q=sharelatex&ie=utf-8&oe=utf-8) or [overleaf](https://www.overleaf.com/). If you're really brand new to it, search online for *latex tutorial*. Once you are underway, learn feat...
521,702
I am a LaTeX newbie. I am curious to hear your recommendations about the best places to learn it. More precisely, I am going to start writing my doctoral thesis in it. Our school already has a template but I would like to get the basics first before diving into that template. With that, I plan to continue writing my jo...
2019/12/23
[ "https://tex.stackexchange.com/questions/521702", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/203832/" ]
My go to is [Wiki](https://en.wikibooks.org/wiki/LaTeX). It literally has everything you need. It is laid out pretty great where you can both learn, and use it as a reference. I use it often. Also, the TeX - LaTeX StackExchange is an excellent place to get answers to specific problems. Once you have an appropriate tem...
Check out the IITB LaTeX course at edX
521,702
I am a LaTeX newbie. I am curious to hear your recommendations about the best places to learn it. More precisely, I am going to start writing my doctoral thesis in it. Our school already has a template but I would like to get the basics first before diving into that template. With that, I plan to continue writing my jo...
2019/12/23
[ "https://tex.stackexchange.com/questions/521702", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/203832/" ]
Little known fact: arXiv is great for this. Look for papers in your field on arXiv, and instead of downloading the pdf, download the source file (changing the file type if needed, so that it will open). Not only will you learn how to make fancy tables, pictures, etc... --- you will also often get to read all the commen...
I suggest that you just start using LaTeX for small projects, perhaps at [sharelatex](https://www.google.com/search?client=ubuntu&channel=fs&q=sharelatex&ie=utf-8&oe=utf-8) or [overleaf](https://www.overleaf.com/). If you're really brand new to it, search online for *latex tutorial*. Once you are underway, learn feat...
521,702
I am a LaTeX newbie. I am curious to hear your recommendations about the best places to learn it. More precisely, I am going to start writing my doctoral thesis in it. Our school already has a template but I would like to get the basics first before diving into that template. With that, I plan to continue writing my jo...
2019/12/23
[ "https://tex.stackexchange.com/questions/521702", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/203832/" ]
I suggest that you just start using LaTeX for small projects, perhaps at [sharelatex](https://www.google.com/search?client=ubuntu&channel=fs&q=sharelatex&ie=utf-8&oe=utf-8) or [overleaf](https://www.overleaf.com/). If you're really brand new to it, search online for *latex tutorial*. Once you are underway, learn feat...
Check out the IITB LaTeX course at edX
521,702
I am a LaTeX newbie. I am curious to hear your recommendations about the best places to learn it. More precisely, I am going to start writing my doctoral thesis in it. Our school already has a template but I would like to get the basics first before diving into that template. With that, I plan to continue writing my jo...
2019/12/23
[ "https://tex.stackexchange.com/questions/521702", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/203832/" ]
Little known fact: arXiv is great for this. Look for papers in your field on arXiv, and instead of downloading the pdf, download the source file (changing the file type if needed, so that it will open). Not only will you learn how to make fancy tables, pictures, etc... --- you will also often get to read all the commen...
Check out the IITB LaTeX course at edX
61,197,916
I've got myself a bit confused regarding variables in Python, just looking for a bit of clarification. In the following code, I will pass a global variable into my own Python function which simply takes the value and multiplies it by 2. Very simple. It does not return the variable after. The output from the print fun...
2020/04/13
[ "https://Stackoverflow.com/questions/61197916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9200058/" ]
Thank You Botje! Thank You very much for trying to help me. But I have no time anymore for learning openssl. So I found a great one: **<https://github.com/Thalhammer/jwt-cpp>** from here **jwt.io** It doesn't support the 'scope' field for the jwt-claim, so I just added a method into a class into a header: 'set\_scope(...
No need to mark this answer as accepted, yours is by far the easier solution. I'm posting this for future readers to find. For what it's worth, I was able to reproduce the raw hash in the RS256 test case with the following: ``` void die() { for (int err = ERR_get_error(); err != 0; err = ERR_get_error()) { ...
61,197,916
I've got myself a bit confused regarding variables in Python, just looking for a bit of clarification. In the following code, I will pass a global variable into my own Python function which simply takes the value and multiplies it by 2. Very simple. It does not return the variable after. The output from the print fun...
2020/04/13
[ "https://Stackoverflow.com/questions/61197916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9200058/" ]
Thank You Botje! Thank You very much for trying to help me. But I have no time anymore for learning openssl. So I found a great one: **<https://github.com/Thalhammer/jwt-cpp>** from here **jwt.io** It doesn't support the 'scope' field for the jwt-claim, so I just added a method into a class into a header: 'set\_scope(...
Just for future people looking this up and struggle how to compute a RS256 (SHA256WithRSA)-Hash in OpenSSL, since I spent about 5 hours researching the error. The [code from Botje](https://stackoverflow.com/a/61224645/7182007) is quite close, but is missing the *Finalize* method (and the destructors). ```cpp #include ...
61,197,916
I've got myself a bit confused regarding variables in Python, just looking for a bit of clarification. In the following code, I will pass a global variable into my own Python function which simply takes the value and multiplies it by 2. Very simple. It does not return the variable after. The output from the print fun...
2020/04/13
[ "https://Stackoverflow.com/questions/61197916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9200058/" ]
Just for future people looking this up and struggle how to compute a RS256 (SHA256WithRSA)-Hash in OpenSSL, since I spent about 5 hours researching the error. The [code from Botje](https://stackoverflow.com/a/61224645/7182007) is quite close, but is missing the *Finalize* method (and the destructors). ```cpp #include ...
No need to mark this answer as accepted, yours is by far the easier solution. I'm posting this for future readers to find. For what it's worth, I was able to reproduce the raw hash in the RS256 test case with the following: ``` void die() { for (int err = ERR_get_error(); err != 0; err = ERR_get_error()) { ...
40,671,349
As per the title, I need a string format where ``` sprintf(xxx,5) prints "5" sprintf(xxx,5.1) prints "5.1" sprintf(xxx,15.1234) prints "15.12" ``` That is: no leading zeros, no trailing zeros, maximum of 2 decimals. Is it possible? if not with sprintf, some other way? The use case is to report de...
2016/11/18
[ "https://Stackoverflow.com/questions/40671349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2986596/" ]
Maybe `formatC` is easier for this: ``` formatC(c(5, 5.1, 5.1234), digits = 2, format = "f", drop0trailing = TRUE) #[1] "5" "5.1" "5.12" ```
A solution based on `sprintf` as suggested: ``` sprintf("%.4g", 5) #[1] "5" sprintf("%.4g", 5.1) #[1] "5.1" sprintf("%.4g", 15.1234) #[1] "15.12" ``` Verbose information to `sprintf` can be found e.g. here: <http://www.cplusplus.com/reference/cstdio/printf/> which says: > > g | Use the shortest representation: %e...
28,861,972
This should be quite simple but I didn`t manage to find it. If I am running some batch script in cmd, how do I get process id of the hosting cmd? ``` set currentCmdPid= /* some magic */ echo %currentCmdPid% ``` I have found a lot of solutions that use `tasklist` and name filtering but I believe that this won`t work...
2015/03/04
[ "https://Stackoverflow.com/questions/28861972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/945343/" ]
Here the topic has been discussed -> <http://www.dostips.com/forum/viewtopic.php?p=38870> Here's my solution: ``` @if (@X)==(@Y) @end /* JScript comment @echo off setlocal for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( set "jsc=%%v" ) if not exist...
To get cmd PID, from cmd I run powershell and get parent process Id -- that will be cmd PID. Script gets parent of a parent (since `FOR /F` calls another cmd.exe). ``` FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -c "(gwmi win32_process | ? processid -eq ((gwmi win32_process | ? processid -eq $PID).parentprocessid...
28,861,972
This should be quite simple but I didn`t manage to find it. If I am running some batch script in cmd, how do I get process id of the hosting cmd? ``` set currentCmdPid= /* some magic */ echo %currentCmdPid% ``` I have found a lot of solutions that use `tasklist` and name filtering but I believe that this won`t work...
2015/03/04
[ "https://Stackoverflow.com/questions/28861972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/945343/" ]
Here is [my pure batch script version](http://www.dostips.com/forum/viewtopic.php?p=38870#p38870) that resulted from the [same DosTips discussion and collaborative effort that npocmaka referenced](http://www.dostips.com/forum/viewtopic.php?p=38870). ``` @echo off :getPID [RtnVar] :: :: Store the Process ID (PID) of ...
To get cmd PID, from cmd I run powershell and get parent process Id -- that will be cmd PID. Script gets parent of a parent (since `FOR /F` calls another cmd.exe). ``` FOR /F "tokens=* USEBACKQ" %%F IN (`powershell -c "(gwmi win32_process | ? processid -eq ((gwmi win32_process | ? processid -eq $PID).parentprocessid...
3,650,353
Show that $2^n>\frac{(n-1)n}{2}$ without using induction. MY attempt : $$1+2+3+...+(n-2)+(n-1)=\frac{n(n-1)}{2}$$ Since $2^n>n$, $$2^n+2^n+2^n+...+2^n+2^n>\frac{n(n-1)}{2}$$ $$(n-1)2^n>\frac{n(n-1)}{2}$$ SO I'm getting an obvious fact :( How to do it without induction?
2020/04/29
[ "https://math.stackexchange.com/questions/3650353", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
Suppose you have a finite set of $n$ elements. $2^n$ is the number of all possible subsets. $n(n-1)/2$ is the number of subsets of size exactly two, which is strictly less than the number of all possible subsets.
\begin{eqnarray} 2^0 &\geq& 1 \\ 2^1 &\geq& 2 \\ 2^2 &>& 3 \\ &\vdots& \\ 2^{n-1} &>& n-1 \quad \text{for } n>1 \\ \end{eqnarray} If you add everything up, you get (for $n>1$): $$ 2^n -1 = 2^0+2^1+...+2^{n-1} > 1+2+3+...+(n-1) = \frac{n(n-1)}{2} $$ which means that for $n>1$ $$ 2^n > 1+\frac{n(n-1)}{2} > \frac{n(n-1)}{...
3,650,353
Show that $2^n>\frac{(n-1)n}{2}$ without using induction. MY attempt : $$1+2+3+...+(n-2)+(n-1)=\frac{n(n-1)}{2}$$ Since $2^n>n$, $$2^n+2^n+2^n+...+2^n+2^n>\frac{n(n-1)}{2}$$ $$(n-1)2^n>\frac{n(n-1)}{2}$$ SO I'm getting an obvious fact :( How to do it without induction?
2020/04/29
[ "https://math.stackexchange.com/questions/3650353", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
Suppose you have a finite set of $n$ elements. $2^n$ is the number of all possible subsets. $n(n-1)/2$ is the number of subsets of size exactly two, which is strictly less than the number of all possible subsets.
If you are allowed to use "well known facts" WKF1: $2^n - 1=\sum\_{k=0}^{n-1} 2^k$. WKF2: $\frac {n(n-1)}2 = \sum\_{k=0}^{n-1} k$ WKF3: $2^k > k$ WKF4: $b\_k > a\_k$ then $\sum\_{k=0}^n b\_k > \sum\_{k=0}^n a\_k$. So ... $2^n> 2^n-1 =\sum\_{k=0}^{n-1} 2^k > \sum\_{k=0}^{n-1} k = \frac {n(n-1)}2$. .... But.... I'...
3,650,353
Show that $2^n>\frac{(n-1)n}{2}$ without using induction. MY attempt : $$1+2+3+...+(n-2)+(n-1)=\frac{n(n-1)}{2}$$ Since $2^n>n$, $$2^n+2^n+2^n+...+2^n+2^n>\frac{n(n-1)}{2}$$ $$(n-1)2^n>\frac{n(n-1)}{2}$$ SO I'm getting an obvious fact :( How to do it without induction?
2020/04/29
[ "https://math.stackexchange.com/questions/3650353", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
**Hint** For $n \geq 2$ you have: $$2^n=(1+1)^n= \sum\_{k=0}^n \binom{n}{k} > \binom{n}{2}$$
\begin{eqnarray} 2^0 &\geq& 1 \\ 2^1 &\geq& 2 \\ 2^2 &>& 3 \\ &\vdots& \\ 2^{n-1} &>& n-1 \quad \text{for } n>1 \\ \end{eqnarray} If you add everything up, you get (for $n>1$): $$ 2^n -1 = 2^0+2^1+...+2^{n-1} > 1+2+3+...+(n-1) = \frac{n(n-1)}{2} $$ which means that for $n>1$ $$ 2^n > 1+\frac{n(n-1)}{2} > \frac{n(n-1)}{...
3,650,353
Show that $2^n>\frac{(n-1)n}{2}$ without using induction. MY attempt : $$1+2+3+...+(n-2)+(n-1)=\frac{n(n-1)}{2}$$ Since $2^n>n$, $$2^n+2^n+2^n+...+2^n+2^n>\frac{n(n-1)}{2}$$ $$(n-1)2^n>\frac{n(n-1)}{2}$$ SO I'm getting an obvious fact :( How to do it without induction?
2020/04/29
[ "https://math.stackexchange.com/questions/3650353", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
\begin{eqnarray} 2^0 &\geq& 1 \\ 2^1 &\geq& 2 \\ 2^2 &>& 3 \\ &\vdots& \\ 2^{n-1} &>& n-1 \quad \text{for } n>1 \\ \end{eqnarray} If you add everything up, you get (for $n>1$): $$ 2^n -1 = 2^0+2^1+...+2^{n-1} > 1+2+3+...+(n-1) = \frac{n(n-1)}{2} $$ which means that for $n>1$ $$ 2^n > 1+\frac{n(n-1)}{2} > \frac{n(n-1)}{...
If you are allowed to use "well known facts" WKF1: $2^n - 1=\sum\_{k=0}^{n-1} 2^k$. WKF2: $\frac {n(n-1)}2 = \sum\_{k=0}^{n-1} k$ WKF3: $2^k > k$ WKF4: $b\_k > a\_k$ then $\sum\_{k=0}^n b\_k > \sum\_{k=0}^n a\_k$. So ... $2^n> 2^n-1 =\sum\_{k=0}^{n-1} 2^k > \sum\_{k=0}^{n-1} k = \frac {n(n-1)}2$. .... But.... I'...
3,650,353
Show that $2^n>\frac{(n-1)n}{2}$ without using induction. MY attempt : $$1+2+3+...+(n-2)+(n-1)=\frac{n(n-1)}{2}$$ Since $2^n>n$, $$2^n+2^n+2^n+...+2^n+2^n>\frac{n(n-1)}{2}$$ $$(n-1)2^n>\frac{n(n-1)}{2}$$ SO I'm getting an obvious fact :( How to do it without induction?
2020/04/29
[ "https://math.stackexchange.com/questions/3650353", "https://math.stackexchange.com", "https://math.stackexchange.com/users/280637/" ]
**Hint** For $n \geq 2$ you have: $$2^n=(1+1)^n= \sum\_{k=0}^n \binom{n}{k} > \binom{n}{2}$$
If you are allowed to use "well known facts" WKF1: $2^n - 1=\sum\_{k=0}^{n-1} 2^k$. WKF2: $\frac {n(n-1)}2 = \sum\_{k=0}^{n-1} k$ WKF3: $2^k > k$ WKF4: $b\_k > a\_k$ then $\sum\_{k=0}^n b\_k > \sum\_{k=0}^n a\_k$. So ... $2^n> 2^n-1 =\sum\_{k=0}^{n-1} 2^k > \sum\_{k=0}^{n-1} k = \frac {n(n-1)}2$. .... But.... I'...
52,747,847
Write a function named "find\_value" that takes a key-value store as a parameter with strings as keys and integers as values. The function returns a boolean representing true if the value 7 is in the input as a value, false otherwise. (My code below) ``` function find_value(key){ for (var i of Object.values(key)){...
2018/10/10
[ "https://Stackoverflow.com/questions/52747847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your loops is returning false on your first item, most likely. You should keep the condition and return true statement in the loop, but after the loop you should return false. P.S. You should name your parameter and set a default value for good practice. I renamed it in my example below. ``` function find_value(myObj...
You have 2 problems here: 1. You are passing an array with an object inside. 2. In else you are returning false, so function will test only the first value. BTW it could be done this way: ``` return Object.values(obj).includes(7); ```
52,747,847
Write a function named "find\_value" that takes a key-value store as a parameter with strings as keys and integers as values. The function returns a boolean representing true if the value 7 is in the input as a value, false otherwise. (My code below) ``` function find_value(key){ for (var i of Object.values(key)){...
2018/10/10
[ "https://Stackoverflow.com/questions/52747847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your loops is returning false on your first item, most likely. You should keep the condition and return true statement in the loop, but after the loop you should return false. P.S. You should name your parameter and set a default value for good practice. I renamed it in my example below. ``` function find_value(myObj...
In order for this to work as expected, you should pass an object into `find_values()`, rather than an array as you are doing. Also, you will want to update the flow of your function, by returning false after loop iteration has completed: ```js function find_value(key){ for (var i of Object.values(key)){ ...
52,747,847
Write a function named "find\_value" that takes a key-value store as a parameter with strings as keys and integers as values. The function returns a boolean representing true if the value 7 is in the input as a value, false otherwise. (My code below) ``` function find_value(key){ for (var i of Object.values(key)){...
2018/10/10
[ "https://Stackoverflow.com/questions/52747847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your loops is returning false on your first item, most likely. You should keep the condition and return true statement in the loop, but after the loop you should return false. P.S. You should name your parameter and set a default value for good practice. I renamed it in my example below. ``` function find_value(myObj...
Try ``` function find_value(key){ for (var i of Object.values(key)){ if (i == 7){ return true; } } } ```
52,747,847
Write a function named "find\_value" that takes a key-value store as a parameter with strings as keys and integers as values. The function returns a boolean representing true if the value 7 is in the input as a value, false otherwise. (My code below) ``` function find_value(key){ for (var i of Object.values(key)){...
2018/10/10
[ "https://Stackoverflow.com/questions/52747847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your loops is returning false on your first item, most likely. You should keep the condition and return true statement in the loop, but after the loop you should return false. P.S. You should name your parameter and set a default value for good practice. I renamed it in my example below. ``` function find_value(myObj...
Your function automatically returns true or false in the first iteration. The simplest solution that is very beginner-friendly is to set a boolean flag before the loop and check it at the end of the loop Also you were looping through the array and checking for a value when the loop would return you an object with prop...
13,042,459
I have two tables. One is the "probe" and the other "transcript". Probe table: "probe" ProbeID-------TranscriptID---- ``` 2655 4555555 2600 5454542 2600 4543234 2344 5659595 ``` ...etc Transcript table: "transcript" TranscriptID----Location---- ``` 7896736 chr1 5454542 chr1 `...
2012/10/24
[ "https://Stackoverflow.com/questions/13042459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698774/" ]
I did this exact thing on a client site. I re-used the same product grid across the entire site and it was 100% DRY. I used the dev branch of Stash and used the new embed feature. While regular embeds are always an option that *work*, Stash embeds are more efficient and more powerful. The real difference is how you pa...
You can either use embeds or possibly stash depending on what you are trying to pass. <https://github.com/croxton/Stash>
26,932,366
As a previous result of a bad TFS project management, several tasks has been created in the wrong work item. Now I need to move several tasks to different work items. Is there an easy way to do it? So far, I have to edit each task, remove the previos link to primary element and create a new one, but this is taking a l...
2014/11/14
[ "https://Stackoverflow.com/questions/26932366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/897383/" ]
I suspect that the easiest way to do it would be from Excel. Create a Tree-based query that shows everything, then move the child records in Excel using simple cut and insert cut cells. Excel will then allow you to publish the new structure in one go. If you need to move items up to a higher or lower level, place the ...
MS Project is extremely good with modifying hierarchies of work items. The steps are exactly the same as setting it up in Excel, but project inherently handles parent/child relationships, giving them a drag-and-drop interaction. jessehouwing's Excel answer will be easier if you have never worked with project before. ...
16,375,500
I'm creating a hibernate app and I'm able to save data to dtb via `hibernate`. Nevertheless I wasn't able to figure out, how to retrieve data from database. Could anybody show me, how to do that in some way, that will be similar to the way, I save data? I've been googling a lot, but everything, I didn't find anything, ...
2013/05/04
[ "https://Stackoverflow.com/questions/16375500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1364923/" ]
Assuming the table name is User, here is the sample code to get a User data for an input userId: ``` public User findUserById(int userId) { Session session = HibernateUtil.getSessionFactory().openSession(); String queryString = "from User where userId = :userId"; Query query = session.createQuery(queryStrin...
In the end, I've found answer in another poste here, on SO. ``` // finds user by ID public UserDAO findUserById(int userId) { Session session = HibernateUtil.getSessionFactory().openSession(); session = HibernateUtil.getSessionFactory().openSession(); UserDAO userDAO = (UserDAO) session.get(UserDAO.class,...
56,778,762
I am using SQL Server and in my database I have a date column of type `varchar` and has data like `04042011`. I am trying to write a query that is being used for another program and it is requesting the format in a military format such as `YYYY-MM-DD`. Is there any way to do this on the fly for `HireDate` and `Separati...
2019/06/26
[ "https://Stackoverflow.com/questions/56778762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4106374/" ]
If truly 8 characters. I would stress use try\_convert() in case you have some bogus data. ``` Select try_convert(date,right(HierDate,4)+left(HierDate,4)) From YourTable ``` To Trap EMPTY values. This will return a NULL and not 1900-01-01 ``` Select try_convert(date,nullif(HierDate,'')+left(HierDate,4)) From Yo...
Concatenate the string from the [substrings](https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-2017) that you want. ``` SUBSTRING(YourField, {The position that the year starts}, 4) +'-'+ SUBSTRING(YourField, {The position that the month starts}, 2) +'-'+ SUBSTRING(YourField, ...
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
I have exactly the same situation at work (with CVS instead of subversion and the rest of the team using KDevelop but that's no big deal). Just start a new Qt Gui project using the Qt - Eclipse integration features and then remove all the auto generated files. Now using the "Team" features of eclipse and choose to shar...
Second nikolavp - Checkout, and mark the option to use the new project wizard, then select Qt project. I've done this (with ganymede) and it successfully finds everything and builds correctly.
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
The only way I could get this to work was to check out the project with eclipse and then copy over the .project and .cdtproject files from another Qt-project. Then do a refresh on the project. This is a horrible hack but it gets you started. You might need to define another builder for 'make'.
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
I would create a new QT project in eclipse, then switch perspectives to subclipse and simply do a SVN checkout into the new eclipse project. You should be good to go.
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
I would create a new QT project in eclipse, then switch perspectives to subclipse and simply do a SVN checkout into the new eclipse project. You should be good to go.
Checkout the project. It will ask you some options like if you want to start with a blank project, or want to use the tree to make a new project. Choose the latter and you should be ok :). It seems to work for me with Ganymed and subversive(not sure about subclipse and i don't remember.) :)
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
My solution: 1. go to the svn-view and add the repository location for your project 2. check out the project some temporary location with svn or any client you like 3. choose 'File->Import...' and say 'Qt->Qt project' 4. browse to the location of the \*.pro file, select and hit the OK-Button 5. you are in the game wit...
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
I have exactly the same situation at work (with CVS instead of subversion and the rest of the team using KDevelop but that's no big deal). Just start a new Qt Gui project using the Qt - Eclipse integration features and then remove all the auto generated files. Now using the "Team" features of eclipse and choose to shar...
I would say the same as the last one, but instead of the two first steps I would set up the Qt-Eclipse integration: [Qt-Eclipse integration](http://www.qtsoftware.com/developer/eclipse-integration) before looking for the \*.pro file.
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
I would say the same as the last one, but instead of the two first steps I would set up the Qt-Eclipse integration: [Qt-Eclipse integration](http://www.qtsoftware.com/developer/eclipse-integration) before looking for the \*.pro file.
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
Checkout the project. It will ask you some options like if you want to start with a blank project, or want to use the tree to make a new project. Choose the latter and you should be ok :). It seems to work for me with Ganymed and subversive(not sure about subclipse and i don't remember.) :)
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands"...
Second nikolavp - Checkout, and mark the option to use the new project wizard, then select Qt project. I've done this (with ganymede) and it successfully finds everything and builds correctly.
71,815
Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the...
2008/09/16
[ "https://Stackoverflow.com/questions/71815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11959/" ]
I would create a new QT project in eclipse, then switch perspectives to subclipse and simply do a SVN checkout into the new eclipse project. You should be good to go.
My solution: 1. go to the svn-view and add the repository location for your project 2. check out the project some temporary location with svn or any client you like 3. choose 'File->Import...' and say 'Qt->Qt project' 4. browse to the location of the \*.pro file, select and hit the OK-Button 5. you are in the game wit...
16,622
What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived e...
2019/05/16
[ "https://matheducators.stackexchange.com/questions/16622", "https://matheducators.stackexchange.com", "https://matheducators.stackexchange.com/users/200/" ]
The examples you give aren't exceptions. The parentheses aren't needed because there is no other way to interpret the expressions. In applications in engineering and the physical sciences, variables have units associated with them, and the units often disambiguate the expression without the need for parentheses. For e...
That's a good question. In addition to PEMDAS there's grouped symbols; they occur under a radical ($\sqrt{~}$, $\sqrt[n]{~}$), in the numerator and denominator of a fraction and in exponents. These grouped symbols are treated as if they are between parenthesis. That means that the expressions $a^{\text{expression}}$, $...
16,622
What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived e...
2019/05/16
[ "https://matheducators.stackexchange.com/questions/16622", "https://matheducators.stackexchange.com", "https://matheducators.stackexchange.com/users/200/" ]
The examples you give aren't exceptions. The parentheses aren't needed because there is no other way to interpret the expressions. In applications in engineering and the physical sciences, variables have units associated with them, and the units often disambiguate the expression without the need for parentheses. For e...
I would add the following to Paracosmiste's reply: Numerical negation (e.g. the '$-$' sign in in the expression $-x^2$) usually has an order of precedence that is less than that of exponentiation and greater than that of multiplication, division, addition and subtraction in order from right to left. So we have $-x^2=-...
16,622
What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived e...
2019/05/16
[ "https://matheducators.stackexchange.com/questions/16622", "https://matheducators.stackexchange.com", "https://matheducators.stackexchange.com/users/200/" ]
The examples you give aren't exceptions. The parentheses aren't needed because there is no other way to interpret the expressions. In applications in engineering and the physical sciences, variables have units associated with them, and the units often disambiguate the expression without the need for parentheses. For e...
Briefly: The thing that you seem to be orbiting around is that some mathematical symbols, in addition to having some primary operation, also have the secondary function of serving as "grouping" symbols. These symbols serve to group certain operations together in the same way that parentheses do, without extra notation....
16,622
What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived e...
2019/05/16
[ "https://matheducators.stackexchange.com/questions/16622", "https://matheducators.stackexchange.com", "https://matheducators.stackexchange.com/users/200/" ]
That's a good question. In addition to PEMDAS there's grouped symbols; they occur under a radical ($\sqrt{~}$, $\sqrt[n]{~}$), in the numerator and denominator of a fraction and in exponents. These grouped symbols are treated as if they are between parenthesis. That means that the expressions $a^{\text{expression}}$, $...
I would add the following to Paracosmiste's reply: Numerical negation (e.g. the '$-$' sign in in the expression $-x^2$) usually has an order of precedence that is less than that of exponentiation and greater than that of multiplication, division, addition and subtraction in order from right to left. So we have $-x^2=-...
16,622
What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived e...
2019/05/16
[ "https://matheducators.stackexchange.com/questions/16622", "https://matheducators.stackexchange.com", "https://matheducators.stackexchange.com/users/200/" ]
Briefly: The thing that you seem to be orbiting around is that some mathematical symbols, in addition to having some primary operation, also have the secondary function of serving as "grouping" symbols. These symbols serve to group certain operations together in the same way that parentheses do, without extra notation....
I would add the following to Paracosmiste's reply: Numerical negation (e.g. the '$-$' sign in in the expression $-x^2$) usually has an order of precedence that is less than that of exponentiation and greater than that of multiplication, division, addition and subtraction in order from right to left. So we have $-x^2=-...
39,080,703
I have a bootstrap popover element with a form inside. I do a `preventDefault()` when the form is submitted but it doesn't actually prevent the submit. When I don't use the popover and a modal instead it works perfectly. Here is my HTML: ``` <div class="hide" id="popover-content"> <form action="api/check.php" c...
2016/08/22
[ "https://Stackoverflow.com/questions/39080703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6730270/" ]
You're trying to append event handler for `.checkform` before adding it to DOM. You need to load second javascript file after loading contents html or append event globaly: ``` $("body").on("submit",".checkform", function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``...
Try it like this please: ``` $(document).on('submit', '.checkform', function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``` It is possible that the popover isn't loaded on page load and is getting generated just when it is needed so you need the document selector.
39,080,703
I have a bootstrap popover element with a form inside. I do a `preventDefault()` when the form is submitted but it doesn't actually prevent the submit. When I don't use the popover and a modal instead it works perfectly. Here is my HTML: ``` <div class="hide" id="popover-content"> <form action="api/check.php" c...
2016/08/22
[ "https://Stackoverflow.com/questions/39080703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6730270/" ]
You're trying to append event handler for `.checkform` before adding it to DOM. You need to load second javascript file after loading contents html or append event globaly: ``` $("body").on("submit",".checkform", function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``...
Because whenever the popover is opened a new dom fragment is created on the fly you may take advantage on this to attach events or manipulate the html itself like you need. From [bootstrap popover docs](http://getbootstrap.com/javascript/http://getbootstrap.com/javascript/#popovers) you need to listen for this event: ...
39,080,703
I have a bootstrap popover element with a form inside. I do a `preventDefault()` when the form is submitted but it doesn't actually prevent the submit. When I don't use the popover and a modal instead it works perfectly. Here is my HTML: ``` <div class="hide" id="popover-content"> <form action="api/check.php" c...
2016/08/22
[ "https://Stackoverflow.com/questions/39080703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6730270/" ]
You're trying to append event handler for `.checkform` before adding it to DOM. You need to load second javascript file after loading contents html or append event globaly: ``` $("body").on("submit",".checkform", function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``...
Thanks for the responses, I was using Meteor and had the same problem. I used @Marcel Wasilewski's response like so... ``` Template.voteContest.onRendered(function() { $(document).on('submit', '.keep-vote', function(event){ // Prevent default browser form submit event.preventDefault(); // Clear all popov...
39,080,703
I have a bootstrap popover element with a form inside. I do a `preventDefault()` when the form is submitted but it doesn't actually prevent the submit. When I don't use the popover and a modal instead it works perfectly. Here is my HTML: ``` <div class="hide" id="popover-content"> <form action="api/check.php" c...
2016/08/22
[ "https://Stackoverflow.com/questions/39080703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6730270/" ]
Try it like this please: ``` $(document).on('submit', '.checkform', function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``` It is possible that the popover isn't loaded on page load and is getting generated just when it is needed so you need the document selector.
Because whenever the popover is opened a new dom fragment is created on the fly you may take advantage on this to attach events or manipulate the html itself like you need. From [bootstrap popover docs](http://getbootstrap.com/javascript/http://getbootstrap.com/javascript/#popovers) you need to listen for this event: ...
39,080,703
I have a bootstrap popover element with a form inside. I do a `preventDefault()` when the form is submitted but it doesn't actually prevent the submit. When I don't use the popover and a modal instead it works perfectly. Here is my HTML: ``` <div class="hide" id="popover-content"> <form action="api/check.php" c...
2016/08/22
[ "https://Stackoverflow.com/questions/39080703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6730270/" ]
Try it like this please: ``` $(document).on('submit', '.checkform', function(e){ e.preventDefault(); var request = $("#domein").val(); $.ajax({ ... }); ``` It is possible that the popover isn't loaded on page load and is getting generated just when it is needed so you need the document selector.
Thanks for the responses, I was using Meteor and had the same problem. I used @Marcel Wasilewski's response like so... ``` Template.voteContest.onRendered(function() { $(document).on('submit', '.keep-vote', function(event){ // Prevent default browser form submit event.preventDefault(); // Clear all popov...
21,859,041
Here is what I want to do... I have a bunch of text files that I need to go through and keep only the top 5 lines. If I do `top` then output to a file that is part way there. I need the file name to be the same as it was earlier. Ex.: `file.name` - take top 5 lines (delete everything below line 5), then save file as ...
2014/02/18
[ "https://Stackoverflow.com/questions/21859041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3324211/" ]
You can use `head` to do this. ``` head -n 5 file.name > file.name.tmp && mv file.name.tmp file.name ``` You can structure this as a script to do it for all files, passing `file.name` as an argument in each run later.
The basic syntax, assuming you are working with a file called "file.name", is quite simple ``` head -n5 file.name > temp && cat temp > file.name ``` or ``` cat file.name | head -n5 > temp && cat temp > file.name ``` If you are trying to do this on a lot of files in a path, you should use something like ``` find ...
523,003
I have a text file where column and row number will always vary, and want to remove entire rows from the txt file only if every column within it is equal to either $VAR1 or $VAR2. For example: Lets say $VAR1="X" and $VAR2="N" and I want to remove any row where $VAR1 and $VAR2 makes up the entire column. This would b...
2019/06/05
[ "https://unix.stackexchange.com/questions/523003", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/170497/" ]
``` $ VAR1=N $ VAR2=X $ awk -v a="$VAR1" -v b="$VAR2" '{ for (i=1; i<=NF; ++i) if ($i != a && $i != b) { print; next } }' file hajn 32 ahnnd namm 5 543 asfn F 5739 dw 32eff Sfff 3 asd 3123 1 ``` Here, we transfer the values `$VAR1` and `$VAR2` into our short `awk` script and its `a` and `b` variables using `-v` on th...
You could grep out the desired results with the right choice of regex. Note: assuming the shell variables have bland chars, meaning those that are not interprettable as regex special. In case this doesn't hold true, then you can enrobe the vars in `\Q...\E` context. ``` $ grep -P "(^|\s)(?!$VAR1(\s|\$))(?!$VAR2(\s|\$...
48,305,293
I am using the the jQuery animate function for smooth scrolling inside a div however this function only works properly when you are scrolled at the top. after many console logs on the positions of the tags and hours trying to figure this out i know why this is. this is due to the position of the elements inside the ove...
2018/01/17
[ "https://Stackoverflow.com/questions/48305293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8233463/" ]
Animating `scrollTop` to the following position seems to fix the issue: ``` target.offset().top + $('#iddescription').scrollTop() - $('#iddescription').offset().top ``` I would also recommend you abort previous scroll animations using the `.stop()` method. So your full animation method would look something like th...
You need to get the current scroll top and then add the element.position.top() to it like so: ``` // Does a scroll target exist? if (target.length) { // Only prevent default if animation is actually gonna happen event.preventDefault(); var $currScrollTop = $("#iddescription").scrollTop(...
45,731,858
i am running the airflow pipeline but codes looks seems good but actually i'm getting the airflow.exceptions.AirflowException: Cycle detected in DAG. Faulty task: can u please help to resolve this issue
2017/08/17
[ "https://Stackoverflow.com/questions/45731858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8259305/" ]
This can happen due to duplicate task\_id'a in multiple tasks.
Without the code, it's kind of hard to help you. However, this means that you have a loop in your DAG. Generally, thie error happens when one of your task has a downstream task whose own downstream chain includes it again (A calls B calls C calls D calls A again, for example). That's not permitted by Airflow (and DAGs...
51,499,697
I am trying to solve Sherlock and Square problem in Hackerrank [(link)](https://www.hackerrank.com/challenges/sherlock-and-squares/problem) for finding the perfect square within a range of data. 4 test cases passed but i am getting a timeout error for large numbers. Please suggest something to improve its performance ...
2018/07/24
[ "https://Stackoverflow.com/questions/51499697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9256840/" ]
Kindly use div into div as you have 2 divs. one is for background and other one for Heading it will be like ``` <div class="bg"> <div id="heading">Some stuff</div> // All the staff for background will goes here </div> ``` it will work in your case and if you use other divs after this they will not have the b...
Please first search before ask question [Use a DIV as a background for another element](https://stackoverflow.com/questions/25970787/use-a-div-as-a-background-for-another-element) ```css #wrapper{ position: relative; width: 200px; height: 200px; } .content{ color: #FFFFFF; font-size: 26px;...