qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
21,201,601 | I am using cakephp 2.4 , am working on a project which uses two db connections based on the user logged in. while accessing the second DB and Retrieve data it is working fine, but when i delete record in the second DB table record its throw error as ..
```
Invalid catalog name: 1046 No database selected
```
Can anyo... | 2014/01/18 | [
"https://Stackoverflow.com/questions/21201601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/746318/"
] | Define multiple database configuration in app/config/database.php as
```
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'db1',
'prefix' => '',
//'encoding' => 'utf8',
);
publ... | You can use **$useDbConfig** Attribute inside your Model.
```
class Example extends AppModel {
public $useDbConfig = 'user';
}
```
Inside your Controller, simply use:
```
$this->ModelName->useDbConfig = 'user';
```
for More Details, please click on <http://book.cakephp.org/2.0/en/models/model-attributes.htm... |
37,916,366 | I am trying to delete zeros at the start of the line till fourth characters. If zero is occurring beyond 4th position then need not to delete it. I am not able to achieve this correctly.
Condition:
==========
```
01230 <------Delete 1 zero at start.
001230 <-----Delete 2 zeros at start.
0001230 <----Delete 3 zeros a... | 2016/06/20 | [
"https://Stackoverflow.com/questions/37916366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6309601/"
] | Use `{}` to specify number of occurances and `-r` to allow extended regexp syntax:
```
sed -r 's/^0{1,4}//g'
``` | Deletes from one up to four zeros at the start of the line.
```
gawk '{gsub(/^0{1,4}/,"")}1' file
abc0
abcde0
abcede0
0abcede0
``` |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | with this code you can use cookie and header in the same time.
if cookie is null then check the header automatically.
add this code in AddJwtBearer options.
```
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>
{
context.Token = context.Request.Cookies["Authorization"];
ret... | **ASP.NET Core 2.0 Web API**
Please follow this post for implementing **JWT Token** based authentication
**<https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login>**
If you are using visual studio make sure apply the Bearer type athentication ty... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | I have not been able to find much information on a good way to do this - having to duplicate the API is a pain just to support 2 authorization schemes.
I have been looking into the idea of using a reverse proxy and it looks to me like a good solution for this.
1. User signs into Website (use cookie httpOnly for sessi... | while looking for combined firebase authorization with net core web api (cookie for web site and authorization header for mobile app ) end with the following solution.
```
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | Okay, I have been trying achieving this for a while and i solved same issue of using jwt Authentication Tokens and Cookie Authentication with the following code.
API Service Provider **UserController.cs**
>
> This Provide Different Services to the User with Both (Cookie and JWT Bearer)Authentication Schemes
>
>
> ... | I've been having the same issue and i just found what it seems to be the solution in another question here in stackoverflow.
Please take a look at [this](https://stackoverflow.com/a/46942760).
I'll try that solution myself and update this answer with the results.
Edit: It seems it's not possible to achieve double au... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | while looking for combined firebase authorization with net core web api (cookie for web site and authorization header for mobile app ) end with the following solution.
```
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)... | I found [this](https://weblog.west-wind.com/posts/2022/Mar/29/Combining-Bearer-Token-and-Cookie-Auth-in-ASPNET) nice article by Rick Strahl. It is the best solution that I found so far and I used it in .NET 5
Here is the key code in order to combining JWT token and cookie authentication in .NET applications:
```
serv... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | I have not been able to find much information on a good way to do this - having to duplicate the API is a pain just to support 2 authorization schemes.
I have been looking into the idea of using a reverse proxy and it looks to me like a good solution for this.
1. User signs into Website (use cookie httpOnly for sessi... | with this code you can use cookie and header in the same time.
if cookie is null then check the header automatically.
add this code in AddJwtBearer options.
```
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>
{
context.Token = context.Request.Cookies["Authorization"];
ret... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | I think the easiest solution is one proposed by [David Kirkland](https://stackoverflow.com/a/55627054/4553518):
Create combined authorization policy (in `ConfigureServices(IServiceCollection services)`):
```
services.AddAuthorization(options =>
{
var defaultAuthorizationPolicyBuilder = new AuthorizationPolicyBuil... | I found [this](https://weblog.west-wind.com/posts/2022/Mar/29/Combining-Bearer-Token-and-Cookie-Auth-in-ASPNET) nice article by Rick Strahl. It is the best solution that I found so far and I used it in .NET 5
Here is the key code in order to combining JWT token and cookie authentication in .NET applications:
```
serv... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | while looking for combined firebase authorization with net core web api (cookie for web site and authorization header for mobile app ) end with the following solution.
```
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)... | **ASP.NET Core 2.0 Web API**
Please follow this post for implementing **JWT Token** based authentication
**<https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login>**
If you are using visual studio make sure apply the Bearer type athentication ty... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | I found [this](https://weblog.west-wind.com/posts/2022/Mar/29/Combining-Bearer-Token-and-Cookie-Auth-in-ASPNET) nice article by Rick Strahl. It is the best solution that I found so far and I used it in .NET 5
Here is the key code in order to combining JWT token and cookie authentication in .NET applications:
```
serv... | **ASP.NET Core 2.0 Web API**
Please follow this post for implementing **JWT Token** based authentication
**<https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login>**
If you are using visual studio make sure apply the Bearer type athentication ty... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | Okay, I have been trying achieving this for a while and i solved same issue of using jwt Authentication Tokens and Cookie Authentication with the following code.
API Service Provider **UserController.cs**
>
> This Provide Different Services to the User with Both (Cookie and JWT Bearer)Authentication Schemes
>
>
> ... | I found [this](https://weblog.west-wind.com/posts/2022/Mar/29/Combining-Bearer-Token-and-Cookie-Auth-in-ASPNET) nice article by Rick Strahl. It is the best solution that I found so far and I used it in .NET 5
Here is the key code in order to combining JWT token and cookie authentication in .NET applications:
```
serv... |
49,455,979 | I have an Interactive Grid on my page and I want to add a button to a toolbar. I have wrote a javascript function and tried to add the code under Advanced->Javascript. But when I did that my grid content disappeared completely, only heading was left. Is that the wrong place to add my code? How to ensure the function ge... | 2018/03/23 | [
"https://Stackoverflow.com/questions/49455979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812278/"
] | I've been having the same issue and i just found what it seems to be the solution in another question here in stackoverflow.
Please take a look at [this](https://stackoverflow.com/a/46942760).
I'll try that solution myself and update this answer with the results.
Edit: It seems it's not possible to achieve double au... | I think the easiest solution is one proposed by [David Kirkland](https://stackoverflow.com/a/55627054/4553518):
Create combined authorization policy (in `ConfigureServices(IServiceCollection services)`):
```
services.AddAuthorization(options =>
{
var defaultAuthorizationPolicyBuilder = new AuthorizationPolicyBuil... |
51,190,561 | I have this original image:

then I have applied the following code to
1. Converted the Original image to HSV image
2. Then using `cv2.findContours()` I have made a list containing all the contours.
3. Then i have removed all the contours of area less than 30.
4. Then I ... | 2018/07/05 | [
"https://Stackoverflow.com/questions/51190561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9988235/"
] | You can use the concept of [hierarchy of contours](https://docs.opencv.org/ref/master/d9/d8b/tutorial_py_contours_hierarchy.html) to solve this problem. But there is a caveat, all your images must be the same as the one in the question.
I just added some additional stuff to your code.
**Code:**
```
img2 = img.copy(... | I assume you only need the inner spots inside a leaf.
1. Segment using the otsu algorithm
2. apply the flood-fill operation to ensure you capture all leaf pixels
3. Extract only the inner contour
All can simply be done using opencv below are the codes:
>
>
```
import cv2
import numpy as np
def flood_fill_binary(b... |
40,128 | This code is part of a long code for a robot that is both obstacle-avoiding and remote control. I am trying to get the code to check both "if" statements when the code number FF807F is received from an IR remote. When the code number is received
the program checks both "if" statements and carries out the one that is tr... | 2017/07/01 | [
"https://arduino.stackexchange.com/questions/40128",
"https://arduino.stackexchange.com",
"https://arduino.stackexchange.com/users/35090/"
] | I am going to assume you don't want to include `cm == 6` which is why you have both cases. I would consider using a while loop instead of a singular 'if' statement in order to continuously check if those buttons are being pressed or not (`while (cm<6){do this stuff}`). Otherwise, it will check once and never check agai... | Your are missing the case when "cm == 6".
You don't need to do two "if"; one "if-else" is enough because is either one or the other.
You don't have/need to check twice; "cm" doesn't change inside the "if". But i you want, use functions:
```
void loop () {
if (My_Decoder.value == 0xFF807F) {
doSomething();
... |
40,128 | This code is part of a long code for a robot that is both obstacle-avoiding and remote control. I am trying to get the code to check both "if" statements when the code number FF807F is received from an IR remote. When the code number is received
the program checks both "if" statements and carries out the one that is tr... | 2017/07/01 | [
"https://arduino.stackexchange.com/questions/40128",
"https://arduino.stackexchange.com",
"https://arduino.stackexchange.com/users/35090/"
] | Your are missing the case when "cm == 6".
You don't need to do two "if"; one "if-else" is enough because is either one or the other.
You don't have/need to check twice; "cm" doesn't change inside the "if". But i you want, use functions:
```
void loop () {
if (My_Decoder.value == 0xFF807F) {
doSomething();
... | This looks like a good use for a State Machine.
It would look something like this:
```cpp
typedef enum State
{
STATE_IDLE,
STATE_THIS,
STATE_THAT,
STATE_OTHER
} State;
State state;
const int IR_BUTTON_1 = 0xFF807F;
const int IR_BUTTON_2 = 0x112233;
const int IR_BUTTON_3 = 0X445566;
const int IR_BUT... |
40,128 | This code is part of a long code for a robot that is both obstacle-avoiding and remote control. I am trying to get the code to check both "if" statements when the code number FF807F is received from an IR remote. When the code number is received
the program checks both "if" statements and carries out the one that is tr... | 2017/07/01 | [
"https://arduino.stackexchange.com/questions/40128",
"https://arduino.stackexchange.com",
"https://arduino.stackexchange.com/users/35090/"
] | I am going to assume you don't want to include `cm == 6` which is why you have both cases. I would consider using a while loop instead of a singular 'if' statement in order to continuously check if those buttons are being pressed or not (`while (cm<6){do this stuff}`). Otherwise, it will check once and never check agai... | ```
if (My_Decoder.value == 0xFF807F) {
if (cm<6)
```
Are you wanting both "ifs" to occur? Maybe a bitwise operator like logical AND (`&`)? |
40,128 | This code is part of a long code for a robot that is both obstacle-avoiding and remote control. I am trying to get the code to check both "if" statements when the code number FF807F is received from an IR remote. When the code number is received
the program checks both "if" statements and carries out the one that is tr... | 2017/07/01 | [
"https://arduino.stackexchange.com/questions/40128",
"https://arduino.stackexchange.com",
"https://arduino.stackexchange.com/users/35090/"
] | I am going to assume you don't want to include `cm == 6` which is why you have both cases. I would consider using a while loop instead of a singular 'if' statement in order to continuously check if those buttons are being pressed or not (`while (cm<6){do this stuff}`). Otherwise, it will check once and never check agai... | This looks like a good use for a State Machine.
It would look something like this:
```cpp
typedef enum State
{
STATE_IDLE,
STATE_THIS,
STATE_THAT,
STATE_OTHER
} State;
State state;
const int IR_BUTTON_1 = 0xFF807F;
const int IR_BUTTON_2 = 0x112233;
const int IR_BUTTON_3 = 0X445566;
const int IR_BUT... |
40,128 | This code is part of a long code for a robot that is both obstacle-avoiding and remote control. I am trying to get the code to check both "if" statements when the code number FF807F is received from an IR remote. When the code number is received
the program checks both "if" statements and carries out the one that is tr... | 2017/07/01 | [
"https://arduino.stackexchange.com/questions/40128",
"https://arduino.stackexchange.com",
"https://arduino.stackexchange.com/users/35090/"
] | ```
if (My_Decoder.value == 0xFF807F) {
if (cm<6)
```
Are you wanting both "ifs" to occur? Maybe a bitwise operator like logical AND (`&`)? | This looks like a good use for a State Machine.
It would look something like this:
```cpp
typedef enum State
{
STATE_IDLE,
STATE_THIS,
STATE_THAT,
STATE_OTHER
} State;
State state;
const int IR_BUTTON_1 = 0xFF807F;
const int IR_BUTTON_2 = 0x112233;
const int IR_BUTTON_3 = 0X445566;
const int IR_BUT... |
3,216 | Does anyone know how I can change the admin reordering so that either an order that is reordered automatically gets assigned to a different site or allows the operator to change the site the reorder is made from? Basically we are closing a site down soon (it won't be deleted as that would get rid of old orders) and nee... | 2013/04/24 | [
"https://magento.stackexchange.com/questions/3216",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/204/"
] | You will need to rewrite the `Mage_Adminhtml_Model_Sales_Order_Create::initFromOrder()` method because it propagates the original order's `store_id` value to the session, which is then used for subordinate actions:
```
public function initFromOrder(Mage_Sales_Model_Order $order)
{
//...
$this->getSession()->se... | I've been wondering how to achieve the same thing.
I need to be able to assign an order to any website.
To easily do so, I just forked the file :
```
/app/Mage/Adminhtml/Model/Sales/Order/Create.php
```
Then, based on the comment from Benmarks, I just commented out the line :
```
//$this->getSession()->setStoreId(... |
247,191 | 1.The purpose of the first paragraph is to provide details necessary to understanding the story.
I don't understand "necessary to understanding the story", it should be "necessary to understand the story", shouldn't it?
Thanks for helping | 2020/05/12 | [
"https://ell.stackexchange.com/questions/247191",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/114905/"
] | If you look at the graphic you attached to the question, you'll see the answer already provided.
At a supermarket, where you've *already* paid, you get a [**receipt**](https://www.merriam-webster.com/dictionary/receipt):
>
> [Merriam-Webster]
>
> **1 a** : a writing acknowledging the receiving of goods or money
>... | While the bits of paper are technically receipts, in Australia at least, the receipts from supermarkets and the like (those thin, but long, usually thermal paper type) are generally known as '**dockets**'. This uses the meaning shown [here](https://dictionary.cambridge.org/dictionary/english/docket) in reference to UK ... |
2,259,743 | I am storing my templates in the database and I don't have any path to provide for the `template.render` method.
Is there any exposed method which accepts the template as a string?
Is there any workaround? | 2010/02/14 | [
"https://Stackoverflow.com/questions/2259743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48465/"
] | [Instantiate `Template`](http://docs.djangoproject.com/en/dev/ref/templates/api/#using-the-template-system) with the string to use as a template. | In Django < 1.8:
```
from django.template.loader import get_template_from_string
tpl = Template(get_template_from_string("My name is {{ my_name }}."))
``` |
2,259,743 | I am storing my templates in the database and I don't have any path to provide for the `template.render` method.
Is there any exposed method which accepts the template as a string?
Is there any workaround? | 2010/02/14 | [
"https://Stackoverflow.com/questions/2259743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48465/"
] | Based on the [the docs](https://docs.djangoproject.com/en/dev/ref/templates/api/#overview) for using the template system:
```
from django.template import Template, Context
t = Template("My name is {{ my_name }}.")
c = Context({"my_name": "Adrian"})
t.render(c)
``` | [Instantiate `Template`](http://docs.djangoproject.com/en/dev/ref/templates/api/#using-the-template-system) with the string to use as a template. |
2,259,743 | I am storing my templates in the database and I don't have any path to provide for the `template.render` method.
Is there any exposed method which accepts the template as a string?
Is there any workaround? | 2010/02/14 | [
"https://Stackoverflow.com/questions/2259743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48465/"
] | Based on the [the docs](https://docs.djangoproject.com/en/dev/ref/templates/api/#overview) for using the template system:
```
from django.template import Template, Context
t = Template("My name is {{ my_name }}.")
c = Context({"my_name": "Adrian"})
t.render(c)
``` | In Django < 1.8:
```
from django.template.loader import get_template_from_string
tpl = Template(get_template_from_string("My name is {{ my_name }}."))
``` |
11,686 | I'm about to buy a new laptop computer. I might want a better NVidia GPU on my own computer in the future, and it would be great to keep that option open without buying an expensive machine right away.
I didn't find such information on any laptop available online, so I fear this generally does not exist, at least not ... | 2019/07/27 | [
"https://hardwarerecs.stackexchange.com/questions/11686",
"https://hardwarerecs.stackexchange.com",
"https://hardwarerecs.stackexchange.com/users/13142/"
] | It is perfectly possible to do development on a laptop with 8 GiB of RAM - I've done that for years on end now. However, you must assume that you will be working within an IDE such as Visual Studio. These kind of applications thrive on screen space. A laptop often has too little of that, so it is much better to work on... | Try to buy a laptop with at least below configuration
Processor: Intel core i5 (8th gen or Above)
RAM: 8Gb DDR4
Storage: 256Gb SSD
You can go for 16gb if you want to spend little more. This configuration will kill all kind of programming IDE's required hardware specifications. |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | The phrase appeared in works by E. E. Smith. I can't do a citation just now - need to get out the books. But that would put in not later than the 1960s, and possibly as early as the 1920s. My best guess is the 1940s or 1950s. | I thought it might be a military term like for pilots or maybe its meaning is it's so cold you can cancel a jet engine heat, like the afterburner on a fighter plane |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | The phrase appeared in works by E. E. Smith. I can't do a citation just now - need to get out the books. But that would put in not later than the 1960s, and possibly as early as the 1920s. My best guess is the 1940s or 1950s. | the term cool your jets came from the P2 Neptune aircraft use after World War II as a sub Hunter it had to radial engines and two outboard jet engines after takeoff they would turn the jet engines off the cool your jets that's where it came from |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | The OED says the phrase "cool your jets", meaning to calm down or become less agitated, is originally US and the first quoted in a newspaper:
>
> 1973 *Daily Tribune* (Wisconsin Rapids) 29 Jan. 1/1 If you want to cool your jets, just step outside, where it will be about 10 degrees under cloudy skies.
>
>
>
That u... | I thought it might be a military term like for pilots or maybe its meaning is it's so cold you can cancel a jet engine heat, like the afterburner on a fighter plane |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | Like the OED (which Hugo cites in his answer), J. E. Lighter, *Random House Dictionary of American Slang*, volume 1 (1994) gives a first occurrence date of 1973 for "cool [one's] jets":
>
> **cool (one's) jets** to take it easy; become less less agitated or excited.
>
>
> [Examples:] **1973** Eble *Campus Slang* (N... | The n-gram is instructive <https://books.google.com/ngrams/graph?content=cool+your+jets&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccool%20your%20jets%3B%2Cc0> Note the origination in the early 40's, almost certainly in pulp SF. In the absence of direct attribution, the suggestions of ... |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | Like the OED (which Hugo cites in his answer), J. E. Lighter, *Random House Dictionary of American Slang*, volume 1 (1994) gives a first occurrence date of 1973 for "cool [one's] jets":
>
> **cool (one's) jets** to take it easy; become less less agitated or excited.
>
>
> [Examples:] **1973** Eble *Campus Slang* (N... | I thought it might be a military term like for pilots or maybe its meaning is it's so cold you can cancel a jet engine heat, like the afterburner on a fighter plane |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | The phrase appeared in works by E. E. Smith. I can't do a citation just now - need to get out the books. But that would put in not later than the 1960s, and possibly as early as the 1920s. My best guess is the 1940s or 1950s. | The n-gram is instructive <https://books.google.com/ngrams/graph?content=cool+your+jets&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=&direct_url=t1%3B%2Ccool%20your%20jets%3B%2Cc0> Note the origination in the early 40's, almost certainly in pulp SF. In the absence of direct attribution, the suggestions of ... |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | The OED says the phrase "cool your jets", meaning to calm down or become less agitated, is originally US and the first quoted in a newspaper:
>
> 1973 *Daily Tribune* (Wisconsin Rapids) 29 Jan. 1/1 If you want to cool your jets, just step outside, where it will be about 10 degrees under cloudy skies.
>
>
>
That u... | I am unable to provide a proper citation as I seem no longer to have a copy of the book available. However I believe E. E. "Doc" Smith used it in "Gray Lensman" (serial published in 1939-40, book in 1951). About the second or third chapter Kinnison attended some sort of soiree where he was treated like a rock star and ... |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | Like the OED (which Hugo cites in his answer), J. E. Lighter, *Random House Dictionary of American Slang*, volume 1 (1994) gives a first occurrence date of 1973 for "cool [one's] jets":
>
> **cool (one's) jets** to take it easy; become less less agitated or excited.
>
>
> [Examples:] **1973** Eble *Campus Slang* (N... | I am unable to provide a proper citation as I seem no longer to have a copy of the book available. However I believe E. E. "Doc" Smith used it in "Gray Lensman" (serial published in 1939-40, book in 1951). About the second or third chapter Kinnison attended some sort of soiree where he was treated like a rock star and ... |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | I am unable to provide a proper citation as I seem no longer to have a copy of the book available. However I believe E. E. "Doc" Smith used it in "Gray Lensman" (serial published in 1939-40, book in 1951). About the second or third chapter Kinnison attended some sort of soiree where he was treated like a rock star and ... | I thought it might be a military term like for pilots or maybe its meaning is it's so cold you can cancel a jet engine heat, like the afterburner on a fighter plane |
118,230 | When was it first used and in what context? | 2013/07/02 | [
"https://english.stackexchange.com/questions/118230",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/47131/"
] | the term cool your jets came from the P2 Neptune aircraft use after World War II as a sub Hunter it had to radial engines and two outboard jet engines after takeoff they would turn the jet engines off the cool your jets that's where it came from | I thought it might be a military term like for pilots or maybe its meaning is it's so cold you can cancel a jet engine heat, like the afterburner on a fighter plane |
74,414,936 | I want to write a program where a user tells me an integer(n) and i calculate The sum of 1+(1-2)+(1-2+3)+(1-2+3-n)... where even integers are -k and odd integers are +k.
Ive made a function which does that But the sum is never correct. For example for n=2 it should be sum=0 but shows sum=-1 for n=3 should be sum=+2 bu... | 2022/11/12 | [
"https://Stackoverflow.com/questions/74414936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20133060/"
] | Welcome to the site. You have a little ways to go to make this work. It would be good if you put some additional effort in to this before asking somebody to code this up. Let me suggest a structure for you that perhaps you can work on/augment and then you can re-post if you get stuck by editing your question above and/... | i got something for you. What you want to do is to find the student first and then delete the course: like this.
```
studentid = input("enter studentid")
course = input("enter the course to delete")
with open("studentDatabase.dat") as file:
f = file.readlines()
with open("studentDatabase.dat","w") as file:
for... |
62,639,260 | **Situation:**
I'm busy developing an online course where the user has to go through a series of pages in order, but I want to keep them from navigating to other pages. If they attempt to, the current page just loads again.
**My idea:** I created a public boolean array that keeps track of the users' progress (example ... | 2020/06/29 | [
"https://Stackoverflow.com/questions/62639260",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13133690/"
] | >
> What does the SetWindowPos function do to the owner window's position
> in the Z order, if you do not pass this flag?
>
>
>
Take placing the owned window at the bottom of the Z order for an example. There are three windows: Owned, TestWindowPos (owner) and New Tab Chrome window (as a reference).
Test code pie... | I wrote a test program which tries all SetWindowPos operations in each possible starting order of 4 windows (owner, 2 owned windows, and an unrelated window). I found the following:
* Windows prefers to put owned windows directly in front of their owner, without any other windows between them.
* When `SWP_NOACTIVATE` ... |
426,397 | I'm using a few acronyms in my thesis, and I want them to appear in the alphabetical index as:
>
> ACR, see acronym
>
>
> acronym, iii, 5, 48
>
>
>
This is my code:
```
\documentclass[11pt,a4paper]{book}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{imakeidx}
\usepackage{bookmark} % includes hyperr... | 2018/04/13 | [
"https://tex.stackexchange.com/questions/426397",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/156704/"
] | Summary of comments:
* A sort value is required when the indexed term contains formatting commands (as `makeindex` doesn't ignore LaTeX commands but treats them as a string starting with `\`).
* The `see` encap requires braces around the argument: `|see FMEA` becomes `\see FMEA{1}` which is effectively `\see{F}{M}EA1`... | If this could be helpful to anyone, here are two ways to index acronyms, with the corrections made by Nicola Talbot. This code allows to specify the sorting part as optional argument.
---
**Method 1:** acronym points to full text
```
\usepackage{etoolbox}
\newcommand{\newacronymidx}[4][]{ % rimanda acronimo a estes... |
71,578,939 | Here is my dataset
```
Date,p1Close,p2Close,spread,movingAverage
2022-02-28,5,10,2,NaN
2022-03-01,2,6,3,2.5
2022-03-02,4,8,2,2.5
2022-03-03,2,8,4,3
```
I am trying to create a new column in pandas data frame that is equal to the standard deviation between `spread` from previous row and current row.
```
df['stan... | 2022/03/22 | [
"https://Stackoverflow.com/questions/71578939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2913203/"
] | It won't submit the form due to this line:
```
e.preventDefault();
```
<https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault>
My suggestion is you resubmit the form after your validation logic has run providing the form is valid. | You're preventing the default action of the browser to submit the post request to the given route.
Try removing the "e.preventDefault" from the script.js. That should send the data to the route |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | Assuming you have the [record](https://www.mercurial-scm.org/wiki/RecordExtension) and [shelve](https://www.mercurial-scm.org/wiki/ShelveExtension) extensions enabled, you can do as follows:
```
hg record -m "garbage" # pick out and commit the change you want to revert
hg shelve --all # temporarily hide oth... | If the commit where you want the change is e.g. ba1c841aaff4,
the easiest is to use:
```
hg meld -r ba1c841aaff4^ <filename>
```
Now click on a right arrow (pointing to the right) in the middle to revert your lines, save the file and close meld. kdiff3 (old and unintuitive) can be an alternative.
Side note: in orde... |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I've been doing this with the interactive ncurses style ui `hg revert -i` that lets you walk around and select the parts you want to destroy, either file, diff chunk or line by line, as you please, depending on how deep you unfold your changes.
I am not sure if this is a standard `hg` feature or not, you can verify ea... | I've got a different answer for your problem, which is the same problem I have. This is a great use case for [mercurial queues](https://www.mercurial-scm.org/wiki/MqTutorial#Why_would_I_want_to_use_mq.3F)!
When I am about to start adding debugging code to a change that I think is ready, I do the following:
```
hg qne... |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I've got a different answer for your problem, which is the same problem I have. This is a great use case for [mercurial queues](https://www.mercurial-scm.org/wiki/MqTutorial#Why_would_I_want_to_use_mq.3F)!
When I am about to start adding debugging code to a change that I think is ready, I do the following:
```
hg qne... | Download and install meld <https://meldmerge.org/>
(You should have Mercurial installed locally or TortoiseHg)
1. Launch Meld and select Version Control View and then select you will be asked to choose a parent directory of the file you want to modify.
[ right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I've been doing this with the interactive ncurses style ui `hg revert -i` that lets you walk around and select the parts you want to destroy, either file, diff chunk or line by line, as you please, depending on how deep you unfold your changes.
I am not sure if this is a standard `hg` feature or not, you can verify ea... | Download and install meld <https://meldmerge.org/>
(You should have Mercurial installed locally or TortoiseHg)
1. Launch Meld and select Version Control View and then select you will be asked to choose a parent directory of the file you want to modify.
[ right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | Assuming you have the [record](https://www.mercurial-scm.org/wiki/RecordExtension) and [shelve](https://www.mercurial-scm.org/wiki/ShelveExtension) extensions enabled, you can do as follows:
```
hg record -m "garbage" # pick out and commit the change you want to revert
hg shelve --all # temporarily hide oth... | I've got a different answer for your problem, which is the same problem I have. This is a great use case for [mercurial queues](https://www.mercurial-scm.org/wiki/MqTutorial#Why_would_I_want_to_use_mq.3F)!
When I am about to start adding debugging code to a change that I think is ready, I do the following:
```
hg qne... |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | The [TortoiseHg](http://tortoisehg.bitbucket.io) GUI's "Commit" window has a "Hunk Selection" tab that allows selection of specific sections of a file's changes to be committed. | I've got a different answer for your problem, which is the same problem I have. This is a great use case for [mercurial queues](https://www.mercurial-scm.org/wiki/MqTutorial#Why_would_I_want_to_use_mq.3F)!
When I am about to start adding debugging code to a change that I think is ready, I do the following:
```
hg qne... |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I'm not sure if you can revert individual lines explicitly, but what I do in situation like yours is to commit the *good* code and revert the rest (the *bad* code). This workflow is easy using Mercurial's [record](https://www.mercurial-scm.org/wiki/RecordExtension) or [crecord](http://bitbucket.org/edgimar/crecord/wiki... | Download and install meld <https://meldmerge.org/>
(You should have Mercurial installed locally or TortoiseHg)
1. Launch Meld and select Version Control View and then select you will be asked to choose a parent directory of the file you want to modify.
[ right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I've been doing this with the interactive ncurses style ui `hg revert -i` that lets you walk around and select the parts you want to destroy, either file, diff chunk or line by line, as you please, depending on how deep you unfold your changes.
I am not sure if this is a standard `hg` feature or not, you can verify ea... | The [TortoiseHg](http://tortoisehg.bitbucket.io) GUI's "Commit" window has a "Hunk Selection" tab that allows selection of specific sections of a file's changes to be committed. |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | The [TortoiseHg](http://tortoisehg.bitbucket.io) GUI's "Commit" window has a "Hunk Selection" tab that allows selection of specific sections of a file's changes to be committed. | If the commit where you want the change is e.g. ba1c841aaff4,
the easiest is to use:
```
hg meld -r ba1c841aaff4^ <filename>
```
Now click on a right arrow (pointing to the right) in the middle to revert your lines, save the file and close meld. kdiff3 (old and unintuitive) can be an alternative.
Side note: in orde... |
4,441,450 | I often notice a few unwanted changes when I review my working copy (with `hg status` and `hg diff`) right before a commit. For example, I might have temporarily added or remove some code just for the duration of a debugging session.
I know I can use `hg revert` to remove unwanted changes, but this removes all the cha... | 2010/12/14 | [
"https://Stackoverflow.com/questions/4441450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/52626/"
] | I've been doing this with the interactive ncurses style ui `hg revert -i` that lets you walk around and select the parts you want to destroy, either file, diff chunk or line by line, as you please, depending on how deep you unfold your changes.
I am not sure if this is a standard `hg` feature or not, you can verify ea... | If the commit where you want the change is e.g. ba1c841aaff4,
the easiest is to use:
```
hg meld -r ba1c841aaff4^ <filename>
```
Now click on a right arrow (pointing to the right) in the middle to revert your lines, save the file and close meld. kdiff3 (old and unintuitive) can be an alternative.
Side note: in orde... |
9,317,173 | I'm trying to find the number of occurrences of these ([0],[1],[2] etc) in an array but I can't seem to get it to work.
Here's what I'm trying at the moment to output the result:
```
$photos = (my entire array)
$p = $photos['photos']['photo'];
$max = (max($p));
echo $max;
```
And here's how my array looks under pri... | 2012/02/16 | [
"https://Stackoverflow.com/questions/9317173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938401/"
] | I think you're looking for the [count()](http://php.net/manual/en/function.count.php) function.
Good luck! | ```
$key = array_search('search_word', $photos);
``` |
9,317,173 | I'm trying to find the number of occurrences of these ([0],[1],[2] etc) in an array but I can't seem to get it to work.
Here's what I'm trying at the moment to output the result:
```
$photos = (my entire array)
$p = $photos['photos']['photo'];
$max = (max($p));
echo $max;
```
And here's how my array looks under pri... | 2012/02/16 | [
"https://Stackoverflow.com/questions/9317173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938401/"
] | As @Ryan mentioned, you need to use the [`count()`](http://php.net/manual/en/function.count.php) function. This is how you would use it in your example:
```
$photos = (my entire array)
$p = $photos['photos']['photo'];
$count = count($p);
``` | I think you're looking for the [count()](http://php.net/manual/en/function.count.php) function.
Good luck! |
9,317,173 | I'm trying to find the number of occurrences of these ([0],[1],[2] etc) in an array but I can't seem to get it to work.
Here's what I'm trying at the moment to output the result:
```
$photos = (my entire array)
$p = $photos['photos']['photo'];
$max = (max($p));
echo $max;
```
And here's how my array looks under pri... | 2012/02/16 | [
"https://Stackoverflow.com/questions/9317173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938401/"
] | As @Ryan mentioned, you need to use the [`count()`](http://php.net/manual/en/function.count.php) function. This is how you would use it in your example:
```
$photos = (my entire array)
$p = $photos['photos']['photo'];
$count = count($p);
``` | ```
$key = array_search('search_word', $photos);
``` |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | You can do what you want, but don't do it, because it's not typesafe. Best pass a vector of `T` or a pair of iterators containing those values.
```
template < typename T, uint C >
Vector< T, C >::Vector(int N, ... )
{
assert(N < C && "Overflow!");
va_list arg_list;
va_start(arg_list, N);
for(uint i = ... | The problem with variable arguments in constructors is :
* you need the cdecl calling convention (or another one that can handle varargs)
* you cant define cdecl for a constructor (in MSVS)
So the "correct" code (MS) could be :
```
template < typename T, uint C > __cdecl Vector< T, C >::Vector( T, ... )
```
but th... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | Alas, right now there's no good way to do this. Most of the Boost packages that need to do something similar use macro tricks to define things like this:
```
template < typename T >
Vector< T >::Vector( T )
{ ... }
template < typename T, uint C >
Vector< T, C >::Vector( T t, C c1 )
{ ... }
template < typename T, uin... | `std::tr1::array` (which looks similar to yours) does not define a constructor, and can be initialized as an aggregate (?)
```
std::tr1::array<int, 10> arr = {{ 1, 2, 3, 4, 5, 6 }};
```
Also you could check out [Boost.Assignment](http://www.boost.org/doc/libs/1_36_0/libs/assign/doc/index.html) library.
For example ... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | You can do what you want, but don't do it, because it's not typesafe. Best pass a vector of `T` or a pair of iterators containing those values.
```
template < typename T, uint C >
Vector< T, C >::Vector(int N, ... )
{
assert(N < C && "Overflow!");
va_list arg_list;
va_start(arg_list, N);
for(uint i = ... | In C++0x (really should be called C++1x), you can use template varargs to achieve what you want in a typesafe fashion (and you won't even need to specify the number of arguments!). However, in the current version of C++ (ISO C++ 1998 with 2003 amendments), there is no way to accomplish what you want. You can either hol... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | This code looks dangerous and I think your analysis on why it isn't working is spot on, there's no way for the compiler to know that when calling:
```
Vector< double, 3 >( 1, 1, 1 )
```
the ones should be passed as doubles.
I would change the constructor to something like:
```
Vector< T, C >::Vector(const T(&data)... | In C++0x (really should be called C++1x), you can use template varargs to achieve what you want in a typesafe fashion (and you won't even need to specify the number of arguments!). However, in the current version of C++ (ISO C++ 1998 with 2003 amendments), there is no way to accomplish what you want. You can either hol... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | Alas, right now there's no good way to do this. Most of the Boost packages that need to do something similar use macro tricks to define things like this:
```
template < typename T >
Vector< T >::Vector( T )
{ ... }
template < typename T, uint C >
Vector< T, C >::Vector( T t, C c1 )
{ ... }
template < typename T, uin... | The problem with variable arguments in constructors is :
* you need the cdecl calling convention (or another one that can handle varargs)
* you cant define cdecl for a constructor (in MSVS)
So the "correct" code (MS) could be :
```
template < typename T, uint C > __cdecl Vector< T, C >::Vector( T, ... )
```
but th... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | You can do what you want, but don't do it, because it's not typesafe. Best pass a vector of `T` or a pair of iterators containing those values.
```
template < typename T, uint C >
Vector< T, C >::Vector(int N, ... )
{
assert(N < C && "Overflow!");
va_list arg_list;
va_start(arg_list, N);
for(uint i = ... | Does TypeList fit your needs?
* [Generic Programming:Typelists and Applications](http://www.drdobbs.com/cpp/184403813)
* [Loki C++ Library](http://en.wikipedia.org/wiki/Loki_(C%2B%2B))
* [Tiny Template Library: implementing typelist](http://www.codeproject.com/KB/cpp/TTLTyplist.aspx) |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | Alas, right now there's no good way to do this. Most of the Boost packages that need to do something similar use macro tricks to define things like this:
```
template < typename T >
Vector< T >::Vector( T )
{ ... }
template < typename T, uint C >
Vector< T, C >::Vector( T t, C c1 )
{ ... }
template < typename T, uin... | Does TypeList fit your needs?
* [Generic Programming:Typelists and Applications](http://www.drdobbs.com/cpp/184403813)
* [Loki C++ Library](http://en.wikipedia.org/wiki/Loki_(C%2B%2B))
* [Tiny Template Library: implementing typelist](http://www.codeproject.com/KB/cpp/TTLTyplist.aspx) |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | This code looks dangerous and I think your analysis on why it isn't working is spot on, there's no way for the compiler to know that when calling:
```
Vector< double, 3 >( 1, 1, 1 )
```
the ones should be passed as doubles.
I would change the constructor to something like:
```
Vector< T, C >::Vector(const T(&data)... | Does TypeList fit your needs?
* [Generic Programming:Typelists and Applications](http://www.drdobbs.com/cpp/184403813)
* [Loki C++ Library](http://en.wikipedia.org/wiki/Loki_(C%2B%2B))
* [Tiny Template Library: implementing typelist](http://www.codeproject.com/KB/cpp/TTLTyplist.aspx) |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | This code looks dangerous and I think your analysis on why it isn't working is spot on, there's no way for the compiler to know that when calling:
```
Vector< double, 3 >( 1, 1, 1 )
```
the ones should be passed as doubles.
I would change the constructor to something like:
```
Vector< T, C >::Vector(const T(&data)... | The problem with variable arguments in constructors is :
* you need the cdecl calling convention (or another one that can handle varargs)
* you cant define cdecl for a constructor (in MSVS)
So the "correct" code (MS) could be :
```
template < typename T, uint C > __cdecl Vector< T, C >::Vector( T, ... )
```
but th... |
2,627,228 | I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objective c or c# preferred.
Thanks | 2010/04/13 | [
"https://Stackoverflow.com/questions/2627228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315146/"
] | Alas, right now there's no good way to do this. Most of the Boost packages that need to do something similar use macro tricks to define things like this:
```
template < typename T >
Vector< T >::Vector( T )
{ ... }
template < typename T, uint C >
Vector< T, C >::Vector( T t, C c1 )
{ ... }
template < typename T, uin... | In C++0x (really should be called C++1x), you can use template varargs to achieve what you want in a typesafe fashion (and you won't even need to specify the number of arguments!). However, in the current version of C++ (ISO C++ 1998 with 2003 amendments), there is no way to accomplish what you want. You can either hol... |
9,017 | I want to buy a [radio antenna](http://rads.stackoverflow.com/amzn/click/B00DHHOZBI) for my stereo in order to pick up a few farther-away stations clearly. The outputs from the antennae that I'm seeing are to coax cables, and the input to my stereo has 75 ohm and 300 ohm connectors. What sort of adapter do I need to ge... | 2017/08/08 | [
"https://ham.stackexchange.com/questions/9017",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/10152/"
] | So what you have is binding posts (I assume) with a specified 75 Ω input. That's unusual, but let's run with it.
First of all, you *can* use a 75-300 Ω “matching transformer” that has the right ends, and it will probably work just fine (reception does not care very much about impedance mismatches), but it's not the wa... | The 75 ohm connector on your receiver is designed for coaxial connections. The 300 ohm connector is for an antenna that uses a flat, two wire cable called twin lead.
You may need an adapter of some type to convert the connector that is on the end of the coaxial cable coming from the antenna to the type of connector on... |
9,017 | I want to buy a [radio antenna](http://rads.stackoverflow.com/amzn/click/B00DHHOZBI) for my stereo in order to pick up a few farther-away stations clearly. The outputs from the antennae that I'm seeing are to coax cables, and the input to my stereo has 75 ohm and 300 ohm connectors. What sort of adapter do I need to ge... | 2017/08/08 | [
"https://ham.stackexchange.com/questions/9017",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/10152/"
] | The 75 ohm connector on your receiver is designed for coaxial connections. The 300 ohm connector is for an antenna that uses a flat, two wire cable called twin lead.
You may need an adapter of some type to convert the connector that is on the end of the coaxial cable coming from the antenna to the type of connector on... | Just make sure if you use a 300 ohm adapter you strap it across the correct terminals.
if your not worried about poking your finger save your $5 and strip the coax, twist up the shield and lace it under the ground post then bend the center conductor like a J and hook it under the post directly to the right of "FM ANT.... |
9,017 | I want to buy a [radio antenna](http://rads.stackoverflow.com/amzn/click/B00DHHOZBI) for my stereo in order to pick up a few farther-away stations clearly. The outputs from the antennae that I'm seeing are to coax cables, and the input to my stereo has 75 ohm and 300 ohm connectors. What sort of adapter do I need to ge... | 2017/08/08 | [
"https://ham.stackexchange.com/questions/9017",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/10152/"
] | So what you have is binding posts (I assume) with a specified 75 Ω input. That's unusual, but let's run with it.
First of all, you *can* use a 75-300 Ω “matching transformer” that has the right ends, and it will probably work just fine (reception does not care very much about impedance mismatches), but it's not the wa... | Just make sure if you use a 300 ohm adapter you strap it across the correct terminals.
if your not worried about poking your finger save your $5 and strip the coax, twist up the shield and lace it under the ground post then bend the center conductor like a J and hook it under the post directly to the right of "FM ANT.... |
21,602,024 | This question was answered more or less [here](https://stackoverflow.com/questions/14754545/django-override-admin-template) but it didn't work to me and as far I can see more people have the same problem.
In my settings.py I have this lines:
```
#TEMPLATE_DIRS = [os.path.join(BASE_DIR,'..', 'templates'),]
TEMPLATE_... | 2014/02/06 | [
"https://Stackoverflow.com/questions/21602024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3243591/"
] | If you have the following project layout:
```
manage.py
myproject/
settings.py
urls.py
wsgi.py
templates/
admin/
app1/
app2/
```
Then you can dynamically set your template directory by putting the following in your `settings.py`:
```
...
SETTINGS_PATH = os... | Considering the second part of your question and according to [this](http://www.youtube.com/watch?v=bRnm8f6Wavk) the safest part for your templates is to create a `templates` dir under your projects main directory (e.g. `blog`).
As for the first part i am not sure. |
21,602,024 | This question was answered more or less [here](https://stackoverflow.com/questions/14754545/django-override-admin-template) but it didn't work to me and as far I can see more people have the same problem.
In my settings.py I have this lines:
```
#TEMPLATE_DIRS = [os.path.join(BASE_DIR,'..', 'templates'),]
TEMPLATE_... | 2014/02/06 | [
"https://Stackoverflow.com/questions/21602024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3243591/"
] | What are you trying to do with this paramater ".." in the commented line?
if it is means parent directory you can use `os.path.dirname(BASE_DIR)`
Second part:
It depends you or team work with; i love to keep templates directory in every app's directory (and if you do like this you don't need to define `TEMPLATE_DIRS... | Considering the second part of your question and according to [this](http://www.youtube.com/watch?v=bRnm8f6Wavk) the safest part for your templates is to create a `templates` dir under your projects main directory (e.g. `blog`).
As for the first part i am not sure. |
21,602,024 | This question was answered more or less [here](https://stackoverflow.com/questions/14754545/django-override-admin-template) but it didn't work to me and as far I can see more people have the same problem.
In my settings.py I have this lines:
```
#TEMPLATE_DIRS = [os.path.join(BASE_DIR,'..', 'templates'),]
TEMPLATE_... | 2014/02/06 | [
"https://Stackoverflow.com/questions/21602024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3243591/"
] | If you have the following project layout:
```
manage.py
myproject/
settings.py
urls.py
wsgi.py
templates/
admin/
app1/
app2/
```
Then you can dynamically set your template directory by putting the following in your `settings.py`:
```
...
SETTINGS_PATH = os... | What are you trying to do with this paramater ".." in the commented line?
if it is means parent directory you can use `os.path.dirname(BASE_DIR)`
Second part:
It depends you or team work with; i love to keep templates directory in every app's directory (and if you do like this you don't need to define `TEMPLATE_DIRS... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | Try the following regex string instead. Your test was probably done in a case-sensitive manner. I have added the lowercase alphas as well as a proper string beginning placeholder.
```
String regex = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
This works too:
```
String regex = "\... | In line with billjamesdev answer, here is another approach to validate an URL without using a RegEx:
From [Apache Commons Validator](https://commons.apache.org/proper/commons-validator/) lib, look at class [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | Try the following regex string instead. Your test was probably done in a case-sensitive manner. I have added the lowercase alphas as well as a proper string beginning placeholder.
```
String regex = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
This works too:
```
String regex = "\... | When using regular expressions from RegexBuddy's library, make sure to use the same matching modes in your own code as the regex from the library. If you generate a source code snippet on the Use tab, RegexBuddy will automatically set the correct matching options in the source code snippet. If you copy/paste the regex,... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | Try the following regex string instead. Your test was probably done in a case-sensitive manner. I have added the lowercase alphas as well as a proper string beginning placeholder.
```
String regex = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
This works too:
```
String regex = "\... | ```
((http?|https|ftp|file)://)?((W|w){3}.)?[a-zA-Z0-9]+\.[a-zA-Z]+
```
check here:- <https://www.freeformatter.com/java-regex-tester.html#ad-output>
It sorts out theses entries correctly
* google.com
* www.google.com
* wwwgooglecom
* ft.
* Www.google.com
* .ft
* <https://www.google.com>
* https://
* <https://www>.... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | The problem with all suggested approaches: all RegEx is **validating**
All RegEx -based code is over-engineered: it will find only valid URLs! As a sample, it will ignore anything starting with "http://" and having non-ASCII characters inside.
Even more: I have encountered 1-2-seconds processing times (single-threade... | When using regular expressions from RegexBuddy's library, make sure to use the same matching modes in your own code as the regex from the library. If you generate a source code snippet on the Use tab, RegexBuddy will automatically set the correct matching options in the source code snippet. If you copy/paste the regex,... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | Try the following regex string instead. Your test was probably done in a case-sensitive manner. I have added the lowercase alphas as well as a proper string beginning placeholder.
```
String regex = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
This works too:
```
String regex = "\... | This works too:
```
String regex = "\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
Note:
```
String regex = "<\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]>"; // matches <http://google.com>
String regex = "<^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | This works too:
```
String regex = "\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
Note:
```
String regex = "<\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]>"; // matches <http://google.com>
String regex = "<^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!... | Here is a proposal of an URL parser regex that recognizes :
* Protocol
* Host
* Port
* Path (Document/folder)
* Get parameters
```
^(?>(?<protocol>[[:alpha:]]+(?>\:[[:alpha:]]+)*)\:\/\/)?(?<host>(?>[[:alnum:]]|[-_.])+)(?>\:(?<port>[[:digit:]]+))?(?<path>\/(?>[[:alnum:]]|[-_.\/])*)?(?>\?(?<request>(?>[[:alnum:]]+=[[:a... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | Try the following regex string instead. Your test was probably done in a case-sensitive manner. I have added the lowercase alphas as well as a proper string beginning placeholder.
```
String regex = "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
This works too:
```
String regex = "\... | The best way to do it now is:
```
android.util.Patterns.WEB_URL.matcher(linkUrl).matches();
```
EDIT: Code of `Patterns` from <https://github.com/android/platform_frameworks_base/blob/master/core/java/android/util/Patterns.java> :
```
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | In line with billjamesdev answer, here is another approach to validate an URL without using a RegEx:
From [Apache Commons Validator](https://commons.apache.org/proper/commons-validator/) lib, look at class [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/... | First, an regex example:
```
regex = “((http|https)://)(www.)?”
+ “[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]”
+ “{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)”
```
\*The URL must start with either http or https and
\*then followed by :// and
\*then it must contain www. and
\*then followed by subdomain of length (2, 256) ... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | This works too:
```
String regex = "\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
```
Note:
```
String regex = "<\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]>"; // matches <http://google.com>
String regex = "<^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!... | First, an regex example:
```
regex = “((http|https)://)(www.)?”
+ “[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]”
+ “{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)”
```
\*The URL must start with either http or https and
\*then followed by :// and
\*then it must contain www. and
\*then followed by subdomain of length (2, 256) ... |
163,360 | I use RegexBuddy while working with regular expressions. From its library I copied the regular expression to match URLs. I tested successfully within RegexBuddy. However, when I copied it as Java `String` flavor and pasted it into Java code, it does not work. The following class prints `false`:
```
public class Regex... | 2008/10/02 | [
"https://Stackoverflow.com/questions/163360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] | The best way to do it now is:
```
android.util.Patterns.WEB_URL.matcher(linkUrl).matches();
```
EDIT: Code of `Patterns` from <https://github.com/android/platform_frameworks_base/blob/master/core/java/android/util/Patterns.java> :
```
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the... | When using regular expressions from RegexBuddy's library, make sure to use the same matching modes in your own code as the regex from the library. If you generate a source code snippet on the Use tab, RegexBuddy will automatically set the correct matching options in the source code snippet. If you copy/paste the regex,... |
25,618,342 | I have some fields in Model, which i want to fill in controller (not give the user to input some data..). for example: curentUserId, or current date...
I found 2 solutions.
```
echo $this->Form->input('delivered_by', array('type' => 'hidden', 'value'=> $_SESSION['id']));
```
* make field hidden in view and give it a... | 2014/09/02 | [
"https://Stackoverflow.com/questions/25618342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3281263/"
] | you aren't using post to edit it with post , you can edit it in the controller like that :
```
$this->data['Sample']['delivered_by'] = 77777;
``` | You don't need to send this data through POST. You already have it on the backend side.
You can implement such behaviors through callbacks on model when you don't have any outside dependency (like currentUserId).
When you have outside dependencies you should take your decisions on how best decouple it. |
25,618,342 | I have some fields in Model, which i want to fill in controller (not give the user to input some data..). for example: curentUserId, or current date...
I found 2 solutions.
```
echo $this->Form->input('delivered_by', array('type' => 'hidden', 'value'=> $_SESSION['id']));
```
* make field hidden in view and give it a... | 2014/09/02 | [
"https://Stackoverflow.com/questions/25618342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3281263/"
] | you aren't using post to edit it with post , you can edit it in the controller like that :
```
$this->data['Sample']['delivered_by'] = 77777;
``` | ```
$sampleData = $this->request->data['Sample'];
$sampleData['delivered_by'] = 7;
if ($this->Sample->save($sampleData))
{
$this->Session->setFlash(__('The sample has been saved.'));
//return $this->redirect(array('action' => 'index'));
}
else
{
$this->Session->setFlash(__('The sample could not be ... |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | right click on the page and go to `View Page Source` and check for this meta tag
```
<meta name="generator" content="WordPress 3.1.2" />
```
the content value defines your wordpress veersion | Sounds fun, heh.
Here are some good points:
1. <http://wordpress.org/support/topic/how-to-determine-version-of-wordpress>
>
> You can also view the source code of the blog, and often times, but not always, see the version there.
>
>
>
Not sure if you have to be logged in or not to get that. Give it a try. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | Wordpress blogs are typically configured to present the version in a `meta` header, like follows:
```
<meta name="generator" content="WordPress 3.0.5" />
```
Wordpress sites hosted at wordpress.com have:
```
<meta name="generator" content="WordPress.com" />
```
...and I don't see any version information in their... | Sounds fun, heh.
Here are some good points:
1. <http://wordpress.org/support/topic/how-to-determine-version-of-wordpress>
>
> You can also view the source code of the blog, and often times, but not always, see the version there.
>
>
>
Not sure if you have to be logged in or not to get that. Give it a try. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | [Blind-Elephant](http://blindelephant.sourceforge.net/) does web application fingerprinting. It can detect a version of of the webapp regardless of its version string. It can also go further and detect installed modules. | Sounds fun, heh.
Here are some good points:
1. <http://wordpress.org/support/topic/how-to-determine-version-of-wordpress>
>
> You can also view the source code of the blog, and often times, but not always, see the version there.
>
>
>
Not sure if you have to be logged in or not to get that. Give it a try. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | Wordpress blogs are typically configured to present the version in a `meta` header, like follows:
```
<meta name="generator" content="WordPress 3.0.5" />
```
Wordpress sites hosted at wordpress.com have:
```
<meta name="generator" content="WordPress.com" />
```
...and I don't see any version information in their... | right click on the page and go to `View Page Source` and check for this meta tag
```
<meta name="generator" content="WordPress 3.1.2" />
```
the content value defines your wordpress veersion |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | right click on the page and go to `View Page Source` and check for this meta tag
```
<meta name="generator" content="WordPress 3.1.2" />
```
the content value defines your wordpress veersion | This site will check to see if Wordpress is installed. It will also give you the version number:- [<http://www.isitwp.com/]>
I hope this helps. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | Wordpress blogs are typically configured to present the version in a `meta` header, like follows:
```
<meta name="generator" content="WordPress 3.0.5" />
```
Wordpress sites hosted at wordpress.com have:
```
<meta name="generator" content="WordPress.com" />
```
...and I don't see any version information in their... | [Blind-Elephant](http://blindelephant.sourceforge.net/) does web application fingerprinting. It can detect a version of of the webapp regardless of its version string. It can also go further and detect installed modules. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | Wordpress blogs are typically configured to present the version in a `meta` header, like follows:
```
<meta name="generator" content="WordPress 3.0.5" />
```
Wordpress sites hosted at wordpress.com have:
```
<meta name="generator" content="WordPress.com" />
```
...and I don't see any version information in their... | This site will check to see if Wordpress is installed. It will also give you the version number:- [<http://www.isitwp.com/]>
I hope this helps. |
6,061,281 | I'm developing a rather large XML Schema to integrate multiple disparate systems. Each system has messages that consist of multiple fields. I've written the schemas so that each field is represented as a type (either simple or complex), while the entire message is represented as an element with a sequence of multiple t... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6061281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191890/"
] | [Blind-Elephant](http://blindelephant.sourceforge.net/) does web application fingerprinting. It can detect a version of of the webapp regardless of its version string. It can also go further and detect installed modules. | This site will check to see if Wordpress is installed. It will also give you the version number:- [<http://www.isitwp.com/]>
I hope this helps. |
8,444,331 | I'm using java, json.simple.JSONObject. I have a json object inside which I have a json array. I want to add empty values in a given postion
```
{"rows_map":{"2":["test1a","2011-12-08 18:13:50.6"],"1":["test2","2011-12-07 11:51:11.237"]}
```
Suppose i want to add values at second position
```
{"rows_map":{"2":["tes... | 2011/12/09 | [
"https://Stackoverflow.com/questions/8444331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/557329/"
] | you can put the value by passing it's position for example
```
jsonarr.put(1,"");
```
check here for more <http://www.json.org/javadoc/org/json/JSONArray.html> | Just put the empty values into your array *before* you encode it! |
36,308,957 | I was trying to send an email from within my codeigniter project, and the command `echo $this->email->print_debugger();` kept returning the following:
>
> 220 smtp.gmail.com ESMTP q139sm4099547wmd.2 - gsmtp
>
> hello: 250-smtp.gmail.com at your service, [41.228.226.174]
> 250-SIZE 35882577
> 250-8BITMIME
> ... | 2016/03/30 | [
"https://Stackoverflow.com/questions/36308957",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4316573/"
] | Use `appearance` property to avoid propietary stylizing and then you are able to style it:
```
input[type=search]{
-moz-appearance: none;/* older firefox */
-webkit-appearance: none; /* safari, chrome, edge and ie mobile */
appearance: none; /* rest */
}
```
More info:
* <https://developer.mozilla.org/docs... | Ok so on the end I found a github forum: <https://github.com/h5bp/html5-boilerplate/issues/396>
Were they written that its a bug in Safari and I should add this piece of code to my styles:
```
input[type="search"] {
-webkit-appearance: textfield;
}
```
and it fixed it! |
9,928,864 | Let me start by saying im not 100% the way Im handling this is correct, but anyway..
I am loading HTML out of a file, into a string - and placing that string inside of a jquery object.
My HTML (example):
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transi... | 2012/03/29 | [
"https://Stackoverflow.com/questions/9928864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1301182/"
] | There may be a browser-specific effect here. The [jQuery docs](http://api.jquery.com/jQuery/#jQuery2) say
>
> When passing in complex HTML, some browsers may not generate a DOM
> that exactly replicates the HTML source provided. As mentioned, we use
> the browser's .innerHTML property to parse the passed HTML and i... | Reproduced the problem in a JSFiddle and found that you can actually select the link if you know its position in the array. So, given that is is a fixed HTML, you could use that to find the link. However, I couldn't use any selector to find it, which is weird...
<http://jsfiddle.net/66UjW/>
If you plan on using this,... |
190,218 | I'm working in a way to make hydrologic projects using QGIS and an Excel worksheet that I have. To do this, I want to extract some information of the lines, included in a vector layer, which represents a pipe section.
The information that I need to extract are:
* ID Number
* Length
* X, Y start and end coordinates
I... | 2016/04/19 | [
"https://gis.stackexchange.com/questions/190218",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/71581/"
] | Interesting question! I'm not aware of any other way of achieving what you want, but using PyQGIS.
Read the code below. It has some texts in it: `'lines'`, `'length'`, `'startX'`, `'startY'`, `'endX'`, `'endY'`. You can adjust those names in the script for it to work on your data. The first one is you layer name, wher... | I would put the data in a database (PostGIS) and extract the data to QGIS with a (probably materialized) view. |
190,218 | I'm working in a way to make hydrologic projects using QGIS and an Excel worksheet that I have. To do this, I want to extract some information of the lines, included in a vector layer, which represents a pipe section.
The information that I need to extract are:
* ID Number
* Length
* X, Y start and end coordinates
I... | 2016/04/19 | [
"https://gis.stackexchange.com/questions/190218",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/71581/"
] | **If you only need these fields inside QGIS**, you can use virtual fields. These allow using an expression (like `$length`) that depends on other values or the geometry.
Open the field calculator, add a new field with the name length, check the "Virtual Field" checkbox and enter `$length` as expression (or something e... | I would put the data in a database (PostGIS) and extract the data to QGIS with a (probably materialized) view. |
190,218 | I'm working in a way to make hydrologic projects using QGIS and an Excel worksheet that I have. To do this, I want to extract some information of the lines, included in a vector layer, which represents a pipe section.
The information that I need to extract are:
* ID Number
* Length
* X, Y start and end coordinates
I... | 2016/04/19 | [
"https://gis.stackexchange.com/questions/190218",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/71581/"
] | **For QGIS 3** go to the `Layers Properties` => `Attributes Form` => choose your field with geometry values (in example, `area`) => type `$area` in the `Defaults value` box and check `Apply default value on update`.
This also could be usefull: `$perimeter`, `$y`, `$x`, `$id`
[](... | I would put the data in a database (PostGIS) and extract the data to QGIS with a (probably materialized) view. |
53,876,177 | I've been struggling to figure out how to get a word, of unknown length, from a string, of unknown length, that I'm reading from a file. The words I want from the string are always separated by "." and/or "&" with the whole string being surrounded by quotes. EX: ".Word.Characters&Numeric&Letters.Typos&Mistypes." I know... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53876177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4820772/"
] | Use "ifconfig" in terminal of your Ubuntu to get the ip address.
HOST\_NAME : ip address of the database machine.
PORT: 3306. | Can you connect or login that mysql on computer B from computer A using terminal ? Did you grand privilege ,like this:
grant all privileges on userDB.\* to zs@localhost identified by '1234' |
53,876,177 | I've been struggling to figure out how to get a word, of unknown length, from a string, of unknown length, that I'm reading from a file. The words I want from the string are always separated by "." and/or "&" with the whole string being surrounded by quotes. EX: ".Word.Characters&Numeric&Letters.Typos&Mistypes." I know... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53876177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4820772/"
] | Use "ifconfig" in terminal of your Ubuntu to get the ip address.
HOST\_NAME : ip address of the database machine.
PORT: 3306. | I did this many times. Login mysql using cmd on computer A, grant privilege to computer B, then B can connect mysql on A. |
7,378,381 | After pressing button following function is called.
```
Task.Factory.StartNew(() =>
{
Parallel.For(0, cyclesCount, i => DoWork(i));
if (OnJobCompleted != null)
OnJobCompleted(this, EventArgs.Empty);
});
```
Further in code there is
```
void ladder_OnJobCompleted(object sender, Eve... | 2011/09/11 | [
"https://Stackoverflow.com/questions/7378381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/809009/"
] | Use the `Dispatcher`
```
txbDebug.Dispatcher.Invoke(new Action(() =>
{
txbDebug.Text = "completed";
}));
``` | I do not expect you to want to use the new [Async CTP](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=9983), but if you are curious how this would be done with the new `async` and `await` keywords proposed for C# 5 then consider the following example. It really does not get any more elegant than th... |
3,274 | I have studied German for the whole year last year. But I want to study other languages too.
I haven't mastered German yet, and I am seeking advice whether I should start learning a new language together with German.
My issue is that I know learning a language is not easy. Let's assume, in 3-4 years time, I can master... | 2018/01/03 | [
"https://languagelearning.stackexchange.com/questions/3274",
"https://languagelearning.stackexchange.com",
"https://languagelearning.stackexchange.com/users/4384/"
] | Some polyglots actually advocate that learning multiple new languages in parallel is better than learning one. [Valery Kurinskiy](https://ru.wikipedia.org/wiki/%D0%9A%D1%83%D1%80%D0%B8%D0%BD%D1%81%D0%BA%D0%B8%D0%B9,_%D0%92%D0%B0%D0%BB%D0%B5%D1%80%D0%B8%D0%B9_%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80%D0%BE%... | I have had this same issue where I've been forced to learn two languages, and I also switch between which one I focus on often. Finally, I have decided that I will focus on one very strongly for the next several months.
I have found that without making a firm decision about either I am adrift, but when I focus I'm abl... |
3,274 | I have studied German for the whole year last year. But I want to study other languages too.
I haven't mastered German yet, and I am seeking advice whether I should start learning a new language together with German.
My issue is that I know learning a language is not easy. Let's assume, in 3-4 years time, I can master... | 2018/01/03 | [
"https://languagelearning.stackexchange.com/questions/3274",
"https://languagelearning.stackexchange.com",
"https://languagelearning.stackexchange.com/users/4384/"
] | Some polyglots actually advocate that learning multiple new languages in parallel is better than learning one. [Valery Kurinskiy](https://ru.wikipedia.org/wiki/%D0%9A%D1%83%D1%80%D0%B8%D0%BD%D1%81%D0%BA%D0%B8%D0%B9,_%D0%92%D0%B0%D0%BB%D0%B5%D1%80%D0%B8%D0%B9_%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80%D0%BE%... | Learning how to learn a language is a skill in and of itself, so studying another language, even if you haven't mastered German, can have a positive effect on how well, efficient and fast your learning is.
Depending on the language family, there will be similarities in grammar and I've found that one concept which wa... |
3,274 | I have studied German for the whole year last year. But I want to study other languages too.
I haven't mastered German yet, and I am seeking advice whether I should start learning a new language together with German.
My issue is that I know learning a language is not easy. Let's assume, in 3-4 years time, I can master... | 2018/01/03 | [
"https://languagelearning.stackexchange.com/questions/3274",
"https://languagelearning.stackexchange.com",
"https://languagelearning.stackexchange.com/users/4384/"
] | In some countries, this is how many people learn foreign languages **at school**. This was the case when I was attending school in Belgium in the 1980s and early 1990s: we started with French in the fifth year of primary school, I added Latin in secondary school, English in the third year of secondary school, and Germa... | I have had this same issue where I've been forced to learn two languages, and I also switch between which one I focus on often. Finally, I have decided that I will focus on one very strongly for the next several months.
I have found that without making a firm decision about either I am adrift, but when I focus I'm abl... |
3,274 | I have studied German for the whole year last year. But I want to study other languages too.
I haven't mastered German yet, and I am seeking advice whether I should start learning a new language together with German.
My issue is that I know learning a language is not easy. Let's assume, in 3-4 years time, I can master... | 2018/01/03 | [
"https://languagelearning.stackexchange.com/questions/3274",
"https://languagelearning.stackexchange.com",
"https://languagelearning.stackexchange.com/users/4384/"
] | In some countries, this is how many people learn foreign languages **at school**. This was the case when I was attending school in Belgium in the 1980s and early 1990s: we started with French in the fifth year of primary school, I added Latin in secondary school, English in the third year of secondary school, and Germa... | Learning how to learn a language is a skill in and of itself, so studying another language, even if you haven't mastered German, can have a positive effect on how well, efficient and fast your learning is.
Depending on the language family, there will be similarities in grammar and I've found that one concept which wa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.