qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
10,403,475 | Is there any way to extract underlying metadata of various excel formulas. I am building this framework in C# that uses excel formula, and interested in knowing each formula input arguments, their data types and return type. This will help me to build a wizard screen based on this supplied meta-data.
Thanks in advance... | 2012/05/01 | [
"https://Stackoverflow.com/questions/10403475",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/890312/"
] | Building up on what @ja72 suggested, it is very easy to parse data from the link which he mentioned. I am not too good with C# so here is a vb.net code which you can convert to C#
Having said that, there are many ways you can look at this problem from C#
**WAY 1**
Navigate to the URL at runtime and parse the values ... | All credit to @SiddharthRout. Here is the C# conversion of the code that Sid posted
You really have to mess with a lots of casts and converts when using C#. But then that's the way C# works :P
```
using System;
using System.Windows.Forms;
Namespace WindowsFormsApplication1
{
public partial class Form1 : Form
... |
362,990 | I was connected to my production org with VS Code and checked out a scratch org through my VS Code. Now I want to go back to my production code but am not sure what commands to go back to the "master" branch. I am hoping I didn't overwrite my production org....any tips? | 2021/11/27 | [
"https://salesforce.stackexchange.com/questions/362990",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/33990/"
] | There's two main concepts you need to be concerned about: your git repository branch, and your Connected Org.
The Git repository is a local copy of your code, and you can track modifications to your metadata, and share them on a remote Git server (e.g. GitHub). The state of this local workspace, as well as the remote ... | I'm having the same problem here... Scratch org and Production org have the same credentials, so VsCode grouped them... Now anytime I create a new proyect, authorize org and try to get the production codes, I can't, it just gets the scratch orgs. I think I made the mistake of making it the default org in my VsCode, but... |
15,902,570 | I've got a string with spaces. I need to split (explode) it and got all variants of sequences from it. For example:
```
string1 string2 string3
```
I need to parse it and get an output like this:
```
string1 string2 string3
string1 string3 string2
string2 string1 string3
string2 string3 string1
string3 string2 strin... | 2013/04/09 | [
"https://Stackoverflow.com/questions/15902570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/350980/"
] | It is a permutation of array
Look here -> [Finding All Permutations of an Array](http://docstore.mik.ua/orelly/webprog/pcook/ch04_26.htm), that's help you. | By no means am I claiming this to be efficient or optimal. There are much better solutions out there. But this is just a direct answer to your question. If you want to remove some bloat (at the cost of likely a little bit of performance), you can replace the `getRemainingWords` function call with:
```
$index = 0;
arra... |
12,120,287 | I'd like to set up a 301 redirect from a .co.uk site to a .com site, keeping the same pages.
So someone going to mydomain.co.uk/pages/about should get redirected to mydomain.com/pages/about
I'm using ASP.NET and IIS 7.0 and not having much luck. I tried setting a custom 404 file that has a redirect in it like so:
``... | 2012/08/25 | [
"https://Stackoverflow.com/questions/12120287",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/799441/"
] | Another option to the ones listed by jdevelop is [Apache Isis](http://isis.apache.org).
It provides several viewers of your domain objects (i.e. POJOs + some optional extras) - Apache Wicket based viewer and JAX-RS based one. | you might want to take a look at Apache Wicket and it's tools:
<https://sites.google.com/site/wicketrad/>
<http://wicketwebbeans.sourceforge.net/> |
32,246,132 | I have a `Form` with the following properties:
* Background Image
* Scrollable `Panel` with a transparent background, and `Dock = DockStyle.Fill`
* `PictureBox` with a large `Width` and `Height` which shows scroll bars
Now all controls are set to DoubleBuffered including the form itself. Everything works as expected ... | 2015/08/27 | [
"https://Stackoverflow.com/questions/32246132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/808438/"
] | You are doing battle with a Windows system option, named "Show window content while dragging". It is turned on for all modern versions of Windows. Turning it off is not a realistic goal, since it is a system option it affects all windows of all apps. There is no back-door to selectively bypass this option.
With it ena... | It is not easy but it is doable and the following worked fine for me though took me 2 hours to discover:
First you need to make sure the column gets null value without the default 'null' icon, before add it to the grid:
```
DataGridViewImageColumn imagecol = new DataGridViewImageColumn { ImageLayout = DataGridVie... |
32,246,132 | I have a `Form` with the following properties:
* Background Image
* Scrollable `Panel` with a transparent background, and `Dock = DockStyle.Fill`
* `PictureBox` with a large `Width` and `Height` which shows scroll bars
Now all controls are set to DoubleBuffered including the form itself. Everything works as expected ... | 2015/08/27 | [
"https://Stackoverflow.com/questions/32246132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/808438/"
] | You are doing battle with a Windows system option, named "Show window content while dragging". It is turned on for all modern versions of Windows. Turning it off is not a realistic goal, since it is a system option it affects all windows of all apps. There is no back-door to selectively bypass this option.
With it ena... | The best solution is to set the form's background image again on the control scroll event
```
private void panel1_Scroll(object sender, ScrollEventArgs e) {
/*
Your Code if any exists
*/
//reset the form's background image again in the scroll event
this.BackgroundImage = Properties.Resources.... |
57,479,385 | [SCREEN SHOT OF ACTUAL DATA FRAME](https://i.stack.imgur.com/2TWVn.png)**Dataframe of 5000 rows and 192 columns**
I want to change the size of my data frame of m rows and n columns (m= 5000 and n = 192) into a size of n/3 rows(64 rows) and m\*5000 columns(15000 columns)??
**existing data frame**
```
0 A1 A2 A3 A4 A5... | 2019/08/13 | [
"https://Stackoverflow.com/questions/57479385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11922644/"
] | IIUC, can use a loop
```
pd.DataFrame([df.iloc[:, e:e+3].values.flatten() for e in range(0, 192, 3)])
``` | I will using `groupby`
```
pd.DataFrame([y.values.ravel()for x , y in df.groupby(np.arange(df.shape[1])//3,axis=1)])
``` |
57,479,385 | [SCREEN SHOT OF ACTUAL DATA FRAME](https://i.stack.imgur.com/2TWVn.png)**Dataframe of 5000 rows and 192 columns**
I want to change the size of my data frame of m rows and n columns (m= 5000 and n = 192) into a size of n/3 rows(64 rows) and m\*5000 columns(15000 columns)??
**existing data frame**
```
0 A1 A2 A3 A4 A5... | 2019/08/13 | [
"https://Stackoverflow.com/questions/57479385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11922644/"
] | IIUC, can use a loop
```
pd.DataFrame([df.iloc[:, e:e+3].values.flatten() for e in range(0, 192, 3)])
``` | you could try :
```py
df = pd.DataFrame(np.array([x.ravel() for x in np.split(df.values,
df.shape[1]//3, axis = 1)]))
``` |
57,479,385 | [SCREEN SHOT OF ACTUAL DATA FRAME](https://i.stack.imgur.com/2TWVn.png)**Dataframe of 5000 rows and 192 columns**
I want to change the size of my data frame of m rows and n columns (m= 5000 and n = 192) into a size of n/3 rows(64 rows) and m\*5000 columns(15000 columns)??
**existing data frame**
```
0 A1 A2 A3 A4 A5... | 2019/08/13 | [
"https://Stackoverflow.com/questions/57479385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11922644/"
] | IIUC, can use a loop
```
pd.DataFrame([df.iloc[:, e:e+3].values.flatten() for e in range(0, 192, 3)])
``` | ```
np.concatenate([np.reshape(col,(64,3)) for col in data.T.values],axis=1)
``` |
57,479,385 | [SCREEN SHOT OF ACTUAL DATA FRAME](https://i.stack.imgur.com/2TWVn.png)**Dataframe of 5000 rows and 192 columns**
I want to change the size of my data frame of m rows and n columns (m= 5000 and n = 192) into a size of n/3 rows(64 rows) and m\*5000 columns(15000 columns)??
**existing data frame**
```
0 A1 A2 A3 A4 A5... | 2019/08/13 | [
"https://Stackoverflow.com/questions/57479385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11922644/"
] | I will using `groupby`
```
pd.DataFrame([y.values.ravel()for x , y in df.groupby(np.arange(df.shape[1])//3,axis=1)])
``` | ```
np.concatenate([np.reshape(col,(64,3)) for col in data.T.values],axis=1)
``` |
57,479,385 | [SCREEN SHOT OF ACTUAL DATA FRAME](https://i.stack.imgur.com/2TWVn.png)**Dataframe of 5000 rows and 192 columns**
I want to change the size of my data frame of m rows and n columns (m= 5000 and n = 192) into a size of n/3 rows(64 rows) and m\*5000 columns(15000 columns)??
**existing data frame**
```
0 A1 A2 A3 A4 A5... | 2019/08/13 | [
"https://Stackoverflow.com/questions/57479385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11922644/"
] | you could try :
```py
df = pd.DataFrame(np.array([x.ravel() for x in np.split(df.values,
df.shape[1]//3, axis = 1)]))
``` | ```
np.concatenate([np.reshape(col,(64,3)) for col in data.T.values],axis=1)
``` |
4,634,719 | I have a script that works fine, but I need to add a second tag that changes background position at a different value. I need to add **$('#box\_inputR').css('background-position','0 -39px');** *in addition* to the existing script.
So now two tags change as a result of the if statement instead of one. How would you do ... | 2011/01/08 | [
"https://Stackoverflow.com/questions/4634719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/297791/"
] | Try this. My syntax may be off. I don't really know Javascript at all.
```
<script type="text/javascript">
$(function () {
$('#fastContact').formValidator({
scope : '#cform',
errorDiv : '#errorDiv2',
onError : function() {
var error = false;
if ($('#box_inputA input').hasClass('error-input')) {
$('#box_inputA').css('b... | If I understand well you question you want this:
```
if ($('#box_inputM textarea').hasClass('error-input')) {
$('#box_inputM').css('background-position','0 -84px');
$('#box_inputR').css('background-position','0 -39px');
} else {
$('#box_inputM').css('background-position','0 0');
$('... |
19,894,445 | Whenever I hover over menu items I get a weird black space as seen in the image and I am not sure why. When I use the system look and feel I don't have this problem so I think it is because of the substance look and feel.

```
public final class MainFrame extends JFrame {
publ... | 2013/11/10 | [
"https://Stackoverflow.com/questions/19894445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2976935/"
] | Use this code anywhere in your script:
```
System.setProperty("jgoodies.popupDropShadowEnabled", "false");
```
Or more correctly:
```
UIManager.put("jgoodies.popupDropShadowEnabled", "false");
``` | I think removing the "c.setBackground(Color.BLACK);" aswell as all of the other JFrame modifications to change the background color, would fix this by having the background transparent. As if the black area were a part of the JFrame menu you have on top, which it seems like, I only know from personal experience that by... |
39,066,596 | I need to implement a huge hash table which supports multiple threads to insert and get at the same time. The keys are int and the second elements are vectors of object T.
```
class T {
//class definitions here
}
```
Currently the implementation is helped with tbb::concurrent\_unordered\_map. On the documen... | 2016/08/21 | [
"https://Stackoverflow.com/questions/39066596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6739203/"
] | ~~TBB **CAN** support concurrent insertion and traversal for `concurrent_xxx` containers.~~ However, your original code has race conditions:
```
std::vector<T*> get(int key) {
// other code
return it->second; # race condition 1
// other code
}
```
The `get` function try to return a copy of `vector<T*>` ... | "TBB CAN support concurrent insertion and traversal for concurrent\_xxx containers." - not exactly. Traversal is a tricky thing when there is no memory reclamation support like in TBB and concurrent erasure is supported by a container (`concurrent_hash_map`). However, `concurrent_unordered_map` does not support thread-... |
39,066,596 | I need to implement a huge hash table which supports multiple threads to insert and get at the same time. The keys are int and the second elements are vectors of object T.
```
class T {
//class definitions here
}
```
Currently the implementation is helped with tbb::concurrent\_unordered\_map. On the documen... | 2016/08/21 | [
"https://Stackoverflow.com/questions/39066596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6739203/"
] | ~~TBB **CAN** support concurrent insertion and traversal for `concurrent_xxx` containers.~~ However, your original code has race conditions:
```
std::vector<T*> get(int key) {
// other code
return it->second; # race condition 1
// other code
}
```
The `get` function try to return a copy of `vector<T*>` ... | @Anton my friend, the concurrent\_unordered containers do support concurrent traversal and insertion; they're implemented as skip-lists. In the non-multi case the result of the pointer swing is tested, and if it fails the search is started again from the point of insertion.
Now C++ may have changed in the last few wee... |
39,066,596 | I need to implement a huge hash table which supports multiple threads to insert and get at the same time. The keys are int and the second elements are vectors of object T.
```
class T {
//class definitions here
}
```
Currently the implementation is helped with tbb::concurrent\_unordered\_map. On the documen... | 2016/08/21 | [
"https://Stackoverflow.com/questions/39066596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6739203/"
] | "TBB CAN support concurrent insertion and traversal for concurrent\_xxx containers." - not exactly. Traversal is a tricky thing when there is no memory reclamation support like in TBB and concurrent erasure is supported by a container (`concurrent_hash_map`). However, `concurrent_unordered_map` does not support thread-... | @Anton my friend, the concurrent\_unordered containers do support concurrent traversal and insertion; they're implemented as skip-lists. In the non-multi case the result of the pointer swing is tested, and if it fails the search is started again from the point of insertion.
Now C++ may have changed in the last few wee... |
3,381,574 | In my project, I made an animation for my UIImageView using some pngs. I recently swapped those pngs out for different images (with different file names) and removed the previous pngs to the trash. I updated my code to reflect the file name change but when I build my application, I still see the animated images that ar... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3381574",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/400057/"
] | One of the best crawler/indexer combos you'll ever find for Java is [Nutch](http://nutch.apache.org/), which is an Apache project now (see [Wiki](http://wiki.apache.org/nutch/Features)) and thus open source.
**Features:**
1. Fetching, parsing and indexation in parallel and/ou distributed
2. Plugins: plain text, HTML,... | Nutch is unbeatable. Another more simple lib which I used successfully in projects is <https://crawler.dev.java.net/>. You find examples on <https://crawler.dev.java.net/samples.html>. |
27,262,386 | I have a sample employee data file, and I want to filter out the rows where the **Employement\_Status** column is **INACTIVE** and the **Hire\_Date** is before **2013 June 1st**.
The rows in the file look like this
```
FirstName LastName BirthDate EmploymentStatus HireDate
Tom Red 5/16/... | 2014/12/03 | [
"https://Stackoverflow.com/questions/27262386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2429493/"
] | Not a one-liner solution, but:
filter.awk:
```
BEGIN {
FS = " "
year = 2013
month = 6
}
{
split($5, a, "/")
if( $4=="INACTIVE" && ((a[3] < year) || ((a[3] == from) && (a[1] < month)))) print $0;
}
```
call it like that:
```
awk -f filter.awk <your-example-file>
```
result:
```
FirstName LastName... | ```perl
function op(qr) {
split(qr, st, "/")
return sprintf("%d%02d%02d", st[3], st[1], st[2])
}
NR > 1 &&
$4 == "INACTIVE" &&
op($5) < op("6/1/2013") {next}
1
```
Run like this
```
awk -f infile.awk infile.txt
```
Result
```
FirstName LastName BirthDate EmploymentStatus HireDate
Sandy ... |
26,041,329 | I am using the Yii framework and i have the website to allow the admin to upload a text file or a pdf.Now I want to allow the user to click on a link and start downloading that file.How is this achieved inside the Yii framework?
I am storing the files at Yiiapplication/uploads/downloads/test.txt.
I have tried the fol... | 2014/09/25 | [
"https://Stackoverflow.com/questions/26041329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3531138/"
] | if you prefer not using extension , why not try to create a simple method to force download.
```
public function downloadFile($fullpath){
if(!empty($fullpath)){
header("Content-type:application/pdf"); //for pdf file
//header('Content-Type:text/plain; charset=ISO-8859-15');
//if you want to read te... | Download Extension from here <http://www.yiiframework.com/extension/cfile/>
```
// Set Your file path
$myfile = Yii::app()->file->set(Yii::app()->basePath.'/../uploads/documents/'.$_GET['file'], true);
if (Yii::app()->file->set(Yii::app()->basePath.'/../uploads/documents/'.$_GET['file'])->exists){
$myf... |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | As of now `Nexus` doesn't support `CocoaPods`:
<https://issues.sonatype.org/browse/NEXUS-9733>
And `Artifactory` does (since v.4.5):
<https://www.jfrog.com/confluence/display/RTF/Artifactory+4.5>
More information according different repositories features could be found on this feature matrix: <http://binary-repositori... | As of 7/2/2015,
Nexus doesn't have support yet for Cocoapods.
They might consider adding it for Nexus 3 eventually if there is enough demand.
-> from their tech support.
I'm looking for a workaround for it.. |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | As of 7/2/2015,
Nexus doesn't have support yet for Cocoapods.
They might consider adding it for Nexus 3 eventually if there is enough demand.
-> from their tech support.
I'm looking for a workaround for it.. | Sonatype Nexus 3 added Cocoapods support from NXRM 3.19.0 |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | Nexus 3.19.0 now supporting Cocoapods and Conda:
<https://blog.sonatype.com/cocoapods-conda-in-nexus-repository>
More detailed set up here: <https://help.sonatype.com/repomanager3/formats/cocoapods-repositories> | As of 7/2/2015,
Nexus doesn't have support yet for Cocoapods.
They might consider adding it for Nexus 3 eventually if there is enough demand.
-> from their tech support.
I'm looking for a workaround for it.. |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | As of now `Nexus` doesn't support `CocoaPods`:
<https://issues.sonatype.org/browse/NEXUS-9733>
And `Artifactory` does (since v.4.5):
<https://www.jfrog.com/confluence/display/RTF/Artifactory+4.5>
More information according different repositories features could be found on this feature matrix: <http://binary-repositori... | Sonatype Nexus 3 added Cocoapods support from NXRM 3.19.0 |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | As of now `Nexus` doesn't support `CocoaPods`:
<https://issues.sonatype.org/browse/NEXUS-9733>
And `Artifactory` does (since v.4.5):
<https://www.jfrog.com/confluence/display/RTF/Artifactory+4.5>
More information according different repositories features could be found on this feature matrix: <http://binary-repositori... | Nexus 3.19.0 now supporting Cocoapods and Conda:
<https://blog.sonatype.com/cocoapods-conda-in-nexus-repository>
More detailed set up here: <https://help.sonatype.com/repomanager3/formats/cocoapods-repositories> |
30,916,549 | In my company we do not have open internet access, so to develop the applications that depends of many dependences using a corporative Nexus.
In this Nexus we have mavencentral, jcenter, npmjs and others repository proxies. But we are starting to developing for iOS, and we want to use CocoaPods, but, first of all I ha... | 2015/06/18 | [
"https://Stackoverflow.com/questions/30916549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/771740/"
] | Nexus 3.19.0 now supporting Cocoapods and Conda:
<https://blog.sonatype.com/cocoapods-conda-in-nexus-repository>
More detailed set up here: <https://help.sonatype.com/repomanager3/formats/cocoapods-repositories> | Sonatype Nexus 3 added Cocoapods support from NXRM 3.19.0 |
359,689 | I am trying to get the **real time stdout** from a command I am running in a docker container. However, I need to do this from a remote command run from another host.
When I am on the docker host I can run my docker command with `-it` and get the real time output I need. However, I have this constraint where I **have*... | 2017/04/18 | [
"https://unix.stackexchange.com/questions/359689",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/195962/"
] | Figured this out from some help on Docker's github. I failed to mention I was trying to run a python script in the container, but I didn't think it was important.
This was actually not a docker problem, but a python issue. I learned **Docker already does provide stdout in realtime**. Python was holding all the stdout ... | Well why don't you use ELK stack with logsprout you can get real time logs from all docker containers plus you can search among the logs and lot of other cool stuffs |
34,012,492 | How do i pass an uri from the onActivity result to another method in the same jave file.
```
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
if (requestCode == PICK_FROM_GALLERY) {
Uri mVideoURI = data.getData();
video... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34012492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5315212/"
] | As per my understanding from your question, you have to call a method after getting a result from another activity. so you might be called `startActivitForResult(activityB)` for getting the video Uri. so you will get a callback from the `activityB`, thus you can directly pass the video to the method `saveVideo()` since... | In your code, you are only creating new file on your destination path but not write the data of source file to destination file.
So you are getting 0KB file. Use the below code code for writing a file.
```
void savefile(URI sourceuri)
{
String sourceFilename= sourceuri.getPath();
String destinationFilename = android.... |
34,012,492 | How do i pass an uri from the onActivity result to another method in the same jave file.
```
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
if (requestCode == PICK_FROM_GALLERY) {
Uri mVideoURI = data.getData();
video... | 2015/12/01 | [
"https://Stackoverflow.com/questions/34012492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5315212/"
] | use this code-
```
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
if (requestCode == PICK_FROM_GALLERY) {
Uri mVideoURI = data.getData();
saveVideo(mVideoURI); // methode to save uri gets called here
... | In your code, you are only creating new file on your destination path but not write the data of source file to destination file.
So you are getting 0KB file. Use the below code code for writing a file.
```
void savefile(URI sourceuri)
{
String sourceFilename= sourceuri.getPath();
String destinationFilename = android.... |
198,353 | I am working on a custom template which is being used inside a Content Search WebPart inside my team site collection. now the display template provide the ability to render a dialog beside each item , when users clicks on "...", as follow:-
[](https:/... | 2016/11/01 | [
"https://sharepoint.stackexchange.com/questions/198353",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/84413/"
] | Try add your`CommentOWSMTXT` at first place `<mso:ManagedPropertyMapping msdt:dt="string">'CommentOWSMTXT','ListID','ListItemID', ...`
then save item.html display template.
Go to your page where is cswp and edit page, edit webpart and **change control and item to different ones** and click **apply** wp settings.
Af... | You need to add your managed property mapping as below:
```
<mso:ManagedPropertyMapping msdt:dt="string">ListID','ListItemID','CommentOWSMTXT','ContentTypeId','Link URL':'Path','Property 1':'Title','Property 2':'','Property 3':'','Property 4:'','Property 5':'','Property 6':'','Property 7':'','Property 8':'','Property ... |
161,119 | How is programming a quantum algorithm different? What would a C like language look like if it was designed for qubits? Would types change? | 2012/08/16 | [
"https://softwareengineering.stackexchange.com/questions/161119",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/54384/"
] | When I looked into this some time ago, it was clear that quantum algorithms, while not particularly fast, permit exponentially massive parallelism.
So they will shine in cases involving search in spaces that are not practical with sequential hardware, even massively parallel sequential hardware.
One property of quantu... | >
> What would a C like language look like if it was designed for qubits? Would types change?
>
>
>
It would be so drastically different as to be incomprehensible as C.
The main issue (as I understand it) is that quantum computing does not work in a nice imperative manner 'do this, then that, then this other thin... |
161,119 | How is programming a quantum algorithm different? What would a C like language look like if it was designed for qubits? Would types change? | 2012/08/16 | [
"https://softwareengineering.stackexchange.com/questions/161119",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/54384/"
] | >
> What would a C like language look like if it was designed for qubits? Would types change?
>
>
>
It would be so drastically different as to be incomprehensible as C.
The main issue (as I understand it) is that quantum computing does not work in a nice imperative manner 'do this, then that, then this other thin... | In order to make the most effective possible use of a quantum computer, one needs to be able to deal with inputs and outputs that are states of a quantum register, for which there is really no classical analogue. Speaking from some years of experience in the field of quantum information, I must warn you that no one rea... |
161,119 | How is programming a quantum algorithm different? What would a C like language look like if it was designed for qubits? Would types change? | 2012/08/16 | [
"https://softwareengineering.stackexchange.com/questions/161119",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/54384/"
] | When I looked into this some time ago, it was clear that quantum algorithms, while not particularly fast, permit exponentially massive parallelism.
So they will shine in cases involving search in spaces that are not practical with sequential hardware, even massively parallel sequential hardware.
One property of quantu... | In order to make the most effective possible use of a quantum computer, one needs to be able to deal with inputs and outputs that are states of a quantum register, for which there is really no classical analogue. Speaking from some years of experience in the field of quantum information, I must warn you that no one rea... |
27,100,528 | end web developer, i was given a CMS done from another team and i have to link with my front-end. I have made some modifications, but due to my lack of php knowledge i have some issue here.
My users are able to fill up a form, where 1 text field is asking for their photo link. I want to check for if the value entered... | 2014/11/24 | [
"https://Stackoverflow.com/questions/27100528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3928648/"
] | If the Radioboxes are on UserForm then if you want to check their value then 1. the UserForm must be loaded at that time and 2. you need to refer to the UserForm.
Example:
```
if UserForm1.OptionButton1.Value = true then
```
The radiobox (OptionButton1 in my example) is member of UserForm and not of ThisWorkbook. | As written by Matteo NNZ I was simply referencing the label and not the radiobutton next to it.
No problem what so ever, as the code above works fine. |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | I wouldn't do that, actually. Use the comments of the reviewers of the first journal to improve the paper as usual. Simply submit the revised paper to the other journal.
It is actually better that they look at it with a fresh viewpoint, rather than having their view possibly clouded by the opinions of others. Let you... | Don't do this. What'd you actually highlight would be:
* Your paper has been rejected by another journal before (not a good sign; think of it as "if we publish it now, we're actually publishing another journal's rejects, and we're supposed to be a good journal!!")
* You're not acting professionally. It seems like you'... |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | I wouldn't do that, actually. Use the comments of the reviewers of the first journal to improve the paper as usual. Simply submit the revised paper to the other journal.
It is actually better that they look at it with a fresh viewpoint, rather than having their view possibly clouded by the opinions of others. Let you... | Depending on the field, your approach might be beneficial.
1. If the pool of potential reviewers is small, a reviewer might reject a paper he already rejected for the IEEE Transaction of XXX without having a closer look.
2. The editor can scan through the comments from the last review process and estimate how far your... |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | I wouldn't do that, actually. Use the comments of the reviewers of the first journal to improve the paper as usual. Simply submit the revised paper to the other journal.
It is actually better that they look at it with a fresh viewpoint, rather than having their view possibly clouded by the opinions of others. Let you... | Keep this very clearly in mind: **The referee reports from your initial submission should be considered, by default, as confidential communications between you and the initial journal. You cannot send them to the new journal without explicit written authorization from the editor of the initial journal.**
(This isn't ... |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | Don't do this. What'd you actually highlight would be:
* Your paper has been rejected by another journal before (not a good sign; think of it as "if we publish it now, we're actually publishing another journal's rejects, and we're supposed to be a good journal!!")
* You're not acting professionally. It seems like you'... | Depending on the field, your approach might be beneficial.
1. If the pool of potential reviewers is small, a reviewer might reject a paper he already rejected for the IEEE Transaction of XXX without having a closer look.
2. The editor can scan through the comments from the last review process and estimate how far your... |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | Don't do this. What'd you actually highlight would be:
* Your paper has been rejected by another journal before (not a good sign; think of it as "if we publish it now, we're actually publishing another journal's rejects, and we're supposed to be a good journal!!")
* You're not acting professionally. It seems like you'... | Keep this very clearly in mind: **The referee reports from your initial submission should be considered, by default, as confidential communications between you and the initial journal. You cannot send them to the new journal without explicit written authorization from the editor of the initial journal.**
(This isn't ... |
118,541 | I submitted my paper in IEEE Transcations of XXX and got a rejection. But the comments were really helpful and has helped me a lot in improving the paper. But, unfortunately, I cannot resubmit that paper to this same journal again and now I am looking for another journal.
I am writing a proper response again every co... | 2018/10/16 | [
"https://academia.stackexchange.com/questions/118541",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/90720/"
] | Keep this very clearly in mind: **The referee reports from your initial submission should be considered, by default, as confidential communications between you and the initial journal. You cannot send them to the new journal without explicit written authorization from the editor of the initial journal.**
(This isn't ... | Depending on the field, your approach might be beneficial.
1. If the pool of potential reviewers is small, a reviewer might reject a paper he already rejected for the IEEE Transaction of XXX without having a closer look.
2. The editor can scan through the comments from the last review process and estimate how far your... |
3,975,420 | Basically, I have a search box. Once clicked, the value within the search box would be sanitize and then redirects as a Get Var rather than a Post.
I have one method of taking the User's Input value and redirecting to what they want to search (But it turns into a Post Method).
I want to achieve the following:
1. Use... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3975420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/182731/"
] | This provides [`ValidationRule`](http://msdn.microsoft.com/en-us/library/system.windows.controls.validationrule.aspx) with C# example code. Also, [this](https://stackoverflow.com/q/1192751/82449) answer might help. | If you dont want to use binding you can simple catch the LostFocus event and there implement your validation rules. |
3,975,420 | Basically, I have a search box. Once clicked, the value within the search box would be sanitize and then redirects as a Get Var rather than a Post.
I have one method of taking the User's Input value and redirecting to what they want to search (But it turns into a Post Method).
I want to achieve the following:
1. Use... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3975420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/182731/"
] | You can set Binding in Code also.
1- Create a new validation rule class as shown below.
```
public class TextBoxEmptyRule : ValidationRule
{
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
{
ValidationResult vr = new ValidationResult(true,null);
... | This provides [`ValidationRule`](http://msdn.microsoft.com/en-us/library/system.windows.controls.validationrule.aspx) with C# example code. Also, [this](https://stackoverflow.com/q/1192751/82449) answer might help. |
3,975,420 | Basically, I have a search box. Once clicked, the value within the search box would be sanitize and then redirects as a Get Var rather than a Post.
I have one method of taking the User's Input value and redirecting to what they want to search (But it turns into a Post Method).
I want to achieve the following:
1. Use... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3975420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/182731/"
] | You can set Binding in Code also.
1- Create a new validation rule class as shown below.
```
public class TextBoxEmptyRule : ValidationRule
{
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
{
ValidationResult vr = new ValidationResult(true,null);
... | If you dont want to use binding you can simple catch the LostFocus event and there implement your validation rules. |
4,384,606 | I need to caluclate the time needed for a given point **A** (x,y) to move out of the given circle **B** (x,y,r). The speed of the point **A** is given by the change of **x** and **y** per second.
At the beginning I calculated if the point **A** is even in circle **B**, which was not hard given the formular: $$(x\_A - ... | 2022/02/17 | [
"https://math.stackexchange.com/questions/4384606",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1026720/"
] | Hint: assuming that point $A$ is inside the circle and $\Delta x$, $\Delta y$ do not change over time, we need to solve the quadratic equation: $(x\_A + t\Delta x - x\_B)^2 + (y\_A + t\Delta y - y\_B)^2 = r^2$ or $$t^2\left((\Delta x)^2+(\Delta y)^2\right)+2t\left(\Delta x(x\_A-x\_B)+\Delta y(y\_A-y\_B)\right)+(x\_A-x\... | HINT:
Expand the left hand side of the inequality to get a quadratic equation with the variable $t$, and the coefficients in terms of $\Delta x, \Delta y, x, y$. Subtract $r^2$ from both sides to get an inequality in the form:
\begin{equation}
ax^2+bx+c-r^2<0
\end{equation}
Because $a$ would be positive, the interval ... |
114,573 | I need to create Labyrinth style logo, but with the text "Puzzled Pint" for the small event I'm hosting. It should be similar to this:[](https://i.stack.imgur.com/lCvyR.png)
Does anyone have any tutorial? Or even some advice?
I extracted the gradient and now I'm l... | 2018/09/03 | [
"https://graphicdesign.stackexchange.com/questions/114573",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/126667/"
] | Photoshop:
The gloss isn't only a gradient, it has a darker shape to make an illusion of curved surface and a reflection from the horizon.
I skip the colors and goto the edges of the letters, as asked.
[](https://i.stack.imgur.com/rFIPn.jpg)
In the... | If you want to copy the style for your new wording you have 2 options (that I can think of).
1. You trace the font manually with the pen tool on illustrator and match the gradient.
2. If you find a very similar font but with sharp edges the type away, then expand the text (let me know if you need details where to find... |
114,573 | I need to create Labyrinth style logo, but with the text "Puzzled Pint" for the small event I'm hosting. It should be similar to this:[](https://i.stack.imgur.com/lCvyR.png)
Does anyone have any tutorial? Or even some advice?
I extracted the gradient and now I'm l... | 2018/09/03 | [
"https://graphicdesign.stackexchange.com/questions/114573",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/126667/"
] | Assuming you have access to Photoshop, then it could be achieved using layers and layer effects.
Here are a bunch of layer effects I added, a Bevel & Emboss effect, three Stroke effects, a Gradient Overlay, and Drop shadow. Your example is above for comparison. I also got the letters to overlap by adjusting the kernin... | If you want to copy the style for your new wording you have 2 options (that I can think of).
1. You trace the font manually with the pen tool on illustrator and match the gradient.
2. If you find a very similar font but with sharp edges the type away, then expand the text (let me know if you need details where to find... |
32,252,328 | I have console application which is doing multiple API requests over HTTPs.
When running in single thread it can do maximum of about 8 API requests / seconds.
Server which is receiving API calls has lots of free resources, so it should be able to handle many more than 8 / sec.
Also when I run multiple instances of... | 2015/08/27 | [
"https://Stackoverflow.com/questions/32252328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2564328/"
] | @theMayer is kinda-sorta correct. It's possible that your call to apiRequest is what's blocking and making the whole expression seem synchronous...
However... you're iterating over each task and calling task.Result, which will block until the task completes in order to print it to the screen. So, for example, all tas... | There could be a couple of things going on.
First, the .net `ServicePoint` class allows a maximum number of 2 connections per host by default. See [this Stack Overflow question/answer](https://stackoverflow.com/questions/2960056/trying-to-run-multiple-http-requests-in-parallel-but-being-limited-by-windows).
Second, yo... |
62,547,218 | I got a problem with Flutter Textfield like below, could you please give me suggestion to fix it. I try to new project like below gif, but the same bug.
Thanks in advance.
Steps to Reproduce
------------------
1. Type something to `TextField`
2. Move `Cursor` to beginning of this `textfield`.
3. Tap to end of text (... | 2020/06/24 | [
"https://Stackoverflow.com/questions/62547218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5034704/"
] | It really depends on the context, but generally, the `className` prop is passed down from parent to child to either overwrite, or append the existing `className` on the child component.
This is particularly useful in the scenario when you are building **reusable** base components which needed to be easily extended and... | You generally add classes to create a style or JavaScript code snippet that effects more than one element. [Here is an explanation of how to use classes](https://www.w3schools.com/howto/howto_js_add_class.asp).
This particular component uses StyledComponent, but it's possible that the user wanted to add a class to [ad... |
133,917 | How many solutions does the following equation have:
$x\_1+2x\_2+3x\_3+4x\_4+5x\_5+6x\_6+7x\_7+8x\_8+9x\_9+10x\_{10}\equiv0\mod11$
where
$x\_{1...9} \in \{0,1,2,3,4\ ...\ 8,9\}$ and $x\_{10}\in\{0,1,2,3,4\ ...\ 9,10\}$?
I've being trying to solve the equation with generating functions. The closed form that I've arr... | 2012/04/19 | [
"https://math.stackexchange.com/questions/133917",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/27085/"
] | Rewrite it as
$$10x\_{10} \equiv -x\_1 - \ldots - 9x\_9 ~\text{mod}~ 11.$$
Since $10 \in (\mathbb{Z}/11\mathbb{Z})^\*$, this equation has exactly one solution for each choice of $x\_1,\ldots,x\_9$, namely $x\_{10} := x\_1 + \ldots + 9x\_9 ~ \text{mod}~ 11$. So in total there are $10^9$ solutions.
**Edit:** Clarificati... | Pick the first $9$ of the $x\_i$ arbitrarily among the $10$ available choices modulo $11$. This gives $10^9$ possibilities for the first $9$ $x\_i$. Now $x\_{10}$ is completely determined modulo $11$, since $10$ is relatively prime to $11$. Indeed, since $10\equiv -1\pmod{11}$, we find that
$$x\_{10}\equiv x\_1+2x\_... |
8,247,115 | I have the latest opensc 0.12.2 running on ubuntu 11.10 with OpenJDK ( java version "1.6.0\_22")
I can read my smartcard (a Feitian ePass PKI) with
```
pkcs15-tool --dump
```
Now i try to use my smartcard with keytool:
```
keytool
-providerClass sun.security.pkcs11.SunPKCS11 \
-providerArg /etc/opensc/opens... | 2011/11/23 | [
"https://Stackoverflow.com/questions/8247115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/351758/"
] | I got the same problem today and I digged onto the java sources until I found the source of the problem. I know this question is quite old and already have an accepted answer, but that one is not a real answer.
Basically, the SunPKCS11 provider does list all available slots, then, get the slot you specified in your co... | I can confirm this behavior using java JDK 1.6.0\_20
Even a simple java program **only works** with -Djava.security.debug=sunpkcs11 set.
```
String configName = "/etc/pkcs11_java.cfg";
Provider p = new sun.security.pkcs11.SunPKCS11(configName);
keyStore = KeyStore.getInstance("PKCS11", p);
```
with /etc/pkcs11\_ja... |
8,247,115 | I have the latest opensc 0.12.2 running on ubuntu 11.10 with OpenJDK ( java version "1.6.0\_22")
I can read my smartcard (a Feitian ePass PKI) with
```
pkcs15-tool --dump
```
Now i try to use my smartcard with keytool:
```
keytool
-providerClass sun.security.pkcs11.SunPKCS11 \
-providerArg /etc/opensc/opens... | 2011/11/23 | [
"https://Stackoverflow.com/questions/8247115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/351758/"
] | I got the same problem today and I digged onto the java sources until I found the source of the problem. I know this question is quite old and already have an accepted answer, but that one is not a real answer.
Basically, the SunPKCS11 provider does list all available slots, then, get the slot you specified in your co... | Adding the debug flag to the command line worked for me:
```
keytool -providerClass sun.security.pkcs11.SunPKCS11 \
-providerArg /home/hans/Desktop/smartcards/opensc-java.cfg \
-providerName SunPKCS11-OpenSC -keystore NONE -storetype PKCS11 \
-list \
-J-Djava.security.debug=sunpkcs11
```
Or manually specifyi... |
8,450,225 | I've got a horizontal list with long items that I want to wrap. The list wraps fine if one list item is really long or if all the list items are really short.
However, if two list items are both long, they will not split across the available space. This image shows the problem:

See <http://jsfiddle.net/pRCFR/> |
53,683,349 | I want to add user metadata to WordPress, it should store only numbers, these numbers should support addition and subtraction
Please, how do I add it
The default value should be 0 | 2018/12/08 | [
"https://Stackoverflow.com/questions/53683349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10744100/"
] | You can use an Internal Load Balancer (ILB) in Azure, which is just like a regular load balancer but with only private IP's from the same VNET where AKS is deployed (thus, no public IP's). It uses the annotation:
`annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"`
as described in this [art... | It's a solution with Calico on AWS:
<https://docs.aws.amazon.com/eks/latest/userguide/calico.html> |
53,683,349 | I want to add user metadata to WordPress, it should store only numbers, these numbers should support addition and subtraction
Please, how do I add it
The default value should be 0 | 2018/12/08 | [
"https://Stackoverflow.com/questions/53683349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10744100/"
] | Finally, this is the right solution:
<https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/whitelist>
If use [nginx-ingress](https://github.com/helm/charts/tree/master/stable/nginx-ingress), install with this setting:
```
helm install stable/nginx-ingress \
--set controller.servic... | It's a solution with Calico on AWS:
<https://docs.aws.amazon.com/eks/latest/userguide/calico.html> |
37,294 | I love pho and will soon try making it myself using an authentic Vietnamese recipe. I'm clear on all of the other ingredients and techniques, but "yellow rock sugar" has me stumped. Is [this](http://rads.stackoverflow.com/amzn/click/B005FAC3QY) what the recipe means? If so, does it really taste different from regular s... | 2013/10/03 | [
"https://cooking.stackexchange.com/questions/37294",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20183/"
] | What's in the picture looks about right. This brand is commonly found in Asian grocery stores around here:  (your mileage may vary). It is essentially crystallized cane sugar. If you really can't find it, you could probably substitute regular sugar. Th... | Unprocessed lump sugar is readily available in our area of madison /sun prairie wi. Woodman's, multiple Asian groceries, you may even be able to use Mexican piloncillo. That tastes similar or same, but I think it may be harder?? I wouldn't use brown sugar, sugar in the raw and definitely not white sugar, the yellow roc... |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | One has $$(2x-y+5)^8 = \sum\_{i=0}^8 {8 \choose i} (2x-y)^i 5^{8-i} = \sum\_{i=0}^8 {8 \choose i} 5^{8-i}\sum\_{j=0}^i {i\choose j} (2x)^jy^{i-j}(-1)^{i-j}.$$
Then, one gets the coefficient of $x^3y^4$ is $${8 \choose 7}5^{8-7}{7\choose 3}2^3.$$ | HINT:
The $r,0\le r\le8$th term of $$(2x-y+5)^8=\{(2x+5)-y\}^8$$ is $$\binom8ry^{8-r}(2x+5)^{8-r}(-y)^r$$
So, we need $r=4$
So, we focus on $$\binom84y^{8-4}(2x+5)^{8-4}(-y)^4$$
Now the $n,0\le n\le4$th term of $$(2x+5)^4$$ is $$\binom4n(2x)^{4-n}5^n$$
We need $4-n=3$ |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Notice, the binomial expansion $$(2x-y+5)^8=^{8}C\_0(2x-y)^85^0+\color{red}{^{8}C\_1(2x-y)^75^1}+^{8}C\_2(2x-y)^65^2+^{8}C\_3(2x-y)^55^3+^{8}C\_4(2x-y)^45^4+\dots +^{8}C\_8(2x-y)^05^8$$
In the given term $x^3y^4$, the sum of powers $3+4=7$ hence in the above expansion there is only one term $^{8}C\_1(2x-y)^75^1$ which... | HINT:
The $r,0\le r\le8$th term of $$(2x-y+5)^8=\{(2x+5)-y\}^8$$ is $$\binom8ry^{8-r}(2x+5)^{8-r}(-y)^r$$
So, we need $r=4$
So, we focus on $$\binom84y^{8-4}(2x+5)^{8-4}(-y)^4$$
Now the $n,0\le n\le4$th term of $$(2x+5)^4$$ is $$\binom4n(2x)^{4-n}5^n$$
We need $4-n=3$ |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Pre-expansion, there are $8$ factors of $2x - y + 5$.
From those $8$ factors, choose the $3$ that contribute to the $x^3$, from the remaining $5$ factors, choose the $4$ that will contribute to $y^4$. There is only 1 factor left so it chooses itself.
Post-expansion, that's ${8 \choose 3}{5 \choose 4}{1 \choose 1}$ te... | HINT:
The $r,0\le r\le8$th term of $$(2x-y+5)^8=\{(2x+5)-y\}^8$$ is $$\binom8ry^{8-r}(2x+5)^{8-r}(-y)^r$$
So, we need $r=4$
So, we focus on $$\binom84y^{8-4}(2x+5)^{8-4}(-y)^4$$
Now the $n,0\le n\le4$th term of $$(2x+5)^4$$ is $$\binom4n(2x)^{4-n}5^n$$
We need $4-n=3$ |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | HINT:
The $r,0\le r\le8$th term of $$(2x-y+5)^8=\{(2x+5)-y\}^8$$ is $$\binom8ry^{8-r}(2x+5)^{8-r}(-y)^r$$
So, we need $r=4$
So, we focus on $$\binom84y^{8-4}(2x+5)^{8-4}(-y)^4$$
Now the $n,0\le n\le4$th term of $$(2x+5)^4$$ is $$\binom4n(2x)^{4-n}5^n$$
We need $4-n=3$ | You can also solve it using the [multinomial theorem.](https://en.wikipedia.org/wiki/Multinomial_theorem) |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Pre-expansion, there are $8$ factors of $2x - y + 5$.
From those $8$ factors, choose the $3$ that contribute to the $x^3$, from the remaining $5$ factors, choose the $4$ that will contribute to $y^4$. There is only 1 factor left so it chooses itself.
Post-expansion, that's ${8 \choose 3}{5 \choose 4}{1 \choose 1}$ te... | One has $$(2x-y+5)^8 = \sum\_{i=0}^8 {8 \choose i} (2x-y)^i 5^{8-i} = \sum\_{i=0}^8 {8 \choose i} 5^{8-i}\sum\_{j=0}^i {i\choose j} (2x)^jy^{i-j}(-1)^{i-j}.$$
Then, one gets the coefficient of $x^3y^4$ is $${8 \choose 7}5^{8-7}{7\choose 3}2^3.$$ |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | One has $$(2x-y+5)^8 = \sum\_{i=0}^8 {8 \choose i} (2x-y)^i 5^{8-i} = \sum\_{i=0}^8 {8 \choose i} 5^{8-i}\sum\_{j=0}^i {i\choose j} (2x)^jy^{i-j}(-1)^{i-j}.$$
Then, one gets the coefficient of $x^3y^4$ is $${8 \choose 7}5^{8-7}{7\choose 3}2^3.$$ | You can also solve it using the [multinomial theorem.](https://en.wikipedia.org/wiki/Multinomial_theorem) |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Pre-expansion, there are $8$ factors of $2x - y + 5$.
From those $8$ factors, choose the $3$ that contribute to the $x^3$, from the remaining $5$ factors, choose the $4$ that will contribute to $y^4$. There is only 1 factor left so it chooses itself.
Post-expansion, that's ${8 \choose 3}{5 \choose 4}{1 \choose 1}$ te... | Notice, the binomial expansion $$(2x-y+5)^8=^{8}C\_0(2x-y)^85^0+\color{red}{^{8}C\_1(2x-y)^75^1}+^{8}C\_2(2x-y)^65^2+^{8}C\_3(2x-y)^55^3+^{8}C\_4(2x-y)^45^4+\dots +^{8}C\_8(2x-y)^05^8$$
In the given term $x^3y^4$, the sum of powers $3+4=7$ hence in the above expansion there is only one term $^{8}C\_1(2x-y)^75^1$ which... |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Notice, the binomial expansion $$(2x-y+5)^8=^{8}C\_0(2x-y)^85^0+\color{red}{^{8}C\_1(2x-y)^75^1}+^{8}C\_2(2x-y)^65^2+^{8}C\_3(2x-y)^55^3+^{8}C\_4(2x-y)^45^4+\dots +^{8}C\_8(2x-y)^05^8$$
In the given term $x^3y^4$, the sum of powers $3+4=7$ hence in the above expansion there is only one term $^{8}C\_1(2x-y)^75^1$ which... | You can also solve it using the [multinomial theorem.](https://en.wikipedia.org/wiki/Multinomial_theorem) |
1,456,068 | Let $A,B,C,D \subseteq X$
Show that
$(A \setminus B ) \bigtriangleup (C \setminus D) \subseteq (A \bigtriangleup C) \cup (B \bigtriangleup D)$
My advances
$(A \setminus B ) \bigtriangleup (C \setminus D) $
$\rightarrow \left [ (A \setminus B ) \cap (C \cap D^{c} )^{c} \right ] \cup$
$\left [ (C \setminus D ) \cap... | 2015/09/29 | [
"https://math.stackexchange.com/questions/1456068",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/254420/"
] | Pre-expansion, there are $8$ factors of $2x - y + 5$.
From those $8$ factors, choose the $3$ that contribute to the $x^3$, from the remaining $5$ factors, choose the $4$ that will contribute to $y^4$. There is only 1 factor left so it chooses itself.
Post-expansion, that's ${8 \choose 3}{5 \choose 4}{1 \choose 1}$ te... | You can also solve it using the [multinomial theorem.](https://en.wikipedia.org/wiki/Multinomial_theorem) |
23,273,721 | I am attempting to create a simple pager within Drupal 7 on `page.tpl.php` within my theme.
The aim of the pager is to show 5 'courses' per page, with a pager at the bottom.
After scrounging around online, this is the best I could get, which shows the first 5 items, and no pager:
```
$query = db_select('node', 'n')
... | 2014/04/24 | [
"https://Stackoverflow.com/questions/23273721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2076229/"
] | Managed to fix the issue I had by specifying the element, element 0 was already in use (hence it not working) changing to element 1 fixed it, I just changed
`$output .= theme('pager');`
to
`$output .= theme('pager', array('element' => 1));`
It seems that pager ID 0 was used by Views, by enabling the Archive bloc... | For rendering pager with some query, you need call `$query = $query->extend('PagerDefault')->limit(5);` before execute it. |
24,850,460 | I'm trying to copy a sqlite database from the data folder in my extension directory, to the profile folder, in order to use it.
So for now, I'm trying with that:
```
const {Cc, Ci, Cu} = require("chrome");
const {NetUtils} = Cu.import("resource://gre/modules/NetUtil.jsm");
const data = require('sdk/self').data;
Cu.im... | 2014/07/20 | [
"https://Stackoverflow.com/questions/24850460",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3855461/"
] | Besides that it uses sync I/O (opening the channel with `.open` instead of `.asyncOpen`), the `NetUtil.asyncCopy` operation is still async, meaning the code
```
NetUtil.asyncCopy(istream, ostream, function(aResult) {
console.log(aResult); // return 0
})
console.log(FileUtils.getFile("ProfD", ["searchEngines.sqlite"... | Try using OS.File it's much more straight forward.
```
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm")
var fromPath = FileUtils.getFile("ProfD", ["searchEngines.sqlite"]).path;
var toPath = FileUtils.getFile("TmpD", ["searchEngines.sqlite"]).path;;
var promise = OS.Fil... |
7,436,020 | I'm implementing a drop down for iPhone. The image looks like this:
[5px corners][1 px stretchable area][10px arrow with corners]
I'd like to use something like:
```
UIButton *dd = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 20)];
dd.autoresizingMask=UIViewAutoresizingFlexibleWidth;
[dd setBackgroundImag... | 2011/09/15 | [
"https://Stackoverflow.com/questions/7436020",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/156196/"
] | The next pixel after the leftcap is the only thing that is stretched horizontally. Therefore the 10 pixels on the right are preserved with their original size, and there is no point in having a right cap.
If there is any distortion on your image is due to something else. This should work:
```
UIButton *dd = [UIButto... | The reason why you would still see distortion is because the original image is wider than the width that you are specifying (or height if the distortion is vertical). E.g. if you want a button with a width of 200px but the original image is 300px wide you will see distortion even while using it as a stretchable image. ... |
34,134,300 | I have a setup where I've get a WebApi OData service which returns: Customers. The code for returning the customers is:
```cs
public IHttpActionResult GetCustomers(ODataQueryOptions<Customer> queryOptions)
{
return Ok(context.Customers.Where(i => i.IsActive).AsQueryable());
}
```
So the GetCustomers method retu... | 2015/12/07 | [
"https://Stackoverflow.com/questions/34134300",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/297183/"
] | Data model:
```
public class Customer
{
public int Id { get; set; }
public bool IsActive { get; set; }
public ICollection<Contact> Contacts { get; set; }
}
public class Contact
{
public int Id { get; set; }
public bool IsActive { get; set; }
}
```
Controller with canned data:
```
public class C... | One possible solution is to add *Views* to represent the data you actually want to expose.
You can have *Customer* and *Contact* *Views* which are just filtered versions of the original table.
Back on the C# side, your models can directly reference the *Views* as if they were tables.
The nice thing is that they will... |
34,134,300 | I have a setup where I've get a WebApi OData service which returns: Customers. The code for returning the customers is:
```cs
public IHttpActionResult GetCustomers(ODataQueryOptions<Customer> queryOptions)
{
return Ok(context.Customers.Where(i => i.IsActive).AsQueryable());
}
```
So the GetCustomers method retu... | 2015/12/07 | [
"https://Stackoverflow.com/questions/34134300",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/297183/"
] | [EntityFramework.DynamicFilters](https://github.com/jcachat/EntityFramework.DynamicFilters) is one of the greatest tools for Entity Framework that I know. It jumped into the gap of the often-requested but up to EF6 never implemented feature of filtered `Incude`s. It leans on EF's interception API and does the heavy lif... | One possible solution is to add *Views* to represent the data you actually want to expose.
You can have *Customer* and *Contact* *Views* which are just filtered versions of the original table.
Back on the C# side, your models can directly reference the *Views* as if they were tables.
The nice thing is that they will... |
34,134,300 | I have a setup where I've get a WebApi OData service which returns: Customers. The code for returning the customers is:
```cs
public IHttpActionResult GetCustomers(ODataQueryOptions<Customer> queryOptions)
{
return Ok(context.Customers.Where(i => i.IsActive).AsQueryable());
}
```
So the GetCustomers method retu... | 2015/12/07 | [
"https://Stackoverflow.com/questions/34134300",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/297183/"
] | [EntityFramework.DynamicFilters](https://github.com/jcachat/EntityFramework.DynamicFilters) is one of the greatest tools for Entity Framework that I know. It jumped into the gap of the often-requested but up to EF6 never implemented feature of filtered `Incude`s. It leans on EF's interception API and does the heavy lif... | Data model:
```
public class Customer
{
public int Id { get; set; }
public bool IsActive { get; set; }
public ICollection<Contact> Contacts { get; set; }
}
public class Contact
{
public int Id { get; set; }
public bool IsActive { get; set; }
}
```
Controller with canned data:
```
public class C... |
20,347,587 | I am making a program in Delphi 7, that is supposed to encode a unicode string into html entity string.
For example, "`ABCģķī`" would result in "`ABCģķī`"
Now 2 basic things:
1. Delphi 7 is non-Unicode, so I can't just write unicode chars directly in code to encode them.
2. Codepages consist of 255 ent... | 2013/12/03 | [
"https://Stackoverflow.com/questions/20347587",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3060709/"
] | I suggest you avoid codepages like the plague.
There are two approaches for Unicode that I'd consider: WideString, and [UTF-8.](http://en.wikipedia.org/wiki/UTF-8)
Widestrings have the advantage that it's 'native' to Windows, which helps if you need to use Windows API calls. Disadvantages are storage space, and that... | In case I understood the OP correctly, I'll just leave this here.
```
function Entitties(const S: WideString): string;
var
I: Integer;
begin
Result := '';
for I := 1 to Length(S) do
begin
if Word(S[I]) > Word(High(AnsiChar)) then
Result := Result + '#' + IntToStr(Word(S[I])) + ';'
else
Resu... |
20,347,587 | I am making a program in Delphi 7, that is supposed to encode a unicode string into html entity string.
For example, "`ABCģķī`" would result in "`ABCģķī`"
Now 2 basic things:
1. Delphi 7 is non-Unicode, so I can't just write unicode chars directly in code to encode them.
2. Codepages consist of 255 ent... | 2013/12/03 | [
"https://Stackoverflow.com/questions/20347587",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3060709/"
] | In HTML 4, numeric character references are relative to the charset used by the HTML. Whether that charset is specified in the HTML itself via a `<meta>` tag, or out-of-band via an HTTP/MIME `Content-Type` header or other means, it does not matter. As such, `"ABCģķī"` would be an accurate representation ... | In case I understood the OP correctly, I'll just leave this here.
```
function Entitties(const S: WideString): string;
var
I: Integer;
begin
Result := '';
for I := 1 to Length(S) do
begin
if Word(S[I]) > Word(High(AnsiChar)) then
Result := Result + '#' + IntToStr(Word(S[I])) + ';'
else
Resu... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | We have a complete linq provider in [Signum Framework](http://www.signumframework.com/DatabaseQuery.ashx)
You can find the source [here](http://signum.codeplex.com/SourceControl/changeset/view/25903#510381) as well. (All the Linq subtree).
I'ld also take a look to [Wayward blog](http://blogs.msdn.com/mattwar/) | [LinqExtender](http://www.codeplex.com/LinqExtender) gives a way to get started with LINQ to anything without doing the complex Expression tree parsing. It gives out more or less easy data structure, without sacrificing things like projection , where , order by etc. Its still under development and a starting point coul... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | Our object database [db4o](http://www.db4o.com) comes with an open source LINQ provider. We even provide an implementation for CompactFramework. To my knowledge this is the only LINQ provider available for CompactFramework. | [LinqExtender](http://www.codeplex.com/LinqExtender) gives a way to get started with LINQ to anything without doing the complex Expression tree parsing. It gives out more or less easy data structure, without sacrificing things like projection , where , order by etc. Its still under development and a starting point coul... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | Our object database [db4o](http://www.db4o.com) comes with an open source LINQ provider. We even provide an implementation for CompactFramework. To my knowledge this is the only LINQ provider available for CompactFramework. | The [DbLinq](http://linq.to/db) project is working on linq2sql support for other databases, and is now [working with the Mono project](http://tirania.org/blog/archive/2008/Oct-01-2.html) to become a full System.Data.Linq implementation. |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | Our object database [db4o](http://www.db4o.com) comes with an open source LINQ provider. We even provide an implementation for CompactFramework. To my knowledge this is the only LINQ provider available for CompactFramework. | We have a complete linq provider in [Signum Framework](http://www.signumframework.com/DatabaseQuery.ashx)
You can find the source [here](http://signum.codeplex.com/SourceControl/changeset/view/25903#510381) as well. (All the Linq subtree).
I'ld also take a look to [Wayward blog](http://blogs.msdn.com/mattwar/) |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | LINQ to Amazon web services.
<http://linqinaction.net/files/folders/linqinaction/entry1952.aspx> | We have a complete linq provider in [Signum Framework](http://www.signumframework.com/DatabaseQuery.ashx)
You can find the source [here](http://signum.codeplex.com/SourceControl/changeset/view/25903#510381) as well. (All the Linq subtree).
I'ld also take a look to [Wayward blog](http://blogs.msdn.com/mattwar/) |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | There is another implementation "re-linq".
Have a look here:
* <http://www.re-motion.org/blogs/team/archive/2009/04/23/introducing-re-linq-a-general-purpose-linq-provider-infrastructure.aspx>
* <http://www.codeproject.com/KB/linq/relinqish_the_pain.aspx>
Hope it helps,
Patrick | I have a pseudo-LINQ provider: "[Push LINQ](http://msmvps.com/blogs/jon_skeet/archive/2008/01/04/quot-push-quot-linq-revisited-next-attempt-at-an-explanation.aspx)". It's like Parallel Extensions in that it changes how an existing in-memory data source is used, rather than bringing another actual data source into play.... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | Look at [LINQExtender](http://www.codeplex.com/LinqExtender) for an example of an extendable IQueryable implementation. It not only provides a good open source example, but you may find you could use that instead of developing an IQueryable implementation from scratch. | [LinqExtender](http://www.codeplex.com/LinqExtender) gives a way to get started with LINQ to anything without doing the complex Expression tree parsing. It gives out more or less easy data structure, without sacrificing things like projection , where , order by etc. Its still under development and a starting point coul... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | There is another implementation "re-linq".
Have a look here:
* <http://www.re-motion.org/blogs/team/archive/2009/04/23/introducing-re-linq-a-general-purpose-linq-provider-infrastructure.aspx>
* <http://www.codeproject.com/KB/linq/relinqish_the_pain.aspx>
Hope it helps,
Patrick | [LinqExtender](http://www.codeplex.com/LinqExtender) gives a way to get started with LINQ to anything without doing the complex Expression tree parsing. It gives out more or less easy data structure, without sacrificing things like projection , where , order by etc. Its still under development and a starting point coul... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | LINQ to Amazon web services.
<http://linqinaction.net/files/folders/linqinaction/entry1952.aspx> | I have a pseudo-LINQ provider: "[Push LINQ](http://msmvps.com/blogs/jon_skeet/archive/2008/01/04/quot-push-quot-linq-revisited-next-attempt-at-an-explanation.aspx)". It's like Parallel Extensions in that it changes how an existing in-memory data source is used, rather than bringing another actual data source into play.... |
174,585 | What's the best open source LINQ provider (in terms of completeness)?
I'm developing an open source LINQ provider myself and I'd like to borrow as many ideas as I can, avoid common pitfalls, etc.
Do not restrict yourself to database LINQ providers, any provider suggestion is welcome. | 2008/10/06 | [
"https://Stackoverflow.com/questions/174585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21239/"
] | Our object database [db4o](http://www.db4o.com) comes with an open source LINQ provider. We even provide an implementation for CompactFramework. To my knowledge this is the only LINQ provider available for CompactFramework. | Look at [LINQExtender](http://www.codeplex.com/LinqExtender) for an example of an extendable IQueryable implementation. It not only provides a good open source example, but you may find you could use that instead of developing an IQueryable implementation from scratch. |
147 | EIGRP and OSPF are both IGP protocols, the former is a mostly Cisco protocol and the latter is a well established open standard. What are the benefits of one over the other?
Put another way, when deploying a network, why choose one over the other? If you have mixed devices the choice would obviously be OSPF, but what ... | 2013/05/08 | [
"https://networkengineering.stackexchange.com/questions/147",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/29/"
] | EIGRP is now an IETF draft so it's no longer proprietary. See <https://datatracker.ietf.org/doc/html/draft-savage-eigrp-01>
If we look at EIGRP with default settings and OSPF with default settings and there are multiple loop free paths to a destination then EIGRP will converge much faster because it keeps what are cal... | You can read about the finer workings of these protocols for yourself, they are thoroughly documented on the Internet and it's a doddle to find information on them.
From a practicle perspective I would say that in the case of EIGRP vs OSPF, OSPF always wins for the following reasons:
**Convergence Speed**:
Everyone ... |
147 | EIGRP and OSPF are both IGP protocols, the former is a mostly Cisco protocol and the latter is a well established open standard. What are the benefits of one over the other?
Put another way, when deploying a network, why choose one over the other? If you have mixed devices the choice would obviously be OSPF, but what ... | 2013/05/08 | [
"https://networkengineering.stackexchange.com/questions/147",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/29/"
] | EIGRP is now an IETF draft so it's no longer proprietary. See <https://datatracker.ietf.org/doc/html/draft-savage-eigrp-01>
If we look at EIGRP with default settings and OSPF with default settings and there are multiple loop free paths to a destination then EIGRP will converge much faster because it keeps what are cal... | I would suggest the right answer is it depends on the topology of the network. OSPF requires area boundaries to do summarization, if you are doing a green field network or your topology is condusive to drawing areas out then by all means use it. If your network requires spokes to connect to multiple hubs, then OSPF is ... |
147 | EIGRP and OSPF are both IGP protocols, the former is a mostly Cisco protocol and the latter is a well established open standard. What are the benefits of one over the other?
Put another way, when deploying a network, why choose one over the other? If you have mixed devices the choice would obviously be OSPF, but what ... | 2013/05/08 | [
"https://networkengineering.stackexchange.com/questions/147",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/29/"
] | You can read about the finer workings of these protocols for yourself, they are thoroughly documented on the Internet and it's a doddle to find information on them.
From a practicle perspective I would say that in the case of EIGRP vs OSPF, OSPF always wins for the following reasons:
**Convergence Speed**:
Everyone ... | I would suggest the right answer is it depends on the topology of the network. OSPF requires area boundaries to do summarization, if you are doing a green field network or your topology is condusive to drawing areas out then by all means use it. If your network requires spokes to connect to multiple hubs, then OSPF is ... |
80,297 | I just updated to Thunderbird 8 (I use Mozilla's version, not Ubuntu's) on Ubuntu 11.04; and it seems it has changed its default skin/theme. Not sure how it looks under other OS', but under my Ubuntu, Thunderbird 7 looks like this:

... while Thunderbird 8 looks like t... | 2011/11/17 | [
"https://askubuntu.com/questions/80297",
"https://askubuntu.com",
"https://askubuntu.com/users/6808/"
] | It looks too good to be a bug, it looks like it just got better integration. anyway, just uninstall mozillas version, and reinstall whats in the ubuntu repos.
if you installed via a mozilla beta ppa, just purge the ppa and it should downgrade to TB7.
hope this helps you out
(EDIT) this can help you with purging/mana... | I now know what to do to fix my theme problem. Don't use Ubuntu version of Thunderbird.
For you; you could try installing gnome-tweak-tool and select a different GTK+ theme, but doubt you will like this as it is for all applications.
Installing a different theme may change it, but these (gnome, adwati) are now buggy ... |
38,378,569 | \*\* I'm using SSRS2008 R2
I have a report that the users would like to see in a printable pdf.
Problem is there are several columns, potentially too many to fit on a printed 8.5x11 paper.
One of the concepts they suggested was a stacked header/data display, like breaking the columns into 2 rows, so 2 rows of data (... | 2016/07/14 | [
"https://Stackoverflow.com/questions/38378569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2100149/"
] | try with below code this will work for me
```
AuthenticationContext authenticationContext = new AuthenticationContext(your - authserviceurl + your - tenantdomain);
UserCredential uc = new UserCredential(Api - username, Api - password);
token = authenticationContext.AcquireToken("https://management.core.windows.net/", ... | The following [reference document](https://msdn.microsoft.com/en-us/library/azure/dn499770.aspx) suggests that it should be possible.
>
> **URI Parameter**
>
>
> *location* - Optional. Returns VM Images from the specified location.The location parameter is only available using version 2014-05-01 or higher.
>
>
> |
31,976,216 | I have a form that look something like this:
```
= form_for(@user, :remote=> true, :url => @url, html: {role: :form, 'data-model' => @params_key}) do |f|
= button_tag 'Register', class: 'btn btn-primary submit-button', type: 'submit',
:data => {:disable_with => 'Bamm'}
```
When I press the button... | 2015/08/12 | [
"https://Stackoverflow.com/questions/31976216",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2032342/"
] | You are using [prompt()](https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt) correctly.
The problem is in the line below :
`if (guess < 0 || > 6) {`
should be
`if (guess < 0 || guess > 6){`
This error was stopping the JS before `prompt()` was called.
In the future, you should use the browser c... | +1 to the above comment.
Furthermore Kiyana, when you run your code, you'll notice that as long as the user's input is not <0 or >6, the alert("Hit!") and the alert("Miss!") are both appearing.
This has to do with the ordering of your code:
```
if (guess == location1 || guess == location2 || guess == location3){
... |
41,966,763 | I want to split a hybrid block and assign letters to each column separately:
```
M1 M2 M3 M4 hybrid_block S1 S2 S3 S4
A T T A A|C C G C T
T G C T T|A A T A T
C A A C C|G G A C G
G T G T G|T C T T... | 2017/01/31 | [
"https://Stackoverflow.com/questions/41966763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6346698/"
] | `pandas`
========
using a dictionary instead of a format function in the rename method
```
d1 = pd.concat([
df.filter(like='M'),
df.hybrid_block.str.split('|', expand=True).rename(columns={0: 'H_x', 1: 'H_y'}),
df.filter(like='S')
], axis=1)
```
`numpy`
=======
not sure how many times you are going to ... | you can also use [.str.extract()](http://pandas.pydata.org/pandas-docs/version/0.19.2/generated/pandas.Series.str.extract.html) method:
```
In [107]: d1 = pd.concat([
...: df.filter(like='M'),
...: df.hybrid_block.str.extract(r'(?P<H_x>[^\|]*)\|(?P<H_y>[^\|]*)', expand=True),
...: df.filter(... |
41,966,763 | I want to split a hybrid block and assign letters to each column separately:
```
M1 M2 M3 M4 hybrid_block S1 S2 S3 S4
A T T A A|C C G C T
T G C T T|A A T A T
C A A C C|G G A C G
G T G T G|T C T T... | 2017/01/31 | [
"https://Stackoverflow.com/questions/41966763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6346698/"
] | `pandas`
========
using a dictionary instead of a format function in the rename method
```
d1 = pd.concat([
df.filter(like='M'),
df.hybrid_block.str.split('|', expand=True).rename(columns={0: 'H_x', 1: 'H_y'}),
df.filter(like='S')
], axis=1)
```
`numpy`
=======
not sure how many times you are going to ... | If you want to automate finding the hybrid columns and splitting them, this would work.
```
df = pd.DataFrame({'m1': ["A", "T"], 'hybrid1': ["A|C", "T|A"], 's1': ["C", "A"], 'hybrid2': ["B|D", "F|Z"], 'hybrid3': ["V|K", "M|L"]})
for i in range(len(df.columns)):
if (df.ix[:, i].str.len() >1).any():
df_i ... |
41,966,763 | I want to split a hybrid block and assign letters to each column separately:
```
M1 M2 M3 M4 hybrid_block S1 S2 S3 S4
A T T A A|C C G C T
T G C T T|A A T A T
C A A C C|G G A C G
G T G T G|T C T T... | 2017/01/31 | [
"https://Stackoverflow.com/questions/41966763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6346698/"
] | you can also use [.str.extract()](http://pandas.pydata.org/pandas-docs/version/0.19.2/generated/pandas.Series.str.extract.html) method:
```
In [107]: d1 = pd.concat([
...: df.filter(like='M'),
...: df.hybrid_block.str.extract(r'(?P<H_x>[^\|]*)\|(?P<H_y>[^\|]*)', expand=True),
...: df.filter(... | If you want to automate finding the hybrid columns and splitting them, this would work.
```
df = pd.DataFrame({'m1': ["A", "T"], 'hybrid1': ["A|C", "T|A"], 's1': ["C", "A"], 'hybrid2': ["B|D", "F|Z"], 'hybrid3': ["V|K", "M|L"]})
for i in range(len(df.columns)):
if (df.ix[:, i].str.len() >1).any():
df_i ... |
69,217,317 | I am coming from the embedded world and I am quite new to Kotlin. I know there is some mechanism I can inherit and use in my class, but I don't know the name exactly for this mechanism for Android.
What I am looking for is:
1. I have my Activity and this one instantiates my CustomClass
2. My CustomClass perform some ... | 2021/09/17 | [
"https://Stackoverflow.com/questions/69217317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9229452/"
] | You may try the following
```sql
SELECT
"Org_ID",
"Product_ID",
CONCAT(
CONCAT(Order_Month_Group,' to '),
TO_CHAR(MAX(actual_date),'MON-YYYY')
) as Order_Month,
"Amount"
FROM (
SELECT
t1.*,
LAG(
"Order_Month",
CASE WHEN continued=0 ... | This is a type of gaps-and-islands problem. In this case, the simplest solution is probably the difference of row numbers. The following assumes that `order_month` is actually a string (rather than a date):
```
select org_id, product_id, amount,
min(order_month), max(order_month)
from (select t.*,
... |
67,084,038 | This is what my data looks like:
```
configStr: String =
"
{
"validation": {
"target_feed": "tables.validation",
"data_validations":
[
{"program": "program1",
"test_description": "Checking if column1 are distinct",
"input_column": "column1",
"test": "di... | 2021/04/14 | [
"https://Stackoverflow.com/questions/67084038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13136602/"
] | SequenceToSequence, who is almost correct by the way, mixed up which type needs to change. `testCase` is returning `Any`, when `spark.sql(_)` expects a `String`, the problem isn't the return of the `someFunc` it's the return of the `Map`.
```scala
def someFunc(testCase: Map[String, Any]): Unit = {}
```
```scala
val ... | Your someFunc returns Unit, which is similar to java's 'void' type, however, spark.sql requires a String. You will need to modify your testCase to return a string that contains a query.
```
def someFunc(testCase: Map[String, Any]): String = { ... }
``` |
169,142 | I'm testing independence in an $N \times M$ contingency table. I don't know whether the [G-test](http://en.wikipedia.org/wiki/G-test) or Pearson's chi-squared test is better. The sample size is in the hundreds but there are some low cell counts. As stated on the [Wikipedia page](http://en.wikipedia.org/wiki/G-test), th... | 2015/08/28 | [
"https://stats.stackexchange.com/questions/169142",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/83058/"
] | They are asymptotically the same. They are just different ways of getting at the same idea. More specifically, Pearson's chi-squared test is a score test, whereas the G-test is a likelihood ratio test. To get a better sense of those ideas, it may help you to read my answer here: [Why do my p-values differ between logis... | Chi-square test and G-test usually produce similar results. But the most important thing here is you have to pick one of two tests and stick with it, not only for your mentioned test but for future tests during the course of your research. It is advisable because if you try to use both tests interchangeably, it is very... |
169,142 | I'm testing independence in an $N \times M$ contingency table. I don't know whether the [G-test](http://en.wikipedia.org/wiki/G-test) or Pearson's chi-squared test is better. The sample size is in the hundreds but there are some low cell counts. As stated on the [Wikipedia page](http://en.wikipedia.org/wiki/G-test), th... | 2015/08/28 | [
"https://stats.stackexchange.com/questions/169142",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/83058/"
] | They are asymptotically the same. They are just different ways of getting at the same idea. More specifically, Pearson's chi-squared test is a score test, whereas the G-test is a likelihood ratio test. To get a better sense of those ideas, it may help you to read my answer here: [Why do my p-values differ between logis... | Have a look at Rfast.
<https://cran.r-project.org/web/packages/Rfast/index.html>
The relevant commands are
g2Test\_univariate(data, dc)
g2Test\_univariate\_perm(data, dc, nperm)
The calculations are extremely fast. And in general prefer the G^2 test as the Chi-square is an approximation to it. |
46,704,490 | Is it possible to dynamically specify the file name at runtime in a COBOL program?
For example I would like to not have to define the name of a file I would like to open when I write the File-Control section, I would like to read the name of the file I want to open from a different file containing names and I would al... | 2017/10/12 | [
"https://Stackoverflow.com/questions/46704490",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8763725/"
] | I really love it when people ask for help posting a snippet of code that doesn't have a prayer of compiling.
```
IDENTIFICATION DIVISION.
PROGRAM-ID. STACK-OVERFLOW-1.
AUTHOR. Roland Hughes.
DATE-WRITTEN. TODAY.
DATE-COMPILED. TODAY.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
... | A more complete example:
```
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT IN_FILE ASSIGN TO IN_FILE
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS FSTAT.
FILE SECTION.
FD IN_FILE
VALUE OF ID IS IN_FILE_NAME.
01 IN_POST.
03 FIELDA PIC X(14).
... |
19,521,582 | I know that `-1`, `0`, `1`, and `2` are exceptions to the magic number rule. However I was wondering if the same is true for when they are floats. Do I have to initialize a final variable for them or can I just use them directly in my program.
I am using it as a percentage in a class. If the input is less than 0.0 or... | 2013/10/22 | [
"https://Stackoverflow.com/questions/19521582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2426500/"
] | It really depends on the context. The whole point of avoiding magic numbers is to maintain the readability of your code. Use your best judgement, or provide us with some context so that we may use ours.
Magic numbers are `[u]nique values with unexplained meaning or multiple occurrences which could (preferably) be repl... | Usually, every rule has exceptions (and this one too). It is a matter of style to use some mnemonic names for these constants.
For example:
```
int Rows = 2;
int Cols = 2;
```
Is a pretty valid example where usage of raw values will be misleading.
The meaning of the magic number should be obvious from the context.... |
19,521,582 | I know that `-1`, `0`, `1`, and `2` are exceptions to the magic number rule. However I was wondering if the same is true for when they are floats. Do I have to initialize a final variable for them or can I just use them directly in my program.
I am using it as a percentage in a class. If the input is less than 0.0 or... | 2013/10/22 | [
"https://Stackoverflow.com/questions/19521582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2426500/"
] | It really depends on the context. The whole point of avoiding magic numbers is to maintain the readability of your code. Use your best judgement, or provide us with some context so that we may use ours.
Magic numbers are `[u]nique values with unexplained meaning or multiple occurrences which could (preferably) be repl... | Attaching a name for something creates an identity. Given the definitions
```
const double Moe = 2.0;
const double Joe = 2.0;
...
double Larry = Moe;
double Harry = Moe;
double Garry = Joe;
```
the use of symbols for Moe and Joe suggests that the default value of Larry and Harry are related to each other in a way th... |
19,521,582 | I know that `-1`, `0`, `1`, and `2` are exceptions to the magic number rule. However I was wondering if the same is true for when they are floats. Do I have to initialize a final variable for them or can I just use them directly in my program.
I am using it as a percentage in a class. If the input is less than 0.0 or... | 2013/10/22 | [
"https://Stackoverflow.com/questions/19521582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2426500/"
] | Those numbers aren't really exceptions to the magic number rule. The common sense rule (as far as there is "one" rule), when it isn't simplified to the level of dogma, is basically, "Don't use numbers in a context that doesn't make their meaning obvious." It just so happens that these four numbers are very commonly use... | Usually, every rule has exceptions (and this one too). It is a matter of style to use some mnemonic names for these constants.
For example:
```
int Rows = 2;
int Cols = 2;
```
Is a pretty valid example where usage of raw values will be misleading.
The meaning of the magic number should be obvious from the context.... |
19,521,582 | I know that `-1`, `0`, `1`, and `2` are exceptions to the magic number rule. However I was wondering if the same is true for when they are floats. Do I have to initialize a final variable for them or can I just use them directly in my program.
I am using it as a percentage in a class. If the input is less than 0.0 or... | 2013/10/22 | [
"https://Stackoverflow.com/questions/19521582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2426500/"
] | Those numbers aren't really exceptions to the magic number rule. The common sense rule (as far as there is "one" rule), when it isn't simplified to the level of dogma, is basically, "Don't use numbers in a context that doesn't make their meaning obvious." It just so happens that these four numbers are very commonly use... | Attaching a name for something creates an identity. Given the definitions
```
const double Moe = 2.0;
const double Joe = 2.0;
...
double Larry = Moe;
double Harry = Moe;
double Garry = Joe;
```
the use of symbols for Moe and Joe suggests that the default value of Larry and Harry are related to each other in a way th... |
2,633,797 | $$\text{Solve for $x$}\begin{cases} (x+1)^{\log\_{10}(x+1)} &= 100(x+1) \\ 3^{(\log\_3x)^2}+x^{\log\_3x}&=162\end{cases}$$
Can we take $\log$ both sides but it did not work for me. I am not getting. What other properties can we apply here?
*Note*: Both are different questions. | 2018/02/03 | [
"https://math.stackexchange.com/questions/2633797",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/526399/"
] | $(x+1)^{log\_{10}x+1 } = 100(x+1)$. Take log of both sides:
$\log\_{10} (x+1)^{\log\_{10}(x+1)} = \log\_10 100(x+1)$
$\log\_{10}(x+1)\*\log\_{10}(x+1) = \log\_{10} 100 + \log\_{10}(x+1)$.
$\log\_{10}^2(x+1) = 2 + \log\_{10}(x+1)$
$\log\_{10}^2(x+1)-\log\_{10}(x+1)-2 = 0$
....
$3^{(\log\_3x)^2}+x^{\log\_3x}=162$
... | $$x^{\log\_3x}=\left(3^{\log\_3x}\right)^{\log\_3x}=3^{\log\_3^2x}.$$
Thus, the second equation gives $$2\cdot3^{\log\_3^2x}=162$$ or
$$3^{\log\_3^2x}=3^4$$ or
$$\log\_3^2x=4,$$ which gives $x=9$ or $x=\frac{1}{9}.$ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.