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 |
|---|---|---|---|---|---|
41,211,793 | How can I check if there is more content in a text file in c++ and if there is continue to read it?
I am trying to read a some words from a text file but the number of words is not specified. | 2016/12/18 | [
"https://Stackoverflow.com/questions/41211793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5915165/"
] | Today I have solved exactly the same problem. I think the main problem is in VirtualBox USB controller. Go to the settings of your virtual machine, select USB and you will see 'USB Controller 1.1 (OHCI)' by default. You have to select 'USB controller 2.0 (EHCI)'.
I have:
- VirtualBox: 5.1.12r112440 (Qt5.6.2)
- macOS Si... | Try this:
---------
1. Clean Project
2. Remove this folder Library/Developer/Xcode/DerivedData/ModuleCache
3. Find your project folder in Library/Developer/Xcode/DerivedData/ and remove
4. Restart Xcode |
41,211,793 | How can I check if there is more content in a text file in c++ and if there is continue to read it?
I am trying to read a some words from a text file but the number of words is not specified. | 2016/12/18 | [
"https://Stackoverflow.com/questions/41211793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5915165/"
] | Today I have solved exactly the same problem. I think the main problem is in VirtualBox USB controller. Go to the settings of your virtual machine, select USB and you will see 'USB Controller 1.1 (OHCI)' by default. You have to select 'USB controller 2.0 (EHCI)'.
I have:
- VirtualBox: 5.1.12r112440 (Qt5.6.2)
- macOS Si... | 1.Clean Project
2. Go to window tab , Device and simulator
3.Right click on your device list then click unpair device and reconnect the device.[](https://i.stack.imgur.com/wj3l8.png) |
50,504 | I was riding Shadowmere near Alftand and I accidentally fell into that canyon near the abandoned tower. The fall was enough to kill Shadowmere.
I have done a lot of quests and other things such as fast travel, waiting, and sleeping so I am wondering if that interrupted his respawn. Also if I come back to that point b... | 2012/02/11 | [
"https://gaming.stackexchange.com/questions/50504",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/19783/"
] | According to the wiki, you should wait [15-20 days](http://www.uesp.net/wiki/Skyrim:Shadowmere) for Shadowmere to respawn at the place he died. | This wiki article claims:
>
> If Shadowmere is killed, waiting in a main city for 10 days then
> returning to where he died should respawn him on both PC and console
> versions.
>
>
>
source: <http://elderscrolls.wikia.com/wiki/Shadowmere_(Skyrim)> |
50,504 | I was riding Shadowmere near Alftand and I accidentally fell into that canyon near the abandoned tower. The fall was enough to kill Shadowmere.
I have done a lot of quests and other things such as fast travel, waiting, and sleeping so I am wondering if that interrupted his respawn. Also if I come back to that point b... | 2012/02/11 | [
"https://gaming.stackexchange.com/questions/50504",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/19783/"
] | According to the wiki, you should wait [15-20 days](http://www.uesp.net/wiki/Skyrim:Shadowmere) for Shadowmere to respawn at the place he died. | I lost Shadowmere while fighting a dragon. He attacked while I was riding. I dismounted to show him what was up and got hit by one of those fly over breath attacks they do. i turned to watch him and saw Shadowmere flying of into the distance. It sucked to lose my buddy but it looked pretty funny. Anyway, around fifteen... |
50,504 | I was riding Shadowmere near Alftand and I accidentally fell into that canyon near the abandoned tower. The fall was enough to kill Shadowmere.
I have done a lot of quests and other things such as fast travel, waiting, and sleeping so I am wondering if that interrupted his respawn. Also if I come back to that point b... | 2012/02/11 | [
"https://gaming.stackexchange.com/questions/50504",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/19783/"
] | I lost Shadowmere while fighting a dragon. He attacked while I was riding. I dismounted to show him what was up and got hit by one of those fly over breath attacks they do. i turned to watch him and saw Shadowmere flying of into the distance. It sucked to lose my buddy but it looked pretty funny. Anyway, around fifteen... | This wiki article claims:
>
> If Shadowmere is killed, waiting in a main city for 10 days then
> returning to where he died should respawn him on both PC and console
> versions.
>
>
>
source: <http://elderscrolls.wikia.com/wiki/Shadowmere_(Skyrim)> |
26,471,978 | When I use celltemplate for ahref link, once the link is clicked the row highlights because i have RowSelection enabled...but i dont want the row to highlight when the link is clicked..only if the row is clicked anywhere but the link.
Also in my below example picture, how do I remove the little arrow so no Menuitems c... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26471978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1978485/"
] | Here is a possible answer to ui-grid (which is not ng-grid anymore!).
The cell template for a button that does not select the row is:
```
cellTemplate: '<button class="btn primary" ng-click="$event.stopPropagation();getExternalScopes().showMe(row)">Click Me</button>'
```
Note the `$event.stopPropagation()` in the n... | The simple [solution](https://stackoverflow.com/questions/39244455/how-to-highlight-the-current-row-when-cell-template-button-is-clicked-in-anguala/39246087) is change the `row.setSelected` to `false`
```
cellTemplate: '<button class="btn primary" ng-click="grid.appScope.deSelectRow(row)">Click Me</button>'
$scope.de... |
25,274,879 | I have recently learned about GROUPING SETS, CUBE and ROLLUP for defining multiple grouping sets in sql server.
What I am asking is under what circumstances do we use these features ? What are the benefits and advantages of using them?
```
SELECT shipperid, YEAR(shippeddate) AS shipyear, COUNT(*) AS numorders
FROM Sa... | 2014/08/12 | [
"https://Stackoverflow.com/questions/25274879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1759068/"
] | The `CUBE` is the same of `GROUPING SETS` with all possible combinations.
So this (using `CUBE`)
```
GROUP BY CUBE (C1, C2, C3, ..., Cn-2, Cn-1, Cn)
```
is the same of this (using `GROUPING SETS`)
```
GROUP BY GROUPING SETS (
(C1, C2, C3, ..., Cn-2, Cn-1, Cn) -- All dimensions are included.
,( , C2, C3, .... | I find they are good when you're producing a report and the result is not something which can be rolled up within the client.
For example, if you're doing something with `COUNT(DISTINCT...)` then the result across a larger group is not necessarily the same value as the sum of the parts. Eg, across two individual days ... |
25,274,879 | I have recently learned about GROUPING SETS, CUBE and ROLLUP for defining multiple grouping sets in sql server.
What I am asking is under what circumstances do we use these features ? What are the benefits and advantages of using them?
```
SELECT shipperid, YEAR(shippeddate) AS shipyear, COUNT(*) AS numorders
FROM Sa... | 2014/08/12 | [
"https://Stackoverflow.com/questions/25274879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1759068/"
] | Firstly, for those who haven't already read up on the subject:
* [Using GROUP BY with ROLLUP, CUBE, and GROUPING SETS](http://technet.microsoft.com/en-us/library/bb522495%28v=sql.105%29.aspx)
That being said, don't think about these grouping options as ways to get a result set. **These are performance tools**.
Let's... | The `CUBE` is the same of `GROUPING SETS` with all possible combinations.
So this (using `CUBE`)
```
GROUP BY CUBE (C1, C2, C3, ..., Cn-2, Cn-1, Cn)
```
is the same of this (using `GROUPING SETS`)
```
GROUP BY GROUPING SETS (
(C1, C2, C3, ..., Cn-2, Cn-1, Cn) -- All dimensions are included.
,( , C2, C3, .... |
25,274,879 | I have recently learned about GROUPING SETS, CUBE and ROLLUP for defining multiple grouping sets in sql server.
What I am asking is under what circumstances do we use these features ? What are the benefits and advantages of using them?
```
SELECT shipperid, YEAR(shippeddate) AS shipyear, COUNT(*) AS numorders
FROM Sa... | 2014/08/12 | [
"https://Stackoverflow.com/questions/25274879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1759068/"
] | Firstly, for those who haven't already read up on the subject:
* [Using GROUP BY with ROLLUP, CUBE, and GROUPING SETS](http://technet.microsoft.com/en-us/library/bb522495%28v=sql.105%29.aspx)
That being said, don't think about these grouping options as ways to get a result set. **These are performance tools**.
Let's... | I find they are good when you're producing a report and the result is not something which can be rolled up within the client.
For example, if you're doing something with `COUNT(DISTINCT...)` then the result across a larger group is not necessarily the same value as the sum of the parts. Eg, across two individual days ... |
43,645,935 | I am trying to match the characters at the end of line that contains digits and spaces. For example
62 29N 23W 5 WATSON B
I'd like to match "WATSON B"
but also match "SMITH" in the case of
60 29N 22W 7 SMITH | 2017/04/26 | [
"https://Stackoverflow.com/questions/43645935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4248692/"
] | This simple regex should do it:
```
([A-Z]+ *)+$
```
See [live demo](http://rubular.com/r/E8X6Z93tZt). | This one should do it: `[a-zA-Z][a-zA-Z\s]+$`
Made an edit. Initial regex caught space char before name. |
43,645,935 | I am trying to match the characters at the end of line that contains digits and spaces. For example
62 29N 23W 5 WATSON B
I'd like to match "WATSON B"
but also match "SMITH" in the case of
60 29N 22W 7 SMITH | 2017/04/26 | [
"https://Stackoverflow.com/questions/43645935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4248692/"
] | Not completely sure what you are trying to do but you might want to try something like this:
```
\d{1,2} \d{1,2}[a-zA-Z] \d{1,2}[a-zA-Z] \d ([a-zA-Z\s]+)
```
`\d{1,2}` matches a character 1 to 2 times
`\d{1,2}[a-zA-Z]` additionally requires a character
`([a-zA-Z\s]+)` captures the remaining characters if they are ... | This one should do it: `[a-zA-Z][a-zA-Z\s]+$`
Made an edit. Initial regex caught space char before name. |
34,289,655 | Im getting a null value for `sessionFactory` variable at this line:
```
sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();
```
This is the whole class:
```
import javax.imageio.spi.ServiceRegistry;
import javax.transaction.Transaction;
import org.hibernate.Session;
import org.h... | 2015/12/15 | [
"https://Stackoverflow.com/questions/34289655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248959/"
] | If this is Windows OS then try to specify the COM port name as \\.\COM11
```
myPort= new SerialPort("\\\\.\\COM11",9600);
```
NOTES: This syntax also works for ports COM1 through COM9. Certain boards will let you choose the port names yourself. This syntax works for those names as well. | Use System.IO.Ports.SerialPort.GetPortNames() to see what names does the OS use for current COM ports. (I'm not sure if you're talking about .NET, but if you do this helps) |
34,289,655 | Im getting a null value for `sessionFactory` variable at this line:
```
sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();
```
This is the whole class:
```
import javax.imageio.spi.ServiceRegistry;
import javax.transaction.Transaction;
import org.hibernate.Session;
import org.h... | 2015/12/15 | [
"https://Stackoverflow.com/questions/34289655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248959/"
] | If this is Windows OS then try to specify the COM port name as \\.\COM11
```
myPort= new SerialPort("\\\\.\\COM11",9600);
```
NOTES: This syntax also works for ports COM1 through COM9. Certain boards will let you choose the port names yourself. This syntax works for those names as well. | Use
```
foreach(string str in SerialPort.GetPortNames())
{
Debug.WriteLine(string.Format("Existing COM port: {0}", str));
}
```
For know the ports available |
37,961,297 | First and foremost excuse me, I'm totally new to PHP.
I'm looking to echo a link back to the comic's description/home page currently being read on my site as a *clickable bootstrap button with a font awesome icon assigned to it*. But, I'm not entirely sure how would I go about doing that.
I'm using a [comic reader](h... | 2016/06/22 | [
"https://Stackoverflow.com/questions/37961297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6497577/"
] | I would put the tool into the build directory inside the NuGet package and then have a custom MSBuild .targets file in the same build directory. This MSBuild .targets file would then be written in such a way so it is called at some point during the build process.
```
\build
\MyPackage.targets
```
Then your build... | In post build action specify `$(SolutionDir).nuget\nuget.exe pack $(ProjectPath) -IncludeReferencedProjects`.
Also you can specify nuspec file. As described here <https://docs.nuget.org/create/nuspec-reference>.
Example:
```
<?xml version="1.0"?>
<package >
<metadata>
<id>SDK</id>
<version>$version$</version... |
10,440,401 | I'm currently facing a problem here and I thought maybe some of you guys could help me out.
I am developing an application using SPRING and HIBERNATE and my issue is the following:
**1** - I first create a new AudioFile object (Domain class) in my main object, and insert it in the database using the hibernateTemplate.... | 2012/05/03 | [
"https://Stackoverflow.com/questions/10440401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1373769/"
] | Observation
A. `get_headers('$gravcheck');` would not work because of use of single quote `'`
B. calling `exit;` would terminate script prematurely
C. `$response` would return an array you can not use `echo` to print the information use `print_r` insted
D. `$response != "404 Not Found"` would not work because `$r... | While doing my one of a project, I had made a simple function of Gravatar in php.
You can see it.
```
<?php
class GravatarHelper
{
/**
* validate_gravatar
*
* Check if the email has any gravatar image or not
*
* @param string $email Email of the User
* @return boolean true, if the... |
22,849,377 | I want to write my `Gruntfile.js` with livescript.
I've done `Gruntfile.js` and `Gruntfile.coffee` which both work out of the box
`Gruntfile.ls` should work... right?
I've seen a few `Gruntfile.ls` online or does it need to be compiles (other than a .coffee version)?
### Livescript
(Error when calling `$ grunt`)
... | 2014/04/03 | [
"https://Stackoverflow.com/questions/22849377",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use this as your `Gruntfile.js`:
```
require('LiveScript');
module.exports = function (grunt) {
require('./Gruntfile.ls')(grunt);
}
```
Requires the `LiveScript` package from npm. | I prefer to keep main Gruntfile in js, and tasks in ls.
Example setup:
```
require("LiveScript")
module.exports = function(grunt){
require('load-grunt-tasks')(grunt) // autoload npmtasks from package.json
require('load-grunt-config')(grunt) // lets you keep each task in separate file
}
```
Actually, I use my ow... |
209,740 | This isn't so much, HOW do I make it work, as this code works, rather how could I make it better. The way this code works is it guides a person to the correct answer by getting "Yes", "No" or "I don't know" (in some cases from the person).
It's intended to run in HTML5/JavaScript (kind of like an online interactive gu... | 2018/12/15 | [
"https://codereview.stackexchange.com/questions/209740",
"https://codereview.stackexchange.com",
"https://codereview.stackexchange.com/users/188235/"
] | Bad names!!
===========
* Very poor naming, so much so that your code is almost unreadable and definitely unusable.
* Use constants for variables that do not change. eg `var n1=` should be `const n =`
* Always! indent your code.
* Spaces between operators `var n1=prompt(` should be `var n1 = prompt(`
* `else` on same ... | Indent your code and watch the newlines and spacing.
There is a difference between == and =, you use both in mc1().
The names of your functions are not explaining what the functions do.
You might want to allow lowercase letters as input, this is a design choice. Your prompt specifies capitals, so it should ... |
216,391 | I was just wondering, if by moving complex if else statements and the resulting html markup to the code behind violates some 'MVC' law?
It seems like a great option when faced with inline if else statements that can become extremely unreadable. | 2008/10/19 | [
"https://Stackoverflow.com/questions/216391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29376/"
] | I prefer not to use the code behind class in my views. This is not because it violates MVC by default, but because I found that the "natural" way (at least for me) is different.
When I face complex HTML markup that relates to purely view concerns, I usually write an extension method for `HtmlHelper` class in order to... | I believe as long as it's a rendering code and it's in a "View" not in a controller, then putting it on code behind or inline won't matter. Just make sure that you don't write this piece of the rendering code in the Controllers actions (this way you will really violate the MVC pattern). |
216,391 | I was just wondering, if by moving complex if else statements and the resulting html markup to the code behind violates some 'MVC' law?
It seems like a great option when faced with inline if else statements that can become extremely unreadable. | 2008/10/19 | [
"https://Stackoverflow.com/questions/216391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29376/"
] | It's not horrible to have conditionals in your view. I would keep them in the ASPX not the code behind. However, a conditional often indicates controlling behavior. Consider the following ASPX code:
```
<%if (ViewData["something"] == "foo") {%>
<%=Html.ActionLink("Save", "Save") %>
<%}%>
<%if (ViewData["somethin... | I believe as long as it's a rendering code and it's in a "View" not in a controller, then putting it on code behind or inline won't matter. Just make sure that you don't write this piece of the rendering code in the Controllers actions (this way you will really violate the MVC pattern). |
216,391 | I was just wondering, if by moving complex if else statements and the resulting html markup to the code behind violates some 'MVC' law?
It seems like a great option when faced with inline if else statements that can become extremely unreadable. | 2008/10/19 | [
"https://Stackoverflow.com/questions/216391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29376/"
] | I prefer not to use the code behind class in my views. This is not because it violates MVC by default, but because I found that the "natural" way (at least for me) is different.
When I face complex HTML markup that relates to purely view concerns, I usually write an extension method for `HtmlHelper` class in order to... | The codebehind is part of the View -- it's up to you if you want to put things in the ASPX directly or in the codebehind. MVC doesn't mean you have to code things all ugly in the ASPX :). |
216,391 | I was just wondering, if by moving complex if else statements and the resulting html markup to the code behind violates some 'MVC' law?
It seems like a great option when faced with inline if else statements that can become extremely unreadable. | 2008/10/19 | [
"https://Stackoverflow.com/questions/216391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29376/"
] | It's not horrible to have conditionals in your view. I would keep them in the ASPX not the code behind. However, a conditional often indicates controlling behavior. Consider the following ASPX code:
```
<%if (ViewData["something"] == "foo") {%>
<%=Html.ActionLink("Save", "Save") %>
<%}%>
<%if (ViewData["somethin... | The codebehind is part of the View -- it's up to you if you want to put things in the ASPX directly or in the codebehind. MVC doesn't mean you have to code things all ugly in the ASPX :). |
73,583,327 | Consider a very simple application with the project structure
```
-- package.json
-- webpack.config.js
-- src
|---index.js
|---runner.js
```
The index.js takes in command line arg to require a file, at runtime. Here is index.js:
```
function requireAtRuntime(filename){
const runner = require(filename);
... | 2022/09/02 | [
"https://Stackoverflow.com/questions/73583327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9990255/"
] | Supposing that each entrance date has an exit date, you may try the following:
```
Select D.Person,MAX(Entrance) Entrance, MAX(Exit) Exit
From
(
Select table_name.*,
MOD(ROW_NUMBER() Over (Partition By Person Order By Entrance, Exit),
COUNT(*) Over (Partition By Person)/2) grp
From table_name
) ... | You will have to calculate the next entrance using a `LEAD` function, so you can join your table to itself.
One way to do it is to create two CTEs, one containing all entrances and one containing all exits and join these by `PERSON` and assuring that the exit it picks is later than the entrance, and earlier or equal t... |
73,583,327 | Consider a very simple application with the project structure
```
-- package.json
-- webpack.config.js
-- src
|---index.js
|---runner.js
```
The index.js takes in command line arg to require a file, at runtime. Here is index.js:
```
function requireAtRuntime(filename){
const runner = require(filename);
... | 2022/09/02 | [
"https://Stackoverflow.com/questions/73583327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9990255/"
] | Supposing that each entrance date has an exit date, you may try the following:
```
Select D.Person,MAX(Entrance) Entrance, MAX(Exit) Exit
From
(
Select table_name.*,
MOD(ROW_NUMBER() Over (Partition By Person Order By Entrance, Exit),
COUNT(*) Over (Partition By Person)/2) grp
From table_name
) ... | You could also use below solution which takes advantage of ***LEAD*** analytic function with its option ***IGNORE NULLS***.
```sql
select Person, evt_date as Entrance, exit_date as Exit
from (
select Person, evt_date, evt
, lead(case when evt = 2 then evt_date else null end, 1)
ignore nulls ov... |
73,583,327 | Consider a very simple application with the project structure
```
-- package.json
-- webpack.config.js
-- src
|---index.js
|---runner.js
```
The index.js takes in command line arg to require a file, at runtime. Here is index.js:
```
function requireAtRuntime(filename){
const runner = require(filename);
... | 2022/09/02 | [
"https://Stackoverflow.com/questions/73583327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9990255/"
] | Supposing that each entrance date has an exit date, you may try the following:
```
Select D.Person,MAX(Entrance) Entrance, MAX(Exit) Exit
From
(
Select table_name.*,
MOD(ROW_NUMBER() Over (Partition By Person Order By Entrance, Exit),
COUNT(*) Over (Partition By Person)/2) grp
From table_name
) ... | as per your requerment you can get output with LEAD() Function
```
With T1 As
(Select Person,Entrance,LEAD(Exitt,1,'') Over (Partition by Person Order By
Person) Exitt From Person2)
Select * From T1 Where Entrance <> '' And Exitt <> ''
``` |
73,583,327 | Consider a very simple application with the project structure
```
-- package.json
-- webpack.config.js
-- src
|---index.js
|---runner.js
```
The index.js takes in command line arg to require a file, at runtime. Here is index.js:
```
function requireAtRuntime(filename){
const runner = require(filename);
... | 2022/09/02 | [
"https://Stackoverflow.com/questions/73583327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9990255/"
] | Supposing that each entrance date has an exit date, you may try the following:
```
Select D.Person,MAX(Entrance) Entrance, MAX(Exit) Exit
From
(
Select table_name.*,
MOD(ROW_NUMBER() Over (Partition By Person Order By Entrance, Exit),
COUNT(*) Over (Partition By Person)/2) grp
From table_name
) ... | This works better if you have missing exit date
```
select d.* from (
select d.person_id, entry_dat, lead(exit_dat,1) over(partition by person_id, grp_entry order by nvl(entry_dat, exit_dat)) as exit_dat
from (
select d.*,
count(entry_dat) over(partition by person_id order by nvl(entry_dat... |
73,583,327 | Consider a very simple application with the project structure
```
-- package.json
-- webpack.config.js
-- src
|---index.js
|---runner.js
```
The index.js takes in command line arg to require a file, at runtime. Here is index.js:
```
function requireAtRuntime(filename){
const runner = require(filename);
... | 2022/09/02 | [
"https://Stackoverflow.com/questions/73583327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9990255/"
] | Supposing that each entrance date has an exit date, you may try the following:
```
Select D.Person,MAX(Entrance) Entrance, MAX(Exit) Exit
From
(
Select table_name.*,
MOD(ROW_NUMBER() Over (Partition By Person Order By Entrance, Exit),
COUNT(*) Over (Partition By Person)/2) grp
From table_name
) ... | **REEDITED ANSWER**
Completely changed answer after discution about missing exits or entrances as well as about entrance and exit on the same day. Tryed to cover it like below.
With sample data containing missing exits and entrances and having some same day entrance and exit:
| ID | ENT | EXT |
| --- | --- | ---... |
192,490 | Say I've typed out a command in terminal 'mv \*.jpg ..\photos' and as I'm typing realize I no longer want to execute this command at all. I want to just delete the entire statement. I don't want to clear the entire screen or delete any bash history I just want to abort the current line and erase it.
Is there a keyboar... | 2010/09/24 | [
"https://superuser.com/questions/192490",
"https://superuser.com",
"https://superuser.com/users/20918/"
] | Assuming you're in bash, use `Ctrl` + `U`. | Many programs that wait for you to type a command line and then execute that line, including bash, take `Ctrl`+`C` to mean “Abort the current task and go back to the main prompt”.
A few programs, including bash, take `Ctrl`+`U`([Clear command from terminal in OS X](https://superuser.com/questions/192490/clear-command-... |
192,490 | Say I've typed out a command in terminal 'mv \*.jpg ..\photos' and as I'm typing realize I no longer want to execute this command at all. I want to just delete the entire statement. I don't want to clear the entire screen or delete any bash history I just want to abort the current line and erase it.
Is there a keyboar... | 2010/09/24 | [
"https://superuser.com/questions/192490",
"https://superuser.com",
"https://superuser.com/users/20918/"
] | Assuming you're in bash, use `Ctrl` + `U`. | There is a `readline` function that is probably not bound to a keystroke called `kill-whole-line` that will kill the whole line as opposed to only killing the part before the cursor (`unix-line-discard` which is somewhat of a misnomer and is bound to `Ctrl`-`u`).
You can bind that to any available keystroke. I like `S... |
192,490 | Say I've typed out a command in terminal 'mv \*.jpg ..\photos' and as I'm typing realize I no longer want to execute this command at all. I want to just delete the entire statement. I don't want to clear the entire screen or delete any bash history I just want to abort the current line and erase it.
Is there a keyboar... | 2010/09/24 | [
"https://superuser.com/questions/192490",
"https://superuser.com",
"https://superuser.com/users/20918/"
] | Many programs that wait for you to type a command line and then execute that line, including bash, take `Ctrl`+`C` to mean “Abort the current task and go back to the main prompt”.
A few programs, including bash, take `Ctrl`+`U`([Clear command from terminal in OS X](https://superuser.com/questions/192490/clear-command-... | There is a `readline` function that is probably not bound to a keystroke called `kill-whole-line` that will kill the whole line as opposed to only killing the part before the cursor (`unix-line-discard` which is somewhat of a misnomer and is bound to `Ctrl`-`u`).
You can bind that to any available keystroke. I like `S... |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | There seems to be a compilation / linkage error between your PHP and libreadline. This is documented in [PHP Bug #48759](https://bugs.php.net/bug.php?id=48759).
* Did you compile PHP by yourself? Did you play around with --configure and didn't do a proper `make clean` before your final build?
* Does `php -m` list read... | If you're using Mac, then install Homebrew (<http://brew.sh>) then type:
brew install phpsh
And then you can run phpsh to get an interactive shell. |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | You are in interactive mode, but without a prompt, since you may not have readline mode available. You just just need to start typing, and your commands will be evaluated after you press enter. It doesn't look like anything is going on, but if you enter, for example:
```
<?php
echo "hello world";
?>
```
...you wil... | To check if you have readline module installed, type: `php -m | grep readline`
If nothing displayed, install readline module: `sudo apt-get install php5-readline`
After module installation you can recheck it's presence with previous command, than enter interactive mode with: `php -a` |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | Install this:
```
php5-readline
```
then try use:
```
php -a
``` | You are in interactive mode, but without a prompt, since you may not have readline mode available. You just just need to start typing, and your commands will be evaluated after you press enter. It doesn't look like anything is going on, but if you enter, for example:
```
<?php
echo "hello world";
?>
```
...you wil... |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | If you're using Mac, then install Homebrew (<http://brew.sh>) then type:
brew install phpsh
And then you can run phpsh to get an interactive shell. | This is what you should see:
```
# php -a
Interactive shell
php > echo 1+1;
2
php > echo PHP_VERSION;
5.3.2-1ubuntu4.14
php > exit
#
``` |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | Install this:
```
php5-readline
```
then try use:
```
php -a
``` | This is what you should see:
```
# php -a
Interactive shell
php > echo 1+1;
2
php > echo PHP_VERSION;
5.3.2-1ubuntu4.14
php > exit
#
``` |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | There seems to be a compilation / linkage error between your PHP and libreadline. This is documented in [PHP Bug #48759](https://bugs.php.net/bug.php?id=48759).
* Did you compile PHP by yourself? Did you play around with --configure and didn't do a proper `make clean` before your final build?
* Does `php -m` list read... | To check if you have readline module installed, type: `php -m | grep readline`
If nothing displayed, install readline module: `sudo apt-get install php5-readline`
After module installation you can recheck it's presence with previous command, than enter interactive mode with: `php -a` |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | type `php -m` and make sure you have the readline module. If you don't you won't be able to use it.
<http://www.php.net/manual/en/features.commandline.interactive.php>
>
> As of PHP 5.1.0, the CLI SAPI provides an interactive shell using the
> **-a** option if PHP is compiled with the **--with-readline** option.
> ... | Because module **readline** not installed.
<http://php.net/manual/en/features.commandline.interactive.php>
This is how I install the module by recompiling php source codes:
Find previous Configure command:
```
$ php -i | grep configure
Configure Command => './configure' '--prefix=/usr/local/php7' ...
```
Then re... |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | You are in interactive mode, but without a prompt, since you may not have readline mode available. You just just need to start typing, and your commands will be evaluated after you press enter. It doesn't look like anything is going on, but if you enter, for example:
```
<?php
echo "hello world";
?>
```
...you wil... | Because module **readline** not installed.
<http://php.net/manual/en/features.commandline.interactive.php>
This is how I install the module by recompiling php source codes:
Find previous Configure command:
```
$ php -i | grep configure
Configure Command => './configure' '--prefix=/usr/local/php7' ...
```
Then re... |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | type `php -m` and make sure you have the readline module. If you don't you won't be able to use it.
<http://www.php.net/manual/en/features.commandline.interactive.php>
>
> As of PHP 5.1.0, the CLI SAPI provides an interactive shell using the
> **-a** option if PHP is compiled with the **--with-readline** option.
> ... | There seems to be a compilation / linkage error between your PHP and libreadline. This is documented in [PHP Bug #48759](https://bugs.php.net/bug.php?id=48759).
* Did you compile PHP by yourself? Did you play around with --configure and didn't do a proper `make clean` before your final build?
* Does `php -m` list read... |
10,283,187 | I have tried to execute simple php code in the php interpreter.
When I executed the command `php -a` I getting the message
>
> Interactive mode enabled
>
>
>
Without any place for php input.
But I can execute a php code through the command `php -r`.
for example:
`php -r "echo 'Hello stackoverflow!';"`
>
> Hell... | 2012/04/23 | [
"https://Stackoverflow.com/questions/10283187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341970/"
] | Install this:
```
php5-readline
```
then try use:
```
php -a
``` | There seems to be a compilation / linkage error between your PHP and libreadline. This is documented in [PHP Bug #48759](https://bugs.php.net/bug.php?id=48759).
* Did you compile PHP by yourself? Did you play around with --configure and didn't do a proper `make clean` before your final build?
* Does `php -m` list read... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | I second GNU gettext. However, if you're using Qt (and chances are good if you want to do GUI with C++), Qt comes with its own version of gettext and a fine translation tool (Qt Linguist) that makes things easier, and can also be used from non-GUI applications without overhead. We have it even in a service.
However, r... | You do not need libraries to accomplish this task. See the MS guide for Satellite DLLs [here](http://support.microsoft.com/kb/188659).
If you specify to use Unicode in the project settings and use Unicode String functions (instead of char) then the standard use of Satellite DLLs to hold locale specific data (dialog bo... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | Take a look at [wxWidgets](http://wxwidgets.org/) examples of internationalization. It has a non-gnu implementation of the translation mechanism used in [gettext](http://www.gnu.org/software/gettext/) (mentioned previously). You can use it even in commercial application because the wxWidgets license allows you to do so... | For the UTF-8 support, take a look at [UTF-8 CPP](http://utfcpp.sourceforge.net/) library. |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | You've been pointed to [GNU gettext](http://www.gnu.org/software/gettext/), which allows you to replace literal strings with localized versions at run time - one aspect of localization (which is what happens after you've done the internationalization, when someone actually uses your internationalized code in a specific... | Take a look at [wxWidgets](http://wxwidgets.org/) examples of internationalization. It has a non-gnu implementation of the translation mechanism used in [gettext](http://www.gnu.org/software/gettext/) (mentioned previously). You can use it even in commercial application because the wxWidgets license allows you to do so... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | You've been pointed to [GNU gettext](http://www.gnu.org/software/gettext/), which allows you to replace literal strings with localized versions at run time - one aspect of localization (which is what happens after you've done the internationalization, when someone actually uses your internationalized code in a specific... | Take a look at [GNU gettext](http://www.gnu.org/software/gettext/manual/gettext.html)
It would be interesting to know which C++ library are you using, as some GUI libraries already provide i18n support. |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | Take a look at [GNU gettext](http://www.gnu.org/software/gettext/manual/gettext.html)
It would be interesting to know which C++ library are you using, as some GUI libraries already provide i18n support. | You do not need libraries to accomplish this task. See the MS guide for Satellite DLLs [here](http://support.microsoft.com/kb/188659).
If you specify to use Unicode in the project settings and use Unicode String functions (instead of char) then the standard use of Satellite DLLs to hold locale specific data (dialog bo... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | Take a look at [wxWidgets](http://wxwidgets.org/) examples of internationalization. It has a non-gnu implementation of the translation mechanism used in [gettext](http://www.gnu.org/software/gettext/) (mentioned previously). You can use it even in commercial application because the wxWidgets license allows you to do so... | Take a look at [GNU gettext](http://www.gnu.org/software/gettext/manual/gettext.html)
It would be interesting to know which C++ library are you using, as some GUI libraries already provide i18n support. |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | You've been pointed to [GNU gettext](http://www.gnu.org/software/gettext/), which allows you to replace literal strings with localized versions at run time - one aspect of localization (which is what happens after you've done the internationalization, when someone actually uses your internationalized code in a specific... | For the UTF-8 support, take a look at [UTF-8 CPP](http://utfcpp.sourceforge.net/) library. |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | Why not keep it simple and roll your own with modern C++:
`Internationalization.hpp`:
```
#pragma once
#include <map>
#include <string>
enum class supported_language_t
{
english,
chinese
};
inline std::string hello_world_map_key = "hello-world";
inline std::string hello_map_key = "hello";
inline supported... | You do not need libraries to accomplish this task. See the MS guide for Satellite DLLs [here](http://support.microsoft.com/kb/188659).
If you specify to use Unicode in the project settings and use Unicode String functions (instead of char) then the standard use of Satellite DLLs to hold locale specific data (dialog bo... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | You've been pointed to [GNU gettext](http://www.gnu.org/software/gettext/), which allows you to replace literal strings with localized versions at run time - one aspect of localization (which is what happens after you've done the internationalization, when someone actually uses your internationalized code in a specific... | I second GNU gettext. However, if you're using Qt (and chances are good if you want to do GUI with C++), Qt comes with its own version of gettext and a fine translation tool (Qt Linguist) that makes things easier, and can also be used from non-GUI applications without overhead. We have it even in a service.
However, r... |
195,497 | I'm playing around with the locale and I18N stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on I18N in his [book](http://www.josuttis.com/libbook/) (2nd Edition for C++11 to be released April 2012), and found it useful but with no real world examples to draw from I've ... | 2008/10/12 | [
"https://Stackoverflow.com/questions/195497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14788/"
] | Take a look at [wxWidgets](http://wxwidgets.org/) examples of internationalization. It has a non-gnu implementation of the translation mechanism used in [gettext](http://www.gnu.org/software/gettext/) (mentioned previously). You can use it even in commercial application because the wxWidgets license allows you to do so... | Why not keep it simple and roll your own with modern C++:
`Internationalization.hpp`:
```
#pragma once
#include <map>
#include <string>
enum class supported_language_t
{
english,
chinese
};
inline std::string hello_world_map_key = "hello-world";
inline std::string hello_map_key = "hello";
inline supported... |
44,641,618 | I have created a method that takes a List as an input, `brewMethod.getmMethodBrewPours()` and depending on the users preference, the method returns those variables as they are or multiplied by a number. I store the returned value as a new variable, `brewPours`. The issue is, not only is this method returning new values... | 2017/06/19 | [
"https://Stackoverflow.com/questions/44641618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4422596/"
] | The original List is modified because **you** modify it. Java is call-by-value, but the value you are giving to the method is a reference to an object, not the object. That means you are not giving the list to the method and getting a list out, but you are giving the reference to a list into the method. As you modify t... | Understand the difference between Call-by-reference and call-by-value.
In JAVA, when you pass the **object** in function it pass its reference to the function. So, any change on the object in function reflects the change outside the function.
In your case you are changing the value of original object by this line : ... |
110,659 | I just started learning WordPress and in my current project I want to change WordPress default:
>
> Log In
>
>
>
Text to:
>
> Welcom To Monastery
>
>
>
Any ideas or suggestions? | 2013/08/19 | [
"https://wordpress.stackexchange.com/questions/110659",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/26201/"
] | Glad to hear that you got interested in Wordpress.
[Documentation](http://codex.wordpress.org/Customizing_the_Login_Form) for customizing the **Login Form**:
And because you want to add custom text I would recommend you create a custom Login form.
[Documentation](http://codex.wordpress.org/Customizing_the_Login_For... | ```
function my_login_logo_url_title() {
return 'Welcom To Monastery';}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
```
Change login name threw apply this code in functions.php in your wordpress. |
110,659 | I just started learning WordPress and in my current project I want to change WordPress default:
>
> Log In
>
>
>
Text to:
>
> Welcom To Monastery
>
>
>
Any ideas or suggestions? | 2013/08/19 | [
"https://wordpress.stackexchange.com/questions/110659",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/26201/"
] | Glad to hear that you got interested in Wordpress.
[Documentation](http://codex.wordpress.org/Customizing_the_Login_Form) for customizing the **Login Form**:
And because you want to add custom text I would recommend you create a custom Login form.
[Documentation](http://codex.wordpress.org/Customizing_the_Login_For... | You can use following code:
```
add_action('login_form', 'wpse17709_login_form');
function wpse17709_login_form()
{
add_filter('gettext', 'wpse17709_gettext', 10, 2);
}
function wpse17709_gettext($translation, $text)
{
if ('Log In' == $text) {
return 'Welcom To Monastery';
... |
110,659 | I just started learning WordPress and in my current project I want to change WordPress default:
>
> Log In
>
>
>
Text to:
>
> Welcom To Monastery
>
>
>
Any ideas or suggestions? | 2013/08/19 | [
"https://wordpress.stackexchange.com/questions/110659",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/26201/"
] | You can use following code:
```
add_action('login_form', 'wpse17709_login_form');
function wpse17709_login_form()
{
add_filter('gettext', 'wpse17709_gettext', 10, 2);
}
function wpse17709_gettext($translation, $text)
{
if ('Log In' == $text) {
return 'Welcom To Monastery';
... | ```
function my_login_logo_url_title() {
return 'Welcom To Monastery';}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
```
Change login name threw apply this code in functions.php in your wordpress. |
17,539 | We have been booked onto a flight from Orlando to Newark (EWR) due to arrive at 18.15. This is with United.
Our connecting flight (also with United) to take us home to the UK, is due to leave at 18.55.
This gives us 40 minutes transfer time and I'm worried this won't be enough.
can anybody help?
* What terminal are... | 2013/05/20 | [
"https://travel.stackexchange.com/questions/17539",
"https://travel.stackexchange.com",
"https://travel.stackexchange.com/users/6822/"
] | When looking at connections there's always 2 things you should keep in mind :
* What are the odds of you not making the connection, and
* What's the impact of not making it?
40 minutes at Newark for a Domestic -> International connection is plenty of time, presuming that your inbound flight is on time, and you're wit... | Personally, I would contact your travel agent and see if an earlier connection from MCO is available. You can also try the airline, although it may not be easy to change to an earlier flight without paying a change fee. On the day of travel, you can also attempt to get a [Same-day Change](http://www.united.com/web/en-U... |
59,550,673 | The `size.value` state is one option behind when the `_updateData` function triggers onChange of the `<select>`. For example, Let's say the starting defaultValue option of `<select>` is "All", `locations` is empty...the option is changed to "Medium", `locations` is "All"...the option is changed to "Large", `locations` ... | 2020/01/01 | [
"https://Stackoverflow.com/questions/59550673",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7777348/"
] | Yes, you are calling your select's `onChange` handler in the mounting `useEffect` hook with no event object to dereference a `target` property. I would factor out the rest of the `updateData` code so you can call it with the initial state value. This will allow you to update location details on mount using the initial ... | First of all, useState function is asynchronous. Therefore takes some time to update. See [Is useState synchronous?](https://stackoverflow.com/questions/54119678/is-usestate-synchronous).
And second, the useEffect function is called when the component mounts. So no onchange event has occurred yet. Onchange event occurs... |
476,581 | I understand the main principles of Cauchy sequences and metric spaces, but I have a particular question about determining whether or not a space is a complete space. *If a space has all cauchy sequences converge to a point contained within that space, then it is a complete space.*
My question is: **How do you determ... | 2013/08/26 | [
"https://math.stackexchange.com/questions/476581",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/87662/"
] | >
> How did they come up with this sequence $x\_n = 1/n$?
>
>
>
In my experience, coming up with counterexamples is something of an art, and sometimes much more difficult than proving a theorem! As you seem to agree, when proving theorems and solving problems, there is often some vague direction as to where you ne... | That's a kind of a comment, if you'd like... I just recall how i gave an example of a metric space which is not complete, the lecturer asked me the question, and then i thought, hmmm, what if i take a complete space, for instance $[0,1]$ (i know it's complete since it is compact, a general fact) and then take away any ... |
476,581 | I understand the main principles of Cauchy sequences and metric spaces, but I have a particular question about determining whether or not a space is a complete space. *If a space has all cauchy sequences converge to a point contained within that space, then it is a complete space.*
My question is: **How do you determ... | 2013/08/26 | [
"https://math.stackexchange.com/questions/476581",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/87662/"
] | >
> How did they come up with this sequence $x\_n = 1/n$?
>
>
>
In my experience, coming up with counterexamples is something of an art, and sometimes much more difficult than proving a theorem! As you seem to agree, when proving theorems and solving problems, there is often some vague direction as to where you ne... | In a case such as this, the intuition is often that you first identify something that is not in the space but is in its closure in a slightly bigger space: in this case $0$. Then you try to find a Cauchy sequence in the original space that converges to that point in the bigger space. There's nothing magical about $1/n$... |
476,581 | I understand the main principles of Cauchy sequences and metric spaces, but I have a particular question about determining whether or not a space is a complete space. *If a space has all cauchy sequences converge to a point contained within that space, then it is a complete space.*
My question is: **How do you determ... | 2013/08/26 | [
"https://math.stackexchange.com/questions/476581",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/87662/"
] | >
> How did they come up with this sequence $x\_n = 1/n$?
>
>
>
In my experience, coming up with counterexamples is something of an art, and sometimes much more difficult than proving a theorem! As you seem to agree, when proving theorems and solving problems, there is often some vague direction as to where you ne... | This is more of a sharpening of what other answers have already said, but here goes:
Theorem: Let $(X,d)$ be a metric space, and let $Y \subset X$. If $(Y,d)$ is complete, then $Y$ is closed in $X$.
Proof: If not, then there is $x \in X \setminus Y$ and a sequence $\{y\_n\}$ in $Y$ with $y\_n \rightarrow x$. Since $\... |
102,323 | If your singing a third above the melody and the last note in a phrase is the highest note in the chord, e.g. chord is A and melody note is E, what should you sing as harmony? | 2020/07/27 | [
"https://music.stackexchange.com/questions/102323",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71098/"
] | >
> chord is A and melody note is E, what should you sing as harmony?
>
>
>
It depends on what kind of harmonic style you want. G# will make the chord an Amaj7, which might be too jazzy for some styles of music. An A will be a fourth, which isn't as pretty as a third. A C# will make it a sixth above, but at least ... | Harmony singing is usually a third above the basic note - but - it will depend on what the rest of the bar is doing.
If the bar is V (in key A) the the note above E will be G♯, but if the bar is I, then G♯ won;t usually sound that good. So a 4th may be a better harmony. A and E. It will sound not as harmonious but at ... |
102,323 | If your singing a third above the melody and the last note in a phrase is the highest note in the chord, e.g. chord is A and melody note is E, what should you sing as harmony? | 2020/07/27 | [
"https://music.stackexchange.com/questions/102323",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71098/"
] | Depends what style you're thinking in. In 'Harmony 101' G♯ would definitely be considered an 'avoid note' over an A major chord. But in more modern styles a maj7 chord is hardly considered dissonant at all, continuing a run of 3rds might be a good enough reason to allow it.
Example A is perfectly acceptable in jazz-in... | >
> chord is A and melody note is E, what should you sing as harmony?
>
>
>
It depends on what kind of harmonic style you want. G# will make the chord an Amaj7, which might be too jazzy for some styles of music. An A will be a fourth, which isn't as pretty as a third. A C# will make it a sixth above, but at least ... |
102,323 | If your singing a third above the melody and the last note in a phrase is the highest note in the chord, e.g. chord is A and melody note is E, what should you sing as harmony? | 2020/07/27 | [
"https://music.stackexchange.com/questions/102323",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71098/"
] | Depends what style you're thinking in. In 'Harmony 101' G♯ would definitely be considered an 'avoid note' over an A major chord. But in more modern styles a maj7 chord is hardly considered dissonant at all, continuing a run of 3rds might be a good enough reason to allow it.
Example A is perfectly acceptable in jazz-in... | Harmony singing is usually a third above the basic note - but - it will depend on what the rest of the bar is doing.
If the bar is V (in key A) the the note above E will be G♯, but if the bar is I, then G♯ won;t usually sound that good. So a 4th may be a better harmony. A and E. It will sound not as harmonious but at ... |
2,515,229 | Im trying to get some checkbox with a specific name
```
document.getElementsByName("test");
```
Unfortunatley i cant check if it is checked or not here is the code
```
for(i=0;i<check.length;i++)
{
if(check[i].checked==true)
{
alert(check[i].value);
}
... | 2010/03/25 | [
"https://Stackoverflow.com/questions/2515229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/179235/"
] | jQuery would be nice for these basic things.
But you aren't using jQuery so:
```
var check = document.getElementsByName("test");
```
instead of just
```
document.getElementsByName("test");
```
Also, you can remove `==true`, so you get:
```
if(check[i].checked)
```
Which makes much cleaner code.
Also, are you... | ```
for(i=0;i<check.length;i++)
{
if(check[i].checked==1)
{
alert(check[i].value);
}
}
```
Try this ?
@streetparade : tell me if this is also not working .... so that i can delete my answer... people didn't like it |
2,515,229 | Im trying to get some checkbox with a specific name
```
document.getElementsByName("test");
```
Unfortunatley i cant check if it is checked or not here is the code
```
for(i=0;i<check.length;i++)
{
if(check[i].checked==true)
{
alert(check[i].value);
}
... | 2010/03/25 | [
"https://Stackoverflow.com/questions/2515229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/179235/"
] | >
> Use the following code
>
>
>
```
<html>
<script type="text/javascript">
function test()
{
if(document.getElementById("chk").checked)
{
alert('Checked');
}
}
</script>
<body>
<input type="checkbox" id="chk">
<input type="button" onclick="test();"></input>
</input>
</body>
</html>
``` | ```
for(i=0;i<check.length;i++)
{
if(check[i].checked==1)
{
alert(check[i].value);
}
}
```
Try this ?
@streetparade : tell me if this is also not working .... so that i can delete my answer... people didn't like it |
2,515,229 | Im trying to get some checkbox with a specific name
```
document.getElementsByName("test");
```
Unfortunatley i cant check if it is checked or not here is the code
```
for(i=0;i<check.length;i++)
{
if(check[i].checked==true)
{
alert(check[i].value);
}
... | 2010/03/25 | [
"https://Stackoverflow.com/questions/2515229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/179235/"
] | jQuery would be nice for these basic things.
But you aren't using jQuery so:
```
var check = document.getElementsByName("test");
```
instead of just
```
document.getElementsByName("test");
```
Also, you can remove `==true`, so you get:
```
if(check[i].checked)
```
Which makes much cleaner code.
Also, are you... | >
> Use the following code
>
>
>
```
<html>
<script type="text/javascript">
function test()
{
if(document.getElementById("chk").checked)
{
alert('Checked');
}
}
</script>
<body>
<input type="checkbox" id="chk">
<input type="button" onclick="test();"></input>
</input>
</body>
</html>
``` |
34,027,556 | I have a list in one file html called "filed1":
```
<ul>
<li>Nombre:<a class="boton" onclick=move() title="Caja">Caja</a><br>
<FONT SIZE=2>Fecha: 21/12/1994</font></font></li>
</ul>
```
Now I want to change a string in other html "filed2":
```
<a id="logo-header2">
<h1>
<span class="site-name"... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34027556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5588945/"
] | I was successfully able to configure and provision a new device using the following method:
1. Project properties
2. Debugging
3. Remote Computer Name, drop down and select Configure...
[](https://i.stack.imgur.com/jx2nl.png)
4. Successfully shows the... | I just applied Update 1 to VS2015 Pro and am now getting the exact same error. It happens regardless of whether I make a new project or use my old 2015 Project. Looks like it's a bug in the update. |
34,027,556 | I have a list in one file html called "filed1":
```
<ul>
<li>Nombre:<a class="boton" onclick=move() title="Caja">Caja</a><br>
<FONT SIZE=2>Fecha: 21/12/1994</font></font></li>
</ul>
```
Now I want to change a string in other html "filed2":
```
<a id="logo-header2">
<h1>
<span class="site-name"... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34027556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5588945/"
] | I just applied Update 1 to VS2015 Pro and am now getting the exact same error. It happens regardless of whether I make a new project or use my old 2015 Project. Looks like it's a bug in the update. | Not really a fix, but I went back to Visual Studio 2013, as it does not have this bug, and driver dev is working great. |
34,027,556 | I have a list in one file html called "filed1":
```
<ul>
<li>Nombre:<a class="boton" onclick=move() title="Caja">Caja</a><br>
<FONT SIZE=2>Fecha: 21/12/1994</font></font></li>
</ul>
```
Now I want to change a string in other html "filed2":
```
<a id="logo-header2">
<h1>
<span class="site-name"... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34027556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5588945/"
] | I just applied Update 1 to VS2015 Pro and am now getting the exact same error. It happens regardless of whether I make a new project or use my old 2015 Project. Looks like it's a bug in the update. | I had the message:
*Please select a valid target machine for deployment from the project property page*
I was using the wrong architecture in the configuration properties for the project. My target test box is x64 and I had my configuration set to win32. Changing this to x64 fixed the issue for me.
[![enter image d... |
34,027,556 | I have a list in one file html called "filed1":
```
<ul>
<li>Nombre:<a class="boton" onclick=move() title="Caja">Caja</a><br>
<FONT SIZE=2>Fecha: 21/12/1994</font></font></li>
</ul>
```
Now I want to change a string in other html "filed2":
```
<a id="logo-header2">
<h1>
<span class="site-name"... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34027556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5588945/"
] | I was successfully able to configure and provision a new device using the following method:
1. Project properties
2. Debugging
3. Remote Computer Name, drop down and select Configure...
[](https://i.stack.imgur.com/jx2nl.png)
4. Successfully shows the... | Not really a fix, but I went back to Visual Studio 2013, as it does not have this bug, and driver dev is working great. |
34,027,556 | I have a list in one file html called "filed1":
```
<ul>
<li>Nombre:<a class="boton" onclick=move() title="Caja">Caja</a><br>
<FONT SIZE=2>Fecha: 21/12/1994</font></font></li>
</ul>
```
Now I want to change a string in other html "filed2":
```
<a id="logo-header2">
<h1>
<span class="site-name"... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34027556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5588945/"
] | I was successfully able to configure and provision a new device using the following method:
1. Project properties
2. Debugging
3. Remote Computer Name, drop down and select Configure...
[](https://i.stack.imgur.com/jx2nl.png)
4. Successfully shows the... | I had the message:
*Please select a valid target machine for deployment from the project property page*
I was using the wrong architecture in the configuration properties for the project. My target test box is x64 and I had my configuration set to win32. Changing this to x64 fixed the issue for me.
[![enter image d... |
7,514,921 | People have been telling me that "GPU renders triangles only".
But how do you explain GPU rendering a quad with 4 lines only in the wireframe mode, shouldnt it be rendering it with 5 lines since GPU cannot understand quads ?
On the other hand, how can i emulate quads in the future where GL\_QUADS is banned ? do i nee... | 2011/09/22 | [
"https://Stackoverflow.com/questions/7514921",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/759532/"
] | Lines are something different than filled primitives. When switching to `glPolygonMode(…, GL_LINE)` whenever a filled primitive is started (GL\_TRIANGLES, GL\_QUADS), OpenGL won't sent commands for filled primitives, but lines between the vertices of the filled primitive. So GL\_TRIANGLES translates to tupled of 3 GL\_... | I din't understand your question fully but from what I understood here is the answer.
There are 2 concepts
1. **Interpolation** Used for figuring out which pixels are to be drawn on a line.
2. **Rasterization** Used for figuring out what properties (colors, texture etc.) to be assigned to the pixels lying inside... |
1,456,704 | I was wondering if there are any standards for encrypting sensitive data in Database which are compliant w/ SOX or HIPAA. Or does the Encrypt Function in SQLServer necessary?. or handle in Business logic.
Any ideas or links we have. | 2009/09/21 | [
"https://Stackoverflow.com/questions/1456704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/91313/"
] | First, Google for HIPAA Compliance
Then, read articles like this one: <http://www.developer.com/java/ent/article.php/3301011/HIPAA-Security-Rule---What-Software-Developers-Should-Know.htm>
And this <http://www.hipaa.ihs.gov/index.cfm?module=compliance_packet>
Finally, talk to your company's legal counsel. Failure to... | At one company I was at, compliance in protecting credit cards they created a key and then destroyed that hard drive with a sledgehammer, so that no one could get the information that went into creating that key.
Though they were using the Oracle DB they created their own key to encrypt the credit cards.
For HIPAA co... |
1,456,704 | I was wondering if there are any standards for encrypting sensitive data in Database which are compliant w/ SOX or HIPAA. Or does the Encrypt Function in SQLServer necessary?. or handle in Business logic.
Any ideas or links we have. | 2009/09/21 | [
"https://Stackoverflow.com/questions/1456704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/91313/"
] | First, Google for HIPAA Compliance
Then, read articles like this one: <http://www.developer.com/java/ent/article.php/3301011/HIPAA-Security-Rule---What-Software-Developers-Should-Know.htm>
And this <http://www.hipaa.ihs.gov/index.cfm?module=compliance_packet>
Finally, talk to your company's legal counsel. Failure to... | SQL Server 2008 cryptographic API is certified for Common Criteria compliance: [Common Criteria Certification](http://msdn.microsoft.com/en-us/library/bb153837.aspx). |
1,722,026 | I just can't get past the $x-1$. The $2$ I know how to get rid of.
$$\lim\_{x\to +∞}\frac {\ln\left((x-1)^2\right)}{x} $$ | 2016/03/31 | [
"https://math.stackexchange.com/questions/1722026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/327505/"
] | Use *equivalents*:
$(x-1)^2\sim\_\infty x^2$ and none of them approach $1$ in a neighbourhood of $+\infty$, hence $\;\ln(x-1)^2\sim\_\infty \ln x^2=2\ln x\;$ and finally
$$\frac{\ln(x-1)^2}{x}\sim\_\infty2\,\frac{\ln x}x \to 0.$$
*Note:* In general equivalence of functions is not compatible with composition on the le... | By applying [L'Hôpital's rule](https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule) you have:
$$\lim\_{x\rightarrow \infty} (\ln(x-1)^2)'=\lim\_{x\rightarrow \infty} \frac{2}{x-1}=0$$
and $$\lim\_{x\rightarrow \infty}(x)'=1$$
Therefore the limit $$\lim\_{x\rightarrow \infty}\frac{(\ln(x-1)^2)'}{x'}=\frac{0}{1}=0$$... |
1,722,026 | I just can't get past the $x-1$. The $2$ I know how to get rid of.
$$\lim\_{x\to +∞}\frac {\ln\left((x-1)^2\right)}{x} $$ | 2016/03/31 | [
"https://math.stackexchange.com/questions/1722026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/327505/"
] | $$\lim\_{x\to \infty} \frac{\ln(x-1)^2}{x}$$
It is not hard to show $\ln x< x$
$\ln(x-1)^2=4\ln\sqrt{x-1}\leq 4\sqrt{x-1}\leq 4\sqrt x$
So the limit is smaller than
$$\lim\_{x\to \infty} \frac{4\sqrt{x}}{x}=\lim\_{x\to \infty} \frac 4{\sqrt x}=0$$
Now the following is true because square root must be non negative
... | By applying [L'Hôpital's rule](https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule) you have:
$$\lim\_{x\rightarrow \infty} (\ln(x-1)^2)'=\lim\_{x\rightarrow \infty} \frac{2}{x-1}=0$$
and $$\lim\_{x\rightarrow \infty}(x)'=1$$
Therefore the limit $$\lim\_{x\rightarrow \infty}\frac{(\ln(x-1)^2)'}{x'}=\frac{0}{1}=0$$... |
1,722,026 | I just can't get past the $x-1$. The $2$ I know how to get rid of.
$$\lim\_{x\to +∞}\frac {\ln\left((x-1)^2\right)}{x} $$ | 2016/03/31 | [
"https://math.stackexchange.com/questions/1722026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/327505/"
] | $$\lim\_{x\to \infty} \frac{\ln(x-1)^2}{x}$$
It is not hard to show $\ln x< x$
$\ln(x-1)^2=4\ln\sqrt{x-1}\leq 4\sqrt{x-1}\leq 4\sqrt x$
So the limit is smaller than
$$\lim\_{x\to \infty} \frac{4\sqrt{x}}{x}=\lim\_{x\to \infty} \frac 4{\sqrt x}=0$$
Now the following is true because square root must be non negative
... | Use *equivalents*:
$(x-1)^2\sim\_\infty x^2$ and none of them approach $1$ in a neighbourhood of $+\infty$, hence $\;\ln(x-1)^2\sim\_\infty \ln x^2=2\ln x\;$ and finally
$$\frac{\ln(x-1)^2}{x}\sim\_\infty2\,\frac{\ln x}x \to 0.$$
*Note:* In general equivalence of functions is not compatible with composition on the le... |
12,985,200 | Here is the config I am using in `tinymce.init` function:
```
forced_root_block: 'p'
valid_elements : '+a[id|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title],strong/b,-em,i,strike,u,script,p[class|id|dir|align|style],ol,ul,li,br'
```
But the *tinyMCE* is stripping of `<br>`'s when we... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12985200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1440870/"
] | Please check if br elements are registered as valid\_children of paragraphs. Default they should be, but you never know... | The problem was the valid\_elements setting in init function p tag needs to have # before as specified here
<http://www.tinymce.com/wiki.php/Configuration:valid_elements> |
12,985,200 | Here is the config I am using in `tinymce.init` function:
```
forced_root_block: 'p'
valid_elements : '+a[id|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title],strong/b,-em,i,strike,u,script,p[class|id|dir|align|style],ol,ul,li,br'
```
But the *tinyMCE* is stripping of `<br>`'s when we... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12985200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1440870/"
] | Please check if br elements are registered as valid\_children of paragraphs. Default they should be, but you never know... | In default settings,
```
Shift + Enter key
``` |
12,985,200 | Here is the config I am using in `tinymce.init` function:
```
forced_root_block: 'p'
valid_elements : '+a[id|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title],strong/b,-em,i,strike,u,script,p[class|id|dir|align|style],ol,ul,li,br'
```
But the *tinyMCE* is stripping of `<br>`'s when we... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12985200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1440870/"
] | Please check if br elements are registered as valid\_children of paragraphs. Default they should be, but you never know... | In your settings:
```
'remove_trailing_brs': false
``` |
12,985,200 | Here is the config I am using in `tinymce.init` function:
```
forced_root_block: 'p'
valid_elements : '+a[id|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title],strong/b,-em,i,strike,u,script,p[class|id|dir|align|style],ol,ul,li,br'
```
But the *tinyMCE* is stripping of `<br>`'s when we... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12985200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1440870/"
] | In your settings:
```
'remove_trailing_brs': false
``` | The problem was the valid\_elements setting in init function p tag needs to have # before as specified here
<http://www.tinymce.com/wiki.php/Configuration:valid_elements> |
12,985,200 | Here is the config I am using in `tinymce.init` function:
```
forced_root_block: 'p'
valid_elements : '+a[id|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title],strong/b,-em,i,strike,u,script,p[class|id|dir|align|style],ol,ul,li,br'
```
But the *tinyMCE* is stripping of `<br>`'s when we... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12985200",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1440870/"
] | In your settings:
```
'remove_trailing_brs': false
``` | In default settings,
```
Shift + Enter key
``` |
34,880,865 | This is probably a really basic question but has me stumped so here goes.
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float argument = 8.86;
printf("%f%\n", argument);
argument = 7.75;
printf("%f%\n", argument);
scanf("%f%\n", &argument);
printf("%f%\n", argument... | 2016/01/19 | [
"https://Stackoverflow.com/questions/34880865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5811232/"
] | You have an extra `%` in `scanf()` and `printf()` calls. `scanf()` attempts to intrepret it as additional conversion character. This results in [undefined behaviour](https://en.wikipedia.org/wiki/Undefined_behavior). Remove them.
If you want to print `%` sign, use `%%`.
E.g.:
```
printf("%f%%\n", argument);
``` | Try this:
```
#include <stdio.h>
int main()
{
char str1[20], str2[30];
printf("Enter String 1: ");
scanf("%s", &str1);
printf("Enter your String 2: ");
scanf("%s", &str2);
printf("String 1: %s\n", str1);
printf("String 2:%s", str2);
return(0);
}
``` |
34,880,865 | This is probably a really basic question but has me stumped so here goes.
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float argument = 8.86;
printf("%f%\n", argument);
argument = 7.75;
printf("%f%\n", argument);
scanf("%f%\n", &argument);
printf("%f%\n", argument... | 2016/01/19 | [
"https://Stackoverflow.com/questions/34880865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5811232/"
] | You have an extra `%` in `scanf()` and `printf()` calls. `scanf()` attempts to intrepret it as additional conversion character. This results in [undefined behaviour](https://en.wikipedia.org/wiki/Undefined_behavior). Remove them.
If you want to print `%` sign, use `%%`.
E.g.:
```
printf("%f%%\n", argument);
``` | First, you have an extra `%` in `printf()` and `scanf()` function;
Second, you should not have `\n` in `scanf()` function;
if have the `\n`, the console will ignore new line, space and all blank characters when you input.
Maybe like this:
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
... |
34,880,865 | This is probably a really basic question but has me stumped so here goes.
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float argument = 8.86;
printf("%f%\n", argument);
argument = 7.75;
printf("%f%\n", argument);
scanf("%f%\n", &argument);
printf("%f%\n", argument... | 2016/01/19 | [
"https://Stackoverflow.com/questions/34880865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5811232/"
] | You have an extra `%` in `scanf()` and `printf()` calls. `scanf()` attempts to intrepret it as additional conversion character. This results in [undefined behaviour](https://en.wikipedia.org/wiki/Undefined_behavior). Remove them.
If you want to print `%` sign, use `%%`.
E.g.:
```
printf("%f%%\n", argument);
``` | \*\*Only change in scan function \*\*
from scan(%d\n)
to |
34,880,865 | This is probably a really basic question but has me stumped so here goes.
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float argument = 8.86;
printf("%f%\n", argument);
argument = 7.75;
printf("%f%\n", argument);
scanf("%f%\n", &argument);
printf("%f%\n", argument... | 2016/01/19 | [
"https://Stackoverflow.com/questions/34880865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5811232/"
] | First, you have an extra `%` in `printf()` and `scanf()` function;
Second, you should not have `\n` in `scanf()` function;
if have the `\n`, the console will ignore new line, space and all blank characters when you input.
Maybe like this:
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
... | Try this:
```
#include <stdio.h>
int main()
{
char str1[20], str2[30];
printf("Enter String 1: ");
scanf("%s", &str1);
printf("Enter your String 2: ");
scanf("%s", &str2);
printf("String 1: %s\n", str1);
printf("String 2:%s", str2);
return(0);
}
``` |
34,880,865 | This is probably a really basic question but has me stumped so here goes.
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float argument = 8.86;
printf("%f%\n", argument);
argument = 7.75;
printf("%f%\n", argument);
scanf("%f%\n", &argument);
printf("%f%\n", argument... | 2016/01/19 | [
"https://Stackoverflow.com/questions/34880865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5811232/"
] | First, you have an extra `%` in `printf()` and `scanf()` function;
Second, you should not have `\n` in `scanf()` function;
if have the `\n`, the console will ignore new line, space and all blank characters when you input.
Maybe like this:
```
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
... | \*\*Only change in scan function \*\*
from scan(%d\n)
to |
14,683,226 | I have a table in Microsoft Access, and I want to show row number in a column using a select query in Access just like using `ROW_NUMBER()` function in SQL Server.
In SQL Server, I can using this query:
```
SELECT ROW_NUMBER() OVER (ORDER BY tblUser.UserID) AS NoRow, *
FROM tblUser
```
I use same query in access, ... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14683226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1719662/"
] | You can try this query:
```
Select A.*, (select count(*) from Table1 where A.ID>=ID) as RowNo
from Table1 as A
order by A.ID
``` | One way to do this with MS Access is with a subquery but it does not have anything like the same functionality:
```
SELECT a.ID,
a.AText,
(SELECT Count(ID)
FROM table1 b WHERE b.ID <= a.ID
AND b.AText Like "*a*") AS RowNo
FROM Table1 AS a
WHERE a.AText Like "*a*"
ORDER BY a.ID;
``` |
14,683,226 | I have a table in Microsoft Access, and I want to show row number in a column using a select query in Access just like using `ROW_NUMBER()` function in SQL Server.
In SQL Server, I can using this query:
```
SELECT ROW_NUMBER() OVER (ORDER BY tblUser.UserID) AS NoRow, *
FROM tblUser
```
I use same query in access, ... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14683226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1719662/"
] | One way to do this with MS Access is with a subquery but it does not have anything like the same functionality:
```
SELECT a.ID,
a.AText,
(SELECT Count(ID)
FROM table1 b WHERE b.ID <= a.ID
AND b.AText Like "*a*") AS RowNo
FROM Table1 AS a
WHERE a.AText Like "*a*"
ORDER BY a.ID;
``` | by VB function:
```
Dim m_RowNr(3) as Variant
'
Function RowNr(ByVal strQName As String, ByVal vUniqValue) As Long
' m_RowNr(3)
' 0 - Nr
' 1 - Query Name
' 2 - last date_time
' 3 - UniqValue
If Not m_RowNr(1) = strQName Then
m_RowNr(0) = 1
m_RowNr(1) = strQName
ElseIf DateDiff("s", m_RowNr(2), Now) > 9 Then
m_R... |
14,683,226 | I have a table in Microsoft Access, and I want to show row number in a column using a select query in Access just like using `ROW_NUMBER()` function in SQL Server.
In SQL Server, I can using this query:
```
SELECT ROW_NUMBER() OVER (ORDER BY tblUser.UserID) AS NoRow, *
FROM tblUser
```
I use same query in access, ... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14683226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1719662/"
] | You can try this query:
```
Select A.*, (select count(*) from Table1 where A.ID>=ID) as RowNo
from Table1 as A
order by A.ID
``` | by VB function:
```
Dim m_RowNr(3) as Variant
'
Function RowNr(ByVal strQName As String, ByVal vUniqValue) As Long
' m_RowNr(3)
' 0 - Nr
' 1 - Query Name
' 2 - last date_time
' 3 - UniqValue
If Not m_RowNr(1) = strQName Then
m_RowNr(0) = 1
m_RowNr(1) = strQName
ElseIf DateDiff("s", m_RowNr(2), Now) > 9 Then
m_R... |
21,470,534 | Let me explain the scenario first:
```
List<Row> rowValues = new ArrayList<>();
// After adding values into list
At location 0 = [Johnson, 10000]
At location 1 = [Adam, 12000]
At location 2 = [Mike, 11000]
At location 3 = [Johnson, 17000]
At location 4 = [Tony, 10000]
```
I want to sort elements of `column1` in asc... | 2014/01/31 | [
"https://Stackoverflow.com/questions/21470534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1790033/"
] | Yes, you can sort it using `Collections.sort()`, but you need to define your own `Comparator`, where you define that an object is bigger than other when the first row is bigger, or if they are equal, the second row is bigger. | You need to account for 2 values(for both columns) in compareTo() method, Assuming that corresponding field in the Row object are named name and point -
```
public int compareTo(Row row) {
if(!name.equals(row.getName()){
return name.compareTo(row.getName());
}
return -1 * point.compa... |
21,470,534 | Let me explain the scenario first:
```
List<Row> rowValues = new ArrayList<>();
// After adding values into list
At location 0 = [Johnson, 10000]
At location 1 = [Adam, 12000]
At location 2 = [Mike, 11000]
At location 3 = [Johnson, 17000]
At location 4 = [Tony, 10000]
```
I want to sort elements of `column1` in asc... | 2014/01/31 | [
"https://Stackoverflow.com/questions/21470534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1790033/"
] | Yes, you can sort it using `Collections.sort()`, but you need to define your own `Comparator`, where you define that an object is bigger than other when the first row is bigger, or if they are equal, the second row is bigger. | I think you want to sort by name asc, and if the name is equal to another, then sort by value desc. If so, then
```
List<Row> rowValues = new ArrayList<Row>();
// After adding values into list
rowValues.add(new Row("Johnson", 10000));
rowValues.add(new Row("Adam", 12000));
rowValues.add(new Row("... |
21,470,534 | Let me explain the scenario first:
```
List<Row> rowValues = new ArrayList<>();
// After adding values into list
At location 0 = [Johnson, 10000]
At location 1 = [Adam, 12000]
At location 2 = [Mike, 11000]
At location 3 = [Johnson, 17000]
At location 4 = [Tony, 10000]
```
I want to sort elements of `column1` in asc... | 2014/01/31 | [
"https://Stackoverflow.com/questions/21470534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1790033/"
] | You need to account for 2 values(for both columns) in compareTo() method, Assuming that corresponding field in the Row object are named name and point -
```
public int compareTo(Row row) {
if(!name.equals(row.getName()){
return name.compareTo(row.getName());
}
return -1 * point.compa... | I think you want to sort by name asc, and if the name is equal to another, then sort by value desc. If so, then
```
List<Row> rowValues = new ArrayList<Row>();
// After adding values into list
rowValues.add(new Row("Johnson", 10000));
rowValues.add(new Row("Adam", 12000));
rowValues.add(new Row("... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Here is a "visual" example:
Wrap the unit interval $[0,1]$ around the unit circle $S^1$ by identifying $0$ and $1$. The interval $[0,1/2) $ is open in $[0,1]$, but its image in $S^1$ is not open. | Partition $X=ℝ$ (under the usual topology) into two equivalence classes $(-\infty, 0]$ and $(0,\infty)$ to get a two-point quotient space $X'$ (called the [Sierpiński space](https://en.wikipedia.org/wiki/Sierpi%C5%84ski_space)) and let $q:X\to X'$ be the canonical projection mapping that takes each element of $ℝ$ to it... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Here is a "visual" example:
Wrap the unit interval $[0,1]$ around the unit circle $S^1$ by identifying $0$ and $1$. The interval $[0,1/2) $ is open in $[0,1]$, but its image in $S^1$ is not open. | Consider a space with three points $a,b,c$ and open sets
$\varnothing, \{a\},\{a,b\},\{a,b,c\}$. The projection that identifies $a$ and $c$ is not open (or closed, for that matter.) |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Let $X$ be a Hausdorff space, and let $a,b$ be a pair of distinct points. Stipulate that $\{b\}$ is not open. Define $f:X\to X\setminus\{b\}$ by $f(z)=z$ if $z\ne b$ and $f(b)=a$. There is a unique topology we may assign the codomain such that $f$ is a quotient map, let's endow that topology on $X\setminus\{b\}$.
The... | Partition $X=ℝ$ (under the usual topology) into two equivalence classes $(-\infty, 0]$ and $(0,\infty)$ to get a two-point quotient space $X'$ (called the [Sierpiński space](https://en.wikipedia.org/wiki/Sierpi%C5%84ski_space)) and let $q:X\to X'$ be the canonical projection mapping that takes each element of $ℝ$ to it... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Consider a space with three points $a,b,c$ and open sets
$\varnothing, \{a\},\{a,b\},\{a,b,c\}$. The projection that identifies $a$ and $c$ is not open (or closed, for that matter.) | An open map is:
for any open set in the domain, its image is open
A quotient map only requires:
for any open preimage in the domain, its image is open
A quotient map may not be an open map because there may exist a set such that it is open but is not a preimage, i.e., the preimage of the image of an open set may not ... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Let $X$ be a Hausdorff space, and let $a,b$ be a pair of distinct points. Stipulate that $\{b\}$ is not open. Define $f:X\to X\setminus\{b\}$ by $f(z)=z$ if $z\ne b$ and $f(b)=a$. There is a unique topology we may assign the codomain such that $f$ is a quotient map, let's endow that topology on $X\setminus\{b\}$.
The... | Consider a space with three points $a,b,c$ and open sets
$\varnothing, \{a\},\{a,b\},\{a,b,c\}$. The projection that identifies $a$ and $c$ is not open (or closed, for that matter.) |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Here is a "visual" example:
Wrap the unit interval $[0,1]$ around the unit circle $S^1$ by identifying $0$ and $1$. The interval $[0,1/2) $ is open in $[0,1]$, but its image in $S^1$ is not open. | An open map is:
for any open set in the domain, its image is open
A quotient map only requires:
for any open preimage in the domain, its image is open
A quotient map may not be an open map because there may exist a set such that it is open but is not a preimage, i.e., the preimage of the image of an open set may not ... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Consider $\mathbb{R}$ with the standard topology. On $\mathbb{R}$, consider the equivalence relation
$$x\sim y \iff (x = y \lor \{x,y\} \subset \mathbb{Z}),$$
and let $(X',\mathcal{T}')$ the quotient space $\mathbb{R}/{\sim}$. By definition, $\pi \colon \mathbb{R}\to X';\; x \mapsto [x]\_\sim$ is a quotient map, but ... | An open map is:
for any open set in the domain, its image is open
A quotient map only requires:
for any open preimage in the domain, its image is open
A quotient map may not be an open map because there may exist a set such that it is open but is not a preimage, i.e., the preimage of the image of an open set may not ... |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Consider $\mathbb{R}$ with the standard topology. On $\mathbb{R}$, consider the equivalence relation
$$x\sim y \iff (x = y \lor \{x,y\} \subset \mathbb{Z}),$$
and let $(X',\mathcal{T}')$ the quotient space $\mathbb{R}/{\sim}$. By definition, $\pi \colon \mathbb{R}\to X';\; x \mapsto [x]\_\sim$ is a quotient map, but ... | Here is a "visual" example:
Wrap the unit interval $[0,1]$ around the unit circle $S^1$ by identifying $0$ and $1$. The interval $[0,1/2) $ is open in $[0,1]$, but its image in $S^1$ is not open. |
655,797 | I have the following definition:
Let ($X$,$\mathcal{T}$) and ($X'$, $\mathcal{T'}$) be topological spaces. A surjection $q: X \longrightarrow X'$ is a quotient mapping if $$U'\in \mathcal{T'} \Longleftrightarrow q^{-1}\left( U'\right) \in \mathcal{T} \quad \text{i.e. if } \mathcal{T'}=\{ U' \subset X' : q^{-1}\left( ... | 2014/01/29 | [
"https://math.stackexchange.com/questions/655797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122136/"
] | Partition $X=ℝ$ (under the usual topology) into two equivalence classes $(-\infty, 0]$ and $(0,\infty)$ to get a two-point quotient space $X'$ (called the [Sierpiński space](https://en.wikipedia.org/wiki/Sierpi%C5%84ski_space)) and let $q:X\to X'$ be the canonical projection mapping that takes each element of $ℝ$ to it... | An open map is:
for any open set in the domain, its image is open
A quotient map only requires:
for any open preimage in the domain, its image is open
A quotient map may not be an open map because there may exist a set such that it is open but is not a preimage, i.e., the preimage of the image of an open set may not ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.