qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
7,746,662 | Is there an [in-place partitioning](http://www.cs.auckland.ac.nz/~jmor159/PLDS210/qsort1a.html) algorithm (of the kind used in a [Quicksort](http://en.wikipedia.org/wiki/Quicksort) implementation) that does not rely on the pivot element being present in the array?
In other words, the array elements must be arranged in... | 2011/10/12 | [
"https://Stackoverflow.com/questions/7746662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12048/"
] | This was an interesting problem. You can do it with a single sequential pass through the array. Code example in C#, below. It assumes an array of integers called `a`, and a `pivot` value.
```
// Skip initial items that are < pivot
int iInsert = 0;
while (iInsert < a.Length && a[iInsert] < pivot)
{
++iInsert;
}
// ... | Another possibility is to split the method into two, one that partitions into [<= pivot, > pivot] and another that partitions the first part of that result into [< pivot, >= pivot].
```
public static int partitionLE(double[] a, int left, int right, double pivot) {
double x, y;
if (left >= right) return left;
... |
3,709 | See this question: <https://askubuntu.com/questions/163613/offline-installation/>: top answer, third comment. I told the commenter that it's better to correct the answer himself than to threaten others to do so.
But I'm still not entirely certain if my reaction was correct. It's good if answers or questions get better... | 2012/07/17 | [
"https://meta.askubuntu.com/questions/3709",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/18510/"
] | *This is a response to the general question, and not specifically to the example. The whole Stack Exchange system is a bit complicated, so if the example involved a new or new-ish user, it was probably just an innocent mistake using the site, and not something for which anyone ought to be faulted.*
I think threatening... | Short answer: no.
Long answer: no.
It is never okay to threaten anyone with downvotes or similar measures, because in general threats are not accepted in the community, and downvotes are not to be used for this purpose. In this particular case however, I think you misunderstood what the person was saying.
They seem ... |
3,709 | See this question: <https://askubuntu.com/questions/163613/offline-installation/>: top answer, third comment. I told the commenter that it's better to correct the answer himself than to threaten others to do so.
But I'm still not entirely certain if my reaction was correct. It's good if answers or questions get better... | 2012/07/17 | [
"https://meta.askubuntu.com/questions/3709",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/18510/"
] | *This is a response to the general question, and not specifically to the example. The whole Stack Exchange system is a bit complicated, so if the example involved a new or new-ish user, it was probably just an innocent mistake using the site, and not something for which anyone ought to be faulted.*
I think threatening... | Flag them as *rude* / *offensive* for moderation attention and make sure they are away next time you visit the post.
Makes no sense **EVER** to threaten users with down votes when we are talking about community edited content.
If you understand what is wrong, fix it, if you don't then you don't even have reasons to b... |
3,709 | See this question: <https://askubuntu.com/questions/163613/offline-installation/>: top answer, third comment. I told the commenter that it's better to correct the answer himself than to threaten others to do so.
But I'm still not entirely certain if my reaction was correct. It's good if answers or questions get better... | 2012/07/17 | [
"https://meta.askubuntu.com/questions/3709",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/18510/"
] | *This is a response to the general question, and not specifically to the example. The whole Stack Exchange system is a bit complicated, so if the example involved a new or new-ish user, it was probably just an innocent mistake using the site, and not something for which anyone ought to be faulted.*
I think threatening... | Any form of threat(s) is/are NOT acceptable. |
40,545,442 | I want to access a postgresql database, but I have a problem with `AsyncTask` and `doInBackground` commands. I don't know why I can't update my textview at `onPostExecute`. Can anyone explain me what is the problem? Here is my code:
```
package com.example.armyhealthcare;
import java.sql.*;
import android.app.Activi... | 2016/11/11 | [
"https://Stackoverflow.com/questions/40545442",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7145382/"
] | To set text in doInBackground you can use this.
```
runOnUiThread(new Runnable() {
@Override
public void run() {
txtView.setText("Message");
}
});
```
Try this:
[Updating TextView from Async Task which use custom program dialog](http... | You can use `runOnUiThead()` or set text in `onPostExexute()`
**Example :**
```
runOnUiThread(new Runnable() {
@Override
public void run() {
tvText.setText("ABC");
}
});
```
**Edited :**
**Good W... |
40,545,442 | I want to access a postgresql database, but I have a problem with `AsyncTask` and `doInBackground` commands. I don't know why I can't update my textview at `onPostExecute`. Can anyone explain me what is the problem? Here is my code:
```
package com.example.armyhealthcare;
import java.sql.*;
import android.app.Activi... | 2016/11/11 | [
"https://Stackoverflow.com/questions/40545442",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7145382/"
] | To set text in doInBackground you can use this.
```
runOnUiThread(new Runnable() {
@Override
public void run() {
txtView.setText("Message");
}
});
```
Try this:
[Updating TextView from Async Task which use custom program dialog](http... | Pass the result or object from `String doInBackground()` to `onPostExecute(String result)`
Please follow the example.
From the `doInBackground()` method:
```
protected String doInBackground(Void... arg0){
//Your code here
return rs.getString(1);;
}
```
From the `onPostExecute()` method:
```
@Ov... |
134,058 | I need to alter the length of a column `column_length` in say more than 500 tables and the tables might have no of records ranging from 10 records to 3 or 4 million records.
1. The column may just be a normal column
```
CREATE TABLE test(column_length varchar(10))
```
2. The column might contain non-clustered index... | 2008/09/25 | [
"https://Stackoverflow.com/questions/134058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21968/"
] | Yes you should be able to just modify the columns. From my experience it is faster to leave the index and primary key in place. | Likely you will need to do alter column on the foreign key tables as well to increase the size. SO first you drop the fk constraint, then fix the forign kkey fields, then fix the primary key field then put the constraints back on. |
213,736 | Is it possible to upgrade from 10.1.x to 10.3.x directly in **one step? or I have to upgrade first to 10.2. x then to 10.3.x.**
Please it is so important question regarding upgrading our production MariaDB servers and I couldn't find any answer or notes regarding upgrade from 10.1 series to 10.3 series.
So i have to ... | 2018/08/01 | [
"https://dba.stackexchange.com/questions/213736",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/59966/"
] | Upgrades are only tested from one major version to the next, so you'll have to do 10.1->10.2.
Documentation for each upgrade:
[Upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102/)
[Upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/k... | If you must go the direct route, but actual direct upgrading doesn't work, what you can do is:
1. Install MariaDB 10.3 on a new server
2. Make a logical backup (typically `mysqldump`) of the 10.1 production server
3. Import the backup to the new MariaDB 10.3 production server. |
62,775 | if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender.
I tried like `msg.sender.transfer(0.5)`
and tried like `msg.sender.transfer(500000000000000000)`
but nothing happened. I am not sure about that msg.sender.transfer is a right function.
is it possible do such way in Contracts... | 2018/11/21 | [
"https://ethereum.stackexchange.com/questions/62775",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/48130/"
] | They're not the same.
`view` functions have read-only access permission on state variables.
`pure` functions do not.
Those functions that you mention can all be declared `pure`.
Side note: this library is provided in OpenZeppelin GitHub as open source, which means that it has been viewed, tested and verified thorou... | I think you cant find what you are looking for in the solidity official documentation here: <https://solidity.readthedocs.io/en/v0.4.25/contracts.html?highlight=view%20pure#view-functions>
Hope it helps |
62,775 | if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender.
I tried like `msg.sender.transfer(0.5)`
and tried like `msg.sender.transfer(500000000000000000)`
but nothing happened. I am not sure about that msg.sender.transfer is a right function.
is it possible do such way in Contracts... | 2018/11/21 | [
"https://ethereum.stackexchange.com/questions/62775",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/48130/"
] | **View** can be used to with a function that does not modify the state but reads state variables.
**Pure** should be used with functions that neither modify state nor read ( access) state variables. They generally perform operations based on input params.
An example illustrating the same is here:
```
pragma solidit... | They're not the same.
`view` functions have read-only access permission on state variables.
`pure` functions do not.
Those functions that you mention can all be declared `pure`.
Side note: this library is provided in OpenZeppelin GitHub as open source, which means that it has been viewed, tested and verified thorou... |
62,775 | if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender.
I tried like `msg.sender.transfer(0.5)`
and tried like `msg.sender.transfer(500000000000000000)`
but nothing happened. I am not sure about that msg.sender.transfer is a right function.
is it possible do such way in Contracts... | 2018/11/21 | [
"https://ethereum.stackexchange.com/questions/62775",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/48130/"
] | **View** can be used to with a function that does not modify the state but reads state variables.
**Pure** should be used with functions that neither modify state nor read ( access) state variables. They generally perform operations based on input params.
An example illustrating the same is here:
```
pragma solidit... | I think you cant find what you are looking for in the solidity official documentation here: <https://solidity.readthedocs.io/en/v0.4.25/contracts.html?highlight=view%20pure#view-functions>
Hope it helps |
436,813 | I need to launch a binary in bash and the output of the binary consist of some Chinese character. so my question is how to let bash display Chinese character correctly. by the way,
I use Centos. | 2012/06/14 | [
"https://superuser.com/questions/436813",
"https://superuser.com",
"https://superuser.com/users/10888/"
] | You need UTF-8 encoding to have all Chinese characters displayed correctly.
To see your current locale just type
`locale` and you will get a similar output like this:
```
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAG... | I think you need to change TWO files, you need to add `.UTf-8` to the end of `LANG=` and `LANGUAGE=`:
1) In `/etc/default/locale`
```
LANG=" en_US.UTF-8"
LANGUAGE=" en_US:en.UTF-8"
```
2) In `~/.pam_environment`
```
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
```
3) reboot |
436,813 | I need to launch a binary in bash and the output of the binary consist of some Chinese character. so my question is how to let bash display Chinese character correctly. by the way,
I use Centos. | 2012/06/14 | [
"https://superuser.com/questions/436813",
"https://superuser.com",
"https://superuser.com/users/10888/"
] | You need UTF-8 encoding to have all Chinese characters displayed correctly.
To see your current locale just type
`locale` and you will get a similar output like this:
```
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAG... | As centos7/8 are widely used, it is convinient to just install a group of rpms to display non ascii characters.
```
yum groupinstall -y Fonts
``` |
9,720,873 | I have some thoughts on the design of the commanding part in CQRS. I want to hear your opinions on my thoughts. Thanks in advance! :)
In CQRS, there're Commands and CommandExecutors. Sometimes we want command executors to return some result after execution complete. One possible solution is (C#):
```
public interface... | 2012/03/15 | [
"https://Stackoverflow.com/questions/9720873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/290617/"
] | You should not add a second interface. I'm not sure if having return values is appropriate for commands in CQRS, but I sometimes do this with my commands (but I'm not following CQRS). But rather than having a second interface, add an output property to the command.
```
public class CreateCustomerCommand
{
// custo... | Strictly speaking if you are using command patter it should not return anything but it should be always `void`. You should use another command (query) to get any data
<http://www.dofactory.com/Patterns/PatternCommand.aspx#_self1> |
9,720,873 | I have some thoughts on the design of the commanding part in CQRS. I want to hear your opinions on my thoughts. Thanks in advance! :)
In CQRS, there're Commands and CommandExecutors. Sometimes we want command executors to return some result after execution complete. One possible solution is (C#):
```
public interface... | 2012/03/15 | [
"https://Stackoverflow.com/questions/9720873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/290617/"
] | In CQRS the command side should not return anything since it breaks the anatomy of the pattern. Your own thoughts about this are correct.
However, Greg Young often mention an Ack/Nack result of a command operation (or used to anyway). Most messaging frameworks support such responses. The drawback of expecting a result... | Strictly speaking if you are using command patter it should not return anything but it should be always `void`. You should use another command (query) to get any data
<http://www.dofactory.com/Patterns/PatternCommand.aspx#_self1> |
9,720,873 | I have some thoughts on the design of the commanding part in CQRS. I want to hear your opinions on my thoughts. Thanks in advance! :)
In CQRS, there're Commands and CommandExecutors. Sometimes we want command executors to return some result after execution complete. One possible solution is (C#):
```
public interface... | 2012/03/15 | [
"https://Stackoverflow.com/questions/9720873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/290617/"
] | You should not add a second interface. I'm not sure if having return values is appropriate for commands in CQRS, but I sometimes do this with my commands (but I'm not following CQRS). But rather than having a second interface, add an output property to the command.
```
public class CreateCustomerCommand
{
// custo... | In CQRS the command side should not return anything since it breaks the anatomy of the pattern. Your own thoughts about this are correct.
However, Greg Young often mention an Ack/Nack result of a command operation (or used to anyway). Most messaging frameworks support such responses. The drawback of expecting a result... |
33,256,748 | I would like the lat and long coordinates. instead of the coordinateds i get this
location:
Waalre, Nederland
Address: Waalre, Nederland
Latitude: undefined
Longitude: undefined
```
<script type="text/javascript">
google.maps.event.addDomListener(window, 'load', intilize);
function intilize() {
va... | 2015/10/21 | [
"https://Stackoverflow.com/questions/33256748",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5471054/"
] | mate,
.geometry.location.A/.geometry.location.F are not accessible , use lat() and lng()
change to this :
```
location += "Latitude: " + place.geometry.location.lat() + "<br/>";
location += "Longitude: " + place.geometry.location.lng();
``` | The problem is fixed.
instead of "place.geometry.location.A" it must be "place.geometry.location.lat()"
and
"place.geometry.location.F" it must be "place.geometry.location.lng()" |
10,191,688 | I have an ajax call that successfully calls a page that by itself works fine. You click the button, and a PDF downloads. However, when I make an AJAX call using the same request type and url, the `data` is returned, but does not prompt a download.
My call :
```
$("#download-pdf").live('click', function(){
$... | 2012/04/17 | [
"https://Stackoverflow.com/questions/10191688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/93311/"
] | The only way to force a download is to refresh the page using the "standard" form submission method. With Ajax you'll receive the raw output data (PDF) and no save dialog will ever pop up | It's not possible to force downloading when using AJAX.
Please read this: [Force download a pdf link using javascript/ajax/jquery](https://stackoverflow.com/questions/3077242/force-download-a-pdf-link-using-javascript-ajax-jquery)
If you would just submit the form then you can tell the browser to download the file by... |
170,807 | When studying acid-catalyzed nucleophilic attack of alcohol on carbonyl, I got puzzled by the first protonation step. In textbooks, they often show that the first step is to protonate the carbonyl oxygen by the acid to make the carbonyl carbon into a better electrophile, so that even a weak nucleophile such as the alco... | 2023/01/23 | [
"https://chemistry.stackexchange.com/questions/170807",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/130720/"
] | I assume OP is wondering why always showing carbonyl carbon protonation instead hydroxyl carbon protonation in the mechanism of Fischer esterification. As I have mentioned this in another answer, those reactions are reversible and protonation happens in both oxygens. yet reaction would go through to give the thermodyna... | Your mentioned points are somewhat correct. Look in acidic medium electrophilicity of carbonyl increase, secondly nucleophile(like alcohol) get consume due to protonation. For the reaction to happen we maintain a particular particular pH(4.5-5) at which both factors are maintained so that not much consumption of electr... |
53,033,509 | when I launch emulator I am getting error as
>
> Emulator: PANIC: Missing emulator engine program for 'arm' CPU.
>
>
> Emulator: Process finished with exit code 1
>
>
>
Win 10 , Android Studio3.1.4 , AVD Nexus 4 Api21 | 2018/10/28 | [
"https://Stackoverflow.com/questions/53033509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1700213/"
] | Automatic variables are typically placed on the call stack. The default size of the call stack on most desktop systems is from one to a few megabytes. The size of `double [800050][1]` is over six megabytes (assuming the size double is eight bytes). The result of using such a huge automatic variable results in a *stack ... | you are (as mentioned in error) doing a stack overflow when allocating:
```
double x_array[800050][1] ;
```
you should try to allocate it on the heap (directly using new, or indirectly using a std container like std::vector) |
118,413 | I had a question about using a variable to access different scripts. I have a Rhythm game I'm working on, and I have different scripts named Rudement1, Rudement2, Rudement3, ect... One of my other scripts has something like this,
```
public GameObject HighHatFlare;
public int RudementNumber = TrainingMenuScript.Traini... | 2016/03/17 | [
"https://gamedev.stackexchange.com/questions/118413",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/69836/"
] | Whenever you create anything with identifiers named `Foo1`, `Foo2`, `Foo3` etc., it is very likely that what you should actually be doing is using an array or `List`.
Which one is the ideal solution for your case is hard to tell because you aren't saying much about what you already have and where you want to go softwa... | make this variable static than you can access in any other script
like
public static #type of variable# myrudment in other script you can access like this
name of the class in which you declared that variable #name of the class#.myrudment |
58,662,833 | I need to force mapbox maps to work completely offline when I need it.
For now, even if I downloaded offline maps, but did not switch off the internet connection of a device, the maps continue to update itself. Moreover, if the current view region downloaded only up to, for example, x6 zoom level, when you try to zoom... | 2019/11/01 | [
"https://Stackoverflow.com/questions/58662833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6390942/"
] | Offline maps supports [this](https://github.com/maplibre/maplibre-gl-native) Mapbox open source fork now. | I've been rummaging through mapbox's documentation for a while and unfortunately I haven't noticed anything like what you're describing.
I'm going to take a wild guess and assume you are trying to VIEW the map so you can WORK ON the map and have it save your stuff much like saving a scene. While I ABSOLUTELY AGREE WIT... |
29,771,985 | I have a list in python and i need to write the output to csv. list is :
```
>>>final_name[0]
[['Serbs'], ['Joachim RA'], [''], ['Mr RA'], [''], ['Albanian'], ['Boris Tadic', 'Serbia']]
>>> final_name[1]
[['Philippine', 'Gloria Macapagal Arroyo', 'Mitag'], ['Anthony Golez'], ['Golez'], [''], ['Golez'], ['']]
```
... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29771985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876812/"
] | Why?
Because this gives the Operating System a way to securely manage memory.
Why is secure memory management necessary?
Imagine if there was no logical addressing. All processes were given direct access to physical addresses. A multi-process OS runs several different programs simultaneously. Imagine you are editing... | In execution time binding, the MMU makes a mapping from logical address to physical address because in this type of binding:
**logical address is specifically referred to as virtual address**
The address actually has no meaning because it is there to illusion the user that it has a large memory for its processes. The... |
29,771,985 | I have a list in python and i need to write the output to csv. list is :
```
>>>final_name[0]
[['Serbs'], ['Joachim RA'], [''], ['Mr RA'], [''], ['Albanian'], ['Boris Tadic', 'Serbia']]
>>> final_name[1]
[['Philippine', 'Gloria Macapagal Arroyo', 'Mitag'], ['Anthony Golez'], ['Golez'], [''], ['Golez'], ['']]
```
... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29771985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876812/"
] | The need of logical address is to securely manage our physical memory.
Logical address is used to reference to access the physical memory location.
A logical address is generated so that a user program never directly access the physical memory and the process donot occupies memory which is acquired by another process... | In execution time binding, the MMU makes a mapping from logical address to physical address because in this type of binding:
**logical address is specifically referred to as virtual address**
The address actually has no meaning because it is there to illusion the user that it has a large memory for its processes. The... |
29,771,985 | I have a list in python and i need to write the output to csv. list is :
```
>>>final_name[0]
[['Serbs'], ['Joachim RA'], [''], ['Mr RA'], [''], ['Albanian'], ['Boris Tadic', 'Serbia']]
>>> final_name[1]
[['Philippine', 'Gloria Macapagal Arroyo', 'Mitag'], ['Anthony Golez'], ['Golez'], [''], ['Golez'], ['']]
```
... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29771985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876812/"
] | Why?
Because this gives the Operating System a way to securely manage memory.
Why is secure memory management necessary?
Imagine if there was no logical addressing. All processes were given direct access to physical addresses. A multi-process OS runs several different programs simultaneously. Imagine you are editing... | The binding of instruction and data of a process to memory is done at compile time, load time or at execution time. Logical address comes into picture, only if the process moved during its **execution time** from one memory segment to another. logical address is the address of a process, before any relocation happens(m... |
29,771,985 | I have a list in python and i need to write the output to csv. list is :
```
>>>final_name[0]
[['Serbs'], ['Joachim RA'], [''], ['Mr RA'], [''], ['Albanian'], ['Boris Tadic', 'Serbia']]
>>> final_name[1]
[['Philippine', 'Gloria Macapagal Arroyo', 'Mitag'], ['Anthony Golez'], ['Golez'], [''], ['Golez'], ['']]
```
... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29771985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876812/"
] | Why?
Because this gives the Operating System a way to securely manage memory.
Why is secure memory management necessary?
Imagine if there was no logical addressing. All processes were given direct access to physical addresses. A multi-process OS runs several different programs simultaneously. Imagine you are editing... | The need of logical address is to securely manage our physical memory.
Logical address is used to reference to access the physical memory location.
A logical address is generated so that a user program never directly access the physical memory and the process donot occupies memory which is acquired by another process... |
29,771,985 | I have a list in python and i need to write the output to csv. list is :
```
>>>final_name[0]
[['Serbs'], ['Joachim RA'], [''], ['Mr RA'], [''], ['Albanian'], ['Boris Tadic', 'Serbia']]
>>> final_name[1]
[['Philippine', 'Gloria Macapagal Arroyo', 'Mitag'], ['Anthony Golez'], ['Golez'], [''], ['Golez'], ['']]
```
... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29771985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876812/"
] | The need of logical address is to securely manage our physical memory.
Logical address is used to reference to access the physical memory location.
A logical address is generated so that a user program never directly access the physical memory and the process donot occupies memory which is acquired by another process... | The binding of instruction and data of a process to memory is done at compile time, load time or at execution time. Logical address comes into picture, only if the process moved during its **execution time** from one memory segment to another. logical address is the address of a process, before any relocation happens(m... |
18,789,247 | I just ran these two commands on a file having around 250 million records.
```
awk '{if(substr($0,472,1)=="9") print $0}' < file1.txt >> file2.txt
```
and
```
nawk '{if(substr($0,472,1)=="9") print $0}' < file1.txt >> file2.txt
```
The record length is 482. The first command gave the correct number of records in ... | 2013/09/13 | [
"https://Stackoverflow.com/questions/18789247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1827551/"
] | The difference probably lies on the buffer limit of Nawk. One of the records (lines) found in your input file has probably exceeded it.
This crucial line can be found in [awk.h](http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/lang/nawk/files/awk.h):
```
#define RECSIZE (8 * 1024) /* sets limit on records, fields, et... | Your command can be reduced to just this:
```
awk 'substr($0,472,1)==9'
```
On Solaris (which you are on) when you run `awk` by default you are running old, broken awk (/usr/bin/awk) so I suspect that nawk is the one producing the correct result.
Run /usr/xpg4/bin/awk with the same script/arguments and see which of... |
28,194,363 | I'm trying to delete cookie files with the `unlink()` function and it's not working properly
I tried this code (found on php.net)
```
<?php array_map('unlink', glob("some/dir/*.txt")); ?>
```
But it do not delete the last created file... | 2015/01/28 | [
"https://Stackoverflow.com/questions/28194363",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3069680/"
] | There are any number of reasons your code may be failing on one file but not the others. It doesn't appear to be a logic error, but the first thing I would do is try to rewrite this as a loop rather than using `array_map()`.
Then I would check for an error after each call to `unlink()` if it returns `FALSE`: `if (!(un... | I'm not %100 sure but maybe you have to include path:
```
<?php
foreach(glob("some/dir/*.tmp") as $file)
{
unlink("some/dir/".$file);
}
``` |
14,122,106 | I actually wrote a method which switches some UIViews. When I enter the method I have to know which is my current view to remove exactly this one from the superview. I declared a property for this purpose in the header file:
```
@property (weak, nonatomic) UIView *currentView;
```
After I changed to a certain view i... | 2013/01/02 | [
"https://Stackoverflow.com/questions/14122106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1066010/"
] | Pass a boolean value from notification and check for the same in the onCreate method of the activity.
```
Intent intent = new Intent(ctx, MainActivity.class);
intent.putExtra("fromNotification", true);
```
...
```
if (getIntent().getExtras() != null) {
Bundle b = getIntent().getExtras();
boolean cameFromNotif... | You can try this in your **Notification**
```
Intent intent=new Intent();
intent.setAction("Activity1");
```
In the **Activity** override `onNewIntent()` method and get action so you can determine the activity is called or not. |
14,122,106 | I actually wrote a method which switches some UIViews. When I enter the method I have to know which is my current view to remove exactly this one from the superview. I declared a property for this purpose in the header file:
```
@property (weak, nonatomic) UIView *currentView;
```
After I changed to a certain view i... | 2013/01/02 | [
"https://Stackoverflow.com/questions/14122106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1066010/"
] | Pass a boolean value from notification and check for the same in the onCreate method of the activity.
```
Intent intent = new Intent(ctx, MainActivity.class);
intent.putExtra("fromNotification", true);
```
...
```
if (getIntent().getExtras() != null) {
Bundle b = getIntent().getExtras();
boolean cameFromNotif... | Better than using the reserved action field of your intent as specified by @ricintech, you could use an extra parameter in your pending intent and detect it in your `onCreate` method and in your `onNewIntent` metod inside your activity. |
7,240,038 | In UMTS I get a large number returned by `getCid()` (larger than the allowed value). Is this the UTRAN Cell Identity (UC-ID)?
```
UC-Id = RNC-Id + C-Id
```
Does someone knows that? How to get the `C-Id` from the `UC-Id`?
Thanks and Best,
Benny | 2011/08/30 | [
"https://Stackoverflow.com/questions/7240038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/919202/"
] | The RNC id is the first 2 bytes of the 4 byte Cell Id (3GPP 25.401, section 6.1.5), if the network type is UMTS/HSxPA/HSPA+."
I have access to an operator network and I checked in the system and it's true and correct.
Based on that please see my code how you can easily get RNCID + CID:
Convert CID to ByteArray:... | try
(cell id % 65536)
it worked for me. |
7,240,038 | In UMTS I get a large number returned by `getCid()` (larger than the allowed value). Is this the UTRAN Cell Identity (UC-ID)?
```
UC-Id = RNC-Id + C-Id
```
Does someone knows that? How to get the `C-Id` from the `UC-Id`?
Thanks and Best,
Benny | 2011/08/30 | [
"https://Stackoverflow.com/questions/7240038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/919202/"
] | The RNC id is the first 2 bytes of the 4 byte Cell Id (3GPP 25.401, section 6.1.5), if the network type is UMTS/HSxPA/HSPA+."
I have access to an operator network and I checked in the system and it's true and correct.
Based on that please see my code how you can easily get RNCID + CID:
Convert CID to ByteArray:... | This is more simple than this. Cell ID is in the low register of the value getCid() returns, the RNC is the high register of this value (<http://developer.android.com/reference/android/telephony/gsm/GsmCellLocation.html#getCid()>).
So:
>
> getCid() == RNC << 16 | CID
>
>
> CID = getCid() & 0xffff
>
>
> RNC = (get... |
7,240,038 | In UMTS I get a large number returned by `getCid()` (larger than the allowed value). Is this the UTRAN Cell Identity (UC-ID)?
```
UC-Id = RNC-Id + C-Id
```
Does someone knows that? How to get the `C-Id` from the `UC-Id`?
Thanks and Best,
Benny | 2011/08/30 | [
"https://Stackoverflow.com/questions/7240038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/919202/"
] | The RNC id is the first 2 bytes of the 4 byte Cell Id (3GPP 25.401, section 6.1.5), if the network type is UMTS/HSxPA/HSPA+."
I have access to an operator network and I checked in the system and it's true and correct.
Based on that please see my code how you can easily get RNCID + CID:
Convert CID to ByteArray:... | If CID is > 65536, it's not actually the cell-ID, but a linear combination of the real cell-ID and RNC-ID:
```
UTRAN_CELL_ID = RNCID x 65536 + CellID
```
To extract the cellID, use the modulo operation:
```
CellID = UTRAN_CELL_ID % 65536
```
To extract the RNCID, get the integer part:
```
RNCID = UTRAN_CELL_ID /... |
20,575,640 | OS: CentOS 6.4 (server)
I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - deskto... | 2013/12/13 | [
"https://Stackoverflow.com/questions/20575640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3100774/"
] | DataStax DevCenter being built on top of the DataStax Java driver has the same [connectivity requirements as the driver](https://github.com/datastax/java-driver/wiki/Connection-requirements). Namely:
1. `start_native_transport: true`
2. `rpc_address`: IP or hostname reachable from the client
3. Machines in the cluster... | In the cassandra.yaml, I set
1. listen\_address: localhost
2. rpc\_address: 1.2.3.4
3. broadcast\_rpc\_address: 1.2.3.4
After doing a
**sudo service cassandra restart**
DevCenter was able to successfully connect.
After this change, cqlsh would not start without the address:
**cqlsh 1.2.3.4**
You can set the env... |
20,575,640 | OS: CentOS 6.4 (server)
I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - deskto... | 2013/12/13 | [
"https://Stackoverflow.com/questions/20575640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3100774/"
] | DataStax DevCenter being built on top of the DataStax Java driver has the same [connectivity requirements as the driver](https://github.com/datastax/java-driver/wiki/Connection-requirements). Namely:
1. `start_native_transport: true`
2. `rpc_address`: IP or hostname reachable from the client
3. Machines in the cluster... | Try this.. It worked for me!
Run the following command on your machine where you have DevCenter installed
```
$> ssh -L 9042:localhost:9042 <username>@<ip-address-cassandra-db> -N
```
*After running this command, it will prompt for password*
Now in your DevCenter > Contact Hosts, provide "127.0.0.1" and test conne... |
20,575,640 | OS: CentOS 6.4 (server)
I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - deskto... | 2013/12/13 | [
"https://Stackoverflow.com/questions/20575640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3100774/"
] | DataStax DevCenter being built on top of the DataStax Java driver has the same [connectivity requirements as the driver](https://github.com/datastax/java-driver/wiki/Connection-requirements). Namely:
1. `start_native_transport: true`
2. `rpc_address`: IP or hostname reachable from the client
3. Machines in the cluster... | If there's somebody working with docker locally, it can run this command.
```
docker run --name cassandra -p 127.0.0.1:9042:9042 -p 127.0.0.1:9160:9160
-e CASSANDRA_LISTEN_ADDRESS=localhost
-e CASSANDRA_BROADCAST_ADDRESS=localhost
-e CASSANDRA_RPC_ADDRESS=localhost -d cassandra
``` |
20,575,640 | OS: CentOS 6.4 (server)
I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - deskto... | 2013/12/13 | [
"https://Stackoverflow.com/questions/20575640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3100774/"
] | In the cassandra.yaml, I set
1. listen\_address: localhost
2. rpc\_address: 1.2.3.4
3. broadcast\_rpc\_address: 1.2.3.4
After doing a
**sudo service cassandra restart**
DevCenter was able to successfully connect.
After this change, cqlsh would not start without the address:
**cqlsh 1.2.3.4**
You can set the env... | If there's somebody working with docker locally, it can run this command.
```
docker run --name cassandra -p 127.0.0.1:9042:9042 -p 127.0.0.1:9160:9160
-e CASSANDRA_LISTEN_ADDRESS=localhost
-e CASSANDRA_BROADCAST_ADDRESS=localhost
-e CASSANDRA_RPC_ADDRESS=localhost -d cassandra
``` |
20,575,640 | OS: CentOS 6.4 (server)
I have successfully installed (yum install dsc20) the cassandra database layer in my server and can connect to it using the CQL SHel (cqlsh). But I need to run queries remotely using the DataStax's DevCenter software. So I installed it (DevCenter) in a separate workstation. (CentOS 6.4 - deskto... | 2013/12/13 | [
"https://Stackoverflow.com/questions/20575640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3100774/"
] | Try this.. It worked for me!
Run the following command on your machine where you have DevCenter installed
```
$> ssh -L 9042:localhost:9042 <username>@<ip-address-cassandra-db> -N
```
*After running this command, it will prompt for password*
Now in your DevCenter > Contact Hosts, provide "127.0.0.1" and test conne... | If there's somebody working with docker locally, it can run this command.
```
docker run --name cassandra -p 127.0.0.1:9042:9042 -p 127.0.0.1:9160:9160
-e CASSANDRA_LISTEN_ADDRESS=localhost
-e CASSANDRA_BROADCAST_ADDRESS=localhost
-e CASSANDRA_RPC_ADDRESS=localhost -d cassandra
``` |
42,194,306 | I'm building a website with Bootstrap. I'm still new to Boostrap and now still struggling in responsive grid design.
So my question is, how if I want to have row with 4 columns when screen is large, but when screen is in medium, I want it become just 3 columns, one of it is to be stacked to the other column (i.e colum... | 2017/02/12 | [
"https://Stackoverflow.com/questions/42194306",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5060513/"
] | You can use nested columns like this...
```
<div class="container-fluid">
<div class="row">
<div class="col-md-2 col-sm-2">
sidebar
</div>
<div class="col-md-5 col-sm-6">
newsfeed
</div>
<div class="col-md-5 col-sm-2">
<div class="row">
... | try this mark up--
resize the browser width to see the effect.
**EDIT**
I think this is what you need. check out the update snippet. adjust the height of the columns according to your wish.
```html
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="ht... |
24,478,039 | Is it possible to get TimeZone and working hours of the users through EWS?
I am able to extract TZ and Working Hours for current user(Account with which the ExchangeService is initialized)
```
UserConfiguration usrConfig = UserConfiguration.Bind(service, "WorkHours", WellKnownFolderName.Calendar, UserConfigurationPro... | 2014/06/29 | [
"https://Stackoverflow.com/questions/24478039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308766/"
] | I use the [GetUserAvailability](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.getuseravailability%28v=exchg.80%29.aspx) operation.
Input is an array of users. Output includes an [array of AttendeeAvailability](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webs... | If you have access to the other mailbox in question all you need to do is use the FolderId class specify the Mailbox you want to access and then use the FolderId overload of the UserConfiguration.Bind method eg
```
FolderId CalendarFolderId = new FolderId(Microsoft.Exchange.WebServices.Data.WellKnownFolderName... |
24,478,039 | Is it possible to get TimeZone and working hours of the users through EWS?
I am able to extract TZ and Working Hours for current user(Account with which the ExchangeService is initialized)
```
UserConfiguration usrConfig = UserConfiguration.Bind(service, "WorkHours", WellKnownFolderName.Calendar, UserConfigurationPro... | 2014/06/29 | [
"https://Stackoverflow.com/questions/24478039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308766/"
] | I use the [GetUserAvailability](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.getuseravailability%28v=exchg.80%29.aspx) operation.
Input is an array of users. Output includes an [array of AttendeeAvailability](http://msdn.microsoft.com/en-us/library/microsoft.exchange.webs... | Have a look at [Exchange Impersonation](http://msdn.microsoft.com/en-us/library/dd877053%28v=exchg.140%29.aspx).
You can have a specific user account impersonate another user account and access their details without the need for their username and password.
```cs
string impName = @"impy";
string impPassword = @"passw... |
232,818 | after migrating my WP site to a different domain and making adjustments, Font Awesome stopped showing icons and shows some weird text instead, for example & # 61505; (I can't copy it as a text, looks like an automatically generated graphics).
Please see attached image.
[; // Date from two days ago
$args = array(
'post_type' => 'post',
'meta_key' => 'post_views_count',
'orderby'... |
252,573 | I am wondering how to best calculate the probability of getting the all of the following "high point" tiles in a single game of scrabble: Z, Q, J, X, and K
In a game of scrabble, there are 100 tiles for distribution. Of the Z, Q, J, X, and K tiles, only 1 each of these are in the bag of tiles.
Let's assume that in a... | 2012/12/06 | [
"https://math.stackexchange.com/questions/252573",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/52070/"
] | It is enough to show that the function $F$ is differentiable on every open subset of $\mathbb{R}$. So let $r>0$, and
$$
\phi: X\times(-r,r) \to [0,\infty],\ \phi(x,t)=s(f(x)+tg(x))=:\phi^x(t),
$$
where
$$
s: \mathbb{R} \to [0,\infty),\ s(t)=|t|^p.
$$
Since $s$ is differentiable, and
$$
s'(t)=\begin{cases}
p|t|^{p-2}t... | **Hint:** let $F(t,x):=|f(x)+tg(x)|^p$. Check that we can take the derivative under the integral.
We have $\partial\_tF(t,x)=|g(x)|\cdot |f(x)+tg(x)|^{p-1}\operatorname{sgn}(f(x)+tg(x))$, which is, locally in $t$, bounded in $t$ by an itnegrable function of $x$. |
4,633,666 | I am making an iPhone app, and I want know how make a variable background image a background that the user can choose one of the options ? | 2011/01/08 | [
"https://Stackoverflow.com/questions/4633666",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/567972/"
] | I don't know what you want in the foreground, but anything based on the UIView class has a `backgroundColor` property that you can set to an image like this:
```
yourView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"YourImage.png"]];
``` | It didn't work for me, what it worked was:
```
self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]];
```
I think is the same, but don't know why the other answer didn't work for me.
Hope it helps. |
48,944,804 | I have an activity that shows a dialogfragment.
I've already set the dialogfragment cancelable to false, but the underlying activity still captures the back button press.
My underlying activity has overridden the onBackPressed method, but I don't want this to run when the dialogfragment is shown.
How do you disable th... | 2018/02/23 | [
"https://Stackoverflow.com/questions/48944804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3893122/"
] | ```
#!/usr/bin/env python
# coding=utf-8
from bs4 import BeautifulSoup
import requests
url = u'https://ta.wikisource.org/w/index.php?title=அட்டவணை பேச்சு:நாடகக்கலை-2.pdf&action=history'
content = requests.get(url).content
soup = BeautifulSoup(content, 'lxml')
# talkPage1 = soup.findAll(id='mw-content-text')
talkPage2 ... | Add `break` in the `for` loop:
```
#!/usr/bin/env python
# coding=utf-8
from bs4 import BeautifulSoup
import requests
url = u'https://ta.wikisource.org/w/index.php?title=அட்டவணை பேச்சு:நாடகக்கலை-2.pdf&action=history'
content = requests.get(url).content
soup = BeautifulSoup(content,'lxml')
#talkPage1 = soup.findAll(id... |
29,200,680 | ```
v=["there", 3, "9","hello",25]
x=values[1]+values.int[2]
#I want to make 9 an integer so I could get the sum of 3 and 9. Im getting an
error
```
I already tried using the int function on values[2], and i am getting the error
Traceback (most recent call last):
File "/Users/tigersoprano/Documents/text2.py", line ... | 2015/03/22 | [
"https://Stackoverflow.com/questions/29200680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4317506/"
] | ```
callUs.show(getFragmentManager(), "SOME_TAG");
```
And I think you have to switch your activity to FragmentActivity and repalce getFragmentManager() with getSupportFragmentManager() as your DialogFragment extends version from Support Library | This is a good guide: <http://android-developers.blogspot.com/2012/05/using-dialogfragments.html>
```
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
// ...
public class FragmentDialogDemo extends FragmentActivity implements EditNameDialogListener {
@Override
public voi... |
53,039,672 | I have this transparent image that I want to fill a specific color inside of the transparent part.
[](https://i.stack.imgur.com/jKiiG.png)
I have been able to fill up this image a specific color I want, but the problem is that the color is also filling up the outside part ... | 2018/10/29 | [
"https://Stackoverflow.com/questions/53039672",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | It looks like the parent is a LinearLayout with some 'weightsum', which is why the width of the ImageButton is uncertain.
You could create a framelayout which would contain this imagebutton and another layout (with the same width and height as the imagebutton) underlying the imagebutton. Something like this:
```
... | try to build by adding theses
```
android:adjustViewBounds="true"
android:scaleType="fitXY"
```
if your image ratio affected by above change you can use
```
android:scaleType="fitCenter"
``` |
467,849 | The phrase "choose your battles" conceptualises encounters as adversarial.
Any suggestions for less adversarial alternatives? | 2018/10/11 | [
"https://english.stackexchange.com/questions/467849",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/9121/"
] | Distilling the central meanings from the "battles" idiom, the phrases "**save your strength**" or "**don't waste your time**" comes close without invoking confrontation or combat. They could even be used together.
Or, as an alternative, someone might "**consider the cost**" and ask themselves "**Is it worth it?**".
<... | It occurred to me just a few days ago that “choose your battles”
(or, alternatively, [“pick your battles”](https://idioms.thefreedictionary.com/pick+your+battles))
is basically an abbreviated form of [The Serenity Prayer](https://en.wikipedia.org/wiki/Serenity_Prayer),
>
> God, grant me the serenity to accept the thi... |
7,075,549 | I want to perform an action based on the `Spinner`s selected value inside of the `Button`s `onClick()` method.
How I get the selected item of a `Spinner`?
My code:
```
spinner = (Spinner) findViewById(R.id.spinner);
btnConvert = (Button) findViewById(R.id.btnConvert);
btnConvert.setOnClickListener(new OnClickListen... | 2011/08/16 | [
"https://Stackoverflow.com/questions/7075549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/371720/"
] | [`alloca()`](http://linux.die.net/man/3/alloca) is what you're looking for. Of course, if you know your structures dimensions statically, it'd be better to use local variables instead. | C99 also allows you to allocate variable length arrays (VLAs) and other variables at any point within a function, not just at the start, so your point about being able to allocate the memory elsewhere is moot.
You can just plug in a:
```
int arr[somevar];
```
anywhere in the function and have it actioned.
With VLA... |
7,075,549 | I want to perform an action based on the `Spinner`s selected value inside of the `Button`s `onClick()` method.
How I get the selected item of a `Spinner`?
My code:
```
spinner = (Spinner) findViewById(R.id.spinner);
btnConvert = (Button) findViewById(R.id.btnConvert);
btnConvert.setOnClickListener(new OnClickListen... | 2011/08/16 | [
"https://Stackoverflow.com/questions/7075549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/371720/"
] | C99 also allows you to allocate variable length arrays (VLAs) and other variables at any point within a function, not just at the start, so your point about being able to allocate the memory elsewhere is moot.
You can just plug in a:
```
int arr[somevar];
```
anywhere in the function and have it actioned.
With VLA... | As far as I am aware, converting heap allocations to stack allocations is a library thing, not something that the compiler has any control over. Indeed, on Linux, `malloc` uses the [`brk`](http://linux.die.net/man/2/brk) system call (which resizes the stack) rather than use [`mmap`](http://linux.die.net/man/2/mmap), ex... |
7,075,549 | I want to perform an action based on the `Spinner`s selected value inside of the `Button`s `onClick()` method.
How I get the selected item of a `Spinner`?
My code:
```
spinner = (Spinner) findViewById(R.id.spinner);
btnConvert = (Button) findViewById(R.id.btnConvert);
btnConvert.setOnClickListener(new OnClickListen... | 2011/08/16 | [
"https://Stackoverflow.com/questions/7075549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/371720/"
] | [`alloca()`](http://linux.die.net/man/3/alloca) is what you're looking for. Of course, if you know your structures dimensions statically, it'd be better to use local variables instead. | As far as I am aware, converting heap allocations to stack allocations is a library thing, not something that the compiler has any control over. Indeed, on Linux, `malloc` uses the [`brk`](http://linux.die.net/man/2/brk) system call (which resizes the stack) rather than use [`mmap`](http://linux.die.net/man/2/mmap), ex... |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | ```
pip install wheel
```
worked for me, but you can also add this
```
setup(
...
setup_requires=['wheel']
)
```
to setup.py and save yourself a pip install command | as @Philippe Remy mention,
should import from `setuptools`
```
from setuptools import setup
```
reference: Official doc <https://setuptools.pypa.io/en/latest/index.html> |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | If you already have all the required modules installed you probably need to import the `setuptools` module in your `setup.py` file. So just add the following line at the leading of `setup.py` file.
```
import setuptools
from distutils.core import setup
# other imports and setups
```
This is also mentioned in wheel's... | Using Ubuntu 18.04 this problem can be resolved by installing the `python3-wheel`package.
Usually this is installed as a dependency on any Python package. But especially when building container images you often work with `--no-install-recommends` and therefore it is often missing and has to be installed manually first... |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | If you already have all the required modules installed you probably need to import the `setuptools` module in your `setup.py` file. So just add the following line at the leading of `setup.py` file.
```
import setuptools
from distutils.core import setup
# other imports and setups
```
This is also mentioned in wheel's... | It helped me to follow instructions in here:
<https://packaging.python.org/guides/installing-using-linux-tools/>
**Debian/Ubuntu**
Python 2:
```
sudo apt install python-pip
```
Python 3:
```
sudo apt install python3-venv python3-pip
``` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | On a AWS `Ubuntu 18.04 new machine`, below installations are required:
```
sudo apt-get install gcc libpq-dev -y
sudo apt-get install python-dev python-pip -y
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
pip3 install wheel
```
Especially the last line is a must.
However before 3 lin... | Perhaps, your pip version is outdated. I experienced the same problem in WSL while installing modules in a newly created virtual environment. I was able to resolve it by running the following command:
```sh
$ ./bin/python3 -m pip install --upgrade pip
``` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | Perhaps, your pip version is outdated. I experienced the same problem in WSL while installing modules in a newly created virtual environment. I was able to resolve it by running the following command:
```sh
$ ./bin/python3 -m pip install --upgrade pip
``` | It helped me to follow instructions in here:
<https://packaging.python.org/guides/installing-using-linux-tools/>
**Debian/Ubuntu**
Python 2:
```
sudo apt install python-pip
```
Python 3:
```
sudo apt install python3-venv python3-pip
``` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | ```
pip install wheel
```
worked for me, but you can also add this
```
setup(
...
setup_requires=['wheel']
)
```
to setup.py and save yourself a pip install command | Perhaps, your pip version is outdated. I experienced the same problem in WSL while installing modules in a newly created virtual environment. I was able to resolve it by running the following command:
```sh
$ ./bin/python3 -m pip install --upgrade pip
``` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | ```
pip install wheel
```
worked for me, but you can also add this
```
setup(
...
setup_requires=['wheel']
)
```
to setup.py and save yourself a pip install command | It helped me to follow instructions in here:
<https://packaging.python.org/guides/installing-using-linux-tools/>
**Debian/Ubuntu**
Python 2:
```
sudo apt install python-pip
```
Python 3:
```
sudo apt install python3-venv python3-pip
``` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | This problem is due to:
* an old version of pip (6.1.1) being installed for Python 2.7
* multiple copies of Python 2.7 installed on the Trusty Beta image
* a different location for Python 2.7 being used for `sudo`
It's all a bit complicated and better explained here <https://github.com/travis-ci/travis-ci/issues/4989... | I did `apt-get install python3-dev` in my Ubuntu and added `setup_requires=["wheel"]` in `setup.py` |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | in my case, the version of wheel/pip/setuptools created by venv is too old.
this works:
```
venv/bin/pip install --upgrade pip wheel setuptools
``` | Not related to Travis CI but
I ran into similar problem trying to install `jupyter` on my Mac OSX 10.8.5, and none of the other answers was of help. The problem was caused by building the "wheel" for the package called `pyzmq`, with error messages filling hundreds of pages.
The solution I found was to directly install... |
34,819,221 | My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this:
```
sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.... | 2016/01/15 | [
"https://Stackoverflow.com/questions/34819221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4625911/"
] | On a AWS `Ubuntu 18.04 new machine`, below installations are required:
```
sudo apt-get install gcc libpq-dev -y
sudo apt-get install python-dev python-pip -y
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
pip3 install wheel
```
Especially the last line is a must.
However before 3 lin... | In your `setup.py`, if you have:
```
from distutils.core import setup
```
Then, change it to
```
from setuptools import setup
```
Then re-create your virtualenv and re-run the command, and it should work. |
39,762,405 | I'm looking for a clean solution for formatting [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) objects with optional parts. My date object can be a timestamp value, a time-only value or a date-only value.
### Expected output
I would like to display the date value like this:
If the date's [ms v... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39762405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1504556/"
] | Instead of `java.util.Date` use the appropriate class in the `java.time` package. This means you can explicitly have separate methods for your `LocalDate`, `LocalTime` or `LocalDateTime`, and it makes the code cleaner.
Now, if you're stuck with a `java.util.Date` and there's nothing you can do about it, you should use... | I think you need multiple SimpleDateFormat objects for it. Your code may look like this:
```
SimpleDateFormat timeOnlySdf = new SimpleDateFormat( "HH:mm:ss.SSS");
SimpleDateFormat dateOnlySdf = new SimpleDateFormat( "yyyy-MM-dd");
SimpleDateFormat dateAndTimeSdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS");
Dat... |
39,762,405 | I'm looking for a clean solution for formatting [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) objects with optional parts. My date object can be a timestamp value, a time-only value or a date-only value.
### Expected output
I would like to display the date value like this:
If the date's [ms v... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39762405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1504556/"
] | First step
==========
Convert `Date` into a Java 8 equivalent structure:
```
private static TemporalAccessor toJava8Time(Date date) {
Instant instant = date.toInstant();
if (instant.isBefore(Instant.ofEpochSecond(86400))) {
return instant.atZone(ZoneId.systemDefault()).toLocalTime();
} else if (i... | Instead of `java.util.Date` use the appropriate class in the `java.time` package. This means you can explicitly have separate methods for your `LocalDate`, `LocalTime` or `LocalDateTime`, and it makes the code cleaner.
Now, if you're stuck with a `java.util.Date` and there's nothing you can do about it, you should use... |
39,762,405 | I'm looking for a clean solution for formatting [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) objects with optional parts. My date object can be a timestamp value, a time-only value or a date-only value.
### Expected output
I would like to display the date value like this:
If the date's [ms v... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39762405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1504556/"
] | You can try importing and using [`java.sql.Time`](https://docs.oracle.com/javase/7/docs/api/java/sql/Time.html) similar to this:
```java
import java.sql.Time;
public class Example {
public static void main(String[] args) {
Time ex = new Time( Date.getTime() ); //param: long
System.out.println(ex.t... | I think you need multiple SimpleDateFormat objects for it. Your code may look like this:
```
SimpleDateFormat timeOnlySdf = new SimpleDateFormat( "HH:mm:ss.SSS");
SimpleDateFormat dateOnlySdf = new SimpleDateFormat( "yyyy-MM-dd");
SimpleDateFormat dateAndTimeSdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS");
Dat... |
39,762,405 | I'm looking for a clean solution for formatting [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) objects with optional parts. My date object can be a timestamp value, a time-only value or a date-only value.
### Expected output
I would like to display the date value like this:
If the date's [ms v... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39762405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1504556/"
] | First step
==========
Convert `Date` into a Java 8 equivalent structure:
```
private static TemporalAccessor toJava8Time(Date date) {
Instant instant = date.toInstant();
if (instant.isBefore(Instant.ofEpochSecond(86400))) {
return instant.atZone(ZoneId.systemDefault()).toLocalTime();
} else if (i... | You can try importing and using [`java.sql.Time`](https://docs.oracle.com/javase/7/docs/api/java/sql/Time.html) similar to this:
```java
import java.sql.Time;
public class Example {
public static void main(String[] args) {
Time ex = new Time( Date.getTime() ); //param: long
System.out.println(ex.t... |
39,762,405 | I'm looking for a clean solution for formatting [Date](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html) objects with optional parts. My date object can be a timestamp value, a time-only value or a date-only value.
### Expected output
I would like to display the date value like this:
If the date's [ms v... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39762405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1504556/"
] | First step
==========
Convert `Date` into a Java 8 equivalent structure:
```
private static TemporalAccessor toJava8Time(Date date) {
Instant instant = date.toInstant();
if (instant.isBefore(Instant.ofEpochSecond(86400))) {
return instant.atZone(ZoneId.systemDefault()).toLocalTime();
} else if (i... | I think you need multiple SimpleDateFormat objects for it. Your code may look like this:
```
SimpleDateFormat timeOnlySdf = new SimpleDateFormat( "HH:mm:ss.SSS");
SimpleDateFormat dateOnlySdf = new SimpleDateFormat( "yyyy-MM-dd");
SimpleDateFormat dateAndTimeSdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS");
Dat... |
785,265 | I have data template dt1 in sitecore that has the field "header" in section "data".
I also have data template dt2 that has the field "header" in section "portal"
Finally I have data template dt3 that uses both dt1 and dt2 as base templates.
How can I, in xslt, find the content of portal/header?
In my code, when I wri... | 2009/04/24 | [
"https://Stackoverflow.com/questions/785265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83540/"
] | You can't.
And frankly I don't know of any supported way to do it from .NET either.
This, straight out of the [Data Definition Reference](http://sdn.sitecore.net/upload/sitecore6/datadefinitionreference-a4.pdf), section 2.1.1
>
> 2.1.1 Data Template Fields
>
>
> A data template field defines the user
> interface... | You can reference fields by their IDs:
C#:
`string value = item["{00000000-0000-0000-000000000000}"]`
or
`Field field = item.Fields["{00000000-0000-0000-000000000000}"]`
I haven't tried this, but I think it'll work in XSLT as well:
`<sc:text field="{00000000-0000-0000-000000000000}" />` |
785,265 | I have data template dt1 in sitecore that has the field "header" in section "data".
I also have data template dt2 that has the field "header" in section "portal"
Finally I have data template dt3 that uses both dt1 and dt2 as base templates.
How can I, in xslt, find the content of portal/header?
In my code, when I wri... | 2009/04/24 | [
"https://Stackoverflow.com/questions/785265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83540/"
] | You can't.
And frankly I don't know of any supported way to do it from .NET either.
This, straight out of the [Data Definition Reference](http://sdn.sitecore.net/upload/sitecore6/datadefinitionreference-a4.pdf), section 2.1.1
>
> 2.1.1 Data Template Fields
>
>
> A data template field defines the user
> interface... | I found a way around this in .Net on a project I was working on. One of the templates that the client had set up had "Buckets" which had different field sections, but the fields within were the same between buckets. I used LINQ to group the fields by Section name, then dealt with each grouping of fields.
```
var secti... |
785,265 | I have data template dt1 in sitecore that has the field "header" in section "data".
I also have data template dt2 that has the field "header" in section "portal"
Finally I have data template dt3 that uses both dt1 and dt2 as base templates.
How can I, in xslt, find the content of portal/header?
In my code, when I wri... | 2009/04/24 | [
"https://Stackoverflow.com/questions/785265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83540/"
] | You can't.
And frankly I don't know of any supported way to do it from .NET either.
This, straight out of the [Data Definition Reference](http://sdn.sitecore.net/upload/sitecore6/datadefinitionreference-a4.pdf), section 2.1.1
>
> 2.1.1 Data Template Fields
>
>
> A data template field defines the user
> interface... | ```
item.Fields.Where(field => field.Section.ToUpper() == "META DATA" &&
field.DisplayName.ToUpper() == "TITLE").First().Value;
``` |
8,505,672 | In my current project I'm testing one web application against different browsers.
so I've got one selenium/maven project and 16 jobs in `jenkins`: tests in IE8, 9, FF, Chrome, windows 7, windows xp, 32 and 64 bit environments
Jobs results are generating sourcefire reports and I've got nice and clean overall charts.
B... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8505672",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/970007/"
] | You should probably be using the "matrix" job type, called "Build multi-configuration project" in the New Job page.
There you configure the job once, and it gets executed automatically multiple times across all the combinations of axes you supply
I'm not sure about the specifics of Selenium with Jenkins, but you woul... | Have you tried **Test Results Analyzer** plugin in Jenkins?
<https://wiki.jenkins-ci.org/display/JENKINS/Test+Results+Analyzer+Plugin> |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | This is weird, because I find without a Read Eval Print Loop (REPL) in the languages you're used to, I'm forever frustrated by how much work it is to test my code as I go along. The REPL is fundamental to my incremental code development; you can use it to test your code *without* having to add a bunch of print statemen... | Approximation:
1. GHCi debugging is the way to print local variables without cluttering your code.
2. A WriterT monad transformer, either strict or lazy, can serialize your logs if you return your traced value, paired with the result.
```
{-# LANGUAGE PackageImports #-}
-- import qualified "transformers" Control.Mona... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | There is no good way to do what you want. You can get close with `Debug.Trace` but I don't recommend that while learning because of Haskell's non standard evaluation order. Haskell does not work by sequentially setting the value of "variables" in the way languages like C and C++ do. Because it is lazy, Haskell expressi... | It is possible to quickly add impure debugging output to a pure function using the `trace` function of the [Debug.Trace](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) module. It is a function that returns its second argument with the additional side effect of printing the first argu... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | This is weird, because I find without a Read Eval Print Loop (REPL) in the languages you're used to, I'm forever frustrated by how much work it is to test my code as I go along. The REPL is fundamental to my incremental code development; you can use it to test your code *without* having to add a bunch of print statemen... | It is possible to quickly add impure debugging output to a pure function using the `trace` function of the [Debug.Trace](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) module. It is a function that returns its second argument with the additional side effect of printing the first argu... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | First, you can debug your functions by loading them into `ghci` and playing with them there.
Then, you can use `trace` from [`Debug.Trace`](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) to print a string when an expression is evaluated. However be aware that since Haskell uses laz... | There is a fairly short example [here](http://en.wikibooks.org/wiki/Haskell/Practical_monads#Generic_monads) of how to construct something that seems similar to what you describe. If I am reading it correctly, the author creates a simple monad that allows you to print out in the middle of computations, so to speak. |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | First, you can debug your functions by loading them into `ghci` and playing with them there.
Then, you can use `trace` from [`Debug.Trace`](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) to print a string when an expression is evaluated. However be aware that since Haskell uses laz... | Approximation:
1. GHCi debugging is the way to print local variables without cluttering your code.
2. A WriterT monad transformer, either strict or lazy, can serialize your logs if you return your traced value, paired with the result.
```
{-# LANGUAGE PackageImports #-}
-- import qualified "transformers" Control.Mona... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | There is no good way to do what you want. You can get close with `Debug.Trace` but I don't recommend that while learning because of Haskell's non standard evaluation order. Haskell does not work by sequentially setting the value of "variables" in the way languages like C and C++ do. Because it is lazy, Haskell expressi... | First, you can debug your functions by loading them into `ghci` and playing with them there.
Then, you can use `trace` from [`Debug.Trace`](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) to print a string when an expression is evaluated. However be aware that since Haskell uses laz... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | It is possible to quickly add impure debugging output to a pure function using the `trace` function of the [Debug.Trace](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) module. It is a function that returns its second argument with the additional side effect of printing the first argu... | There is a fairly short example [here](http://en.wikibooks.org/wiki/Haskell/Practical_monads#Generic_monads) of how to construct something that seems similar to what you describe. If I am reading it correctly, the author creates a simple monad that allows you to print out in the middle of computations, so to speak. |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | This is weird, because I find without a Read Eval Print Loop (REPL) in the languages you're used to, I'm forever frustrated by how much work it is to test my code as I go along. The REPL is fundamental to my incremental code development; you can use it to test your code *without* having to add a bunch of print statemen... | First, you can debug your functions by loading them into `ghci` and playing with them there.
Then, you can use `trace` from [`Debug.Trace`](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) to print a string when an expression is evaluated. However be aware that since Haskell uses laz... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | It is possible to quickly add impure debugging output to a pure function using the `trace` function of the [Debug.Trace](http://hackage.haskell.org/packages/archive/base/latest/doc/html/Debug-Trace.html) module. It is a function that returns its second argument with the additional side effect of printing the first argu... | Approximation:
1. GHCi debugging is the way to print local variables without cluttering your code.
2. A WriterT monad transformer, either strict or lazy, can serialize your logs if you return your traced value, paired with the result.
```
{-# LANGUAGE PackageImports #-}
-- import qualified "transformers" Control.Mona... |
14,796,464 | I'd like to split the following GST command into two halves using shell script.
`/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukBQHpCAAAH0AAB1MAI\\,aM48gA\\=\\=\", payload=(i... | 2013/02/10 | [
"https://Stackoverflow.com/questions/14796464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2058518/"
] | This is weird, because I find without a Read Eval Print Loop (REPL) in the languages you're used to, I'm forever frustrated by how much work it is to test my code as I go along. The REPL is fundamental to my incremental code development; you can use it to test your code *without* having to add a bunch of print statemen... | There is a fairly short example [here](http://en.wikibooks.org/wiki/Haskell/Practical_monads#Generic_monads) of how to construct something that seems similar to what you describe. If I am reading it correctly, the author creates a simple monad that allows you to print out in the middle of computations, so to speak. |
13,902,438 | I have three entities with relation `UserDetails` hasmany `FiledTask` and `Task` hasMany `FiledTask`. All I want is list of `FiledTask` of particular `User`
For UserDetails:
```
@OneToMany(mappedBy="user",cascade=CascadeType.ALL)
Collection<FiledTask> filedTasks = new ArrayList<FiledTask>();
```
And for Tasks I hav... | 2012/12/16 | [
"https://Stackoverflow.com/questions/13902438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1212044/"
] | If you want the FiledTasks of a given user, then the easiest thing to do is
```
UserDetails user = session.find(UserDetails.class, userId);
Collection<FiledTask> filesTasks = user.getFiledTasks();
```
Using HQL, it would be
```
select f from FiledTask f where f.user = :user
```
If what you want is in fact the tas... | OK, looks like there is a bug in Hibernate
<https://hibernate.atlassian.net/browse/HHH-2772>
I think in your case what you need to do is
```
query = session.createQuery("from Tasks as tasks inner join tasks.filedTasks as files with files.user.id = :userId");
query.setParameter("userId", user.id);
```
Hope this h... |
13,902,438 | I have three entities with relation `UserDetails` hasmany `FiledTask` and `Task` hasMany `FiledTask`. All I want is list of `FiledTask` of particular `User`
For UserDetails:
```
@OneToMany(mappedBy="user",cascade=CascadeType.ALL)
Collection<FiledTask> filedTasks = new ArrayList<FiledTask>();
```
And for Tasks I hav... | 2012/12/16 | [
"https://Stackoverflow.com/questions/13902438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1212044/"
] | If you want the FiledTasks of a given user, then the easiest thing to do is
```
UserDetails user = session.find(UserDetails.class, userId);
Collection<FiledTask> filesTasks = user.getFiledTasks();
```
Using HQL, it would be
```
select f from FiledTask f where f.user = :user
```
If what you want is in fact the tas... | I had the same problem using a MySql (Inno) DB plus my dialect class derived from Hibernate's `MySQL5InnoDBDialect` - class.
I had to override the `supportsRowValueConstructorSyntax-method` and let it return `false` as MySQLDialect (which is the base class of MySQL5InnoDBDialect) returns `true`.
```
@Override
public ... |
13,902,438 | I have three entities with relation `UserDetails` hasmany `FiledTask` and `Task` hasMany `FiledTask`. All I want is list of `FiledTask` of particular `User`
For UserDetails:
```
@OneToMany(mappedBy="user",cascade=CascadeType.ALL)
Collection<FiledTask> filedTasks = new ArrayList<FiledTask>();
```
And for Tasks I hav... | 2012/12/16 | [
"https://Stackoverflow.com/questions/13902438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1212044/"
] | OK, looks like there is a bug in Hibernate
<https://hibernate.atlassian.net/browse/HHH-2772>
I think in your case what you need to do is
```
query = session.createQuery("from Tasks as tasks inner join tasks.filedTasks as files with files.user.id = :userId");
query.setParameter("userId", user.id);
```
Hope this h... | I had the same problem using a MySql (Inno) DB plus my dialect class derived from Hibernate's `MySQL5InnoDBDialect` - class.
I had to override the `supportsRowValueConstructorSyntax-method` and let it return `false` as MySQLDialect (which is the base class of MySQL5InnoDBDialect) returns `true`.
```
@Override
public ... |
219,759 | I currently manage a library which has a lot of public usage, and I had a question about [semantic versioning](http://semver.org/). I want to refactor one fairly important part of the library which is implemented incorrectly - and has always been implemented incorrectly. But doing this would mean changes to the public ... | 2013/11/28 | [
"https://softwareengineering.stackexchange.com/questions/219759",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/34752/"
] | You hesitate because you don't want to make semantic versioning, you want to make "advertisement supporting versioning". You expect a version number "2.0" to tell the world that you have a bunch of new cool features in your library now, not that you changed the API. That's ok (many software companies and/or developers ... | Stick with Tom's guide to semantic versioning.
Any significant change to a public API *must* be done at either of the two points:
1. **Never**
2. At a major release update
My vote, by the way, is for the first. But I acknowledge it's only appropriate for trifling things.
The problem is maintaining backwards compati... |
293,539 | Since the Lorentz group $SO(3,1)$ is non-compact, it doesn't have any finite dimensional unitary irreducible representation. Is this theorem really valid?
One can take complex linear combinations of hermitian angular momentum generator $J\_i^\dagger=J\_i$ boost generator $K\_i^\dagger=-K\_i$ to construct two hermitian... | 2016/11/19 | [
"https://physics.stackexchange.com/questions/293539",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/36793/"
] | The statement "Non-compact groups don't have finite-dimensional unitary representations" is a *heuristic*, not a fact. $(\mathbb{R},+)$ is a non-compact Lie group that has non-trivial finite-dimensional unitary representations. However, the Poincaré group and the Lorentz group *really* don't have any finite-dimensional... | $SO(1,3)$ is a **real** Lie group so its Lie algebra is real too, you are not allowed to combine generators with complex coefficients if you are looking for representation of that group. Referring to the (non-unitary) fundamental representation made of $4 \times 4$ real matrices you consider, $N\_i^\pm$ does not belong... |
46,821 | I am on my second 12v motorcycle battery in a couple of weeks. Will a faulty regulator, ie too higher volts, cause this?
Also I have upgraded my ct110 to a 160cc, all works well for a few days, then gone.
Cheers | 2017/08/04 | [
"https://mechanics.stackexchange.com/questions/46821",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/31427/"
] | Yes, a bad regulator will cause your motorcycle battery to be overcharged. This is a common failure because of the way motorcycle alternators work.
Measure the battery voltage while the engine is running. It should be between 12V and maybe 14.8V max. Now rev up the engine and see if the voltage shoots above that. If i... | I believe you mean alternator. It charges your battery when your motorcycle is running.
The alternator needs to output 12.6V to 14.4V when it's working fine, use a multimeter to check it out. |
8,321,649 | Markdown is important for documentation, it is very nice to see `README.md` can be automatically show in html format in github like <https://github.com/twitter/bootstrap/blob/master/README.md>
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/s... | 2011/11/30 | [
"https://Stackoverflow.com/questions/8321649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308174/"
] | I use following post-receive hook in my remote repositories which are made browsable with gitweb.
```
#!/bin/sh
#
# Post-receive hook script which generates README.html to git-dir from
# README.md found at the head of master branch in repository.
#
# Gitweb can read the README.html and embed it to the project summary ... | I use this tampermonkey script in chrome to render README.md files as html, directly in gitweb:
<https://gist.github.com/nemoo/ee47cd9ad2a5b4fdddfa> Works nicely even if you do not have access to the gitweb server. |
8,321,649 | Markdown is important for documentation, it is very nice to see `README.md` can be automatically show in html format in github like <https://github.com/twitter/bootstrap/blob/master/README.md>
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/s... | 2011/11/30 | [
"https://Stackoverflow.com/questions/8321649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308174/"
] | I use following post-receive hook in my remote repositories which are made browsable with gitweb.
```
#!/bin/sh
#
# Post-receive hook script which generates README.html to git-dir from
# README.md found at the head of master branch in repository.
#
# Gitweb can read the README.html and embed it to the project summary ... | Here are my modifications to `gitweb.cgi` based on the accepted answer, so that:
* `README.md` in the project root is displayed (as in accepted answer)
* Any `*.md` file is displayed if it is chosen as file from the tree view
* local links among .md files in a project are preserved (i.e. `(my parent)[../parent.md]` wo... |
8,321,649 | Markdown is important for documentation, it is very nice to see `README.md` can be automatically show in html format in github like <https://github.com/twitter/bootstrap/blob/master/README.md>
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/s... | 2011/11/30 | [
"https://Stackoverflow.com/questions/8321649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308174/"
] | Here's something you can stick somewhere under `sub git_summary` in your `gitweb.perl` or `gitweb.cgi`. Note that it depends on an external `markdown` executable.
```
if (!$prevent_xss) {
$file_name = "README.md";
my $proj_head_hash = git_get_head_hash($project);
my $readme_blob_hash = git_get_hash_by_path... | I use this tampermonkey script in chrome to render README.md files as html, directly in gitweb:
<https://gist.github.com/nemoo/ee47cd9ad2a5b4fdddfa> Works nicely even if you do not have access to the gitweb server. |
8,321,649 | Markdown is important for documentation, it is very nice to see `README.md` can be automatically show in html format in github like <https://github.com/twitter/bootstrap/blob/master/README.md>
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/s... | 2011/11/30 | [
"https://Stackoverflow.com/questions/8321649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308174/"
] | Here's something you can stick somewhere under `sub git_summary` in your `gitweb.perl` or `gitweb.cgi`. Note that it depends on an external `markdown` executable.
```
if (!$prevent_xss) {
$file_name = "README.md";
my $proj_head_hash = git_get_head_hash($project);
my $readme_blob_hash = git_get_hash_by_path... | Here are my modifications to `gitweb.cgi` based on the accepted answer, so that:
* `README.md` in the project root is displayed (as in accepted answer)
* Any `*.md` file is displayed if it is chosen as file from the tree view
* local links among .md files in a project are preserved (i.e. `(my parent)[../parent.md]` wo... |
8,321,649 | Markdown is important for documentation, it is very nice to see `README.md` can be automatically show in html format in github like <https://github.com/twitter/bootstrap/blob/master/README.md>
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/s... | 2011/11/30 | [
"https://Stackoverflow.com/questions/8321649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308174/"
] | Here are my modifications to `gitweb.cgi` based on the accepted answer, so that:
* `README.md` in the project root is displayed (as in accepted answer)
* Any `*.md` file is displayed if it is chosen as file from the tree view
* local links among .md files in a project are preserved (i.e. `(my parent)[../parent.md]` wo... | I use this tampermonkey script in chrome to render README.md files as html, directly in gitweb:
<https://gist.github.com/nemoo/ee47cd9ad2a5b4fdddfa> Works nicely even if you do not have access to the gitweb server. |
2,233,707 | Given Hilbert spaces $ H\_1, H\_2, \cdots $ with inner products $ \langle\cdot,\cdot\rangle\_1,\langle\cdot,\cdot\rangle\_2, \cdots $ and norms $ \|\cdot\|\_1, \|\cdot\|\_2, \cdots, $ respectively, consider
$$ \bigoplus\_{n=1}^\infty H\_n=\left\{ \underline{x}=(x\_1, x\_2, \cdots )\in \prod\_{n=1}^{\infty}H\_n:\sum\_{n... | 2017/04/14 | [
"https://math.stackexchange.com/questions/2233707",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/391944/"
] | This is false. Let $M$ be the interval $(0,1)$. Let $\mu$ be a finite, purely singular measure (i.e., singular with respect to the Lebesgue measure) on $M$ that has no atoms and satisfies $\mu(I)>0$ for every nontrivial subinterval $I\subset (0,1)$ ([an example of such $\mu$](https://math.stackexchange.com/a/612806)). ... | I want to reply to your comment in
<https://mathoverflow.net/questions/264873/do-curvature-differences-obstruct-a-e-orientation-preserving-isometries/267163#267163>
**Question** : Assume that $$f :B\rightarrow
\mathbb{E}^2$$ is a map s.t.
(1) $B$ is a geodesic ball in $S^2(1)$ of radius $\varepsilon$
(2) $df$ is i... |
12,555,348 | I've been doing some research on php error handling as well as exception handling.
For instance, to handle user errors, it is best to use `set_error_handler()` for user errors. Example code:
```
// Destinations
define("ADMIN_EMAIL", "nobody@stanford.edu");
define("LOG_FILE", "/my/home/errors.log");
// Destination ... | 2012/09/23 | [
"https://Stackoverflow.com/questions/12555348",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1599549/"
] | >
> My question is whether or not these examples are generally considered appropriate to handle errors in a production setting, or if anything is blatantly incorrect or lacking.
>
>
>
Yes it is. You just have to be sure that you catch ALL generated exception.
I also want to remember you that if there is a syntha... | There are approaches to handle all errors as exceptions, and that's fine, I've done so on one or two projects and I'm satisfied with the results.
However do note this, even Warnings and Notices will become fatal (as Exceptions are fatal if not catch'ed).
Also, syntax errors won't be handled as Exceptions, as they are ... |
12,555,348 | I've been doing some research on php error handling as well as exception handling.
For instance, to handle user errors, it is best to use `set_error_handler()` for user errors. Example code:
```
// Destinations
define("ADMIN_EMAIL", "nobody@stanford.edu");
define("LOG_FILE", "/my/home/errors.log");
// Destination ... | 2012/09/23 | [
"https://Stackoverflow.com/questions/12555348",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1599549/"
] | >
> My question is whether or not these examples are generally considered appropriate to handle errors in a production setting, or if anything is blatantly incorrect or lacking.
>
>
>
Yes it is. You just have to be sure that you catch ALL generated exception.
I also want to remember you that if there is a syntha... | >
> My question is whether or not these examples are generally considered appropriate to handle errors in a production setting, or if anything is blatantly incorrect or lacking.
>
>
>
`PHP Errors` Yes .. they are good you just need better storage for your errors especially if you are working with multiple servers ... |
5,797,423 | I'm learning C and I am having a hard time understanding loops and the usage of modulo. I know Loops are used to shorten up the program and Modulo's are used to get out the remainder. My assignment was to "Write a C program to find the sum of an individual positive integer".
I just spent few hours trying to understand... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5797423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/726245/"
] | Taking the modulo in `d = n % 10` makes `d` equal to the last digit of `n` in base 10. `n = n / 10` removes the last digit from `n`.
Modulo is essentially taking the remainder, so let's say `n = 123`. Then `n / 10` is `12` and `n % 10` is `3`.
Removing the `n = n / 10` means that `n` doesn't change between each run... | Imagine you have a piece of paper with a hole in it just big enough to show one digit. To get the sum of the digits you have to put that paper over your number so the ones digit shows. You write that digit down somewhere. Then you slide your number to the right so that the tens digit is under the hole. You add that to ... |
5,797,423 | I'm learning C and I am having a hard time understanding loops and the usage of modulo. I know Loops are used to shorten up the program and Modulo's are used to get out the remainder. My assignment was to "Write a C program to find the sum of an individual positive integer".
I just spent few hours trying to understand... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5797423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/726245/"
] | Taking the modulo in `d = n % 10` makes `d` equal to the last digit of `n` in base 10. `n = n / 10` removes the last digit from `n`.
Modulo is essentially taking the remainder, so let's say `n = 123`. Then `n / 10` is `12` and `n % 10` is `3`.
Removing the `n = n / 10` means that `n` doesn't change between each run... | Try these:
```
int n = 12;
printf("%d\n", n / 10);
int j = 12;
printf("%d\n", j % 10);
int x = 13;
x = x / 10; // right hand side of "=" get evaluated first
printf("%d\n", x);
```
Observe the output in each case.
Regarding your last point:
```
while (n > 0)
{
// some code.
}
```
This means: While the val... |
5,797,423 | I'm learning C and I am having a hard time understanding loops and the usage of modulo. I know Loops are used to shorten up the program and Modulo's are used to get out the remainder. My assignment was to "Write a C program to find the sum of an individual positive integer".
I just spent few hours trying to understand... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5797423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/726245/"
] | Imagine you have a piece of paper with a hole in it just big enough to show one digit. To get the sum of the digits you have to put that paper over your number so the ones digit shows. You write that digit down somewhere. Then you slide your number to the right so that the tens digit is under the hole. You add that to ... | Try these:
```
int n = 12;
printf("%d\n", n / 10);
int j = 12;
printf("%d\n", j % 10);
int x = 13;
x = x / 10; // right hand side of "=" get evaluated first
printf("%d\n", x);
```
Observe the output in each case.
Regarding your last point:
```
while (n > 0)
{
// some code.
}
```
This means: While the val... |
51,698,949 | When I enter 'data' in the Python code, this haunts after I push 'return' key. What should I do/disable?
[](https://i.stack.imgur.com/g1Oue.png) | 2018/08/05 | [
"https://Stackoverflow.com/questions/51698949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6213399/"
] | These are code snippets. you change them by going to
>
> File > Preferences > user snippets
>
>
>
then, in the pop search box '*type python*' it will open a ***python.json*** file, where you'll find all the snippets for python and change or delete them as per your requirements. Basically, snippets are for speed ... | To complet @Minhaz, you can also disable `acceptSelectedSuggestionOnEnter`, selections will only be accepted with TAB (but you can edit it with the Keyboard Shorcuts `acceptSelectedSuggestion`).
To do that, go into :
>
> File -> Preferences -> Keyboard Shorcuts
>
>
>
find `acceptSelectedSuggestionOnEnter`, right... |
51,698,949 | When I enter 'data' in the Python code, this haunts after I push 'return' key. What should I do/disable?
[](https://i.stack.imgur.com/g1Oue.png) | 2018/08/05 | [
"https://Stackoverflow.com/questions/51698949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6213399/"
] | These are code snippets. you change them by going to
>
> File > Preferences > user snippets
>
>
>
then, in the pop search box '*type python*' it will open a ***python.json*** file, where you'll find all the snippets for python and change or delete them as per your requirements. Basically, snippets are for speed ... | In settings, search `snippet`, choose `inline` for `Snippet Suggestions` instead of `top`. This will prevent these snippets occupying top lines.
[](https://i.stack.imgur.com/8829k.png) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.