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
10,372,100
``` ManageStock2.java:104: error: method writeUTF in class RandomAccessFile cannot b e applied to given types; in.writeUTF(authors , titles ,ISBN); ^ required: String found: String,String,String reason: actual and formal argument li...
2012/04/29
[ "https://Stackoverflow.com/questions/10372100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1347515/" ]
The function [takes one argument](http://docs.oracle.com/javase/1.4.2/docs/api/java/io/RandomAccessFile.html#writeUTF%28java.lang.String%29), and you're supplying three. Split the call into three: ``` in.writeUTF(authors); in.writeUTF(titles); in.writeUTF(ISBN); ``` This writes the three strings one after another. I...
Like the error message says, you invoked `writeUTF` with **three** arguments, but it takes **[only one](http://docs.oracle.com/javase/6/docs/api/java/io/RandomAccessFile.html#writeUTF%28java.lang.String%29)**: > > public final void `writeChars(String s)` > throws IOException > > > Writes a string to the file as a ...
39,376,986
I am trying to filter on a positional variable. ``` X = FILTER C BY($14 matches '.*USD.*'); STORE X into '$output' using PigStorage(','); ``` Above statement doesn't work, but if I try to just output $14 ``` E = FOREACH C GENERATE FLATTEN($14); STORE C into '$output' using PigStorage(','); ``` It works fine Samp...
2016/09/07
[ "https://Stackoverflow.com/questions/39376986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4109440/" ]
By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use. Go to `Structure -> Blocks` and find block called "**Search form**". Now all you have to do ...
See <https://drupal.stackexchange.com/q/30633/101329>, the "[Admin Views](https://www.drupal.org/project/admin_views)" module lets you configure the search form as you like.
9,219,061
I have been trying to deploy a Rail 3.1.1 app on CentOS 6 This is the error I am getting ``` Error Compiling CSS Errno::ENOENT: No Such File or Directory - /var/www/vhosts/MySite/MyAPP/tmp/cache/assets/sprockets%t43t34t34t...t34t-r32r-r23.lock /usr/local/lib/ruby/1.9.1/tempfile.rb:343:in 'rmdir' ``` I appreciate t...
2012/02/09
[ "https://Stackoverflow.com/questions/9219061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1200678/" ]
There were actually 2 problems. First the permissions were wrong. and secondly like Nerian said, you have to clear your tmp folder. **To set the correct permissions** ``` chown apache.root yourapp -R chmod 755 yourapp -R ``` **To clear you tmp folder** ``` rake tmp:pids:clear rake tmp:sessions:clear r...
If you are using an Apache server you simply need to make sure the apache account www-data can make executions in the directory. ``` chown -R www-data:www-data . service apache2 reload ```
8,510,168
I want to write such a code for two matrixes: ``` x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; ``` How can I find out the mean value of each group of numbers in y, that have the same index in x? My algorithm can look like: ``` If x(1)=x(2) counter1=1 sum1=y(1)+y(2) x(2)=x(3) counter1=2 sum1=...
2011/12/14
[ "https://Stackoverflow.com/questions/8510168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1018331/" ]
If I understood you correctly, you want the mean of each group of numbers that have the same index in "x". In that case... ``` function FindAverages x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; means = []; indexes = unique(x); for i=1:numel(indexes) index = indexes(i); indexInY = (x==index); me...
One solution is to use [GRPSTATS](http://www.mathworks.com/help/toolbox/stats/grpstats.html) function available in Statistical Toolbox. It can apply a function by groups: ``` x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; grpstats(y,x,@mean) ``` Alternative option (if you don't have Statistical Toolbox, for...
8,510,168
I want to write such a code for two matrixes: ``` x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; ``` How can I find out the mean value of each group of numbers in y, that have the same index in x? My algorithm can look like: ``` If x(1)=x(2) counter1=1 sum1=y(1)+y(2) x(2)=x(3) counter1=2 sum1=...
2011/12/14
[ "https://Stackoverflow.com/questions/8510168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1018331/" ]
If I understood you correctly, you want the mean of each group of numbers that have the same index in "x". In that case... ``` function FindAverages x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; means = []; indexes = unique(x); for i=1:numel(indexes) index = indexes(i); indexInY = (x==index); me...
If I understood correctly your question you could simply use accumarray, it should works faster then a loop. ``` %#Input x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; [newx, idx]=unique(x,'legacy'); newy=accumarray(x(:),y(:),[],@mean); %#groups every element of 'y' according to the index of 'x' and applie...
8,510,168
I want to write such a code for two matrixes: ``` x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; ``` How can I find out the mean value of each group of numbers in y, that have the same index in x? My algorithm can look like: ``` If x(1)=x(2) counter1=1 sum1=y(1)+y(2) x(2)=x(3) counter1=2 sum1=...
2011/12/14
[ "https://Stackoverflow.com/questions/8510168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1018331/" ]
One solution is to use [GRPSTATS](http://www.mathworks.com/help/toolbox/stats/grpstats.html) function available in Statistical Toolbox. It can apply a function by groups: ``` x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; grpstats(y,x,@mean) ``` Alternative option (if you don't have Statistical Toolbox, for...
If I understood correctly your question you could simply use accumarray, it should works faster then a loop. ``` %#Input x=[1 1 1 2 2 3 3 3 3]'; y=[11 21 31 24 32 33 13 37 3]'; [newx, idx]=unique(x,'legacy'); newy=accumarray(x(:),y(:),[],@mean); %#groups every element of 'y' according to the index of 'x' and applie...
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
**Hydrogen** and helium make up most of the universe, in fact, hydrogen accounts for 90% of atoms in existence. What makes hydrogen significant? Fortunately, liquid hydrogen is literally [rocket fuel](http://www.nasa.gov/topics/technology/hydrogen/hydrogen_fuel_of_choice.html) when you set fire to it. It's also used in...
Hydrogen is by far the most common element in the universe, and can be used as a propellant (if you have an oxidizer) or as an energy source (either in combustion with an oxidizer, in nuclear fusion, or in a fuel cell). If you are technologically advanced enough to be a space-faring civilization, you should probably ha...
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
Hydrogen is by far the most common element in the universe, and can be used as a propellant (if you have an oxidizer) or as an energy source (either in combustion with an oxidizer, in nuclear fusion, or in a fuel cell). If you are technologically advanced enough to be a space-faring civilization, you should probably ha...
The form of propulsion using least resources would be a light sail. The Planetary Society launched a test ship in May 2015 to try out some of the technology with limited success. Further missions are planned. A lightsail uses the pressure of solar radiation as a propulsion method and essentially uses no fuel at all.
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
Hydrogen is by far the most common element in the universe, and can be used as a propellant (if you have an oxidizer) or as an energy source (either in combustion with an oxidizer, in nuclear fusion, or in a fuel cell). If you are technologically advanced enough to be a space-faring civilization, you should probably ha...
have a magnetic field that funnels any and all particles the ship finds in its path into the ship's engines. The engine separates the hydrogen out of what it grabs, fuses it into helium. From the fusion reaction it obtains the energy it needs to power all ship systems, plus the heat to superheat the rest of the element...
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
Hydrogen is by far the most common element in the universe, and can be used as a propellant (if you have an oxidizer) or as an energy source (either in combustion with an oxidizer, in nuclear fusion, or in a fuel cell). If you are technologically advanced enough to be a space-faring civilization, you should probably ha...
Water. Unless you are using hydrogen for fusion, you need an oxidiser. Water can be split using solar power giving hydrogen and oxygen to be used as rocket fuel. It can also be electrolysed to give hydrogen peroxide, a monopropellant, what you use for steering your ship. If you are using a nuclear thermal rocket (heat ...
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
**Hydrogen** and helium make up most of the universe, in fact, hydrogen accounts for 90% of atoms in existence. What makes hydrogen significant? Fortunately, liquid hydrogen is literally [rocket fuel](http://www.nasa.gov/topics/technology/hydrogen/hydrogen_fuel_of_choice.html) when you set fire to it. It's also used in...
The form of propulsion using least resources would be a light sail. The Planetary Society launched a test ship in May 2015 to try out some of the technology with limited success. Further missions are planned. A lightsail uses the pressure of solar radiation as a propulsion method and essentially uses no fuel at all.
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
**Hydrogen** and helium make up most of the universe, in fact, hydrogen accounts for 90% of atoms in existence. What makes hydrogen significant? Fortunately, liquid hydrogen is literally [rocket fuel](http://www.nasa.gov/topics/technology/hydrogen/hydrogen_fuel_of_choice.html) when you set fire to it. It's also used in...
have a magnetic field that funnels any and all particles the ship finds in its path into the ship's engines. The engine separates the hydrogen out of what it grabs, fuses it into helium. From the fusion reaction it obtains the energy it needs to power all ship systems, plus the heat to superheat the rest of the element...
26,997
I'm making a small game about travelling deep space on limited resources. One thing I'm interested in having is the idea that the craft is scavenging what it can from planets as it travels through entirely uninhabited locations. The idea is this is a sufficiently advanced society that they could feasibly extract eleme...
2015/10/05
[ "https://worldbuilding.stackexchange.com/questions/26997", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/14244/" ]
**Hydrogen** and helium make up most of the universe, in fact, hydrogen accounts for 90% of atoms in existence. What makes hydrogen significant? Fortunately, liquid hydrogen is literally [rocket fuel](http://www.nasa.gov/topics/technology/hydrogen/hydrogen_fuel_of_choice.html) when you set fire to it. It's also used in...
Water. Unless you are using hydrogen for fusion, you need an oxidiser. Water can be split using solar power giving hydrogen and oxygen to be used as rocket fuel. It can also be electrolysed to give hydrogen peroxide, a monopropellant, what you use for steering your ship. If you are using a nuclear thermal rocket (heat ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
Like others have said you install this: > > You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> > > > And if you are not running a localhost but some HTML and JavaScript you can use this **launch.json** code. ``` { "version": "0.2.0", "configurations": [ { "...
I didn't want to run a server just for some HTML and JavaScript (unlike a similar example) this VS Code launch configuration along with the 'Debugger for Chrome' extension did the trick on my Windows 10 machine: ``` { "version": "0.2.0", "configurations": [ { "name": "Launch ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
VSCode will use node to launch your app, which means your app is running on some PORT. You can interact with your app by visiting <http://localhost:PORT/> If you set a breakpoint in app.js it should be hit once you visit your site that is running local via node. Here is a nice demo <https://channel9.msdn.com/Blogs/clou...
You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> In the launch.json you just have to pu the url value of the server that you are using and then you can debug your html + js with your editor visual studio code ``` { "version": "0.2.0", "configurations": [ ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
Like others have said you install this: > > You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> > > > And if you are not running a localhost but some HTML and JavaScript you can use this **launch.json** code. ``` { "version": "0.2.0", "configurations": [ { "...
You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> In the launch.json you just have to pu the url value of the server that you are using and then you can debug your html + js with your editor visual studio code ``` { "version": "0.2.0", "configurations": [ ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
Like others have said you install this: > > You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> > > > And if you are not running a localhost but some HTML and JavaScript you can use this **launch.json** code. ``` { "version": "0.2.0", "configurations": [ { "...
In case you have # in path like C:\C#\mypage.htm, you may use FF & ex. fileBasename or [Similar variable](https://code.visualstudio.com/docs/editor/variables-reference) - does not work in Chrome: ``` .vscode\launch.json { "version": "0.2.0", "configurations": [ { "name": "Launch HTML file",...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
I didn't want to run a server just for some HTML and JavaScript (unlike a similar example) this VS Code launch configuration along with the 'Debugger for Chrome' extension did the trick on my Windows 10 machine: ``` { "version": "0.2.0", "configurations": [ { "name": "Launch ...
In case you have # in path like C:\C#\mypage.htm, you may use FF & ex. fileBasename or [Similar variable](https://code.visualstudio.com/docs/editor/variables-reference) - does not work in Chrome: ``` .vscode\launch.json { "version": "0.2.0", "configurations": [ { "name": "Launch HTML file",...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
In case you have # in path like C:\C#\mypage.htm, you may use FF & ex. fileBasename or [Similar variable](https://code.visualstudio.com/docs/editor/variables-reference) - does not work in Chrome: ``` .vscode\launch.json { "version": "0.2.0", "configurations": [ { "name": "Launch HTML file",...
You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> In the launch.json you just have to pu the url value of the server that you are using and then you can debug your html + js with your editor visual studio code ``` { "version": "0.2.0", "configurations": [ ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
It is now possible to debug Chrome web pages in vscode via Chrome remote debugging with a extension released by Microsoft. [Debugger for Chrome](https://marketplace.visualstudio.com/items/msjsdiag.debugger-for-chrome) As you can see from that page there are two modes of debugging, Launch and Attach. I only managed to ...
In case you have # in path like C:\C#\mypage.htm, you may use FF & ex. fileBasename or [Similar variable](https://code.visualstudio.com/docs/editor/variables-reference) - does not work in Chrome: ``` .vscode\launch.json { "version": "0.2.0", "configurations": [ { "name": "Launch HTML file",...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
It seems what I want to do is not possible in VSCode (yet?). My solution at the moment, is to use the node package *live-server*. Install with ``` > npm install -g live-server ``` Then open VSCode, right-click any file in the root folder of your project and select "Open in Console". Then type ``` > live-server `...
You can use <https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome> In the launch.json you just have to pu the url value of the server that you are using and then you can debug your html + js with your editor visual studio code ``` { "version": "0.2.0", "configurations": [ ...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
It is now possible to debug Chrome web pages in vscode via Chrome remote debugging with a extension released by Microsoft. [Debugger for Chrome](https://marketplace.visualstudio.com/items/msjsdiag.debugger-for-chrome) As you can see from that page there are two modes of debugging, Launch and Attach. I only managed to ...
VSCode will use node to launch your app, which means your app is running on some PORT. You can interact with your app by visiting <http://localhost:PORT/> If you set a breakpoint in app.js it should be hit once you visit your site that is running local via node. Here is a nice demo <https://channel9.msdn.com/Blogs/clou...
31,071,172
I want to run and debug an html page with a javascript file in a mini website when I hit F5. How do I configure VSCode to open the html page in the browser and then allow me to set breakpoints in the javescript file which will be triggered by my interaction with the app in the browser? In Visual Studio this would "ju...
2015/06/26
[ "https://Stackoverflow.com/questions/31071172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/762632/" ]
VSCode will use node to launch your app, which means your app is running on some PORT. You can interact with your app by visiting <http://localhost:PORT/> If you set a breakpoint in app.js it should be hit once you visit your site that is running local via node. Here is a nice demo <https://channel9.msdn.com/Blogs/clou...
In case you have # in path like C:\C#\mypage.htm, you may use FF & ex. fileBasename or [Similar variable](https://code.visualstudio.com/docs/editor/variables-reference) - does not work in Chrome: ``` .vscode\launch.json { "version": "0.2.0", "configurations": [ { "name": "Launch HTML file",...
47,526,836
How do I achieve the following vertical layout in Android ? ``` View1 View2 View3 ``` All three views have width that fits the screen. `View2` height is fixed (= 100). `View1` height is equal to `view3's` height. Am I able to achieve this with `LinearLayout`, `RelativeLayout`, `ConstraintLayout`? I'd appreci...
2017/11/28
[ "https://Stackoverflow.com/questions/47526836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1615898/" ]
Try this using **`LinearLayout`** ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <View android:layout_width="match_parent" ...
Not sure this is what you want but you can [get screen height](https://stackoverflow.com/questions/1016896/get-screen-dimensions-in-pixels). Subtract `View2's` height and just set heights of `View1` and `View3` to half of your result. You need to use `RelativeLayout` and sort them as you want.
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
Going over all the advice provided - I've decided to ditch using the zend\_openid class [ sorry about that zend ] and instead I've switched to using JanRains OpenID library. Its taken a few hours to get it up and running with my project but atleast its working like a breeze. Had to make a lot of hacking and a bit of co...
I'm dealing with similar issues. I'm planning on using [RPX now](https://rpxnow.com/) with Zend Framework. Maybe I'll write an adapter. Just to let you know. Info: 'RPS now' provides an all-in-one interface and UI for user registration with * facebook * Google * Yahoo * mySpaceID * Windows LiveID * OpenID * aol
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
Going over all the advice provided - I've decided to ditch using the zend\_openid class [ sorry about that zend ] and instead I've switched to using JanRains OpenID library. Its taken a few hours to get it up and running with my project but atleast its working like a breeze. Had to make a lot of hacking and a bit of co...
Thanks for the information. I started by using JanRain's library, but I have problems with getting Simple Registration to work: I have not succeeded in getting any data that way. And there is no documentation on using Attribute Exchange. :( So, I found and was trying Zend/OpenId, but had the same problem as you: no Ya...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
I need to use Google's OpenID stuff, and I tried Steven's code and couldn't get it to work as-is. I've made some modifications. The \_discovery change method is still the same: Zend/OpenId/Consumer.php, line 765, add: ``` } else if (preg_match('/<URI>([^<]+)<\/URI>/i', $response, $r)) { $version = 2.0; $serv...
Thanks for the information. I started by using JanRain's library, but I have problems with getting Simple Registration to work: I have not succeeded in getting any data that way. And there is no documentation on using Attribute Exchange. :( So, I found and was trying Zend/OpenId, but had the same problem as you: no Ya...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
I'm dealing with similar issues. I'm planning on using [RPX now](https://rpxnow.com/) with Zend Framework. Maybe I'll write an adapter. Just to let you know. Info: 'RPS now' provides an all-in-one interface and UI for user registration with * facebook * Google * Yahoo * mySpaceID * Windows LiveID * OpenID * aol
Did you check out the manual -- [Zend\_OpenId\_Consumer basics](http://framework.zend.com/manual/en/zend.openid.consumer.html)? Check out `38.2.2` on that page and let me know if this helps, because it should. Specifically, I don't know if Google offers OpenID. I know that Yahoo worked because I've tried it a while ba...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
Little late to the game but I was able to get this working with some hacks I found around the interwebs. First. Yahoo. To get Yahoo working all I had to do was change the JavaScript to use **me.yahoo.com** instead of just **yahoo.com** and it worked perfectly with the version of the Zend Framework I'm using. Unfortuna...
Thanks for the information. I started by using JanRain's library, but I have problems with getting Simple Registration to work: I have not succeeded in getting any data that way. And there is no documentation on using Attribute Exchange. :( So, I found and was trying Zend/OpenId, but had the same problem as you: no Ya...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
I'm pretty sure that [Yahoo only works with OpenID 2.0](http://developer.yahoo.com/openid/). If you want to support Yahoo users, you're going to have to upgrade to a library with 2.0 support. That's going to be a matter of more than tweaking some parsing.
Thanks for the information. I started by using JanRain's library, but I have problems with getting Simple Registration to work: I have not succeeded in getting any data that way. And there is no documentation on using Attribute Exchange. :( So, I found and was trying Zend/OpenId, but had the same problem as you: no Ya...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
Little late to the game but I was able to get this working with some hacks I found around the interwebs. First. Yahoo. To get Yahoo working all I had to do was change the JavaScript to use **me.yahoo.com** instead of just **yahoo.com** and it worked perfectly with the version of the Zend Framework I'm using. Unfortuna...
I need to use Google's OpenID stuff, and I tried Steven's code and couldn't get it to work as-is. I've made some modifications. The \_discovery change method is still the same: Zend/OpenId/Consumer.php, line 765, add: ``` } else if (preg_match('/<URI>([^<]+)<\/URI>/i', $response, $r)) { $version = 2.0; $serv...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
I'm pretty sure that [Yahoo only works with OpenID 2.0](http://developer.yahoo.com/openid/). If you want to support Yahoo users, you're going to have to upgrade to a library with 2.0 support. That's going to be a matter of more than tweaking some parsing.
Did you check out the manual -- [Zend\_OpenId\_Consumer basics](http://framework.zend.com/manual/en/zend.openid.consumer.html)? Check out `38.2.2` on that page and let me know if this helps, because it should. Specifically, I don't know if Google offers OpenID. I know that Yahoo worked because I've tried it a while ba...
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
I need to use Google's OpenID stuff, and I tried Steven's code and couldn't get it to work as-is. I've made some modifications. The \_discovery change method is still the same: Zend/OpenId/Consumer.php, line 765, add: ``` } else if (preg_match('/<URI>([^<]+)<\/URI>/i', $response, $r)) { $version = 2.0; $serv...
I'm pretty sure that [Yahoo only works with OpenID 2.0](http://developer.yahoo.com/openid/). If you want to support Yahoo users, you're going to have to upgrade to a library with 2.0 support. That's going to be a matter of more than tweaking some parsing.
741,345
I'm using the Zend framework and the openid selector from <http://code.google.com/p/openid-selector/> - however I find I can't login using sites like Google and Yahoo as they use direct identity based login system whereby one is just redirected to a url as opposed to entering a unique url of their own for authenticatio...
2009/04/12
[ "https://Stackoverflow.com/questions/741345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89752/" ]
Little late to the game but I was able to get this working with some hacks I found around the interwebs. First. Yahoo. To get Yahoo working all I had to do was change the JavaScript to use **me.yahoo.com** instead of just **yahoo.com** and it worked perfectly with the version of the Zend Framework I'm using. Unfortuna...
I'm dealing with similar issues. I'm planning on using [RPX now](https://rpxnow.com/) with Zend Framework. Maybe I'll write an adapter. Just to let you know. Info: 'RPS now' provides an all-in-one interface and UI for user registration with * facebook * Google * Yahoo * mySpaceID * Windows LiveID * OpenID * aol
21,672,440
I have created some basic applications using windows forms C#. What I am trying to achieve is that I have some task taking place inside a function. While executing that task I need to display a message box (with no buttons) with the text "Configuring...". I also need to blink this text. How can I do that? Do I need t...
2014/02/10
[ "https://Stackoverflow.com/questions/21672440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3273831/" ]
If you really need a progress indicator you have to do as toATwork said, and do a Background worker However, it is not a really async task, so you might find it hard to make it work properly If you finally don't care about the message, and just need to show the users that something is happening, you can always use: `...
You can use a label on your form and change its text in function Body. ``` { //your function body label.Text="Configuring"; } ```
26,067,290
I knew that we can overload operators for a class. But my question is whether I can override operators? Let us consider that I have a base class and derived class, is it possible to override an operator defined ( overloaded ) in the base class in the derived class (as with function overriding)?
2014/09/26
[ "https://Stackoverflow.com/questions/26067290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2511361/" ]
You can achieve the desired effect by providing a "cover" virtual function in the base class, and call it from the operator's implementation in the base class: ``` struct Base { Base operator+(const Base& other) { return add(other); } protected: virtual Base add(const Base& other) { cout <<...
I want to add one more thing: After my personal frustration about the default behavior of certain operators on built-in types, I wondered if it was possible to override that operators in a simple and readable way. The answer was [my Polyop project](https://github.com/Manu343726/Polyop), which achieves exactly that. So...
26,067,290
I knew that we can overload operators for a class. But my question is whether I can override operators? Let us consider that I have a base class and derived class, is it possible to override an operator defined ( overloaded ) in the base class in the derived class (as with function overriding)?
2014/09/26
[ "https://Stackoverflow.com/questions/26067290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2511361/" ]
An overloaded operator is just a function, so it can be virtual, and overridden. But it's seldom a good idea. Consider an overridden copy assignment operator, that in some derived class checks whether the value to be assigned is compatible with the object assigned to. Effectively it has replaced static type checking ...
I want to add one more thing: After my personal frustration about the default behavior of certain operators on built-in types, I wondered if it was possible to override that operators in a simple and readable way. The answer was [my Polyop project](https://github.com/Manu343726/Polyop), which achieves exactly that. So...
5,092,578
For example, if I have a news page that's already being tracked via GA and I add a javascript event to capture clicks on a specific link to the news page (e.g. navigation) am I then 'double counting'?
2011/02/23
[ "https://Stackoverflow.com/questions/5092578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5058/" ]
Well it's not a real page view, but Google Analytics thinks that it is--i.e., it shows up in your pageview counts. Fortunately, it's easy to filter those so they don't contaminate your pageview data. So for instance, ``` _gaq.push(['_trackPageview', 'unique_virtual_pagename']); ``` So in your GA Browser, you'll s...
What you're doing is registering what's called a 'virtual page view'. To GA it's seen as a real page view and shows up in your content report's and page view counts etc. This is often useful if you want to show a page view for media that GA can't track. It's also commonly used to count an event, such as a button click,...
5,092,578
For example, if I have a news page that's already being tracked via GA and I add a javascript event to capture clicks on a specific link to the news page (e.g. navigation) am I then 'double counting'?
2011/02/23
[ "https://Stackoverflow.com/questions/5092578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5058/" ]
If a fake pageview is not beneficial in this situation, and from your description that you're looking to track an engagement click on your page, use Event Tracking instead of Pageviews. **Tracking a click/event is easy (especially if you're already using Javascript). The best part is that this event is *not* considere...
Well it's not a real page view, but Google Analytics thinks that it is--i.e., it shows up in your pageview counts. Fortunately, it's easy to filter those so they don't contaminate your pageview data. So for instance, ``` _gaq.push(['_trackPageview', 'unique_virtual_pagename']); ``` So in your GA Browser, you'll s...
5,092,578
For example, if I have a news page that's already being tracked via GA and I add a javascript event to capture clicks on a specific link to the news page (e.g. navigation) am I then 'double counting'?
2011/02/23
[ "https://Stackoverflow.com/questions/5092578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5058/" ]
If a fake pageview is not beneficial in this situation, and from your description that you're looking to track an engagement click on your page, use Event Tracking instead of Pageviews. **Tracking a click/event is easy (especially if you're already using Javascript). The best part is that this event is *not* considere...
What you're doing is registering what's called a 'virtual page view'. To GA it's seen as a real page view and shows up in your content report's and page view counts etc. This is often useful if you want to show a page view for media that GA can't track. It's also commonly used to count an event, such as a button click,...
10,291,559
Mozilla have delivered [an API for parsing a Javascript module](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) to generate an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree). They call it **Reflect.parse**. Is there a Reflect.parse, or something similar, written as a standalone mo...
2012/04/24
[ "https://Stackoverflow.com/questions/10291559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48082/" ]
Check out Esprima: <http://esprima.org/> A separate project that generates a similar abstract syntax tree is here: <http://boshi.inimino.org/3box/PanPG/build/js_ast.html>
[JS.js](https://github.com/jterrace/js.js/) (a Javascript interpreter written in Javascript) probably has a Javascript parser as a component, but I don't know how easy it is to get access to or use from the outside.
10,291,559
Mozilla have delivered [an API for parsing a Javascript module](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) to generate an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree). They call it **Reflect.parse**. Is there a Reflect.parse, or something similar, written as a standalone mo...
2012/04/24
[ "https://Stackoverflow.com/questions/10291559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48082/" ]
[JS.js](https://github.com/jterrace/js.js/) (a Javascript interpreter written in Javascript) probably has a Javascript parser as a component, but I don't know how easy it is to get access to or use from the outside.
> > something I could run on any ES5 engine to produce a syntax tree? > Failing that is there a standalone tool in C++ that does this for me? > > > You can get the source and build the SpiderMonkey JavaScript standalone shell (the JS engine in Mozilla's Firefox), which will have Reflect.parse built-in, so you can...
10,291,559
Mozilla have delivered [an API for parsing a Javascript module](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) to generate an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree). They call it **Reflect.parse**. Is there a Reflect.parse, or something similar, written as a standalone mo...
2012/04/24
[ "https://Stackoverflow.com/questions/10291559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48082/" ]
Check out Esprima: <http://esprima.org/> A separate project that generates a similar abstract syntax tree is here: <http://boshi.inimino.org/3box/PanPG/build/js_ast.html>
> > something I could run on any ES5 engine to produce a syntax tree? > Failing that is there a standalone tool in C++ that does this for me? > > > You can get the source and build the SpiderMonkey JavaScript standalone shell (the JS engine in Mozilla's Firefox), which will have Reflect.parse built-in, so you can...
10,291,559
Mozilla have delivered [an API for parsing a Javascript module](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) to generate an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree). They call it **Reflect.parse**. Is there a Reflect.parse, or something similar, written as a standalone mo...
2012/04/24
[ "https://Stackoverflow.com/questions/10291559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48082/" ]
Check out Esprima: <http://esprima.org/> A separate project that generates a similar abstract syntax tree is here: <http://boshi.inimino.org/3box/PanPG/build/js_ast.html>
Try Esprima ([esprima.org](http://esprima.org)), a project I have started few months ago. Its AST output is compatible with Mozilla Reflect.parse, it runs almost everywhere from IE 6 to Node.js, the parser is extremely fast (the fastest among its competitor), heavily unit tested (500+ and growing) with 100% code covera...
10,291,559
Mozilla have delivered [an API for parsing a Javascript module](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) to generate an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree). They call it **Reflect.parse**. Is there a Reflect.parse, or something similar, written as a standalone mo...
2012/04/24
[ "https://Stackoverflow.com/questions/10291559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48082/" ]
Try Esprima ([esprima.org](http://esprima.org)), a project I have started few months ago. Its AST output is compatible with Mozilla Reflect.parse, it runs almost everywhere from IE 6 to Node.js, the parser is extremely fast (the fastest among its competitor), heavily unit tested (500+ and growing) with 100% code covera...
> > something I could run on any ES5 engine to produce a syntax tree? > Failing that is there a standalone tool in C++ that does this for me? > > > You can get the source and build the SpiderMonkey JavaScript standalone shell (the JS engine in Mozilla's Firefox), which will have Reflect.parse built-in, so you can...
28,881,816
This is my form, before I'm using input type=submit , but now I use a validation state that's why i need to switch on input type=button, my problem is How can i submit this form using button? //HTML CODE ``` <div class="panel-body" style="width:700px;"> <form class="form-group" method="post" id="question_form"> ...
2015/03/05
[ "https://Stackoverflow.com/questions/28881816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580391/" ]
You need to use [`.find()`](http://api.jquery.com/find/) to refer its child span, then you can use toggle. > > Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. > > > *Use* ``` $(this).find('.m-button-regular').toggleClass("m-button-act...
This is refering to all classes: ``` $('.m-button-regular').toggleClass("m-button-active"); ``` You must refer the button ``` $("#edit").toggleClass("m-button-active"); ```
28,881,816
This is my form, before I'm using input type=submit , but now I use a validation state that's why i need to switch on input type=button, my problem is How can i submit this form using button? //HTML CODE ``` <div class="panel-body" style="width:700px;"> <form class="form-group" method="post" id="question_form"> ...
2015/03/05
[ "https://Stackoverflow.com/questions/28881816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580391/" ]
You need to use [`.find()`](http://api.jquery.com/find/) to refer its child span, then you can use toggle. > > Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. > > > *Use* ``` $(this).find('.m-button-regular').toggleClass("m-button-act...
This seems to do what you want : ```js $('.editcontainer').hide(); $(document).ready(function() { $('#edit').click(function() { $(".editcontainer").toggle(); $('#edit').toggleClass("m-button-active"); }); }); ``` ```css .m-button-active { color : green; } ``` ```html <script src="https://aj...
28,881,816
This is my form, before I'm using input type=submit , but now I use a validation state that's why i need to switch on input type=button, my problem is How can i submit this form using button? //HTML CODE ``` <div class="panel-body" style="width:700px;"> <form class="form-group" method="post" id="question_form"> ...
2015/03/05
[ "https://Stackoverflow.com/questions/28881816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580391/" ]
You need to use [`.find()`](http://api.jquery.com/find/) to refer its child span, then you can use toggle. > > Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. > > > *Use* ``` $(this).find('.m-button-regular').toggleClass("m-button-act...
You are almost right but slight change to your code and bingo ``` $('.editcontainer').hide(); $(document).ready(function(){ $('#edit').click(function(){ $(".editcontainer").toggle(); $('.m-button-regular',this).toggleClass("m-button-active"); //<--- add a scope, same as $(this).find });...
28,881,816
This is my form, before I'm using input type=submit , but now I use a validation state that's why i need to switch on input type=button, my problem is How can i submit this form using button? //HTML CODE ``` <div class="panel-body" style="width:700px;"> <form class="form-group" method="post" id="question_form"> ...
2015/03/05
[ "https://Stackoverflow.com/questions/28881816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580391/" ]
This seems to do what you want : ```js $('.editcontainer').hide(); $(document).ready(function() { $('#edit').click(function() { $(".editcontainer").toggle(); $('#edit').toggleClass("m-button-active"); }); }); ``` ```css .m-button-active { color : green; } ``` ```html <script src="https://aj...
This is refering to all classes: ``` $('.m-button-regular').toggleClass("m-button-active"); ``` You must refer the button ``` $("#edit").toggleClass("m-button-active"); ```
28,881,816
This is my form, before I'm using input type=submit , but now I use a validation state that's why i need to switch on input type=button, my problem is How can i submit this form using button? //HTML CODE ``` <div class="panel-body" style="width:700px;"> <form class="form-group" method="post" id="question_form"> ...
2015/03/05
[ "https://Stackoverflow.com/questions/28881816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580391/" ]
This seems to do what you want : ```js $('.editcontainer').hide(); $(document).ready(function() { $('#edit').click(function() { $(".editcontainer").toggle(); $('#edit').toggleClass("m-button-active"); }); }); ``` ```css .m-button-active { color : green; } ``` ```html <script src="https://aj...
You are almost right but slight change to your code and bingo ``` $('.editcontainer').hide(); $(document).ready(function(){ $('#edit').click(function(){ $(".editcontainer").toggle(); $('.m-button-regular',this).toggleClass("m-button-active"); //<--- add a scope, same as $(this).find });...
15,535,493
I have a question about how to send password over the wire from the GWT web app to the server. My client talks to server using HTTPS. My understanding is that GWT RPC uses HTTP POST to communicate. So I assume it is OK to send plain-text password using GWT RPC. Am I wrong? Is there any other options for sending passw...
2013/03/20
[ "https://Stackoverflow.com/questions/15535493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There will be no problem because you are laready using HTTPS. If still you have a narrow edge in mind then you can send the strings like passwords..account numbers in a secured way by using a thirdparty light weight library called [GWT-Crypto](http://code.google.com/p/gwt-crypto/). It uses [TripleDesCipher](http://gw...
GWT is not different to any other browser app. Almost authentication systems use the same approach: send password using POST over HTTPS.
15,535,493
I have a question about how to send password over the wire from the GWT web app to the server. My client talks to server using HTTPS. My understanding is that GWT RPC uses HTTP POST to communicate. So I assume it is OK to send plain-text password using GWT RPC. Am I wrong? Is there any other options for sending passw...
2013/03/20
[ "https://Stackoverflow.com/questions/15535493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There will be no problem because you are laready using HTTPS. If still you have a narrow edge in mind then you can send the strings like passwords..account numbers in a secured way by using a thirdparty light weight library called [GWT-Crypto](http://code.google.com/p/gwt-crypto/). It uses [TripleDesCipher](http://gw...
You are right that it is OK to send plain-text password using GWT RPC This might help 1) [GWT/Javascript client side password encryption](https://stackoverflow.com/questions/3570623/gwt-javascript-client-side-password-encryption) 2) [GWT with SSL security](https://stackoverflow.com/questions/4142436/gwt-with-ssl-secur...
51,191,768
I have tried using styles and android:background:"@null" / android:background:"@color/transparent" inside AppBarLayout as well as inside V7 toolbar nothing seems to workout. Have tried these solutions too : 1.[How to make Toolbar transparent?](https://stackoverflow.com/questions/26505632/how-to-make-toolbar-transparen...
2018/07/05
[ "https://Stackoverflow.com/questions/51191768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6134200/" ]
You almost had it right. There is a small typo in the recursive call: ``` if [ -d "$i" ]; then get_all_the_files ${1} else ``` should be ``` if [ -d "$i" ]; then get_all_the_files ${i} else ``` I will add that use of arrays like this in `bash` is very unidiomatic. If you are tryi...
To stick with your design (looping on the files and inserting only the regular files), populating the array at each step, but have Bash perform the recursion via the glob, you can use the following: ``` # the globstar shell option enables the ** glob pattern for recursion shopt -s globstar # the nullglob shell option...
7,841,229
There is an ASP.NET page that searches my database and inserts the results in a RepeaterList. The page is rendered for me, but I need to save the content that has been rendered into a variable. The user should be able to send the rendered content in an e-mail by clicking a button. How do I do this?
2011/10/20
[ "https://Stackoverflow.com/questions/7841229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/549840/" ]
If you want to email the HTML contents of the repeater, you can do something like this: ``` System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); Repeater1.RenderControl(oHtmlTextWriter); string repeater...
Probably the quickest way I've done so would be to do a postback on the email button, `override Render` and send your email there if the button had been clicked. [Rick Strahl has an old, but good example](http://www.west-wind.com/weblog/posts/2004/Jun/08/Capturing-Output-from-ASPNet-Pages).
38,868,200
I created three certificate by using openssl 1. Root CA certificate 2. Server certificate 3. Client certificate Server side configuration : I installed server.cer(peronal folder) and RootCA(trust root certification authority folder) on server machine.Then i attached the server certificate to MSSSQL(SQL Configurati...
2016/08/10
[ "https://Stackoverflow.com/questions/38868200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6526156/" ]
Add this parameter for the connection string: `TrustServerCertificate=true`
When generating DBContext using the Scaffolding, if you are getting the error while connection "provider ssl provider error 0 - the target principal name is incorrect" use this parameter for the connection string: TrustServerCertificate=true AS the server connection is based on the certificate errors.
54,359,231
I have created the angular universal application but when I try to deployment on iisnode server it given the exception: ``` <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="iisnode" path="server.js" verb="*" modules="iisnode"/> </handlers>...
2019/01/25
[ "https://Stackoverflow.com/questions/54359231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2585791/" ]
Hello I have done something like that (but I am working with `X509` object not `X509_REQ` object like you : ```c static int cs_cert_set_subject_alt_name(X509 *x509_cert) { char *subject_alt_name = "IP: 192.168.1.1"; X509_EXTENSION *extension_san = NULL; ASN1_OCTET_STRING *subject_alt_name_ASN1 = NULL; ...
Instead of `X509V3_EXT_conf` function try with `X509V3_EXT_conf_nid` function in which you pass the NID instead of name. ``` ext = X509V3_EXT_conf (NULL, NULL, ext_name, ext_value); ``` can be ``` ext = X509V3_EXT_conf_nid(NULL, NULL, NID_subject_alt_name, ext_value); ``` Your code might not be working because yo...
9,444,673
I am trying to iterate through an object hierarchy and the object hierarchy is composed of a known set of classes combined using composition. I would like to build an object model to show the hierarchy / composition graphically. The composition is done based on few rules but it is fluid and flexible. Quite a few class...
2012/02/25
[ "https://Stackoverflow.com/questions/9444673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201507/" ]
We don't have run-time reflection in C++. But we have different stuff, that most C++ programmers like better than reflection ;-). If I understand your question, you need to build some sort of object browser, and you know all your object types. By "you know all your object types" I mean "you won't get an object as some...
I think that you need the runtime polymorphism in this case. Use interfaces instead of templates for such kind of problems. Interfaces will give the knowledge about of the methods in your object but will say nothing about the member variables. So there is no reflection available in standard c++ (the only thing that c++...
9,444,673
I am trying to iterate through an object hierarchy and the object hierarchy is composed of a known set of classes combined using composition. I would like to build an object model to show the hierarchy / composition graphically. The composition is done based on few rules but it is fluid and flexible. Quite a few class...
2012/02/25
[ "https://Stackoverflow.com/questions/9444673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201507/" ]
You can't know at runtime if you don't at compile time. You have the code to know at compile time for one function. You could just make a macro out of it to have it for any function you want to check. (Macro disclaimer: in this case macros are good, that's how BOOST\_MPL\_HAS\_XXX\_TEMPLATE\_DEF works). Alternatively,...
I think that you need the runtime polymorphism in this case. Use interfaces instead of templates for such kind of problems. Interfaces will give the knowledge about of the methods in your object but will say nothing about the member variables. So there is no reflection available in standard c++ (the only thing that c++...
9,444,673
I am trying to iterate through an object hierarchy and the object hierarchy is composed of a known set of classes combined using composition. I would like to build an object model to show the hierarchy / composition graphically. The composition is done based on few rules but it is fluid and flexible. Quite a few class...
2012/02/25
[ "https://Stackoverflow.com/questions/9444673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201507/" ]
I've used boost::mpl to do the iteration and printing of the values. Most of this should be possible without any of those, but I heavily recommend using it. Also I've fixed some things in your code. You might also want to use BOOST\_HAS\_XXX instead of your homebrew solution (your SFINAE style is rather awkward). ``` ...
I think that you need the runtime polymorphism in this case. Use interfaces instead of templates for such kind of problems. Interfaces will give the knowledge about of the methods in your object but will say nothing about the member variables. So there is no reflection available in standard c++ (the only thing that c++...
9,444,673
I am trying to iterate through an object hierarchy and the object hierarchy is composed of a known set of classes combined using composition. I would like to build an object model to show the hierarchy / composition graphically. The composition is done based on few rules but it is fluid and flexible. Quite a few class...
2012/02/25
[ "https://Stackoverflow.com/questions/9444673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201507/" ]
I've used boost::mpl to do the iteration and printing of the values. Most of this should be possible without any of those, but I heavily recommend using it. Also I've fixed some things in your code. You might also want to use BOOST\_HAS\_XXX instead of your homebrew solution (your SFINAE style is rather awkward). ``` ...
We don't have run-time reflection in C++. But we have different stuff, that most C++ programmers like better than reflection ;-). If I understand your question, you need to build some sort of object browser, and you know all your object types. By "you know all your object types" I mean "you won't get an object as some...
9,444,673
I am trying to iterate through an object hierarchy and the object hierarchy is composed of a known set of classes combined using composition. I would like to build an object model to show the hierarchy / composition graphically. The composition is done based on few rules but it is fluid and flexible. Quite a few class...
2012/02/25
[ "https://Stackoverflow.com/questions/9444673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1201507/" ]
I've used boost::mpl to do the iteration and printing of the values. Most of this should be possible without any of those, but I heavily recommend using it. Also I've fixed some things in your code. You might also want to use BOOST\_HAS\_XXX instead of your homebrew solution (your SFINAE style is rather awkward). ``` ...
You can't know at runtime if you don't at compile time. You have the code to know at compile time for one function. You could just make a macro out of it to have it for any function you want to check. (Macro disclaimer: in this case macros are good, that's how BOOST\_MPL\_HAS\_XXX\_TEMPLATE\_DEF works). Alternatively,...
6,348,527
I'm developing an application in Spring 3.0.5 and Hibernate 3.6.2, and currently i'm working in a JSON controller, but i have this exception and i can't understand why is happening. I've checked previously in SO and Google, but this problem is quite strange. So here is my code: Controller ``` @RequestMapping(value = ...
2011/06/14
[ "https://Stackoverflow.com/questions/6348527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/714243/" ]
There is a "Persist" button on some of the tabs in Firebug. Just make sure to click it before doing your post. [edit] Second row, third button from the left, on the Console and Net tabs.
One solution would be to remove the refresh of the page from your code. Then run your code to see the results.
6,348,527
I'm developing an application in Spring 3.0.5 and Hibernate 3.6.2, and currently i'm working in a JSON controller, but i have this exception and i can't understand why is happening. I've checked previously in SO and Google, but this problem is quite strange. So here is my code: Controller ``` @RequestMapping(value = ...
2011/06/14
[ "https://Stackoverflow.com/questions/6348527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/714243/" ]
Even better, if you're on Windows you can use Fiddler - an amazing and free HTTP debugger developed by some important guy on the Microsoft IE team. With it you can conditionally intercept GET or POST requests, inspect and change parameters, break on responses, change responses (headers or body), reissue old requests a...
One solution would be to remove the refresh of the page from your code. Then run your code to see the results.
6,348,527
I'm developing an application in Spring 3.0.5 and Hibernate 3.6.2, and currently i'm working in a JSON controller, but i have this exception and i can't understand why is happening. I've checked previously in SO and Google, but this problem is quite strange. So here is my code: Controller ``` @RequestMapping(value = ...
2011/06/14
[ "https://Stackoverflow.com/questions/6348527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/714243/" ]
There is a "Persist" button on some of the tabs in Firebug. Just make sure to click it before doing your post. [edit] Second row, third button from the left, on the Console and Net tabs.
You can use web developer tools plugin for Mozilla firefox, and disable meta redirects
6,348,527
I'm developing an application in Spring 3.0.5 and Hibernate 3.6.2, and currently i'm working in a JSON controller, but i have this exception and i can't understand why is happening. I've checked previously in SO and Google, but this problem is quite strange. So here is my code: Controller ``` @RequestMapping(value = ...
2011/06/14
[ "https://Stackoverflow.com/questions/6348527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/714243/" ]
There is a "Persist" button on some of the tabs in Firebug. Just make sure to click it before doing your post. [edit] Second row, third button from the left, on the Console and Net tabs.
Even better, if you're on Windows you can use Fiddler - an amazing and free HTTP debugger developed by some important guy on the Microsoft IE team. With it you can conditionally intercept GET or POST requests, inspect and change parameters, break on responses, change responses (headers or body), reissue old requests a...
6,348,527
I'm developing an application in Spring 3.0.5 and Hibernate 3.6.2, and currently i'm working in a JSON controller, but i have this exception and i can't understand why is happening. I've checked previously in SO and Google, but this problem is quite strange. So here is my code: Controller ``` @RequestMapping(value = ...
2011/06/14
[ "https://Stackoverflow.com/questions/6348527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/714243/" ]
Even better, if you're on Windows you can use Fiddler - an amazing and free HTTP debugger developed by some important guy on the Microsoft IE team. With it you can conditionally intercept GET or POST requests, inspect and change parameters, break on responses, change responses (headers or body), reissue old requests a...
You can use web developer tools plugin for Mozilla firefox, and disable meta redirects
73,153,359
* **Strapi Version**: 4.3.0 * **Operating System**: Ubuntu 20.04 * **Database**: SQLite * **Node Version**: 16.16 * **NPM Version**: 8.11.0 * **Yarn Version**: 1.22.19 I have created [Preview button](https://i.stack.imgur.com/hCW3S.png) for an article collection type. I'm using the Strapi blog template. I managed to m...
2022/07/28
[ "https://Stackoverflow.com/questions/73153359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13460752/" ]
First I turn the nested lists into `data.frames` to create `d2`. Then I use `reduce()` from `purrr` and `full_join()` from `dplyr` to join by x. After I rename the columns after the join. Is this what you are after? ### edit changed `d2` based on robert's comment ``` library(tidyverse) d2 <- lapply(data$pred, as...
Base R approach: ```r # prepare column names for (i in seq_along(data$pred)) names(data$pred[[i]]) <- c('date', paste0('var', i)) # merge data frames succesively output <- Reduce(function(x, y) merge(x, y, by='date', all=T), data$pred) # format date output$date <- as.Date(output$date, origin="1970...
73,153,359
* **Strapi Version**: 4.3.0 * **Operating System**: Ubuntu 20.04 * **Database**: SQLite * **Node Version**: 16.16 * **NPM Version**: 8.11.0 * **Yarn Version**: 1.22.19 I have created [Preview button](https://i.stack.imgur.com/hCW3S.png) for an article collection type. I'm using the Strapi blog template. I managed to m...
2022/07/28
[ "https://Stackoverflow.com/questions/73153359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13460752/" ]
First I turn the nested lists into `data.frames` to create `d2`. Then I use `reduce()` from `purrr` and `full_join()` from `dplyr` to join by x. After I rename the columns after the join. Is this what you are after? ### edit changed `d2` based on robert's comment ``` library(tidyverse) d2 <- lapply(data$pred, as...
Convert each x, y pair to zoo, merge them all with `merge.zoo` (which can handle multi-way joins), set the names and use `fortify.zoo` to convert the resulting zoo object to a data.frame. Omit the last line if a zoo object result is ok. ``` library(zoo) nc <- lengths(data) # 6 out <- data$pred |> lapply(with, zoo(y...
54,167
I have tried several times to upload files to my blog and attach files to GMail emails. Each time, the file says "uploading" however the process never completes. Do you have any suggestions on what might be causing this? I have tried this in both Internet Explorer 8 and Firefox. The computer is running XP Pro.
2009/10/12
[ "https://superuser.com/questions/54167", "https://superuser.com", "https://superuser.com/users/11415/" ]
Uploads fail with BOTH Firefox and IE, on BOTH GMail and your blog? Almost has to be some kind of software on your PC, most probably some sort of security thing.
Are you sure you are waiting long enough? Please remember that your upload speed is probably a fraction of your download speed. I suggest creating a small text file on your machine, making a new email to yourself and trying to attach that text file. If it fails after a few minutes, there is clearly a problem (first th...
4,838
I have need to compute the functions: $$ f(x) = \frac{\sin^{-1}x}{x}$$ and $$ g(x) = \frac{\sin a x}{\sin x} $$ where $a\in[0,1]$ and $ x\in[0,\frac{\pi}{2}]$ and is often very small ($x\ll 1$). Are there any general ways of generating highly accurate algorithms for "special" functions like these?
2012/12/11
[ "https://scicomp.stackexchange.com/questions/4838", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/317/" ]
Do a polynomial expansion (a la l'Hopital's rule) for both enumerator and denominator and you get a rational function that, for small $x$, will approximate the function well. As an example: $$ \frac{\sin ax}{\sin x} \approx \frac{ax-\tfrac 1{3!}(ax)^3 + \ldots}{x-\tfrac 1{3!}x^3 + \ldots} = \frac{a-\tfrac 1{3!}a^3...
My approach is to use software like SymPy as follows: ``` from sympy import var, sin, S var("x a") g = sin(a*x)/sin(x) gseries = g.series(x, 0, 10).removeO() s = {x: S(1)/100, a: S(1)/2} print gseries.subs(s).n(30) print g.subs(s).n(30) print "%.17f" % g.subs({x: 1./100, a: 1./2}) ``` which prints: ``` 0.5000062500...
21,014,523
I got this codes for search and I'm having a problem. It functions well but after I clicked the search tab, it displays errors. But if I tried entering queries for search, it works fine. These are the errors: ``` Notice: Undefined index: searching in F:\Programs\wamp\www\a\search.php on line 45 Notice: Undefined inde...
2014/01/09
[ "https://Stackoverflow.com/questions/21014523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1678073/" ]
``` var tot=0; for(var i=0;i<rowCount;i++){ tot += parseInt(cell4.innerHTML,10); } ``` In the above piece of code, *you're not iterating the row but **referring only to the last column.*** So on each iteration, the last column value is getting added. Instead try below code ``` var tot=0; for(var...
You made a few mistakes. Firstly, let me just make it clear that there are certain part I used jQuery, coz I'm not that familiar with javascript syntax. Here's the working example: <http://jsfiddle.net/caL5p/1/> First mistake: You used: `cell4.id = "pricee";` This is wrong. Id cannot be repeated, and hence your resu...
6,291,132
``` var q = from n in XElement.Load(Application.StartupPath + "..\\..\\..\\2.xml").Elements() select n; foreach (var q0 in q) { string str = q0.ToString(); } ``` the problem is my xml file is so big so how I can manage this code to lo...
2011/06/09
[ "https://Stackoverflow.com/questions/6291132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/237555/" ]
I had similar issues and here is what I had to use: ``` <title> <asp:ContentPlaceHolder ID="TitleContent" runat="server" /><%= "-MasterTitle" %> </title> ```
You should use your Resource files for this kind of text... <http://msdn.microsoft.com/en-us/library/ms227427.aspx> Not only does it let you set the text in a nice central place, but it is designed for this exact purpose - it will also make it easier for your to create regional language versions of your website later...
63,756,293
Could someone tell me how to change the opacity of this navbar without changing the opacity of the text on navbar? Also, could someone tell me how to change the color of text on navbar? ```html <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="#">Navbar</a> <butt...
2020/09/05
[ "https://Stackoverflow.com/questions/63756293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14159082/" ]
Just change background color of navbar (rgba). ``` .navbar { background: rgba(255, 0, 0, 0.5); // 0.5 is opacity } ``` Docs: <https://www.w3schools.com/cssref/func_rgba.asp>
check out rgba(): <https://www.w3schools.com/cssref/func_rgba.asp> ``` background-color: rgba(255,0,0,0.3); // 0.3 opacity ```
63,756,293
Could someone tell me how to change the opacity of this navbar without changing the opacity of the text on navbar? Also, could someone tell me how to change the color of text on navbar? ```html <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="#">Navbar</a> <butt...
2020/09/05
[ "https://Stackoverflow.com/questions/63756293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14159082/" ]
Just change background color of navbar (rgba). ``` .navbar { background: rgba(255, 0, 0, 0.5); // 0.5 is opacity } ``` Docs: <https://www.w3schools.com/cssref/func_rgba.asp>
**To make your navbar semi-transparent** without affecting the contents, you can just use a semi-opaque colour. You need to do 2 things: 1. remove the `navbar-light` class from your navbar - this is what is currently adding the colour. 2. Add your own CSS with the colour you want. You can use RGBA colours to specify ...
63,756,293
Could someone tell me how to change the opacity of this navbar without changing the opacity of the text on navbar? Also, could someone tell me how to change the color of text on navbar? ```html <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="#">Navbar</a> <butt...
2020/09/05
[ "https://Stackoverflow.com/questions/63756293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14159082/" ]
**To make your navbar semi-transparent** without affecting the contents, you can just use a semi-opaque colour. You need to do 2 things: 1. remove the `navbar-light` class from your navbar - this is what is currently adding the colour. 2. Add your own CSS with the colour you want. You can use RGBA colours to specify ...
check out rgba(): <https://www.w3schools.com/cssref/func_rgba.asp> ``` background-color: rgba(255,0,0,0.3); // 0.3 opacity ```
12,440
I was trying to install TeX Live (on Ubuntu10.04) following the instructions contended in <http://tug.org/texlive/quickinstall.html> (c.f. thread [Typesetting a document using Arabic script](https://tex.stackexchange.com/questions/12347/typesetting-a-document-using-arabic-script)). I've chosen `scheme` -> `customised`...
2011/03/01
[ "https://tex.stackexchange.com/questions/12440", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/3703/" ]
Two thinks I would check: 1. did you adjust your $PATH to include the texlive bin directory? If you did not, your shell will not be able to find your binaries, and trying to run any of them will result in a `command not found` error. Note that if you runt `tlmgr` as root (using sudo) as you should (otherwise it will ...
try another mirror or a CTAN node: `tlmgr --self --all --repository http://mirror.ctan.org/systems/texlive/tlnet update` if it doesn't help, then try: `tlmgr --self --all --repository https://ctan.org/tex-archive/systems/texlive/tlnet update`
52,372,881
I have two data frames --- table A is the pattern table, and table B is the name table. I want to subset table B, where it matches the pattern in table a. ``` A <- data.frame(pattern = c("aa", "bb", "cc", "dd")) B <- data.frame(name = "aa1", "bb1", "abc", "def" ,"ddd") ``` I'm trying to do a for loop looks like: `...
2018/09/17
[ "https://Stackoverflow.com/questions/52372881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8992901/" ]
If you don't return anything explicitly from the mapping function, it will return `undefined`, so the resulting list may look like: ``` [ { year: 2018, month: 9, day: 17, hour: 16, minutes: 6, studentUid: 'ABC123', uid: 'abc456'}, undefined, { year: 2018, month: 9, day: 01, hour: 16, minutes: 0, studentUid...
It seems like what you're trying to do is filter out data from your array. One solution may be using the [`filter`](https://underscorejs.org/#filter) method rather than the `map` method since [`map`](https://underscorejs.org/#map) expects something to be returned: > > Produces a new array of values by **mapping each ...
36,936,107
**index.html: this is the html** ``` <html ng-app="myapp"> <head> <title>shruthi reddy</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script src="https://ajax.googleapis...
2016/04/29
[ "https://Stackoverflow.com/questions/36936107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6250033/" ]
Unfortunately there is now way to set counter in "Model part", but as the current counters are stored in the database you may alter their values there. For more details how this work you can inspect how [`IncrementGenerator::generate`](https://github.com/doctrine/mongodb-odm/blob/c1e9777d1e083d819a354553522903b3b83a6f3...
It could be a perfect use of the [SequenceGenerator](http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/reference/basic-mapping.html#sequence-generator), but not supported by the platform. One work-around (out of the model, unfortunately) consists in setting the first ID manually. In your controller: ...
13,679,216
When I try to set the title of a view page using the title tag I got this title on the page body and I found the head tag to be empty. Here is the head of the page: ``` <head> <meta name="layout" content="main"> <title>Implementation Error</title> <link rel="stylesheet" href="${resource(d...
2012/12/03
[ "https://Stackoverflow.com/questions/13679216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364746/" ]
I had this exact same issue with Grails 2.2 and it brought me here. After a lot of yak shaving, I found out that you need to look in your main.gsp layout file and actually wrap the layout title tag in a title tag like so: ``` <title><g:layoutTitle/></title> ``` Once I did this, the problem went away. I must have lo...
Check your "main" layout and make sure that "g:layoutTitle" tag defined in head section. For more info see [layoutTitle docs](http://grails.org/doc/latest/ref/Tags/layoutTitle.html).
39,950,254
I cannot install basic Django packages on Ubuntu. I just deleted virtualenv and remade it. `pip3install` = `pip3 install -r requirements.txt` ``` [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [my...
2016/10/10
[ "https://Stackoverflow.com/questions/39950254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3282434/" ]
You could accidentally recreate virtualenv with Python2 by forgetting to put path to Python3 interpreter so when you execute pip3 it refers to system Python3. Make sure that you use correct Python in your virtualenv and also make sure that you create virtualenv with pip (yes it's the default option but we don't know ...
Just to expand on the answer by @valentjedi, here's how I got my permission issue fixed without using sudo. **Install** * Make sure you have virtualenv installed [here](https://virtualenv.pypa.io/en/stable/) * This is optional, but I also use virtualenvwrapper to use the `workon` command [here](https://virtualenvwrap...
39,950,254
I cannot install basic Django packages on Ubuntu. I just deleted virtualenv and remade it. `pip3install` = `pip3 install -r requirements.txt` ``` [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [my...
2016/10/10
[ "https://Stackoverflow.com/questions/39950254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3282434/" ]
You could accidentally recreate virtualenv with Python2 by forgetting to put path to Python3 interpreter so when you execute pip3 it refers to system Python3. Make sure that you use correct Python in your virtualenv and also make sure that you create virtualenv with pip (yes it's the default option but we don't know ...
I had the same issue even though I had correct python path in my virtualenv. My mistake though was to use wrong pip version - having python3.7 I was typing *pip install -r requirements.txt* instead of *pip3.7 install -r requirements.txt*
39,950,254
I cannot install basic Django packages on Ubuntu. I just deleted virtualenv and remade it. `pip3install` = `pip3 install -r requirements.txt` ``` [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [my...
2016/10/10
[ "https://Stackoverflow.com/questions/39950254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3282434/" ]
You could accidentally recreate virtualenv with Python2 by forgetting to put path to Python3 interpreter so when you execute pip3 it refers to system Python3. Make sure that you use correct Python in your virtualenv and also make sure that you create virtualenv with pip (yes it's the default option but we don't know ...
I was getting the same error ```py copying build/lib.linux-x86_64-3.8/pvectorc.cpython-38-x86_64-linux-gnu.so -> /home/insoluble/Workspace/venvs/your_venv/lib/python3.8/site-packages byte-compiling /home/insoluble/Workspace/venvs/your_venvlib/python3.8/site-packages/_pyrsistent_version.py to _pyrsistent_version.cp...
39,950,254
I cannot install basic Django packages on Ubuntu. I just deleted virtualenv and remade it. `pip3install` = `pip3 install -r requirements.txt` ``` [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [my...
2016/10/10
[ "https://Stackoverflow.com/questions/39950254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3282434/" ]
Just to expand on the answer by @valentjedi, here's how I got my permission issue fixed without using sudo. **Install** * Make sure you have virtualenv installed [here](https://virtualenv.pypa.io/en/stable/) * This is optional, but I also use virtualenvwrapper to use the `workon` command [here](https://virtualenvwrap...
I had the same issue even though I had correct python path in my virtualenv. My mistake though was to use wrong pip version - having python3.7 I was typing *pip install -r requirements.txt* instead of *pip3.7 install -r requirements.txt*
39,950,254
I cannot install basic Django packages on Ubuntu. I just deleted virtualenv and remade it. `pip3install` = `pip3 install -r requirements.txt` ``` [mything] cchilders@cchilders-desktop:~/projects/mything (master) $ cat requirements.txt Django==1.10.1 django-filter djangorestframework psycopg2 twilio ipdb ipython [my...
2016/10/10
[ "https://Stackoverflow.com/questions/39950254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3282434/" ]
Just to expand on the answer by @valentjedi, here's how I got my permission issue fixed without using sudo. **Install** * Make sure you have virtualenv installed [here](https://virtualenv.pypa.io/en/stable/) * This is optional, but I also use virtualenvwrapper to use the `workon` command [here](https://virtualenvwrap...
I was getting the same error ```py copying build/lib.linux-x86_64-3.8/pvectorc.cpython-38-x86_64-linux-gnu.so -> /home/insoluble/Workspace/venvs/your_venv/lib/python3.8/site-packages byte-compiling /home/insoluble/Workspace/venvs/your_venvlib/python3.8/site-packages/_pyrsistent_version.py to _pyrsistent_version.cp...
40,605,950
I have a ASP.NET Core 1.0 Solution with 3 projects (Web, Console Application, DataAccessLayer). I use ASP.NET Core Identity and Entity Framework Core (SQL Server - Code First). In my Console Application (Used for background tasks), I want to create users, but how I can have access to UserManager object in a Console Ap...
2016/11/15
[ "https://Stackoverflow.com/questions/40605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3955639/" ]
Thanks to Tseng's answer I ended up with this code. Just in case if someone would need: ``` public class Program { private interface IUserCreationService { Task CreateUser(); } public static void Main(string[] args) { var services = new ServiceCollec...
> > In my Console Application (Used for background tasks), I want to create users, but how I can have access to UserManager object in a Console Application (Or in a .NET Core Class Library) ? > > > Same as you do it in ASP.NET Core. You just need to bootstrap it yourself. Inside your `Main` (which is the console a...
40,605,950
I have a ASP.NET Core 1.0 Solution with 3 projects (Web, Console Application, DataAccessLayer). I use ASP.NET Core Identity and Entity Framework Core (SQL Server - Code First). In my Console Application (Used for background tasks), I want to create users, but how I can have access to UserManager object in a Console Ap...
2016/11/15
[ "https://Stackoverflow.com/questions/40605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3955639/" ]
> > In my Console Application (Used for background tasks), I want to create users, but how I can have access to UserManager object in a Console Application (Or in a .NET Core Class Library) ? > > > Same as you do it in ASP.NET Core. You just need to bootstrap it yourself. Inside your `Main` (which is the console a...
I know this answer is late, but other people might benefit. You are seriously overcomplicating things using services etc. You can just do: ``` var userStore = new UserStore<ApplicationUser>(new ApplicationDbContext()); var manager = new ApplicationUserManager(userStore); var result = await manager.Create(user, passwo...
40,605,950
I have a ASP.NET Core 1.0 Solution with 3 projects (Web, Console Application, DataAccessLayer). I use ASP.NET Core Identity and Entity Framework Core (SQL Server - Code First). In my Console Application (Used for background tasks), I want to create users, but how I can have access to UserManager object in a Console Ap...
2016/11/15
[ "https://Stackoverflow.com/questions/40605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3955639/" ]
Thanks to Tseng's answer I ended up with this code. Just in case if someone would need: ``` public class Program { private interface IUserCreationService { Task CreateUser(); } public static void Main(string[] args) { var services = new ServiceCollec...
I know this answer is late, but other people might benefit. You are seriously overcomplicating things using services etc. You can just do: ``` var userStore = new UserStore<ApplicationUser>(new ApplicationDbContext()); var manager = new ApplicationUserManager(userStore); var result = await manager.Create(user, passwo...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For one thing, accessing `Banana.Suppliers` is misleading. It will always yield the same result as accessing `Apple.Suppliers` etc - you've got a *single* collection of suppliers. Basically any time you access `Banana.Suppliers` the compiler emits a call to `Fruit.Suppliers`: that's why just calling `Banana.Suppliers`...
The results you are seeing are caused by the way that static constructors work. The CLR does not actually execute the static constructor util the first instance is used, which is why you only get the desired results in your second example. See [MSDN](http://msdn.microsoft.com/en-us/library/k9x6w0hc%28VS.80%29.aspx) for...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The results you are seeing are caused by the way that static constructors work. The CLR does not actually execute the static constructor util the first instance is used, which is why you only get the desired results in your second example. See [MSDN](http://msdn.microsoft.com/en-us/library/k9x6w0hc%28VS.80%29.aspx) for...
The cuase of this is quite easily explainable, in fact. When you get `Banana.Suppliers`, you're actually just referencing `Fruit.Suppliers` - the compiler ends up resolving to the `Fruit` class in this case because of the way inheritance works (nothing is defined in the `Banana` class. Thus, your static constructor for...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The results you are seeing are caused by the way that static constructors work. The CLR does not actually execute the static constructor util the first instance is used, which is why you only get the desired results in your second example. See [MSDN](http://msdn.microsoft.com/en-us/library/k9x6w0hc%28VS.80%29.aspx) for...
Accessing `Banana.Suppliers` gets compiled to an access of `Fruit.Suppliers` ... which means that effectively your code is not actually touching the `Banana` class, which means that .NET has no reason to execute the static constructor of `Banana`. If you did pretty much anything else with the `Banana` class (such as y...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The results you are seeing are caused by the way that static constructors work. The CLR does not actually execute the static constructor util the first instance is used, which is why you only get the desired results in your second example. See [MSDN](http://msdn.microsoft.com/en-us/library/k9x6w0hc%28VS.80%29.aspx) for...
A static constructor does not behave like an instance constructor (they're not called explicitly). You have to access a property that's actually on the Banana class before it is constructed. You're trying to apply some principles of object orientation to static behavior on classes. They're not equatable, and doing this...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For one thing, accessing `Banana.Suppliers` is misleading. It will always yield the same result as accessing `Apple.Suppliers` etc - you've got a *single* collection of suppliers. Basically any time you access `Banana.Suppliers` the compiler emits a call to `Fruit.Suppliers`: that's why just calling `Banana.Suppliers`...
The cuase of this is quite easily explainable, in fact. When you get `Banana.Suppliers`, you're actually just referencing `Fruit.Suppliers` - the compiler ends up resolving to the `Fruit` class in this case because of the way inheritance works (nothing is defined in the `Banana` class. Thus, your static constructor for...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For one thing, accessing `Banana.Suppliers` is misleading. It will always yield the same result as accessing `Apple.Suppliers` etc - you've got a *single* collection of suppliers. Basically any time you access `Banana.Suppliers` the compiler emits a call to `Fruit.Suppliers`: that's why just calling `Banana.Suppliers`...
Accessing `Banana.Suppliers` gets compiled to an access of `Fruit.Suppliers` ... which means that effectively your code is not actually touching the `Banana` class, which means that .NET has no reason to execute the static constructor of `Banana`. If you did pretty much anything else with the `Banana` class (such as y...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For one thing, accessing `Banana.Suppliers` is misleading. It will always yield the same result as accessing `Apple.Suppliers` etc - you've got a *single* collection of suppliers. Basically any time you access `Banana.Suppliers` the compiler emits a call to `Fruit.Suppliers`: that's why just calling `Banana.Suppliers`...
A static constructor does not behave like an instance constructor (they're not called explicitly). You have to access a property that's actually on the Banana class before it is constructed. You're trying to apply some principles of object orientation to static behavior on classes. They're not equatable, and doing this...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The cuase of this is quite easily explainable, in fact. When you get `Banana.Suppliers`, you're actually just referencing `Fruit.Suppliers` - the compiler ends up resolving to the `Fruit` class in this case because of the way inheritance works (nothing is defined in the `Banana` class. Thus, your static constructor for...
Accessing `Banana.Suppliers` gets compiled to an access of `Fruit.Suppliers` ... which means that effectively your code is not actually touching the `Banana` class, which means that .NET has no reason to execute the static constructor of `Banana`. If you did pretty much anything else with the `Banana` class (such as y...
995,930
Let's say I have: ``` public class Fruit { public static List<String> Suppliers { get; protected set; } static Fruit() { Suppliers = new List<String>(); Suppliers.Add("Company A"); } } public class Banana : Fruit { static Banana() { Suppliers.Add("Company B"); }...
2009/06/15
[ "https://Stackoverflow.com/questions/995930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The cuase of this is quite easily explainable, in fact. When you get `Banana.Suppliers`, you're actually just referencing `Fruit.Suppliers` - the compiler ends up resolving to the `Fruit` class in this case because of the way inheritance works (nothing is defined in the `Banana` class. Thus, your static constructor for...
A static constructor does not behave like an instance constructor (they're not called explicitly). You have to access a property that's actually on the Banana class before it is constructed. You're trying to apply some principles of object orientation to static behavior on classes. They're not equatable, and doing this...
40,487,683
Take the following PHP regular expression: `/^(what is|tell me) your name$/` I want to determine the total number of available words within the pattern. The correct answer would be `4` seeing as the following combinations are compatible: ``` what is your name => 4 words tell me your name => 4 words ``` A simple `c...
2016/11/08
[ "https://Stackoverflow.com/questions/40487683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6821555/" ]
Update: ------- Just add a `@JsonFormat` annotation with the date format above the `Instant` property. It's very easy. In the case you have an ObjectMapper with the `JavaTimeModule` like next: ``` ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new JavaTimeModule()); ``` If you have a class with an...
Here is an alternative which is something you can set globally, but will need you to use `ZonedDateTime` with instant formatter as we can't set the format for the `Instant` Serializer provided with Java Time Module. You wont see any side effects of using zoned date time for instant as jackson serializes the zone id se...
40,487,683
Take the following PHP regular expression: `/^(what is|tell me) your name$/` I want to determine the total number of available words within the pattern. The correct answer would be `4` seeing as the following combinations are compatible: ``` what is your name => 4 words tell me your name => 4 words ``` A simple `c...
2016/11/08
[ "https://Stackoverflow.com/questions/40487683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6821555/" ]
Update: ------- Just add a `@JsonFormat` annotation with the date format above the `Instant` property. It's very easy. In the case you have an ObjectMapper with the `JavaTimeModule` like next: ``` ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new JavaTimeModule()); ``` If you have a class with an...
Here's some Kotlin code of formatting `Instant` fields, so they will not contain milliseconds, you can use custom date formatters ``` ObjectMapper().apply { val javaTimeModule = JavaTimeModule() javaTimeModule.addSerializer(Instant::class.java, Iso8601WithoutMillisInstantSerializer()) registerM...
44,144,635
I'm building a chat component in React and can't figure out how to clear the textarea element after the enter key is pressed. The component is stateless, and there are no props associated with the textarea, so it is never re-rendered. ``` sendMessage(e) { if (e.key === 'Enter') { this.props.onKeyUp(e.target.valu...
2017/05/23
[ "https://Stackoverflow.com/questions/44144635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3349337/" ]
Just clear the `value` of `target` after your work with value. ``` e.target.value = ""; ``` Example: ```js class Test extends React.Component { sendMessage(e) { if (e.key === 'Enter') { //this.props.onKeyUp(e.target.value) your work with value // I want to clear the textarea around here ...
An answer that worked was deleted, basically it said to use refs: <https://facebook.github.io/react/docs/refs-and-the-dom.html>
44,144,635
I'm building a chat component in React and can't figure out how to clear the textarea element after the enter key is pressed. The component is stateless, and there are no props associated with the textarea, so it is never re-rendered. ``` sendMessage(e) { if (e.key === 'Enter') { this.props.onKeyUp(e.target.valu...
2017/05/23
[ "https://Stackoverflow.com/questions/44144635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3349337/" ]
``` constructor(props){ this.state({value:""}) } sendMessage(e) { if (e.key === 'Enter') { this.props.onKeyUp(e.target.value) // I want to clear the textarea around here this.setState({value:""}) } } handleChange=(e)=>{ this.setState({value :e.target.value}) } render() { return <textarea value={thi...
An answer that worked was deleted, basically it said to use refs: <https://facebook.github.io/react/docs/refs-and-the-dom.html>