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
189,362
I have written an SP to do the below: i have a table called T1: AS below: ``` CREATE TABLE [dbo].[T1]( [ID] [int] IDENTITY(1,1) NOT NULL, [QNo] [nvarchar](50) NULL DEFAULT ('0'), PRIMARY KEY CLUSTERED ``` T1 stores a number value in the Qno Column. AS so: ID: 1 Qno: 0 When i insert into table QUDF, the la...
2017/10/26
[ "https://dba.stackexchange.com/questions/189362", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/137369/" ]
Based on the limited information in your question, I made a few changes to your stored procedure. If I've misunderstood something, let me know. This code was not fully tested on my side. ``` ALTER PROCEDURE [dbo].[SP1_Test] @Opp_Id VARCHAR(24) ,@Opp_Number INT -- Add the parameters for the stored procedure her...
Here is my answer: Works 100% with normal number values. ``` select @Opp_id = client_id from AMGR_User_Fields_Tbl; Select @OppNo = Contact_number from AMGR_User_Fields_Tbl SELECT @NewQno = Convert(VARCHAR(750), Convert(INT, Qno) + 1) FROM T1 WHERE ID = 1; BEGIN Declare @Opp_id varchar (24) Declare @O...
67,576,912
I'm really struggling to create css layout like this: **Top row:** fixed size: Ex: 50px; **Content:** the biggest square the current width can fit. So width = height for this one. It should respect the bottom row min-height. **Bottom row:** take all remaining space available, and with min-height. Ex: 50px. No scrol...
2021/05/17
[ "https://Stackoverflow.com/questions/67576912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22693/" ]
You can use padding to get the aspect ratio: ```css body { margin: 0px; } .shell { background-color: #000000; height: 100vh; max-width: calc(100vh - 100px); overflow: hidden; margin-left: auto; margin-right: auto; } .header { background-color: blue; height: 50px; } .square { width: 100%; paddin...
I think your question was already solved here: [Make a div fill the height of the remaining screen space](https://stackoverflow.com/questions/90178/make-a-div-fill-the-height-of-the-remaining-screen-space) Mixed with your try: ```css body { margin: 0; } .box { display: flex; flex-flow: column; background-col...
67,576,912
I'm really struggling to create css layout like this: **Top row:** fixed size: Ex: 50px; **Content:** the biggest square the current width can fit. So width = height for this one. It should respect the bottom row min-height. **Bottom row:** take all remaining space available, and with min-height. Ex: 50px. No scrol...
2021/05/17
[ "https://Stackoverflow.com/questions/67576912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22693/" ]
You can use padding to get the aspect ratio: ```css body { margin: 0px; } .shell { background-color: #000000; height: 100vh; max-width: calc(100vh - 100px); overflow: hidden; margin-left: auto; margin-right: auto; } .header { background-color: blue; height: 50px; } .square { width: 100%; paddin...
> > Content: the biggest square the current width can fit. So width = > height for this one. It should respect the bottom row min-height. > > > If you want the biggest `square`, the `footer` `height` will be fixed and it will be equal to `min-height` always (and it should be), so it doesn't matter if you will set ...
300,514
I receive a "could not sign in" error after upgrade to iOS 11.0 Now I can't access my iPhone. What should I do? Since I have the same problem described above, I am going to describe the steps which I take before the message "could not sign it" appears. 1. I see the screen "Update completed. Your iPhone was updated su...
2017/09/30
[ "https://apple.stackexchange.com/questions/300514", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/257812/" ]
High Sierra comes with a new security feature: Secure Kernel Extension Loading, which blocks kernel extension loading. The implementation appears to be [questionable](https://www.synack.com/2017/09/08/high-sierras-secure-kernel-extension-loading-is-broken/). To allow the loading of some non-Apple kernel extension you ...
The solution worked for me on High Sierra. Trick was to do one install run that will definitely fail, but give you the prompt on the General Security tab to Allow Oracle Extensions. Click the Allow option. Then re-run the install again, should result in a successful install.
267,122
I've downloaded the Java RESTClient tool, which is a Swing-based GUI app. Unfortunately, there is no .exe to launch like with other apps (at least those I've written in .NET). Instead, I have to launch this command every time: ``` java -jar restclient-2.2-jar-with-dependencies.jar ``` Is there a way in which I can...
2011/04/05
[ "https://superuser.com/questions/267122", "https://superuser.com", "https://superuser.com/users/11718/" ]
You don't say which environment you are in. The automation varies accordingly. * For graphic environments create a new application launcher. You will need to set the desired directory and specify the command to use. * For command line environments put a script in on your path that runs the command.
Put the command in a file named restclient.bat.
267,122
I've downloaded the Java RESTClient tool, which is a Swing-based GUI app. Unfortunately, there is no .exe to launch like with other apps (at least those I've written in .NET). Instead, I have to launch this command every time: ``` java -jar restclient-2.2-jar-with-dependencies.jar ``` Is there a way in which I can...
2011/04/05
[ "https://superuser.com/questions/267122", "https://superuser.com", "https://superuser.com/users/11718/" ]
Put the command in a file named restclient.bat.
If you're in a windows environment with a normal Java installation, you should be able to just create a shortcut to your `restclient-2.2-jar-with-dependencies.jar` file, and let the shell association for .jar handle the rest.
267,122
I've downloaded the Java RESTClient tool, which is a Swing-based GUI app. Unfortunately, there is no .exe to launch like with other apps (at least those I've written in .NET). Instead, I have to launch this command every time: ``` java -jar restclient-2.2-jar-with-dependencies.jar ``` Is there a way in which I can...
2011/04/05
[ "https://superuser.com/questions/267122", "https://superuser.com", "https://superuser.com/users/11718/" ]
Put the command in a file named restclient.bat.
You could use java webstart, look up the jnlp syntax. Its great if you want to launch from a web page for instance.
267,122
I've downloaded the Java RESTClient tool, which is a Swing-based GUI app. Unfortunately, there is no .exe to launch like with other apps (at least those I've written in .NET). Instead, I have to launch this command every time: ``` java -jar restclient-2.2-jar-with-dependencies.jar ``` Is there a way in which I can...
2011/04/05
[ "https://superuser.com/questions/267122", "https://superuser.com", "https://superuser.com/users/11718/" ]
You don't say which environment you are in. The automation varies accordingly. * For graphic environments create a new application launcher. You will need to set the desired directory and specify the command to use. * For command line environments put a script in on your path that runs the command.
If you're in a windows environment with a normal Java installation, you should be able to just create a shortcut to your `restclient-2.2-jar-with-dependencies.jar` file, and let the shell association for .jar handle the rest.
267,122
I've downloaded the Java RESTClient tool, which is a Swing-based GUI app. Unfortunately, there is no .exe to launch like with other apps (at least those I've written in .NET). Instead, I have to launch this command every time: ``` java -jar restclient-2.2-jar-with-dependencies.jar ``` Is there a way in which I can...
2011/04/05
[ "https://superuser.com/questions/267122", "https://superuser.com", "https://superuser.com/users/11718/" ]
You don't say which environment you are in. The automation varies accordingly. * For graphic environments create a new application launcher. You will need to set the desired directory and specify the command to use. * For command line environments put a script in on your path that runs the command.
You could use java webstart, look up the jnlp syntax. Its great if you want to launch from a web page for instance.
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Depending on your access to the server. I suggest using straight `mysql` and `mysqldump` commands. That's all phpMyAdmin is doing under the hood.
There is a [PHP class](http://www.phpclasses.org/package/3498-PHP-Dump-a-MySQL-database-in-a-backup-file.html) for that, I didn't test it yet. From it's description: ``` This class can be used to backup a MySQL database. It queries a database and generates a list of SQL statements that can be used later to restore t...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Ok, after a lot of research, googling, and reading through everyone's comments herein, I produced the following script -- which I now run from the browser address bar. Tested it and it does exactly what I needed it to do. Thanks for everyone's help. ``` <?php function duplicateTables($sourceDB=NULL, $targetDB=NULL) { ...
Depending on your access to the server. I suggest using straight `mysql` and `mysqldump` commands. That's all phpMyAdmin is doing under the hood.
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
There is a [PHP class](http://www.phpclasses.org/package/3498-PHP-Dump-a-MySQL-database-in-a-backup-file.html) for that, I didn't test it yet. From it's description: ``` This class can be used to backup a MySQL database. It queries a database and generates a list of SQL statements that can be used later to restore t...
Hi here you can use simple bash script to backup whole database. ``` ######### SNIP BEGIN ########## ## Copy from here ############# #!/bin/bash # to use the script do following: # sh backup.sh DBNAME | sh # where DBNAME is database name from alma016 # ex Backuping mydb data: # sh backup.sh mydb hostname use...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Reference material for Mysqldump. <http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html>
If you're using linux or mac, here is a single line to clone a database. ``` mysqldump -uUSER -pPASSWORD -hsample.host --single-transaction --quick test | mysql -uUSER -pPASSWORD -hqa.sample.host --database=test ``` The 'advantage' here is that it will lock the database while its making a copy. That means you end up...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Ok, after a lot of research, googling, and reading through everyone's comments herein, I produced the following script -- which I now run from the browser address bar. Tested it and it does exactly what I needed it to do. Thanks for everyone's help. ``` <?php function duplicateTables($sourceDB=NULL, $targetDB=NULL) { ...
If you're using linux or mac, here is a single line to clone a database. ``` mysqldump -uUSER -pPASSWORD -hsample.host --single-transaction --quick test | mysql -uUSER -pPASSWORD -hqa.sample.host --database=test ``` The 'advantage' here is that it will lock the database while its making a copy. That means you end up...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
There is a [PHP class](http://www.phpclasses.org/package/3498-PHP-Dump-a-MySQL-database-in-a-backup-file.html) for that, I didn't test it yet. From it's description: ``` This class can be used to backup a MySQL database. It queries a database and generates a list of SQL statements that can be used later to restore t...
If you're using linux or mac, here is a single line to clone a database. ``` mysqldump -uUSER -pPASSWORD -hsample.host --single-transaction --quick test | mysql -uUSER -pPASSWORD -hqa.sample.host --database=test ``` The 'advantage' here is that it will lock the database while its making a copy. That means you end up...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Reference material for Mysqldump. <http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html>
Well in script form, you could try using [`CREATE TABLE ... LIKE`](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) syntax, iterating through a list of tables, which you can get from [`SHOW TABLES`](http://dev.mysql.com/doc/refman/5.0/en/show-tables.html). Only problem is that does not recreate indexes or fo...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Depending on your access to the server. I suggest using straight `mysql` and `mysqldump` commands. That's all phpMyAdmin is doing under the hood.
Well in script form, you could try using [`CREATE TABLE ... LIKE`](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) syntax, iterating through a list of tables, which you can get from [`SHOW TABLES`](http://dev.mysql.com/doc/refman/5.0/en/show-tables.html). Only problem is that does not recreate indexes or fo...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
There is a [PHP class](http://www.phpclasses.org/package/3498-PHP-Dump-a-MySQL-database-in-a-backup-file.html) for that, I didn't test it yet. From it's description: ``` This class can be used to backup a MySQL database. It queries a database and generates a list of SQL statements that can be used later to restore t...
Well in script form, you could try using [`CREATE TABLE ... LIKE`](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) syntax, iterating through a list of tables, which you can get from [`SHOW TABLES`](http://dev.mysql.com/doc/refman/5.0/en/show-tables.html). Only problem is that does not recreate indexes or fo...
5,997,101
I have a LIVE version of a MySQL database with 5 tables and a TEST version. I am continually using phpMyAdmin to make a copy of each table in the LIVE version to the TEST version. Does anyone have the mysql query statement to make a complete copy of a database? The query string would need to account for structure, da...
2011/05/13
[ "https://Stackoverflow.com/questions/5997101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/213926/" ]
Ok, after a lot of research, googling, and reading through everyone's comments herein, I produced the following script -- which I now run from the browser address bar. Tested it and it does exactly what I needed it to do. Thanks for everyone's help. ``` <?php function duplicateTables($sourceDB=NULL, $targetDB=NULL) { ...
Well in script form, you could try using [`CREATE TABLE ... LIKE`](http://dev.mysql.com/doc/refman/5.1/en/create-table.html) syntax, iterating through a list of tables, which you can get from [`SHOW TABLES`](http://dev.mysql.com/doc/refman/5.0/en/show-tables.html). Only problem is that does not recreate indexes or fo...
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
I have used the following command: ``` AT+CCLK? ``` which returns the date and time, like: ``` +CCLK: "00/01/12,05:44:53+00" ``` successfully in products using three different cell modules: Enfora, Telit, and Sierra. The fact that it uses a + character after the AT implies it is a common (as opposed to proprieta...
first send this two command AT+CLTS=1;&W AT+CFUN=1,1 and than AT+CLTS? check whether you get this reply +clts: 1 and than send this command AT+CCLK?
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
PuTTY: ``` AT+COPS=2 OK AT+CTZU=1 OK AT+COPS=0 OK +CTZU: "15/05/06,17:25:42",-12,0 ``` Works perfectly, after that you have to parse the result and place in clk because this does **not** happen automatically. (at least in my Cinterion)
I've successfully used NITZ during initialisation, and CCLK when I want to read the internal RTC. HOWEVER it can take a minute or two before the modem RTC is set from the network. It's worth maintaining a flag to indicate if the time is indeed valid.
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
First of all, NITZ is poorly supported in many networks (can you say COST-CUTTING). I would not rely on it at all as 1 in 10 networks use it, especially in far flung places. Secondly +CCLK command is for the internal RTC of the modem. Some modems have facilities to update this clock from the network. Relying on this i...
Use AT+CIPGSMLOC command. It works well in SIMCOM modules. This command needs the GPRS service attached before you use it. So first attach the GPRS service using appropriate command sequence then use this command to get date and time from GSM network. For attaching GPRS service: `CMD:AT+CGATT=1 CMD:AT+SAPBR=3,1,"Con...
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
Use AT+CIPGSMLOC command. It works well in SIMCOM modules. This command needs the GPRS service attached before you use it. So first attach the GPRS service using appropriate command sequence then use this command to get date and time from GSM network. For attaching GPRS service: `CMD:AT+CGATT=1 CMD:AT+SAPBR=3,1,"Con...
I developed a firmware for a U-Blox LTE. There I used the AT+CCLK? to obtain the current local time from the modem. It gives a time in following format. Not that it's a synchronized command. ``` +CCLK: "00/01/01,05:44:53+00" (might get unsynchronized time if the modem time is not sync with the system time) ``` So ...
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
I have used the following command: ``` AT+CCLK? ``` which returns the date and time, like: ``` +CCLK: "00/01/12,05:44:53+00" ``` successfully in products using three different cell modules: Enfora, Telit, and Sierra. The fact that it uses a + character after the AT implies it is a common (as opposed to proprieta...
NITZ as pointed out by RedGrittyBrick is the answer. However, this is a message that's sent by the network only, usually on joining the network. Some carriers send it, some don't. There's no standard way to request it.
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
AT+CLTS=1 ( Get local time stamp ) AT&W ( Save configuration ) Turn off modem and turn on modem(reboot to get local time from network) Next time when modem boots up you should be able to get local time by network and can be read by sending AT+CCLK? This worked for me i m using SIM800 GSM modem read AT command descr...
NITZ as pointed out by RedGrittyBrick is the answer. However, this is a message that's sent by the network only, usually on joining the network. Some carriers send it, some don't. There's no standard way to request it.
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
I have used the following command: ``` AT+CCLK? ``` which returns the date and time, like: ``` +CCLK: "00/01/12,05:44:53+00" ``` successfully in products using three different cell modules: Enfora, Telit, and Sierra. The fact that it uses a + character after the AT implies it is a common (as opposed to proprieta...
PuTTY: ``` AT+COPS=2 OK AT+CTZU=1 OK AT+COPS=0 OK +CTZU: "15/05/06,17:25:42",-12,0 ``` Works perfectly, after that you have to parse the result and place in clk because this does **not** happen automatically. (at least in my Cinterion)
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
PuTTY: ``` AT+COPS=2 OK AT+CTZU=1 OK AT+COPS=0 OK +CTZU: "15/05/06,17:25:42",-12,0 ``` Works perfectly, after that you have to parse the result and place in clk because this does **not** happen automatically. (at least in my Cinterion)
first send this two command AT+CLTS=1;&W AT+CFUN=1,1 and than AT+CLTS? check whether you get this reply +clts: 1 and than send this command AT+CCLK?
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
AT+CLTS=1 ( Get local time stamp ) AT&W ( Save configuration ) Turn off modem and turn on modem(reboot to get local time from network) Next time when modem boots up you should be able to get local time by network and can be read by sending AT+CCLK? This worked for me i m using SIM800 GSM modem read AT command descr...
Use AT+CIPGSMLOC command. It works well in SIMCOM modules. This command needs the GPRS service attached before you use it. So first attach the GPRS service using appropriate command sequence then use this command to get date and time from GSM network. For attaching GPRS service: `CMD:AT+CGATT=1 CMD:AT+SAPBR=3,1,"Con...
82,090
I am using [SIM800E](http://www.reyax.com/Module/GSM/SIM800E/SIM800E_Hardware_Design_V1.00.pdf). I want to know what AT command should be sent to the modem to get time? This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT comman...
2013/09/12
[ "https://electronics.stackexchange.com/questions/82090", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10724/" ]
AT+CLTS=1 ( Get local time stamp ) AT&W ( Save configuration ) Turn off modem and turn on modem(reboot to get local time from network) Next time when modem boots up you should be able to get local time by network and can be read by sending AT+CCLK? This worked for me i m using SIM800 GSM modem read AT command descr...
I developed a firmware for a U-Blox LTE. There I used the AT+CCLK? to obtain the current local time from the modem. It gives a time in following format. Not that it's a synchronized command. ``` +CCLK: "00/01/01,05:44:53+00" (might get unsynchronized time if the modem time is not sync with the system time) ``` So ...
105,705
I started a HDHP medical plan and HSA account on 1/1/2019. We then had our first child on 1/8/2019. The OB/GYN office took a prepayment for the delivery services before 1/1/2019. So the question is: can I claim the part of the bill that I prepaid as an HSA distribution since the *service* date was after the creation of...
2019/02/24
[ "https://money.stackexchange.com/questions/105705", "https://money.stackexchange.com", "https://money.stackexchange.com/users/82822/" ]
You can take a distribution from an HSA whenever you decide - as the previous answer said "it is the responsibility of the beneficiary to follow the rules". BUT if a qualified medical expense occurs before the HSA was established, then any distribution is taxable as income. Further, unless you were 65 or older, disable...
1. Simple approach: You just file a claim. It may or may not matter when you made the payment as long as the covered service was during your coverage period. The worst they can do is deny it. 2. More complicated approach: Contact your insurer to see if they would allow this- you ask the OB/GYN for a refund of the prepa...
54,654,883
I created a C# application to query and insert a product database. However I am here with a small doubt and if anyone can help me i thank you right away. The following is: * I have a form to insert data into the database created in MS Access 2007, with the values of reference, sale number, client code, client name, q...
2019/02/12
[ "https://Stackoverflow.com/questions/54654883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4533717/" ]
Since we can no longer restrain ourselves from offering solutions... Suppose we had a file called `diamond.txt` that had the picture already drawn: ``` * *** ***** ******* ********* ******* ***** *** * ``` I know it's not visible here, but each line in `diamond.txt` has suff...
I propose this approach on implementation, because it gives you flexibility on the character string length to be printed. ``` program chardesign implicit none call print_diamond('*', 5, 1) call print_diamond('()', 3, 3) call print_diamond('.', 1, 4) call print_diamond('0', 0, 3) contains subroutine prin...
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I agree with the basic premise of the question. A question which has no answer, and cannot be answered because it is not on-topic here, does not add any value to our site; it just disappoints future readers: [![XKCD](https://i.stack.imgur.com/xMfEu.png)](https://i.stack.imgur.com/xMfEu.png) source: [XKCD](https://xk...
I took a brief look at the list of 7392 such questions from Donald Duck and one thing I noticed from the first few I looked at was a single person seemed to have made the decision to close the question. Looking at <https://stackoverflow.com/questions/17733063/vagrant-vs-packer-whats-the-difference> which was closed "a...
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I agree with the basic premise of the question. A question which has no answer, and cannot be answered because it is not on-topic here, does not add any value to our site; it just disappoints future readers: [![XKCD](https://i.stack.imgur.com/xMfEu.png)](https://i.stack.imgur.com/xMfEu.png) source: [XKCD](https://xk...
The automatic mass-deletion of positively-scored questions clearly violates Stack Overflow's mission: to build the best programming knowledge repository. Closed questions are usually downvoted, but upvoted closed questions are obviously exceptions to this pattern. Upvotes indicate useful, high-quality information. The ...
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I agree with the basic premise of the question. A question which has no answer, and cannot be answered because it is not on-topic here, does not add any value to our site; it just disappoints future readers: [![XKCD](https://i.stack.imgur.com/xMfEu.png)](https://i.stack.imgur.com/xMfEu.png) source: [XKCD](https://xk...
Only 7392 questions? I say put 'em all in the reopen queue. Maybe not all at once. Say, 500 per day. Half a month later, done.
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I agree with the basic premise of the question. A question which has no answer, and cannot be answered because it is not on-topic here, does not add any value to our site; it just disappoints future readers: [![XKCD](https://i.stack.imgur.com/xMfEu.png)](https://i.stack.imgur.com/xMfEu.png) source: [XKCD](https://xk...
I disagree with that *long ago questions are highly unlikely to ever be reopened* assumption. Have two counter examples, that were wrongly closed, nominated for reopen few times, and after years of being closed finally reopened. (To me they are not only should not have been closed, they are canonical Q&A in their doma...
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I took a brief look at the list of 7392 such questions from Donald Duck and one thing I noticed from the first few I looked at was a single person seemed to have made the decision to close the question. Looking at <https://stackoverflow.com/questions/17733063/vagrant-vs-packer-whats-the-difference> which was closed "a...
The automatic mass-deletion of positively-scored questions clearly violates Stack Overflow's mission: to build the best programming knowledge repository. Closed questions are usually downvoted, but upvoted closed questions are obviously exceptions to this pattern. Upvotes indicate useful, high-quality information. The ...
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I took a brief look at the list of 7392 such questions from Donald Duck and one thing I noticed from the first few I looked at was a single person seemed to have made the decision to close the question. Looking at <https://stackoverflow.com/questions/17733063/vagrant-vs-packer-whats-the-difference> which was closed "a...
Only 7392 questions? I say put 'em all in the reopen queue. Maybe not all at once. Say, 500 per day. Half a month later, done.
370,629
Occasionally, I'll see questions with 3 or 4 upvotes and no answers that were closed years ago and have had no activity since. I understand the purpose of keeping high-quality duplicates around (because they serve as signposts for other questions), but really, what's the point of keeping something that was closed unan...
2018/07/06
[ "https://meta.stackoverflow.com/questions/370629", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4032703/" ]
I took a brief look at the list of 7392 such questions from Donald Duck and one thing I noticed from the first few I looked at was a single person seemed to have made the decision to close the question. Looking at <https://stackoverflow.com/questions/17733063/vagrant-vs-packer-whats-the-difference> which was closed "a...
I disagree with that *long ago questions are highly unlikely to ever be reopened* assumption. Have two counter examples, that were wrongly closed, nominated for reopen few times, and after years of being closed finally reopened. (To me they are not only should not have been closed, they are canonical Q&A in their doma...
14,685,106
I want to set the JSP variable value to the struts tag `<s:set var="" value="">`, in the following code I have to set the value of `carbo` variable in `<s:set name="c" value=" "/>` instead of constant value. How can I do this? ```jsp <%! String carbo=""; %> <% String dish_name=(String)session.getAttribute("d"); Str...
2013/02/04
[ "https://Stackoverflow.com/questions/14685106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1835262/" ]
to me, it looks like you hand over the field-reference instead of the field-value: ``` for(int i =0; i<fields1.length; i++) { Field field1 = fields1 [i]; Field field = fields [i]; field.setAccessible(true); field.set(app, field1.get(app1)); //or whatever object field1 is from ...
Your error seems to be related to the fact that you are trying to set *Field1* as parameter of Field, instead of the *value* of Field1. ``` field.set(app, field1); ``` should instead be ``` field.set(app, field1.get(app1)); ``` Take a look at [a small working example](https://ideone.com/IUS35Z); If you chan...
14,685,106
I want to set the JSP variable value to the struts tag `<s:set var="" value="">`, in the following code I have to set the value of `carbo` variable in `<s:set name="c" value=" "/>` instead of constant value. How can I do this? ```jsp <%! String carbo=""; %> <% String dish_name=(String)session.getAttribute("d"); Str...
2013/02/04
[ "https://Stackoverflow.com/questions/14685106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1835262/" ]
This should suit your needs: ```java public static <T> void copyDeclaredFields(T from, T to) throws Exception { Class<?> clazz = from.getClass(); if (!clazz.equals(to.getClass())) { throw new IllegalArgumentException(); } for (Field field : clazz.getDeclaredFields()) { Object value = fi...
Your error seems to be related to the fact that you are trying to set *Field1* as parameter of Field, instead of the *value* of Field1. ``` field.set(app, field1); ``` should instead be ``` field.set(app, field1.get(app1)); ``` Take a look at [a small working example](https://ideone.com/IUS35Z); If you chan...
62,806,110
I would like to check if an input matches a specific repetitive pattern. Pattern = **3 Uppercase character follow by 2 digits and being separated by ':'** I have try the below regexp but it is not working. ``` # This should return "Input Criteria Meet" set user_input_1 "AAB22:GHD23:UDJ29:YUD51" if {[regexp {^[[A-Z]...
2020/07/09
[ "https://Stackoverflow.com/questions/62806110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5159376/" ]
How about this? Assuming you have 4 parts, otherwise replace `{4}` with `+`. ``` ^([A-Z]{3}\d{2}(:|$)){4}\b ``` Explanation: * `^` Start of string * `(` Start of capture group * `[A-Z]{3}` Three uppercase characters * `\d{2}` Two digit characters * `(` Start of OR capture group + `:|$` Colon character OR end of st...
I have tried out the following and it is working. ``` regexp {^[A-Z]{2}[0-9]{2}(:[A-Z]{2}[0-9]{2})+$} $user_input_1 ```
62,806,110
I would like to check if an input matches a specific repetitive pattern. Pattern = **3 Uppercase character follow by 2 digits and being separated by ':'** I have try the below regexp but it is not working. ``` # This should return "Input Criteria Meet" set user_input_1 "AAB22:GHD23:UDJ29:YUD51" if {[regexp {^[[A-Z]...
2020/07/09
[ "https://Stackoverflow.com/questions/62806110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5159376/" ]
You could use ``` ^[A-Z]{3}[0-9]{2}(?::[A-Z]{3}[0-9]{2}){3}$ ``` * `^` Start of string * `[A-Z]{3}[0-9]{2}` Match 3 times A-Z and 2 times a digit 0-9 * `(?:` Non capture group + `:[A-Z]{3}[0-9]{2}` Match `:` 3 times A-Z and 2 times a digit 0-9 * `){3}` Close non capture group and repeat 3 times * `$` End of string ...
I have tried out the following and it is working. ``` regexp {^[A-Z]{2}[0-9]{2}(:[A-Z]{2}[0-9]{2})+$} $user_input_1 ```
62,806,110
I would like to check if an input matches a specific repetitive pattern. Pattern = **3 Uppercase character follow by 2 digits and being separated by ':'** I have try the below regexp but it is not working. ``` # This should return "Input Criteria Meet" set user_input_1 "AAB22:GHD23:UDJ29:YUD51" if {[regexp {^[[A-Z]...
2020/07/09
[ "https://Stackoverflow.com/questions/62806110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5159376/" ]
Sometimes it is easier to not use a regular expression for everything, and to instead use one in concert with another operation. Some types of validation are also much clearer when put in a helper procedure: ``` proc ValidateString {input} { foreach part [split $input ":"] { # A regular expression is the e...
I have tried out the following and it is working. ``` regexp {^[A-Z]{2}[0-9]{2}(:[A-Z]{2}[0-9]{2})+$} $user_input_1 ```
62,806,110
I would like to check if an input matches a specific repetitive pattern. Pattern = **3 Uppercase character follow by 2 digits and being separated by ':'** I have try the below regexp but it is not working. ``` # This should return "Input Criteria Meet" set user_input_1 "AAB22:GHD23:UDJ29:YUD51" if {[regexp {^[[A-Z]...
2020/07/09
[ "https://Stackoverflow.com/questions/62806110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5159376/" ]
How about this? Assuming you have 4 parts, otherwise replace `{4}` with `+`. ``` ^([A-Z]{3}\d{2}(:|$)){4}\b ``` Explanation: * `^` Start of string * `(` Start of capture group * `[A-Z]{3}` Three uppercase characters * `\d{2}` Two digit characters * `(` Start of OR capture group + `:|$` Colon character OR end of st...
You could use ``` ^[A-Z]{3}[0-9]{2}(?::[A-Z]{3}[0-9]{2}){3}$ ``` * `^` Start of string * `[A-Z]{3}[0-9]{2}` Match 3 times A-Z and 2 times a digit 0-9 * `(?:` Non capture group + `:[A-Z]{3}[0-9]{2}` Match `:` 3 times A-Z and 2 times a digit 0-9 * `){3}` Close non capture group and repeat 3 times * `$` End of string ...
62,806,110
I would like to check if an input matches a specific repetitive pattern. Pattern = **3 Uppercase character follow by 2 digits and being separated by ':'** I have try the below regexp but it is not working. ``` # This should return "Input Criteria Meet" set user_input_1 "AAB22:GHD23:UDJ29:YUD51" if {[regexp {^[[A-Z]...
2020/07/09
[ "https://Stackoverflow.com/questions/62806110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5159376/" ]
How about this? Assuming you have 4 parts, otherwise replace `{4}` with `+`. ``` ^([A-Z]{3}\d{2}(:|$)){4}\b ``` Explanation: * `^` Start of string * `(` Start of capture group * `[A-Z]{3}` Three uppercase characters * `\d{2}` Two digit characters * `(` Start of OR capture group + `:|$` Colon character OR end of st...
Sometimes it is easier to not use a regular expression for everything, and to instead use one in concert with another operation. Some types of validation are also much clearer when put in a helper procedure: ``` proc ValidateString {input} { foreach part [split $input ":"] { # A regular expression is the e...
52,946,348
I have two multiindex series series 1 ``` Company Name Product Price TransactionID Company A Apple 10 T0001 Company B Grapes 20 T0002 Orange 30 T0003 ``` series 2 ``` Company Name Product Price TransactionID ...
2018/10/23
[ "https://Stackoverflow.com/questions/52946348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7058823/" ]
I think try this, this should returned the filtered messages ``` messageSearchResults: state.messages.filter(message => message.content.includes(action.search)) ``` since ``` "Quisque id justo sit amet".includes("id") // returns true ``` However, I should point out that `includes` would work `query` is container...
U can also filter like this and check its include or not. ``` messageSearchResults: state.messages.filter({content}=>content.includes(action.search)); ```
55,533,967
I am trying to run my application but I am getting the below error. > > ERROR in ./src/styles.scss (./node\_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node\_modules/postcss-loader/src??embedded!./node\_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss) > Modu...
2019/04/05
[ "https://Stackoverflow.com/questions/55533967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794075/" ]
I know this is late answer, but it may be help for some one in future The same problem ,I faced.In my case, I installed `npm` by using force with below command ``` npm install --force ```
1. Check your version of node.js. 2. Make sure you uninstall global version of node\_sass (if you have installed previously) 3. If its < 10 or v. 12 please install node v.10 with lts support. That should fix your issue.
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
I've now had a chance to rent both the Sigma TC-1401 and a Canon EF 70-200 f/4 L, and can confirm they **do** work together - at least using my 700D.
Your primary concern should rather be whether the teleconverter that you are considering is compatible with the camera body with which you intend to use it. I've never used the Sigma TC you are considering, but I have used third party TCs with Canon cameras and lenses. Sometimes they work. Sometimes they don't. That's...
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
WRT mounting, check the dots on the mounts. EF (full-frame) lenses have a red dot, EF-S (APS-C sensor) lenses have a white dot. The EF-S lenses extend further into the camera body so will NOT mount to an EF TC. I have no problems mounting the Sigma 1.4 and 2.0 TCs to my (EF mount) Sigma 70-200 2.8 for use on my 500D bu...
Your primary concern should rather be whether the teleconverter that you are considering is compatible with the camera body with which you intend to use it. I've never used the Sigma TC you are considering, but I have used third party TCs with Canon cameras and lenses. Sometimes they work. Sometimes they don't. That's...
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
Your primary concern should rather be whether the teleconverter that you are considering is compatible with the camera body with which you intend to use it. I've never used the Sigma TC you are considering, but I have used third party TCs with Canon cameras and lenses. Sometimes they work. Sometimes they don't. That's...
The site that sima has in Canada states the lens that will work with the multiplier. It only works up to F8. Beyond that it gets I’m going to use it on a 150-600 f4-5.6. So at longer range at higher Fstops it may go into manual mode D5 mark 2. But there is no fear of it hitting the mirror as it shoots. Ef (S) it May.
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
I've now had a chance to rent both the Sigma TC-1401 and a Canon EF 70-200 f/4 L, and can confirm they **do** work together - at least using my 700D.
WRT mounting, check the dots on the mounts. EF (full-frame) lenses have a red dot, EF-S (APS-C sensor) lenses have a white dot. The EF-S lenses extend further into the camera body so will NOT mount to an EF TC. I have no problems mounting the Sigma 1.4 and 2.0 TCs to my (EF mount) Sigma 70-200 2.8 for use on my 500D bu...
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
I've now had a chance to rent both the Sigma TC-1401 and a Canon EF 70-200 f/4 L, and can confirm they **do** work together - at least using my 700D.
The site that sima has in Canada states the lens that will work with the multiplier. It only works up to F8. Beyond that it gets I’m going to use it on a 150-600 f4-5.6. So at longer range at higher Fstops it may go into manual mode D5 mark 2. But there is no fear of it hitting the mirror as it shoots. Ef (S) it May.
87,511
Essentially the inverse of [this question](https://photo.stackexchange.com/questions/46696/compatibility-of-canon-teleconverters-with-non-canon-lenses) - can a Sigma 1.4x Teleconverter (specifically the TC-1401) be used with (actual) Canon lenses, such as the EF 70-200mm f/4? By used, I mean does it mount (I assume yes...
2017/02/28
[ "https://photo.stackexchange.com/questions/87511", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26092/" ]
WRT mounting, check the dots on the mounts. EF (full-frame) lenses have a red dot, EF-S (APS-C sensor) lenses have a white dot. The EF-S lenses extend further into the camera body so will NOT mount to an EF TC. I have no problems mounting the Sigma 1.4 and 2.0 TCs to my (EF mount) Sigma 70-200 2.8 for use on my 500D bu...
The site that sima has in Canada states the lens that will work with the multiplier. It only works up to F8. Beyond that it gets I’m going to use it on a 150-600 f4-5.6. So at longer range at higher Fstops it may go into manual mode D5 mark 2. But there is no fear of it hitting the mirror as it shoots. Ef (S) it May.
71,996,018
Please check the following code: ``` #include <iostream> template <int Size> class Test { public: // Will not compile, if Size is not a type! // error: 'Size' does not name a type using MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; int main() { MyTestArray testArray; ...
2022/04/25
[ "https://Stackoverflow.com/questions/71996018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2492801/" ]
You can define a `constexpr static` variable with the value of the template parameter inside the class, for example ``` template <int Size> class Test { public: constexpr static auto MySize = Size; double array[Size]; }; ``` Then you access like this ``` using MyTestArray = Test<3>; auto size = MyTestArr...
You'll need some boilerplate. Either add a static member to `Test` or if you do not want that or if you cannot modify `Test` you can use a type trait: ``` #include <iostream> template <int Size> class Test {}; template <typename T> struct MySize; template <int Size> struct MySize<Test<Size>> { static constexpr const...
71,996,018
Please check the following code: ``` #include <iostream> template <int Size> class Test { public: // Will not compile, if Size is not a type! // error: 'Size' does not name a type using MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; int main() { MyTestArray testArray; ...
2022/04/25
[ "https://Stackoverflow.com/questions/71996018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2492801/" ]
You can define a `constexpr static` variable with the value of the template parameter inside the class, for example ``` template <int Size> class Test { public: constexpr static auto MySize = Size; double array[Size]; }; ``` Then you access like this ``` using MyTestArray = Test<3>; auto size = MyTestArr...
You can also use the `decltype` specifier assuming a constness of the `MySize` variable. An example similar to the above post. ``` #include <iostream> using namespace std; template <int Size> class Test { public: static const decltype(Size) MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; ...
71,996,018
Please check the following code: ``` #include <iostream> template <int Size> class Test { public: // Will not compile, if Size is not a type! // error: 'Size' does not name a type using MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; int main() { MyTestArray testArray; ...
2022/04/25
[ "https://Stackoverflow.com/questions/71996018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2492801/" ]
You can define a `constexpr static` variable with the value of the template parameter inside the class, for example ``` template <int Size> class Test { public: constexpr static auto MySize = Size; double array[Size]; }; ``` Then you access like this ``` using MyTestArray = Test<3>; auto size = MyTestArr...
``` template <auto compile_time_known_parameter> struct data { static constexpr auto value = compile_time_known_parameter; }; int main() { return data<64>::value; } ``` ``` static constexpr auto value = compile_time_known_parameter; ``` `static` tells the compiler the storage must be in static memory `constexpr...
71,996,018
Please check the following code: ``` #include <iostream> template <int Size> class Test { public: // Will not compile, if Size is not a type! // error: 'Size' does not name a type using MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; int main() { MyTestArray testArray; ...
2022/04/25
[ "https://Stackoverflow.com/questions/71996018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2492801/" ]
You can also use the `decltype` specifier assuming a constness of the `MySize` variable. An example similar to the above post. ``` #include <iostream> using namespace std; template <int Size> class Test { public: static const decltype(Size) MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; ...
You'll need some boilerplate. Either add a static member to `Test` or if you do not want that or if you cannot modify `Test` you can use a type trait: ``` #include <iostream> template <int Size> class Test {}; template <typename T> struct MySize; template <int Size> struct MySize<Test<Size>> { static constexpr const...
71,996,018
Please check the following code: ``` #include <iostream> template <int Size> class Test { public: // Will not compile, if Size is not a type! // error: 'Size' does not name a type using MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; int main() { MyTestArray testArray; ...
2022/04/25
[ "https://Stackoverflow.com/questions/71996018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2492801/" ]
You can also use the `decltype` specifier assuming a constness of the `MySize` variable. An example similar to the above post. ``` #include <iostream> using namespace std; template <int Size> class Test { public: static const decltype(Size) MySize = Size; double array[Size]; }; using MyTestArray = Test<3>; ...
``` template <auto compile_time_known_parameter> struct data { static constexpr auto value = compile_time_known_parameter; }; int main() { return data<64>::value; } ``` ``` static constexpr auto value = compile_time_known_parameter; ``` `static` tells the compiler the storage must be in static memory `constexpr...
20,047,052
I am trying to define a simple class to work with 2d matrices, called Matrix2D01, and having trouble with the + operator. I have the += operator which is working fine, ``` Matrix2D01& Matrix2D01::operator+=(Matrix2D01& mat2) { int i,j; for (i=0;i<M;i++) for (j=0;j<N;j++) mat[i][j]+=mat2[i][j]; return ...
2013/11/18
[ "https://Stackoverflow.com/questions/20047052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3004480/" ]
I've posted the code of the Matrix class I had written for an assignment on Discrete Mathematics last Sem **Notice how the assignment operator and the copy constructor are implemented** All you need to do is write an assignment operator (I'd recommend that you write a copy constructor as well) ``` #pragma once #incl...
Your operands should be `const` references. Otherwise, you can't use a temporary to initialize them. (In this case, the return value of `operator+` is a temporary, and thus, cannot be bound to the non-const reference of `operator=`.) If your `operator+` is a member, it should be const as well. After all, it doesn't mo...
20,047,052
I am trying to define a simple class to work with 2d matrices, called Matrix2D01, and having trouble with the + operator. I have the += operator which is working fine, ``` Matrix2D01& Matrix2D01::operator+=(Matrix2D01& mat2) { int i,j; for (i=0;i<M;i++) for (j=0;j<N;j++) mat[i][j]+=mat2[i][j]; return ...
2013/11/18
[ "https://Stackoverflow.com/questions/20047052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3004480/" ]
Herb Sutter advocates [the following canonical way to overload operator +](http://herbsutter.com/2013/05/20/gotw-4-class-mechanics/) (please read GotW, it is really well written and interesting): * Don't include `operator +` as a member function, instead make it a free function. * Pass one object by value and the othe...
Your operands should be `const` references. Otherwise, you can't use a temporary to initialize them. (In this case, the return value of `operator+` is a temporary, and thus, cannot be bound to the non-const reference of `operator=`.) If your `operator+` is a member, it should be const as well. After all, it doesn't mo...
37,230
I drafted a little 4-minute speech in English which I translated into Spanish and have so far presented once online to a Spanish tutor of mine. Near the beginning of the speech I have somewhat of a throw-away line in which I say something silly about Alexander the Great, followed by: > > ... and Alexander the Great ...
2020/12/24
[ "https://spanish.stackexchange.com/questions/37230", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/28098/" ]
The first comment is that one never writes "tan mucho" (or "tanto mucho") in Spanish. Comparison of equality ("[*so/as*] + [adj./adv.] + *as*") is translated into Spanish as "*tan* + [adj./adv.] + *como*", but if one is comparing amounts of **nouns** ("*as [much/many]* + noun + *as*"), one says "[*tanto/tanta/tantos/ta...
What you (playfully) wrote > > ... and Alexander the Great probably wasn't that much of a Saturday-morning cartoon supervillain. > > > would probably translate more accurately as > > **... y Alejandro Magno probablemente no era *tan* el super villano típico de los dibujos animados de los sábados por la mañana**...
37,230
I drafted a little 4-minute speech in English which I translated into Spanish and have so far presented once online to a Spanish tutor of mine. Near the beginning of the speech I have somewhat of a throw-away line in which I say something silly about Alexander the Great, followed by: > > ... and Alexander the Great ...
2020/12/24
[ "https://spanish.stackexchange.com/questions/37230", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/28098/" ]
The first comment is that one never writes "tan mucho" (or "tanto mucho") in Spanish. Comparison of equality ("[*so/as*] + [adj./adv.] + *as*") is translated into Spanish as "*tan* + [adj./adv.] + *como*", but if one is comparing amounts of **nouns** ("*as [much/many]* + noun + *as*"), one says "[*tanto/tanta/tantos/ta...
If your intent is to say that his villainy was not cartoonish - exaggerated for dramatic effect rather than being that of a real person - I would suggest > > y Alejandro Magno probablemente no era tan como el malo de la pelicula > > > The idiomatic expression 'el malo de la pelicula' [the bad guy in the movie] to...
37,230
I drafted a little 4-minute speech in English which I translated into Spanish and have so far presented once online to a Spanish tutor of mine. Near the beginning of the speech I have somewhat of a throw-away line in which I say something silly about Alexander the Great, followed by: > > ... and Alexander the Great ...
2020/12/24
[ "https://spanish.stackexchange.com/questions/37230", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/28098/" ]
If your intent is to say that his villainy was not cartoonish - exaggerated for dramatic effect rather than being that of a real person - I would suggest > > y Alejandro Magno probablemente no era tan como el malo de la pelicula > > > The idiomatic expression 'el malo de la pelicula' [the bad guy in the movie] to...
What you (playfully) wrote > > ... and Alexander the Great probably wasn't that much of a Saturday-morning cartoon supervillain. > > > would probably translate more accurately as > > **... y Alejandro Magno probablemente no era *tan* el super villano típico de los dibujos animados de los sábados por la mañana**...
238,840
In the Bulk-brane cosmological model, what might an observer in the Bulk "see" of a nuclear fission reaction in our brane? Or indeed what might the observable effect be of any major energy "event" in our brane, Such as a Supernova. <https://physics.stackexchange.com/questions/675400/what-is-bulk-in-brane-cosmology> >...
2022/12/02
[ "https://worldbuilding.stackexchange.com/questions/238840", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99891/" ]
**Probably Nothing** I think you are talking about our universe being a 3-dimensional sheet (membrane) in a higher-dimensional space (Bulk). Usually when we talk about this we imagine light and particles and tables and chairs and stuff being bound to the sheet so they don't escape from the universe. That means the sup...
**It's kind of like an optical fiber.** Sure, the energy from the supernova travels along our brane, but in the higher dimensional brane, the same photons carry light, they are just no longer restricted to a lower dimensional brane. If a sensor in the higher brane happens to pass through our brane, it could detect the...
238,840
In the Bulk-brane cosmological model, what might an observer in the Bulk "see" of a nuclear fission reaction in our brane? Or indeed what might the observable effect be of any major energy "event" in our brane, Such as a Supernova. <https://physics.stackexchange.com/questions/675400/what-is-bulk-in-brane-cosmology> >...
2022/12/02
[ "https://worldbuilding.stackexchange.com/questions/238840", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99891/" ]
**Probably Nothing** I think you are talking about our universe being a 3-dimensional sheet (membrane) in a higher-dimensional space (Bulk). Usually when we talk about this we imagine light and particles and tables and chairs and stuff being bound to the sheet so they don't escape from the universe. That means the sup...
**It depends on the nature of the observer.** As inhabitants of a brane, we too are in the bulk. All branes are in the bulk. We have senses adapted for a 3 dimensional plane. We cannot perceive events in other 3 dimensional planes noncontiguous with our own. An "observer in the Bulk" might be in our brane, or might n...
238,840
In the Bulk-brane cosmological model, what might an observer in the Bulk "see" of a nuclear fission reaction in our brane? Or indeed what might the observable effect be of any major energy "event" in our brane, Such as a Supernova. <https://physics.stackexchange.com/questions/675400/what-is-bulk-in-brane-cosmology> >...
2022/12/02
[ "https://worldbuilding.stackexchange.com/questions/238840", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99891/" ]
**Probably Nothing** I think you are talking about our universe being a 3-dimensional sheet (membrane) in a higher-dimensional space (Bulk). Usually when we talk about this we imagine light and particles and tables and chairs and stuff being bound to the sheet so they don't escape from the universe. That means the sup...
Frame challenge: don't rely on higher dimensionality for this ------------------------------------------------------------- I think you've maybe got an X-Y problem thing going on. From comments, it appears your ultimate goal is this: > > the scenario in my story is that some large energy event happens in the real w...
55,294
Both palindrome and its complement are context-free. This is very interesting. Both are non-deterministic context-free, which in general are not closed under complement. What is it about these two NCFLs that makes complement work?
2016/04/01
[ "https://cs.stackexchange.com/questions/55294", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/48818/" ]
You make the mistake of assuming that $\qquad \lnot \forall\, x \in X. P(x) \quad \equiv \quad \forall\, x \in X. \lnot P(x)$ while in truth $\qquad \lnot \forall\, x \in X. P(x) \quad \equiv \quad \exists\, x \in X. \lnot P(x)$. In your concrete case, "CFL is not closed against complement" means there are counter...
when we say that context free language is not closed under complement it means that that there exist some contest free language that its complement is not context free language not for all languages. for example $L = \{w\in\{a,b,c\}^+ : n\_a(w) = n\_b(w) = n\_c(w)\}$ is not context free language while its complement is...
9,142,034
What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code): ``` template <class T> class ArrayStorage { protected: void processStuff(void (ArrayStorage<T>::*procedure)(T *)) { for (int i = 0; i < count; i++) (this->*procedure)(content[i]); } //...
2012/02/04
[ "https://Stackoverflow.com/questions/9142034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189488/" ]
This is one of the tricks possible with pointers. It works because DrawableStorage is an ArrayStorage, and the function header matches what is expected (takes a pointer to a type matching the objects templated type and returns void). Once the parent object has the pointer to the function, it can call it just fine even...
The base class doesn't *have* the requested member function, so there's no way around that. However, you can make the base function a *template* instead: ``` template <typename S> void processStuff(S * s, void (S::*procedure)(T *)) { for (int i = 0; i < count; i++) { (s->*procedure)(content[i]); } } ``` Invoke i...
9,142,034
What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code): ``` template <class T> class ArrayStorage { protected: void processStuff(void (ArrayStorage<T>::*procedure)(T *)) { for (int i = 0; i < count; i++) (this->*procedure)(content[i]); } //...
2012/02/04
[ "https://Stackoverflow.com/questions/9142034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189488/" ]
This is one of the tricks possible with pointers. It works because DrawableStorage is an ArrayStorage, and the function header matches what is expected (takes a pointer to a type matching the objects templated type and returns void). Once the parent object has the pointer to the function, it can call it just fine even...
Here's the simpler version of your example: ``` #include <iostream> using namespace std; struct Arg { int i; }; class A; typedef void (A::*fncptr)(Arg&); ``` `fncptr` is pointer to member function (method) of class `A` that takes `Arg` by reference. If someone gives you address of non-static function of this t...
9,142,034
What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code): ``` template <class T> class ArrayStorage { protected: void processStuff(void (ArrayStorage<T>::*procedure)(T *)) { for (int i = 0; i < count; i++) (this->*procedure)(content[i]); } //...
2012/02/04
[ "https://Stackoverflow.com/questions/9142034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189488/" ]
Here's the simpler version of your example: ``` #include <iostream> using namespace std; struct Arg { int i; }; class A; typedef void (A::*fncptr)(Arg&); ``` `fncptr` is pointer to member function (method) of class `A` that takes `Arg` by reference. If someone gives you address of non-static function of this t...
The base class doesn't *have* the requested member function, so there's no way around that. However, you can make the base function a *template* instead: ``` template <typename S> void processStuff(S * s, void (S::*procedure)(T *)) { for (int i = 0; i < count; i++) { (s->*procedure)(content[i]); } } ``` Invoke i...
9,142,034
What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code): ``` template <class T> class ArrayStorage { protected: void processStuff(void (ArrayStorage<T>::*procedure)(T *)) { for (int i = 0; i < count; i++) (this->*procedure)(content[i]); } //...
2012/02/04
[ "https://Stackoverflow.com/questions/9142034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189488/" ]
It is legal according to $5.2.9/12: > > A prvalue of type “pointer to member of D of type cv1 T” can be > converted to a prvalue of type “pointer to member of B” of type cv2 T, > where B is a base class (Clause 10) of D, if a valid standard > conversion from “pointer to member of B of type T” to “pointer to > mem...
The base class doesn't *have* the requested member function, so there's no way around that. However, you can make the base function a *template* instead: ``` template <typename S> void processStuff(S * s, void (S::*procedure)(T *)) { for (int i = 0; i < count; i++) { (s->*procedure)(content[i]); } } ``` Invoke i...
9,142,034
What i'm trying to do is somewhat obscure, so let me show on an example (this is not the actual code): ``` template <class T> class ArrayStorage { protected: void processStuff(void (ArrayStorage<T>::*procedure)(T *)) { for (int i = 0; i < count; i++) (this->*procedure)(content[i]); } //...
2012/02/04
[ "https://Stackoverflow.com/questions/9142034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189488/" ]
It is legal according to $5.2.9/12: > > A prvalue of type “pointer to member of D of type cv1 T” can be > converted to a prvalue of type “pointer to member of B” of type cv2 T, > where B is a base class (Clause 10) of D, if a valid standard > conversion from “pointer to member of B of type T” to “pointer to > mem...
Here's the simpler version of your example: ``` #include <iostream> using namespace std; struct Arg { int i; }; class A; typedef void (A::*fncptr)(Arg&); ``` `fncptr` is pointer to member function (method) of class `A` that takes `Arg` by reference. If someone gives you address of non-static function of this t...
5,280,645
i searched again and again but could not find the right answer. here is the situation. i got more than one forms in the same php file and below shows the code. when i echo as below ``` echo count($_FILES["fileUploadPath"] ); ``` it shows 0 as the count and > > Notice: Undefined index: > addProjectFileUploadPat...
2011/03/12
[ "https://Stackoverflow.com/questions/5280645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/534539/" ]
add `enctype="multipart/form-data"` to the form
Try looking at the entire array with this: ``` echo "<pre>".print_r($_FILES,true)."</pre>"; ``` Then use this manual page to let you know what the error numbers mean. That will probably give you a good idea of what is going on. [PHP File Upload Error Codes](http://www.php.net/manual/en/features.file-upload.errors.p...
5,280,645
i searched again and again but could not find the right answer. here is the situation. i got more than one forms in the same php file and below shows the code. when i echo as below ``` echo count($_FILES["fileUploadPath"] ); ``` it shows 0 as the count and > > Notice: Undefined index: > addProjectFileUploadPat...
2011/03/12
[ "https://Stackoverflow.com/questions/5280645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/534539/" ]
add `enctype="multipart/form-data"` to the form
Okay, there are a couple of things you need to be aware of. 1) You can have as many forms on a page as you want, but you can only submit one of them. You need to make sure the form you expect is being submitted. I'm assuming you're using the submit button names for doing this. However this can result in problems if s...
5,280,645
i searched again and again but could not find the right answer. here is the situation. i got more than one forms in the same php file and below shows the code. when i echo as below ``` echo count($_FILES["fileUploadPath"] ); ``` it shows 0 as the count and > > Notice: Undefined index: > addProjectFileUploadPat...
2011/03/12
[ "https://Stackoverflow.com/questions/5280645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/534539/" ]
add `enctype="multipart/form-data"` to the form
I had the same problem before and I noticed that It happens when I don't close the tags, so try closing all input tags like this: ``` <form action='upload.php' method="post" enctype="multipart/form-data"> <!-- at the end of the input add / --> <input type='file' name='file' /> <input type='submit' name='upload' /> </...
50,273,965
I inherit all of my activities and fragments from base activity and base fragment. I want to centralize some behaviors across applications and create some separate git repositories for them. A convention is that each activity and fragment should have a main `ProgressBar` that is embedded inside XML layout anywhere, a...
2018/05/10
[ "https://Stackoverflow.com/questions/50273965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8997642/" ]
If your `BaseActivity` is reside inside a base module (let's call `BaseActivity Module`) and the actual activity and xml is inside another module (let's call `Activity Module`) which is depends on BaseActivity module like this hierarchy: ``` Activity Module -- BaseActivity module ``` Then you can create an xml f...
As long as you have that id in one of the layout files the ID will be generated inside the R file. Still probably a better idea to use an abstract class and method which then specify the id in subclasses: ``` abstract int getProgressBarId(); ``` so then you can do this: ``` @Override protected void onCreate(@Nu...
61,327,183
I made this simple database on mysql and with data in my "Work" pivot table, I get the expected results with : ``` SELECT emp_name, dept_name FROM Employee e INNER JOIN Work w ON e.emp_id=w.emp_id INNER JOIN Department d ON w.dept_id=d.dept_id; +----------+-----------+ | emp_name | dept_name | +----------+-----------+...
2020/04/20
[ "https://Stackoverflow.com/questions/61327183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12340337/" ]
Use regular expression. ``` import re html='''<div class="sk-expander-content" style="display: block;"> <ul> <li> <span>Third Party Liability</span> <span>€756.62</span> </li> <li> <span>Fire &amp; Theft</span> <span>€15.59</span> </li> </ul> </div> <div class="sk-expander-content" style="displ...
```py from bs4 import BeautifulSoup import re html = """ <div class="sk-expander-content" style="display: block;"> <ul> <li> <span>Third Party Liability</span> <span>€756.62</span> </li> <li> <span>Fire &amp; Theft</span> <span>€15.59</span> </li> </ul> </div> """ soup = BeautifulSoup(html, 'ht...
44,555,678
I know you can use the `xmllint` command to validate against [local xsd files](https://stackoverflow.com/questions/36317381/xmllint-validation-error-no-dtd-found-while-using-xsd), or against xsd network file locations, but what I'd like to do is instruct xmllint to validate an XML file against its "internally specified...
2017/06/14
[ "https://Stackoverflow.com/questions/44555678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32453/" ]
`xsi:schemaLocation` should contain a list of URIs, semantically grouped two by two. Each URI appearing at an odd position specifies a namespace, and the URI appearing at the next even position specifies the location hint of the schema to use for this namespace. Location hints may be local or remote. This is an exampl...
Appears that there are no command line options to do what I want (use the XML location hints to auto-download xsd's etc). But you might be able to manually create an XSD file and pass that on the command line to xmllint `--schema xxx`, possibly create an "over arching" XSD if you need multiple: <https://stackoverflow.c...
14,229,306
I am not a programming pro. I am trying to give the user a choice of activating different slideshows, and for that, I need to activate the one selected, and deactivate the others. Now, I have four slideshows; but I could have 20 too. And for the 20, this bit of code would really look ugly: ``` function setSlid...
2013/01/09
[ "https://Stackoverflow.com/questions/14229306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983776/" ]
For the pure SQL it will look like: ``` SELECT * FROM (SELECT DISTINCT ON (events.title) * FROM events ORDER BY events.title, events.copy_count DESC) top_titles ORDER BY events.copy_count DESC LIMIT 99 ``` But i don't know, how to write it in RoR.
Try this: ``` Event.order("copy_count DESC").limit(99).select(:title).uniq ```
14,229,306
I am not a programming pro. I am trying to give the user a choice of activating different slideshows, and for that, I need to activate the one selected, and deactivate the others. Now, I have four slideshows; but I could have 20 too. And for the 20, this bit of code would really look ugly: ``` function setSlid...
2013/01/09
[ "https://Stackoverflow.com/questions/14229306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983776/" ]
For the pure SQL it will look like: ``` SELECT * FROM (SELECT DISTINCT ON (events.title) * FROM events ORDER BY events.title, events.copy_count DESC) top_titles ORDER BY events.copy_count DESC LIMIT 99 ``` But i don't know, how to write it in RoR.
It means that the ORDER BY needs to be "events.title, copy\_count DESC". DISTINCT ON requires that the first thing you sort on is the list of columns that are DISTINCT. If you are trying to get the highest result per title, you must group them into sets of rows with the same title first before you can then sort by copy...
14,229,306
I am not a programming pro. I am trying to give the user a choice of activating different slideshows, and for that, I need to activate the one selected, and deactivate the others. Now, I have four slideshows; but I could have 20 too. And for the 20, this bit of code would really look ugly: ``` function setSlid...
2013/01/09
[ "https://Stackoverflow.com/questions/14229306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983776/" ]
For the pure SQL it will look like: ``` SELECT * FROM (SELECT DISTINCT ON (events.title) * FROM events ORDER BY events.title, events.copy_count DESC) top_titles ORDER BY events.copy_count DESC LIMIT 99 ``` But i don't know, how to write it in RoR.
Try this: ``` Event.select("DISTINCT ON (events.title) *").order("events.title, copy_count DESC").limit(99) ``` This happens because when you use the statement DISTINCT ON, you must use its expression (e.g. events.title) in the ORDER BY expressions ``` SQL ERROR: SELECT DISTINCT ON expressions must match initial O...
14,229,306
I am not a programming pro. I am trying to give the user a choice of activating different slideshows, and for that, I need to activate the one selected, and deactivate the others. Now, I have four slideshows; but I could have 20 too. And for the 20, this bit of code would really look ugly: ``` function setSlid...
2013/01/09
[ "https://Stackoverflow.com/questions/14229306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983776/" ]
Try this: ``` Event.select("DISTINCT ON (events.title) *").order("events.title, copy_count DESC").limit(99) ``` This happens because when you use the statement DISTINCT ON, you must use its expression (e.g. events.title) in the ORDER BY expressions ``` SQL ERROR: SELECT DISTINCT ON expressions must match initial O...
Try this: ``` Event.order("copy_count DESC").limit(99).select(:title).uniq ```
14,229,306
I am not a programming pro. I am trying to give the user a choice of activating different slideshows, and for that, I need to activate the one selected, and deactivate the others. Now, I have four slideshows; but I could have 20 too. And for the 20, this bit of code would really look ugly: ``` function setSlid...
2013/01/09
[ "https://Stackoverflow.com/questions/14229306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983776/" ]
Try this: ``` Event.select("DISTINCT ON (events.title) *").order("events.title, copy_count DESC").limit(99) ``` This happens because when you use the statement DISTINCT ON, you must use its expression (e.g. events.title) in the ORDER BY expressions ``` SQL ERROR: SELECT DISTINCT ON expressions must match initial O...
It means that the ORDER BY needs to be "events.title, copy\_count DESC". DISTINCT ON requires that the first thing you sort on is the list of columns that are DISTINCT. If you are trying to get the highest result per title, you must group them into sets of rows with the same title first before you can then sort by copy...
30,626,759
I have this code which works well that loops through a folder, opens a file, prints the name of the file to Column 1 of my Masterfile(*the file with the code and where all of my final information will go*), prints 2 columns (*of varying length since I use End(xlUp) to get all of the info present in the column*) from th...
2015/06/03
[ "https://Stackoverflow.com/questions/30626759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4950506/" ]
Use chmod to change the file permissions. ``` chmod 777 some-file ``` Or set the umask ``` umask 000 ```
Strictly using `umask`, you cannot do this. Unless you are specifically creating an executable file with, say, `gcc`, the default permissions will be `666 minus umask`. You must use `chmod` to add the executable bit to a standard file.
4,838
What formula is for counting aspect ratio of the image as in this site: [Aspect ratio calculator (ARC) | NinjaUnits](https://www.ninjaunits.com/calculators/aspect-ratio/) For example: ``` 1000x1200 its aspect ratio 5:6 1000x1333 its aspect ratio 3:4 2592x3888 its aspect ratio 2:3 ``` I want to determine this ...
2017/03/11
[ "https://computergraphics.stackexchange.com/questions/4838", "https://computergraphics.stackexchange.com", "https://computergraphics.stackexchange.com/users/6179/" ]
You need to take your width and height and make them into a fraction, then [reduce it](https://en.wikipedia.org/wiki/Irreducible_fraction). To do that, you'll need to find the [greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor) of the numerator and denominator, and divide them both by that....
One way you could do it is by writing the dimensions as a fraction, and simplifying that fraction (dividing each of the numbers by their greatest common denominator). From that you can then create a string and format it as [simplified numerator]:[simplified denominator]. [This SO question](https://stackoverflow.com/qu...
62,685,583
So as the title says, I want to display all the content of the file in the edit box but I dont know how to do that this is the handler of the button, when pressed it will make the user choose a file and its content is supposed to appear in the edit box. The problem is that its only showing the first line somehow ``` ...
2020/07/01
[ "https://Stackoverflow.com/questions/62685583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13849769/" ]
The return value is either NULL or False, when end of file is reached. So you can loop for each line. The pseudocode (Not tested. May have issues.) looks somewhat below. ``` CString eachString; while (file.ReadString(eachString)) { m_strEditCtrl += eachString; //The CString version of this function removes ...
Don't use MFC for you application needs, only us it as UI. All of your code should be written in a portable fashion. IMHO. Write global, non MFC functions for your needs. So, to get the string from a file. ``` std::string read_file(const std::wstring& filepathname) { std::ifstream is(filepathname, std::ios::binar...
66,383,735
On production react\_devtools\_backend.js is loading anyway and it slows up my website in production. How to disable loading this react devtools? I'm using react 16.8, reactSSR, webpack 4.29, apollo I've alreadyused ```js new webpack.DefinePlugin({ '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })' ...
2021/02/26
[ "https://Stackoverflow.com/questions/66383735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14892929/" ]
Not sure if this is the answer you're looking for, but it seems to be loaded as a result of having installed the extension. When I fired up an incognito window, it wasn't getting loaded.
This is true, it is downloaded by 'React Developer Tools' extension. Try to turn off the extension and then refresh the page. You will se that no request was sent.
66,383,735
On production react\_devtools\_backend.js is loading anyway and it slows up my website in production. How to disable loading this react devtools? I'm using react 16.8, reactSSR, webpack 4.29, apollo I've alreadyused ```js new webpack.DefinePlugin({ '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })' ...
2021/02/26
[ "https://Stackoverflow.com/questions/66383735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14892929/" ]
Its loaded from chrome extension: React Developer Tools You can go to Network tab, find redundant script(click on it). Then you can go to 'Initiator' tab - there you will see where it came from. [![enter image description here](https://i.stack.imgur.com/vMG2i.png)](https://i.stack.imgur.com/vMG2i.png)
This is true, it is downloaded by 'React Developer Tools' extension. Try to turn off the extension and then refresh the page. You will se that no request was sent.
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
**1-** I guess that you only use a few points to draw graphs of signals. All graph/chart applications try to connect points with direct lines and then your chart will be shown. So if you only use three points, your graph will looks like a triangle! If you want your graph to be curved, you have to add more points. Then ...
There's always been a smooth line renderer in Androidplot: BezierLineAndPointRenderer, which like the implementations above uses Android's built in Bezier drawing routines **cubicTo(...)** & **quadTo(...)**. The problem is that using Beziers to draw smooth lines in this way creates a false line that overshoots the actu...
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
**1-** I guess that you only use a few points to draw graphs of signals. All graph/chart applications try to connect points with direct lines and then your chart will be shown. So if you only use three points, your graph will looks like a triangle! If you want your graph to be curved, you have to add more points. Then ...
Just use ChartFactory.getCubeLineChartView instead of ChartFactory.getLineChartView using achart engine
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
You can use [Path.cubicTo()](http://developer.android.com/reference/android/graphics/Path.html#cubicTo%28float,%20float,%20float,%20float,%20float,%20float%29) method. It draws a line using cubic spline algorithm which results in the smoothing effect you want. Checkout the answer to a [similar question here](https://s...
In some simple cases, this could help: ``` mPaint.pathEffect = CornerPathEffect(radius) ``` even in combination with ``` path.lineTo(x,y) ```
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
You can use [Path.cubicTo()](http://developer.android.com/reference/android/graphics/Path.html#cubicTo%28float,%20float,%20float,%20float,%20float,%20float%29) method. It draws a line using cubic spline algorithm which results in the smoothing effect you want. Checkout the answer to a [similar question here](https://s...
**1-** I guess that you only use a few points to draw graphs of signals. All graph/chart applications try to connect points with direct lines and then your chart will be shown. So if you only use three points, your graph will looks like a triangle! If you want your graph to be curved, you have to add more points. Then ...
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
**1-** I guess that you only use a few points to draw graphs of signals. All graph/chart applications try to connect points with direct lines and then your chart will be shown. So if you only use three points, your graph will looks like a triangle! If you want your graph to be curved, you have to add more points. Then ...
try this: > > > ``` > symbol = new Path(); > paint = new Paint(); > paint.setAntiAlias(true); > paint.setStrokeWidth(2); > paint.setColor(-7829368); > paint.setStrokeJoin(Paint.Join.ROUND); // set the join to round you want > paint.setStrokeCap(Paint.Cap.ROUND); // set the paint cap to round too > pa...
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
Just use ChartFactory.getCubeLineChartView instead of ChartFactory.getLineChartView using achart engine
try this: > > > ``` > symbol = new Path(); > paint = new Paint(); > paint.setAntiAlias(true); > paint.setStrokeWidth(2); > paint.setColor(-7829368); > paint.setStrokeJoin(Paint.Join.ROUND); // set the join to round you want > paint.setStrokeCap(Paint.Cap.ROUND); // set the paint cap to round too > pa...
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
You can use [Path.cubicTo()](http://developer.android.com/reference/android/graphics/Path.html#cubicTo%28float,%20float,%20float,%20float,%20float,%20float%29) method. It draws a line using cubic spline algorithm which results in the smoothing effect you want. Checkout the answer to a [similar question here](https://s...
Just use ChartFactory.getCubeLineChartView instead of ChartFactory.getLineChartView using achart engine
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
**1-** I guess that you only use a few points to draw graphs of signals. All graph/chart applications try to connect points with direct lines and then your chart will be shown. So if you only use three points, your graph will looks like a triangle! If you want your graph to be curved, you have to add more points. Then ...
In some simple cases, this could help: ``` mPaint.pathEffect = CornerPathEffect(radius) ``` even in combination with ``` path.lineTo(x,y) ```
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
In some simple cases, this could help: ``` mPaint.pathEffect = CornerPathEffect(radius) ``` even in combination with ``` path.lineTo(x,y) ```
try this: > > > ``` > symbol = new Path(); > paint = new Paint(); > paint.setAntiAlias(true); > paint.setStrokeWidth(2); > paint.setColor(-7829368); > paint.setStrokeJoin(Paint.Join.ROUND); // set the join to round you want > paint.setStrokeCap(Paint.Cap.ROUND); // set the paint cap to round too > pa...
18,014,834
I have a small problem with ploting my graph. On a picture below is what I have already done. --- The graph should represent the actual signal strength of available Wi-Fi network(s). It's a simple `XYPlot` here data are represented with `SimpleXYSeries` (values are dynamically created). Here is a little snippet of c...
2013/08/02
[ "https://Stackoverflow.com/questions/18014834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1331415/" ]
You can use [Path.cubicTo()](http://developer.android.com/reference/android/graphics/Path.html#cubicTo%28float,%20float,%20float,%20float,%20float,%20float%29) method. It draws a line using cubic spline algorithm which results in the smoothing effect you want. Checkout the answer to a [similar question here](https://s...
try this: > > > ``` > symbol = new Path(); > paint = new Paint(); > paint.setAntiAlias(true); > paint.setStrokeWidth(2); > paint.setColor(-7829368); > paint.setStrokeJoin(Paint.Join.ROUND); // set the join to round you want > paint.setStrokeCap(Paint.Cap.ROUND); // set the paint cap to round too > pa...
52,469,526
I'm currently working with rails and reactjs. I'm having difficulties using css in my reactjs files. It seems like every time i try to use it, no change is being applied at all. In my App.jsx file I have this: ``` import React from "react"; import styles from "./styles.css"; export default class Register extends Rea...
2018/09/23
[ "https://Stackoverflow.com/questions/52469526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7823702/" ]
It depends on the webpack loader settings. If you are using `css-loader` as configured in `react-scripts` (as of 1.1.5), then the classNames are loaded using `{modules: false}` option, i.e. global styles, which can be referenced as strings in JSX code: ``` import "./styles.css"; ... className="container" ... ``` Or ...
seems like you didn't enable an option `{ modules: true }` for css-loader in webpack config take a look [webpack-contrib/sass-loader#206](https://github.com/webpack-contrib/sass-loader/issues/206) <https://github.com/webpack-contrib/css-loader#options> Taken from: <https://github.com/facebook/create-react-app/issue...
64,512,359
so I tried to run `npm start` on my react app. But It's not running, instead it responds like this: ['/Users/macintoshhd/iCloud Drive (Archive)/Documents/Abu Abdillatief/Self Study/vetme/src/.' were found.](https://i.stack.imgur.com/wuNl3.png) Can anybody help? In previous projects everything runs fine, and I tried t...
2020/10/24
[ "https://Stackoverflow.com/questions/64512359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13003387/" ]
I face the problem also, and found this link <https://github.com/facebook/create-react-app/issues/9902> There mentioned that your directory path shouldn't have any space, since the last react update. ``` C:\Desktop\React App (BootCamp)\myApp> npm start ``` After I removed the space from the directory path, it still...
I've had the same issue after I deleted everything in the `src` dir and all I had to do to fix the problem was to stop the server with `ctrl+c` and then `npm start`.