qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
31,157,803
I am working on spring web app using maven. I am trying to make localhost a secure connection.I am using tomcat server. I used this [link](http://docs.oracle.com/cd/E19798-01/821-1841/bnbyb/index.html) for creating my own CA and added it to JVM. This is what I added in pom.xml. ``` <plugin> <groupId>org.apache...
2015/07/01
[ "https://Stackoverflow.com/questions/31157803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2213010/" ]
Go to sever.xml and add following xml ``` <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="{path}/mycer.cert" keystorePass="{password}"/> <!-- Define an AJP 1.3 Connecto...
You need to add a connector in `servlet.xml` file. ``` <Connector protocol="org.apache.coyote.http11.Http11Protocol" port="8443" maxThreads="200" scheme="https" secure="true" SSLEnabled="true" keystoreFile="${user.home}/.keystore" keystorePass="changeit" clientAu...
26,957,743
Suppose one has a java project which consists of several packages, subpackages etc, all existing in a folder "source". Is there a direct way to copy the structure of the folders in "source" to a "classes" folder and then recursively compile all the .java files, placing the .class files in the correct locations in "clas...
2014/11/16
[ "https://Stackoverflow.com/questions/26957743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333200/" ]
For larger projects a recommend using a build tool like [Maven](http://maven.apache.org) or the newer and faster [Gradle](http://gradle.org). Once you've configured one of them for your needs, it's very easy to do the job by calling `mvn build` or `gradle build`. If these tools seem to heavy for your purpose, you may ...
* There are no "bin files" in Java, this language only compiles bytecode * [Compiling multiple packages using the command line in Java](https://stackoverflow.com/questions/3512603/compiling-multiple-packages-using-the-command-line-in-java) * Eclipse : <https://stackoverflow.com/a/7218929/351861> * via console : `javac ...
37,686,247
I'm trying to convert the following curl post to a Python request: ``` curl -k -i -H "Content-Type: multipart/mixed" -X POST --form 'session.id=e7a29776-5783-49d7-afa0-b0e688096b5e' --form 'ajax=upload' --form 'file=@myproject.zip;type=application/zip' --form 'project=MyProject;type/plain' https://localhost:8443/man...
2016/06/07
[ "https://Stackoverflow.com/questions/37686247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1762447/" ]
I found the answer after trying out some of the examples from [requests](http://docs.python-requests.org/en/master/user/quickstart/#make-a-request) site and finally it worked. ``` data = {'ajax':'upload','project':'test','session.id':sessionId} files = {'file':('projects.zip',open('projects.zip','rb'),'application/zi...
For the future reference I recommend you to check this online tool: <http://curl.trillworks.com/> it converts curl to python requests, node and php. It has helped my multiple times.
66,628
My employer offers an ESPP with the following details: * 15% discount * Max contribution is 15% of base salary * Purchase transaction occurs on the last business day of the month * Transaction settles 3 days after purchase * No obligation to hold the stock for minimum duration * No restrictions on sell timing (except ...
2016/06/26
[ "https://money.stackexchange.com/questions/66628", "https://money.stackexchange.com", "https://money.stackexchange.com/users/22298/" ]
Short answer is to put the max 15% contribution into your ESPP. Long answer is that since you want to be saving as much as you can anyway, this is a great way to force you to do it, and pick up at least a 15% return every six months (or however often your plan makes a purchase). I say at least because sometimes an ESP...
A 15% discount does not necessarily mean it is a good investment. The stock price can go down at any point. 15% discount might mean you are getting a little better deal than the average cat.
66,628
My employer offers an ESPP with the following details: * 15% discount * Max contribution is 15% of base salary * Purchase transaction occurs on the last business day of the month * Transaction settles 3 days after purchase * No obligation to hold the stock for minimum duration * No restrictions on sell timing (except ...
2016/06/26
[ "https://money.stackexchange.com/questions/66628", "https://money.stackexchange.com", "https://money.stackexchange.com/users/22298/" ]
A 15% discount is a 17.6% return. (100/85 = 1.176). For a holding period that's an average 15.5 days, a half month. It would be silly to compound this over a year as the numbers are limited. The safest way to do this is to sell the day you are permitted. In effect, you are betting, 12 times a year, that the stock won...
Short answer is to put the max 15% contribution into your ESPP. Long answer is that since you want to be saving as much as you can anyway, this is a great way to force you to do it, and pick up at least a 15% return every six months (or however often your plan makes a purchase). I say at least because sometimes an ESP...
66,628
My employer offers an ESPP with the following details: * 15% discount * Max contribution is 15% of base salary * Purchase transaction occurs on the last business day of the month * Transaction settles 3 days after purchase * No obligation to hold the stock for minimum duration * No restrictions on sell timing (except ...
2016/06/26
[ "https://money.stackexchange.com/questions/66628", "https://money.stackexchange.com", "https://money.stackexchange.com/users/22298/" ]
A 15% discount is a 17.6% return. (100/85 = 1.176). For a holding period that's an average 15.5 days, a half month. It would be silly to compound this over a year as the numbers are limited. The safest way to do this is to sell the day you are permitted. In effect, you are betting, 12 times a year, that the stock won...
A 15% discount does not necessarily mean it is a good investment. The stock price can go down at any point. 15% discount might mean you are getting a little better deal than the average cat.
11,324
I need to annotate a text file, so I would like to add a `|` pipe character to the end of each line to put my annotations relatively close to the original text. Each line is *up to* 72 characters in length. How might I move to the 74th character of the line, even if the line itself is shorter (i.e. add spaces if needed...
2017/02/09
[ "https://vi.stackexchange.com/questions/11324", "https://vi.stackexchange.com", "https://vi.stackexchange.com/users/989/" ]
You could also enable `'virtualedit'` option and directly jump to the column you're interested in. A very similar question as been asked lately on SO: <https://stackoverflow.com/questions/41964261/how-do-i-put-the-character-in-6th-column-and-80th-column-in-vi/41964372#41964372>
Here's one way to do it without having to edit and restore `'virtualedit'`: ``` :execute "normal " . string(73 - strwidth(getline('.'))) . "A " | normal A| ``` This runs two commands: 1. The part *before* the bar `|` calculates the number of spaces required (`73 - strwidth(getline('.'))`) and then uses that as a co...
105,982
My barbarian will be level 3 soon, and I'm looking forward to choosing the Path of the Totem Warrior.
2017/08/26
[ "https://rpg.stackexchange.com/questions/105982", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/34635/" ]
The most thematically appropriate option would be for your Barbarian to hunt the relevant animal of your choice. The PHB of 50 states > > ... > > > You must make or acquire a physical totem object -an amulet or similar adornment—that incorporates fur or feathers, claws, teeth, or bones of the totem animal. > > ...
You need to acquire the item: > > You must make or acquire a physical totem object -an amulet or similar adornment—that incorporates fur or feathers, claws, teeth, or bones of the totem animal. > > > From [Merriam-Webster](https://www.merriam-webster.com/dictionary/acquire): > > **acquire:** to come into posse...
16,368,230
I am looking at the Webapi Help Page to generated docmentation but all the tutorials I see leave me wondering. Q1. How do I populate the sample data myself? From my understanding it looks at the data type and makes some data based on the datatype. Some of my data has specific requirements(ie length can't be more than ...
2013/05/03
[ "https://Stackoverflow.com/questions/16368230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/130015/" ]
Q1: Have you taken a look at "Areas\HelpPage\App\_Start\HelpPageConfig.cs" file. You should see a bunch of commented out with examples how you could define your own samples. Example: ``` public static class HelpPageConfig { public static void Register(HttpConfiguration config) { //// Uncomment the fol...
Regarding Q2 "How can I hide warning messages", in Areas/HelpPage/Views/Help/DisplayTemplates/Samples.chtml, you can add an if statement in the code: ``` @foreach (var mediaType in mediaTypes) { if (mediaType != "application/x-www-form-urlencoded") { /// <--- line added here <h4 class="sample-h...
17,298,631
In an effort to learn C programming, I'm attempting to translate some Lua Code into C. I know C is not considered a "functional" language in the same vein as Lua, but I want to know how/if it's possible. Lua Code: ``` function Increment(a) a = a + 1 if a == 100 then return 0 else return Increment(a) end end ``` In t...
2013/06/25
[ "https://Stackoverflow.com/questions/17298631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2395058/" ]
Try this code if you want a global, but there is side effect : ``` int a; int increment() { a = a + 1; if (a == 100) return 0; else return increment(); } ``` Prefer to use if you don't want side effect, and this solution DO NOT stack lot of function, because you call your function at the...
As Shar has pointed out above, the straight-forward translation of the lua code to C is: ``` int increment(int a) { if (a == 100) return a; else return increment(a + 1); } ``` For going up to 100, stack usage is not going to be a problem unless you are on a very small embedded system. However, there is...
26,093,827
I need to find a value wherever present in database. Consider I need to find value "Fish" from Database. Output I need is ``` Table Name | Column Name -------------------------- Table 1 | columnName Table 12 | columnName ``` and so on..
2014/09/29
[ "https://Stackoverflow.com/questions/26093827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3540786/" ]
First, download the source version of Thrift. I would strongly recommend using a newer version if possible. There are several ways to include the Thrift Java library (may have to change slightly for your Thrift version): If you are using maven, you can add the maven coordinates to your pom.xml: ``` <dependency> <...
* for Java: you can download .jar library, javadoc here <http://repo1.maven.org/maven2/org/apache/thrift/libthrift/0.9.1/> * for PHP: copy [thrift-source]/lib/php/lib to your project and use it. This is a example to use: <https://thrift.apache.org/tutorial/php> P/s: i want to use .dll PHP extension rather than PHP sou...
58,526,031
I would like to check myself whether I understand correctly the following quote below from the C++ 20 Standard (English is not my native language). Section 9.7.1 Namespace definition: > > 2 In a named-namespace-definition, the identifier is the name of the > namespace. If the identifier, when looked up (6.4.1), ref...
2019/10/23
[ "https://Stackoverflow.com/questions/58526031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2877241/" ]
There in no variable named `good` or `wrong` in your main module. However you passed them to this function: ``` selected_function.randomfunction(good, wrong) ```
thnx for youre answers! I managed to get what i wan't by doing this: ``` import random class functions: def jammer(): print("jammer") def goedzo(): print("goedzo") def uuh(): print("uuh") def tsjing(): print("tsjing") #random functonlist ls_good = [goedzo, ts...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Try this code: ``` btnRotate.setOnClickListener(new OnClickListener() { @SuppressLint("NewApi") @Override public void onClick(View v) { int orientation = getResources().getConfiguration().orientation; switch(orientation) { case Configuration.ORIENTATION_LANDSCAPE: ...
Try this code: (RelativeLayoutOuterFrame) it is the name of your layout.which you want to rotate. Actually, we are not rotate the layout.we just change height an width value. ``` int w = RelativeLayoutOuterFrame.getWidth(); int h = RelativeLayoutOuterFrame.getHeight(); ViewGroup.LayoutParams lp = (View...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
If you want to literally rotate the screen, you can [force a screen orientation](https://stackoverflow.com/questions/14587085/how-can-i-globally-force-screen-orientation-in-android). Otherwise there's no easy way to do what you are trying to do as `View.setRotation(float)` will always render the `View` in its "real" bo...
i'll suggest you rotate only button rather than rotating the whole layout like ``` btn_rotate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { rotation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate); rotation.setFillAfter(true); btn_rotate.startAnimati...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Simple and tricky way to make screen orientation along the button click.. with an example.. Here,I'm using the sharedPreference(Im setting an boolean value based on orientation ) Method for button onClick. ``` public void rotate(View v) { edt = prefs.edit(); if (!prefs.getBoolean("screen_protrait", true)) ...
[Android: alternate layout xml for landscape mode](https://stackoverflow.com/questions/4858026/android-alternate-layout-xml-for-landscape-modes) As I can remember, you should define a new layout for the horizontal view. I think this link can help you
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
``` // get root layout from activity's XML LinearLayout mParentLayout = (LinearLayout) findViewById(R.id.activity_main); // get screen size from DisplayMetrics if you need to rotate before the screen is shown DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay...
i'll suggest you rotate only button rather than rotating the whole layout like ``` btn_rotate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { rotation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate); rotation.setFillAfter(true); btn_rotate.startAnimati...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Try this code: ``` btnRotate.setOnClickListener(new OnClickListener() { @SuppressLint("NewApi") @Override public void onClick(View v) { int orientation = getResources().getConfiguration().orientation; switch(orientation) { case Configuration.ORIENTATION_LANDSCAPE: ...
Simple and tricky way to make screen orientation along the button click.. with an example.. Here,I'm using the sharedPreference(Im setting an boolean value based on orientation ) Method for button onClick. ``` public void rotate(View v) { edt = prefs.edit(); if (!prefs.getBoolean("screen_protrait", true)) ...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Not sure why this is useful, but it's a nice puzzle. Here is something that works for me: On rotate click, do this: ``` RelativeLayout mainLayout = (RelativeLayout) findViewById(R.id.main); int w = mainLayout.getWidth(); int h = mainLayout.getHeight(); mainLayout.setRotation(270.0f); mainLayout.setTranslationX((w - ...
try set your layout params to match\_parent after rotation: ``` layout.setRotation(270.0f) ``` and then ``` RelativeLayout layout = (RelativeLayout) findViewById(R.id.rootLayout); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); ``` EDIT: get the parentView `Vie...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Simple and tricky way to make screen orientation along the button click.. with an example.. Here,I'm using the sharedPreference(Im setting an boolean value based on orientation ) Method for button onClick. ``` public void rotate(View v) { edt = prefs.edit(); if (!prefs.getBoolean("screen_protrait", true)) ...
Try this code: (RelativeLayoutOuterFrame) it is the name of your layout.which you want to rotate. Actually, we are not rotate the layout.we just change height an width value. ``` int w = RelativeLayoutOuterFrame.getWidth(); int h = RelativeLayoutOuterFrame.getHeight(); ViewGroup.LayoutParams lp = (View...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Simple and tricky way to make screen orientation along the button click.. with an example.. Here,I'm using the sharedPreference(Im setting an boolean value based on orientation ) Method for button onClick. ``` public void rotate(View v) { edt = prefs.edit(); if (!prefs.getBoolean("screen_protrait", true)) ...
i'll suggest you rotate only button rather than rotating the whole layout like ``` btn_rotate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { rotation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate); rotation.setFillAfter(true); btn_rotate.startAnimati...
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
``` // get root layout from activity's XML LinearLayout mParentLayout = (LinearLayout) findViewById(R.id.activity_main); // get screen size from DisplayMetrics if you need to rotate before the screen is shown DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay...
[Android: alternate layout xml for landscape mode](https://stackoverflow.com/questions/4858026/android-alternate-layout-xml-for-landscape-modes) As I can remember, you should define a new layout for the horizontal view. I think this link can help you
21,355,784
I need to be able to rotate whole layouts on the fly (on the click of a button). I am able to rotate the layouts using, eg. `layout.setRotation(270.0f)`. **The problem is, after the rotation, the layout `height` and `width` are not matching its parent's**. I have tried inverting `height` and `width` like so, ``` Re...
2014/01/25
[ "https://Stackoverflow.com/questions/21355784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845253/" ]
Not sure why this is useful, but it's a nice puzzle. Here is something that works for me: On rotate click, do this: ``` RelativeLayout mainLayout = (RelativeLayout) findViewById(R.id.main); int w = mainLayout.getWidth(); int h = mainLayout.getHeight(); mainLayout.setRotation(270.0f); mainLayout.setTranslationX((w - ...
Try this code: ``` btnRotate.setOnClickListener(new OnClickListener() { @SuppressLint("NewApi") @Override public void onClick(View v) { int orientation = getResources().getConfiguration().orientation; switch(orientation) { case Configuration.ORIENTATION_LANDSCAPE: ...
42,087,917
When i search results, my data takes some time to show,So i want a progress bar should show after click on search button.It takes 5-8 second to show data.If i add below div after [div class="k-grid-content] div in inspect element then loading bar work well but not hide after data load.How can i add below code before da...
2017/02/07
[ "https://Stackoverflow.com/questions/42087917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7218492/" ]
If you are interested in Sql Server you can use something like this: ``` using System.Data; using System.Data.Sql; var instances = SqlDataSourceEnumerator.Instance.GetDataSources(); foreach (DataRow instance in instances.AsEnumerable()) { Console.WriteLine($"ServerName: {instance["ServerName"]}; "+ " Insta...
Similar to the accepted answer but for those who have a SqlClient.SqlConnection already opened, you can retrieve the instance name from ``` Dim c As New SqlClient.SqlConnection(sConnectionString) ' Get the database name and server SourceDatabase = c.Database SourceServer = c.DataSource ``` Sorry...
55,879,345
``` var request: [String: Any] = [ "Token": "Token", "Request": [ "CityID": "CityID", "Filters": [ "IsRecommendedOnly": "0", "IsShowRooms": "0" ] ] ] // print(request) ``` Console output: ``` ["Token": "Token", "Request": ["CityID": "CityID", "Filters": ["...
2019/04/27
[ "https://Stackoverflow.com/questions/55879345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6511607/" ]
You can get the value by typecasting Any to its type and store its value back ``` if var requestVal = request["Request"] as? [String: Any], var filters = requestVal["Filters"] as? [String: String] { filters["IsShowRooms"] = "1" requestVal["Filters"] = filters request["Request"] = requestVal } ``` Output ...
You can do this following way.(**Dictionary in swift is treated as value type**) ``` if var reqObj = request["Request"] as? [String: Any] { if var obj = reqObj["Filters"] as? [String: Any] { obj["IsShowRooms"] = "1" reqObj["Filters"] = obj } request["Request"] = reqObj } print(request) ``` **OUTPUT**...
10,414,489
I'm evaluating Knockout to use with JayData to create a standalone web application. Following this tutorial (http://jaydata.org/tutorials/creating-a-stand-alone-web-application) it seems that I will be able to store my data on iPhone, Android and in HTML5 browsers... I'm not sure how can I use JavaScript Query Langua...
2012/05/02
[ "https://Stackoverflow.com/questions/10414489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**UPDATE**: From version 1.1.0 JayData has knockoutjs integration module. Include "jaydatamodules/knockout.js" in your html page, and have JayData provide Knockout observables with entity.asKoObservable(). With this module queryable.toArray() accepts ko.ObservableArrays as targets populating it with kendo observable en...
You can integrate Knockout with jQuery by way of [Custom Bindings](http://knockoutjs.com/documentation/custom-bindings.html). That answers your question about integration. Custom bindings allow you to integrate with any JavaScript UI library, not just jQuery. In regards to your second question... Knockout really isn't...
10,414,489
I'm evaluating Knockout to use with JayData to create a standalone web application. Following this tutorial (http://jaydata.org/tutorials/creating-a-stand-alone-web-application) it seems that I will be able to store my data on iPhone, Android and in HTML5 browsers... I'm not sure how can I use JavaScript Query Langua...
2012/05/02
[ "https://Stackoverflow.com/questions/10414489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
**UPDATE**: From version 1.1.0 JayData has knockoutjs integration module. Include "jaydatamodules/knockout.js" in your html page, and have JayData provide Knockout observables with entity.asKoObservable(). With this module queryable.toArray() accepts ko.ObservableArrays as targets populating it with kendo observable en...
Here is an [example](http://jaydata.org/examples/Knockoutjs/Northwind.html) It is integrated in recent release probably
126,060
i wanted to remove "billing agreement" "recurring profile" "customer token" "My Downloadable Products" in account navigation. Magento ver. 1.9.2.4 please help me .
2016/07/17
[ "https://magento.stackexchange.com/questions/126060", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/37698/" ]
Billing Agreements : copy this file `app/design/frontend/base/default/layout/sales/billing_agreement.xml` in your current theme and remove below lines ``` <reference name="customer_account_navigation" > <action method="addLink" translate="label"><name>billing_agreements</name><path>sales/billing_agreement/</path...
This can be done using following code in your theme local.xml ``` <customer_account> <reference name="left"> <!--Remove the whole block --> <action method="unsetChild"><name>customer_account_navigation</name></action> <!-- if you don't want to add any link just skip below p...
4,523,604
I have a problem with fitting all my annotations to the screen... sometimes it shows all annotations, but some other times the app is zooming in between the two annotations so that none of them are visible... I want the app to always fit the region to the annotations and not to zoom in between them... what do I do wro...
2010/12/24
[ "https://Stackoverflow.com/questions/4523604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/543570/" ]
Use the following code ``` -(void)zoomToFitMapAnnotations:(MKMapView*)mapView{ if([mapView.annotations count] == 0) return; CLLocationCoordinate2D topLeftCoord; topLeftCoord.latitude = -90; topLeftCoord.longitude = 180; CLLocationCoordinate2D bottomRightCoord; bottomRightCoord.latitud...
Instead of: ``` region.span.latitudeDelta = meter / 111319.5; region.span.longitudeDelta = 0.0; region.center.latitude = (SouthWest.latitude + NorthEast.latitude) / 2.0; region.center.longitude = (SouthWest.longitude + NorthEast.longitude) / 2.0; ``` Try adding: ``` region.span.latitudeDelta = fabs(NorthEast.lat...
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
`$.getScript(...)` + `setInterval(...)` worked for me: ====================================================== ``` $.getScript('https://www.google.com/recaptcha/api.js') .done(function() { var setIntervalID = setInterval(function() { if (window.grecaptcha) { clearInterval(setIntervalID); con...
As mentioned `then`, `done` and the `$.getScript` callback fire when the script was loaded and not executed wich may be to early … intervals may be a way of tackling this but in my opinion it seems not very elegant. My solution is triggering an event inside the async loaded script like: ``` jQuery( document ).trigger...
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I know it is an old question but i think both answers containing "done" are not explained by their owners and they are in fact the best answers. The most up-voted answer calls for using "async:false" which will in turn create a sync call which is not optimal. on the other hand promises and promise handlers were introd...
``` $.getScript( "ajaxFile/myjs.js" ) .done(function( s, Status ) { console.warn( Status ); }) .fail(function( jqxhr, settings, exception ) { console.warn( "Something went wrong"+exception ); }); ```
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I know it is an old question but i think both answers containing "done" are not explained by their owners and they are in fact the best answers. The most up-voted answer calls for using "async:false" which will in turn create a sync call which is not optimal. on the other hand promises and promise handlers were introd...
As mentioned `then`, `done` and the `$.getScript` callback fire when the script was loaded and not executed wich may be to early … intervals may be a way of tackling this but in my opinion it seems not very elegant. My solution is triggering an event inside the async loaded script like: ``` jQuery( document ).trigger...
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
`$.getScript(...)` + `setInterval(...)` worked for me: ====================================================== ``` $.getScript('https://www.google.com/recaptcha/api.js') .done(function() { var setIntervalID = setInterval(function() { if (window.grecaptcha) { clearInterval(setIntervalID); con...
``` $.getScript( "ajaxFile/myjs.js" ) .done(function( s, Status ) { console.warn( Status ); }) .fail(function( jqxhr, settings, exception ) { console.warn( "Something went wrong"+exception ); }); ```
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I know it is an old question but i think both answers containing "done" are not explained by their owners and they are in fact the best answers. The most up-voted answer calls for using "async:false" which will in turn create a sync call which is not optimal. on the other hand promises and promise handlers were introd...
I was facing the same issue today and came up with a solution based on promises and a interval timer: ``` $.getScript("test.js", function() { var $def = $.Deferred(); if (typeof foo === 'undefined') { // "foo" isn't available var attempts = 0; // create an interval // that will check ea...
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
As mentioned `then`, `done` and the `$.getScript` callback fire when the script was loaded and not executed wich may be to early … intervals may be a way of tackling this but in my opinion it seems not very elegant. My solution is triggering an event inside the async loaded script like: ``` jQuery( document ).trigger...
$getScript use like this ``` $.getScript( "js/jquery.raty.min.js" ) .done(function( script, textStatus ) { console.log( textStatus ); } }); ``` this is working fine for me
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I know it is an old question but i think both answers containing "done" are not explained by their owners and they are in fact the best answers. The most up-voted answer calls for using "async:false" which will in turn create a sync call which is not optimal. on the other hand promises and promise handlers were introd...
$getScript use like this ``` $.getScript( "js/jquery.raty.min.js" ) .done(function( script, textStatus ) { console.log( textStatus ); } }); ``` this is working fine for me
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
`$.getScript(...)` + `setInterval(...)` worked for me: ====================================================== ``` $.getScript('https://www.google.com/recaptcha/api.js') .done(function() { var setIntervalID = setInterval(function() { if (window.grecaptcha) { clearInterval(setIntervalID); con...
I'm afraid the solution requires polling for the dependency. Alternatively the script needs to be wrapped in a pre-defined callback like AMD.
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
I was facing the same issue today and came up with a solution based on promises and a interval timer: ``` $.getScript("test.js", function() { var $def = $.Deferred(); if (typeof foo === 'undefined') { // "foo" isn't available var attempts = 0; // create an interval // that will check ea...
I'm afraid the solution requires polling for the dependency. Alternatively the script needs to be wrapped in a pre-defined callback like AMD.
14,565,365
As from the jquery api page <http://api.jquery.com/jQuery.getScript/> > > Success Callback > ---------------- > > > The callback is fired once the script has been loaded but not necessarily executed. > > > > ``` > $.getScript("test.js", function() { > foo(); > }); > > ``` > > if the `foo()` function depe...
2013/01/28
[ "https://Stackoverflow.com/questions/14565365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018232/" ]
`$.getScript(...)` + `setInterval(...)` worked for me: ====================================================== ``` $.getScript('https://www.google.com/recaptcha/api.js') .done(function() { var setIntervalID = setInterval(function() { if (window.grecaptcha) { clearInterval(setIntervalID); con...
I was facing the same issue today and came up with a solution based on promises and a interval timer: ``` $.getScript("test.js", function() { var $def = $.Deferred(); if (typeof foo === 'undefined') { // "foo" isn't available var attempts = 0; // create an interval // that will check ea...
42,756,655
I have this function that finds the preorder of a binary tree. I'm a bit unsure how I can edit this to store the traversal instead of printing it. I want to store it in an array possibly so I can compare it to another traversal, but creating an array within this function will be an issue since I implemented it recursiv...
2017/03/13
[ "https://Stackoverflow.com/questions/42756655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7608519/" ]
You are on the right track. Yes, pass in an array that is initially empty. Also pass an index initialized to 0 to keep track of how much of the array you have filled in. `*index` represents the next array index available for filling in data. You increment the index only when you fill data in the array. The recursive ca...
You just have to modify your preorder traversal code a bit and keep storing the values in an array using the `index` variable. ``` int arr[10]; // Change it to the number of nodes in your tree int index = 0; void store(struct node *root) { if (root != NULL) { printf("%d \n", root->key); arr[i...
238,782
CONTEXT : I'm building a website where users can upload many files. [WEB SERVER, no gpu] WHAT I WANT : that an uploaded .obj => render an image preview as a .png WHY : to manage a library of multiple files so the image is to have a preview, imagine a multimedia library like google photo, but with videos, audios, phot...
2021/09/22
[ "https://blender.stackexchange.com/questions/238782", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/132680/" ]
Assuming you have this animation: [![enter image description here](https://i.stack.imgur.com/2iKxG.png)](https://i.stack.imgur.com/2iKxG.png) [![enter image description here](https://i.stack.imgur.com/1IfRm.gif)](https://i.stack.imgur.com/1IfRm.gif) and now you want the same animation on another y-value you can do t...
The only thing I can think of at this moment would be to make your duplicate, open up the Graph Editor, select the keyframes you wish to move, and `G`+`Y` to change their value (not time). You may need to hide whatever you don't want to edit or don't want to edit in the same way. Like if you want to move the `X` very f...
238,782
CONTEXT : I'm building a website where users can upload many files. [WEB SERVER, no gpu] WHAT I WANT : that an uploaded .obj => render an image preview as a .png WHY : to manage a library of multiple files so the image is to have a preview, imagine a multimedia library like google photo, but with videos, audios, phot...
2021/09/22
[ "https://blender.stackexchange.com/questions/238782", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/132680/" ]
The simplest way to offset an animation is to sandwich in a new parent: [![enter image description here](https://i.stack.imgur.com/z3Ykh.jpg)](https://i.stack.imgur.com/z3Ykh.jpg) Here, I started with an object with a single location keyframe, animated by an f-curve modifier. Then I duplicated the object and parented...
The only thing I can think of at this moment would be to make your duplicate, open up the Graph Editor, select the keyframes you wish to move, and `G`+`Y` to change their value (not time). You may need to hide whatever you don't want to edit or don't want to edit in the same way. Like if you want to move the `X` very f...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` WITH cte as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' ...
``` with summary as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' GROUP BY u.id ) select count(userid), count(case when order_cou...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` with summary as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' GROUP BY u.id ) select count(userid), count(case when order_cou...
Assuming that you must use these CTEs, and this is not a [XY problem](https://en.wikipedia.org/wiki/XY_problem), you could use a CROSS JOIN to join these results like so: ``` SELECT foo_q.foo, bar_q.bar FROM (SELECT count(users) as foo FROM cte_1) as foo_q CROSS JOIN (SELECT count(order_count) as bar FROM cte_2) as b...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` with summary as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' GROUP BY u.id ) select count(userid), count(case when order_cou...
```sql WITH ... SELECT ( SELECT count(users) as foo FROM cte_1 ) foo, ( SELECT count(order_count) as bar from cte2 ) bar ```
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` WITH cte as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' ...
Assuming that you must use these CTEs, and this is not a [XY problem](https://en.wikipedia.org/wiki/XY_problem), you could use a CROSS JOIN to join these results like so: ``` SELECT foo_q.foo, bar_q.bar FROM (SELECT count(users) as foo FROM cte_1) as foo_q CROSS JOIN (SELECT count(order_count) as bar FROM cte_2) as b...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` WITH cte as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' ...
```sql WITH ... SELECT ( SELECT count(users) as foo FROM cte_1 ) foo, ( SELECT count(order_count) as bar from cte2 ) bar ```
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
``` WITH cte as ( SELECT u.id AS userid, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.999999' ...
Both shawnt00 and Kurt have fine answers. There's another slightly simpler approach to obtain that result. While it's not a direct response to the question about using those CTE terms, it might be interesting to the new SQL user, and it's standard SQL: [Test case with PG](https://dbfiddle.uk/?rdbms=postgres_14&fiddle...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
Both shawnt00 and Kurt have fine answers. There's another slightly simpler approach to obtain that result. While it's not a direct response to the question about using those CTE terms, it might be interesting to the new SQL user, and it's standard SQL: [Test case with PG](https://dbfiddle.uk/?rdbms=postgres_14&fiddle...
Assuming that you must use these CTEs, and this is not a [XY problem](https://en.wikipedia.org/wiki/XY_problem), you could use a CROSS JOIN to join these results like so: ``` SELECT foo_q.foo, bar_q.bar FROM (SELECT count(users) as foo FROM cte_1) as foo_q CROSS JOIN (SELECT count(order_count) as bar FROM cte_2) as b...
72,495,735
I have the following two common table expressions: ``` WITH cte_1 AS ( SELECT u.id AS users, count(o.id) AS order_count FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at BETWEEN '2019-07-01 00:00:00.000000' AND '2019-09-30 23:59:59.99999...
2022/06/03
[ "https://Stackoverflow.com/questions/72495735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18908491/" ]
Both shawnt00 and Kurt have fine answers. There's another slightly simpler approach to obtain that result. While it's not a direct response to the question about using those CTE terms, it might be interesting to the new SQL user, and it's standard SQL: [Test case with PG](https://dbfiddle.uk/?rdbms=postgres_14&fiddle...
```sql WITH ... SELECT ( SELECT count(users) as foo FROM cte_1 ) foo, ( SELECT count(order_count) as bar from cte2 ) bar ```
2,592,292
Let's say I have a standalone windows service running in a windows server machine. How to make sure it is highly available? 1). What are all the design level guidelines that you can propose? 2). How to make it highly available like primary/secondary, eg., the clustering solutions currently available in the market 3...
2010/04/07
[ "https://Stackoverflow.com/questions/2592292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125904/" ]
To keep the service at least running you can arrange for the Windows Service Manager to automatically restart the service if it crashes (see the Recovery tab on the service properties.) More details are available here, including a batch script to set these properties - [Restart a windows service if it crashes](https://...
If you break down the problems you are trying to solve, I think you'll probably come up with a few answers yourself. As Justin mentioned in the comment, there is no one answer. It completely depends on what your service does and how clients use it. You also don't specify any details about the client-server interactivit...
2,592,292
Let's say I have a standalone windows service running in a windows server machine. How to make sure it is highly available? 1). What are all the design level guidelines that you can propose? 2). How to make it highly available like primary/secondary, eg., the clustering solutions currently available in the market 3...
2010/04/07
[ "https://Stackoverflow.com/questions/2592292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125904/" ]
To keep the service at least running you can arrange for the Windows Service Manager to automatically restart the service if it crashes (see the Recovery tab on the service properties.) More details are available here, including a batch script to set these properties - [Restart a windows service if it crashes](https://...
If the service doesn’t expose any interface for client connectivity you could: * Broadcast or expose an “I’m alive” message or signal a database/registry/tcp/whatever that you are alive * Have a second service (monitor) that checks for these “I’m alive” signals and try to restart the service in case it is down But if...
4,648,533
I am using a jQuery UI Tabs widget that exists within an iframe on the page. From the parent document, I need to be able to access the tabs object and use its methods (the 'select' method in particular). I am using the following code currently: ``` var iframe = $('#mainFrame').contents().get(0); $('#tabs', iframe).tab...
2011/01/10
[ "https://Stackoverflow.com/questions/4648533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192694/" ]
You're turning the jQuery object reference into a `DOM node` by calling `.get(0)`. Try instead: ``` var iframe = $('#mainFrame').contents(); iframe.find('#tabs').tabs('select', 1); ``` ref.: [.find()](http://api.jquery.com/find/)
You could try (untested): ``` $('#mainFrame').contents().find('#tabs').tabs('select', 1); ```
2,943,502
The system in question is: $$ x' = y\\ y' = \mu x+x^2 $$ This has a fixed point at $x=0,-\mu$ and $y=0$ and after computing the Jacobian I find eigenvalues of $$ \lambda = \pm \sqrt{\mu} $$ for the $x=0 ,y=0$ solution. This is a saddle point for $\mu>0$ but becomes completely imaginary for $\mu<0.$ I am not sure how to...
2018/10/05
[ "https://math.stackexchange.com/questions/2943502", "https://math.stackexchange.com", "https://math.stackexchange.com/users/146286/" ]
You cannot conclude anything about the stability of a fixed point through linearization whenever the Jacobian has at least one purely imaginary eigenvalue. However, what you can do, is to express the system as a second-order system by letting $\ddot{x} = \dot{y}$: $$\ddot{x}-\mu x - x^2 = 0$$ We can interpret this s...
Note that this system has the symmetry ($x \to x, y \to -y, t \to -t$). Thus a trajectory that starts out on the $x$ axis and returns to the $x$ axis is reflected across that axis to make a closed loop. The fixed point is a centre: stable but not asymptotically stable.
29,600,941
I want to add data in drop down list,I am able to add the data and view it but for that i have to refresh the page again, I want to do that in jQuery without refreshing the page.
2015/04/13
[ "https://Stackoverflow.com/questions/29600941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4781955/" ]
The problem is * Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2 at android.content.res.TypedArray.getColor(TypedArray.java:326) The code or id of the color is invalid.
I actually get it! The problem was with the custom theme i was trying to use. I think the main reason for that error came from trying to extend Material Light and that was incompatible with android version on my phone! :) If someone can confirm that i'll be gratefull!
16,108,745
I have Radmenu placed in master page and if I click any item ,page will get post back so its difficult to maintain item selected focused with the color.I tried placing an ajaxpanel,still its getting post backed. ``` <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadMenu ID="Menu1" r...
2013/04/19
[ "https://Stackoverflow.com/questions/16108745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046415/" ]
If you create a new windows forms application for C# in Visual Studio it will get you working with a single form, and then you can add more forms in your main form. As a bonus, you will get a designer for your main form where you can drag and drop controls.
Hope your `Program.cs` looks like: ``` static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } ``` and try this inside `Form1`: ``` private void Form1_Load(object sender, EventArgs e) { Fo...
16,108,745
I have Radmenu placed in master page and if I click any item ,page will get post back so its difficult to maintain item selected focused with the color.I tried placing an ajaxpanel,still its getting post backed. ``` <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadMenu ID="Menu1" r...
2013/04/19
[ "https://Stackoverflow.com/questions/16108745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046415/" ]
You can create a new `ApplicationContext` to represent multiple forms: ``` public class MultiFormContext : ApplicationContext { private int openForms; public MultiFormContext(params Form[] forms) { openForms = forms.Length; foreach (var form in forms) { form.FormClosed ...
Hope your `Program.cs` looks like: ``` static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } ``` and try this inside `Form1`: ``` private void Form1_Load(object sender, EventArgs e) { Fo...
16,108,745
I have Radmenu placed in master page and if I click any item ,page will get post back so its difficult to maintain item selected focused with the color.I tried placing an ajaxpanel,still its getting post backed. ``` <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadMenu ID="Menu1" r...
2013/04/19
[ "https://Stackoverflow.com/questions/16108745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1046415/" ]
You can create a new `ApplicationContext` to represent multiple forms: ``` public class MultiFormContext : ApplicationContext { private int openForms; public MultiFormContext(params Form[] forms) { openForms = forms.Length; foreach (var form in forms) { form.FormClosed ...
If you create a new windows forms application for C# in Visual Studio it will get you working with a single form, and then you can add more forms in your main form. As a bonus, you will get a designer for your main form where you can drag and drop controls.
55,859,542
``` var state = Vue.observable({ selectedTab: '' }); Vue.component('block-ui-tab', { props: ['name', 'handle', 'icon'], template: '<li :handle="handle" :class="{ active: state.selectedTab === handle }"><i :class="icon"></i>{{ name }}</li>' }); var app = new Vue({ el: '#app', data: {}, methods:...
2019/04/26
[ "https://Stackoverflow.com/questions/55859542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172637/" ]
First, I think you can use any serializer to convert your objects to the format you want. ``` var serialized = JsonConvert.SerializeObject(data) ``` Second, back to your question, here is the code. However, you need to add " around your variables and get rid of string concatenation I added for readability. Also, thi...
Finally Resolved it this way - ``` public class SomeView { public int Id {get; private set;} public int T_Id { get; private set; } } public class User { public int T_Id { get; set; } public string fname {get; set;} public string lname{get; set;} } public class SomeViewModel { public int Id { get...
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
A few scams I've seen making the rounds: * Use it to dial a premium rate number owned by the group. In the UK, 09xx numbers can cost up to £1.50 per minute, and most 09xx providers charge around 33%, so a five minute call syphons £5 into the group's hands. If you're a good social engineer, you might only have a 10 min...
Some mobile networks in the world allow users to transfer prepaid balances from one account to another. Alternatively, they might send some sort of incriminating SMS from your phone which may cause you issues with law enforcement officer.
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
They could use it to send the detonation signal to that nuclear weapon they've secreted in a warehouse in Manhattan. That's pretty much the worst-case scenario.
While detonating a bomb or EMP would be the most harmful, I think the following scenarios are much more likely to happen. If you have a smartphone, it's very likely you have some kind of weather widget on the homescreen which tells the attacker what is your hometown. Also, I yet have to see a smartphone without news w...
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
They could use it to send the detonation signal to that nuclear weapon they've secreted in a warehouse in Manhattan. That's pretty much the worst-case scenario.
Rule 3: [If a bad guy has unrestricted physical access to your computer, it's not your computer anymore.](http://technet.microsoft.com/library/cc722487.aspx#EIAA)
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
with a USB rubber on android the pin password could be hacked (brute forced) <http://hakshop.myshopify.com/products/usb-rubber-ducky> they could then create a backup of your device, they could analyse already created backups, they could download all of your saved data, media etc and use this to further penetrate other...
With some phones it is possible to call system commands or even to lock the SIM card, just by visiting a prepared website. There was an article some time ago on [Heise security](http://www.h-online.com/security/news/item/Android-smartphones-USSD-calls-can-kill-SIM-cards-1719230.html) about this problem.
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
They could use it to send the detonation signal to that nuclear weapon they've secreted in a warehouse in Manhattan. That's pretty much the worst-case scenario.
With some phones it is possible to call system commands or even to lock the SIM card, just by visiting a prepared website. There was an article some time ago on [Heise security](http://www.h-online.com/security/news/item/Android-smartphones-USSD-calls-can-kill-SIM-cards-1719230.html) about this problem.
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
While detonating a bomb or EMP would be the most harmful, I think the following scenarios are much more likely to happen. If you have a smartphone, it's very likely you have some kind of weather widget on the homescreen which tells the attacker what is your hometown. Also, I yet have to see a smartphone without news w...
Did not see these: adding another sync account, forwarding your calls, automated pin code retrieval (boostmobile), calling drug dealers, making threats over your phone.
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
They could dial their own number to get yours (assuming your number isn't private.) I think I just invented a new, somewhat forceful and creepy, pick-up move.
They could dial a [USSD](http://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data) to get supplimental information about you or your device. Some UUSD codes have been documented to have the capability of doing a factory reset on your phone. [Source](http://www.engadget.com/2012/09/25/dirty-ussd-code-samsung...
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
While detonating a bomb or EMP would be the most harmful, I think the following scenarios are much more likely to happen. If you have a smartphone, it's very likely you have some kind of weather widget on the homescreen which tells the attacker what is your hometown. Also, I yet have to see a smartphone without news w...
Rule 3: [If a bad guy has unrestricted physical access to your computer, it's not your computer anymore.](http://technet.microsoft.com/library/cc722487.aspx#EIAA)
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
A few scams I've seen making the rounds: * Use it to dial a premium rate number owned by the group. In the UK, 09xx numbers can cost up to £1.50 per minute, and most 09xx providers charge around 33%, so a five minute call syphons £5 into the group's hands. If you're a good social engineer, you might only have a 10 min...
With some phones it is possible to call system commands or even to lock the SIM card, just by visiting a prepared website. There was an article some time ago on [Heise security](http://www.h-online.com/security/news/item/Android-smartphones-USSD-calls-can-kill-SIM-cards-1719230.html) about this problem.
25,772
A stranger walks up to you on the street. They say they lost their phone and need to make a phone call (has happened to me twice, and maybe to you). What's the worst a phone call could do? Let's assume they don't run, don't plug any devices into the phone, they just dial a number and do whatever, and hang up.
2012/12/21
[ "https://security.stackexchange.com/questions/25772", "https://security.stackexchange.com", "https://security.stackexchange.com/users/17662/" ]
They could dial their own number to get yours (assuming your number isn't private.) I think I just invented a new, somewhat forceful and creepy, pick-up move.
While detonating a bomb or EMP would be the most harmful, I think the following scenarios are much more likely to happen. If you have a smartphone, it's very likely you have some kind of weather widget on the homescreen which tells the attacker what is your hometown. Also, I yet have to see a smartphone without news w...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
First, you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, [using OpenSSL to download it](http://www.madboa.com/geek/openssl/#cert-retrieve), or, since this appears to be an HTTP server, conn...
I believe that you are trying to connect to a something using SSL but that something is providing a certificate which is not verified by root certification authorities such as verisign.. In essence by default secure connections can only be established if the person trying to connect knows the counterparties keys or som...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
Whenever we are trying to connect to URL, if server at the other site is running on https protocol and is mandating that we should communicate via information provided in certificate then we have following option: 1) ask for the certificate(download the certificate), import this certificate in trustore. Default tr...
I believe that you are trying to connect to a something using SSL but that something is providing a certificate which is not verified by root certification authorities such as verisign.. In essence by default secure connections can only be established if the person trying to connect knows the counterparties keys or som...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
First, you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, [using OpenSSL to download it](http://www.madboa.com/geek/openssl/#cert-retrieve), or, since this appears to be an HTTP server, conn...
Whenever we are trying to connect to URL, if server at the other site is running on https protocol and is mandating that we should communicate via information provided in certificate then we have following option: 1) ask for the certificate(download the certificate), import this certificate in trustore. Default tr...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
First, you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, [using OpenSSL to download it](http://www.madboa.com/geek/openssl/#cert-retrieve), or, since this appears to be an HTTP server, conn...
SSLHandshakeException can be resolved 2 ways. 1. Incorporating SSL * Get the SSL (by asking the source system administrator, can also be downloaded by openssl command, or any browsers downloads the certificates) * Add the certificate into truststore (cacerts) located at JRE/lib/security * provide the truststor...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
First, you need to obtain the public certificate from the server you're trying to connect to. That can be done in a variety of ways, such as contacting the server admin and asking for it, [using OpenSSL to download it](http://www.madboa.com/geek/openssl/#cert-retrieve), or, since this appears to be an HTTP server, conn...
This is what I did to POST a JSON to a URL with insecure/invalid SSL certs using latest JDK 11 HttpClient: ``` // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X5...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
Whenever we are trying to connect to URL, if server at the other site is running on https protocol and is mandating that we should communicate via information provided in certificate then we have following option: 1) ask for the certificate(download the certificate), import this certificate in trustore. Default tr...
SSLHandshakeException can be resolved 2 ways. 1. Incorporating SSL * Get the SSL (by asking the source system administrator, can also be downloaded by openssl command, or any browsers downloads the certificates) * Add the certificate into truststore (cacerts) located at JRE/lib/security * provide the truststor...
6,659,360
I connected with VPN to setup the inventory API to get product list and it works fine. Once I get the result from the web-service and i bind to UI. And also I integrated PayPal with my application for make Express checkout when I make a call for payment I'm facing this error. I use servlet for back-end process. Can any...
2011/07/12
[ "https://Stackoverflow.com/questions/6659360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504130/" ]
Whenever we are trying to connect to URL, if server at the other site is running on https protocol and is mandating that we should communicate via information provided in certificate then we have following option: 1) ask for the certificate(download the certificate), import this certificate in trustore. Default tr...
This is what I did to POST a JSON to a URL with insecure/invalid SSL certs using latest JDK 11 HttpClient: ``` // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X5...
858,161
The question regards the Poisson distribution function as given by: $$\frac{x^k e^{-x}}{k!}$$ The distribution's domain (x) goes from 0 to $\infty$, and $k \in \mathbb{N\_0}$ I tried the distribution as the following function: $$\frac{x^r e^{-x}}{\Gamma(r + 1)}$$ To my surprise, the integral $$\int\_0^\infty \fra...
2014/07/06
[ "https://math.stackexchange.com/questions/858161", "https://math.stackexchange.com", "https://math.stackexchange.com/users/132716/" ]
"The distribution's domain" is a phrase I would not have understood if you hadn't provided some context. The distribution's **support** is the set of values the random variable can take, ~~or in the case of continuous distributions, the closure of that set.~~[Later edit: see **PS** below.] For the Poisson distribution ...
You have discovered the [Gamma Distribution,](http://en.wikipedia.org/wiki/Gamma_distribution) actually an inessentially special case of it. The distribution has many uses.
31,594,880
I am a complete beginner with the [D language](http://dlang.org/). How to get, as an `uint` unsigned 32 bits integer in the D language, some hash of a string... I need a quick and dirty hash code (I don't care much about the "randomness" or the "lack of collision", I care slightly more about performance). ``` impor...
2015/07/23
[ "https://Stackoverflow.com/questions/31594880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841108/" ]
A really quick thing could just be this: ``` uint string_hash(string s) { import std.digest.crc; auto r = crc32Of(s); return *(cast(uint*) r.ptr); } ``` Since `crc32Of` returns a `ubyte[4]` instead of the `uint` you want, a conversion is necessary, but since `ubyte[4]` and `uint` are the same thing ...
While Adams answer does exactly what you're looking for, you can also use a union to do the casting. This is a pretty useful trick so may as well put it here: ``` /** * Returns a crc32Of hash of a string * Uses a union to store the ubyte[] * And then simply reads that memory as a uint */ uint string_hash(strin...
6,183,063
I am going to use on of the tooltip plugins listed in this question: [jquery tooltip, but on click instead of hover](https://stackoverflow.com/questions/1313321/jquery-tooltip-but-on-click-instead-of-hover) How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be s...
2011/05/31
[ "https://Stackoverflow.com/questions/6183063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282789/" ]
You usually have an array of messages and then generate a random index onclick. something like ``` var messageArray = ["message 1", "message 2", "message 3"]; var randomNum = Math.floor(Math.random()*messageArray.size); var myMessage = messageArray[randomNum]; ``` or something like that. refactor to use ajax/yo...
Using a very small function from PHP.js: <http://phpjs.org/functions/rand:498> I do it like so: ``` var messages = [ 'Message 1', 'Message 2', 'Message 3' ]; var random_number = rand(0, messages.length); $("#tooltip").text(messages[random_number]); // PHP.js rand() function. // http://kevin.vanzonne...
6,183,063
I am going to use on of the tooltip plugins listed in this question: [jquery tooltip, but on click instead of hover](https://stackoverflow.com/questions/1313321/jquery-tooltip-but-on-click-instead-of-hover) How would I also setup a tooltip that randomized the text shown. For instance if you click a link you could be s...
2011/05/31
[ "https://Stackoverflow.com/questions/6183063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282789/" ]
You usually have an array of messages and then generate a random index onclick. something like ``` var messageArray = ["message 1", "message 2", "message 3"]; var randomNum = Math.floor(Math.random()*messageArray.size); var myMessage = messageArray[randomNum]; ``` or something like that. refactor to use ajax/yo...
``` var messages = ['Message 1', 'Message 2', 'Message 3']; $('.withTooltip').click(function(){ $("#tooltip").text(messages[Math.round(Math.random() * 3)]).show(); }); ```
43,971,329
I have this query on mySQL ``` SELECT updated_at FROM products WHERE updated_at >= DATE_ADD(NOW(), INTERVAL -7 DAY) GROUP BY day(updated_at) ORDER BY updated_at desc ``` and I try to apply it on Laravel like this ``` $date = Products::select('updated_at') ->where('updated_at', '>=', 'DATE_ADD(NOW(), IN...
2017/05/15
[ "https://Stackoverflow.com/questions/43971329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7882004/" ]
You have to use `whereRaw` instead: ``` $date = Products::select('updated_at') ->whereRaw('updated_at >= DATE_ADD(NOW(), INTERVAL -7 DAY)') ->groupBy('updated_at') ->orderBy('updated_at', 'desc') ->get() ```
Another use case is when you need to actually add an interval to a date column and compare that to now(), like comparing 2 days after start\_date to now(). You would have to do exactly like this (laravel 5.7): * where 'start\_date' is the column name, * keywords 'interval' & 'day' must be lowercase (or any other simi...
71,630
My question originates from the book of Silverman "The Aritmetic of Elliptic Curves", 2nd edition (call it [S]). On p. 273 of [S] the author is considering an elliptic curve $E/K$ defined over a number field $K$ and he introduces the notion of a $v$-adic distance from $P$ to $Q$. This is done as follows: Firstly, let'...
2011/07/30
[ "https://mathoverflow.net/questions/71630", "https://mathoverflow.net", "https://mathoverflow.net/users/5498/" ]
* You can choose $t\_Q$ to be defined over $K\_v$, since the divisor $n(Q\_v)$ is defined over $K\_v$, and for large enough $n$ there will be a global section. Note that Riemann-Roch works over non-algebraically closed fields this way. Or you can choose a basis defined over some finite Galois extension of $K\_v$, and t...
Some complement to Joe Silverman's answer. Any algebraic variety over $K\_v$ (or any topological field) has a canonical topology induced by that of the base field. This topology can be defined by a distance (far from to be unique). Over $\mathbb{P}^n\_{K\_v}$, a distance can be given (once a system de coordinates is fi...
17,296,097
What is wrong in this error ? > > alter table INFO add constraint chk\_app check > (CASE WHEN app IS NULL THEN app = 'A'); > > > > If its because *app = 'A'* I am calling it twice then how to have a check constraint to check if app is null then it should have value A
2013/06/25
[ "https://Stackoverflow.com/questions/17296097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2291869/" ]
@FreefallGeek, What do you mean by you can't filter AppointmentDate if you remove it from SELECT? Report Builder allows you do dataset filtering based on the user assigned parameter in run time with query like this, ``` SELECT DISTINCT PaientID, InsuranceCarrier FROM Encounters WHERE AppointmentDate >= @beginnin...
In this particular case, I would take into account all visits per the entire day. And instead of displaying multiple encounters per patient per day, I would go to display for the report as AppointmentDate only the day part of the AppointmentDate itself. As the filtering might not need the exact moment of the visit, but...
42,001,511
I have got a Microsoft Access database in the resource folder of my Java application. When the user clicks a button, this database is copied to the temp directory of the PC. Then I make a temporary VBS file in the same directory and execute it. (This VBS file calls a VBA macro within the database, that deletes some re...
2017/02/02
[ "https://Stackoverflow.com/questions/42001511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4440871/" ]
Based on [this dicussion](https://sourceforge.net/p/ucanaccess/discussion/help/thread/4539a56c/). The solution is adding `;singleconnection=true` to JDBC url. `UCanAccess` will close the file after JDBC connection closed. ``` Connection con = DriverManager.getConnection("jdbc:ucanaccess://" + dbFilePath +";singleco...
Thank you for your solution beckyang. I managed to get it working with it, but there was a second mistake: I deleted the contents of a table with java then closed the connection and run the vba procedure. In the VBA I was attempting to delete the data again; but as there were none, this didn't work out. After deleting ...
31,974,011
I'm currently working on the following website: <http://hmdesign.alpheca.uberspace.de/> As you can see, I already managed to create a list of div.project-item elements. Due to the use of inline-blocks, it also reduces the number of columns when you resize the window. What I want to accomplish now is, when you resize t...
2015/08/12
[ "https://Stackoverflow.com/questions/31974011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2738393/" ]
Take a look at the "Gang of Four" *composite* pattern: ====================================================== The Child classes should not be derived from the Parent class. Instead, Child and Parent classes should implement the same Interface, let's call it `IAlgorithm`. This Interface should have a pure `virtual` met...
A parent can not call child methods, generally. In this case you've created the class as the parent type, so it would be pretty dangerous to call something in a child since a child may assume member methods or variables exist that aren't in the parent.
12,070,394
In my Events table I have a column called Pos1, which contains IDs from A to E. I need to count how many times 'E' appears in the column and where it ranks alongside the other numbers. For example in this table 'E' occurs **1** time and is ranked **4** (D=3, A=2, C=2, E=1, B=0). ``` Pos1 E C D C D D A A ``` I'm a c...
2012/08/22
[ "https://Stackoverflow.com/questions/12070394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/310174/" ]
try this: ``` SELECT Pos1, a.cnt, rank FROM( SELECT a.Pos1, a.cnt, (@rank := @rank + 1) AS rank FROM( SELECT Pos1, COUNT(Pos1) cnt FROM Events GROUP BY Pos1 ) a, (SELECT @rank := 0) b ORDER BY a.cnt DESC )a WHERE a.pos1 = 'E'; ``` [SQLFIDDLE DEMO HERE](http://sqlfiddle.com/#!2...
alternatively do rank within PHP: ``` $query = "SELECT Pos1, COUNT(Pos1) AS qty FROM Events GROUP BY Pos1 ORDER BY qty DESC"; $result = mysql_query($query) or die(mysql_error()); $rank=1; while($row = mysql_fetch_array($result)) { echo $rank.": ".$row['Pos1']."(".$row['qty'].")<br />"; $rank++; } ```
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
How about this command: ``` :put =join(map(range(char2nr('a'),char2nr('z')),'nr2char(v:val)'),'') ``` Collect the ASCII values of the characters in the range from `a` to `z`, then map them over the `nr2char()` function and insert the result into the current buffer with `:put =`. When you leave out the enclosing `jo...
You might try using [Vim abbreviations](http://vim.wikia.com/wiki/Using_abbreviations) or a full-fledged snippet manager plugin like [UltiSnips](https://github.com/SirVer/ultisnips). It might take a few moments to set up, and you'd have to type that alphabet one more time to define it as an abbreviation or snippet, but...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
Using `set nrformats+=alpha`: ``` ia<Esc>qqylp<C-a>q24@q ``` Step by step: ``` ia<Esc> " Start with 'a' qqylp<C-a>q " @q will duplicate the last character and increment it 24@q " Append c..z ```
First, `set nrformats+=alpha`. Then: ``` ia<ESC>Y25p<CTRL-V>}g<CTRL-A>k26gJ ``` Which means: * `ia` insert the initial `a` * `Y25p` yank the `a` and duplicate it on 25 lines * `<CTRL-V>` go into visual block mode * `}` go to the last character at the end of the current paragraph * `g<CTRL-A>` incrementally increas...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
First, `set nrformats+=alpha`. Then: ``` ia<ESC>Y25p<CTRL-V>}g<CTRL-A>k26gJ ``` Which means: * `ia` insert the initial `a` * `Y25p` yank the `a` and duplicate it on 25 lines * `<CTRL-V>` go into visual block mode * `}` go to the last character at the end of the current paragraph * `g<CTRL-A>` incrementally increas...
You might try using [Vim abbreviations](http://vim.wikia.com/wiki/Using_abbreviations) or a full-fledged snippet manager plugin like [UltiSnips](https://github.com/SirVer/ultisnips). It might take a few moments to set up, and you'd have to type that alphabet one more time to define it as an abbreviation or snippet, but...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
If your shell does brace expansion this is a pretty elegant solution: ``` :r !printf '\%s' {a..z} ``` [`:read!`](http://vimdoc.sourceforge.net/htmldoc/insert.html#:read!) reads the output of an external command into the current buffer. In this case, it reads the output of the shell's `printf` applied to `{a..z}` aft...
First, `set nrformats+=alpha`. Then: ``` ia<ESC>Y25p<CTRL-V>}g<CTRL-A>k26gJ ``` Which means: * `ia` insert the initial `a` * `Y25p` yank the `a` and duplicate it on 25 lines * `<CTRL-V>` go into visual block mode * `}` go to the last character at the end of the current paragraph * `g<CTRL-A>` incrementally increas...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
If your shell does brace expansion this is a pretty elegant solution: ``` :r !printf '\%s' {a..z} ``` [`:read!`](http://vimdoc.sourceforge.net/htmldoc/insert.html#:read!) reads the output of an external command into the current buffer. In this case, it reads the output of the shell's `printf` applied to `{a..z}` aft...
I have found a shorter solution (you don't need to change nrformats beforehand) while solving <http://www.vimgolf.com/challenges/5ebe8a63d8085e000c2f5bd5> ``` iabcdefghijklm<Esc>yiwg??P ``` which means: * `iabcdefghijklm<Esc>` insert first half of the alphabet * `yiw` copy it * `g??` ROT13 encode (shift by 13 lette...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
How about this command: ``` :put =join(map(range(char2nr('a'),char2nr('z')),'nr2char(v:val)'),'') ``` Collect the ASCII values of the characters in the range from `a` to `z`, then map them over the `nr2char()` function and insert the result into the current buffer with `:put =`. When you leave out the enclosing `jo...
First, `set nrformats+=alpha`. Then: ``` ia<ESC>Y25p<CTRL-V>}g<CTRL-A>k26gJ ``` Which means: * `ia` insert the initial `a` * `Y25p` yank the `a` and duplicate it on 25 lines * `<CTRL-V>` go into visual block mode * `}` go to the last character at the end of the current paragraph * `g<CTRL-A>` incrementally increas...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
I have found a shorter solution (you don't need to change nrformats beforehand) while solving <http://www.vimgolf.com/challenges/5ebe8a63d8085e000c2f5bd5> ``` iabcdefghijklm<Esc>yiwg??P ``` which means: * `iabcdefghijklm<Esc>` insert first half of the alphabet * `yiw` copy it * `g??` ROT13 encode (shift by 13 lette...
You might try using [Vim abbreviations](http://vim.wikia.com/wiki/Using_abbreviations) or a full-fledged snippet manager plugin like [UltiSnips](https://github.com/SirVer/ultisnips). It might take a few moments to set up, and you'd have to type that alphabet one more time to define it as an abbreviation or snippet, but...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
If your shell does brace expansion this is a pretty elegant solution: ``` :r !printf '\%s' {a..z} ``` [`:read!`](http://vimdoc.sourceforge.net/htmldoc/insert.html#:read!) reads the output of an external command into the current buffer. In this case, it reads the output of the shell's `printf` applied to `{a..z}` aft...
How about this command: ``` :put =join(map(range(char2nr('a'),char2nr('z')),'nr2char(v:val)'),'') ``` Collect the ASCII values of the characters in the range from `a` to `z`, then map them over the `nr2char()` function and insert the result into the current buffer with `:put =`. When you leave out the enclosing `jo...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
Using `set nrformats+=alpha`: ``` ia<Esc>qqylp<C-a>q24@q ``` Step by step: ``` ia<Esc> " Start with 'a' qqylp<C-a>q " @q will duplicate the last character and increment it 24@q " Append c..z ```
How about this command: ``` :put =join(map(range(char2nr('a'),char2nr('z')),'nr2char(v:val)'),'') ``` Collect the ASCII values of the characters in the range from `a` to `z`, then map them over the `nr2char()` function and insert the result into the current buffer with `:put =`. When you leave out the enclosing `jo...
18,109,625
I sometimes need to write the whole alphabet `abcd…z` and I hate typing it letter by letter in Vim's insert mode. Does there exist any method to do this more efficiently? I know about the `ga` command which gives me the ascii code of the character where the cursor is … but don't know anything about how to mix it with ...
2013/08/07
[ "https://Stackoverflow.com/questions/18109625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282982/" ]
Using `set nrformats+=alpha`: ``` ia<Esc>qqylp<C-a>q24@q ``` Step by step: ``` ia<Esc> " Start with 'a' qqylp<C-a>q " @q will duplicate the last character and increment it 24@q " Append c..z ```
I have found a shorter solution (you don't need to change nrformats beforehand) while solving <http://www.vimgolf.com/challenges/5ebe8a63d8085e000c2f5bd5> ``` iabcdefghijklm<Esc>yiwg??P ``` which means: * `iabcdefghijklm<Esc>` insert first half of the alphabet * `yiw` copy it * `g??` ROT13 encode (shift by 13 lette...
48,270,808
Not exactly sure what I am doing wrong here, I have looked at other forum post and this is what they say to do to re-auth a user. But I am getting an error of: `TypeError: Cannot read property 'credential' of undefined` on this line here: `const credentials = fire.auth.EmailAuthProvider.credential(currentUser.email, ...
2018/01/15
[ "https://Stackoverflow.com/questions/48270808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8551819/" ]
Like @bojeil answered, it's a namespace so, for instance and if you're using typescript and you used `firebase.initializeApp(config);` in another class, just add again the import in the class where you user the credential method with `import * as Firebase from 'firebase/app';` As u can see in the doc `credential` it's...
You've imported firebase in the wrong way. [Here](https://firebase.google.com/docs/reference/js/firebase.auth.EmailAuthProvider#.credential) is what it says in the document. [Official Document](https://i.stack.imgur.com/ymcZI.png) ``` const firebase = require('firebase'); const cred = firebase.auth.EmailAuthProvider....
48,270,808
Not exactly sure what I am doing wrong here, I have looked at other forum post and this is what they say to do to re-auth a user. But I am getting an error of: `TypeError: Cannot read property 'credential' of undefined` on this line here: `const credentials = fire.auth.EmailAuthProvider.credential(currentUser.email, ...
2018/01/15
[ "https://Stackoverflow.com/questions/48270808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8551819/" ]
You've imported firebase in the wrong way. [Here](https://firebase.google.com/docs/reference/js/firebase.auth.EmailAuthProvider#.credential) is what it says in the document. [Official Document](https://i.stack.imgur.com/ymcZI.png) ``` const firebase = require('firebase'); const cred = firebase.auth.EmailAuthProvider....
I had the same issue as you and none of these answers helped me. This worked for me: ``` const cred = fire.firebase_.auth.EmailAuthProvider.credential(email, password); ``` I'm not entirely sure why, but I just tried all the options available on `fire` in the dev tools until I came across firebase\_ which had the o...
48,270,808
Not exactly sure what I am doing wrong here, I have looked at other forum post and this is what they say to do to re-auth a user. But I am getting an error of: `TypeError: Cannot read property 'credential' of undefined` on this line here: `const credentials = fire.auth.EmailAuthProvider.credential(currentUser.email, ...
2018/01/15
[ "https://Stackoverflow.com/questions/48270808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8551819/" ]
Like @bojeil answered, it's a namespace so, for instance and if you're using typescript and you used `firebase.initializeApp(config);` in another class, just add again the import in the class where you user the credential method with `import * as Firebase from 'firebase/app';` As u can see in the doc `credential` it's...
I had the same issue as you and none of these answers helped me. This worked for me: ``` const cred = fire.firebase_.auth.EmailAuthProvider.credential(email, password); ``` I'm not entirely sure why, but I just tried all the options available on `fire` in the dev tools until I came across firebase\_ which had the o...
148,103
[![War over Kimberley and Murrayville](https://i.stack.imgur.com/VlYZM.png)](https://i.stack.imgur.com/VlYZM.png) I have a fictional world, consisting of a federation of 17 provinces (in blue on the map extract). Currently, it is in the late 1920's. The Dzevogurski and Quidthovitse provinces are on the brink of war. H...
2019/05/31
[ "https://worldbuilding.stackexchange.com/questions/148103", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/6500/" ]
**It depends** I would say that if the question is purely about semantics, we do not have an internationally accepted definition of civil war. I think that the conflict between two provinces in a federation is not a civil war. Presumably, there is some sort of a federal government, and it's not taking part in it in th...
**Yes** A civil war is when members of the same country fight against each other for some reason. The people of these provinces presumably think of themselves as part of the same country, and they are fighting, therefore this is a civil war regardless of whether or not some provinces do not fight. There’s a long histo...
148,103
[![War over Kimberley and Murrayville](https://i.stack.imgur.com/VlYZM.png)](https://i.stack.imgur.com/VlYZM.png) I have a fictional world, consisting of a federation of 17 provinces (in blue on the map extract). Currently, it is in the late 1920's. The Dzevogurski and Quidthovitse provinces are on the brink of war. H...
2019/05/31
[ "https://worldbuilding.stackexchange.com/questions/148103", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/6500/" ]
**Yes** A civil war is when members of the same country fight against each other for some reason. The people of these provinces presumably think of themselves as part of the same country, and they are fighting, therefore this is a civil war regardless of whether or not some provinces do not fight. There’s a long histo...
Yes, it is not only possible to have neutral parties in internal conflicts, it has happened historically. This would probably classified as a [Low Intensity Conflicts](https://en.wikipedia.org/wiki/Low_intensity_conflict) due to the localized nature and limited scale of fighting. While "Low Intensity" might not seem t...