qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
Use the [-Wall](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall) flag in [GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection). > > warning: control reaches end of non-void function > > > Or more specifically, [-Wreturn-type](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-...
My guess: Because sometimes the programmer knows better than the compiler. With this simple example, it's clear that someting is wrong, but consider a switch of many values, or many checks in general. You, as the coder, *know* that certain values just will not be passed in to the function, but the compiler doesn't and ...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
Use the [-Wall](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall) flag in [GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection). > > warning: control reaches end of non-void function > > > Or more specifically, [-Wreturn-type](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-...
What the standard says about this kind of programming is that it produces *undefined behavior*. Undefined behavior is the joy and pity of C/C++, but it is also a fundamental feature of the language design that allows for many of the low-level optimizations that make C a sort of "high level assembler" (it is not, actua...
5,328,289
I'm trying this and getting an error. ``` SELECT Count(*) FROM CASE @Type WHEN 'UserName' THEN Users WHERE UserName = @Name; WHEN 'UserGroup' THEN Groups Where GroupName = @GroupName AND GroupType = 'USERGROUP' END ``` I know you generally use cas...
2011/03/16
[ "https://Stackoverflow.com/questions/5328289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/339463/" ]
You need to either write dynamic SQL and execute that, or us an IF statement and two queries... ``` IF (@type = 'UserName') SELECT COUNT(*) FROM Users WHERE UserName = @name ELSE IF (@type = 'UserGroup') SELECT COUNT(*) FROM Groups WHERE GroupName = @GroupName AND GroupType = 'USERGROUP' ```
**Nope.** The only way to change your fields, tables, or database dynamically in a query is to use [Dyanmic SQL.](http://www.sommarskog.se/dynamic_sql.html) It's a dangerous thing though, so tread carefully.
26,746,484
Given the problem: Find a repeated substring in a string, is it possible to use hashing? I want to create a dictionary with the substrings as keys and the number of repeated instances as values. Here is what I have so far. I am getting an error because I am using a substring as a key for the dictionary. Can anyone spot...
2014/11/04
[ "https://Stackoverflow.com/questions/26746484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3850774/" ]
The general idea should work. It's just that if a key isn't found in the dictionary when you do a lookup, you get an error - so you have to check whether the key exists before doing a look-up and initialize if it is doesn't: ``` def findsubs(str): d={} for i in range(len(str)-1): for j in range(i+2, len(str)-2...
You were almost there ``` def findsubs(instr): d={} for i in range(len(instr)): for j in range(i+2, len(instr)+1): print instr[i:j] d[instr[i:j]] = d.get(instr[i:j],0) + 1 return d instr = 'abcdbcab' print instr print findsubs('abcdbcab') ``` This will work, i added an inside print for d...
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Assemblies and namespaces are orthogonal. One assembly may contain multiple namespaces and a single namespace may span multiple assemblies. Assemblies are the smallest independently versionable unit of code in the .NET framework. Assemblies define the physical organization of your code (into dll or exe files), while na...
Nope inside an assembly you may have define more than one namespaces. An assembly is the smallest unit of deployment in .NET. It is a collection of your IL code and metadata about you code. It contains a file called Manifest in which all the types that are used in your assembly or referred to are declared. Also there a...
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Assemblies and namespaces are orthogonal. One assembly may contain multiple namespaces and a single namespace may span multiple assemblies. Assemblies are the smallest independently versionable unit of code in the .NET framework. Assemblies define the physical organization of your code (into dll or exe files), while na...
An assembly is a physical container file (DLL or EXE). Although somewhat unusual, a namespace can span multiple assemblies.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Nope inside an assembly you may have define more than one namespaces. An assembly is the smallest unit of deployment in .NET. It is a collection of your IL code and metadata about you code. It contains a file called Manifest in which all the types that are used in your assembly or referred to are declared. Also there a...
Internal classes are not *necessarily* visible to all classes within the same namespace, since a namespace can span multiple assemblies. The assembly is the compiled file (DLL or EXE). *Usually* it means within the same project, but there are methods to combine the output of multiple projects into one assembly (via I...
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Assemblies and namespaces are orthogonal. One assembly may contain multiple namespaces and a single namespace may span multiple assemblies. Assemblies are the smallest independently versionable unit of code in the .NET framework. Assemblies define the physical organization of your code (into dll or exe files), while na...
Internal classes are not *necessarily* visible to all classes within the same namespace, since a namespace can span multiple assemblies. The assembly is the compiled file (DLL or EXE). *Usually* it means within the same project, but there are methods to combine the output of multiple projects into one assembly (via I...
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Nope inside an assembly you may have define more than one namespaces. An assembly is the smallest unit of deployment in .NET. It is a collection of your IL code and metadata about you code. It contains a file called Manifest in which all the types that are used in your assembly or referred to are declared. Also there a...
An assembly is a physical container file (DLL or EXE). Although somewhat unusual, a namespace can span multiple assemblies.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
An Assembly is a Project that has been compiled into a .DLL or .EXE. For the purposes of Visual Studio, any Class Library project, or Windows Forms App, or WPF App will compile into an Assembly.
In the .NET world, Assembly is a package of compiled code. It can be either an executable(`.exe` file) or a shared library(`.dll` file) and can contain multiple namespaces.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Nope inside an assembly you may have define more than one namespaces. An assembly is the smallest unit of deployment in .NET. It is a collection of your IL code and metadata about you code. It contains a file called Manifest in which all the types that are used in your assembly or referred to are declared. Also there a...
In the .NET world, Assembly is a package of compiled code. It can be either an executable(`.exe` file) or a shared library(`.dll` file) and can contain multiple namespaces.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
An Assembly is a Project that has been compiled into a .DLL or .EXE. For the purposes of Visual Studio, any Class Library project, or Windows Forms App, or WPF App will compile into an Assembly.
An assembly is a physical container file (DLL or EXE). Although somewhat unusual, a namespace can span multiple assemblies.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
Assemblies and namespaces are orthogonal. One assembly may contain multiple namespaces and a single namespace may span multiple assemblies. Assemblies are the smallest independently versionable unit of code in the .NET framework. Assemblies define the physical organization of your code (into dll or exe files), while na...
An Assembly is a Project that has been compiled into a .DLL or .EXE. For the purposes of Visual Studio, any Class Library project, or Windows Forms App, or WPF App will compile into an Assembly.
25,295,236
``` <div class="input-group"> <input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /> <span class="input-group-btn"> <asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /> </span> </div> ``` ... ...
2014/08/13
[ "https://Stackoverflow.com/questions/25295236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3854460/" ]
An assembly is a physical container file (DLL or EXE). Although somewhat unusual, a namespace can span multiple assemblies.
In the .NET world, Assembly is a package of compiled code. It can be either an executable(`.exe` file) or a shared library(`.dll` file) and can contain multiple namespaces.
23,201,498
**Environment:** * Mac OS X 10.8.5 * Apache 2.2.26 * Homebrew Python 3.3.3 **Problem:** I am trying to install mod\_wsgi but first need to determine if Python was configured and compiled with the '--enable-shared' option. **Questions:** 1. How can I determine if Homebrew installed Python with the '--enable-shared...
2014/04/21
[ "https://Stackoverflow.com/questions/23201498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2228353/" ]
From the python repl: ``` import sysconfig sysconfig.get_config_vars('Py_ENABLE_SHARED') ```
A bit better is to use ``` import sysconfig sysconfig.get_config_var('Py_ENABLE_SHARED') ``` This returns the integer value 0 or 1 directly. The plural form is used to get multiple values or a whole dict if no argument is given, see <https://docs.python.org/3/library/sysconfig.html?highlight=get_config_vars#sysconfi...
54,820,795
I am trying to find where I'll be redirected at. So I tried to functions for this, but none of those are working properly. the links is here. when you try to enter, you will be redirected: <https://lions-mansion.jp/MA141070/> so I tried use cURL, ``` function redirect1($url) { $ch = curl_init($url); ...
2019/02/22
[ "https://Stackoverflow.com/questions/54820795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Normally I would not answer my question, and just add a comment , but I think this will save the devs a lot of effort and pain. It was simple, I edited the .csproj with Notepad++ and found following settings: ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramewo...
For me, the error was within my .csproj file. The ItemGroup content was excluding Index.cshtml. I removed this reference and now I can navigate to Index.cshtml. ``` <pre><code> <ItemGroup> <Content Remove="Views\Employee\Delete.cshtml" /> <Content Remove="Views\Employee\Index.cshtml" /> </ItemGroup> </code></pre> ```
54,820,795
I am trying to find where I'll be redirected at. So I tried to functions for this, but none of those are working properly. the links is here. when you try to enter, you will be redirected: <https://lions-mansion.jp/MA141070/> so I tried use cURL, ``` function redirect1($url) { $ch = curl_init($url); ...
2019/02/22
[ "https://Stackoverflow.com/questions/54820795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Normally I would not answer my question, and just add a comment , but I think this will save the devs a lot of effort and pain. It was simple, I edited the .csproj with Notepad++ and found following settings: ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramewo...
I edited the .csproj Just remove this (if is Exist) ``` "<RazorCompileOnBuild>false</RazorCompileOnBuild>" "<RazorCompileOnPublish>false</RazorCompileOnPublish>" ``` from `<PropertyGroup>` By default the "RazorCompileOnBuild" & "RazorCompileOnPublish" not found in `<PropertyGroup>`
54,820,795
I am trying to find where I'll be redirected at. So I tried to functions for this, but none of those are working properly. the links is here. when you try to enter, you will be redirected: <https://lions-mansion.jp/MA141070/> so I tried use cURL, ``` function redirect1($url) { $ch = curl_init($url); ...
2019/02/22
[ "https://Stackoverflow.com/questions/54820795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Normally I would not answer my question, and just add a comment , but I think this will save the devs a lot of effort and pain. It was simple, I edited the .csproj with Notepad++ and found following settings: ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramewo...
``` dotnet clean ``` fixed it for me (.NETCore 6)
54,820,795
I am trying to find where I'll be redirected at. So I tried to functions for this, but none of those are working properly. the links is here. when you try to enter, you will be redirected: <https://lions-mansion.jp/MA141070/> so I tried use cURL, ``` function redirect1($url) { $ch = curl_init($url); ...
2019/02/22
[ "https://Stackoverflow.com/questions/54820795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For me, the error was within my .csproj file. The ItemGroup content was excluding Index.cshtml. I removed this reference and now I can navigate to Index.cshtml. ``` <pre><code> <ItemGroup> <Content Remove="Views\Employee\Delete.cshtml" /> <Content Remove="Views\Employee\Index.cshtml" /> </ItemGroup> </code></pre> ```
I edited the .csproj Just remove this (if is Exist) ``` "<RazorCompileOnBuild>false</RazorCompileOnBuild>" "<RazorCompileOnPublish>false</RazorCompileOnPublish>" ``` from `<PropertyGroup>` By default the "RazorCompileOnBuild" & "RazorCompileOnPublish" not found in `<PropertyGroup>`
54,820,795
I am trying to find where I'll be redirected at. So I tried to functions for this, but none of those are working properly. the links is here. when you try to enter, you will be redirected: <https://lions-mansion.jp/MA141070/> so I tried use cURL, ``` function redirect1($url) { $ch = curl_init($url); ...
2019/02/22
[ "https://Stackoverflow.com/questions/54820795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For me, the error was within my .csproj file. The ItemGroup content was excluding Index.cshtml. I removed this reference and now I can navigate to Index.cshtml. ``` <pre><code> <ItemGroup> <Content Remove="Views\Employee\Delete.cshtml" /> <Content Remove="Views\Employee\Index.cshtml" /> </ItemGroup> </code></pre> ```
``` dotnet clean ``` fixed it for me (.NETCore 6)
40,451,001
In *iOS 10* Apple has made a change that NSLog() output is not emitted in distributed apps (enterprise, app-store). Note that when running from Xcode, NSLog() works fine. Is there a way to force debug for all apps (very useful under beta testing phase)? Some clues appear here: [NSLog on devices in iOS 10 / Xcode 8 ...
2016/11/06
[ "https://Stackoverflow.com/questions/40451001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/913347/" ]
I think you need to use the `StorageCredentials` class. Here is a sample: ``` StorageCredentials accountSAS = new StorageCredentials(sasToken); CloudStorageAccount accountWithSAS = new CloudStorageAccount(accountSAS, "account-name", endpointSuffix: null, useHttps: true); CloudTableClient tableClientWithSAS = accountWi...
You could refer to the following sample code to use table service endpoint and Shared Access Signature to initialize a new instance of the CloudTableClient class by using `new CloudTableClient(Uri, StorageCredentials)`. ``` StorageCredentials creds = new StorageCredentials("your SAStoken"); CloudTableClient tableCli...
40,451,001
In *iOS 10* Apple has made a change that NSLog() output is not emitted in distributed apps (enterprise, app-store). Note that when running from Xcode, NSLog() works fine. Is there a way to force debug for all apps (very useful under beta testing phase)? Some clues appear here: [NSLog on devices in iOS 10 / Xcode 8 ...
2016/11/06
[ "https://Stackoverflow.com/questions/40451001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/913347/" ]
I think you need to use the `StorageCredentials` class. Here is a sample: ``` StorageCredentials accountSAS = new StorageCredentials(sasToken); CloudStorageAccount accountWithSAS = new CloudStorageAccount(accountSAS, "account-name", endpointSuffix: null, useHttps: true); CloudTableClient tableClientWithSAS = accountWi...
Stumbled upon this one when having the same issues. The solutions using the StorageCredentials seem to be ok, but I noticed later there is something wrong with the mentioned connection string as well. In order for the connection string to be valid, it needs to contain 'SharedAccessSignature=', so your connection strin...
40,451,001
In *iOS 10* Apple has made a change that NSLog() output is not emitted in distributed apps (enterprise, app-store). Note that when running from Xcode, NSLog() works fine. Is there a way to force debug for all apps (very useful under beta testing phase)? Some clues appear here: [NSLog on devices in iOS 10 / Xcode 8 ...
2016/11/06
[ "https://Stackoverflow.com/questions/40451001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/913347/" ]
You could refer to the following sample code to use table service endpoint and Shared Access Signature to initialize a new instance of the CloudTableClient class by using `new CloudTableClient(Uri, StorageCredentials)`. ``` StorageCredentials creds = new StorageCredentials("your SAStoken"); CloudTableClient tableCli...
Stumbled upon this one when having the same issues. The solutions using the StorageCredentials seem to be ok, but I noticed later there is something wrong with the mentioned connection string as well. In order for the connection string to be valid, it needs to contain 'SharedAccessSignature=', so your connection strin...
2,889,446
Suppose $f(x)$ is derivable on$[a,b]$, and $f(a)=f(b)=0$, $f\_+'(a)\gt0$ and $f\_-'(b)\gt 0$. Prove there exists a point $c$ such that $f(c)=0$ and $f'(c)\le0$. --- It's easy to get the first one. Since $f\_+'(a)\gt0$ and $f\_-'(b)\gt 0$, there is a $\delta \gt 0$, $f(x)-f(a)\gt0$ for $0\lt x-a\lt\delta$, $f(b)-f(x)\...
2018/08/21
[ "https://math.stackexchange.com/questions/2889446", "https://math.stackexchange.com", "https://math.stackexchange.com/users/515435/" ]
Since $f'\_+(a)>0,$ then $$\lim\limits\_{x \to a+}\dfrac{f(x)-f(a)}{x-a}=\lim\limits\_{x \to a+}\dfrac{f(x)}{x-a}>0,$$ which implies that $\exists \delta\_1>0$ such that $\dfrac{f(x)}{x-a}>0$,namely $f(x)>0$ when $0<x-a<\delta\_1$. Likewise, since $f'\_-(b)<0$, then $\exists \delta\_2>0$ such that $f(x)<0$ when $-\delt...
Suppose that $f(c)=0, f'(c)>0$, repeat the argument, there exists $c\_1\in (c,b)$ such that $f(c\_1)=0$, if $f'(c\_1)\leq 0$, done, otherwise there exists $c\_2\in (c\_1,b)$ such that $f(c\_2)=0$. Suppose constructed $c\_n$ such that $c\_n\in (c\_{n-1},b)$ and $f(c\_n)=0$, if $f'(c\_n)\leq 0$, done, otherwise we have a...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
The problem lies in his statement "go down a finite number of times". This statement is informal and does not in it self show anything. In order to use this statement and expound on it he would actually have to show that he may do this for $k=1$, $k=2$, $k=3$, etc. or if he do not wish do do an infinite algorithm, he m...
I wouldn't say that he's necessarily wrong, but it's a questionable approach. There **could** be a hidden circular reasoning buried in the details, but basically without the proof of the details you cannot say. The definition of $\mathbb N$ basically already contains the induction principle in the third requirement. L...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
$\dots$ is not a mathematical operator. If your prof thinks his proof is correct, then he should be able to write it without $\dots$ . When $\dots$ is used correctly, it is simply tedious to replace it with symbolic logic. In the above case, it is impossible to replace it with symbolic logic so the professors proof is ...
I wouldn't say that he's necessarily wrong, but it's a questionable approach. There **could** be a hidden circular reasoning buried in the details, but basically without the proof of the details you cannot say. The definition of $\mathbb N$ basically already contains the induction principle in the third requirement. L...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
After a lot of thought and back and forth in the comments, I decided that your professor is probably right. I'm assuming pre-induction we are allowed to do any number of finite iterations: So if: 1)True for $n =1$ 2)If true for $n$ then true for $n +1$ Then we can conclude: 3) True for $k$ after $k - 1$ iteration...
I wouldn't say that he's necessarily wrong, but it's a questionable approach. There **could** be a hidden circular reasoning buried in the details, but basically without the proof of the details you cannot say. The definition of $\mathbb N$ basically already contains the induction principle in the third requirement. L...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
$\dots$ is not a mathematical operator. If your prof thinks his proof is correct, then he should be able to write it without $\dots$ . When $\dots$ is used correctly, it is simply tedious to replace it with symbolic logic. In the above case, it is impossible to replace it with symbolic logic so the professors proof is ...
The problem lies in his statement "go down a finite number of times". This statement is informal and does not in it self show anything. In order to use this statement and expound on it he would actually have to show that he may do this for $k=1$, $k=2$, $k=3$, etc. or if he do not wish do do an infinite algorithm, he m...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
The problem lies in his statement "go down a finite number of times". This statement is informal and does not in it self show anything. In order to use this statement and expound on it he would actually have to show that he may do this for $k=1$, $k=2$, $k=3$, etc. or if he do not wish do do an infinite algorithm, he m...
After a lot of thought and back and forth in the comments, I decided that your professor is probably right. I'm assuming pre-induction we are allowed to do any number of finite iterations: So if: 1)True for $n =1$ 2)If true for $n$ then true for $n +1$ Then we can conclude: 3) True for $k$ after $k - 1$ iteration...
1,610,615
How to get calculate the integration of follwing: $$\int\_{0}^{2\pi} \frac{dt}{a + cos t} (a>1)$$ My attempt: let, $z=e^{it}$ $\implies dt = \frac{dz}{it}$ and $$\cos t = \frac{z + \frac{1}{z}}{2}$$ On substituting everything in the integral I got: $$\frac{2}{i}\int\_{c} \frac{dz}{z^2+2az+1}$$ Now how do I dec...
2016/01/13
[ "https://math.stackexchange.com/questions/1610615", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192765/" ]
$\dots$ is not a mathematical operator. If your prof thinks his proof is correct, then he should be able to write it without $\dots$ . When $\dots$ is used correctly, it is simply tedious to replace it with symbolic logic. In the above case, it is impossible to replace it with symbolic logic so the professors proof is ...
After a lot of thought and back and forth in the comments, I decided that your professor is probably right. I'm assuming pre-induction we are allowed to do any number of finite iterations: So if: 1)True for $n =1$ 2)If true for $n$ then true for $n +1$ Then we can conclude: 3) True for $k$ after $k - 1$ iteration...
18,244,431
Say I have a repo and someone forks it. Then they do work and submit a pull request. But the code contains a large number of lines and/or it creates a GUI. I'd like to fetch it so I can actually see it run from Eclipse before merging it into my master. The options I've come up with are: 1. Create a second repo in EGit...
2013/08/15
[ "https://Stackoverflow.com/questions/18244431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938711/" ]
> > Then leave a comment for the request asking them to re-submit the pull request using the new branch and that I'll be closing the current request > > > They don't have to re-submit, it you test and merge first locally, as described in the "[Merging a pull request](https://help.github.com/articles/merging-a-pull...
If the PR number is 123, you can simply use the EGit Pull action, and use `pulls/123/head` as reference.
28,533,942
<http://codepen.io/anon/pen/WbdaVB> ``` Check the codepen.io for code. Sorry, new to Stack Overflow, please don't hurt me if I'm doing it wrong. ;-; ``` I have my logo (<http://i.imgur.com/CIwEPgT.png>) in the code already, but can someone make it so that my logo is in front of the space background? Thanks. Miles.
2015/02/16
[ "https://Stackoverflow.com/questions/28533942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4327046/" ]
First target the image tag with the `class="logo"`, also you need use double quotes(`""`) in the src, not `¨¨`. ``` <img class="logo" src="http://i.imgur.com/CIwEPgT.png"> ``` Them, in your CSS, add this: ``` .logo { position: relative; z-index: 9999; } ``` <http://codepen.io/anon/pen/zxRmWO>
Have you tried setting the `z-index` of the image to be a higher number and positioning it on top of the background? Also, I'd advise not using center tags.
32,598,295
I have started use Parse (which I downloaded using Cocoapods) in a practice iOS application and I having a little bit of trouble understanding certain concepts. I have written this code so far: ``` - (IBAction)saveUserButtonClicked:(id)sender { PFObject *loginCredentials = [PFObject objectWithClassName:@"LoginCre...
2015/09/16
[ "https://Stackoverflow.com/questions/32598295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I solved this by installing Aptitude, to install build-essential: ``` sudo apt-get install aptitude sudo aptitude install build-essentials ``` Then installing some "essentials" i found in a blog post: ``` sudo apt-get install -y unzip vim git-core curl wget python-software-properties ``` Then re-installing nginx:...
This sounds very much like the wrong apt repository got added. In particular, ``` Depends: librtmp1 but it is not installable ``` The trusty version of HHVM [depends on `librtmp0`](https://github.com/hhvm/packaging/blob/1699f82635ad66f9f208cafdfa14c10693b356b4/hhvm/deb/trusty/DEBIAN/control) (which does exist for tr...
1,322,262
I want to attach an actual drive to a VirtualBox VM, so I [followed the instructions here](https://www.virtualbox.org/manual/ch09.html#rawdisk), which says to do this: ``` VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sdX ``` That creates a virtual hard drive (`file.vmdk`) whic...
2018/05/13
[ "https://superuser.com/questions/1322262", "https://superuser.com", "https://superuser.com/users/904549/" ]
You can use the `lsblk` command like this: ``` sudo lsblk /dev/sdaX -no UUID ``` To get the partition uuid but you can also use the device file system. ``` ls -l /dev/disk/by-uuid ``` To confirm which UUID you want to use. That file will refer to which ever /dev/sdX matches the UUID. Then use that in the xboxman...
Usually, partitions have a UUID, but not the whole drive. It should have a unique ID, though. You can easily create a vmdk by pointing the command to the latter: ``` VBoxManage internalcommands createrawvmdk -filename <image_name>.vmdk -rawdisk /dev/disk/by-id/<ID_of_the_drive> ``` Or open an existing vmdk file with...
69,183,761
I have a blazor server app that I want to run on a raspberry pi. So far it is all good, I installed it as a service and the service is running like it should. I published the solution to `srv/myApp` and I have a .service config for it. The only thing missing is the serving of the `wwwroot` folder. When I open the app a...
2021/09/14
[ "https://Stackoverflow.com/questions/69183761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479976/" ]
Oh. Its not at all related to npm package. You are talking about JS prototypes. Basically you want to add custom function in String class. Not a good idea to do but still if you want you can do ``` String.prototype.reverseString = function (str) { return str.split('').reverse().join(''); } ```
Create a .js file with your method: ``` module.exports = { reverseString: (string) => string.split('').reverse().join('') } ``` Then elsewhere, use it with `require()` ``` const somethinghere = require('myfile.js') somethinghere.reverseString('hello') ```
63,003,502
I am trying to plot a graph in ggplot2 where the x-axis represents month-day combinations, the dots represent y-values for two different groups. When graphing my original data set using this code, ``` ggplot(graphing.df, aes(MONTHDAY, y.var, color = GROUP)) + geom_point() + ylab(paste0(""))+ ...
2020/07/20
[ "https://Stackoverflow.com/questions/63003502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8304241/" ]
You could use `map` ```js var tags= [ {id: 0, name: "tag1", project: "p1", bu: "test"}, {id: 1, name: "tag2", project: "p1", bu: "test"}, {id: 2, name: "tag3", project: "p3", bu: "test"} ]; var res=tags.map(o=>[o.name,o.project,o.bu]) console.log(res) ``` Or You could use a more generic approach ```js var tags= [ {i...
If you want to conserve all properties you can use ``` let twoDArray = tags.map(tag => Object.values(tag)) // [[0, "tag1", "p1", "test"], [1, "tag2", "p1", "test"], [2, "tag3", "p3", "test"]] ```
63,003,502
I am trying to plot a graph in ggplot2 where the x-axis represents month-day combinations, the dots represent y-values for two different groups. When graphing my original data set using this code, ``` ggplot(graphing.df, aes(MONTHDAY, y.var, color = GROUP)) + geom_point() + ylab(paste0(""))+ ...
2020/07/20
[ "https://Stackoverflow.com/questions/63003502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8304241/" ]
You could use `map` ```js var tags= [ {id: 0, name: "tag1", project: "p1", bu: "test"}, {id: 1, name: "tag2", project: "p1", bu: "test"}, {id: 2, name: "tag3", project: "p3", bu: "test"} ]; var res=tags.map(o=>[o.name,o.project,o.bu]) console.log(res) ``` Or You could use a more generic approach ```js var tags= [ {i...
[Array.map](https://www.geeksforgeeks.org/javascript-array-map-method/) will help you. <https://www.geeksforgeeks.org/javascript-array-map-method/> ```js var tags= [ {id: 0, name: "tag1", project: "p1", bu: "test"}, {id: 1, name: "tag2", project: "p1", bu: "test"}, {id: 2, name: "tag3", project: "p3", bu: "test...
12,813
I often hear Ashkenazim pronouncing (or at least trying) Hebrew words in Tefila/Keriat HaTorah like Sephardim. It probably isn't only Religious Zionists but it seems to be only them. Where did the this minhag come from? I heard live from either Rav Schechter or Rav Gedalya Shwartz that even the Rav (Solevecik) and Rav ...
2012/01/01
[ "https://judaism.stackexchange.com/questions/12813", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/1035/" ]
From personal experience: My father pronounced Hebrew like a European, and my mother's father like his Gerer roots. But then we were sent to local day schools, many of which came into being during a widespread Zionist fervor (religious and not religious) in the middle of 20th century. There was a big push by the foun...
For the most part, the Sephardic pronunciation (with a few exceptions) is commonly accepted as the correct one. For example, properly pronouncing *ayin* is not simply a matter of culture, it's the correct way to say it. That is to say, and I hope I'm not insulting anyone, much of what is known as Ashkenazic pronunc...
12,813
I often hear Ashkenazim pronouncing (or at least trying) Hebrew words in Tefila/Keriat HaTorah like Sephardim. It probably isn't only Religious Zionists but it seems to be only them. Where did the this minhag come from? I heard live from either Rav Schechter or Rav Gedalya Shwartz that even the Rav (Solevecik) and Rav ...
2012/01/01
[ "https://judaism.stackexchange.com/questions/12813", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/1035/" ]
My Hebrew teachers came from Israel, so they taught me how to read and write Hebrew as Israelis do. I imagine those schools which do not hire Israelis to teach Hebrew, are also less likely to end up with students who feel a connection to religious Zionism. However, I was also always taught that the Temani way of pron...
For the most part, the Sephardic pronunciation (with a few exceptions) is commonly accepted as the correct one. For example, properly pronouncing *ayin* is not simply a matter of culture, it's the correct way to say it. That is to say, and I hope I'm not insulting anyone, much of what is known as Ashkenazic pronunc...
3,294,668
I want to verify when $u(x) \in L^p$, $x \in [0, \infty)$ then can we say $u(x) \in L^{ \infty}$, $x \in [0, \infty)$ ? Where $u$ is any function with variable x, and $L^p$ is talking about Lebesgue spaces. If not, please give me an counterexample or we could derive that result by adding any conditions?
2019/07/16
[ "https://math.stackexchange.com/questions/3294668", "https://math.stackexchange.com", "https://math.stackexchange.com/users/677517/" ]
No. For any $1 \le p < +\infty$ set $u(x) = \frac1{x^{1/2p}}\chi\_{(0,1)}(x)$. Then $$\int\_0^\infty|u(x)|^p\,dx = \int\_0^1 \frac{dx}{\sqrt{x}} < +\infty$$ so $u \in L^p(0, \infty)$. However, for any $M \ge 1$ we have $u \ge M$ on $\left(0, \frac1{M^{2p}}\right)$ which is a set of positive measure so $u \notin L^\in...
No. In fact for a given measure space the inclusion $L^p\subset L^\infty$ holds if and only if $$\inf\{\mu(E):\mu(E)>0\}>0.$$(Which holds for counting measure, for example.)
3,294,668
I want to verify when $u(x) \in L^p$, $x \in [0, \infty)$ then can we say $u(x) \in L^{ \infty}$, $x \in [0, \infty)$ ? Where $u$ is any function with variable x, and $L^p$ is talking about Lebesgue spaces. If not, please give me an counterexample or we could derive that result by adding any conditions?
2019/07/16
[ "https://math.stackexchange.com/questions/3294668", "https://math.stackexchange.com", "https://math.stackexchange.com/users/677517/" ]
In general the implication $u\in L^p(\Omega) \implies u \in L^\infty(\Omega)$ is false. For example, if the space $\Omega$ has finite measure (e.g. $\Omega=[0,1]$) it is the converse to hold: $$u\in L^\infty(\Omega) \implies u \in L^p(\Omega) \quad \forall p\in [1,\infty],$$ and more in general: $$u\in L^q(\Omega...
No. In fact for a given measure space the inclusion $L^p\subset L^\infty$ holds if and only if $$\inf\{\mu(E):\mu(E)>0\}>0.$$(Which holds for counting measure, for example.)
10,638,163
How can I put a compiler directive to exclude non-ARC code so shared code can be used with projects that use ARC and with projects that don't? For example: ``` MyClass *myClass = [MyClass alloc]init]; ... #if NOT_USING_ARC [myClass release]; #endif ```
2012/05/17
[ "https://Stackoverflow.com/questions/10638163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46362/" ]
You can use: ``` #if __has_feature(objc_arc) ... #else ... #endif ```
There is a refactoring that will convert your classes to be compatible with ARC. In XCode menu: Edit - Refactor - Convert to Objective-C ARC. Another option is to disable ARC for individual files by adding the `-fno-objc-arc` compiler flag for those files. You add compiler flags in Targets -> Build Phases -> Compile...
43,319,730
Need to scroll dialog to top so that alert comes into view after form submission. Tried this but doesn't seem to work on dialogs. ``` window.scrollTo(0,0); ```
2017/04/10
[ "https://Stackoverflow.com/questions/43319730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4837160/" ]
```js document.getElementById('formsubmit').onclick=function(){ document.getElementById('form').scrollTop = 0; return false; } ``` ```css input { display:block; } .form { height:100px; overflow-y:auto; } ``` ```html <div> <h1>form</h1> <div class="form" id="form"> <input type="text"> ...
Although this question has been marked as the answer, this isn't the angular-y way of scrolling to the top. A better way of doing this is by doing: ```js @ViewChild('scrollContainer') private myScrollContainer: ElementRef; constructor(private _renderer: Renderer2) {} onFormSubmit() { this._renderer.setPropert...
43,319,730
Need to scroll dialog to top so that alert comes into view after form submission. Tried this but doesn't seem to work on dialogs. ``` window.scrollTo(0,0); ```
2017/04/10
[ "https://Stackoverflow.com/questions/43319730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4837160/" ]
```js document.getElementById('formsubmit').onclick=function(){ document.getElementById('form').scrollTop = 0; return false; } ``` ```css input { display:block; } .form { height:100px; overflow-y:auto; } ``` ```html <div> <h1>form</h1> <div class="form" id="form"> <input type="text"> ...
Use the plain js `scrollIntoView` [1] ``` function scrollIntoView() { $('#modalId')[0].scrollIntoView(); } ``` Not an angular way but it works. [1] <https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView>
43,319,730
Need to scroll dialog to top so that alert comes into view after form submission. Tried this but doesn't seem to work on dialogs. ``` window.scrollTo(0,0); ```
2017/04/10
[ "https://Stackoverflow.com/questions/43319730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4837160/" ]
Although this question has been marked as the answer, this isn't the angular-y way of scrolling to the top. A better way of doing this is by doing: ```js @ViewChild('scrollContainer') private myScrollContainer: ElementRef; constructor(private _renderer: Renderer2) {} onFormSubmit() { this._renderer.setPropert...
Use the plain js `scrollIntoView` [1] ``` function scrollIntoView() { $('#modalId')[0].scrollIntoView(); } ``` Not an angular way but it works. [1] <https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView>
10,450,246
I need single query to execute this function in mysql ``` select * from 'users' where user_name like 'account' ``` if no users with name `account` present then i have to use the second query else i can go with the first query. ``` select * from 'users' where user_name like 'manager' ``` is there any way to optimi...
2012/05/04
[ "https://Stackoverflow.com/questions/10450246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375126/" ]
Something like this should work ``` Select IF ((Select count(*) from 'users' where user_name like 'account')>0, select * from 'users' where user_name like 'account', select * from 'users' where user_name like 'manager') ```
just an idea, how about you do ``` select * from 'users' where user_name like 'account' or user_name like 'manager' order by user_name ``` than you check the first account, if it is ='account', you delete all the managers from your dataset. If it is manager, there you have your dataset
10,450,246
I need single query to execute this function in mysql ``` select * from 'users' where user_name like 'account' ``` if no users with name `account` present then i have to use the second query else i can go with the first query. ``` select * from 'users' where user_name like 'manager' ``` is there any way to optimi...
2012/05/04
[ "https://Stackoverflow.com/questions/10450246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375126/" ]
``` SELECT m.* FROM users m LEFT JOIN users a ON a.user_name = 'account' WHERE m.user_name = coalesce(a.user_name, 'manager'); ``` It will not work properly in case `user_name` is not unique, I thought it should be, actually. It would help to know how table is defined to design the query properly.
just an idea, how about you do ``` select * from 'users' where user_name like 'account' or user_name like 'manager' order by user_name ``` than you check the first account, if it is ='account', you delete all the managers from your dataset. If it is manager, there you have your dataset
10,450,246
I need single query to execute this function in mysql ``` select * from 'users' where user_name like 'account' ``` if no users with name `account` present then i have to use the second query else i can go with the first query. ``` select * from 'users' where user_name like 'manager' ``` is there any way to optimi...
2012/05/04
[ "https://Stackoverflow.com/questions/10450246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375126/" ]
Something like this should work ``` Select IF ((Select count(*) from 'users' where user_name like 'account')>0, select * from 'users' where user_name like 'account', select * from 'users' where user_name like 'manager') ```
I think you should be able to use a `IF` statement in your `WHERE` clause: ``` SELECT * FROM `users` WHERE user_name LIKE IF((SELECT COUNT(*) FROM `users` WHERE name = 'account' ) > 0,'account','manager'); ```
10,450,246
I need single query to execute this function in mysql ``` select * from 'users' where user_name like 'account' ``` if no users with name `account` present then i have to use the second query else i can go with the first query. ``` select * from 'users' where user_name like 'manager' ``` is there any way to optimi...
2012/05/04
[ "https://Stackoverflow.com/questions/10450246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375126/" ]
``` SELECT m.* FROM users m LEFT JOIN users a ON a.user_name = 'account' WHERE m.user_name = coalesce(a.user_name, 'manager'); ``` It will not work properly in case `user_name` is not unique, I thought it should be, actually. It would help to know how table is defined to design the query properly.
I think you should be able to use a `IF` statement in your `WHERE` clause: ``` SELECT * FROM `users` WHERE user_name LIKE IF((SELECT COUNT(*) FROM `users` WHERE name = 'account' ) > 0,'account','manager'); ```
10,450,246
I need single query to execute this function in mysql ``` select * from 'users' where user_name like 'account' ``` if no users with name `account` present then i have to use the second query else i can go with the first query. ``` select * from 'users' where user_name like 'manager' ``` is there any way to optimi...
2012/05/04
[ "https://Stackoverflow.com/questions/10450246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375126/" ]
Something like this should work ``` Select IF ((Select count(*) from 'users' where user_name like 'account')>0, select * from 'users' where user_name like 'account', select * from 'users' where user_name like 'manager') ```
``` SELECT m.* FROM users m LEFT JOIN users a ON a.user_name = 'account' WHERE m.user_name = coalesce(a.user_name, 'manager'); ``` It will not work properly in case `user_name` is not unique, I thought it should be, actually. It would help to know how table is defined to design the query properly.
64,833,772
I am quite new to machine learning and neural nets. I‘ve used the following model for sentiment analysis of short texts. I generally understand how signals are computed, all the way to the output layer. Now what I dont understand is how the inputs are found. When the model classifies a word, how is that word translated...
2020/11/14
[ "https://Stackoverflow.com/questions/64833772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7365858/" ]
> > When the model classifies a word, how is that word translated to the > 512 input units? > > > As you already noticed, before any kind of written information (single words, sentences or whole texts) can be processed by a neural network, it must be *encoded* into a vector representation. This is called an [*embe...
There are multiple methods by which you can obtain the vector embedding of a word. 1. Count based methods: PMI, PPMI and SVD 2. Prediction based methods: CBOW and Skip-Gram The count-based methods create a co-occurrence matrix of words of shape Vocabulary\*Vocabulary where each word is represented by some sort of cou...
377,194
Is it possible to deny or prevent or obstruct a network scan on the network where your computer is connected to?
2012/01/11
[ "https://superuser.com/questions/377194", "https://superuser.com", "https://superuser.com/users/112925/" ]
If you don't want your pc to be scanned for open ports or available services, you can use a firewall that closes/stealths the necessary ports. Beware, certain ports wil always be open to be able to communicate with the network.
First, go to Start Menu->Run window. Type `cmd`. In the command prompt enter the following commands: ``` Net config server /hidden:yes ``` This command will hide you from the Network neighborhood but your shared folders can still be access. Note: in Windows Vista, you need to open the command Prompt as Administrato...
377,194
Is it possible to deny or prevent or obstruct a network scan on the network where your computer is connected to?
2012/01/11
[ "https://superuser.com/questions/377194", "https://superuser.com", "https://superuser.com/users/112925/" ]
If you don't want your pc to be scanned for open ports or available services, you can use a firewall that closes/stealths the necessary ports. Beware, certain ports wil always be open to be able to communicate with the network.
You can't without disconnecting from the network. All the firewalls and IDS in the world can't stop it if someone knows what they are doing.
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
There are various ways to make a DAC. I'll do a historical review… Conceptually the simplest is to have a range of binary weighted elements like resistors, current sources or capacitors, each corresponding to one bit. These elements are connected to a summing node, and each injects a current or charge corresponding to...
Well, even your first assumption is wrong. Audio DACs are these days are not even constructed from R-2R resistances. Even a 1-bit delta sigma modulator will likely have better specs on audio bandwidth than a bunch of resistors. The problems of analog domain are handled by processing in digital domain. Usualy the pric...
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
Well, even your first assumption is wrong. Audio DACs are these days are not even constructed from R-2R resistances. Even a 1-bit delta sigma modulator will likely have better specs on audio bandwidth than a bunch of resistors. The problems of analog domain are handled by processing in digital domain. Usualy the pric...
Good comprehensive posts, so just a couple of cents in addition: For audio reproduction, perhaps the key property of the DAC is its nonlinearity, or Integral Nonlinearity (INL). R2R DACs don't offer advantages here, so are being successively abandoned in favor of cheaper and more flexible Delta Sigma DACs. Digital co...
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
Well, even your first assumption is wrong. Audio DACs are these days are not even constructed from R-2R resistances. Even a 1-bit delta sigma modulator will likely have better specs on audio bandwidth than a bunch of resistors. The problems of analog domain are handled by processing in digital domain. Usualy the pric...
I can't add much to the above excellent contributions, except to add that if you have a voltage available of 30V pk-pk in the analogue domain, then 16 bit resolution equates to about 460uV pk-pk or around 160uV rms. So if your analogue circuitry is not giving less than this as noise - across the full 10 octaves of the ...
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
There are various ways to make a DAC. I'll do a historical review… Conceptually the simplest is to have a range of binary weighted elements like resistors, current sources or capacitors, each corresponding to one bit. These elements are connected to a summing node, and each injects a current or charge corresponding to...
Good comprehensive posts, so just a couple of cents in addition: For audio reproduction, perhaps the key property of the DAC is its nonlinearity, or Integral Nonlinearity (INL). R2R DACs don't offer advantages here, so are being successively abandoned in favor of cheaper and more flexible Delta Sigma DACs. Digital co...
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
There are various ways to make a DAC. I'll do a historical review… Conceptually the simplest is to have a range of binary weighted elements like resistors, current sources or capacitors, each corresponding to one bit. These elements are connected to a summing node, and each injects a current or charge corresponding to...
I can't add much to the above excellent contributions, except to add that if you have a voltage available of 30V pk-pk in the analogue domain, then 16 bit resolution equates to about 460uV pk-pk or around 160uV rms. So if your analogue circuitry is not giving less than this as noise - across the full 10 octaves of the ...
636,984
I'm currently attending a basic course on real-time embedded systems. Recently, we have been talking about embedded systems memory architecture. When doing some extra studying on memory maps, I came across the memory map for the ATmega328P microcontroller. As can be seen from the image, the flash is divided into a boot...
2022/10/02
[ "https://electronics.stackexchange.com/questions/636984", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/294957/" ]
Good comprehensive posts, so just a couple of cents in addition: For audio reproduction, perhaps the key property of the DAC is its nonlinearity, or Integral Nonlinearity (INL). R2R DACs don't offer advantages here, so are being successively abandoned in favor of cheaper and more flexible Delta Sigma DACs. Digital co...
I can't add much to the above excellent contributions, except to add that if you have a voltage available of 30V pk-pk in the analogue domain, then 16 bit resolution equates to about 460uV pk-pk or around 160uV rms. So if your analogue circuitry is not giving less than this as noise - across the full 10 octaves of the ...
61,114,097
I need help to know what I am doing wrong, I have little time working with c#. I can't iterate the json , I am using RestSharp and Newtonsoft.Json . The message says:: > > "'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'ConsoleApp1.Libro' because the type requires a JSON object (e.g. {"name":"v...
2020/04/09
[ "https://Stackoverflow.com/questions/61114097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13265558/" ]
use `Laravel Sanctum` <https://laravel.com/docs/7.x/sanctum> Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These token...
Laravel Passport is also useful. Laravel already makes it easy to perform authentication via traditional login forms, but what about APIs? APIs typically use tokens to authenticate users and do not maintain session state between requests. Laravel makes API authentication a breeze using Laravel Passport, which provides ...
48,367,886
Here it comes. I have the following data: ``` type, validfrom, price 1, 2018-01-15, 10 1, 2018-01-20, 20 1, 2018-01-25, 30 2, 2018-01-01, 12 3, 2018-01-01, 18 ``` Today, it's **2018-01-21**, I need a query which produces the following result: ``` 1, 2018-01-20, 20 2, 2018-01-01, 12 3, 2018-01-01, 18 ``` I tri...
2018/01/21
[ "https://Stackoverflow.com/questions/48367886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9010171/" ]
In MySQL, you can do: ``` select t.* from t where t.validfrom = (select max(t2.validfrom) from t t2 where t2.type = t.type and t2.validfrom < now() ); ``` With an index on `t(type, validfrom)`, this should have very good perform...
<http://sqlfiddle.com/#!9/47c9e5/8> ``` SELECT p.* FROM prices p LEFT JOIN prices p_ ON p.type = p_.type AND p.validfrom < p_.validfrom AND p_.validfrom< NOW() WHERE p_.type IS NULL AND p.validfrom<=NOW() ```
71,316,944
I want to disable scrollPositionRestoration on one page. Let's say I have the following routes in my app-routing.module.ts file... ``` const appRoutes: Routes = [{ path: 'home', component: myComponent}, { path: 'about', component: myComponent}, ] ``` and I have my imports as follows... ``` @NgModule({imports: [Rout...
2022/03/02
[ "https://Stackoverflow.com/questions/71316944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18308368/" ]
Do not use: `scrollPositionRestoration: 'enabled'` Reset back to: ``` @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) ``` Then use this in your home.component.ts only: ``` scrollTop() { window.scroll(0, 0); } ``` Then add `(click)="scrollTop()"` where you want to execute...
You could not control `scrollPositionRestoration` value differently in different routes. This option for root module only. As a result, In your case you should remove it from root module (by default `scrollPositionRestoration` value is `'disabled'`) and can control the position of scroll by `Router` and `ViewportScroll...
4,065,229
I'm trying to add 10 more elements to my struct that has been already malloc with a fixed sized of 20. This is the way I have my struct defined: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> struct st_temp { char *prod; }; int main () { struct st_temp **temp_struct; size_t j; temp_struc...
2010/10/31
[ "https://Stackoverflow.com/questions/4065229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493020/" ]
To avoid memory leaks, we need to handle reallocating with care (more on that later). The realloc function: `void *realloc(void *ptr, size_t size)`, where `ptr` = the pointer to the original (`malloc`'ed) memory block, and `size` = the new size of the memory block (in bytes). `realloc` returns the new location of ...
When you use `realloc()`, you must give the *new* size instead of the number of bytes to add. So: ``` temp_struct = (struct st_temp **) realloc (temp_struct, 30 * sizeof(struct st_temp*)); ``` 30 is, of course, your original 20 plus 10 more. The `realloc()` function takes care of copying the original data to a new l...
72,527,502
I have barchart with dual-axis in order to visualize 3 numerical variables. All these work pretty nice in ggplot. However, when I convert ggplot to **ggplotly**, there are issues: 1. in the legend, there are strange 1s (highlighted in yellow) 2. in the hover, there are double values (highlighted in yellow) 3. changes ...
2022/06/07
[ "https://Stackoverflow.com/questions/72527502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Further approach from @Quinten's answer, to handle 'name name' and 'value value' things, try ``` tooltip = c("value", "name", "model") plt1$x$layout$legend$title$text <- "name" ``` Full code is ``` plt <- ggplot(df_long, aes(x = model, y= value, label = NA))+ geom_col(data = filter(df_long, name != "cost"), ...
### Legend issue: Using the code in this post: [Strange formatting of legend in ggplotly in R](https://stackoverflow.com/questions/49133395/strange-formatting-of-legend-in-ggplotly-in-r) . You can change the legend in `ggplotly` like this: ``` library(plotly) myplot = ggplotly(plt) for (i in 1:length(myplot$x$data))...
72,527,502
I have barchart with dual-axis in order to visualize 3 numerical variables. All these work pretty nice in ggplot. However, when I convert ggplot to **ggplotly**, there are issues: 1. in the legend, there are strange 1s (highlighted in yellow) 2. in the hover, there are double values (highlighted in yellow) 3. changes ...
2022/06/07
[ "https://Stackoverflow.com/questions/72527502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It looks like you've got some great information so far. This addresses all of the things you identified. Although, at this point, it would be a LOT easier to just make the plot in Plotly! The first thing I did is comment out the call for `geom_text` and `geom_label`. Plotly doesn't tend to play well here. It is going ...
### Legend issue: Using the code in this post: [Strange formatting of legend in ggplotly in R](https://stackoverflow.com/questions/49133395/strange-formatting-of-legend-in-ggplotly-in-r) . You can change the legend in `ggplotly` like this: ``` library(plotly) myplot = ggplotly(plt) for (i in 1:length(myplot$x$data))...
103,498
**ISO Paper Sizes Defined:** The A series paper sizes are defined by the following requirements: ``` The length divided by the width is the square root of 2. The A0 size has an area of 1 unit. Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. ``` [![enter image description he...
2016/12/17
[ "https://codegolf.stackexchange.com/questions/103498", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/17326/" ]
BBC BASIC 49 ASCII characters ============================= **Tokenised filesize 44 bytes** ``` I.n:F.i=0TOn:RECTANGLE0,0,1189>>i/2+.5,841>>i/2N. ``` Much shorter than before! I always forget about the bitshift operators in BBC BASIC for windows as they weren't available on my old computer back in the day. BBC BAS...
JavaScript (ES6) + HTML, ~~96~~ 94 + 34 = ~~130~~ 128 bytes ----------------------------------------------------------- ```js f=(n,w=297,h=210)=>n--&&f(n,h<w?w/2:w,h<w?h:h/2,(C=c.getContext`2d`).rect(0,0,w,h),C.stroke()) f(8) ``` ```html <canvas id=c width=300 height=300> ```
103,498
**ISO Paper Sizes Defined:** The A series paper sizes are defined by the following requirements: ``` The length divided by the width is the square root of 2. The A0 size has an area of 1 unit. Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. ``` [![enter image description he...
2016/12/17
[ "https://codegolf.stackexchange.com/questions/103498", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/17326/" ]
BBC BASIC 49 ASCII characters ============================= **Tokenised filesize 44 bytes** ``` I.n:F.i=0TOn:RECTANGLE0,0,1189>>i/2+.5,841>>i/2N. ``` Much shorter than before! I always forget about the bitshift operators in BBC BASIC for windows as they weren't available on my old computer back in the day. BBC BAS...
Mathematica, ~~87~~ 85 bytes ============================ Thanks @martin for 1 byte. ``` Graphics@{EdgeForm@Thin,White,Rectangle[#,0{,}]&/@NestList[Sort[#/a]&,{1,a=√2},#]}& ```
103,498
**ISO Paper Sizes Defined:** The A series paper sizes are defined by the following requirements: ``` The length divided by the width is the square root of 2. The A0 size has an area of 1 unit. Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. ``` [![enter image description he...
2016/12/17
[ "https://codegolf.stackexchange.com/questions/103498", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/17326/" ]
BBC BASIC 49 ASCII characters ============================= **Tokenised filesize 44 bytes** ``` I.n:F.i=0TOn:RECTANGLE0,0,1189>>i/2+.5,841>>i/2N. ``` Much shorter than before! I always forget about the bitshift operators in BBC BASIC for windows as they weren't available on my old computer back in the day. BBC BAS...
JavaScript (ES6)/SVG (HTML5), 170 bytes --------------------------------------- ```js a=prompt();document.write('<svg width=297 height=210>');for(w=297,h=210;a--;h>w?h/=2:w/=2)document.write(`<rect fill=none stroke=#000 x=0 y=0 width=${w} height=${h} />`); ``` Uses 1-based indexing.
7,960
I have some questions regarding aforementioned subject: * Is there a EC equivalent of RSA-OAEP key transport/encryption algorithm ? * Is ECIES-KEM sufficient ?
2013/04/10
[ "https://crypto.stackexchange.com/questions/7960", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/4688/" ]
Short answer, - yes - yes To be honest I don't really know how to give a longer answer. He are some pointers <http://www.secg.org/download/aid-780/sec1-v2.pdf> <http://digital.csic.es/bitstream/10261/32674/1/Gayoso_A%20Comparison%20of%20the%20Standardized%20Versions%20of%20ECIES.pdf>
As I understand it, there's really no RSA equivalent in EC. See, for example, [Why are elliptic curve variants of RSA "chiefly of academic interest"?](https://crypto.stackexchange.com/questions/3969/why-are-elliptic-curve-variants-of-rsa-chiefly-of-academic-interest) Shoup's Integrated Encryption Scheme (ECIES) is an ...
7,960
I have some questions regarding aforementioned subject: * Is there a EC equivalent of RSA-OAEP key transport/encryption algorithm ? * Is ECIES-KEM sufficient ?
2013/04/10
[ "https://crypto.stackexchange.com/questions/7960", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/4688/" ]
Short answer, - yes - yes To be honest I don't really know how to give a longer answer. He are some pointers <http://www.secg.org/download/aid-780/sec1-v2.pdf> <http://digital.csic.es/bitstream/10261/32674/1/Gayoso_A%20Comparison%20of%20the%20Standardized%20Versions%20of%20ECIES.pdf>
The question is what you mean by "eqivalence". RSA-OAEP yields to an RSA encryption scheme providing security against adaptive chosen message attacks (IND-CCA2) in the random oracle model, while plain RSA does not even provide IND-CPA security. If you mean security (which I assume), then **yes**, ECIES also achieves...
4,407
I know that the title is a little weird, sorry about that. The thing is that one day I asked my russian instructor, who's russian, how to pronounce Kolmogorov in russian (because it has too many o's) and she told me that is *Холмогóров*, but in the [wiki article](http://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BB%D0%BC%D0...
2014/05/02
[ "https://russian.stackexchange.com/questions/4407", "https://russian.stackexchange.com", "https://russian.stackexchange.com/users/1770/" ]
Your Russian teacher was not a mathematician, so she probably guessed that the name is "kholmogorov", as there is a Russian word "kholm" meaning a hill. The correct name is Kolmogorov, and you pronounce it roughly as "Kalmagoraf"
Происхождение фамилии «Колмогоров» связано с топонимом «Колмогоры», а он, вероятно, происходит от финского kolme «три» (т. е. «Трехгорка»), или от kalma, «могила», и kari, «утес». «Холмогоры» – русификация Происхождение от топонима Кроме Колмогор (Холмогор) в Архангельской области, топоним известен в Кемеровской. Дерев...
2,355,329
I am trying to create a trigger on a database called dbo.DHCPReport, which has a column called "returneduserclass nvarChar(128)". I want to have the trigger send a email when the returneduserclass column is populated with the following "NACDeny". the trigger I have is below, currently all this does is email when any "i...
2010/03/01
[ "https://Stackoverflow.com/questions/2355329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283544/" ]
First off, are you trying to send this email when a record is INSERTED or when a record is UPDATED? They are 2 different things... IF after an INSERT then you can capture the new row and interrogate as you would any variable: `REFERENCING NEW AS N IF N.Returneduserclass = 'nacdeny' then do stuff End if`
SQL triggers are very, very new to me, so apologies if i get any terminology wrong! I'm after the data when its inserted. If that is the case where abouts in the trigger does the "REFERENCING NEW AS N IF N.Returneduserclass = 'nacdeny'" get inserted ? Is any of sql existing trigger correct ? I did replace the first "...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
**Update: Editted based on new information.** Meta refresh won't work because cronjob.de will be using an automated system that doesn't actually read the contents of the page. No browser, so nothing to see the meta refresh. You have a couple options. They vary in greater or lesser horribleness. The best option is to...
You can use PHP to call the script... ``` <?php $script='/path/to/my/php/script.php'; ignore_user_abort(1); set_time_limit(0); $php=exec('which php'); while (1) { if (file_exists($script)) { exec($php.' '.$script); } else { file_get_contents($script); } sleep(2); } ?> ``` The file you give $script needs...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm afraid that won't work, because it's a browser feature to refresh the page. Question: Why can't you set the cron job to run more frequently that every 5 minutes? If there is no other option then you could create you're own daemon to do the job more frequently. e.g. Your php script could: * Run * Wait 60 second...
What you are trying to do it implies user interaction, so what if no client enters into your "page"? For example Servlets and EJB containers can do it programmatically at container startup what you need, so I suppose that for PHP the only way to accomplish "automatically" cronlike jobs is to make some changes in your ...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm afraid that won't work, because it's a browser feature to refresh the page. Question: Why can't you set the cron job to run more frequently that every 5 minutes? If there is no other option then you could create you're own daemon to do the job more frequently. e.g. Your php script could: * Run * Wait 60 second...
I'm pretty sure you can achieve it by doing this: ``` <?php $secs = 120; ignore_user_abort(true); set_time_limit(0); while (true) { // do something // Sleep for some time sleep($secs); } ?> ``` **Edit** You will have to execute it once after every server restart unless you do it like Douglas descri...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm pretty sure you can achieve it by doing this: ``` <?php $secs = 120; ignore_user_abort(true); set_time_limit(0); while (true) { // do something // Sleep for some time sleep($secs); } ?> ``` **Edit** You will have to execute it once after every server restart unless you do it like Douglas descri...
What you are trying to do it implies user interaction, so what if no client enters into your "page"? For example Servlets and EJB containers can do it programmatically at container startup what you need, so I suppose that for PHP the only way to accomplish "automatically" cronlike jobs is to make some changes in your ...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'd say don't try to do this with php, change your crontab. If you need your application to do a cronjob every minute and your hosting doesn't provide this option, you have most likely outgrown your hosting. Get yourself a VPS hosting for 20$ a month (Slicehost, Servergrove).
**Update: Editted based on new information.** Meta refresh won't work because cronjob.de will be using an automated system that doesn't actually read the contents of the page. No browser, so nothing to see the meta refresh. You have a couple options. They vary in greater or lesser horribleness. The best option is to...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm afraid that won't work, because it's a browser feature to refresh the page. Question: Why can't you set the cron job to run more frequently that every 5 minutes? If there is no other option then you could create you're own daemon to do the job more frequently. e.g. Your php script could: * Run * Wait 60 second...
You can use PHP to call the script... ``` <?php $script='/path/to/my/php/script.php'; ignore_user_abort(1); set_time_limit(0); $php=exec('which php'); while (1) { if (file_exists($script)) { exec($php.' '.$script); } else { file_get_contents($script); } sleep(2); } ?> ``` The file you give $script needs...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
You can use PHP to call the script... ``` <?php $script='/path/to/my/php/script.php'; ignore_user_abort(1); set_time_limit(0); $php=exec('which php'); while (1) { if (file_exists($script)) { exec($php.' '.$script); } else { file_get_contents($script); } sleep(2); } ?> ``` The file you give $script needs...
What you are trying to do it implies user interaction, so what if no client enters into your "page"? For example Servlets and EJB containers can do it programmatically at container startup what you need, so I suppose that for PHP the only way to accomplish "automatically" cronlike jobs is to make some changes in your ...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm pretty sure you can achieve it by doing this: ``` <?php $secs = 120; ignore_user_abort(true); set_time_limit(0); while (true) { // do something // Sleep for some time sleep($secs); } ?> ``` **Edit** You will have to execute it once after every server restart unless you do it like Douglas descri...
**Update: Editted based on new information.** Meta refresh won't work because cronjob.de will be using an automated system that doesn't actually read the contents of the page. No browser, so nothing to see the meta refresh. You have a couple options. They vary in greater or lesser horribleness. The best option is to...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'd say don't try to do this with php, change your crontab. If you need your application to do a cronjob every minute and your hosting doesn't provide this option, you have most likely outgrown your hosting. Get yourself a VPS hosting for 20$ a month (Slicehost, Servergrove).
You can use PHP to call the script... ``` <?php $script='/path/to/my/php/script.php'; ignore_user_abort(1); set_time_limit(0); $php=exec('which php'); while (1) { if (file_exists($script)) { exec($php.' '.$script); } else { file_get_contents($script); } sleep(2); } ?> ``` The file you give $script needs...
741,910
I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often. So I had the idea that I could add ... ``` <html> <head> <meta http-equiv="refresh" content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" /> </hea...
2009/04/12
[ "https://Stackoverflow.com/questions/741910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89818/" ]
I'm afraid that won't work, because it's a browser feature to refresh the page. Question: Why can't you set the cron job to run more frequently that every 5 minutes? If there is no other option then you could create you're own daemon to do the job more frequently. e.g. Your php script could: * Run * Wait 60 second...
I'd say don't try to do this with php, change your crontab. If you need your application to do a cronjob every minute and your hosting doesn't provide this option, you have most likely outgrown your hosting. Get yourself a VPS hosting for 20$ a month (Slicehost, Servergrove).
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Go with [Total Choice Hosting](http://totalchoicehosting.com/). They have awesome support and with your budget you can afford **two** of their *Gold* plan which gives you 1 TB of bandwidth. You probably do not need that much even unless you product is hugely popular. You can even get away with buying one plan (saving ...
Check out <http://www.rshosting.com> or <http://www.rshosting.co.uk> I have been their customer for almost a couple of years now and have been very satisfied with the level of web hosting services and support I have received from them. Decent website uptime, and fast connectivity to their servers and support is a key ...
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Don't spend £250/year. Spend as little as possible, then scale as you grow. Two options to consider: ### 1. Use a source code hosting service such as github [Github](https://github.com/) is a popular hosting service for the [git](http://git-scm.com/) version control system. In addition to [code hosting](https://githu...
Go with [Total Choice Hosting](http://totalchoicehosting.com/). They have awesome support and with your budget you can afford **two** of their *Gold* plan which gives you 1 TB of bandwidth. You probably do not need that much even unless you product is hugely popular. You can even get away with buying one plan (saving ...
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Don't spend £250/year. Spend as little as possible, then scale as you grow. Two options to consider: ### 1. Use a source code hosting service such as github [Github](https://github.com/) is a popular hosting service for the [git](http://git-scm.com/) version control system. In addition to [code hosting](https://githu...
**What kind of web hosting would be best for a project like this?** You require nothing out of the ordinary. With your budget being a concern, any reliable shared hosting provider would be fine. There are many from which to choose (as you have noted) and there is no absolute answer. Finding the right host for you is ...
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Don't spend £250/year. Spend as little as possible, then scale as you grow. Two options to consider: ### 1. Use a source code hosting service such as github [Github](https://github.com/) is a popular hosting service for the [git](http://git-scm.com/) version control system. In addition to [code hosting](https://githu...
Check out <http://www.rshosting.com> or <http://www.rshosting.co.uk> I have been their customer for almost a couple of years now and have been very satisfied with the level of web hosting services and support I have received from them. Decent website uptime, and fast connectivity to their servers and support is a key ...
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
**What kind of web hosting would be best for a project like this?** You require nothing out of the ordinary. With your budget being a concern, any reliable shared hosting provider would be fine. There are many from which to choose (as you have noted) and there is no absolute answer. Finding the right host for you is ...
First of all I will request you to check reviews of the company you select, Presently I am using UK web Hosting <http://wwww.webhost.uk.net> , I have used there service for 3 years and they are fantastic in terms of support and service.
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Don't spend £250/year. Spend as little as possible, then scale as you grow. Two options to consider: ### 1. Use a source code hosting service such as github [Github](https://github.com/) is a popular hosting service for the [git](http://git-scm.com/) version control system. In addition to [code hosting](https://githu...
I would recommend [reliablesite](http://www.reliablesite.net/v4/web-hosting.aspx), it's much lower than your budget, 100 GB of bandwidth, and rock solid.
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Go with [Total Choice Hosting](http://totalchoicehosting.com/). They have awesome support and with your budget you can afford **two** of their *Gold* plan which gives you 1 TB of bandwidth. You probably do not need that much even unless you product is hugely popular. You can even get away with buying one plan (saving ...
First of all I will request you to check reviews of the company you select, Presently I am using UK web Hosting <http://wwww.webhost.uk.net> , I have used there service for 3 years and they are fantastic in terms of support and service.
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
**What kind of web hosting would be best for a project like this?** You require nothing out of the ordinary. With your budget being a concern, any reliable shared hosting provider would be fine. There are many from which to choose (as you have noted) and there is no absolute answer. Finding the right host for you is ...
Check out <http://www.rshosting.com> or <http://www.rshosting.co.uk> I have been their customer for almost a couple of years now and have been very satisfied with the level of web hosting services and support I have received from them. Decent website uptime, and fast connectivity to their servers and support is a key ...
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
Don't spend £250/year. Spend as little as possible, then scale as you grow. Two options to consider: ### 1. Use a source code hosting service such as github [Github](https://github.com/) is a popular hosting service for the [git](http://git-scm.com/) version control system. In addition to [code hosting](https://githu...
First of all I will request you to check reviews of the company you select, Presently I am using UK web Hosting <http://wwww.webhost.uk.net> , I have used there service for 3 years and they are fantastic in terms of support and service.
14,802
> > **Possible Duplicate:** > > [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements) > > > I am working on a project that will be released as open source in the latter part of the year. I am starting to th...
2011/06/03
[ "https://webmasters.stackexchange.com/questions/14802", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/8022/" ]
I would recommend [reliablesite](http://www.reliablesite.net/v4/web-hosting.aspx), it's much lower than your budget, 100 GB of bandwidth, and rock solid.
Check out <http://www.rshosting.com> or <http://www.rshosting.co.uk> I have been their customer for almost a couple of years now and have been very satisfied with the level of web hosting services and support I have received from them. Decent website uptime, and fast connectivity to their servers and support is a key ...
66,402,760
I'm using unoconv to convert XLSX => PDF. I need LibreOffice to wrap text and increase row heights dynamically depending on the contents of the XLSX file. Is there a way to do this programmatically, maybe at the unoconv/soffice level?
2021/02/27
[ "https://Stackoverflow.com/questions/66402760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/646960/" ]
The only way that worked for us was by patching unoconv so that it immediately performs the following actions after opening a document: * Select All * Trigger optimal row height for the selection From python, it looks like this: ``` frame = document.CurrentController.Frame dispatcher = self.unosvcmgr.createInstanceW...
I tryed to solve this problem here <https://github.com/PasaOpasen/_excel_correct_cells> I think results are well, but it's not so easy
14,710,332
OBJECTIVE --------- Use the OPENROWSET feature to JOIN data in a query against a text file. ERROR ----- Leveraging the answer from @gbn on [this question](https://stackoverflow.com/questions/4562911/using-input-from-a-text-file-for-where-clause) I am trying to open a row set just like the OP; though the format of th...
2013/02/05
[ "https://Stackoverflow.com/questions/14710332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1195080/" ]
*If* you are logged in as a SQL login then you must [create a credential](http://msdn.microsoft.com/en-us/library/ms190703.aspx) for this login and this credential must have sufficient privileges to read the share. *If* you are logged in as a Windows login then you must enable Kerberos constrained delegation for the S...
I had the same issue which was caused by using a SQL DNS-Alias. With Servername\Instance it worked, with ServerAlias\Instance I get `Operating system error code 5(Access is denied.).`
14,710,332
OBJECTIVE --------- Use the OPENROWSET feature to JOIN data in a query against a text file. ERROR ----- Leveraging the answer from @gbn on [this question](https://stackoverflow.com/questions/4562911/using-input-from-a-text-file-for-where-clause) I am trying to open a row set just like the OP; though the format of th...
2013/02/05
[ "https://Stackoverflow.com/questions/14710332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1195080/" ]
*If* you are logged in as a SQL login then you must [create a credential](http://msdn.microsoft.com/en-us/library/ms190703.aspx) for this login and this credential must have sufficient privileges to read the share. *If* you are logged in as a Windows login then you must enable Kerberos constrained delegation for the S...
These steps are required on SQL Server 2017 to make `OPENROWSET ('Microsoft.ACE.OLEDB.16.0','Excel 12.0;..)` working with a Shared Folder (UNC file-share): 1. Install [Microsoft Access Database Engine 2016 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=54920) 2. [Configure the Service Princi...
14,710,332
OBJECTIVE --------- Use the OPENROWSET feature to JOIN data in a query against a text file. ERROR ----- Leveraging the answer from @gbn on [this question](https://stackoverflow.com/questions/4562911/using-input-from-a-text-file-for-where-clause) I am trying to open a row set just like the OP; though the format of th...
2013/02/05
[ "https://Stackoverflow.com/questions/14710332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1195080/" ]
I had the same issue which was caused by using a SQL DNS-Alias. With Servername\Instance it worked, with ServerAlias\Instance I get `Operating system error code 5(Access is denied.).`
These steps are required on SQL Server 2017 to make `OPENROWSET ('Microsoft.ACE.OLEDB.16.0','Excel 12.0;..)` working with a Shared Folder (UNC file-share): 1. Install [Microsoft Access Database Engine 2016 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=54920) 2. [Configure the Service Princi...
322,233
I am writing the figure of £1,000,000 in a presentation but finding that my style guide clashes with what looks right. * 'Million' must be spelled out. * '£' must be used instead of 'pounds'. * Numbers one to ten must be written out and not expressed in numerals. As such, it appears that I should present *£1,000,000*...
2016/04/28
[ "https://english.stackexchange.com/questions/322233", "https://english.stackexchange.com", "https://english.stackexchange.com/users/44665/" ]
I have worked for a number of UK academic publishers and they all have'£1 million' (with lowercase m) as their house style. Occasionally, I have seen 1 million GBP. Incidentally, most publishers prefer numbers up to ten (or twenty) to be spelled out. This rule is usually 'bent' if it would create sentences such as: ' ....
I think in this case £1 million would be the correct form.
41,726,100
Based on the following code snippet, I was wondering how to hide the soft keys (status and navigation bars) and maintain immersive mode throughout the whole app session even when an AlertDialog is displayed: ``` public class MainActivity extends AppCompatActivity implements View.OnClickListener { AlertDialog.Build...
2017/01/18
[ "https://Stackoverflow.com/questions/41726100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5385758/" ]
Try this: ``` @Override public void onClick(View view) { switch (view.getId()) { case R.id.button: dialog.setTitle("Title"); dialog.setMessage("Message"); AlertDialog alert = dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() { public v...
Use the following code to create your own immersive AlertDialog, and call it with `alertDialog.showImmersive()` ``` const val FLAGS_FULLSCREEN = View.SYSTEM_UI_FLAG_LOW_PROFILE or View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_IMMERSIV...
137,910
After [repairing some damage to a wall](https://diy.stackexchange.com/questions/135851/how-to-fix-damaged-wall-after-peeling-off-hook), I need to re-paint the repaired area to match the rest of the wall. I have been given the wrong colour by a shop assistant and it has made it worse (See photo). The paint he's given m...
2018/04/25
[ "https://diy.stackexchange.com/questions/137910", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/83703/" ]
> > **I was hoping 1) to get some advice on the "gloss" or "sheen" issue (I don't even know what that means),** > > > As well as the colour, the appearance of a painted wall is affected by how smooth and reflective the paint surface is. Paints come in matt, silk, gloss and other degrees of shinyness. You probably...
Sounds like you need a *matt* finish, not *gloss high sheen*. Or maybe a *silk* finish which is shinier than matt but not as shiny as high sheen. See [this Dulux help page](https://www.dulux.co.uk/en/decorating-tips-and-advice/dr-dulux-paint-finishes-explained) for more details. It could also be down to the way you app...
137,910
After [repairing some damage to a wall](https://diy.stackexchange.com/questions/135851/how-to-fix-damaged-wall-after-peeling-off-hook), I need to re-paint the repaired area to match the rest of the wall. I have been given the wrong colour by a shop assistant and it has made it worse (See photo). The paint he's given m...
2018/04/25
[ "https://diy.stackexchange.com/questions/137910", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/83703/" ]
> > **I was hoping 1) to get some advice on the "gloss" or "sheen" issue (I don't even know what that means),** > > > As well as the colour, the appearance of a painted wall is affected by how smooth and reflective the paint surface is. Paints come in matt, silk, gloss and other degrees of shinyness. You probably...
In the USA, big box home stores have little slips of paper that have the name of the color and an example of the color. We used that to successfully match paint.