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
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
In a language agnostic point of view, you should buy definitely this (easy to learn through examples): [http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124](https://rads.stackoverflow.com/amzn/click/com/0596007124) or Refactoring To Patterns for a more cause-and-effect approach: [http:/...
Get the book from this guy. He explains 23 design patterns in under 100 pages and with nice simple examples. Link: [Design Patterns in C#](https://rads.stackoverflow.com/amzn/click/com/B008ZT9MOI) And after you have read this for first time get this cheat-sheet in order to help you when you revisit the topic (almost ...
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
Along with Head-First-Design-Patterns and GoF Design Patterns. I suggest This list of books below: * **Refactoring To Patterns** by *Joshua Kerievsky* * **Refactoring: Improving the Design of Existing Code** by *Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke, don Roberts* * **C# 3.0...
I recommend this book: [http://www.amazon.com/Applied-Java-Patterns-Stephen-Stelting/dp/0130935387](https://rads.stackoverflow.com/amzn/click/com/0130935387) If you need an online info: <http://sourcemaking.com/design_patterns>, <http://www.oodesign.com/>
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
Along with Head-First-Design-Patterns and GoF Design Patterns. I suggest This list of books below: * **Refactoring To Patterns** by *Joshua Kerievsky* * **Refactoring: Improving the Design of Existing Code** by *Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke, don Roberts* * **C# 3.0...
Get the book from this guy. He explains 23 design patterns in under 100 pages and with nice simple examples. Link: [Design Patterns in C#](https://rads.stackoverflow.com/amzn/click/com/B008ZT9MOI) And after you have read this for first time get this cheat-sheet in order to help you when you revisit the topic (almost ...
3,914,690
I have the following: * 1 java class * 1 bat file (starts the groovy script) * 1 groovy file All in the same folder. Now I want to use Maven or Ant to run the groovy file but I can't get it to work. Is there someone who can show me how to write this pom.xml or build.xml? I don't want to use the bat file anymore.
2010/10/12
[ "https://Stackoverflow.com/questions/3914690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/473339/" ]
With Maven, use the gmaven plugin. From [its documentation](http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code): > > ### [Execute a Local Groovy Script](http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code#ExecutingGroovyCode-ExecuteaLocalGroovyScript) > > > > ``` > <plugin> > <groupId>org....
You can do this via Ant as shown [with a full example here](http://www.developer.com/lang/article.php/10924_3657751_3/What-Groovy-Can-Do-For-You.htm). See the **Compiling and running with Ant** section. You'll have to [download ant](http://ant.apache.org/), make sure the ANT\_HOME and JAVA\_HOME variables are set, and...
3,914,690
I have the following: * 1 java class * 1 bat file (starts the groovy script) * 1 groovy file All in the same folder. Now I want to use Maven or Ant to run the groovy file but I can't get it to work. Is there someone who can show me how to write this pom.xml or build.xml? I don't want to use the bat file anymore.
2010/10/12
[ "https://Stackoverflow.com/questions/3914690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/473339/" ]
With Maven, use the gmaven plugin. From [its documentation](http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code): > > ### [Execute a Local Groovy Script](http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code#ExecutingGroovyCode-ExecuteaLocalGroovyScript) > > > > ``` > <plugin> > <groupId>org....
There is a [groovy plugin](http://docs.codehaus.org/display/GROOVY/The+groovy+Ant+Task) for ANT that can invoke groovy scripts ``` <groovy src="helloWorld.groovy"/> ``` I would recommend combining it with [ivy](http://ant.apache.org/ivy/) which can download the required jars for you, similar to the Maven example giv...
2,061,818
When developing an intranet application where the target browser is IE only (IE6 - horrible I know) is there any reason that we shouldn’t use the `showModalDialog()` feature of IE to display dialog windows? My colleague prefers using `showModalDialog()` but I prefer using a jQuery plug-in such as FancyBox, FaceBox or...
2010/01/14
[ "https://Stackoverflow.com/questions/2061818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/113535/" ]
I would avoid showModalDialog just because at some stage in the future IE6 will be depreciated and you will have to go back and fix it all. I know some large organisations are slow, but do you think they will still be using IE6 in 2 or 3 years? On the other hand, if it is a consulting gig, do it this way and then in ...
It really depends on what you are doing, but the plugins you listed are not really the equivalent of a dialog window. They are more for a nice/fancy display of photos and content. I would recommend with going with something non proprietary because your company can't stay on IE6 forever (Though it seems like it some ti...
2,061,818
When developing an intranet application where the target browser is IE only (IE6 - horrible I know) is there any reason that we shouldn’t use the `showModalDialog()` feature of IE to display dialog windows? My colleague prefers using `showModalDialog()` but I prefer using a jQuery plug-in such as FancyBox, FaceBox or...
2010/01/14
[ "https://Stackoverflow.com/questions/2061818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/113535/" ]
My opinion is that `window.showModalDialog()` will not be deprecated as it is present in most major browsers and works perfect in all of them except Chrome.
It really depends on what you are doing, but the plugins you listed are not really the equivalent of a dialog window. They are more for a nice/fancy display of photos and content. I would recommend with going with something non proprietary because your company can't stay on IE6 forever (Though it seems like it some ti...
2,061,818
When developing an intranet application where the target browser is IE only (IE6 - horrible I know) is there any reason that we shouldn’t use the `showModalDialog()` feature of IE to display dialog windows? My colleague prefers using `showModalDialog()` but I prefer using a jQuery plug-in such as FancyBox, FaceBox or...
2010/01/14
[ "https://Stackoverflow.com/questions/2061818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/113535/" ]
I would avoid showModalDialog just because at some stage in the future IE6 will be depreciated and you will have to go back and fix it all. I know some large organisations are slow, but do you think they will still be using IE6 in 2 or 3 years? On the other hand, if it is a consulting gig, do it this way and then in ...
My opinion is that `window.showModalDialog()` will not be deprecated as it is present in most major browsers and works perfect in all of them except Chrome.
19,519
In the gospels, why does Jesus sometimes tell the people not to tell anyone after he has performed a miracle? Matthew 9:30 There are multiple examples of this throughout the gospels.
2015/08/08
[ "https://hermeneutics.stackexchange.com/questions/19519", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/10251/" ]
Intro ----- As noted by the OP, there are a number of these passage in the Gospel accounts. Collectively, this phenomenon is know as the "Messianic Secret" in academic literature. A number of explanations have been offered for the secrecy passages ranging from Jesus actually said such things for some reason (to teach ...
The answer to your question can be found in other passages Scripture: Jesus Christ was not above Scripture, thus he could not cross the bounds of what was preordained to occur, set forth, by His Father (God). More specifically, He came to fulfill certain prophecy. Everything that occured had a set time to happen and co...
19,519
In the gospels, why does Jesus sometimes tell the people not to tell anyone after he has performed a miracle? Matthew 9:30 There are multiple examples of this throughout the gospels.
2015/08/08
[ "https://hermeneutics.stackexchange.com/questions/19519", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/10251/" ]
There are a variety of reasons why each gospel author may have chosen to implement what has come to be called the "messianic secret" (*Messiasgeheimnis*) theme (based on Wrede's watershed work).1 Most scholarly discussion of this theme is related to the gospel of Mark, which the author of the gospel ascribed to Matthew...
The answer to your question can be found in other passages Scripture: Jesus Christ was not above Scripture, thus he could not cross the bounds of what was preordained to occur, set forth, by His Father (God). More specifically, He came to fulfill certain prophecy. Everything that occured had a set time to happen and co...
19,519
In the gospels, why does Jesus sometimes tell the people not to tell anyone after he has performed a miracle? Matthew 9:30 There are multiple examples of this throughout the gospels.
2015/08/08
[ "https://hermeneutics.stackexchange.com/questions/19519", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/10251/" ]
There are a variety of reasons why each gospel author may have chosen to implement what has come to be called the "messianic secret" (*Messiasgeheimnis*) theme (based on Wrede's watershed work).1 Most scholarly discussion of this theme is related to the gospel of Mark, which the author of the gospel ascribed to Matthew...
Intro ----- As noted by the OP, there are a number of these passage in the Gospel accounts. Collectively, this phenomenon is know as the "Messianic Secret" in academic literature. A number of explanations have been offered for the secrecy passages ranging from Jesus actually said such things for some reason (to teach ...
37,793,389
How can call OnMouse defined in a class in setMouseCallback? Normally it is like that: ``` cv::setMouseCallback( String, onMouse, 0 ); ``` Here is my program: **Camera\_Height.h:** ``` class CameraHeight { public: void onMouse( int, int, int, int, void*); }; ``` **Camera\_Height.cpp:** ``` void CameraHeight...
2016/06/13
[ "https://Stackoverflow.com/questions/37793389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3636909/" ]
`setMouseCallback()` does not accept a pointer-to-member-function for the callback, it expects a standalone function instead. As such, if you want to use a class method, you must declare it as `static` to remove its `this` pointer. To access instance members of your class, the callback needs a pointer to an instance o...
You should make `onMouse` static and then call it : `&CameraHeight::onMouse`.
37,793,389
How can call OnMouse defined in a class in setMouseCallback? Normally it is like that: ``` cv::setMouseCallback( String, onMouse, 0 ); ``` Here is my program: **Camera\_Height.h:** ``` class CameraHeight { public: void onMouse( int, int, int, int, void*); }; ``` **Camera\_Height.cpp:** ``` void CameraHeight...
2016/06/13
[ "https://Stackoverflow.com/questions/37793389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3636909/" ]
`setMouseCallback()` does not accept a pointer-to-member-function for the callback, it expects a standalone function instead. As such, if you want to use a class method, you must declare it as `static` to remove its `this` pointer. To access instance members of your class, the callback needs a pointer to an instance o...
@Remy Lebeau Thanks your answer is right, it helps me a lot.. But after that I get an error that a static member function can't call a member variable of the same class! But I solve it in this way: ``` void CameraHeight::onMouse( int event, int x, int y, int flags, void* param ) { CameraHeight *anInstance = stati...
3,023,520
If there a more efficient way to do the following: ``` DirectoryInfo di = new DirectoryInfo(@"c:\"); newFileName = Path.Combine(di.FullName, "MyFile.Txt"); ``` I realise that it’s only two lines of code, but given that I already have the directory, it feels like I should be able to do something like: ``` newFileNam...
2010/06/11
[ "https://Stackoverflow.com/questions/3023520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/166556/" ]
Why not just do `newFileName = Path.Combine(@"c:\", "MyFile.Txt");`? As you say, you already have the path.
@ho1 is right. You can also write an extension method (C# 3.0+): ``` public static class DirectoryInforExtensions { public static string Combine(this DirectoryInfo directoryInfo, string fileName) { return Path.Combine(di.FullName, fileName); } } ``` and use it by doing ``` newFileName = di.Combine("MyFil...
66,235,158
I am using Office UI Fabric React that comes with SPFx. It's version 6.214.0. I have a dropdown that looks like this: ``` <Dropdown placeholder={strings.Position} label="" options={positionOptions} onChange={(e, option) => setPosition(option.text)} styles = {dropdownStyles} className={styles.dropDown}/> ``` The styl...
2021/02/17
[ "https://Stackoverflow.com/questions/66235158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14963200/" ]
The callout width can be over-written by adding a class to the page. Auto width ensures the callout width will be determined by its contents. ``` .ms-Callout { width: auto; min-width: 150px; } ```
I would recommend using the `styles` prop. You can style the `root` of the component as well as individual aspects of the output like the callout, the `dropdownItem`, the `label` and more. A lot of Fluent UI / office-ui-fabric-react components have this `styles` prop - they give you clearly defined elements that you ca...
62,086,849
Here is what I currently have which returns 3 columns for patient\_id, group\_concat\_1, and group\_concat\_2: ``` SELECT patient_id, (SELECT GROUP_CONCAT(column1) FROM table1 where patient_id = patient.id ) group_concat_1, (SELECT GROUP_CONCAT(column1) FROM table2 where patient_id = patient.id ) group_concat_2 FROM...
2020/05/29
[ "https://Stackoverflow.com/questions/62086849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12276615/" ]
You can concatenate directly the 2 columns: ``` SELECT p.patient_id, CONCAT( (SELECT GROUP_CONCAT(column1) FROM table1 where patient_id = p.patient.id), (SELECT GROUP_CONCAT(column1) FROM table2 where patient_id = p.patient.id) ) FROM patient p ```
I'm pretty sure you want `concat_ws()` for this purpose: ``` SELECT patient_id, CONCAT_WS(',' (SELECT GROUP_CONCAT(t1.column1) FROM table1 t1 where t1.patient_id = p.id ), (SELECT GROUP_CONCAT(t2.column1) FROM table2 t2 where t2.patient_id = p.id ...
38,267,058
I have this two files: mappa2.html: #map { height: 85%; } ``` </style> <script> function showHint() {         var xmlhttp = new XMLHttpRequest();         xmlhttp.onreadystatechange = function() {             if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {                 document.getElementById("txtH...
2016/07/08
[ "https://Stackoverflow.com/questions/38267058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6565305/" ]
The solution is to use the DataFrame.aggregateByKey function that aggregates the values per partition and node before shuffling that aggregate around the computing nodes where they are combined to one resulting value. Pseudo-code looks like this. It is inspired by [this tutorial](http://www.learnbymarketing.com/618/p...
This cannot work because when you execute ``` from pyspark.sql.functions import * ``` you shadow built-in `abs` with `pyspark.sql.functions.abs` which expects a column not a local Python value as an input. Also UDF you created doesn't handle `NULL` entries. * Don't use `import *` unless you're aware of what exactl...
18,142,583
I have to remove ability to select some rows in my grid. I use CheckboxModel ``` selModel: Ext.create( 'Ext.selection.CheckboxModel', { mode: 'SIMPLE' } ) ``` To disable selection I use beforeselect event ``` beforeselect: function ( row, model, index ) { if ( model.data.id == '3' ) { return false;...
2013/08/09
[ "https://Stackoverflow.com/questions/18142583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2667065/" ]
The final solution for my task (remove the ability to choose a specific row by its id) is as follows: Override **selectAll** (and **unselectAll** if needed) method when you define selection model to ignore spicified rows: ``` selModel: Ext.create( 'Ext.selection.CheckboxModel', { mode: 'SIMPLE', select: funct...
There's currently no hooks built in to allow such functionality. The header checkbox calls `selectAll` and `deselectAll`, so you would need to override those methods to prevent it on a per record basis.
54,954
My teacher once said that a daily diary is pretty much the same thing as a letter to a friend, except; it begins with "Dear diary" instead of "Dear friend". Is this true?
2021/02/17
[ "https://writers.stackexchange.com/questions/54954", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/48653/" ]
Are you writing the diary entries for a school project? If this is not a school exercise and you are doing it for yourself then it doesn't matter what anyone tells you. What matters is what feels right to you and what comes naturally. Feel free to write - Dear John. Write out to your sister, brother, grandmother or mo...
Do you have to hand in diary entries (real or thought up)? If so, write those pages as the teacher tells you to do. Traditional ending are 'love, see you tomorrow' Love, [your name] or just your name. If not, you can use whatever you want. If you feel right with the 'Dear Diary' attitude, right, use it. But i...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
Justin(above) is accurate. However, keep in mind that depending on who you get the certificate from (intermediate CA, root CA involved or not) or how the pfx is created/exported, sometimes they could be missing the certificate chain. After Import, You would have a certificate of PrivateKeyEntry type, but with a chain o...
Your PFX file should contain the private key within it. Export the private key and certificate directly from your PFX file (e.g. using OpenSSL) and import them into your Java keystore. **Edit** Further information: * Download OpenSSL for Windows [here](http://www.slproweb.com/products/Win32OpenSSL.html). * Export pr...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
**Using JDK 1.6 or later** It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): ``` keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS ...
If you work with JDK 1.5 or below the keytool utility will not have the `-importkeystore` option (see [JDK 1.5 keytool documentation](http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html)) and the solution by MikeD will be available only by transferring the `.pfx` on a machine with a newer JDK (1.6 or...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
Justin(above) is accurate. However, keep in mind that depending on who you get the certificate from (intermediate CA, root CA involved or not) or how the pfx is created/exported, sometimes they could be missing the certificate chain. After Import, You would have a certificate of PrivateKeyEntry type, but with a chain o...
If you work with JDK 1.5 or below the keytool utility will not have the `-importkeystore` option (see [JDK 1.5 keytool documentation](http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html)) and the solution by MikeD will be available only by transferring the `.pfx` on a machine with a newer JDK (1.6 or...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
**Using JDK 1.6 or later** It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): ``` keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS ...
Your PFX file should contain the private key within it. Export the private key and certificate directly from your PFX file (e.g. using OpenSSL) and import them into your Java keystore. **Edit** Further information: * Download OpenSSL for Windows [here](http://www.slproweb.com/products/Win32OpenSSL.html). * Export pr...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
jarsigner can use your pfx file as the keystore for signing your jar. Be sure that your pfx file has the private key and the cert chain when you export it. There is no need to convert to other formats. The trick is to obtain the *Alias* of your pfx file: ``` keytool -list -storetype pkcs12 -keystore your_pfx_file -v ...
Justin(above) is accurate. However, keep in mind that depending on who you get the certificate from (intermediate CA, root CA involved or not) or how the pfx is created/exported, sometimes they could be missing the certificate chain. After Import, You would have a certificate of PrivateKeyEntry type, but with a chain o...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
jarsigner can use your pfx file as the keystore for signing your jar. Be sure that your pfx file has the private key and the cert chain when you export it. There is no need to convert to other formats. The trick is to obtain the *Alias* of your pfx file: ``` keytool -list -storetype pkcs12 -keystore your_pfx_file -v ...
This is my solution for a Visual Studio/Xamarin environment. Intended outcomes: * The PFX (`foo.pfx` in the examples) will be imported into JKS keystore (`bar.keystore` in the examples). * The keystore will be protected with a new password (shall be referred to as "signing password"). * The keystore will contain a si...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
**Using JDK 1.6 or later** It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): ``` keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS ...
I found [this](https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1283) page which tells you how to import a PFX to JKS (Java Key Store): ``` keytool -importkeystore -srckeystore PFX_P12_FILE_NAME -srcstoretype pkcs12 -srcstorepass PFX_P12_FILE -srcalias SOURCE_ALIAS -destkeystore KEYSTO...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
**Using JDK 1.6 or later** It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): ``` keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS ...
This is my solution for a Visual Studio/Xamarin environment. Intended outcomes: * The PFX (`foo.pfx` in the examples) will be imported into JKS keystore (`bar.keystore` in the examples). * The keystore will be protected with a new password (shall be referred to as "signing password"). * The keystore will contain a si...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
jarsigner can use your pfx file as the keystore for signing your jar. Be sure that your pfx file has the private key and the cert chain when you export it. There is no need to convert to other formats. The trick is to obtain the *Alias* of your pfx file: ``` keytool -list -storetype pkcs12 -keystore your_pfx_file -v ...
If you work with JDK 1.5 or below the keytool utility will not have the `-importkeystore` option (see [JDK 1.5 keytool documentation](http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html)) and the solution by MikeD will be available only by transferring the `.pfx` on a machine with a newer JDK (1.6 or...
4,217,107
I need to sign Android application (`.apk`). I have `.pfx` file. I converted it to `.cer` file via Internet Explorer and then converted `.cer` to `.keystore` using keytool. Then I've tried to sign `.apk` with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong?
2010/11/18
[ "https://Stackoverflow.com/questions/4217107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512377/" ]
I found [this](https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1283) page which tells you how to import a PFX to JKS (Java Key Store): ``` keytool -importkeystore -srckeystore PFX_P12_FILE_NAME -srcstoretype pkcs12 -srcstorepass PFX_P12_FILE -srcalias SOURCE_ALIAS -destkeystore KEYSTO...
If you work with JDK 1.5 or below the keytool utility will not have the `-importkeystore` option (see [JDK 1.5 keytool documentation](http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html)) and the solution by MikeD will be available only by transferring the `.pfx` on a machine with a newer JDK (1.6 or...
52,973,431
I've got 2 lists in the program. One list is a list of 5 generic integers and the second list contain 5 integers inputed by user. Now I need to compare whether each of the user numbers is on the generic numbers list. If so add a point to the player. I have no idea where to start with it. I don't really want a complete ...
2018/10/24
[ "https://Stackoverflow.com/questions/52973431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10414086/" ]
I was able to get this from [GeeksForGeeks Comparing Python Lists](https://www.geeksforgeeks.org/python-print-common-elements-two-lists/) This program will print out the elements that exist in both lists. ``` # Python program to find the common elements # in two lists def common_member(a, b): a_set = set(a) ...
The best thing you can do is make a nested loop, so a loop in a loop. Do it like this: ``` for i in list1: for x in list2: if str(x) == str(i): #Do stuff, like add up point else: #Do stuff, like subtract points, or put in 'pass' for Python to pass the condition ``` I hoped...
52,973,431
I've got 2 lists in the program. One list is a list of 5 generic integers and the second list contain 5 integers inputed by user. Now I need to compare whether each of the user numbers is on the generic numbers list. If so add a point to the player. I have no idea where to start with it. I don't really want a complete ...
2018/10/24
[ "https://Stackoverflow.com/questions/52973431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10414086/" ]
I was able to get this from [GeeksForGeeks Comparing Python Lists](https://www.geeksforgeeks.org/python-print-common-elements-two-lists/) This program will print out the elements that exist in both lists. ``` # Python program to find the common elements # in two lists def common_member(a, b): a_set = set(a) ...
Use ``` set(user_input_list) & set(generic_list) ``` to get the common values in both the list.
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
I think there is a much simpler and more elegant solution. Some of the above-mentioned methods may even throw unhandled exceptions in some cases. Here is a fool-proof (as in never goes wrong) and very fast code. Just try it and compare the results in terms of speed and compactness: ``` #include <string> // Convert st...
This is a bit faster: ``` static const char* s_hexTable[256] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
This is a bit faster: ``` static const char* s_hexTable[256] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "...
``` #include "boost/algorithm/hex.hpp" std::string hexed = boost::algorithm::hex(std::string("input")); ``` <https://www.boost.org/doc/libs/1_78_0/boost/algorithm/hex.hpp>
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
``` string ToHex(const string& s, bool upper_case /* = true */) { ostringstream ret; for (string::size_type i = 0; i < s.length(); ++i) ret << std::hex << std::setfill('0') << std::setw(2) << (upper_case ? std::uppercase : std::nouppercase) << (int)s[i]; return ret.str(); } int FromHex(const stri...
This will convert "Hello World" to "48656c6c6f20576f726c64" and will store this hex value in str1 and also will convert "48656c6c6f20576f726c64" to "Hello World". ``` #include <iostream> #include<sstream> using namespace std; int hexCharToInt(char); string hexToString(string); int main() { std::string str; st...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
``` string ToHex(const string& s, bool upper_case /* = true */) { ostringstream ret; for (string::size_type i = 0; i < s.length(); ++i) ret << std::hex << std::setfill('0') << std::setw(2) << (upper_case ? std::uppercase : std::nouppercase) << (int)s[i]; return ret.str(); } int FromHex(const stri...
``` #include "boost/algorithm/hex.hpp" std::string hexed = boost::algorithm::hex(std::string("input")); ``` <https://www.boost.org/doc/libs/1_78_0/boost/algorithm/hex.hpp>
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
This is a bit faster: ``` static const char* s_hexTable[256] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "...
This will convert "Hello World" to "48656c6c6f20576f726c64" and will store this hex value in str1 and also will convert "48656c6c6f20576f726c64" to "Hello World". ``` #include <iostream> #include<sstream> using namespace std; int hexCharToInt(char); string hexToString(string); int main() { std::string str; st...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
> > A string like "Hello World" to hex format: 48656C6C6F20576F726C64. > > > Ah, here you go: ``` #include <string> std::string string_to_hex(const std::string& input) { static const char hex_digits[] = "0123456789ABCDEF"; std::string output; output.reserve(input.length() * 2); for (unsigned cha...
As of C++17 there's also [std::from\_chars](https://en.cppreference.com/w/cpp/utility/from_chars). The following function takes a string of hex characters and returns a vector of T: ``` #include <charconv> template<typename T> std::vector<T> hexstr_to_vec(const std::string& str, unsigned char chars_per_num = 2) { s...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
> > A string like "Hello World" to hex format: 48656C6C6F20576F726C64. > > > Ah, here you go: ``` #include <string> std::string string_to_hex(const std::string& input) { static const char hex_digits[] = "0123456789ABCDEF"; std::string output; output.reserve(input.length() * 2); for (unsigned cha...
Using lookup tables and the like works, but is just overkill, here are some very simple ways of taking a string to hex and hex back to a string: ``` #include <stdexcept> #include <sstream> #include <iomanip> #include <string> #include <cstdint> std::string string_to_hex(const std::string& in) { std::stringstream ...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
Using lookup tables and the like works, but is just overkill, here are some very simple ways of taking a string to hex and hex back to a string: ``` #include <stdexcept> #include <sstream> #include <iomanip> #include <string> #include <cstdint> std::string string_to_hex(const std::string& in) { std::stringstream ...
> > This will convert Hello World to 48656c6c6f20576f726c64 and **print** it. > > > ``` #include <iostream> #include <cstring> using namespace std; int main() { char hello[20]="Hello World"; for(unsigned int i=0; i<strlen(hello); i++) cout << hex << (int) hello[i]; return 0; } ```
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
Using lookup tables and the like works, but is just overkill, here are some very simple ways of taking a string to hex and hex back to a string: ``` #include <stdexcept> #include <sstream> #include <iomanip> #include <string> #include <cstdint> std::string string_to_hex(const std::string& in) { std::stringstream ...
Simplest example using the Standard Library. ``` #include <iostream> using namespace std; int main() { char c = 'n'; cout << "HEX " << hex << (int)c << endl; // output in hexadecimal cout << "ASC" << c << endl; // output in ascii return 0; } ``` To check the output, [codepad](http://codepad.org/IoEn7bQc) ...
3,381,614
What is the best way to convert a string to hex and vice versa in C++? Example: * A string like `"Hello World"` to hex format: `48656C6C6F20576F726C64` * And from hex `48656C6C6F20576F726C64` to string: `"Hello World"`
2010/08/01
[ "https://Stackoverflow.com/questions/3381614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215510/" ]
This is a bit faster: ``` static const char* s_hexTable[256] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "...
Why has nobody used sprintf? ``` #include <string> #include <stdio.h> static const std::string str = "hello world!"; int main() { //copy the data from the string to a char array char *strarr = new char[str.size()+1]; strarr[str.size()+1] = 0; //set the null terminator memcpy(strarr, str.c_str(),str.size()); ...
14,111,966
I have a div centered vertically and horizontally in the page. But when this div id is larger than the screen cannot be centered and is cut. So I tried to detect if the div is larger than the document change to margin 0 auto. But I don't know how to do that. Is it possible to remove the id properties and give it the cl...
2013/01/01
[ "https://Stackoverflow.com/questions/14111966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1016409/" ]
You are approaching situation as if you only have a choice of using ID CSS **OR** class CSS rules. It's very simple to combine both: ```css #content { /* properties here*/ } /* CSS for #content when class onTop is added to it*/ #content.onTop { position: relative; top: 0; left: 0; margin: 0 auto; ...
Try this: ``` $(function(){ var documentHeight = $(document).height(); var contenttHeight = $("#content").height(); if(documentHeight < contenttHeight ){ $('#content').removeAttr('id').addClass('onTop'); }else{ $('.onTop').removeClass().attr('id', 'content'); } }) ```
14,111,966
I have a div centered vertically and horizontally in the page. But when this div id is larger than the screen cannot be centered and is cut. So I tried to detect if the div is larger than the document change to margin 0 auto. But I don't know how to do that. Is it possible to remove the id properties and give it the cl...
2013/01/01
[ "https://Stackoverflow.com/questions/14111966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1016409/" ]
You are approaching situation as if you only have a choice of using ID CSS **OR** class CSS rules. It's very simple to combine both: ```css #content { /* properties here*/ } /* CSS for #content when class onTop is added to it*/ #content.onTop { position: relative; top: 0; left: 0; margin: 0 auto; ...
Simple: Give Id by default, and add and remove classes. Make sure the class css is **after** the default css. Keep ot simple. CSS: ``` #content.onTop { position: relative; top: 0; left: 0; margin: 0 auto; background-color:green; width:300px; height:600px; border:0px; } ``` JQuery:...
3,528,944
I want to find character code of particular character in string. For instance if I have a string > > "Hello" > > > How do i find the character code of all or particular characters in the string. I see that PL/SQL has a `ASCII()` and `ASCIISTR()` functions but I could not find any character related functions.
2010/08/20
[ "https://Stackoverflow.com/questions/3528944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/142299/" ]
``` create or replace function asciistr2(s IN varchar2) RETURN varchar2 IS result varchar2(32767) := ''; BEGIN FOR i IN 1..Length(s) LOOP dbms_output.put_line(ASCII(substr(s,i,1))); result := result || ASCII(substr(s,i,1)); END LOOP; return result; END; Select asciistr...
What exactly would you expect? Looking at your question, it seems to me that `ASCII()` would give you what you need, see [this ASCII tutorial](http://www.java2s.com/Tutorial/Oracle/0220__Character-String-Functions/ASCIIxgetstheASCIIvalueofthecharacterx.htm). You can loop Or are you referring to the Unicode value?
2,545,096
Series with $n^{th} $term is given as$\left(\frac{\log n}{\log(n+1)}\right)^{n^{2}\log n}$.I apply root test but I am facing problem in evaluating $n^{th}$ root of $a(n)$.Please give me some start for calculating that limit.
2017/11/30
[ "https://math.stackexchange.com/questions/2545096", "https://math.stackexchange.com", "https://math.stackexchange.com/users/409319/" ]
Working with the reciprocal is easier. $\begin{array}\\ \left(\frac{\log(n+1)}{\log n}\right)^{n^{2}\log n} &=\left(\frac{\log(n)+\log(1+1/n)}{\log n}\right)^{n^{2}\log n}\\ &=\left(1+\frac{\log(1+1/n)}{\log n}\right)^{n^{2}\log n}\\ &=\left(1+\frac{1/n+O(1/n^2)}{\log n}\right)^{n^{2}\log n}\\ &=\left(1+\frac{1+O(1/n)...
First, it is a good idea to check whether the limit of the $n$th term as $n$ tends to $\infty$ is zero. For this, we take the log of the $n$th term and get $$ n^2 \log n \log \left( \frac{\log n }{ \log (n+1) } \right) = n^2 \log n \left( \log \log n - \log \log (n+1) \right) = n^2 \log n \log \log n - n^2 \log n \log...
30,983,572
I have problem. I need for my work all possible build orders for some components. As a simple example you can imagine a simple Lego pyramid: <http://i.stack.imgur.com/Y7Lcr.jpg> I tried some kind of DFS but it didn't work out. There are missing some possbilities at the end. Can anyone help me with that? Language sh...
2015/06/22
[ "https://Stackoverflow.com/questions/30983572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5036682/" ]
First, treat each layer (or "course") as an independent problem. Consider the nine bricks on the bottom; ignoring all others, there are 9! possible orders, so generate those, call them **P**. Likewise the 4! possible orders for the middle bricks are **Q**. We can ignore the single brick at the top for now. Iterate ove...
If there aren't *any* limits to the order of the placement, then there are exactly `n!` different [permutations](https://en.wikipedia.org/wiki/Permutation) of the orders that the blocks can be placed. In that case, a simple solution is to put all the blocks (or rather, their id's) into a vector and generate all the per...
14,181,945
Can I get more technical info about the **DriverManager** class? I know that it's used to create the connection between java and a database (in my case I'm creating a db using MySQL). But should the DriverManager be created as a separate class in my project?
2013/01/06
[ "https://Stackoverflow.com/questions/14181945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1929226/" ]
Quick fix: disable autocorrect. In your `~/.zshrc`: ``` unsetopt correct_all ``` If you want autocorrect but not for `rake`: ``` alias rake='nocorrect rake' ```
I beleive the `unsetopt correct_all` doesnt work any more with the latest update. A more robust solution would be to add in your `~/.zshrc` file ``` DISABLE_CORRECTION="true" ```
19,695,646
I have a table that has the following structure: ``` Account_No Contact Date ------------------------- 1 2013-10-1 2 2013-9-12 3 2013-10-15 3 2013-8-1 3 2013-8-20 2 2013-10-25 4 2013-9-12 4 ...
2013/10/30
[ "https://Stackoverflow.com/questions/19695646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2939449/" ]
You can use DATEADD for the +/-30 days and compare against the time window: ``` DECLARE @ContactDates TABLE ( Account_No int , Contact Date ) -- Sample data INSERT @ContactDates (Account_No, Contact) VALUES (1, '2013-10-01') , (2, '2013-09-12') , (3, ...
In SQL Server 2012, you would have the `lag()` and `lead()` functions. In 2008, you can do the following for values that are in the same calendar month: ``` select distinct account_no from t t1 where exists (select 1 from t t2 where t1.account_no = t2.account_no and date...
19,695,646
I have a table that has the following structure: ``` Account_No Contact Date ------------------------- 1 2013-10-1 2 2013-9-12 3 2013-10-15 3 2013-8-1 3 2013-8-20 2 2013-10-25 4 2013-9-12 4 ...
2013/10/30
[ "https://Stackoverflow.com/questions/19695646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2939449/" ]
In SQL Server 2012, you would have the `lag()` and `lead()` functions. In 2008, you can do the following for values that are in the same calendar month: ``` select distinct account_no from t t1 where exists (select 1 from t t2 where t1.account_no = t2.account_no and date...
Is there an id for each of these records? if so you wont need to create one like i did but based off the data you posted ``` With cte as ( Select *, row_number() over (order by contact_date) id From tbl ) Select * From cte b Where exists ( Select 1 From cte a Where a.account_no = b.accoun...
19,695,646
I have a table that has the following structure: ``` Account_No Contact Date ------------------------- 1 2013-10-1 2 2013-9-12 3 2013-10-15 3 2013-8-1 3 2013-8-20 2 2013-10-25 4 2013-9-12 4 ...
2013/10/30
[ "https://Stackoverflow.com/questions/19695646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2939449/" ]
You can use DATEADD for the +/-30 days and compare against the time window: ``` DECLARE @ContactDates TABLE ( Account_No int , Contact Date ) -- Sample data INSERT @ContactDates (Account_No, Contact) VALUES (1, '2013-10-01') , (2, '2013-09-12') , (3, ...
Is there an id for each of these records? if so you wont need to create one like i did but based off the data you posted ``` With cte as ( Select *, row_number() over (order by contact_date) id From tbl ) Select * From cte b Where exists ( Select 1 From cte a Where a.account_no = b.accoun...
17,390,517
I am doing some required validations on my input form. When user clicks on submit button I would like to show all required messages with respective input element in tooltip-like form, not at the top. So what is the best way to do it in jQuery? Create one message container div and style it or there are plugins for it?
2013/06/30
[ "https://Stackoverflow.com/questions/17390517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942914/" ]
Try jQuery Validation Engine plugin. [jQuery VlidationEngine](http://www.position-relative.net/creation/formValidator/demos/demoValidators.html) Its very useful if your project is very large and have almost all the feature you needed. Usage Example ``` jQuery(document).ready(function(){ // binds form su...
Create a div with every input field and make it as display:none, then at validation show related field's div with required message. And if you want to use plugin you can also use this one: [Default submitHandler](http://jquery.bassistance.de/validate/demo/)
17,390,517
I am doing some required validations on my input form. When user clicks on submit button I would like to show all required messages with respective input element in tooltip-like form, not at the top. So what is the best way to do it in jQuery? Create one message container div and style it or there are plugins for it?
2013/06/30
[ "https://Stackoverflow.com/questions/17390517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942914/" ]
Hey you can use this jQuery Validation Engine <https://github.com/posabsolute/jQuery-Validation-Engine> ![enter image description here](https://i.stack.imgur.com/KwfLO.jpg) Here is an example <http://www.position-relative.net/creation/formValidator/demos/demoValidators.html>
Create a div with every input field and make it as display:none, then at validation show related field's div with required message. And if you want to use plugin you can also use this one: [Default submitHandler](http://jquery.bassistance.de/validate/demo/)
225,269
> > 1- It turns out that someone in the high risk group has twice the risk > ***as*** those in the low risk group > > > 2- It turns out that someone in the high risk group has twice the risk > ***than*** those in the low risk group > > > Do these two sentences mean the same thing?
2019/09/19
[ "https://ell.stackexchange.com/questions/225269", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/79626/" ]
I agree with the above answer. I am also English and to me 'twice the risk as' seems grammatically correct to me. In the case of using 'than', this is used when we want to measure something along a scale. You could rephrase the sentence and say 'It turns out that someone in the high risk group has a risk **two times ...
Possibly UK and US English speakers will have different opinions about this - I'm from the UK. This [discussion of](https://www.grammar.com/different-from-vs-different-than/) "different from" and "different than" usages might be interesting, if not directly relevant to your question. Twice is a numeric comparator, we...
11,999,093
I want to break down this URL into variables. ``` http://example.com/user.php?u=38456 ``` I want the value after `u=`; for example, `38456` or `36491` or some other humeric value. When I get that value I will put that here: ``` $url = /* that value */; function gameStats($url) { $result = file_get_contents('h...
2012/08/17
[ "https://Stackoverflow.com/questions/11999093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560907/" ]
You're looking for [`parse_url()`](http://php.net/parse_url) and [`parse_str()`](http://php.net/parse_str). Something like this should work: ``` $url = 'http://popre.net/user.php?u=38456'; parse_str( parse_url( $url, PHP_URL_QUERY), $params); echo $params['u']; // Outputs 38456 ``` You can see it working in [this de...
You can use [`parse_url`](http://www.php.net/manual/en/function.parse-url.php) and [`parse_str`](http://php.net/manual/en/function.parse-str.php)
11,999,093
I want to break down this URL into variables. ``` http://example.com/user.php?u=38456 ``` I want the value after `u=`; for example, `38456` or `36491` or some other humeric value. When I get that value I will put that here: ``` $url = /* that value */; function gameStats($url) { $result = file_get_contents('h...
2012/08/17
[ "https://Stackoverflow.com/questions/11999093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560907/" ]
Can get with `$_GET`: ``` $url = isset($_GET['u']) ? $_GET['u'] : 0; ```
You can use [`parse_url`](http://www.php.net/manual/en/function.parse-url.php) and [`parse_str`](http://php.net/manual/en/function.parse-str.php)
11,999,093
I want to break down this URL into variables. ``` http://example.com/user.php?u=38456 ``` I want the value after `u=`; for example, `38456` or `36491` or some other humeric value. When I get that value I will put that here: ``` $url = /* that value */; function gameStats($url) { $result = file_get_contents('h...
2012/08/17
[ "https://Stackoverflow.com/questions/11999093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1560907/" ]
You're looking for [`parse_url()`](http://php.net/parse_url) and [`parse_str()`](http://php.net/parse_str). Something like this should work: ``` $url = 'http://popre.net/user.php?u=38456'; parse_str( parse_url( $url, PHP_URL_QUERY), $params); echo $params['u']; // Outputs 38456 ``` You can see it working in [this de...
Can get with `$_GET`: ``` $url = isset($_GET['u']) ? $_GET['u'] : 0; ```
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
sudo apt update sudo apt install python3-matplotlib
You can download then using this on the command line of Linux ``` sudo apt-get install python3-matplotlib ```
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
The lack of a python3-matplotlib package in wheezy is unfortunate. However pip is usually an easy alternative to get your package installed. When you get a gcc exit status 1 upon `sudo pip3 install matplotlib` it is telling you the build failed. You should check the output above what the exact error is. Sometimes t...
sudo apt update sudo apt install python3-matplotlib
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
There are some steps before installing matplotlib. Install two packages named python3-dev and libffi-dev. On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32. Installation from nothing to matplotlib and small tutorial to get first matplotlib plot in link bel...
You can download then using this on the command line of Linux ``` sudo apt-get install python3-matplotlib ```
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
Aparently, the `python3-matplotlib` package is not available on wheezy, but on jessie. You could install it from there, but it involves a bit of [dark magic with apt](https://unix.stackexchange.com/questions/107689/how-to-install-a-single-jessie-package-on-wheezy), and I think a better option would be to install it fro...
sudo apt update sudo apt install python3-matplotlib
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
Aparently, the `python3-matplotlib` package is not available on wheezy, but on jessie. You could install it from there, but it involves a bit of [dark magic with apt](https://unix.stackexchange.com/questions/107689/how-to-install-a-single-jessie-package-on-wheezy), and I think a better option would be to install it fro...
I got an import error with a fresh install of raspbian: `ImportError: No module named 'cairocffi'` installing cairocffi solved it. `sudo pip3 install cairocffi` Cheers.
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
sudo apt update sudo apt install python3-matplotlib
There are some steps before installing matplotlib. Install two packages named python3-dev and libffi-dev. On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32. Installation from nothing to matplotlib and small tutorial to get first matplotlib plot in link bel...
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
I got an import error with a fresh install of raspbian: `ImportError: No module named 'cairocffi'` installing cairocffi solved it. `sudo pip3 install cairocffi` Cheers.
There are some steps before installing matplotlib. Install two packages named python3-dev and libffi-dev. On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32. Installation from nothing to matplotlib and small tutorial to get first matplotlib plot in link bel...
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
If you are using python3, use the below command before installing matplotlib. `sudo apt install python3-dev`
There are some steps before installing matplotlib. Install two packages named python3-dev and libffi-dev. On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32. Installation from nothing to matplotlib and small tutorial to get first matplotlib plot in link bel...
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
Aparently, the `python3-matplotlib` package is not available on wheezy, but on jessie. You could install it from there, but it involves a bit of [dark magic with apt](https://unix.stackexchange.com/questions/107689/how-to-install-a-single-jessie-package-on-wheezy), and I think a better option would be to install it fro...
The lack of a python3-matplotlib package in wheezy is unfortunate. However pip is usually an easy alternative to get your package installed. When you get a gcc exit status 1 upon `sudo pip3 install matplotlib` it is telling you the build failed. You should check the output above what the exact error is. Sometimes t...
15,426
I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in `gtk+ 2.0`, but it looks like it will only run in X11. [Python Menu](https://gist.github.com/abishur/2482046)
2014/04/24
[ "https://raspberrypi.stackexchange.com/questions/15426", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/13281/" ]
Aparently, the `python3-matplotlib` package is not available on wheezy, but on jessie. You could install it from there, but it involves a bit of [dark magic with apt](https://unix.stackexchange.com/questions/107689/how-to-install-a-single-jessie-package-on-wheezy), and I think a better option would be to install it fro...
There are some steps before installing matplotlib. Install two packages named python3-dev and libffi-dev. On extremely old versions of Linux and Python 2.7 you may need to install the master version of subprocess32. Installation from nothing to matplotlib and small tutorial to get first matplotlib plot in link bel...
66,414,334
EDIT!!: I forgot to add this, it is present in my code: ``` from math import sin, cos, tan, asin, acos, atan2, radians, degrees, sqrt ``` I am calculating net force, and I have run into a roadblock. My feedback on this problem seems to be that I need to: "Convert to radians prior to manipulating them using the cos...
2021/02/28
[ "https://Stackoverflow.com/questions/66414334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13364033/" ]
There are a number of problems with your code. Syntactically, there are two: `horiztonal_total` is a typo. Should be `horizontal_total` in all cases. You need to import the math functions: ``` from math import sin, cos, sqrt, radians, atan2, degrees ``` Logically, the problem is when you're applying `radians()`. Y...
Using @CryptoFool's comment: ``` from math import sin, cos, sqrt, radians, atan2, degrees def find_net_force(forces): horizontal_total = 0 vertical_total = 0 for i in forces: horizontal = i[0] * cos(i[1]) vertical = i[0] * sin(i[1]) horizontal_total += horizontal vertical_t...
66,414,334
EDIT!!: I forgot to add this, it is present in my code: ``` from math import sin, cos, tan, asin, acos, atan2, radians, degrees, sqrt ``` I am calculating net force, and I have run into a roadblock. My feedback on this problem seems to be that I need to: "Convert to radians prior to manipulating them using the cos...
2021/02/28
[ "https://Stackoverflow.com/questions/66414334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13364033/" ]
Using @CryptoFool's comment: ``` from math import sin, cos, sqrt, radians, atan2, degrees def find_net_force(forces): horizontal_total = 0 vertical_total = 0 for i in forces: horizontal = i[0] * cos(i[1]) vertical = i[0] * sin(i[1]) horizontal_total += horizontal vertical_t...
your input is in degrees and sin and cos take radians. So you need to write: ``` horizontal = i[0] * cos( radians(i[1]) ) vertical = i[0] * sin( radians(i[1]) ) ``` These two lines don't make sense: ``` horiztonal_total = radians(horizontal_total) vertical_total = radians(vertical_total) ``` All in all ``` def f...
66,414,334
EDIT!!: I forgot to add this, it is present in my code: ``` from math import sin, cos, tan, asin, acos, atan2, radians, degrees, sqrt ``` I am calculating net force, and I have run into a roadblock. My feedback on this problem seems to be that I need to: "Convert to radians prior to manipulating them using the cos...
2021/02/28
[ "https://Stackoverflow.com/questions/66414334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13364033/" ]
There are a number of problems with your code. Syntactically, there are two: `horiztonal_total` is a typo. Should be `horizontal_total` in all cases. You need to import the math functions: ``` from math import sin, cos, sqrt, radians, atan2, degrees ``` Logically, the problem is when you're applying `radians()`. Y...
your input is in degrees and sin and cos take radians. So you need to write: ``` horizontal = i[0] * cos( radians(i[1]) ) vertical = i[0] * sin( radians(i[1]) ) ``` These two lines don't make sense: ``` horiztonal_total = radians(horizontal_total) vertical_total = radians(vertical_total) ``` All in all ``` def f...
33,044,189
Wommcommerce fires a Webhook when a product is updated or an order is placed. I'm trying to catch this Webhook with a Google Apps Script (GAS), published as a WebApp. What I'm finally trying to achieve is to write incoming orders into a Google Spreadsheet. I'm having trouble to get the right (or at least some) data o...
2015/10/09
[ "https://Stackoverflow.com/questions/33044189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4957938/" ]
Thanks to the help here from Riel and at [plus.google](https://plus.google.com/communities/102471985047225101769) I figured it out. Here is my code as an example, maybe it helps: ``` function doPost(request) { var json = request.postData.getDataAsString(); var obj = JSON.parse(json); // getting some of th...
It is in e.postData.content Also use JSON.parse instead of Utilities.
129,370
Remote management is essential if you have to run more than three network devices, and is supported by all commercial firewall products. For example: [Palo Alto Networks:](https://www.paloaltonetworks.com/products/secure-the-network/next-generation-firewall) > > In addition to control and security capability, our ne...
2016/07/06
[ "https://security.stackexchange.com/questions/129370", "https://security.stackexchange.com", "https://security.stackexchange.com/users/84274/" ]
All Linux and BSD-based firewalls are just a management UI over their respective IS kernel's firewall feature. If you want remote access and scripting functions, you can use standard remote management and scripting tools of the base OS, namely, SSH and shell scripts. The firewall products that support web administratio...
In short as long as the firewall has a port open to the outside world, you could run a web server and use it to configure the system/network. Technically, even an open SSH port could be used to manage your firewall. Technically you can add Apache or nginx to any Linux distro, and therefore have the ability to have rem...
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Please refer this url <http://repo.spring.io/release/org/springframework/spring/> and Choose the which version Spring Jars you want. [![enter image description here](https://i.stack.imgur.com/Su8J8.jpg)](https://i.stack.imgur.com/Su8J8.jpg) Choose the spring-framework-X.X.X.RELEASE-dist.zip [![enter image descripti...
You should be using [this](http://repo.spring.io/release/org/springframework/spring/4.1.4.RELEASE/spring-framework-4.1.4.RELEASE-dist.zip) link to download spring jars. Other links in there are for checksum or documentation.
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
You should be using [this](http://repo.spring.io/release/org/springframework/spring/4.1.4.RELEASE/spring-framework-4.1.4.RELEASE-dist.zip) link to download spring jars. Other links in there are for checksum or documentation.
I hit the same issue and I followed Brian Clozel advice above. 1. Create a new Maven project in eclipse. 2. Edit the pom.xml and add the Spring dependencies as follows - org.springframework spring-core 5.0.6.RELEASE When you build the project in eclipse,it hits the maven repo and downloads the requisite spring ...
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
You should be using [this](http://repo.spring.io/release/org/springframework/spring/4.1.4.RELEASE/spring-framework-4.1.4.RELEASE-dist.zip) link to download spring jars. Other links in there are for checksum or documentation.
Step 1) Place this URL in browser <https://repo.spring.io/ui/native/release/org/springframework/spring/> Step 2) Scroll down & select latest version. Example : 5.3.9/ Step 3) Click on the file similar to "spring-5.3.9-dist.zip" to download Step 4) Hence JAR files of latest spring is downloaded in zip format.
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Please refer this url <http://repo.spring.io/release/org/springframework/spring/> and Choose the which version Spring Jars you want. [![enter image description here](https://i.stack.imgur.com/Su8J8.jpg)](https://i.stack.imgur.com/Su8J8.jpg) Choose the spring-framework-X.X.X.RELEASE-dist.zip [![enter image descripti...
I hit the same issue and I followed Brian Clozel advice above. 1. Create a new Maven project in eclipse. 2. Edit the pom.xml and add the Spring dependencies as follows - org.springframework spring-core 5.0.6.RELEASE When you build the project in eclipse,it hits the maven repo and downloads the requisite spring ...
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Please refer this url <http://repo.spring.io/release/org/springframework/spring/> and Choose the which version Spring Jars you want. [![enter image description here](https://i.stack.imgur.com/Su8J8.jpg)](https://i.stack.imgur.com/Su8J8.jpg) Choose the spring-framework-X.X.X.RELEASE-dist.zip [![enter image descripti...
Important points to understand in all the spring related repo is that it contains 3 zip files . 1. **spring-framework-{version}-dist.zip** : contains all the spring related jars. 2. **spring-framework-{verison}-docs.zip** : contains all the standard documents in HTML format for spring and related java api documents. I...
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Please refer this url <http://repo.spring.io/release/org/springframework/spring/> and Choose the which version Spring Jars you want. [![enter image description here](https://i.stack.imgur.com/Su8J8.jpg)](https://i.stack.imgur.com/Su8J8.jpg) Choose the spring-framework-X.X.X.RELEASE-dist.zip [![enter image descripti...
Step 1) Place this URL in browser <https://repo.spring.io/ui/native/release/org/springframework/spring/> Step 2) Scroll down & select latest version. Example : 5.3.9/ Step 3) Click on the file similar to "spring-5.3.9-dist.zip" to download Step 4) Hence JAR files of latest spring is downloaded in zip format.
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Important points to understand in all the spring related repo is that it contains 3 zip files . 1. **spring-framework-{version}-dist.zip** : contains all the spring related jars. 2. **spring-framework-{verison}-docs.zip** : contains all the standard documents in HTML format for spring and related java api documents. I...
I hit the same issue and I followed Brian Clozel advice above. 1. Create a new Maven project in eclipse. 2. Edit the pom.xml and add the Spring dependencies as follows - org.springframework spring-core 5.0.6.RELEASE When you build the project in eclipse,it hits the maven repo and downloads the requisite spring ...
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
I hit the same issue and I followed Brian Clozel advice above. 1. Create a new Maven project in eclipse. 2. Edit the pom.xml and add the Spring dependencies as follows - org.springframework spring-core 5.0.6.RELEASE When you build the project in eclipse,it hits the maven repo and downloads the requisite spring ...
Step 1) Place this URL in browser <https://repo.spring.io/ui/native/release/org/springframework/spring/> Step 2) Scroll down & select latest version. Example : 5.3.9/ Step 3) Click on the file similar to "spring-5.3.9-dist.zip" to download Step 4) Hence JAR files of latest spring is downloaded in zip format.
28,248,780
The array counts is as follows: ``` counts = ["a", 1] ``` What does this: ``` counts[0][0] ``` refer to? I've only seen this before: ``` array[idx] ``` but never this: ``` array[idx][idx] ``` where idx is an integer. *This is the entire code where the snippet of code before was from:* ``` def num_...
2015/01/31
[ "https://Stackoverflow.com/questions/28248780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4312295/" ]
Important points to understand in all the spring related repo is that it contains 3 zip files . 1. **spring-framework-{version}-dist.zip** : contains all the spring related jars. 2. **spring-framework-{verison}-docs.zip** : contains all the standard documents in HTML format for spring and related java api documents. I...
Step 1) Place this URL in browser <https://repo.spring.io/ui/native/release/org/springframework/spring/> Step 2) Scroll down & select latest version. Example : 5.3.9/ Step 3) Click on the file similar to "spring-5.3.9-dist.zip" to download Step 4) Hence JAR files of latest spring is downloaded in zip format.
21,919,995
We are using GoogieSpell hitting this site (<http://www.google.com/tbproxy/spell>) and it had been working fine, however this url is now giving a 404 error. I've seen some posts where people are complaining about the same issue, then someone responded saying service is running again. [Google spell check http://www.go...
2014/02/20
[ "https://Stackoverflow.com/questions/21919995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3334681/" ]
You could use a class on the body, or just separate the sheets. --- In the first case, you CSS would look like this: ``` .type1 .div{ width:100%; float:none; } .type1 .div_two{ width:100%; float:none; } .type2 .div{ width:50%; float:left; } .type2 .div_two{ width:50%; float:left; } ``` And ...
CSS has no logic processing, it won't know which layout you want to use. The browser will simply interpret both layouts together, and render whichever rules take precedence. Your code snippet at the bottom of the question (loading in a different stylesheet depending on which layout you wish to render) is going to be t...
22,106,424
I have a class that I'm using to pass a selector through with a text label: ``` @interface TableLink : NSObject @property (nonatomic, strong) NSString* name; @property (nonatomic) NSInteger identifier; @property (nonatomic) SEL selector; @end @implementation TableLink - (id) initWithName: (NSString*) name identifier: ...
2014/02/28
[ "https://Stackoverflow.com/questions/22106424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179884/" ]
No. There is no way to get original data from image. You have to store data somewhere if you will need it later. You can take a look at this topics to get a little more information about image processing in iOS: [Saving to/getting JPEG from user gallery without recompression](https://stackoverflow.com/questions/13150...
May be it could be better to store the Hash (MD5) of your image, and compare on 2 Hash... You can create a MD5UIImage Inherit from UIImage with a property to store the MD5 + a NSData+MD5 category to calc the MD5... Google "NSDATA+MD5" for exemples...
22,106,424
I have a class that I'm using to pass a selector through with a text label: ``` @interface TableLink : NSObject @property (nonatomic, strong) NSString* name; @property (nonatomic) NSInteger identifier; @property (nonatomic) SEL selector; @end @implementation TableLink - (id) initWithName: (NSString*) name identifier: ...
2014/02/28
[ "https://Stackoverflow.com/questions/22106424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179884/" ]
No. There is no way to get original data from image. You have to store data somewhere if you will need it later. You can take a look at this topics to get a little more information about image processing in iOS: [Saving to/getting JPEG from user gallery without recompression](https://stackoverflow.com/questions/13150...
Why even use `dataWithContentsOfFile`? Just use `imageNamed:` as: ``` // Returns the image object associated with the specified filename. + (UIImage *)imageNamed:(NSString *)name ``` like: ``` { UIImage *theImage = [UIImage imageNamed: @"somepicture.jpg"] // … } ``` where you need to be sure your image file ...
2,599,105
I'm trying to get this thing to work in IE (any version - works in FF, Opera, Safari, Chrome ...): I have a DIV with a background-image. The DIV also contains an image that should be transparent onMouseOver. The expected behaviour now is that the DIV-background would shine through the transparent image (which it does ...
2010/04/08
[ "https://Stackoverflow.com/questions/2599105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/255905/" ]
``` a.dragItem {/*Background behind the image*/} a.dragItem img {/*Image is opaque, hiding the background*/} a.dragItem:hover img {/*Image is transparent, revealing the background*/} ```
IE uses the CSS `filter:alpha(opacity=x)` taken from [w3Schools CSS Image transparency](http://www.w3schools.com/Css/css_image_transparency.asp). You can also apply it to DIV backgrounds. ``` div.transbox { width:400px; height:180px; margin:30px 50px; background-color:#ffffff; border:1px solid black; /*...
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
Yes, definitely need to consider it in any case where you are using colours to identify and/or demark things. Classic case is traffic light style indicators which are generally red, yellow and green. Red/Green colour-blindness is quite common. If you are creating apps that need to comply with accessibility legislation...
In Windows you can query the system for the System Colors. I allways use them. You can test your app, using high contrast screen settings, if all is readable I suppose it's ok. The article that opened my eyes to this is here: <http://msdn.microsoft.com/en-us/library/bb263953.aspx>
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
Websites should cater for everyone, whether they're colour blind, deaf or whatever. The Royal Institute for the Blind in the UK has some interesting articles on web designing for partially sited people; [link text](http://www.rnib.org.uk/xpedio/groups/public/documents/code/public_rnib008789.hcsp) Including colour-con...
Apart from green + red, another relatively common type of color blindness is blue and yellow. We take color blindness into consideration when creating our games. One game we designed (Arcade Lines) features colored balls you have to align in same-colored rows. We tried to account for color blindness by offering a spec...
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
I've done some work for US gov departments who are bound by section 508, so it does come up. Red/Green is by far the most common form, but others exist (notably blue/yellow and monochromatic) so in general the important thing is to maintain high levels of contrast.
Red-green may be the most common, but not the only type of colour deficiency. In general, your user interface should still be visible and usable when viewed as grayscale or sepia tones. Text and backgrounds must have a high level of contrast to allow distinguishable shapes purely by tones and not colour. Visual eleme...
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
I think it must be pretty common, and developers who do not take it into account are doomed to lock out a surprisingly high proportion of their customers. In my workplace, out of around 30 people in the R&D department, 2 are colour blind to some degree, and one is of restricted vision - he needs to use the windows "Hig...
Color Oracle is a great tool that simulates different types of color blindness. You can run your app/website, and run this app -- it will give you a good idea of how color blind users will interpret your creation. <http://colororacle.cartography.ch/>
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
I'm color blind myself, of the green-red type, so yes, I take this into account :) Do follow the design guidelines mentioned in the websites others have linked to. But there are some ideas I'd like to stress: * Hardcoding *any* colours may not be a great idea. Configurable and skinnable are good. * In particular, har...
Websites should cater for everyone, whether they're colour blind, deaf or whatever. The Royal Institute for the Blind in the UK has some interesting articles on web designing for partially sited people; [link text](http://www.rnib.org.uk/xpedio/groups/public/documents/code/public_rnib008789.hcsp) Including colour-con...
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
My direct boss is colorblind, so yes we take this into account. ;-).
I once wrote an in-house application that featured a scatterplot with different series distinguished by color. My primary user turned out to be color-blind (red-green, I think), so I supplemented the color with variation in symbols.
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
Yes, definitely need to consider it in any case where you are using colours to identify and/or demark things. Classic case is traffic light style indicators which are generally red, yellow and green. Red/Green colour-blindness is quite common. If you are creating apps that need to comply with accessibility legislation...
I found out this the hard way when I told my colleague to press the red button.. when he said "which one?" I thought he was just being dim, so I told him again.. then he told me he was colour blind and I was the one feeling stupid. He works for the railways now, writing signalling software. Good job the red light is a...
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
I allways test my pages in <http://www.vischeck.com/vischeck/vischeckURL.php> to make sure I havent chosen really bad colors. Or this one <http://colorfilter.wickline.org/>
In Windows you can query the system for the System Colors. I allways use them. You can test your app, using high contrast screen settings, if all is readable I suppose it's ok. The article that opened my eyes to this is here: <http://msdn.microsoft.com/en-us/library/bb263953.aspx>
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
Websites should cater for everyone, whether they're colour blind, deaf or whatever. The Royal Institute for the Blind in the UK has some interesting articles on web designing for partially sited people; [link text](http://www.rnib.org.uk/xpedio/groups/public/documents/code/public_rnib008789.hcsp) Including colour-con...
I can suggest you [this](http://colorschemedesigner.com/) website. It has a colors scheme selector and in the bottom right part of it there is a drop down menu used to switch between common eye related problems and changing scheme accordingly
519,692
I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see a...
2009/02/06
[ "https://Stackoverflow.com/questions/519692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62830/" ]
In Windows you can query the system for the System Colors. I allways use them. You can test your app, using high contrast screen settings, if all is readable I suppose it's ok. The article that opened my eyes to this is here: <http://msdn.microsoft.com/en-us/library/bb263953.aspx>
I found out this the hard way when I told my colleague to press the red button.. when he said "which one?" I thought he was just being dim, so I told him again.. then he told me he was colour blind and I was the one feeling stupid. He works for the railways now, writing signalling software. Good job the red light is a...
72,020,602
I want to hook some functions in libssl with `LD_PRELOAD` in systemd. In systemd file I put ``` ExecStart=/etc/myscript.sh ``` and in /etc/myscript.sh I put ``` #!/bin/sh LD_PRELOAD=/lib/inject_libssl.so /bin/run ``` When I look at `/proc/RUN_PID/maps` I can see that inject\_libssl.so is realy injected to the pr...
2022/04/26
[ "https://Stackoverflow.com/questions/72020602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17316080/" ]
Iterate over the whole sample first to get a sum of the values by the first letter first, *then* iterate over that new object to identify which values match the target of half the total. ```js const sample = { "A,B,C": 4, "B,C,A": 3, "C,B,A": 2, "A,C,B": 2 }; const sumByChar = {}; for (const [key, value] of Ob...
I'm not completely sure what you mean what the outcome should be. If I understand correctly you want something like this?? ```js const sample = { "A,B,C": 4, "B,C,A": 3, "C,B,A": 2, "A,C,B": 2 }; const totalSum = Object.values(sample).reduce( (previousValue, currentValue) => previousValue + currentValue, 0 ); cons...
6,181,700
i have one dictionary that has entries that looks like this: ``` dictionary["ABC.123"] = "Test" dictionary["DEF.123"] = "Test2" dictionary["EFG.123"] = "Test3" dictionary["EFG.343"] = "Test3" dictionary["ABC.456"] = "Test" ``` and i want to create a new dictionary that looks like this: (basically parse out the begin...
2011/05/30
[ "https://Stackoverflow.com/questions/6181700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
``` var newDict = dictionary.GroupBy(kvp => kvp.Key.Remove(kvp.Key.IndexOf('.'))) .ToDictionary(grp => grp.Key, grp => grp.First().Value); ``` Although a plain `foreach` is probably going to be more readable and efficient: ``` var newDict = new Dictionary<string, string>(); foreach (var kvp i...
``` var dict2 = dictionary.GroupBy(x => x.Key.Split('.')[0]) .ToDictionary(g => g.Key, g => g.First().Value); ```
6,181,700
i have one dictionary that has entries that looks like this: ``` dictionary["ABC.123"] = "Test" dictionary["DEF.123"] = "Test2" dictionary["EFG.123"] = "Test3" dictionary["EFG.343"] = "Test3" dictionary["ABC.456"] = "Test" ``` and i want to create a new dictionary that looks like this: (basically parse out the begin...
2011/05/30
[ "https://Stackoverflow.com/questions/6181700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
``` var newDict = dictionary.GroupBy(kvp => kvp.Key.Remove(kvp.Key.IndexOf('.'))) .ToDictionary(grp => grp.Key, grp => grp.First().Value); ``` Although a plain `foreach` is probably going to be more readable and efficient: ``` var newDict = new Dictionary<string, string>(); foreach (var kvp i...
A simple approach is to use the Select method to generate your desired KeyValuePair in conjuntion with ToDictionary ``` var response = dictionary .Select(kvp => new KeyValuePair<string, string>(kvp.Key.Remove(kvp.Key.IndexOf('.')), kvp.Value)) .ToDictionary(kvp => kvp.Key, kvp => kvp.Value)...
84,670
I was trying to bulk upload products in magento before uploading products everything was normal but after uploading my New product block is not displaying on home page <http://new.sporteemail.com> I have checked all these but its still not working 1. ***The products must be Visible in Catalog.*** 2. ***The product...
2015/09/30
[ "https://magento.stackexchange.com/questions/84670", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/28599/" ]
1. -Did u try to save a product manually ? maybe u forgot something to import! 2. -Are the Categorys subcategorys of default? 3. -Cache / index refreshed? 4. -Try to disable the inventory in: > > system->configuration->Inventory->Product Stock Options and set > 'Manage Stock' to 'No' > > >
1. Re-index after any import 2. Refresh all caches in `System --> Cache Management` 3. If you are using a CDN or full page caching you may need to flush those caches as well.
198,413
After reading [this question](https://codereview.stackexchange.com/questions/198384/return-the-following-string) about returning the "next" string in some alphabet (the digits, followed by upper and lowercase ASCII letters) using Java, I thought, well that's just counting, so why not derive from `int` and make a nice r...
2018/07/13
[ "https://codereview.stackexchange.com/questions/198413", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/98493/" ]
What strikes me the most with this implementation is that you should already have the decimal representation of the number you want. The base is then just artificial and its only purpose is to have a nice `str` of it. Instead, you could mimic the `int` constructor: > > > ```none > | Convert a number or string to a...
A little nitpicking: I'd change ``` for attr_name in dir(cls): if attr_name in methods: setattr(cls, attr_name, method_wrapper(getattr(cls, attr_name))) return cls ``` into ``` for attr_name in methods: if hasattr(cls, attr_name): setattr(cls, attr_name, method_wrapper(getattr(cls, attr_na...
3,947,304
I have a `UIView` - which I am using as a makeshift toolbar. It contains several `UIButton`s. (Six, I think) in a horizontal row. The *fifth* button over will only respond to [`TouchUpInside`] events when I click the *left half* of it - whereas all the other buttons work correctly. I have gone crazy making sure there...
2010/10/16
[ "https://Stackoverflow.com/questions/3947304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221768/" ]
I guess your superview bounds might be a bit too small? Try to change your superview background color to red or some vivid color and check its bounds.
Just ran into this strange problem as well and after struggling with understanding the nature of the problem, ran across this post. Thanks for the helpful tip! I know it's an old question but this is how I was able to work around it in two ways. The first was to initially create the system info light button and simply ...