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
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
1. Yes, some pages will need different combinations of style sheets. Each combination must be cached individually. Unfortunately, the browser won't know that there isn't a difference between `?stylesheets=a.css,b.css` and `?stylesheets=b.css,a.css` so both will need to be cached. 2. That's used to make sure the browser...
A1: Yes i think the best solution is to generate one for every combination. BUt you can cache every file separate and combine them but i think its faster when you cache them together. A2: You can calculate the GUID/Hash/etc. from the checksumes of the files. like: ``` sha1( sha1(file1) + sha(file2) .......) ``` A go...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
1. Yes, some pages will need different combinations of style sheets. Each combination must be cached individually. Unfortunately, the browser won't know that there isn't a difference between `?stylesheets=a.css,b.css` and `?stylesheets=b.css,a.css` so both will need to be cached. 2. That's used to make sure the browser...
For your first question, I would just minify all your (often used) CSS files together into one file and not bother with all possible combinations. That way, every subsequent request can simply use the same CSS file from the local cache instead of fetching a different minified file based on whatever combination is requi...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
1. Yes, some pages will need different combinations of style sheets. Each combination must be cached individually. Unfortunately, the browser won't know that there isn't a difference between `?stylesheets=a.css,b.css` and `?stylesheets=b.css,a.css` so both will need to be cached. 2. That's used to make sure the browser...
Do look at <https://github.com/web-developer/Resource-Handler>. This allows you to merege all your css into 1. It also does compress, minify and even cache your css. It also works for your js. This requires least configuration or hassle, unlike some of the other ones suggested . **[RESOURCE HANDLER](https://github.co...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
[Assetic](https://github.com/kriswallsmith/assetic) seems to be good at making assets of JS/CSS and minify them while putting them in cache.
For your first question, I would just minify all your (often used) CSS files together into one file and not bother with all possible combinations. That way, every subsequent request can simply use the same CSS file from the local cache instead of fetching a different minified file based on whatever combination is requi...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
[Assetic](https://github.com/kriswallsmith/assetic) seems to be good at making assets of JS/CSS and minify them while putting them in cache.
Do look at <https://github.com/web-developer/Resource-Handler>. This allows you to merege all your css into 1. It also does compress, minify and even cache your css. It also works for your js. This requires least configuration or hassle, unlike some of the other ones suggested . **[RESOURCE HANDLER](https://github.co...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
A1: Yes i think the best solution is to generate one for every combination. BUt you can cache every file separate and combine them but i think its faster when you cache them together. A2: You can calculate the GUID/Hash/etc. from the checksumes of the files. like: ``` sha1( sha1(file1) + sha(file2) .......) ``` A go...
For your first question, I would just minify all your (often used) CSS files together into one file and not bother with all possible combinations. That way, every subsequent request can simply use the same CSS file from the local cache instead of fetching a different minified file based on whatever combination is requi...
7,083,568
Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name). Is there a way (like in mySQL) to concat the fname and ln...
2011/08/16
[ "https://Stackoverflow.com/questions/7083568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708831/" ]
A1: Yes i think the best solution is to generate one for every combination. BUt you can cache every file separate and combine them but i think its faster when you cache them together. A2: You can calculate the GUID/Hash/etc. from the checksumes of the files. like: ``` sha1( sha1(file1) + sha(file2) .......) ``` A go...
Do look at <https://github.com/web-developer/Resource-Handler>. This allows you to merege all your css into 1. It also does compress, minify and even cache your css. It also works for your js. This requires least configuration or hassle, unlike some of the other ones suggested . **[RESOURCE HANDLER](https://github.co...
1,330,330
I have a sheet with the following data: ``` Column A | Column B | Column C - E | Column F ==========|============|===================|============ Customer | Amount | Additional data | Paid (Y/N) ``` I would like to create a new worksheet with just the customers who haven't paid and the data from t...
2018/06/11
[ "https://superuser.com/questions/1330330", "https://superuser.com", "https://superuser.com/users/913625/" ]
You could use a **Pivot Table**. * Simply select your data (headers included), then in the ribbon, click on `Insert > Pivot Table`. * Excel will create a new sheet and a pivot table, that you need to configure. Simply drag the relevant fields in the rows/columns space, and drag the field `Paid` in the filters space. *...
Try this arrary formula: ``` =IFERROR(INDEX(Sheet2!$A:$A,SMALL(IF(Sheet2!$D$2:$D$8="N",ROW(Sheet2!$2:$8)),ROW(A1))),"") ``` Press **Ctrl+Shift+Enter** [![enter image description here](https://i.stack.imgur.com/sitI8.gif)](https://i.stack.imgur.com/sitI8.gif)
1,330,330
I have a sheet with the following data: ``` Column A | Column B | Column C - E | Column F ==========|============|===================|============ Customer | Amount | Additional data | Paid (Y/N) ``` I would like to create a new worksheet with just the customers who haven't paid and the data from t...
2018/06/11
[ "https://superuser.com/questions/1330330", "https://superuser.com", "https://superuser.com/users/913625/" ]
You could use a **Pivot Table**. * Simply select your data (headers included), then in the ribbon, click on `Insert > Pivot Table`. * Excel will create a new sheet and a pivot table, that you need to configure. Simply drag the relevant fields in the rows/columns space, and drag the field `Paid` in the filters space. *...
Use a filter: 1. Select your entire table. 2. Click `Filter` on the Data ribbon. 3. Set the filter on column F by clicking the drop-down triangle button in the column header. Make sure only "No" is checked and then click OK. This will show you all the rows in your table where the Paid value is "No". To turn off the f...
1,330,330
I have a sheet with the following data: ``` Column A | Column B | Column C - E | Column F ==========|============|===================|============ Customer | Amount | Additional data | Paid (Y/N) ``` I would like to create a new worksheet with just the customers who haven't paid and the data from t...
2018/06/11
[ "https://superuser.com/questions/1330330", "https://superuser.com", "https://superuser.com/users/913625/" ]
Use a filter: 1. Select your entire table. 2. Click `Filter` on the Data ribbon. 3. Set the filter on column F by clicking the drop-down triangle button in the column header. Make sure only "No" is checked and then click OK. This will show you all the rows in your table where the Paid value is "No". To turn off the f...
Try this arrary formula: ``` =IFERROR(INDEX(Sheet2!$A:$A,SMALL(IF(Sheet2!$D$2:$D$8="N",ROW(Sheet2!$2:$8)),ROW(A1))),"") ``` Press **Ctrl+Shift+Enter** [![enter image description here](https://i.stack.imgur.com/sitI8.gif)](https://i.stack.imgur.com/sitI8.gif)
57,450,967
Before upgrading from react native 0.59 to 0.60, all was good. Xcode 10.3 build error: ``` /bin/sh -c myApp.build/Script-6C5554832063F4750081EA9D.sh error: Could not get GOOGLE_APP_ID in Google Services file from build environment ** ARCHIVE FAILED ** ``` Again everything worked before upgrading firebase and reac...
2019/08/11
[ "https://Stackoverflow.com/questions/57450967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/245646/" ]
``` _CrtDumpMemoryLeaks(); ``` At this time, both of your `P1` and `P2` shared pointers still exist and in scope, and maintain a reference count. They are not destroyed (but your dynamically-allocated pointer is `delete`d and destroyed). So, you shouldn't be surprised that your debugging library still finds some a...
Objects created in a certain scope are destroyed at the end of that scope. So `P1` and `P2` will be destroyed at the end of `main()`, after the call to `_CrtDumpMemoryLeaks()`. So it will report them as leaks since they haven't been destroyed yet. Move the test into a separate function, i.e. `test()` and call it fro...
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
Notice you're dealing with a [Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). You need to basically **read** the response stream with `Response.json()` or `Response.text()` (or via other methods) in order to see your data. Otherwise your response body will always appear as a locked readable...
I had a typo in my code as pointed out by [GabeRogan](https://stackoverflow.com/users/4833285/gabe-rogan) in [this comment](https://stackoverflow.com/questions/43903767/read-the-body-of-a-fetch-promise#comment74842732_43904074): > > Ok awesome. To be quite honest I have absolutely no clue why you're getting undefined...
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
Notice you're dealing with a [Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). You need to basically **read** the response stream with `Response.json()` or `Response.text()` (or via other methods) in order to see your data. Otherwise your response body will always appear as a locked readable...
You can also use async/await: When returning json content: ``` Client.upload(this.file).then(async r => console.log(await r.json())) ``` or just returning in textual form: ``` Client.upload(this.file).then(async r => console.log(await r.text())) ```
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
Notice you're dealing with a [Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). You need to basically **read** the response stream with `Response.json()` or `Response.text()` (or via other methods) in order to see your data. Otherwise your response body will always appear as a locked readable...
If you are getting "undefined" for data and you are doing something with the response, make sure to return the response. I was doing something like this ``` fetch(URL) .then(response => { response.text(); console.log(response.statusText); }) .then(data => console.log(data)); // got "undefi...
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
I had a typo in my code as pointed out by [GabeRogan](https://stackoverflow.com/users/4833285/gabe-rogan) in [this comment](https://stackoverflow.com/questions/43903767/read-the-body-of-a-fetch-promise#comment74842732_43904074): > > Ok awesome. To be quite honest I have absolutely no clue why you're getting undefined...
You can also use async/await: When returning json content: ``` Client.upload(this.file).then(async r => console.log(await r.json())) ``` or just returning in textual form: ``` Client.upload(this.file).then(async r => console.log(await r.text())) ```
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
I had a typo in my code as pointed out by [GabeRogan](https://stackoverflow.com/users/4833285/gabe-rogan) in [this comment](https://stackoverflow.com/questions/43903767/read-the-body-of-a-fetch-promise#comment74842732_43904074): > > Ok awesome. To be quite honest I have absolutely no clue why you're getting undefined...
If you are getting "undefined" for data and you are doing something with the response, make sure to return the response. I was doing something like this ``` fetch(URL) .then(response => { response.text(); console.log(response.statusText); }) .then(data => console.log(data)); // got "undefi...
43,903,767
I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end: ``` app.post('/upload', (req, res) => { var form = new formidable.IncomingForm(), files = [], fields = []; form...
2017/05/10
[ "https://Stackoverflow.com/questions/43903767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775341/" ]
You can also use async/await: When returning json content: ``` Client.upload(this.file).then(async r => console.log(await r.json())) ``` or just returning in textual form: ``` Client.upload(this.file).then(async r => console.log(await r.text())) ```
If you are getting "undefined" for data and you are doing something with the response, make sure to return the response. I was doing something like this ``` fetch(URL) .then(response => { response.text(); console.log(response.statusText); }) .then(data => console.log(data)); // got "undefi...
26,600,506
I accidentally amended merge commit instead of creating new one. Now I don't know how to extract the changes to normal commit which I can push. The changes will show up in gitk, but will not appear in format-patch. Please, help.
2014/10/28
[ "https://Stackoverflow.com/questions/26600506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/90096/" ]
You have 2 SHAs that are of interest here - the original merge commit, and the amended merge commit. What you want to do is `git reset` your `HEAD` to the original merge commit, while preserving your index and working directory. You can then create a new commit hanging off the merge commit. Use `git reflog` to fin...
I've found one way which works: ``` git diff HEAD~1 > p.patch git checkout master git checkout -b branch-name ``` Manually edit p.patch to remove unrelated changes from merge. ``` git apply p.patch ``` But I suspect there is a much easier/better way to do it.
26,600,506
I accidentally amended merge commit instead of creating new one. Now I don't know how to extract the changes to normal commit which I can push. The changes will show up in gitk, but will not appear in format-patch. Please, help.
2014/10/28
[ "https://Stackoverflow.com/questions/26600506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/90096/" ]
I've found one way which works: ``` git diff HEAD~1 > p.patch git checkout master git checkout -b branch-name ``` Manually edit p.patch to remove unrelated changes from merge. ``` git apply p.patch ``` But I suspect there is a much easier/better way to do it.
This worked for me: * Get the SHAs of both the original merge commit and the amended merge commit * `git reset --hard xxx` where `xxx` is the amended merge commit SHA * `git reset --soft yyy` where `yyy` is the original merge commit SHA That left me with my accidentally-amended changes staged.
26,600,506
I accidentally amended merge commit instead of creating new one. Now I don't know how to extract the changes to normal commit which I can push. The changes will show up in gitk, but will not appear in format-patch. Please, help.
2014/10/28
[ "https://Stackoverflow.com/questions/26600506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/90096/" ]
You have 2 SHAs that are of interest here - the original merge commit, and the amended merge commit. What you want to do is `git reset` your `HEAD` to the original merge commit, while preserving your index and working directory. You can then create a new commit hanging off the merge commit. Use `git reflog` to fin...
This worked for me: * Get the SHAs of both the original merge commit and the amended merge commit * `git reset --hard xxx` where `xxx` is the amended merge commit SHA * `git reset --soft yyy` where `yyy` is the original merge commit SHA That left me with my accidentally-amended changes staged.
72,795,617
I have here this function in my service.ts ``` public getUploadPeriod(){ let baseYear = 2020; let currYear = new Date().getFullYear(); let years = []; for (var i = baseYear; i <= currYear; i++) { years.push(i); } return years } ``` And this is the ts of my project I am trying to ca...
2022/06/29
[ "https://Stackoverflow.com/questions/72795617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19440121/" ]
As seen in the documentation for the Angular select: > > To add options to the select, add `<mat-option>` elements to the > `<mat-select>`. Each `<mat-option>` has a value property that can be used > to set the value that will be selected if the user chooses this > option. The content of the `<mat-option>` is what wi...
`years` variable should be declared outside of method scope so template would have access to it. ```js years: any; getUploadPeriod() { this.years = this.serviceGetUploadPeriod(); console.log(this.years); } ``` Use `*ngFor` to iterate over items in template. ```html <div *ngFor="let year of years"> {{...
17,739,842
I am using "UNIX" (on my virtual machine) and generating ".docx" file there using "C", after getting the file into Windows, when I am opening the file it's saying "the file is corrupted, can't be opened" and then its not opening. I am using MS-Word 2010. Here is the piece of code I am using:- ``` Write_to_file(){ F...
2013/07/19
[ "https://Stackoverflow.com/questions/17739842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/661801/" ]
Just with an extension name (doc docx) does not make the file a MS word file. Your code is only writing a text file. You can dectect this by file command under Linux. Please reference this <http://msdn.microsoft.com/en-us/library/cc313105(v=office.12).aspx>, and write the **REAL** MS document file.
A `doc` file is not a simple text file. You'd want to use the `txt` format: ``` fopen("hello.txt", "w"); ``` To actually read/write a `doc` file, you'd need to use a library designed specifically to read them and write them. [The spec for MS-DOC files is pretty lengthy, so I wouldn't implement my own reader/writer ...
33,308,549
I am trying to use this Makefile for a C Program. Could you please share with me a way how I can understand the Make utility better? I am trying the following: ``` # stack/Makefile CC := gcc CFLAGS += -std=c99 CFLAGS += -Wall CFLAGS += -Wextra CFLAGS += -g VPATH = main src all: bin/main.exe clean run bin/main.exe: bi...
2015/10/23
[ "https://Stackoverflow.com/questions/33308549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5057040/" ]
The error stems from the fact that your Makefile wants to generate the executable and object files in subdirectory `bin` but it contains no rule to ensure that `bin` exists when it is needed. As @JonathanLeffler comments, you can solve that just by manually creating `bin` yourself. But it is often desired that a Makef...
The best way to learn the proper way to use makefiles is to read the [manual](http://www.gnu.org/software/make/manual/make.html). Also, you can Google for some [simple tutorials](https://www.google.com/?gws_rd=ssl#safe=off&q=make%20tutorial).
30,170,109
After inserting elements to my linked list, i would like to retrieve them. This is the struct: ``` typedef struct node { int data; struct node *next; } Element; typedef Element* ROW; ``` I start my list with : ``` void startRow(ROW *row){ *row = NULL; } ``` After that, i use the function to insert a...
2015/05/11
[ "https://Stackoverflow.com/questions/30170109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1536010/" ]
\*row is not null after the first insert. So the next insert never happens. ``` void insertEnd(ROW *row, int value){ if(*row==NULL){ printf("Inserting %d\n", value); *row = (ROW) (malloc(sizeof(Element))); if(*row==NULL){ return; }else{ (*row)->data = value; ...
The problem is in the method insertEnd. You should link the elements of the list not overide them :) like this : ``` void insertEnd(ROW *row, int value){ if(*row!=NULL){ ROW *lastElement = (ROW) (malloc(sizeof(Element))); if(*lastElement==NULL){ return; }else{ (*las...
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
You need to have **.env** on your appication folder then run: ``` $ php artisan key:generate ``` If you don't have **.env** copy from **.env.example**: ``` $ cp .env.example .env ```
Check your .env file if **APP\_KEY** is not set, it is the issue, Now run `php artisan key:generate` then run `php artisan config:cache` it will set an **APP\_KEY** key in your .env file. If **APP\_KEY** is already set run the same commands. It will update this key.
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
For laravel version 5.4 PHP 7.4 1. To solve **run this command** `php artisan key:generate` This will set a value for `APP_KEY=` in your `.env` file something like this: `APP_KEY=base64:trp5LQ9/TW85+17o0T7F0bZ/Ca1J9cIMgvyNIYl0k/g=` 2. Clean cache to get everything working again with the following commands: `php a...
The artisan commands did it for me Run `php artisan key:generate`. Do `php artisan config:clear`, Then `php artisan config:cache` Thank me later!
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
Ok, this has basically already been answered, but I found a couple caveats that had be consternated, or constipated, one of those two... First, as has already been said, you should ensure you have a valid `.env` file which you can accomplish in the terminal by copying the existing `.env.example` file as such: `$ cp ....
If the artisan command doesn't work and you get the same error in the command line, that means composer didn't do a good job at getting all the files, you should delete the vendor folder and run `composer update` again.
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
in `.env` file give this key and you are done ``` APP_KEY=ABCDEF123ERD456EABCDEF123ERD456E ``` Still not working? If you are working from cli, reboot the server and it will. Want explanation? ok, as the error message says: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key l...
For laravel version 5.4 PHP 7.4 1. To solve **run this command** `php artisan key:generate` This will set a value for `APP_KEY=` in your `.env` file something like this: `APP_KEY=base64:trp5LQ9/TW85+17o0T7F0bZ/Ca1J9cIMgvyNIYl0k/g=` 2. Clean cache to get everything working again with the following commands: `php a...
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
You need to have **.env** on your appication folder then run: ``` $ php artisan key:generate ``` If you don't have **.env** copy from **.env.example**: ``` $ cp .env.example .env ```
If you newly create a laravel project with command like `composer create-project --prefer-dist laravel/laravel market` and deploy the new repo to the application path with cp command you may get this issue. **I use laravel 5.4** ``` roofe@www:~/market$ php artisan --version Laravel Framework 5.4.33 ``` When you cr...
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
I also had this issue. I check my environment variable value for "APP\_KEY" using `echo $APP_KEY` For me it was "lumen" which was set for another lumen project and that's why it was not working. I updated "APP\_KEY" value using `export APP_KEY=[you app_key value from .env file]` and cleared cache `php artisan config:...
Another thing to just check is that your .env file is in the www-data group (or httpd or whatever your web server group is) and that the group has read permission. On linux my permissions looked like this when I got this error: `-rw-rw-r-- 1 kevin kevin 618 Mar 16 09:32 .env` I then just removed read permission for al...
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
Run `php artisan key:generate`. Do `php artisan config:clear`, Then `php artisan config:cache` And things will start working!
Ok, this has basically already been answered, but I found a couple caveats that had be consternated, or constipated, one of those two... First, as has already been said, you should ensure you have a valid `.env` file which you can accomplish in the terminal by copying the existing `.env.example` file as such: `$ cp ....
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
Ok, this has basically already been answered, but I found a couple caveats that had be consternated, or constipated, one of those two... First, as has already been said, you should ensure you have a valid `.env` file which you can accomplish in the terminal by copying the existing `.env.example` file as such: `$ cp ....
If you newly create a laravel project with command like `composer create-project --prefer-dist laravel/laravel market` and deploy the new repo to the application path with cp command you may get this issue. **I use laravel 5.4** ``` roofe@www:~/market$ php artisan --version Laravel Framework 5.4.33 ``` When you cr...
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
You need to have **.env** on your appication folder then run: ``` $ php artisan key:generate ``` If you don't have **.env** copy from **.env.example**: ``` $ cp .env.example .env ```
Run this commands on your terminal: **php artisan config:clear** then **php artisan config:cache**
39,693,312
I installed a new fresh copy of Laravel 5.3 using composer but I'm getting this error: > > The only supported ciphers are AES-128-CBC and AES-256-CBC with the > correct key lengths. Even though my app.php file in config directory specify > > 'cipher' => 'AES-128-CBC' > > >
2016/09/26
[ "https://Stackoverflow.com/questions/39693312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576294/" ]
Run `php artisan key:generate`. Do `php artisan config:clear`, Then `php artisan config:cache` And things will start working!
Check your .env file if **APP\_KEY** is not set, it is the issue, Now run `php artisan key:generate` then run `php artisan config:cache` it will set an **APP\_KEY** key in your .env file. If **APP\_KEY** is already set run the same commands. It will update this key.
12,650,060
How can i send a iframe in email body.This is how i am simply sending a mail. ``` string getemail = textbox_email.Text; System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add(getemail); message.Subject = "Hello"; message.From = new System.Net.Mai...
2012/09/29
[ "https://Stackoverflow.com/questions/12650060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1697157/" ]
You can use either [IsBodyHtml](http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.isbodyhtml%28v=vs.100%29.aspx) property or [AlternativeViews](http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.alternateviews%28v=vs.100%29.aspx) to send HTML. If you expect that client will render co...
While it IS extremely unlikely that your email recipient's client will render the iframe, depending on your intended goal, you may want to look into the DownloadString method of the WebClient class.
11,868,906
below i have a control template that comprises of two text box. The control template is used as a grid's cell display template and the datacontext is a bindinglist of my model object (which implement INotifyPropertyChanged). The second text box is initially Collapsed. However when "Ask" and "Bid" price updates happen, ...
2012/08/08
[ "https://Stackoverflow.com/questions/11868906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480118/" ]
Set your image to `img { display: block; }`. And please next time add your code here on SO to prevent link rot and lets us easily review your code here.
Give your image a bottom vertical alignment and the space goes away. **[jsFiddle example](http://jsfiddle.net/j08691/7Knyx/10/)** ``` img { vertical-align:bottom; } ```
11,868,906
below i have a control template that comprises of two text box. The control template is used as a grid's cell display template and the datacontext is a bindinglist of my model object (which implement INotifyPropertyChanged). The second text box is initially Collapsed. However when "Ask" and "Bid" price updates happen, ...
2012/08/08
[ "https://Stackoverflow.com/questions/11868906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480118/" ]
Give your image a bottom vertical alignment and the space goes away. **[jsFiddle example](http://jsfiddle.net/j08691/7Knyx/10/)** ``` img { vertical-align:bottom; } ```
you could also margin-top property to achieve that <http://jsfiddle.net/meetravi/7Knyx/14/> P.S Its always great to avoid negative values in css if you are planning to support relatively old browsers
11,868,906
below i have a control template that comprises of two text box. The control template is used as a grid's cell display template and the datacontext is a bindinglist of my model object (which implement INotifyPropertyChanged). The second text box is initially Collapsed. However when "Ask" and "Bid" price updates happen, ...
2012/08/08
[ "https://Stackoverflow.com/questions/11868906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480118/" ]
Set your image to `img { display: block; }`. And please next time add your code here on SO to prevent link rot and lets us easily review your code here.
you could also margin-top property to achieve that <http://jsfiddle.net/meetravi/7Knyx/14/> P.S Its always great to avoid negative values in css if you are planning to support relatively old browsers
49,570,351
Safari 11 is crashing when i open web inspector. Odd thing is, It works without failing if i don't open console panel. My HTML5 application works well in all other browsers. There is no memory leaks as it is not going beyond 50MB while taking memory heaps. And no use of console methods. Is this a known issue in Safar...
2018/03/30
[ "https://Stackoverflow.com/questions/49570351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1248195/" ]
The only thing I can do to fix this is free up RAM. If I close a few applications and then try it again, it always works. Also after it crashes a few times you will not be able to inspect your device until you quit safari completely and open it again.
Some say it seems to be an hardware issue, happening only when the battery is at 100%. Have a closer look here: <https://forums.developer.apple.com/thread/92290> Maybe it helps keeping on your flashlight and camera, then establishing a cable connection and starting the web inspector then. **Anyway: This wasn't worki...
63,911,439
``` logged_at type name values 2020-08-17 00:02:22 weak AA 55 2020-08-17 00:12:20 weak AA 54 2020-08-17 00:22:24 weak AA 53 2020-08-17 00:32:25 weak AA 50 2020-08-17 00:42:28 strong AA 44 2020-08-17 00:52:22 strong AA 33 2020-08-17 01:02:20 strong AA 32 ...
2020/09/16
[ "https://Stackoverflow.com/questions/63911439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12329709/" ]
You can break it in stages : ``` # get the first values : top = df.loc[df["type"].ne(df["type"].shift())] # get the last values bottom = df.loc[df["type"].ne(df["type"].shift(-1))] #get the difference in values and generate the rank : top.assign(values=top["values"].array - bottom["values"].array, rank=...
If the dataframe is sorted by time, just remove duplicates as follows. ``` df.drop_duplicates(by = 'logged_at', keep = 'first') ```
32,885,532
I am doing setbit operation in redis to mark which users have been online on a particular day. I am doing a redis get operation to get the value of the key. ``` coffee> redis.setbit "a",7,1 true coffee> redis.setbit "d",4,1 true coffee> redis.setbit "g",1,1 true coffee> redis.setbit "h",0,1 ``` And the output is ...
2015/10/01
[ "https://Stackoverflow.com/questions/32885532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4381216/" ]
This error occurs because of utf-8 encoding. When we set the 0th bit as 1, it does not follow utf-8 rules. Now when we try to get it we get the replacement Character > > U+FFFD � replacement character used to replace an unknown or > unrepresentable character > > > and when we do a charCodeAt on it we will get 65...
The secret is to put "return\_buffers: true" when you connect. This causes buffers rather than strings to be returned on any function calls that use that redis client. ``` const client = redis.createClient({ host: '192.168.1.89', port: 6379, return_buffers: true }); ```
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Good unit tests are independent. The order in which the tests are run (or even if other tests are run at all) should not matter. Set up your fixture for each test, then tear it down (restore the state) afterwards. Most of the time you won't need a teardown method (implementation depends on the test framework) if you k...
Don't know what language you are programming with. In Java, you can create TestSuites with the JUnit API. You add single sub-tests to the TestSuite and run the TestSuite as a whole.
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Going by the strict definition of unit testing used by Glen Beck and co, it could well **actually be a bad idea** to create unit tests in your situation. What you definitely and unarguably need for a library to be used by anyone outside shouting range of your workstation is a full set of user-level API system tests. O...
Here's some best practices that will help: * Make tests independent, so they can be run alone, and in any sequence. * Start every test in a known, clean state. * Build up the environment using fixtures. Again look at db:unit. I like to have a good "canonical" state of the database, and restore it before each test (or ...
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Good unit tests are independent. The order in which the tests are run (or even if other tests are run at all) should not matter. Set up your fixture for each test, then tear it down (restore the state) afterwards. Most of the time you won't need a teardown method (implementation depends on the test framework) if you k...
Here's some best practices that will help: * Make tests independent, so they can be run alone, and in any sequence. * Start every test in a known, clean state. * Build up the environment using fixtures. Again look at db:unit. I like to have a good "canonical" state of the database, and restore it before each test (or ...
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
By "restore the state of the world" you mean clean up a database perhaps, or something similar? In which case you probably already have some unit tests which mock out your persistence layer. This would let you run unit tests in isolation, which would not depend on preserving state between tests. So that leaves you wi...
Don't know what language you are programming with. In Java, you can create TestSuites with the JUnit API. You add single sub-tests to the TestSuite and run the TestSuite as a whole.
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Going by the strict definition of unit testing used by Glen Beck and co, it could well **actually be a bad idea** to create unit tests in your situation. What you definitely and unarguably need for a library to be used by anyone outside shouting range of your workstation is a full set of user-level API system tests. O...
Read the book "XUnit Test Patterns" but Gerard Meszaros (<http://xunitpatterns.com/>). It covers the subject well.
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
By "restore the state of the world" you mean clean up a database perhaps, or something similar? In which case you probably already have some unit tests which mock out your persistence layer. This would let you run unit tests in isolation, which would not depend on preserving state between tests. So that leaves you wi...
Read the book "XUnit Test Patterns" but Gerard Meszaros (<http://xunitpatterns.com/>). It covers the subject well.
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
By "restore the state of the world" you mean clean up a database perhaps, or something similar? In which case you probably already have some unit tests which mock out your persistence layer. This would let you run unit tests in isolation, which would not depend on preserving state between tests. So that leaves you wi...
Here's some best practices that will help: * Make tests independent, so they can be run alone, and in any sequence. * Start every test in a known, clean state. * Build up the environment using fixtures. Again look at db:unit. I like to have a good "canonical" state of the database, and restore it before each test (or ...
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Going by the strict definition of unit testing used by Glen Beck and co, it could well **actually be a bad idea** to create unit tests in your situation. What you definitely and unarguably need for a library to be used by anyone outside shouting range of your workstation is a full set of user-level API system tests. O...
Good unit tests are independent. The order in which the tests are run (or even if other tests are run at all) should not matter. Set up your fixture for each test, then tear it down (restore the state) afterwards. Most of the time you won't need a teardown method (implementation depends on the test framework) if you k...
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Going by the strict definition of unit testing used by Glen Beck and co, it could well **actually be a bad idea** to create unit tests in your situation. What you definitely and unarguably need for a library to be used by anyone outside shouting range of your workstation is a full set of user-level API system tests. O...
Don't know what language you are programming with. In Java, you can create TestSuites with the JUnit API. You add single sub-tests to the TestSuite and run the TestSuite as a whole.
1,394,636
Context ------- I'm struggling to write a set of unit-tests for a library/framework I'm designing. For context, please, think of my library as an object layer over a hierarchical set of related objects. Question -------- Basically, I'm trying to adhere to the principles and best practices regarding unit testing as s...
2009/09/08
[ "https://Stackoverflow.com/questions/1394636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18865/" ]
Good unit tests are independent. The order in which the tests are run (or even if other tests are run at all) should not matter. Set up your fixture for each test, then tear it down (restore the state) afterwards. Most of the time you won't need a teardown method (implementation depends on the test framework) if you k...
Read the book "XUnit Test Patterns" but Gerard Meszaros (<http://xunitpatterns.com/>). It covers the subject well.
33,501,217
I want to order some command output (using pipeline), taking into account some field from the output. For example, if I run `l` command, I have: ``` -rw-r----- 1 matias matias 67843408 sep 11 08:55 file1 -rw-r----- 1 matias matias 1952 oct 23 12:05 file2 -rw-r----- 1 matias matias 965 oct 23 10:14 asd....
2015/11/03
[ "https://Stackoverflow.com/questions/33501217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/977081/" ]
You can use `sort` with the 7th column: ``` $ sort -k7 -n file -rw-r----- 1 matias matias 892743 sep 3 08:36 aaa.txt -rw-r----- 1 matias matias 67843408 sep 11 08:55 file1 -rw-r----- 1 matias matias 892743 ago 18 08:09 qwe -rw-r----- 1 matias matias 1952 oct 23 12:05 file2 -rw-r----- 1 matias matias ...
use `ls -t` or `ls -tr` You can google this
26,909,861
I'm getting an exception when trying to use a decimal value with FunScript. It can be reproduced simply by using: ``` Globals.window.alert(Globals.JSON.stringify(3M)) ``` The exception says: ``` System.Exception was unhandled Message: An unhandled exception of type 'System.Exception' occurred in FunScript.dll Addit...
2014/11/13
[ "https://Stackoverflow.com/questions/26909861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2660176/" ]
The decimal primitive is a [TODO feature](https://github.com/ZachBray/FunScript/blob/master/src/main/FunScript/PrimitiveTypes.fs#L23). I guess the best way to tackle it would be reimplementing the System.Decimal structure using the recently open sourced [.NET Framework reference source](http://referencesource.microsoft...
It is rather JavaScript limitation because JavaScript has only binary floating point. One of the solution would be creating your own type containing two integers: for integer part and fractional part
46,017,228
I've JSON response body then I convert it to array use `json_decode()` but when I trying loop one single array I received error > > Illegal String Offset > > > this my json response ``` array(5) { ["StartDate"]=> string(10) "2016-08-29" ["EndDate"]=> string(10) "2016-09-01" ["Currency"]=> string(3) "IDR" ["Star...
2017/09/02
[ "https://Stackoverflow.com/questions/46017228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8012110/" ]
Your response is not an array, you need to do this on the foreach ``` @if (isset($result)) @foreach ($result['Data'] as $key => $value) <div class="col-xs-6"> <ul class="list-unstyled" style="line-height: 2"> <li><span class="fa fa-circle text-success"></span> TransactionDate : <b>{{ $value['TransactionDate'] }}</...
You have to close it like this ``` { "StartDate": "2016-09-01", "EndDate": "2016-09-01", "Currency": "IDR", "StartBalance": "94163880.00", "Data": [{ "TransactionDate": "PEND", "BranchCode": "0000", "TransactionType": "D", "TransactionAmount": "1000...
41,667,637
I just started coding in swift and I am at the point that I can get a single value out of the JSON but I can't seem to get all the values out of it by looping trough the array. so my question is how do I get all the values out and view it as float or string. here is my code: ``` let url = URL(string: "http://api.fi...
2017/01/15
[ "https://Stackoverflow.com/questions/41667637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4966014/" ]
Try this code: ``` import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.getJson() } func getJson(){ let url = URL(string: "http://api.fixer.io/latest") let task = URLSession.shared.dataTask(with: url!) { (data, response, error) in if...
try this out: ``` if let currency = rates["AUD"] as? NSDictionary{ for(key,value) in currency { // the key will be your currency format and value would be your currency value } } ```
41,667,637
I just started coding in swift and I am at the point that I can get a single value out of the JSON but I can't seem to get all the values out of it by looping trough the array. so my question is how do I get all the values out and view it as float or string. here is my code: ``` let url = URL(string: "http://api.fi...
2017/01/15
[ "https://Stackoverflow.com/questions/41667637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4966014/" ]
I strongly recommend that you use [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON#loop) to deal with JSON. It's extremely easy to learn and use. first, you should install `SwiftyJSON` via CocoaPods (or any other way you like). then you can code it simply like below: ``` let url = URL(string: "http://api.fixer....
try this out: ``` if let currency = rates["AUD"] as? NSDictionary{ for(key,value) in currency { // the key will be your currency format and value would be your currency value } } ```
16,381,649
Iwonder why the out put is 0(zero) for below code snippet? Can anyone please clarify why below code output is zero. ``` <?php function a($number) { return (b($number) * $number); } function b(&$number) { ++$number; } echo a(5); // output 0(zero) ? ?> ```
2013/05/05
[ "https://Stackoverflow.com/questions/16381649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/754402/" ]
You never return any value from the function, and you're trying to `echo` the return value. ``` function b(&$number) { return ++$number; } ``` Note that this is a silly example for a function that takes its parameter by reference, since you don't have a reference to the original value `5`. Something like this wo...
The function name is b, but you are calling a... Also, you are echoing a function, that doesn't return a value. This means you are echoing a non-initialize variable. You must either return a value: ``` return ++$number; ``` or echo the variable directly: ``` $number = 5; b($number); echo $number; ...
2,319
They're both similar in execution and used as counters against hip techniques. Are there any reasons to prefer using one instead of the other in various situations?
2013/10/30
[ "https://martialarts.stackexchange.com/questions/2319", "https://martialarts.stackexchange.com", "https://martialarts.stackexchange.com/users/1437/" ]
I can’t comment, so I'll answer it here instead. As @Dave Liepmann said, it depends on your strengh and your ability. Utsuri Goshi is **hard** to do. The hardest move I've done, seriously. Using the “right” move is always a decision based on your opponent's reaction. If you start and manage to raise him off his fee...
I don't have an *utsuri goshi*, but I like *ushiro goshi* when my opponent hasn't broken my balance forward. After a successful hip block, *ushiro goshi* often feels like just an extra little "pop" of my hips to send someone up. My understanding is that *utsuri goshi* is a somewhat more difficult and skillful throw, ...
52,294,299
I have an application that requires to open port `80`. In accordance to [this](https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443#892391), I gave the binary capabilities to open low ports. Also I gave capabilities to `gdb` itself. When I run the binary, port is opened successfull...
2018/09/12
[ "https://Stackoverflow.com/questions/52294299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1132871/" ]
You haven't included signal.h. You're including some C++ standard library headers, and as a side effect on MacOS, these happen to include signal.h. However, that isn't specified to happen so you can't rely on it working in different implementations of those headers. Try adding: ``` #include <signal.h> ``` at the t...
On Linux the header file to include is ``` #include <signal.h> ``` On MacOS the equivalent header file to include is ``` #include <csignal.h> ``` Depending on your OS, header files always change. They should both do the same thing though
29,899,794
I am following the instructions here: <https://spark.apache.org/docs/latest/quick-start.html> to create a simple application that will run on a local standalone Spark build. In my system I have Scala 2.9.2 and sbt 0.13.7. When I write in my `simple.sbt` the following: `scalaVersion := "2.9.2"` after I use `sbt packa...
2015/04/27
[ "https://Stackoverflow.com/questions/29899794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2711645/" ]
Scala is not a package, it is a library that executes on top of the Java runtime. Likewise, the Scala compiler `scalac` runs on top of a Java runtime. The fact that you have a version of Scala installed in your "system" is a convenience, but is not in any way required. Therefore, it is entirely possible to launch `sbt...
As @noahlz said, you don't need Scala on your system as sbt will fetch it for you. The issue you're having is that there is not `spark-core` version `1.3.1` for Scala 2.9.2. From what I can see in Maven Central (searching for [spark-core](http://search.maven.org/#search|ga|1|spark-core)) there are only builds of `spa...
8,518,999
i have a aspx page which is inherited from the master page and i am dynamically adding the Webuser control inside the placeholder in aspx page . i want to acces the label which is inside the master page in my web user control . thanks
2011/12/15
[ "https://Stackoverflow.com/questions/8518999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034944/" ]
There's a pretty nice [article](https://web.archive.org/web/20211020103719/https://www.4guysfromrolla.com/articles/062409-1.aspx#postadlink) on this subject by 4guysfromrolla with tons of useful links like this [one](http://odetocode.com/code/450.aspx).
``` ((Label)this.Page.Master.FindControl("YourLabelNameHere")).Text = "Hello"; ```
207,557
We're using InnoDB tables as the back end of a web application, and everything was fine for about two years until we had to restart MySQL a few weeks ago. (We hadn't disabled reverse DNS lookups, even though we weren't really using them, but our hosting system suddenly stopped responding to those requests. They're now ...
2010/11/30
[ "https://serverfault.com/questions/207557", "https://serverfault.com", "https://serverfault.com/users/28981/" ]
Well, do note that if I recall well (it's been a while since I did DB work) COUNT(\*) queries without a WHERE clause on innodb tables are notoriously slower than on MyISAM and Memory tables. Also, is this by any chance a Xen DomU? What is the frontend language? If PHP, is it using MySQL or MySQLi? Are they using pers...
There are likely many reasons for this. In our particular case it was happening when the number of queries seen spiked during a short time frame which was causing thrashing in the CPU as the number of threads exceeded 4x our core count on the server. Our issue is the number of queries spiking is actually normal for our...
207,557
We're using InnoDB tables as the back end of a web application, and everything was fine for about two years until we had to restart MySQL a few weeks ago. (We hadn't disabled reverse DNS lookups, even though we weren't really using them, but our hosting system suddenly stopped responding to those requests. They're now ...
2010/11/30
[ "https://serverfault.com/questions/207557", "https://serverfault.com", "https://serverfault.com/users/28981/" ]
This turned out to be a flaw in the combination of [`innodb_file_per_table`](http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_file_per_table), `default-storage-engine = innodb`, and a frequently-accessed page that created a temporary table. Each time a connection closed, it would drop the tab...
There are likely many reasons for this. In our particular case it was happening when the number of queries seen spiked during a short time frame which was causing thrashing in the CPU as the number of threads exceeded 4x our core count on the server. Our issue is the number of queries spiking is actually normal for our...
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In the end I solved this by creating a bootable USB with the Windows ISO on it, and ran the "Repair" tool twice. I essentially followed the instructions at: <http://en.community.dell.com/support-forums/software-os/w/microsoft_os/3316.2-1-microsoft-windows-7-official-iso-download-links-digital-river.aspx> * In my case...
In case that you only have windows, you have to boot from a cd. There is no other option, I have searched a lot for other options but they don't exist. The only other option to solve problems on Windows is to press F8 by booting and opening a recovery console, but it won't work in your case.
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In case that you only have windows, you have to boot from a cd. There is no other option, I have searched a lot for other options but they don't exist. The only other option to solve problems on Windows is to press F8 by booting and opening a recovery console, but it won't work in your case.
A factory reset will also fix this problem but be sure to back up your files when prompted to.
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In case that you only have windows, you have to boot from a cd. There is no other option, I have searched a lot for other options but they don't exist. The only other option to solve problems on Windows is to press F8 by booting and opening a recovery console, but it won't work in your case.
Solution: The best and easiest option is to remove your hard drive and connect it to an external HDD enclosure. Connect the external HDD to another computer. * Right Click My computer Click manage * Select Disk manager * Right Click the recovery drive * Select "Mark Partition as active" Eject the external HDD from th...
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In the end I solved this by creating a bootable USB with the Windows ISO on it, and ran the "Repair" tool twice. I essentially followed the instructions at: <http://en.community.dell.com/support-forums/software-os/w/microsoft_os/3316.2-1-microsoft-windows-7-official-iso-download-links-digital-river.aspx> * In my case...
The active partition is the partition which the system will use to boot from. In your case, you've changed it so that the required bootmgr could not be loaded. You need to set the partition named 'Reserved by system' to active. This partition usually has no letter assigned to it. You can set this with a bootable live U...
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
The active partition is the partition which the system will use to boot from. In your case, you've changed it so that the required bootmgr could not be loaded. You need to set the partition named 'Reserved by system' to active. This partition usually has no letter assigned to it. You can set this with a bootable live U...
A factory reset will also fix this problem but be sure to back up your files when prompted to.
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
The active partition is the partition which the system will use to boot from. In your case, you've changed it so that the required bootmgr could not be loaded. You need to set the partition named 'Reserved by system' to active. This partition usually has no letter assigned to it. You can set this with a bootable live U...
Solution: The best and easiest option is to remove your hard drive and connect it to an external HDD enclosure. Connect the external HDD to another computer. * Right Click My computer Click manage * Select Disk manager * Right Click the recovery drive * Select "Mark Partition as active" Eject the external HDD from th...
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In the end I solved this by creating a bootable USB with the Windows ISO on it, and ran the "Repair" tool twice. I essentially followed the instructions at: <http://en.community.dell.com/support-forums/software-os/w/microsoft_os/3316.2-1-microsoft-windows-7-official-iso-download-links-digital-river.aspx> * In my case...
A factory reset will also fix this problem but be sure to back up your files when prompted to.
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
In the end I solved this by creating a bootable USB with the Windows ISO on it, and ran the "Repair" tool twice. I essentially followed the instructions at: <http://en.community.dell.com/support-forums/software-os/w/microsoft_os/3316.2-1-microsoft-windows-7-official-iso-download-links-digital-river.aspx> * In my case...
Solution: The best and easiest option is to remove your hard drive and connect it to an external HDD enclosure. Connect the external HDD to another computer. * Right Click My computer Click manage * Select Disk manager * Right Click the recovery drive * Select "Mark Partition as active" Eject the external HDD from th...
556,386
I have a "Recovery" partition which I mistakenly thought was redundant after reinstalling everything to C:. "Recovery" was previously the "Active" partition. I set C: as the "Active" directory in disk manager (I am using Windows 7). When attempting to boot, the laptop now returns "BOOTMGR is missing". I can go to BIOS...
2013/02/23
[ "https://superuser.com/questions/556386", "https://superuser.com", "https://superuser.com/users/201796/" ]
Solution: The best and easiest option is to remove your hard drive and connect it to an external HDD enclosure. Connect the external HDD to another computer. * Right Click My computer Click manage * Select Disk manager * Right Click the recovery drive * Select "Mark Partition as active" Eject the external HDD from th...
A factory reset will also fix this problem but be sure to back up your files when prompted to.
27,633,006
I am trying to search for a particular string in every line of a log file, and if that matches, i need to be able to get the Host information from that particular error. Consider the log entries as below : ``` 05-05-2014 00:02:02,771 [HttpProxyServer-thread-1314] ERROR fd - Empty user name specified in NTLM authenti...
2014/12/24
[ "https://Stackoverflow.com/questions/27633006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4383881/" ]
Just insert a ``` line = next(log_file) ``` between the two statements you currently have in the `for` loop.
Either write a regex that matches 2 successive lines from which you can extract the Host info of each, and loop over the matches instead of reading the file line-by-line, or add a flag that gets set when a line matches the error, and if that flag is set for a given line, you extract the host info & reset the flag inste...
27,633,006
I am trying to search for a particular string in every line of a log file, and if that matches, i need to be able to get the Host information from that particular error. Consider the log entries as below : ``` 05-05-2014 00:02:02,771 [HttpProxyServer-thread-1314] ERROR fd - Empty user name specified in NTLM authenti...
2014/12/24
[ "https://Stackoverflow.com/questions/27633006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4383881/" ]
Just insert a ``` line = next(log_file) ``` between the two statements you currently have in the `for` loop.
Try this: ``` >>> import re >>> fp = open('log_file') >>> line = fp.readline() >>> while line: ... if 'Empty user name specified in NTLM authentication. Prompting for auth again.' in line: ... host = re.search(r'Host=(\D+.\D+.\D+,)', fp.readline()).group(1) ... # ...
27,633,006
I am trying to search for a particular string in every line of a log file, and if that matches, i need to be able to get the Host information from that particular error. Consider the log entries as below : ``` 05-05-2014 00:02:02,771 [HttpProxyServer-thread-1314] ERROR fd - Empty user name specified in NTLM authenti...
2014/12/24
[ "https://Stackoverflow.com/questions/27633006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4383881/" ]
Try this: ``` >>> import re >>> fp = open('log_file') >>> line = fp.readline() >>> while line: ... if 'Empty user name specified in NTLM authentication. Prompting for auth again.' in line: ... host = re.search(r'Host=(\D+.\D+.\D+,)', fp.readline()).group(1) ... # ...
Either write a regex that matches 2 successive lines from which you can extract the Host info of each, and loop over the matches instead of reading the file line-by-line, or add a flag that gets set when a line matches the error, and if that flag is set for a given line, you extract the host info & reset the flag inste...
358,704
A text book proposed that "when comparing fractions ,if the compared fractions's are such that numerator is smaller than denominator ,then fraction with more difference(absolute) between numerator and denominator is the smallest among the fractions compared " And I found many text books support this. Even on looking ...
2013/04/11
[ "https://math.stackexchange.com/questions/358704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30423/" ]
I have never seen this claim in any textbook; in any case it's **wrong**. The claim seems to be that if you have two fractions $\frac{a}{b}$ and $\frac{c}{d}$ with $a < b$ and $c < d$, then $|a - b| < |c - d| \iff \frac{a}{b} < \frac{c}{d}$. This is false. We can write $\frac{a}{b} = 1 - \frac{b-a}{b}$ and $\frac{c}{d...
The statement is incorrect, even without considering possibly special cases. Take for example $$\frac{901}{1000}<\frac{9011}{10000}.$$
358,704
A text book proposed that "when comparing fractions ,if the compared fractions's are such that numerator is smaller than denominator ,then fraction with more difference(absolute) between numerator and denominator is the smallest among the fractions compared " And I found many text books support this. Even on looking ...
2013/04/11
[ "https://math.stackexchange.com/questions/358704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30423/" ]
The statement is incorrect, even without considering possibly special cases. Take for example $$\frac{901}{1000}<\frac{9011}{10000}.$$
Here is the comparison criterion for fractions in the unit interval. You omit a $\rm\,\color{#c00}{key\ hypothesis}.$ **Lemma** $\rm\ \ \color{#c00}{ A>a},\,\ \color{blue}{b\!-\!a > B\!-\!A}\ \Rightarrow\ A/B > a/b,\ \ $ for $\rm\ \ A/B,\,\color{#0a0}{a/b \,\in\, (0,1)},\ \ B,b> 0\:$ **Proof** $\rm\ \ \ \ \displaysty...
358,704
A text book proposed that "when comparing fractions ,if the compared fractions's are such that numerator is smaller than denominator ,then fraction with more difference(absolute) between numerator and denominator is the smallest among the fractions compared " And I found many text books support this. Even on looking ...
2013/04/11
[ "https://math.stackexchange.com/questions/358704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30423/" ]
The statement is incorrect, even without considering possibly special cases. Take for example $$\frac{901}{1000}<\frac{9011}{10000}.$$
The test is as follows: 1. Given two Proper Fractions n/d & N/D where D>d, If (D-N) ≤ (d-n) then N/D>n/d 2. Given two Improper Fractions n/d and N/D where D>d, If (N-D) ≤ (n-d) then n/d>N/D (Note: the conditions are sufficient but not necessary).
358,704
A text book proposed that "when comparing fractions ,if the compared fractions's are such that numerator is smaller than denominator ,then fraction with more difference(absolute) between numerator and denominator is the smallest among the fractions compared " And I found many text books support this. Even on looking ...
2013/04/11
[ "https://math.stackexchange.com/questions/358704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30423/" ]
I have never seen this claim in any textbook; in any case it's **wrong**. The claim seems to be that if you have two fractions $\frac{a}{b}$ and $\frac{c}{d}$ with $a < b$ and $c < d$, then $|a - b| < |c - d| \iff \frac{a}{b} < \frac{c}{d}$. This is false. We can write $\frac{a}{b} = 1 - \frac{b-a}{b}$ and $\frac{c}{d...
Here is the comparison criterion for fractions in the unit interval. You omit a $\rm\,\color{#c00}{key\ hypothesis}.$ **Lemma** $\rm\ \ \color{#c00}{ A>a},\,\ \color{blue}{b\!-\!a > B\!-\!A}\ \Rightarrow\ A/B > a/b,\ \ $ for $\rm\ \ A/B,\,\color{#0a0}{a/b \,\in\, (0,1)},\ \ B,b> 0\:$ **Proof** $\rm\ \ \ \ \displaysty...
358,704
A text book proposed that "when comparing fractions ,if the compared fractions's are such that numerator is smaller than denominator ,then fraction with more difference(absolute) between numerator and denominator is the smallest among the fractions compared " And I found many text books support this. Even on looking ...
2013/04/11
[ "https://math.stackexchange.com/questions/358704", "https://math.stackexchange.com", "https://math.stackexchange.com/users/30423/" ]
I have never seen this claim in any textbook; in any case it's **wrong**. The claim seems to be that if you have two fractions $\frac{a}{b}$ and $\frac{c}{d}$ with $a < b$ and $c < d$, then $|a - b| < |c - d| \iff \frac{a}{b} < \frac{c}{d}$. This is false. We can write $\frac{a}{b} = 1 - \frac{b-a}{b}$ and $\frac{c}{d...
The test is as follows: 1. Given two Proper Fractions n/d & N/D where D>d, If (D-N) ≤ (d-n) then N/D>n/d 2. Given two Improper Fractions n/d and N/D where D>d, If (N-D) ≤ (n-d) then n/d>N/D (Note: the conditions are sufficient but not necessary).
26,876,461
I want to pass an SQL command to a variable and execute aggregate function for that. but when I run it, this error is shown, and nothing appear for @cnt value , *Must declare the variable '@cnt'* What's my mistake ? ``` DECLARE @ret varchar(300); set @ret = ''; declare @cnt int; set @ret = 'select @cnt = count(*)...
2014/11/11
[ "https://Stackoverflow.com/questions/26876461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3466755/" ]
You could use sp\_executesql to access a variable inside of your dynamic SQL String: ``` DECLARE @SQLString nvarchar(500); DECLARE @ParmDefinition nvarchar(500); DECLARE @cnt varchar(30); SET @SQLString = N'SELECT @cntOUT = count(1) from tbl1'; SET @ParmDefinition = N'@cntOUT varchar(30) OUTPUT'; EXECUTE sp_executes...
The exec statement signals the end of a batch, so the print statement doesn't know about @cnt. Try this instead: ``` DECLARE @ret varchar(300) set @ret = '' set @ret = 'declare @cnt int select @cnt = count(*) from [Load].RINData print @cnt' EXEC (@ret) ```
114,839
I am preparing myself for a job interview for a lecturer position. According to many articles on academic job interviews, a common question to be prepared for is that " what can you do to enhance our department?" I'm not sure what exactly the committee would mean by that? I understand that I should tailor my own answer...
2018/08/06
[ "https://academia.stackexchange.com/questions/114839", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/41930/" ]
Well, what can you do that nobody else in the department can? Some possible examples: 1. If you've had experience teaching electronically, and the department doesn't currently offer e-learning, you could point this out. 2. If you have expertise in a certain subject that nobody else in the department has, you could poi...
It is an obviously open ended question that is intended to be hard. It will be used differently by different people. Often it is used because they can't think of anything very specific to ask you. In the book Siddhartha by Hesse, Siddhartha is asked the question by a potential employer. His response is "I can think. I ...
114,839
I am preparing myself for a job interview for a lecturer position. According to many articles on academic job interviews, a common question to be prepared for is that " what can you do to enhance our department?" I'm not sure what exactly the committee would mean by that? I understand that I should tailor my own answer...
2018/08/06
[ "https://academia.stackexchange.com/questions/114839", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/41930/" ]
Well, what can you do that nobody else in the department can? Some possible examples: 1. If you've had experience teaching electronically, and the department doesn't currently offer e-learning, you could point this out. 2. If you have expertise in a certain subject that nobody else in the department has, you could poi...
This is an opportunity to sell yourself. The question is vague which allows you to take the conversation to whatever topic you want to bring up. Teaching? Research? Potential collaborators? Here is a short list of ideas that I used when I got questions like this: * I can teach X, which I think could help the departm...
114,839
I am preparing myself for a job interview for a lecturer position. According to many articles on academic job interviews, a common question to be prepared for is that " what can you do to enhance our department?" I'm not sure what exactly the committee would mean by that? I understand that I should tailor my own answer...
2018/08/06
[ "https://academia.stackexchange.com/questions/114839", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/41930/" ]
This is an update for those who are planning to go down this route: I had my interview. I was asked a lot of questions regarding my teaching philosophy and experience. * I was asked why I like to teach at their university?(to protect my privacy name of university will remain anonymous-but lets say it's a prestigous r...
It is an obviously open ended question that is intended to be hard. It will be used differently by different people. Often it is used because they can't think of anything very specific to ask you. In the book Siddhartha by Hesse, Siddhartha is asked the question by a potential employer. His response is "I can think. I ...
114,839
I am preparing myself for a job interview for a lecturer position. According to many articles on academic job interviews, a common question to be prepared for is that " what can you do to enhance our department?" I'm not sure what exactly the committee would mean by that? I understand that I should tailor my own answer...
2018/08/06
[ "https://academia.stackexchange.com/questions/114839", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/41930/" ]
This is an update for those who are planning to go down this route: I had my interview. I was asked a lot of questions regarding my teaching philosophy and experience. * I was asked why I like to teach at their university?(to protect my privacy name of university will remain anonymous-but lets say it's a prestigous r...
This is an opportunity to sell yourself. The question is vague which allows you to take the conversation to whatever topic you want to bring up. Teaching? Research? Potential collaborators? Here is a short list of ideas that I used when I got questions like this: * I can teach X, which I think could help the departm...
48,717,580
Angular coders may recognize this code as a modified [Tour of Heroes](https://angular.io/tutorial) project. How do I set the width of the "badge" CSS class dynamically such that all badges in the `ul` are the same width, fitting the longest id? So, the badge width property should be 2ch with the given dummy data which ...
2018/02/10
[ "https://Stackoverflow.com/questions/48717580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > I am wondering how the compiler handles this situation. Are the macro parameters still used for compiling? > > > Macros are processed in the pre-processing stage. If the pre-processor is able to deal with the extra arguments used in the usage of the macro, the only thing it can do is drop those parameters in t...
As per the law, a macro function must declare as many parameters as you call it with. So calling your macro ``` #define Logger() ``` as `Logger(LogLevel::Info, "logging started")` results in an error. MSVC probably allows it because it isn't standard-compliant. There's not much to reason further (which is my answe...
22,447,481
What is wrong with my query? Can somebody help me please? I get this errormessage > > "Unknown column 'wp\_gdsr\_data\_article. > (SUM(user\_voters)+SUM(visitor\_voters))' in 'order clause'" > > > but the '`wp_gdsr_data_article`' colum exist ``` SELECT * FROM `wp_posts` INNER JOIN wp_term_relation...
2014/03/17
[ "https://Stackoverflow.com/questions/22447481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2306309/" ]
You are using an expression in the `ORDER` clause which not a table's column. Hence you can't use a table identifier on the outcome of an expression. This is wrong. ``` ORDER BY `wp_gdsr_data_article`.`(SUM(user_voters)+SUM(visitor_voters))` DESC ``` Change it to: ``` ORDER BY (SUM(user_voters)+SUM(visitor_vo...
Remove quotes from all columns and tablenames in your statement. Besides the Order by part should base on a column or an evaluated value in our statement, the way you use it is wrong. you will need to evaluate the part which you use in the order by section before using it for the order by, something like this (untested...
22,447,481
What is wrong with my query? Can somebody help me please? I get this errormessage > > "Unknown column 'wp\_gdsr\_data\_article. > (SUM(user\_voters)+SUM(visitor\_voters))' in 'order clause'" > > > but the '`wp_gdsr_data_article`' colum exist ``` SELECT * FROM `wp_posts` INNER JOIN wp_term_relation...
2014/03/17
[ "https://Stackoverflow.com/questions/22447481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2306309/" ]
You are using an expression in the `ORDER` clause which not a table's column. Hence you can't use a table identifier on the outcome of an expression. This is wrong. ``` ORDER BY `wp_gdsr_data_article`.`(SUM(user_voters)+SUM(visitor_voters))` DESC ``` Change it to: ``` ORDER BY (SUM(user_voters)+SUM(visitor_vo...
Try this ``` SELECT *, (SUM(wp_gdsr_data_article.user_voters)+SUM(wp_gdsr_data_article.visitor_voters)) AS someSum FROM `wp_posts` INNER JOIN wp_term_relationships ON wp_term_relationships.object_id = ID AND wp_term_relationships.term_taxonomy_id = 1 INNER JOIN wp_gdsr_data_article ON post_id = ID WHERE `post_status` ...
1,610,587
I recently switched from Ubuntu to macOS Big Sur 11.1, and Apple is using `zsh` as their default shell .The `.zsh_sessions` folder is taking up about 100 MB and I want to disable it completely, although I could delete normally. I have added following in my `.zshrc` but it was of no use: ```bash set hist_ignore_all_du...
2020/12/17
[ "https://superuser.com/questions/1610587", "https://superuser.com", "https://superuser.com/users/1252304/" ]
The code that sets up macOS's "Save/Restore Shell State" feature for Zsh can be found in `/etc/zshrc_Apple_Terminal`. As explained in that file, to disable this feature, you need to do the following: 1. In your home dir, create a plain text file named `.zprofile`. 2. In this file, add the following: ```bash export SH...
You can switch to bash, and bash also logs sessions in an analogous ~/.bash\_sessions file, or folder - if you prefer, everything in UNIX is actually a file. But, to prevent the creation of sessions files in /bin/bash, "touch ~/.bash\_sessions\_disable" If you don't like the message about apple switching to zsh, you d...
18,603,702
I'm not sure about the title, I tried my best. I have a table displayed with information from a database using this file display.php ``` <?php mysql_connect("localhost", "root", "root") or die(mysql_error()); mysql_select_db("tournaments") or die(mysql_error()); $result = mysql_query("SELECT * FROM tour...
2013/09/04
[ "https://Stackoverflow.com/questions/18603702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2288508/" ]
``` echo '<td><a href="join.php?name='.$row['name'].'&tourname='.$row['tour_name'].'">Join</a></td>' ```
There are many way to approach. The easiest way is just `echo '<a href="join.php?name=' . $row['col_name'] . '">JOIN</a>';` or you can use a form with hidden input and submit button. BUT Your code is really a mess, try to make your code more maintainable and readable. And do NOT use any `mysql_*` functions, they ar...
37,853,548
I need to scrape roughly 30GB of JSON data from a website API as quickly as possible. I don't need to parse it -- I just need to save everything that shows up on each API URL. * I can request quite a bit of data at a time -- say 1MB or even 50MB 'chunks' (API parameters are encoded in the URL and allow me to select ho...
2016/06/16
[ "https://Stackoverflow.com/questions/37853548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3580621/" ]
You are parsing the content and then serializing it again. You can just write the content directly to a file. ``` curr_url_request = requests.get(encoded_URL_i, timeout=timeout_secs) if curr_url_request.ok: with open('json_output.txt', 'w') as outfile: outfile.write(curr_url_request.content) ``` That pro...
`tornado` has a very powerful asynchronous client. Here's a basic code that may do the trick: ``` from tornado.httpclient import AsyncHTTPClient import tornado URLS = [] http_client = AsyncHTTPClient() loop = tornado.ioloop.IOLoop.current() def handle_request(response): if response.code == 200: with open...
43,453,236
In html when creating tabs, I can set Paris tab active(hard coded in html with "style="display: block;"). So, when page is loaded the active tab(Paris) would show. **Problem** When I click on different tab (London) and hit refresh it shows Paris again. How can I hit refresh and show me the information of the tab tha...
2017/04/17
[ "https://Stackoverflow.com/questions/43453236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7032335/" ]
To avoid the default margins in general, you can add `margin: 0;` to `html` and `body`. To place your absolutely positioned menu *behind* the `h2`element, you can apply `z-index: -1`, which moves it behind its parent element. In my snippet below I also changed the text-centering to right alignment and added a padding...
Add `padding-top: 50px` (the menu height) to `body`. ```css body { padding-top: 50px; } #mainMenu { font-family:Arial, Times, sans-serif; list-style-type:none; padding:0; } #mainMenu a { text-decoration:none; margin:5px; padding:2px; color:SeaGreen; font-weight:bold; } #mainMenu a:hover { col...
43,453,236
In html when creating tabs, I can set Paris tab active(hard coded in html with "style="display: block;"). So, when page is loaded the active tab(Paris) would show. **Problem** When I click on different tab (London) and hit refresh it shows Paris again. How can I hit refresh and show me the information of the tab tha...
2017/04/17
[ "https://Stackoverflow.com/questions/43453236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7032335/" ]
To avoid the default margins in general, you can add `margin: 0;` to `html` and `body`. To place your absolutely positioned menu *behind* the `h2`element, you can apply `z-index: -1`, which moves it behind its parent element. In my snippet below I also changed the text-centering to right alignment and added a padding...
Position in css is tricky thing, everyone uses absolute positioning for placement of element.but before using it. you need to know about what the position is all about. when we use position:absolute then element act like it is floating on top of all element.while using absolute positioning element goes out from html no...
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
> > Here is how much the hour hand travels per hour, minute, second: > > > * Per Hour: > $$\text{H}=\frac{360^{\circ}}{12\space\text{hours}}=30^{\circ}\text{/}\space\text{hour}$$ > * Per Minute: > $$\text{M}=\frac{\text{H}^{\circ}}{60\space\text{minutes}}=\left(\frac{1}{2}\right)^{\circ}\text{/}\space\text{minute}$$...
The time in minutes (let's ignore the seconds, as there are none here) is 6\*60 + 5 = 365 minutes. The angle for a hand is `360° * time / (time per 360°)` The angle for the hour hand is ``` 360° * [365 / (12*60)] = 182.5 ``` The angle for the minute hand is ``` (360° * 365 / 60) % 360 = 30 ``` The angle betwee...
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
> > Here is how much the hour hand travels per hour, minute, second: > > > * Per Hour: > $$\text{H}=\frac{360^{\circ}}{12\space\text{hours}}=30^{\circ}\text{/}\space\text{hour}$$ > * Per Minute: > $$\text{M}=\frac{\text{H}^{\circ}}{60\space\text{minutes}}=\left(\frac{1}{2}\right)^{\circ}\text{/}\space\text{minute}$$...
Your approach is correct, but the hour is $6+\frac{5}{60}=\frac{73}{12}$, not $\frac{73}{2}$. This yields an angle of $\frac{73}{12}\cdot30^\circ$ for the hour hand, and $6^\circ\cdot 5=30^\circ$ for the minute hand. Thus the end result is $\frac{73}{12}\cdot30^\circ-30^\circ=152.5^\circ$
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
> > Here is how much the hour hand travels per hour, minute, second: > > > * Per Hour: > $$\text{H}=\frac{360^{\circ}}{12\space\text{hours}}=30^{\circ}\text{/}\space\text{hour}$$ > * Per Minute: > $$\text{M}=\frac{\text{H}^{\circ}}{60\space\text{minutes}}=\left(\frac{1}{2}\right)^{\circ}\text{/}\space\text{minute}$$...
Let $\alpha$ be the angle in degrees of the hour hand, measured with reference to $12$ and $\beta$ be the angle in degrees of the minute hand measured with reference to $12$. At 6:05, the minute hand has moved $\frac{1}{12}$ of the way around the clock. Thus, $\beta=\frac{360^{\circ}}{12}=30^{\circ}$. The hour hand ...
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
Think of it this way: five minutes after six, the minute hand is $\frac1{12}$ of the circle ahead from 12, while the hour hand has advanced $\frac1{12}$ of the way towards 7 from 6, or $\frac1{144}$ of the circle ahead. The initial angle between the two hands is $\frac12$ of the circle, so the solution is $$\frac12-\fr...
Let $\alpha$ be the angle in degrees of the hour hand, measured with reference to $12$ and $\beta$ be the angle in degrees of the minute hand measured with reference to $12$. At 6:05, the minute hand has moved $\frac{1}{12}$ of the way around the clock. Thus, $\beta=\frac{360^{\circ}}{12}=30^{\circ}$. The hour hand ...
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
> > Here is how much the hour hand travels per hour, minute, second: > > > * Per Hour: > $$\text{H}=\frac{360^{\circ}}{12\space\text{hours}}=30^{\circ}\text{/}\space\text{hour}$$ > * Per Minute: > $$\text{M}=\frac{\text{H}^{\circ}}{60\space\text{minutes}}=\left(\frac{1}{2}\right)^{\circ}\text{/}\space\text{minute}$$...
The hours hand revolves $360°/(12\cdot60)=0.5°$ per minute and the minutes hand $360°/60=6°$ per minute, so that the angle increases by $5.5°$ per minute. Hence working modulo $360°$, $$(6\cdot60+5)\cdot5.5°=2007.5°\equiv-152.5°=-152°30'.$$ The negative sign is because the hours hand is ahead.
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
Your approach is correct, but the hour is $6+\frac{5}{60}=\frac{73}{12}$, not $\frac{73}{2}$. This yields an angle of $\frac{73}{12}\cdot30^\circ$ for the hour hand, and $6^\circ\cdot 5=30^\circ$ for the minute hand. Thus the end result is $\frac{73}{12}\cdot30^\circ-30^\circ=152.5^\circ$
The time in minutes (let's ignore the seconds, as there are none here) is 6\*60 + 5 = 365 minutes. The angle for a hand is `360° * time / (time per 360°)` The angle for the hour hand is ``` 360° * [365 / (12*60)] = 182.5 ``` The angle for the minute hand is ``` (360° * 365 / 60) % 360 = 30 ``` The angle betwee...
1,893,955
> > What is the angle between the hour and minute hands of a clock at 6:05? > > > I have tried this Hour Hand: 12 hour = 360° 1 hr = 30° Total Hour above the Clock is $\frac{73}2$ hours In Minute Hand: 1 Hour = 360° 1 minutes = 6° Total Minutes covered by $6\times 5= 30$ $\frac{73}{2} \cdot30-30=345...
2016/08/16
[ "https://math.stackexchange.com/questions/1893955", "https://math.stackexchange.com", "https://math.stackexchange.com/users/359877/" ]
The hours hand revolves $360°/(12\cdot60)=0.5°$ per minute and the minutes hand $360°/60=6°$ per minute, so that the angle increases by $5.5°$ per minute. Hence working modulo $360°$, $$(6\cdot60+5)\cdot5.5°=2007.5°\equiv-152.5°=-152°30'.$$ The negative sign is because the hours hand is ahead.
The time in minutes (let's ignore the seconds, as there are none here) is 6\*60 + 5 = 365 minutes. The angle for a hand is `360° * time / (time per 360°)` The angle for the hour hand is ``` 360° * [365 / (12*60)] = 182.5 ``` The angle for the minute hand is ``` (360° * 365 / 60) % 360 = 30 ``` The angle betwee...