jQuery animate callback wont work Firefox IE, works in Chrome
console.log('1');
jQuery('#inner-content').animate({
'width': jQuery('#inner-content-wrapper').width() + 'px'
}, {
duration: 800,
queue: false,
complete: function(){
console.log('2');
}
});
console.log('3');
Console output Chrome v28: 1,3,2
Console output Firefox v23: 1,3 Animation works but complete is never
executed, this also doesn't work in IE 10
Tuesday, 20 August 2013
What type of model relationship should I use for two foreign key references in same row?
What type of model relationship should I use for two foreign key
references in same row?
I'm trying to create an Event model that has two references to the Contact
model.
Why two? Because a Contact can either be of type Client or Organizer.
How can I add two foreign key columns to my Event model?
references in same row?
I'm trying to create an Event model that has two references to the Contact
model.
Why two? Because a Contact can either be of type Client or Organizer.
How can I add two foreign key columns to my Event model?
Android SDK Manager is executing in cmd but not opening
Android SDK Manager is executing in cmd but not opening
Config Details:
Windows 8 Pro 32bit
adt-bundle-windows-x86-20130717
jdk-6u26-windows-i586 32bit
Directories:
For Java - C:\Program Files\Java\jdk1.6.0_26
For Android Root - Z:\Program Files\Android
For Android SDK - Z:\Program Files\Android\sdk
Environmental Variables:
var_name: JAVA_HOME
var_value: C:\Program Files\Java\jdk1.6.0_26\
var_name: JDK_HOME
var_value: C:\Program Files\Java\jdk1.6.0_26\
var_name: Path
var_value: C:\Program Files\Java\jdk1.6.0_26\bin
Modification: 1) set java_exe= "%JAVA_HOME%\bin\java.exe" if not defined
java_exe goto :EOF
2) for /f %%a in ('"%~dps0\find_java.exe" -s') do set java_exe=%%a
3) for /f %%a in ('"%~dps0\find_java.exe" -s -w') do set javaw_exe=%%a
First i downloaded adt-bundle then extracted into Android Root directory
(i installed java far earlier) then i installed ADT Plugins from
https://dl-ssl.google.com/android/eclipse/ and successfully connected
Eclipse IDE with Android SDK. Now i am trying to Android SDK Components
but when i clicked on Window-> Android SDK Manager in Eclipse a dialogue
box opened said SDK Manager will open in a while but it didn't. Whenever i
try to open SDK Manager everytime a cmd prompt for a second then disappear
and nothing happened while AVD Manager open properly.
Then i went through some solution in several forums and modified some line
of code (as of modification 1 in tools\android.bat ; 2 and 3 in
tools\lib\find_java.bat)
Now in command line
Z:\Program Files\Android\sdk\tools>android
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see
java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
Z:\Program Files\Android\sdk\tools>
As you can see that my attempts are successful and android.bat is
executing but the problem is when i try to open SDK Manager directly or
via IDE again nothing happened but executing in cmd. I cannot understand
what happening actually and i am unable to found anything related with
this in any forum. Please Help. Thanks in advance.
Config Details:
Windows 8 Pro 32bit
adt-bundle-windows-x86-20130717
jdk-6u26-windows-i586 32bit
Directories:
For Java - C:\Program Files\Java\jdk1.6.0_26
For Android Root - Z:\Program Files\Android
For Android SDK - Z:\Program Files\Android\sdk
Environmental Variables:
var_name: JAVA_HOME
var_value: C:\Program Files\Java\jdk1.6.0_26\
var_name: JDK_HOME
var_value: C:\Program Files\Java\jdk1.6.0_26\
var_name: Path
var_value: C:\Program Files\Java\jdk1.6.0_26\bin
Modification: 1) set java_exe= "%JAVA_HOME%\bin\java.exe" if not defined
java_exe goto :EOF
2) for /f %%a in ('"%~dps0\find_java.exe" -s') do set java_exe=%%a
3) for /f %%a in ('"%~dps0\find_java.exe" -s -w') do set javaw_exe=%%a
First i downloaded adt-bundle then extracted into Android Root directory
(i installed java far earlier) then i installed ADT Plugins from
https://dl-ssl.google.com/android/eclipse/ and successfully connected
Eclipse IDE with Android SDK. Now i am trying to Android SDK Components
but when i clicked on Window-> Android SDK Manager in Eclipse a dialogue
box opened said SDK Manager will open in a while but it didn't. Whenever i
try to open SDK Manager everytime a cmd prompt for a second then disappear
and nothing happened while AVD Manager open properly.
Then i went through some solution in several forums and modified some line
of code (as of modification 1 in tools\android.bat ; 2 and 3 in
tools\lib\find_java.bat)
Now in command line
Z:\Program Files\Android\sdk\tools>android
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see
java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
Z:\Program Files\Android\sdk\tools>
As you can see that my attempts are successful and android.bat is
executing but the problem is when i try to open SDK Manager directly or
via IDE again nothing happened but executing in cmd. I cannot understand
what happening actually and i am unable to found anything related with
this in any forum. Please Help. Thanks in advance.
MarkLogic 5 return elements wrapped in CDATA
MarkLogic 5 return elements wrapped in CDATA
I'm trying to get MarkLogic 5 to return items wrapped in a CDATA tag but
it simply refuses to. Doesn't barf, just doesn't do it. Am I barking up
the wrong tree using: -
xquery version "1.0-ml";
declare option xdmp:output "cdata-section-elements = text";
<text><![CDATA[\begin{eqnarray}
\fl {R}_{\mathrm{sw}(e)}=\nonumber\\ \fl \biggl \{
\frac{3{L}_{1}{L}_{2}{Q}_{\mathrm{after}}}{1 2{k}_{h}{A}_{h}\Delta
T({L}_{1}+{L}_{2})-({L}_{1}+{L}_{2})^{2}({Q}_{\mathrm{before}}-{Q}_{\mathrm{after}})}-1\biggr
\} \nonumber\\ \times
~\frac{{L}_{1}{L}_{2}}{({L}_{1}+{L}_{2}){k}_{h}{A}_{h}}-{R}_{j}-{R}_{\mathrm{CNT}},
\end{eqnarray} ]]>
</text>
Simply returns without the CDATA tag which is contrary to all
documentation I can find. I've tried returning the content several ways,
e.g., xdmp:quote but as I need to parse the content using XSLT at the
other end it really needs to be wrapped in a CDATA element.
The content is normally deeply nested but I've simplified here for ease.
Any clues?
I'm trying to get MarkLogic 5 to return items wrapped in a CDATA tag but
it simply refuses to. Doesn't barf, just doesn't do it. Am I barking up
the wrong tree using: -
xquery version "1.0-ml";
declare option xdmp:output "cdata-section-elements = text";
<text><![CDATA[\begin{eqnarray}
\fl {R}_{\mathrm{sw}(e)}=\nonumber\\ \fl \biggl \{
\frac{3{L}_{1}{L}_{2}{Q}_{\mathrm{after}}}{1 2{k}_{h}{A}_{h}\Delta
T({L}_{1}+{L}_{2})-({L}_{1}+{L}_{2})^{2}({Q}_{\mathrm{before}}-{Q}_{\mathrm{after}})}-1\biggr
\} \nonumber\\ \times
~\frac{{L}_{1}{L}_{2}}{({L}_{1}+{L}_{2}){k}_{h}{A}_{h}}-{R}_{j}-{R}_{\mathrm{CNT}},
\end{eqnarray} ]]>
</text>
Simply returns without the CDATA tag which is contrary to all
documentation I can find. I've tried returning the content several ways,
e.g., xdmp:quote but as I need to parse the content using XSLT at the
other end it really needs to be wrapped in a CDATA element.
The content is normally deeply nested but I've simplified here for ease.
Any clues?
Grep to extract the word matching the given pattern
Grep to extract the word matching the given pattern
I have a log file with entries like
INFO 2013-08-16 13:46:48,660 Index=abc:12 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=abcd:12 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=def:134 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=abkfe insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=lmkfe insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=lmkfe insertTotal=11
I would like to grep and extract the words that match my pattern which is
abc:<some_number> and def:<some_number>.
$ cat "log.txt" | grep -w "abc" -w "def" >> "failed_values.txt";
So in this case, my failed_values.txt should only have
abc:12
def:134
The key to note is that my pattern ends with a : followed by a number and
then a space e. g. abc:122.
I have a log file with entries like
INFO 2013-08-16 13:46:48,660 Index=abc:12 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=abcd:12 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=def:134 insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=abkfe insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=lmkfe insertTotal=11
INFO 2013-08-16 13:46:48,660 Index=lmkfe insertTotal=11
I would like to grep and extract the words that match my pattern which is
abc:<some_number> and def:<some_number>.
$ cat "log.txt" | grep -w "abc" -w "def" >> "failed_values.txt";
So in this case, my failed_values.txt should only have
abc:12
def:134
The key to note is that my pattern ends with a : followed by a number and
then a space e. g. abc:122.
Monday, 19 August 2013
Definition of weak solutions
Definition of weak solutions
Why are weak solutions defined like:
A function $u \in H^1(\Omega)$ is a weak solution of $$ Lu=div(A\nabla
u)+b\cdot\nabla u+cu=f+divF, in \Omega $$ if $$ \int_\Omega \nabla
\phi\cdot (A\nabla u-F)dx=\int_\Omega\phi(b\cdot \nabla u+cu-f) dx $$
holds for every $\phi \in C_0^\infty(\Omega).$
I mean, we define this new notion "weak solutions" in order to generalize
classical solutions. Then we just need one purpose which is "classical
solution $\Rightarrow$ weak solution" and if everything is sufficiently
smooth, then it follows that a weak solution is automatically a classical
one. If this is our motivation to define weak solutions, then there would
have tons of methods to do.
My point is why this type of definition of weak solutions is so important.
Is there any other motivations like from geometry or other subjects to
make this definition so outstanding and is there any other type of
definitions of generalized solutions?
Why are weak solutions defined like:
A function $u \in H^1(\Omega)$ is a weak solution of $$ Lu=div(A\nabla
u)+b\cdot\nabla u+cu=f+divF, in \Omega $$ if $$ \int_\Omega \nabla
\phi\cdot (A\nabla u-F)dx=\int_\Omega\phi(b\cdot \nabla u+cu-f) dx $$
holds for every $\phi \in C_0^\infty(\Omega).$
I mean, we define this new notion "weak solutions" in order to generalize
classical solutions. Then we just need one purpose which is "classical
solution $\Rightarrow$ weak solution" and if everything is sufficiently
smooth, then it follows that a weak solution is automatically a classical
one. If this is our motivation to define weak solutions, then there would
have tons of methods to do.
My point is why this type of definition of weak solutions is so important.
Is there any other motivations like from geometry or other subjects to
make this definition so outstanding and is there any other type of
definitions of generalized solutions?
Associate SSL certificate for SQL Server which does not use the FQDN
Associate SSL certificate for SQL Server which does not use the FQDN
We would like to connect securely to SQL 2008 R2 over the internet for
reporting purposes. Speed is not a huge concern for these smaller data
sets, and users are going to be using simple reporting programs (e.g.
Access) that require ODBC connections, rather than an API of sorts. In
this scenario we have a SQL Server running on a local network (e.g.
sql.mydomain.local) which is being accessed from the outside world via NAT
(e.g. sql.mydomain.com, port xyz). This works fine with no security,
however we need to encrypt the connections. The simple way to do that is
to add SSL to the SQL server. Here is where I run into issues though:
If I get a certificate for the external name (sql.mydomain.com), SQL
Server refuses to see or use the external SSL cert as it is not the
servers name or FQDN, since it is configured locally (per
http://technet.microsoft.com/en-us/library/ms191192.aspx). Manually adding
the cert via HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL.x\MSSQLServer\SuperSocketNetLib doesn't seem to change that
behavior for me.
If I use a self-signed certificate from the domain controller, I'm able to
see and use the cert in SQL. However external connections obviously
complain that the cert is not trusted. If I add the domain controller as a
trusted publisher, then SQL complains that the server name doesn't match
the certificate name when I attempt to connect to it.
All of the paths forward seem a little wonky: 1. Setup a local domain for
only that server with the public name (e.g. mydomain.com) and add the
machine there so that the FQDN matches the external certificate generated
from a trusted publisher, hopefully SQL will see and use the cert then. 2.
Have the users modify their hosts file to create a cname of
sql.mydomain.local to sql.mydomain.com.
Am I missing something in my understanding so far? Is there any way to get
around SQL's limitations regarding use of a cert which is not the FQDN? If
I purchase a certificate for sql.mydomain.com with a Subject Alternative
Name of sql.mydomain.local, will SQL see and use it?
We would like to connect securely to SQL 2008 R2 over the internet for
reporting purposes. Speed is not a huge concern for these smaller data
sets, and users are going to be using simple reporting programs (e.g.
Access) that require ODBC connections, rather than an API of sorts. In
this scenario we have a SQL Server running on a local network (e.g.
sql.mydomain.local) which is being accessed from the outside world via NAT
(e.g. sql.mydomain.com, port xyz). This works fine with no security,
however we need to encrypt the connections. The simple way to do that is
to add SSL to the SQL server. Here is where I run into issues though:
If I get a certificate for the external name (sql.mydomain.com), SQL
Server refuses to see or use the external SSL cert as it is not the
servers name or FQDN, since it is configured locally (per
http://technet.microsoft.com/en-us/library/ms191192.aspx). Manually adding
the cert via HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL.x\MSSQLServer\SuperSocketNetLib doesn't seem to change that
behavior for me.
If I use a self-signed certificate from the domain controller, I'm able to
see and use the cert in SQL. However external connections obviously
complain that the cert is not trusted. If I add the domain controller as a
trusted publisher, then SQL complains that the server name doesn't match
the certificate name when I attempt to connect to it.
All of the paths forward seem a little wonky: 1. Setup a local domain for
only that server with the public name (e.g. mydomain.com) and add the
machine there so that the FQDN matches the external certificate generated
from a trusted publisher, hopefully SQL will see and use the cert then. 2.
Have the users modify their hosts file to create a cname of
sql.mydomain.local to sql.mydomain.com.
Am I missing something in my understanding so far? Is there any way to get
around SQL's limitations regarding use of a cert which is not the FQDN? If
I purchase a certificate for sql.mydomain.com with a Subject Alternative
Name of sql.mydomain.local, will SQL see and use it?
Subscribe to:
Posts (Atom)