qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
58,488 | What is the best free software for OS X Mountain Lion for enabling write support for FAT32 and NTFS? | 2012/07/30 | [
"https://apple.stackexchange.com/questions/58488",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/17423/"
] | At the moment, the only free way for NTFS write access without using abandoned software is using [NTFS-3G](http://www.tuxera.com/community/ntfs-3g-download/) along with [FUSE for OS X](http://osxfuse.github.com). There's a [guide](https://github.com/osxfuse/osxfuse/wiki/NTFS-3G) for that in the FUSE for OS X wiki.
If ... | Try NTFS-FREE, works for me on ML:
This program allows MacOSX to access Microsoft NTFS formatted harddrives connected by USB port. A modified version of the original Linux code, this program is packaged as a easy-to-use installer so that normal users can install it without hassle
<http://sourceforge.net/projects/ntfs... |
58,488 | What is the best free software for OS X Mountain Lion for enabling write support for FAT32 and NTFS? | 2012/07/30 | [
"https://apple.stackexchange.com/questions/58488",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/17423/"
] | At the moment, the only free way for NTFS write access without using abandoned software is using [NTFS-3G](http://www.tuxera.com/community/ntfs-3g-download/) along with [FUSE for OS X](http://osxfuse.github.com). There's a [guide](https://github.com/osxfuse/osxfuse/wiki/NTFS-3G) for that in the FUSE for OS X wiki.
If ... | Fuse4x + Ntfs-3g works on OS X Lion. All freeware.
1. Install [Homebrew](https://brew.sh/).
2. In Terminal, type `brew install Fuse4x`.
3. Next, type `brew install ntfs-3g`.
4. Type `brew info fuse4x-kext` . Enter the 2 lines of `$ sudo` code separately at the start of the text given.
5. Type `brew info ntfs-3g` . Ent... |
58,488 | What is the best free software for OS X Mountain Lion for enabling write support for FAT32 and NTFS? | 2012/07/30 | [
"https://apple.stackexchange.com/questions/58488",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/17423/"
] | At the moment, the only free way for NTFS write access without using abandoned software is using [NTFS-3G](http://www.tuxera.com/community/ntfs-3g-download/) along with [FUSE for OS X](http://osxfuse.github.com). There's a [guide](https://github.com/osxfuse/osxfuse/wiki/NTFS-3G) for that in the FUSE for OS X wiki.
If ... | As for me I use [Paragon NTFS for Mac](http://www.paragon-software.com/home/ntfs-mac/product_performance.html). Firstly, it is very fast, secondly, I can rely on it and I'm sure that it won't corrupt my files. Yes, it is commercial with 10-day trial but it is worth spending money. Moreover, it is cheaper than Tusera NT... |
58,488 | What is the best free software for OS X Mountain Lion for enabling write support for FAT32 and NTFS? | 2012/07/30 | [
"https://apple.stackexchange.com/questions/58488",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/17423/"
] | Try NTFS-FREE, works for me on ML:
This program allows MacOSX to access Microsoft NTFS formatted harddrives connected by USB port. A modified version of the original Linux code, this program is packaged as a easy-to-use installer so that normal users can install it without hassle
<http://sourceforge.net/projects/ntfs... | As for me I use [Paragon NTFS for Mac](http://www.paragon-software.com/home/ntfs-mac/product_performance.html). Firstly, it is very fast, secondly, I can rely on it and I'm sure that it won't corrupt my files. Yes, it is commercial with 10-day trial but it is worth spending money. Moreover, it is cheaper than Tusera NT... |
58,488 | What is the best free software for OS X Mountain Lion for enabling write support for FAT32 and NTFS? | 2012/07/30 | [
"https://apple.stackexchange.com/questions/58488",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/17423/"
] | Fuse4x + Ntfs-3g works on OS X Lion. All freeware.
1. Install [Homebrew](https://brew.sh/).
2. In Terminal, type `brew install Fuse4x`.
3. Next, type `brew install ntfs-3g`.
4. Type `brew info fuse4x-kext` . Enter the 2 lines of `$ sudo` code separately at the start of the text given.
5. Type `brew info ntfs-3g` . Ent... | As for me I use [Paragon NTFS for Mac](http://www.paragon-software.com/home/ntfs-mac/product_performance.html). Firstly, it is very fast, secondly, I can rely on it and I'm sure that it won't corrupt my files. Yes, it is commercial with 10-day trial but it is worth spending money. Moreover, it is cheaper than Tusera NT... |
66,548,239 | im trying to use:
firebase\_auth: ^1.0.0
firebase\_auth\_oauth: ^1.0.1
when i do this i get this error:
```
because ui_learn depends on firebase_auth_oauth >=1.0.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because ui_learn depends on firebase_auth_oauth >=1.0.0 which requi... | 2021/03/09 | [
"https://Stackoverflow.com/questions/66548239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14355670/"
] | The problem is that the `useEffect()` get called too late after the app has finished initializing. Therefore the listener is not added before the system has abandoned the notification, and the handler not called.
Fortunately, since you are using the new `expo-notifications` library, it introduced the `useLastNotificat... | You have to add this to your app.json file:
```
"android": {
"useNextNotificationsApi": true,
},
``` |
114,929 | I inherited a sandbox solution deployed to an SP2013 and I am currently struggeling to add a new feature version.
Somewhere I read that sandbox solutions are no longer soupported in 2013 - but I could not find any official statement on that.
The only nearly-official statement I found was on [http://blogs.msdn.com/]... | 2014/09/12 | [
"https://sharepoint.stackexchange.com/questions/114929",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/7045/"
] | Developing sandboxed solutions that contain only declarative markup and JavaScript -- which we call no-code sandboxed solutions (NCSS) -- is still viable, the use of custom managed code within the sandboxed solution is deprecated. They have introduced the new SharePoint app model as a replacement to those scenarios tha... | Official text on MSDN: <http://msdn.microsoft.com/library/office/jj163114.aspx>
Emphasis mine:
>
> While developing sandboxed solutions that contain **only declarative markup and JavaScript -- which we call no-code sandboxed solutions (NCSS)-- is still viable**, we have **deprecated the use of custom managed code** ... |
3,617 | For those with 10k rep, I deleted my original question to split it off into its separate parts so we can better address it. [What should we do to move forward on D&D 5e planning?](https://rpg.meta.stackexchange.com/questions/3608/what-should-we-do-to-move-forward-on-dd-5e-planning)
In reference to Grace's answer here:... | 2014/05/21 | [
"https://rpg.meta.stackexchange.com/questions/3617",
"https://rpg.meta.stackexchange.com",
"https://rpg.meta.stackexchange.com/users/3529/"
] | Let's treat it like an election:
People can nominate themselves and their plans for the books, established groups, and other public commitments, then the community can vote, using established SE voting mechanics. People can then judge on whatever merits they choose, including rep earned in the dnd-next tag.
Given tha... | How about we look at the [top users](https://rpg.stackexchange.com/tags/dnd-next/topusers) of the dnd-next tag.
From there you could take the top answerers and askers (both show interests). "Top" being defined as the activity on the subject not reputation. Minimal reputation would be good (like 2k so they can edit qu... |
3,617 | For those with 10k rep, I deleted my original question to split it off into its separate parts so we can better address it. [What should we do to move forward on D&D 5e planning?](https://rpg.meta.stackexchange.com/questions/3608/what-should-we-do-to-move-forward-on-dd-5e-planning)
In reference to Grace's answer here:... | 2014/05/21 | [
"https://rpg.meta.stackexchange.com/questions/3617",
"https://rpg.meta.stackexchange.com",
"https://rpg.meta.stackexchange.com/users/3529/"
] | How about we look at the [top users](https://rpg.stackexchange.com/tags/dnd-next/topusers) of the dnd-next tag.
From there you could take the top answerers and askers (both show interests). "Top" being defined as the activity on the subject not reputation. Minimal reputation would be good (like 2k so they can edit qu... | Just to make things simpler, I'm going to suggest that we offer the early resources to the top people in both questions and answers in the D&D 5e tag, giving first to the top answerer and second to the top questioner and then alternating. |
3,617 | For those with 10k rep, I deleted my original question to split it off into its separate parts so we can better address it. [What should we do to move forward on D&D 5e planning?](https://rpg.meta.stackexchange.com/questions/3608/what-should-we-do-to-move-forward-on-dd-5e-planning)
In reference to Grace's answer here:... | 2014/05/21 | [
"https://rpg.meta.stackexchange.com/questions/3617",
"https://rpg.meta.stackexchange.com",
"https://rpg.meta.stackexchange.com/users/3529/"
] | Let's treat it like an election:
People can nominate themselves and their plans for the books, established groups, and other public commitments, then the community can vote, using established SE voting mechanics. People can then judge on whatever merits they choose, including rep earned in the dnd-next tag.
Given tha... | Just to make things simpler, I'm going to suggest that we offer the early resources to the top people in both questions and answers in the D&D 5e tag, giving first to the top answerer and second to the top questioner and then alternating. |
8,500,414 | I'm making my way through the beginners tutorials for XNA (C#) and have veered off in my own direction once I learned rendering and positioning, having my own game development experience.
I'm trying to make a property `VelocityY` on my class `Ship`. I want to be able to increment this value by values that are decimal,... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8500414",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/699632/"
] | The type of the literal 0.45 is `double`. If you want to make it a float, use the suffix `f` or `F`, like the compiler error says:
```
VelocityY += 0.45F;
```
Basically, if you don't specify a suffix for a literal including a decimal point, it's implicitly `double`. You can use a suffix to make it explicit:
```
dec... | you should change
```
public float VelocityY = 0;
to
public double VelocityY = 0;
```
or
```
VelocityY += 0.45;
to
VelocityY += 0.45F;
``` |
8,500,414 | I'm making my way through the beginners tutorials for XNA (C#) and have veered off in my own direction once I learned rendering and positioning, having my own game development experience.
I'm trying to make a property `VelocityY` on my class `Ship`. I want to be able to increment this value by values that are decimal,... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8500414",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/699632/"
] | The type of the literal 0.45 is `double`. If you want to make it a float, use the suffix `f` or `F`, like the compiler error says:
```
VelocityY += 0.45F;
```
Basically, if you don't specify a suffix for a literal including a decimal point, it's implicitly `double`. You can use a suffix to make it explicit:
```
dec... | By Default all values you give as 0.45 or .68 are double in C# environment, but here you need to say the compiler that the number you gave was float by adding a suffix `F` to it.
variable += 0.45F; |
8,500,414 | I'm making my way through the beginners tutorials for XNA (C#) and have veered off in my own direction once I learned rendering and positioning, having my own game development experience.
I'm trying to make a property `VelocityY` on my class `Ship`. I want to be able to increment this value by values that are decimal,... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8500414",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/699632/"
] | you should change
```
public float VelocityY = 0;
to
public double VelocityY = 0;
```
or
```
VelocityY += 0.45;
to
VelocityY += 0.45F;
``` | By Default all values you give as 0.45 or .68 are double in C# environment, but here you need to say the compiler that the number you gave was float by adding a suffix `F` to it.
variable += 0.45F; |
70,326,473 | I have following in my Gradle config:
```
dependencies {
implementation "org.slf4j:slf4j-api:1.7.32"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.15.0"
implementation "org.slf4j:jul-to-slf4j:1.7.32"
implementation "org.slf4j:jcl-over-slf4j:1.7.32"
constraints {
add("impl... | 2021/12/12 | [
"https://Stackoverflow.com/questions/70326473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/222467/"
] | The problem was caused by `io.spring.dependency-management` Gradle plugin, which was also used in that project. Removing that plugin fixed the issue.
So the fix is to remove `io.spring.dependency-management` plugin.
Also, the correct constraint *must be* following:
```
constraints {
add("implementation", "org.ap... | This [library](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl/2.15.0) depends on `org.slf4j:slf4j-api:1.7.25`.
```
dependencies {
testIplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.15.0'
}
```
There probably is no need for any `constraints`; try `mavenCentral()`? And... |
70,326,473 | I have following in my Gradle config:
```
dependencies {
implementation "org.slf4j:slf4j-api:1.7.32"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.15.0"
implementation "org.slf4j:jul-to-slf4j:1.7.32"
implementation "org.slf4j:jcl-over-slf4j:1.7.32"
constraints {
add("impl... | 2021/12/12 | [
"https://Stackoverflow.com/questions/70326473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/222467/"
] | The problem was caused by `io.spring.dependency-management` Gradle plugin, which was also used in that project. Removing that plugin fixed the issue.
So the fix is to remove `io.spring.dependency-management` plugin.
Also, the correct constraint *must be* following:
```
constraints {
add("implementation", "org.ap... | The Gradle Team [published a workaround](https://blog.gradle.org/log4j-vulnerability) specifically for the critical Log4J bug in versions prior to 2.15.0. However, a new vulnerability has been reported that prompted the release of 2.16.0 so you should update your rules accordingly.
However, Gradle's recommended fix do... |
1,519,948 | I use [sed](http://en.wikipedia.org/wiki/Sed) to substitute text in files.
I want to give sed a file which contains all the strings to be searched and replaced in a given file.
It goes over .h and .cpp files. In each file it searches for file names which are included in it. If found, it substitutes for example "a.h" w... | 2009/10/05 | [
"https://Stackoverflow.com/questions/1519948",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157282/"
] | `sed` itself has no capability to read filenames from a file. I'm not familiar with the VxWorks shell, and I imagine this is something to do with the lack of answers... So here are some things that would work in bash - maybe VxWorks will support one of these things.
```
sed -i 's/.../...' `cat all.txt`
sed -i 's/.../... | What I'd do is change allFilesWithH.txt into a sed command using sed.
(When forced to use sed. I'd actually use Perl instead, it can also do the search for \*.h files.) |
1,519,948 | I use [sed](http://en.wikipedia.org/wiki/Sed) to substitute text in files.
I want to give sed a file which contains all the strings to be searched and replaced in a given file.
It goes over .h and .cpp files. In each file it searches for file names which are included in it. If found, it substitutes for example "a.h" w... | 2009/10/05 | [
"https://Stackoverflow.com/questions/1519948",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157282/"
] | You can eliminate one of the loops so `sed` only needs to be called once per file. Use
the `-f` option to specify more than one substitution:
```
For /F %%y in (all.txt) do
sed -i -f allFilesWithHAsSedScript.sed %%y
```
`allFilesWithHAsSedScript.sed` derives from `allFilesWithH.txt` and would contain:
```
s/\"... | What I'd do is change allFilesWithH.txt into a sed command using sed.
(When forced to use sed. I'd actually use Perl instead, it can also do the search for \*.h files.) |
20,326,068 | First let me explain an example:
In **Model**:
```
class Product < ActiveRecord::Base
has_many :line_items
def income
self.line_items.sum(:price)
end
def cost
self.line_items.sum(:cost)
end
def profit
self.income - self.cost
end
end
```
Then in **Controller**:
```
def show
@products... | 2013/12/02 | [
"https://Stackoverflow.com/questions/20326068",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/833179/"
] | Its perfectly fine to call the object-methods/attributes from the view, as long as the call would not change the data. I mean, call readers/getters. A Bad practice would be to call/invoke methods that update/delete the data. Don't call setters.
Also, if there is any complex computation involved, resort to helpers. | Since your methods need to access `line_items` association, to avoid N+1 problem and calling DB queries from view, I'd advice fetching your `line_items` in `show` action, with `includes`:
```
def show
@products = Product.includes(:line_items)
end
```
With this adjustment, I think it's ok to call these methods in v... |
41,743,979 | I am trying to make 2 buttons in a linear layout appear together or be closer then where there are now against each other but I am struggling to do so.
below is my xml with what it shows, is it possible to achieve what I want, I would really appreciate if someone could tell me how.
```
<LinearLayout
andr... | 2017/01/19 | [
"https://Stackoverflow.com/questions/41743979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Try adding
>
> "sw-toolbox": "3.4.0"
>
>
>
to the package.json | i finally sloved my problem.
Steps than i do to slove:
1. remove node\_modules folder
2. edit my package.json like as:
```
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@an... |
2,504,267 | I'm building a compiler/assembler/linker in Java for the x86-32 (IA32) processor targeting Windows.
High-level concepts (I do not have any "source code": there is no syntax nor lexical translation, and all languages are regular) are translated into opcodes, which then are wrapped and outputted to a file. The translati... | 2010/03/23 | [
"https://Stackoverflow.com/questions/2504267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/252704/"
] | I'm having a lot of trouble understanding this question, but I think you will find it useful to learn something about **term-rewriting systems**, which seems to be what you are proposing. Whether the mechanism is tree rewriting (always works) or regular expressions (will work for some languages some of the time and oth... | What you should actually do is build an **[Abstract Syntax Tree (AST)](http://en.wikipedia.org/wiki/Abstract_syntax_tree)**.
It is a representation of the source code in the form of a tree, that is much easier to work with, especially to make transformations and optimizations.
That code, represented as a tree, would ... |
2,373,786 | You read that correctly, CR v1.0.38. We have an archaic piece of coldfusion software that uses reports created in CR v1.0.38. Some of these reports need minor adjustments, so I open it using Visual Studio make the adjustments. When I go to save it I'm prompted with a warning about only being able to save it as a newer ... | 2010/03/03 | [
"https://Stackoverflow.com/questions/2373786",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21717/"
] | I finally found a method that works: embedding the image in the email itself. I found the solution [here](http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all). I'll include the critical stuff here, just in case.
There are three key components to the email: the plain text version, the html vers... | I imagine no matter what link you use (button, text), you're going to run into that same problem where the Notes client launches its internal browser. That's a preference on the Notes client, and it could be different on all machines.
I would first try a standard text link to see if it has the same behavior. Maybe if... |
2,373,786 | You read that correctly, CR v1.0.38. We have an archaic piece of coldfusion software that uses reports created in CR v1.0.38. Some of these reports need minor adjustments, so I open it using Visual Studio make the adjustments. When I go to save it I'm prompted with a warning about only being able to save it as a newer ... | 2010/03/03 | [
"https://Stackoverflow.com/questions/2373786",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21717/"
] | I finally found a method that works: embedding the image in the email itself. I found the solution [here](http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all). I'll include the critical stuff here, just in case.
There are three key components to the email: the plain text version, the html vers... | I agree with Ken on the preference for the internal browser. The image not displaying - showing a red x - might be a preference also. I don't recall if it was available in R7, but in R8 there is a preference to not show remote images automatically. It is a security feature. It could also be a proxy issue - if they woul... |
2,373,786 | You read that correctly, CR v1.0.38. We have an archaic piece of coldfusion software that uses reports created in CR v1.0.38. Some of these reports need minor adjustments, so I open it using Visual Studio make the adjustments. When I go to save it I'm prompted with a warning about only being able to save it as a newer ... | 2010/03/03 | [
"https://Stackoverflow.com/questions/2373786",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21717/"
] | I finally found a method that works: embedding the image in the email itself. I found the solution [here](http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all). I'll include the critical stuff here, just in case.
There are three key components to the email: the plain text version, the html vers... | There is also this but it fires off a security warning to the user with my Notes config:
```
<input type='button'
onclick=document.location.href='http://server/path';
value='Click here'
id='buttonID' class='button'
xstyle='background-color:red;color:white;'/>
``` |
157,419 | >
> Show that $\sum\nolimits\_{d|n} \frac{1}{d} = \frac{\sigma (n)}{n}$ for every positive integer $n$.
>
>
>
where $\sigma (n)$ is the sum of all the divisors of $n$
and $\sum\nolimits\_{d|n} f(d)$ is the summation of $f$ at each $d$ where $d$ is the divisor of $n$.
I have written $n=p\_1^{\alpha\_1}p\_2^{\a... | 2012/06/12 | [
"https://math.stackexchange.com/questions/157419",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26068/"
] | $\displaystyle
n\sum\_{d|n} \frac{1}{d} = \sum\_{d|n} \frac{n}{d} = \sum\_{d|n} {d} = \sigma (n)
$
or
$\displaystyle
\frac{\sigma (n)}{n} = \frac{1}{n} \sum\_{d|n} {d} = \sum\_{d|n} \frac{d}{n} = \sum\_{d|n} \frac{1}{d}
$ | \begin{equation\*}
\begin{split}
\sigma (n) &=\sum\_{d|n}d (\text{ i.e. sum of all divisors of $n$})\\
&=\sum\_{d|n}\left(\frac{n}{d}\right) (\text{ i.e. sum of all divisors of $n$})\\
\therefore \sigma(n)&= n\sum\_{d|n}\frac{1}{d}\\
\Rightarrow \sum\_{d|n}\frac{1}{d}=\frac{\sigma(n)}{n}.
\end{split}
\end{equation\*} |
16,163,276 | Using the code below, what is the best way to call the second function (Checkbox1.CheckedChanged)? I tried using (sender, e) but then it continuously calls the App2.msi every time a program finishes installing, throwing the program into a continuous loop as it tries to install App2.msi repeatedly.. Tried it without a s... | 2013/04/23 | [
"https://Stackoverflow.com/questions/16163276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1114503/"
] | The correct way is: don’t call it at all! It’s an *event handler*, it’s not supposed to be called by you.
If the method contains code that you want to call manually in some circumstances, move it to a separate method that is called *by* `CheckBox1_CheckedChanged` and your other code.
Furthermore, the comment is right... | Try this below
```
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
Dim oSender as CheckBox = DirectCast(sender,CheckBox)
If oSender.Checked then
Dim p1 As New Process
p1 = System.Diagnostics.Process.Start("App2.msi")
p1.WaitForExit... |
7,984,740 | I'm creating a **compression** algorithm in **Java**;
to use my algorithm I require a lot of **information about the structure** of the target file.
After collecting the data, I need to **reread the file.** ***<- But I don't want to.***
While rereading the file, I make it **a good target for compression** by **'conve... | 2011/11/02 | [
"https://Stackoverflow.com/questions/7984740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/903234/"
] | You can use one or more RandomAccessFiles. You can memory map them to ByteBuffer() which doesn't consume heap (actually they use about 128 bytes) or direct memory but can be accessed randomly.
Your temporary data can be storing in a direct ByteBuffer(s) or more memory mapped files. Since you have random access to the ... | There's the [`reset`](http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html#reset%28%29) method, but you need to wrap the `FileInputStream` in a `BufferedInputStream`. |
7,984,740 | I'm creating a **compression** algorithm in **Java**;
to use my algorithm I require a lot of **information about the structure** of the target file.
After collecting the data, I need to **reread the file.** ***<- But I don't want to.***
While rereading the file, I make it **a good target for compression** by **'conve... | 2011/11/02 | [
"https://Stackoverflow.com/questions/7984740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/903234/"
] | You can use one or more RandomAccessFiles. You can memory map them to ByteBuffer() which doesn't consume heap (actually they use about 128 bytes) or direct memory but can be accessed randomly.
Your temporary data can be storing in a direct ByteBuffer(s) or more memory mapped files. Since you have random access to the ... | You could use RandomAccessFile, or java.nio ByteBuffer is what you are looking for. (I do not know.)
Resources might be saved by pipes/streams: immediately writing to a compressed stream.
To answer your questions on **reset**: not possible; the base class InputStream has provisions for mark and reset-to-mark, but Fil... |
35,382,617 | i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications.
I don't know where to impl... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35382617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888842/"
] | What you want is called "Background Fetch" and is available starting from iOS 7:
<https://www.objc.io/issues/5-ios7/multitasking/> | Yes it is possible to launch a background process in iOS. It is also possible to launch this process every 30 minutes. You need to setup two things! You need to send every 30 minutes a silent Push with your server.(e.g. with a Cloud Code job in Parse(Warning! Since Parse will be shutdowned in January 2017, it is not cl... |
35,382,617 | i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications.
I don't know where to impl... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35382617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888842/"
] | What you want is called "Background Fetch" and is available starting from iOS 7:
<https://www.objc.io/issues/5-ios7/multitasking/> | I would recommend that you take a look at [Apple's documentation on Background Execution](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html). It states all the possible ways to run code in the background. Each method comes with ... |
35,382,617 | i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications.
I don't know where to impl... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35382617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888842/"
] | What you want is called "Background Fetch" and is available starting from iOS 7:
<https://www.objc.io/issues/5-ios7/multitasking/> | For background
In your viewDidLoad() method
```
let notificationCenter = NotificationCenter.default
notificationCenter.addObserver(self, selector: #selector(appMovedToBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
```
Add this method in your ViewController
```
@objc func appMove... |
35,382,617 | i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications.
I don't know where to impl... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35382617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888842/"
] | Yes it is possible to launch a background process in iOS. It is also possible to launch this process every 30 minutes. You need to setup two things! You need to send every 30 minutes a silent Push with your server.(e.g. with a Cloud Code job in Parse(Warning! Since Parse will be shutdowned in January 2017, it is not cl... | I would recommend that you take a look at [Apple's documentation on Background Execution](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html). It states all the possible ways to run code in the background. Each method comes with ... |
35,382,617 | i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications.
I don't know where to impl... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35382617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/888842/"
] | Yes it is possible to launch a background process in iOS. It is also possible to launch this process every 30 minutes. You need to setup two things! You need to send every 30 minutes a silent Push with your server.(e.g. with a Cloud Code job in Parse(Warning! Since Parse will be shutdowned in January 2017, it is not cl... | For background
In your viewDidLoad() method
```
let notificationCenter = NotificationCenter.default
notificationCenter.addObserver(self, selector: #selector(appMovedToBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
```
Add this method in your ViewController
```
@objc func appMove... |
43,463,675 | I have a list of names and am using them as keys to a json object, however, sometimes, the key might contain double quotes in them, like so:
```
var parts = {
Expando Sleeve 1/4": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
```
So, ... | 2017/04/18 | [
"https://Stackoverflow.com/questions/43463675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443501/"
] | Use a double quote HTML character `"` in the JSON.
```
var parts = {
"Expando Sleeve 1/4"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}];
};
``` | You can use the character literal quote (') to save JSON keys as a string
```
var parts = {
'Expando Sleeve 1/4"': [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
``` |
43,463,675 | I have a list of names and am using them as keys to a json object, however, sometimes, the key might contain double quotes in them, like so:
```
var parts = {
Expando Sleeve 1/4": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
```
So, ... | 2017/04/18 | [
"https://Stackoverflow.com/questions/43463675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443501/"
] | Use a double quote HTML character `"` in the JSON.
```
var parts = {
"Expando Sleeve 1/4"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}];
};
``` | In chrome console all it's ok:
```
var obj = {};
var val = "Expando Sleeve 1/4\"";
obj[val]="x";
console.log(obj)
//console >> Object {Expando Sleeve 1/4": "x"}
```
another option:
```
var parts = {
"Expando Sleeve 1/4\"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"... |
43,463,675 | I have a list of names and am using them as keys to a json object, however, sometimes, the key might contain double quotes in them, like so:
```
var parts = {
Expando Sleeve 1/4": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
```
So, ... | 2017/04/18 | [
"https://Stackoverflow.com/questions/43463675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443501/"
] | Use a double quote HTML character `"` in the JSON.
```
var parts = {
"Expando Sleeve 1/4"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}];
};
``` | Replace you double quote from value
```html
<input type="text" name="name" value=""YOUR_VALUE">
``` |
43,463,675 | I have a list of names and am using them as keys to a json object, however, sometimes, the key might contain double quotes in them, like so:
```
var parts = {
Expando Sleeve 1/4": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
```
So, ... | 2017/04/18 | [
"https://Stackoverflow.com/questions/43463675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443501/"
] | In chrome console all it's ok:
```
var obj = {};
var val = "Expando Sleeve 1/4\"";
obj[val]="x";
console.log(obj)
//console >> Object {Expando Sleeve 1/4": "x"}
```
another option:
```
var parts = {
"Expando Sleeve 1/4\"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"... | You can use the character literal quote (') to save JSON keys as a string
```
var parts = {
'Expando Sleeve 1/4"': [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
``` |
43,463,675 | I have a list of names and am using them as keys to a json object, however, sometimes, the key might contain double quotes in them, like so:
```
var parts = {
Expando Sleeve 1/4": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"15", name:"01-077512", partID:"4"
}]
};
```
So, ... | 2017/04/18 | [
"https://Stackoverflow.com/questions/43463675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443501/"
] | In chrome console all it's ok:
```
var obj = {};
var val = "Expando Sleeve 1/4\"";
obj[val]="x";
console.log(obj)
//console >> Object {Expando Sleeve 1/4": "x"}
```
another option:
```
var parts = {
"Expando Sleeve 1/4\"": [
{
id:"45", name:"TEST REPORT", partID:"4"
},
{
id:"... | Replace you double quote from value
```html
<input type="text" name="name" value=""YOUR_VALUE">
``` |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | I have a plugin that makes this easy, here's a fiddle: <http://jsfiddle.net/NFDqe/8/>
```
$(document).ready(function(){
$("#content").highlightText("hello","hello",true);
$("#content").highlightText("goodbye","goodbye",true);
});
```
<https://github.com/tentonaxe/jQuery-highlightText>
**Update**
Since t... | You can do this without the need for a plugin:
```
$("p").each(function() {
if ($(this).children().length == 0) {
var txt = $(this).text();
var blue = /hello/i.exec(txt);
var red = /goodby/i.exec(txt);
if (blue) {
$(this).html(txt.replace(/hello/i, '<span class="blue">' ... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | Iterate through each p tag, check for text, assign css:
jsFiddle( <http://jsfiddle.net/fM7MP/26/> )
```
$('p').each( function(index)
{
replaceWithColors( $(this) , "hello" , "blue" );
replaceWithColors( $(this) , "goodbye" , "red" );
});
function replaceWithColors( object , word , color )
{
var index = $... | For highlighting the whole line:
```
$("div:contains('hello')").css("color", "blue");
```
**EDIT:** Since the question was changed to highlighting the word only, you can find the answer for example here:
[Highlight a word with jQuery](https://stackoverflow.com/questions/119441/highlight-a-word-with-jquery)
or simply... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | You can use a jQuery plugin called highlight for that.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
```
$('li').highlight('bla');
```
A slight modified version to work with different styles.
<http://jsfiddle.net/ReNvf/> | Iterate through each p tag, check for text, assign css:
jsFiddle( <http://jsfiddle.net/fM7MP/26/> )
```
$('p').each( function(index)
{
replaceWithColors( $(this) , "hello" , "blue" );
replaceWithColors( $(this) , "goodbye" , "red" );
});
function replaceWithColors( object , word , color )
{
var index = $... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | I have a plugin that makes this easy, here's a fiddle: <http://jsfiddle.net/NFDqe/8/>
```
$(document).ready(function(){
$("#content").highlightText("hello","hello",true);
$("#content").highlightText("goodbye","goodbye",true);
});
```
<https://github.com/tentonaxe/jQuery-highlightText>
**Update**
Since t... | For highlighting the whole line:
```
$("div:contains('hello')").css("color", "blue");
```
**EDIT:** Since the question was changed to highlighting the word only, you can find the answer for example here:
[Highlight a word with jQuery](https://stackoverflow.com/questions/119441/highlight-a-word-with-jquery)
or simply... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | You can use a jQuery plugin called highlight for that.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
```
$('li').highlight('bla');
```
A slight modified version to work with different styles.
<http://jsfiddle.net/ReNvf/> | I have a plugin that makes this easy, here's a fiddle: <http://jsfiddle.net/NFDqe/8/>
```
$(document).ready(function(){
$("#content").highlightText("hello","hello",true);
$("#content").highlightText("goodbye","goodbye",true);
});
```
<https://github.com/tentonaxe/jQuery-highlightText>
**Update**
Since t... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | Iterate through each p tag, check for text, assign css:
jsFiddle( <http://jsfiddle.net/fM7MP/26/> )
```
$('p').each( function(index)
{
replaceWithColors( $(this) , "hello" , "blue" );
replaceWithColors( $(this) , "goodbye" , "red" );
});
function replaceWithColors( object , word , color )
{
var index = $... | You can do this without the need for a plugin:
```
$("p").each(function() {
if ($(this).children().length == 0) {
var txt = $(this).text();
var blue = /hello/i.exec(txt);
var red = /goodby/i.exec(txt);
if (blue) {
$(this).html(txt.replace(/hello/i, '<span class="blue">' ... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | I have a plugin that makes this easy, here's a fiddle: <http://jsfiddle.net/NFDqe/8/>
```
$(document).ready(function(){
$("#content").highlightText("hello","hello",true);
$("#content").highlightText("goodbye","goodbye",true);
});
```
<https://github.com/tentonaxe/jQuery-highlightText>
**Update**
Since t... | something like this
```
$('p').each(function() {
var html = $(this).html().replace(/L/gi, function(str) {
var cls;
if (str == str.toLowerCase()) {
cls = 'blue';
} else if (str == str.toUpperCase()) {
cls = 'red';
}
return '<... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | You can use a jQuery plugin called highlight for that.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
```
$('li').highlight('bla');
```
A slight modified version to work with different styles.
<http://jsfiddle.net/ReNvf/> | For highlighting the whole line:
```
$("div:contains('hello')").css("color", "blue");
```
**EDIT:** Since the question was changed to highlighting the word only, you can find the answer for example here:
[Highlight a word with jQuery](https://stackoverflow.com/questions/119441/highlight-a-word-with-jquery)
or simply... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | You can use a jQuery plugin called highlight for that.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
```
$('li').highlight('bla');
```
A slight modified version to work with different styles.
<http://jsfiddle.net/ReNvf/> | something like this
```
$('p').each(function() {
var html = $(this).html().replace(/L/gi, function(str) {
var cls;
if (str == str.toLowerCase()) {
cls = 'blue';
} else if (str == str.toUpperCase()) {
cls = 'red';
}
return '<... |
10,323,351 | I have several html paragraph of text, i want to go through every paragraph within .content, and if it contains the word "Hello" or "hello" (or any variation of case), i want to make ONLY that word blue. And the same for "Goodbye" except make it red. | 2012/04/25 | [
"https://Stackoverflow.com/questions/10323351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794481/"
] | Iterate through each p tag, check for text, assign css:
jsFiddle( <http://jsfiddle.net/fM7MP/26/> )
```
$('p').each( function(index)
{
replaceWithColors( $(this) , "hello" , "blue" );
replaceWithColors( $(this) , "goodbye" , "red" );
});
function replaceWithColors( object , word , color )
{
var index = $... | something like this
```
$('p').each(function() {
var html = $(this).html().replace(/L/gi, function(str) {
var cls;
if (str == str.toLowerCase()) {
cls = 'blue';
} else if (str == str.toUpperCase()) {
cls = 'red';
}
return '<... |
33,719,069 | Let's assume you have the following two SQL Server tables:
t1:
```
|----------------------------------------------|
|name | day_planed | day_canceled | discription|
|----------------------------------------------|
|alpha| 2015-11-02 | 2015-11-01 | some |
|alpha| 2015-11-02 | 2015-10-30 | text |
|beta ... | 2015/11/15 | [
"https://Stackoverflow.com/questions/33719069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3618516/"
] | It appears there was an issue with browserify and its resolving of symlinked transforms. However, since [this commit](https://github.com/substack/node-browserify/commit/504832b4b9fde30c36877122b265ddccbea7be77) that make use of the [fs.realpathSync](https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options) method... | I had the same problem, which was caused by having symlinks in my `node_modules`. I fixed it by adding the [realpathify](https://www.npmjs.com/package/realpathify) plugin to browserify.
```
var gulp = require("gulp")
var browserify = require("browserify")
var babelify = require("babelify")
var source = require('vinyl-... |
33,719,069 | Let's assume you have the following two SQL Server tables:
t1:
```
|----------------------------------------------|
|name | day_planed | day_canceled | discription|
|----------------------------------------------|
|alpha| 2015-11-02 | 2015-11-01 | some |
|alpha| 2015-11-02 | 2015-10-30 | text |
|beta ... | 2015/11/15 | [
"https://Stackoverflow.com/questions/33719069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3618516/"
] | The reason why you get the error is described well in [Aperçu's answer](https://stackoverflow.com/a/44251972/5647260). An update should fix the issue as noted, but you can see [James' answer](https://stackoverflow.com/a/44250858/5647260) if you are unable to.
Gulp, Babelify, and TSify all work together to transpile yo... | I had the same problem, which was caused by having symlinks in my `node_modules`. I fixed it by adding the [realpathify](https://www.npmjs.com/package/realpathify) plugin to browserify.
```
var gulp = require("gulp")
var browserify = require("browserify")
var babelify = require("babelify")
var source = require('vinyl-... |
38,761,341 | So I've been asked to create an shop for a photographer. I have a lot of experience working with online shops using various different frameworks (Rails, Django etc) but I've never really built a database for Photos nor really dealt with applications that rely so heavily on their images enough to have them inserted into... | 2016/08/04 | [
"https://Stackoverflow.com/questions/38761341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5835066/"
] | [Storing images directly in the database is probably not the most efficient way to store images](https://stackoverflow.com/a/3751/1983389). It is probably better to store file names and perhaps the paths to the files in the database rather than the image files and then store the image filess normally in the file system... | Look into using a CMS, like `wordpress` and using their plugin called `woo-commerce` which allows you to run an online `e-commerce` site in no time. To style it just buy a quick theme from `themeforest`. You could have a shop set up in no time, and depending on who you host with, they would handle the database side of ... |
907,267 | I am a total newbie in matter of hardware.
In order to increase the performance of my laptop (Asus ROG G75VW) for multitasking (I had only 4GB and Android Studio, Genymotion, Firefox, etc. were too much), I bought 8GB extra RAM.
I read on the web [here](http://lifehacker.com/5415355/do-you-really-need-more-than-4gb-o... | 2015/04/28 | [
"https://superuser.com/questions/907267",
"https://superuser.com",
"https://superuser.com/users/442128/"
] | Hard faults are caused when information that has been requested (like trying to open up programs for the first time) is not stored in memory. Because it isn't in memory, the computer has to look into your hard drive to find the information. In your screenshot, you have about 8 gigabytes available, and 5 of that is comp... | It is obvious from your screen capture that you are not out of memory.
One thing that can cause hard faults is a memory-mapped file. This is a technique that allows for editing a file via direct memory access and is especially useful for editing very large files.
I note that the program(s) causing these faults in you... |
29,284,290 | My following json data:
```
{
"Alex": {
"id": "54e23a2331ac67b1490d87b8",
"desc": "bla bla",
"no": 2
},
"Kodie": {
"id": "54e23a2331ac67b1490d87b9",
"desc": "bla bla",
"no": 13
},
"Lache": {
"i... | 2015/03/26 | [
"https://Stackoverflow.com/questions/29284290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741381/"
] | ```
try {
JSONObject json = new JSONObject(data);
Iterator<String> temp = json.keys();
while (temp.hasNext()) {
String key = temp.next();
Object value = json.get(key);
}
} catch (JSONException e) {
e.printStackTrace();
}
``` | Thanks @oldfell;
```
JSONObject object = new JSONObject(json);
Iterator keys = object.keys();
while(keys.hasNext()) {
String dynamicKey = (String)keys.next();
JSONObject line = object.getJSONObject(dynamicKey);
String desc = line.getString("desc");
}
```
I solved the problem in this way |
69,157,523 | I have the below JSON data and these are attendance details for the few last days:
```
[
{
"date": "2021-09-07T00:00:00",
"type": "Teacher",
"total": 744
},
{
"date": "2021-09-07T00:00:00",
"type": "Student",
"total": 4769
},
{
"date": "2021-0... | 2021/09/13 | [
"https://Stackoverflow.com/questions/69157523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8512043/"
] | Concept
-------
1. Group `lastFour` data by `type` (Student/Teacher).
2. Remove key from `groupedByTypeResult` (Step 1) to append to `chartData` and for `visitSaleChartData`.
3. Format date with `DatePipe` and Distinct date (remove duplicates) for `visitSaleChartLabels`.
---
Solution
--------
>
> app.component.htm... | I have the same things, but I don't want to group Last Four by Type how I can change this block.
```
let groupedByTypeResult: any[] = this.lastFour.reduce(function(
obj: any,
item: any
) {
let type = item.type;
obj[type] = obj[type] || { label: item.type, data: [] };
obj[type].data.... |
41,242 | Since だ is declarative, how would it work in a question? Why would i say これ何だ over これなに ? How does a declarative in a question work? | 2016/11/26 | [
"https://japanese.stackexchange.com/questions/41242",
"https://japanese.stackexchange.com",
"https://japanese.stackexchange.com/users/18840/"
] | There is often a difference in nuance between information questions asked with 「だ」 and those asked without.
>
> **Without 「だ」**:
>
>
> 「これ(は)なんですか?」、「これ(は)なに?」、「これ(は)なんなの?」, etc.
>
>
>
These are more versatile in usage because they are neutral in nuance. They sound neutral unless you express some kind of emotio... | Since 何 is an interrogative word, you can tell これなんだ? is a question. |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set the seventh bit to 1:
```
b = (byte) (b | (1 << 6));
```
To set the sixth bit to zero:
```
b = (byte) (b & ~(1 << 5));
```
(The bit positions are effectively 0-based, so that's why the "seventh bit" maps to `1 << 6` instead of `1 << 7`.) | Note that the "Byte" wrapper class is immutable, and you will need to work with "byte". |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set the seventh bit to 1:
```
b = (byte) (b | (1 << 6));
```
To set the sixth bit to zero:
```
b = (byte) (b & ~(1 << 5));
```
(The bit positions are effectively 0-based, so that's why the "seventh bit" maps to `1 << 6` instead of `1 << 7`.) | Declare `b` as the primitive type `byte`:
```
byte b = ...;
```
Then you can use the compound assignment operators that combine binary operations and assignment (this doesn't work on `Byte`):
```
b |= (1 << bitIndex); // set a bit to 1
b &= ~(1 << bitIndex); // set a bit to 0
```
Without the assignment operator y... |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set the seventh bit to 1:
```
b = (byte) (b | (1 << 6));
```
To set the sixth bit to zero:
```
b = (byte) (b & ~(1 << 5));
```
(The bit positions are effectively 0-based, so that's why the "seventh bit" maps to `1 << 6` instead of `1 << 7`.) | You really owe it to yourself to look into masking functions for and, or, and xor -- they allow you to simultaneously verify, validate, or change... one, some, or all of the bits in a byte structure in a single statement.
I'm not a java programmer by trade, but it's derived from C and a quick search online seemed to r... |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set the seventh bit to 1:
```
b = (byte) (b | (1 << 6));
```
To set the sixth bit to zero:
```
b = (byte) (b & ~(1 << 5));
```
(The bit positions are effectively 0-based, so that's why the "seventh bit" maps to `1 << 6` instead of `1 << 7`.) | To set a bit use :
```
public final static byte setBit(byte _byte,int bitPosition,boolean bitValue)
{
if (bitValue)
return (byte) (_byte | (1 << bitPosition));
return (byte) (_byte & ~(1 << bitPosition));
}
```
To get a bit value use :
```
public final static Boolean getBit(byte _byte, int bitPositi... |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | Declare `b` as the primitive type `byte`:
```
byte b = ...;
```
Then you can use the compound assignment operators that combine binary operations and assignment (this doesn't work on `Byte`):
```
b |= (1 << bitIndex); // set a bit to 1
b &= ~(1 << bitIndex); // set a bit to 0
```
Without the assignment operator y... | Note that the "Byte" wrapper class is immutable, and you will need to work with "byte". |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set a bit use :
```
public final static byte setBit(byte _byte,int bitPosition,boolean bitValue)
{
if (bitValue)
return (byte) (_byte | (1 << bitPosition));
return (byte) (_byte & ~(1 << bitPosition));
}
```
To get a bit value use :
```
public final static Boolean getBit(byte _byte, int bitPositi... | Note that the "Byte" wrapper class is immutable, and you will need to work with "byte". |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | Declare `b` as the primitive type `byte`:
```
byte b = ...;
```
Then you can use the compound assignment operators that combine binary operations and assignment (this doesn't work on `Byte`):
```
b |= (1 << bitIndex); // set a bit to 1
b &= ~(1 << bitIndex); // set a bit to 0
```
Without the assignment operator y... | You really owe it to yourself to look into masking functions for and, or, and xor -- they allow you to simultaneously verify, validate, or change... one, some, or all of the bits in a byte structure in a single statement.
I'm not a java programmer by trade, but it's derived from C and a quick search online seemed to r... |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | Declare `b` as the primitive type `byte`:
```
byte b = ...;
```
Then you can use the compound assignment operators that combine binary operations and assignment (this doesn't work on `Byte`):
```
b |= (1 << bitIndex); // set a bit to 1
b &= ~(1 << bitIndex); // set a bit to 0
```
Without the assignment operator y... | To set a bit use :
```
public final static byte setBit(byte _byte,int bitPosition,boolean bitValue)
{
if (bitValue)
return (byte) (_byte | (1 << bitPosition));
return (byte) (_byte & ~(1 << bitPosition));
}
```
To get a bit value use :
```
public final static Boolean getBit(byte _byte, int bitPositi... |
4,844,344 | I am trying to create an app using three20 for a photo viewer. When I follow the instructions on their site (which is now simply running a python script) it seems to behave correctly but then when I try to build I get a "No such file or directory" error for using `#import <Three20/Three20.h>`.
I am pretty sure the hea... | 2011/01/30 | [
"https://Stackoverflow.com/questions/4844344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/595961/"
] | To set a bit use :
```
public final static byte setBit(byte _byte,int bitPosition,boolean bitValue)
{
if (bitValue)
return (byte) (_byte | (1 << bitPosition));
return (byte) (_byte & ~(1 << bitPosition));
}
```
To get a bit value use :
```
public final static Boolean getBit(byte _byte, int bitPositi... | You really owe it to yourself to look into masking functions for and, or, and xor -- they allow you to simultaneously verify, validate, or change... one, some, or all of the bits in a byte structure in a single statement.
I'm not a java programmer by trade, but it's derived from C and a quick search online seemed to r... |
22,852,075 | Is it there any function to replace character at point in Emacs Lisp?
Currently what I can do is:
```
(goto-char pt)
(delete-char 1)
(insert c)
``` | 2014/04/04 | [
"https://Stackoverflow.com/questions/22852075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3015344/"
] | I don't think there's a function to do that, but of course you can wrap the above in a defun. | There are some common replacements, for example toggle the case, switch "(" to ")", raise/lower a number. Might be done with the following:
```
(defun reverse-chars (&optional arg)
"Reverse reciproke chars as \"[\" to \"]\", upcase or downcase,
Switch `\"' with `''
If over a number, add ARG to it.
With negative arg... |
45,004,025 | Here is my code:
```js
$(document).ready(function(){
$('a').bind('mouseenter', function() {
var self = $(this);
this.iid = setTimeout(function() {
var tag_name = self.text(),
top = self.position().top + self.outerHeight(true),
left = self.position().left;
$('bo... | 2017/07/10 | [
"https://Stackoverflow.com/questions/45004025",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5259594/"
] | Change this
```
$(document).ready(function(){
$('a').bind('mouseenter', function() {
var self = $(this);
this.iid = setTimeout(function() {
var tag_name = self.text(),
top = self.position().top + self.outerHeight(true),
right = self.position().right; // Update this
$... | change `left = self.position().left;` to `right = self.position().right;`
change "left" into "right " in css.
```
$(".tag_info").css({top: top + "px", right: right + "px"}).fadeIn(200);
``` |
153,750 | [[Example (old link)][1](https://i.stack.imgur.com/9Gxse.jpg)](https://i.stack.imgur.com/9Gxse.jpg)[](https://i.stack.imgur.com/CtqSN.png)
^ Desired result on the left
Here the end faces are missing. Is it possible to get them there or to ... | 2019/09/25 | [
"https://blender.stackexchange.com/questions/153750",
"https://blender.stackexchange.com",
"https://blender.stackexchange.com/users/81493/"
] | Perhaps add a solidify modifier and get it that way?[](https://i.stack.imgur.com/O7bnE.png) | Hi was looking at your image. Drew similar object and found that I had to enter the parameters and then apply the *Screw Modifier*, select the object, enter *Edit Mode*
[](https://i.stack.imgur.com/uNG35.png)
Select two edges and type `F` for fill.
N... |
21,319 | How to install Magento using command-line? I would like to know how to do this. I have tried to install Magento using command-line but I couldn't do it successfully. So I would like to know if it's possible to install Magento, using command-line, in my local PC? | 2014/05/23 | [
"https://magento.stackexchange.com/questions/21319",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/5987/"
] | Yes it's possible, There are lots of guidelines based on this topic.
* <https://www.digitalocean.com/community/articles/how-to-install-magento-on-a-vps-running-ubuntu-12-04>
* <http://www.pixlpitch.com/install-magento-extensions-from-command-line/>
* <http://www.fabrizio-branca.de/run-magento-installer-from-command-li... | ```
php bin/magento setup:install --backend-frontname="admin" --key="admin" --session-save="files" --db-host="localhost" --db-name="magento_2_db" --db-user="root" --db-password="root" --base-url="http://local.magento.com/" --base-url-secure="https://local.magento2.com/" --admin-user="admin" --admin-password="admin123"... |
7,678,225 | I'm using an `NSTimer` to update a label that shows the current time each minute. I fire the timer at a full minute date (e.g. 2:23:00 instead of 2:22:17). The problem is that `NSTimer` seems to work inaccurately, which means it sometimes fires too early (which results in (e.g.) 2:23 PM when it is really 2:24 PM).
Is ... | 2011/10/06 | [
"https://Stackoverflow.com/questions/7678225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/282635/"
] | Well, I just wrote my own little `NSTimer` wrapper, called `MinuteTimer` to "solve" the problem. I've uploaded it on [pastebin](http://pastebin.com/RRPRf47L). The idea is to reset the timer whenever it has fired too quickly so often that the date risks being displayed incorrectly.
Since this is duct-tape programming, ... | I assume that you're starting with the current time, then each time your `NSTimer` goes off you add one minute to that original time and then display it. What you should do with your timer is: each time the timer goes off, re-read the current time and just display that. |
7,678,225 | I'm using an `NSTimer` to update a label that shows the current time each minute. I fire the timer at a full minute date (e.g. 2:23:00 instead of 2:22:17). The problem is that `NSTimer` seems to work inaccurately, which means it sometimes fires too early (which results in (e.g.) 2:23 PM when it is really 2:24 PM).
Is ... | 2011/10/06 | [
"https://Stackoverflow.com/questions/7678225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/282635/"
] | From the [`NSTimer` docs](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nstimer_Class/Reference/NSTimer.html):
>
> A timer is not a real-time mechanism; it fires only when one of the
> run loop modes to which the timer has been added is running and able
> to check if the t... | I assume that you're starting with the current time, then each time your `NSTimer` goes off you add one minute to that original time and then display it. What you should do with your timer is: each time the timer goes off, re-read the current time and just display that. |
7,678,225 | I'm using an `NSTimer` to update a label that shows the current time each minute. I fire the timer at a full minute date (e.g. 2:23:00 instead of 2:22:17). The problem is that `NSTimer` seems to work inaccurately, which means it sometimes fires too early (which results in (e.g.) 2:23 PM when it is really 2:24 PM).
Is ... | 2011/10/06 | [
"https://Stackoverflow.com/questions/7678225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/282635/"
] | Well, I just wrote my own little `NSTimer` wrapper, called `MinuteTimer` to "solve" the problem. I've uploaded it on [pastebin](http://pastebin.com/RRPRf47L). The idea is to reset the timer whenever it has fired too quickly so often that the date risks being displayed incorrectly.
Since this is duct-tape programming, ... | You should set your timer to fire each second instead of each minute. But don't update your label each second. Just compare if the new minutes in the current time is different then the minutes in the last time you updated the label and if so update the label. |
7,678,225 | I'm using an `NSTimer` to update a label that shows the current time each minute. I fire the timer at a full minute date (e.g. 2:23:00 instead of 2:22:17). The problem is that `NSTimer` seems to work inaccurately, which means it sometimes fires too early (which results in (e.g.) 2:23 PM when it is really 2:24 PM).
Is ... | 2011/10/06 | [
"https://Stackoverflow.com/questions/7678225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/282635/"
] | From the [`NSTimer` docs](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nstimer_Class/Reference/NSTimer.html):
>
> A timer is not a real-time mechanism; it fires only when one of the
> run loop modes to which the timer has been added is running and able
> to check if the t... | You should set your timer to fire each second instead of each minute. But don't update your label each second. Just compare if the new minutes in the current time is different then the minutes in the last time you updated the label and if so update the label. |
13,878,797 | How can i use pagination for showing data dynamically in div in asp .net using ajax or jquery? | 2012/12/14 | [
"https://Stackoverflow.com/questions/13878797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1826753/"
] | To be honest, it's hard to help you - you should be more specific, but maybe you are looking for sth like this:
[jQuery pagination plugin](http://archive.plugins.jquery.com/project/pagination)
and
[demo here](http://d-scribe.de/webtools/jquery-pagination/demo/demo_options.htm) | You haven't really asked a real question, but maybe this will help: <https://github.com/TroyGoode/PagedList> |
13,878,797 | How can i use pagination for showing data dynamically in div in asp .net using ajax or jquery? | 2012/12/14 | [
"https://Stackoverflow.com/questions/13878797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1826753/"
] | To be honest, it's hard to help you - you should be more specific, but maybe you are looking for sth like this:
[jQuery pagination plugin](http://archive.plugins.jquery.com/project/pagination)
and
[demo here](http://d-scribe.de/webtools/jquery-pagination/demo/demo_options.htm) | You can create pagination on your div using bootstrap and jquery.
Controller
```
public ActionResult Index()
{
// Tab Data
ThumbnailViewModel model = new ThumbnailViewModel();
model.ThumbnailModelList = new List<ThumbnailModel>();
// Test Details Data
... |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [Running SSIS package programmatically](http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx).
I prefer the second method:
Start DTEXEC.EXE process. DTEXEC is command line utility for executing SSIS packages. See its command line options here: <http://msdn2.microsoft.com/en-us/li... | You can call SSIS programtically, execute the package and change the configuration from a .NET code using DTS runtime. [Here is complete code of how you can do it](http://blogs.msdn.com/b/olivier_pieri/archive/2007/05/10/run-ssis-package-programatically.aspx). |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [Running SSIS package programmatically](http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx).
I prefer the second method:
Start DTEXEC.EXE process. DTEXEC is command line utility for executing SSIS packages. See its command line options here: <http://msdn2.microsoft.com/en-us/li... | you can run your SSIS package programmatically, as follow:
```
using System;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace ConsoleApplicationSSIS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Loading SSIS Service...");
//Application o... |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [Running SSIS package programmatically](http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx).
I prefer the second method:
Start DTEXEC.EXE process. DTEXEC is command line utility for executing SSIS packages. See its command line options here: <http://msdn2.microsoft.com/en-us/li... | You can call the SSIS package from your windows service. But Microsoft.SqlServer.Dts should be installed into the system where windows services are going to run. If you have installed DTS installed in that machine, directly call the SSIS package. If it is not installed then you should do the following.
1. Create the S... |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [Running SSIS package programmatically](http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx).
I prefer the second method:
Start DTEXEC.EXE process. DTEXEC is command line utility for executing SSIS packages. See its command line options here: <http://msdn2.microsoft.com/en-us/li... | Updating this pretty old question:
On SQL Server 2012 you can do this simply by creating stored procedure that will call to `create_execution` and `set_execution_parameter`
Step-by-step guide can be found here: <https://blogs.msdn.microsoft.com/biblog/2013/05/07/step-by-step-of-executing-ssis-2012-package-through-sto... |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | you can run your SSIS package programmatically, as follow:
```
using System;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace ConsoleApplicationSSIS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Loading SSIS Service...");
//Application o... | You can call SSIS programtically, execute the package and change the configuration from a .NET code using DTS runtime. [Here is complete code of how you can do it](http://blogs.msdn.com/b/olivier_pieri/archive/2007/05/10/run-ssis-package-programatically.aspx). |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | you can run your SSIS package programmatically, as follow:
```
using System;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace ConsoleApplicationSSIS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Loading SSIS Service...");
//Application o... | You can call the SSIS package from your windows service. But Microsoft.SqlServer.Dts should be installed into the system where windows services are going to run. If you have installed DTS installed in that machine, directly call the SSIS package. If it is not installed then you should do the following.
1. Create the S... |
175,505 | I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file.
Can I call a SSIS directly from a .NET Windows service? | 2008/10/06 | [
"https://Stackoverflow.com/questions/175505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | you can run your SSIS package programmatically, as follow:
```
using System;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace ConsoleApplicationSSIS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Loading SSIS Service...");
//Application o... | Updating this pretty old question:
On SQL Server 2012 you can do this simply by creating stored procedure that will call to `create_execution` and `set_execution_parameter`
Step-by-step guide can be found here: <https://blogs.msdn.microsoft.com/biblog/2013/05/07/step-by-step-of-executing-ssis-2012-package-through-sto... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If (and only if) you want to delete all of the records in a table, you can use DROP TABLE or TRUNCATE TABLE.
DELETE removes one record at a time and records an entry in the transaction log for each deleted row.
TRUNCATE TABLE is much faster because it doesn't record the activity in the transaction log. It removes all ... | The delete SQL is exactly the same as a normal SQL delete
delete from table where [your condition ]
However if your worried about time then I'll assume your question is a little deeper than this. If your table is has a significant number of non-clustered indexes then in some circumstances it may be faster to drop al... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If (and only if) you want to delete all of the records in a table, you can use DROP TABLE or TRUNCATE TABLE.
DELETE removes one record at a time and records an entry in the transaction log for each deleted row.
TRUNCATE TABLE is much faster because it doesn't record the activity in the transaction log. It removes all ... | create a second table, inserting all rows from the first that you don't want deleting.
delete the first table
rename the second table to be the first
(or a variation on the above)
This can often be quicker than doing a delete of selected records from a big table. |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You may want to try deleting in batches too. I just tested this on a table I have and the delete operation went from 13 seconds to 3 seconds.
```
While Exists(Select * From YourTable Where YourCondition = True)
Delete Top (100000)
From YourTable
Where YourCondition = True
```
I don't think you can use the T... | ```
DELETE FROM table WHERE a=b;
```
When deleting that many rows you may want to disable the indexes so they don't get updated on every delete. Rewriting the indexes on every deletion will significantly slow down the whole process.
You'll want to disable these indexes before beginning your deletion or else there ma... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Does the table you are deleting from have multiple foreign keys, or cascaded deletes or triggers? All of these will impact performance.
Depending on what you want to do and the transactional integrity, can you delete things in small batches e.g. if you are trying to delete 1.5 million records that is 1 years worth of ... | On Oracle it is also possible to use
```
truncate table <table>
```
Not sure if that is standard SQL or available in SQL Server. It will however **clear the whole table** - but then it is quicker than "delete from " (it will also conduct a commit). |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If (and only if) you want to delete all of the records in a table, you can use DROP TABLE or TRUNCATE TABLE.
DELETE removes one record at a time and records an entry in the transaction log for each deleted row.
TRUNCATE TABLE is much faster because it doesn't record the activity in the transaction log. It removes all ... | **Delete from** *table* **where** *condition for those 1.5 million rows*
The time depends. |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
DELETE FROM table WHERE a=b;
```
When deleting that many rows you may want to disable the indexes so they don't get updated on every delete. Rewriting the indexes on every deletion will significantly slow down the whole process.
You'll want to disable these indexes before beginning your deletion or else there ma... | The delete SQL is exactly the same as a normal SQL delete
delete from table where [your condition ]
However if your worried about time then I'll assume your question is a little deeper than this. If your table is has a significant number of non-clustered indexes then in some circumstances it may be faster to drop al... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You may want to try deleting in batches too. I just tested this on a table I have and the delete operation went from 13 seconds to 3 seconds.
```
While Exists(Select * From YourTable Where YourCondition = True)
Delete Top (100000)
From YourTable
Where YourCondition = True
```
I don't think you can use the T... | **Delete from** *table* **where** *condition for those 1.5 million rows*
The time depends. |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | If (and only if) you want to delete all of the records in a table, you can use DROP TABLE or TRUNCATE TABLE.
DELETE removes one record at a time and records an entry in the transaction log for each deleted row.
TRUNCATE TABLE is much faster because it doesn't record the activity in the transaction log. It removes all ... | Does the table you are deleting from have multiple foreign keys, or cascaded deletes or triggers? All of these will impact performance.
Depending on what you want to do and the transactional integrity, can you delete things in small batches e.g. if you are trying to delete 1.5 million records that is 1 years worth of ... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | create a second table, inserting all rows from the first that you don't want deleting.
delete the first table
rename the second table to be the first
(or a variation on the above)
This can often be quicker than doing a delete of selected records from a big table. | The delete SQL is exactly the same as a normal SQL delete
delete from table where [your condition ]
However if your worried about time then I'll assume your question is a little deeper than this. If your table is has a significant number of non-clustered indexes then in some circumstances it may be faster to drop al... |
478,327 | How I can Delete 1.5 Millions Rows From SQL Server 2000, And how much time it will take to complete this task.
I dont want to delete all records from table.... I just want to delete all records which are fullfilling WHERE condition.
EDITED from a comment to an answer below.
"I fire the same query i.e. delete from ta... | 2009/01/25 | [
"https://Stackoverflow.com/questions/478327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You may want to try deleting in batches too. I just tested this on a table I have and the delete operation went from 13 seconds to 3 seconds.
```
While Exists(Select * From YourTable Where YourCondition = True)
Delete Top (100000)
From YourTable
Where YourCondition = True
```
I don't think you can use the T... | TRUNCATE will also ignore any referential integrity or triggers on the table. DELETE FROM ... WHERE will respect both. The time will depend on the indexing of your condition columns, your hardware, and any additional system load. |
35,245,253 | Code is working, but how do I silent this warning that keeps on appearing every time?
```
let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetailsModel = SBSavedUserModel(data:responseObject["data"].dictionaryObject! as! NSMutableDictionary)
```
>
> cast from '[String:AnyObject... | 2016/02/06 | [
"https://Stackoverflow.com/questions/35245253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4557753/"
] | Try replacing
`responseObject["data"].dictionaryObject! as! NSMutableDictionary`
with this:
`NSMutableDictionary(dictionary: responseObject["data"].dictionaryObject!)`
You could easily cast it into a NSDictionary, but for some reason when you want a NSMutableDictionary, you have to initialize a new one with `NSMuta... | Unlike `NSArray` and `NSDictionary` the mutable `Foundation` collection types `NSMutableArray` and `NSMutableDictionary` are not bridged to the Swift counterparts.
The easiest solution is to keep using Swift native types
```
let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetail... |
35,245,253 | Code is working, but how do I silent this warning that keeps on appearing every time?
```
let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetailsModel = SBSavedUserModel(data:responseObject["data"].dictionaryObject! as! NSMutableDictionary)
```
>
> cast from '[String:AnyObject... | 2016/02/06 | [
"https://Stackoverflow.com/questions/35245253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4557753/"
] | Try replacing
`responseObject["data"].dictionaryObject! as! NSMutableDictionary`
with this:
`NSMutableDictionary(dictionary: responseObject["data"].dictionaryObject!)`
You could easily cast it into a NSDictionary, but for some reason when you want a NSMutableDictionary, you have to initialize a new one with `NSMuta... | Hope this way can help you:
`mutableDictionary as NSDictionary as? [String: AnyObject]`
same way works on NSMutableArray. |
35,245,253 | Code is working, but how do I silent this warning that keeps on appearing every time?
```
let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetailsModel = SBSavedUserModel(data:responseObject["data"].dictionaryObject! as! NSMutableDictionary)
```
>
> cast from '[String:AnyObject... | 2016/02/06 | [
"https://Stackoverflow.com/questions/35245253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4557753/"
] | Unlike `NSArray` and `NSDictionary` the mutable `Foundation` collection types `NSMutableArray` and `NSMutableDictionary` are not bridged to the Swift counterparts.
The easiest solution is to keep using Swift native types
```
let parentView = self.parentViewController as! SBProfileViewController
parentView.savedDetail... | Hope this way can help you:
`mutableDictionary as NSDictionary as? [String: AnyObject]`
same way works on NSMutableArray. |
39,528,067 | I am have a `button` like this:
```
<a class="btn btn-sm btn-danger employee" data-emp_id="23" href="javascript:void(0)" disabled>Resign</a>
```
If ajax response success it adds `disabled` to this button.
Here I need to this button has `disabled` on click event. If it has, need to alert different message, or if it ... | 2016/09/16 | [
"https://Stackoverflow.com/questions/39528067",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3733831/"
] | Thank phoenix but it did not helped.
I found the solution :) , it was just to use tab separator instead of the default one.
use: '\t' instead of CSVWriter.DEFAULT\_SEPARATOR
CSVWriter csvWrite = new CSVWriter(new OutputStreamWriter(new FileOutputStream(file),
"UTF-16"),**'\t'** ,CSVWriter.NO\_QUOTE\_CHARACTER,
CSVW... | Here is this code that i wrote for a project..the values outside for loop ( "WSDL Name" and "Tags" are the column header and list will contain values to be inserted). It will generate test.csv
```
import java.io.FileWriter;
import java.io.IOException;
public class genCSV
{
public static void main(String [] args)
... |
14,337,606 | When I try to connect PowerPivot PostgreSQL database(at the point when I need to "Choose how to import the data". When I choose to select from tables and views, I get error below. When I choose to write sql query and press on 'design' button, empty window opens up (it should open tables from database)), I get this erro... | 2013/01/15 | [
"https://Stackoverflow.com/questions/14337606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1455384/"
] | Was having the same problem - successful connection but list of tables was empty. Only way I can import data is to select **"Write a query that will specify the data to import"** instead of "Select from a list of tables and views to choose the data to import." Slightly more tedious, but gets you access to the data :)
... | I think this could be a problem with the odbc driver for postgresql. Did you install the 64 bit driver? I would check on this and, in the meantime, I agree that you should try writing a query that will specify the data and see if that is a viable workaround. |
14,337,606 | When I try to connect PowerPivot PostgreSQL database(at the point when I need to "Choose how to import the data". When I choose to select from tables and views, I get error below. When I choose to write sql query and press on 'design' button, empty window opens up (it should open tables from database)), I get this erro... | 2013/01/15 | [
"https://Stackoverflow.com/questions/14337606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1455384/"
] | I investigated this problem. PostgreSQL ODBC driver contains some bugs and this is the reason of this error:
"No tables were found in the data source. Check the connection information and login credentials." | I think this could be a problem with the odbc driver for postgresql. Did you install the 64 bit driver? I would check on this and, in the meantime, I agree that you should try writing a query that will specify the data and see if that is a viable workaround. |
37,538,762 | Why do I get an error?
```
select title, mx-mn
from (select title, Rating.mID, max(stars) as mx, min(stars) as mn from Movie, Rating
where Movie.mID = Rating.mID
group by mx-mn, title)
```
I need to sort by rating spread (max-min), then by title | 2016/05/31 | [
"https://Stackoverflow.com/questions/37538762",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5892583/"
] | Below query might give the required output :-
```
select REPLACE([Last Name] COLLATE Cyrillic_General_CI_AI,'Ć','s') FROM myTable1
``` | Try to use the [Collation](https://msdn.microsoft.com/en-IN/library/ms184391.aspx) as:
```
COLLATE SQL_Latin1_General_Cp1251_CS_AS
```
So it would be like
```
select REPLACE([Last Name],'Ć','s') FROM myTable1
COLLATE SQL_Latin1_General_Cp1251_CS_AS
``` |
37,538,762 | Why do I get an error?
```
select title, mx-mn
from (select title, Rating.mID, max(stars) as mx, min(stars) as mn from Movie, Rating
where Movie.mID = Rating.mID
group by mx-mn, title)
```
I need to sort by rating spread (max-min), then by title | 2016/05/31 | [
"https://Stackoverflow.com/questions/37538762",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5892583/"
] | Below query might give the required output :-
```
select REPLACE([Last Name] COLLATE Cyrillic_General_CI_AI,'Ć','s') FROM myTable1
``` | Use N' at the start of string containing such strings,
e.g. `SELECT 'Ā ā Ă ă Ą ą', N'Ā ā Ă ă Ą ą'`
Make the column type nvarchar rather than varchar or nchar for char
For ignore accents use COLLATE clause.
E.g.:
`SELECT REPLACE([Last Name],'Ć','s') FROM myTable1 COLLATE Latin1_General_CI_AI` |
40,903,072 | I am receiving a where clause from Rest API Get and I should convert properties, So I need to convert this string to java object with logical and .... for example :
```
String where = "prop = 1 and prop2 = 'ssdf' or date > 20121204";
```
Is there any java library that converts where clause to java object with separa... | 2016/12/01 | [
"https://Stackoverflow.com/questions/40903072",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3489875/"
] | After some debug/testing, i used CURL for the adapter settings instead of SOCKET and it get fixed. :) | I had success to upload files **bigger than 1 MB**. **I uploaded two files (4.22 MB and 4.66 MB)** using your script and it works fine. Something weird from your side, did you try increasing the timeout? |
3,160,730 | $$\int\sec x dx?$$
This is the method I used:
$$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$
**I would like to see another method to solve this integral.** | 2019/03/24 | [
"https://math.stackexchange.com/questions/3160730",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/657384/"
] | $$\int \sec x\mathrm dx=\int\frac{\mathrm dx}{\cos x}=\int\frac{\cos x}{\cos^2x}\mathrm dx=\int\frac{\cos x}{1-\sin^2x}\mathrm dx\stackrel{\sin x=x}=\int \frac{\mathrm du}{1-u^2}=\frac12\log\frac{1+u}{1-u}+k$$
>
> $$\therefore~\int \sec x\mathrm dx~=~\frac12\log\frac{1+\sin x}{1-\sin x}+k$$
>
>
>
Even more intere... | Substitute $u=\sin x$ to get $\int\frac{du}{1-u^2}$. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.