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
36,865,742
On my project i have wordpress custom field data from mysql : ``` --------------------------------------------------- id | post_id | meta_key | meta_value --------------------------------------------------- 1 | 200 | age_min | 5 2 | 200 | age_max | 8 3 | 399 ...
2016/04/26
[ "https://Stackoverflow.com/questions/36865742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Using ajax you can call a controller action and return it's response to a particular `div`. Empty `div`: ``` <div class="row" id="div3"> </div> ``` Ajax to display html in empty `div`: ``` function performSearch(searchCriteria) { //get information to pass to controller var searchInformation = JSON.stringif...
jQuery will help you with it! Try to handle submit button onclick event like this: ``` $("#yourButtonId").click(function() { $.ajax({ type: "POST", url: "/yourUrl", //in asp.net mvc using ActionResult data: data, dataType: 'html', success: functi...
36,865,742
On my project i have wordpress custom field data from mysql : ``` --------------------------------------------------- id | post_id | meta_key | meta_value --------------------------------------------------- 1 | 200 | age_min | 5 2 | 200 | age_max | 8 3 | 399 ...
2016/04/26
[ "https://Stackoverflow.com/questions/36865742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Using ajax you can call a controller action and return it's response to a particular `div`. Empty `div`: ``` <div class="row" id="div3"> </div> ``` Ajax to display html in empty `div`: ``` function performSearch(searchCriteria) { //get information to pass to controller var searchInformation = JSON.stringif...
You can do it with ajax. First, change your html.beginform to ajax.beginform in your view and add div id into **UpdateTargetId** that you want to change contents. After updating first partial with ajax.beginform, you can update other partialviews with ajax.beginform's **"OnSuccess"** function. You have to add update f...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, ~~34~~ 32 bytes ===================== ``` 1l+256b2b1>l{~"11W:mm%!<>">4%~}/ ``` It uses the following characters for instructions: ``` 0: left rotation 1: right rotation 2: reverse 3: flip ``` The input is taking from STDIN with the word on the first line and the instruction string on the second line. [Test...
JavaScript (E6), 163 ~~167~~ ============================ Fully using the input flexibility, a named function with 2 array parameters. * First parameter, array of bytes corresponding to 7 bit character codes * Second parameter, array of bytes corresponding to ascii characters 'F','L','R','U' --> 70, 76, 82, 85 The f...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, ~~34~~ 32 bytes ===================== ``` 1l+256b2b1>l{~"11W:mm%!<>">4%~}/ ``` It uses the following characters for instructions: ``` 0: left rotation 1: right rotation 2: reverse 3: flip ``` The input is taking from STDIN with the word on the first line and the instruction string on the second line. [Test...
Matlab (166 bytes) ================== This uses letters `abcd` instead of `lrfu` respectively. ``` function D=f(B,C) D=dec2bin(B,8)'; D=D(:); g=@circshift; for c=C switch c-97 case 0 D=g(D,-1); case 1 D=g(D,1); case 2 D=char(97-D); case 3 D=flipud(D); end end D=D'; ``` Some tricks used here to save space: * Using ...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, ~~34~~ 32 bytes ===================== ``` 1l+256b2b1>l{~"11W:mm%!<>">4%~}/ ``` It uses the following characters for instructions: ``` 0: left rotation 1: right rotation 2: reverse 3: flip ``` The input is taking from STDIN with the word on the first line and the instruction string on the second line. [Test...
J, 164 ------ ``` ([: >@:}. (([: }. >&{.) ; >@:{.@:>@:{. 128!:2 >@:}.)^:({.@:$@:>@:{.))@:(>@:((<;._1 ' 1&|."1 _1&|."1 -. |."1') {~ 'lrfu' i. 0&({::)@:]) ; ;@:([: (8$2)&#: a. i. 1&({::))) ``` Formatted: ``` nextop=:([: }. >&{.) exec=: (>@:{.@:>@:{.) apply"1 >@:}. times=: ({.@:$@:>@:{.) gapply=: [: >@:}. (nextop ; ex...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
Matlab (166 bytes) ================== This uses letters `abcd` instead of `lrfu` respectively. ``` function D=f(B,C) D=dec2bin(B,8)'; D=D(:); g=@circshift; for c=C switch c-97 case 0 D=g(D,-1); case 1 D=g(D,1); case 2 D=char(97-D); case 3 D=flipud(D); end end D=D'; ``` Some tricks used here to save space: * Using ...
### C#, 418 bytes ``` using System;using System.Collections.Generic;using System.Linq;class P{string F(string a,string o){var f=new Dictionary<char,Func<string,IEnumerable<char>>>{{'l',s=>s.Substring(1)+s[0]},{'r',s=>s[s.Length-1]+s.Substring(0,s.Length-1)},{'u',s=>s.Reverse()},{'f',s=>s.Select(c=>(char)(97-c))}};retu...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, 34 bytes ============== Another approach in CJam. ``` 1l+256b2b1>l_S/,1&@f=_,,@f{W%~}\f= ``` The input text is on the first line and the instructions are on the second line. Instructions: ``` ) Rotate left. ( Rotate right. (space) Flip. ~ Reverse. ```
### C#, 418 bytes ``` using System;using System.Collections.Generic;using System.Linq;class P{string F(string a,string o){var f=new Dictionary<char,Func<string,IEnumerable<char>>>{{'l',s=>s.Substring(1)+s[0]},{'r',s=>s[s.Length-1]+s.Substring(0,s.Length-1)},{'u',s=>s.Reverse()},{'f',s=>s.Select(c=>(char)(97-c))}};retu...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, ~~34~~ 32 bytes ===================== ``` 1l+256b2b1>l{~"11W:mm%!<>">4%~}/ ``` It uses the following characters for instructions: ``` 0: left rotation 1: right rotation 2: reverse 3: flip ``` The input is taking from STDIN with the word on the first line and the instruction string on the second line. [Test...
Python 2 - 179 ============== ``` b="".join([bin(ord(i))[2:]for i in input()]) for i in input():b=b[-1]+b[:-1]if i=="r"else b[1:]+b[0]if i=="l"else[str("10".find(j))for j in b]if i=="f"else b[::-1] print"".join(b) ```
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
Pyth 33 ------- ``` jku@[+eGPG+tGhG_Gms!dG)sHwsmjCk2z ``` Uses: ``` 0 : rotate right 1 : rotate left 2 : reverse order 3 : flip values ``` [Pyth github](https://github.com/isaacg1/pyth) [Try it online here.](https://pyth.herokuapp.com/) This is a program that takes the string as it's first argument ...
Matlab (166 bytes) ================== This uses letters `abcd` instead of `lrfu` respectively. ``` function D=f(B,C) D=dec2bin(B,8)'; D=D(:); g=@circshift; for c=C switch c-97 case 0 D=g(D,-1); case 1 D=g(D,1); case 2 D=char(97-D); case 3 D=flipud(D); end end D=D'; ``` Some tricks used here to save space: * Using ...
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
CJam, ~~34~~ 32 bytes ===================== ``` 1l+256b2b1>l{~"11W:mm%!<>">4%~}/ ``` It uses the following characters for instructions: ``` 0: left rotation 1: right rotation 2: reverse 3: flip ``` The input is taking from STDIN with the word on the first line and the instruction string on the second line. [Test...
Scala - 192 =========== ``` def f(i:String,l:String)=(i.flatMap(_.toBinaryString).map(_.toInt-48)/:l){ case(b,'l')⇒b.tail:+b.head case(b,'r')⇒b.last+:b.init case(b,'f')⇒b.map(1-_) case(b,'u')⇒b.reverse}.mkString ```
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
Pyth 33 ------- ``` jku@[+eGPG+tGhG_Gms!dG)sHwsmjCk2z ``` Uses: ``` 0 : rotate right 1 : rotate left 2 : reverse order 3 : flip values ``` [Pyth github](https://github.com/isaacg1/pyth) [Try it online here.](https://pyth.herokuapp.com/) This is a program that takes the string as it's first argument ...
Ruby, 151 ========= ```ruby f=->i,s{s.chars.inject(i.unpack("B*")[0]){|a,c| a.reverse! if c==?u a.tr!"01","10" if c==?f a<<a.slice!(1..-1) if c==?l a<<a.slice!(0..-2) if c==?r a}} ``` Fairly straightforward. Loops trough the characters in `s` and performs an action for any of them.
45,087
This is based on [xkcd #153](http://xkcd.com/153/). Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from `lrfu` (or the equivalent ASCII bytes). It should be interpreted as a series o...
2015/01/27
[ "https://codegolf.stackexchange.com/questions/45087", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/-1/" ]
Pyth 33 ------- ``` jku@[+eGPG+tGhG_Gms!dG)sHwsmjCk2z ``` Uses: ``` 0 : rotate right 1 : rotate left 2 : reverse order 3 : flip values ``` [Pyth github](https://github.com/isaacg1/pyth) [Try it online here.](https://pyth.herokuapp.com/) This is a program that takes the string as it's first argument ...
### C#, 418 bytes ``` using System;using System.Collections.Generic;using System.Linq;class P{string F(string a,string o){var f=new Dictionary<char,Func<string,IEnumerable<char>>>{{'l',s=>s.Substring(1)+s[0]},{'r',s=>s[s.Length-1]+s.Substring(0,s.Length-1)},{'u',s=>s.Reverse()},{'f',s=>s.Select(c=>(char)(97-c))}};retu...
38,401,671
I have this part of code (everything is in background.js), which basically executes javascript in pages based on page's URL. It should work on toolbar button click, and Ctrl + Q command. I assign it to button click like this, and it works: ``` chrome.browserAction.onClicked.addListener(function(tab) { browser.tabs.qu...
2016/07/15
[ "https://Stackoverflow.com/questions/38401671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2558764/" ]
I found out the problem, it was the missing "all\_urls" permission. Apparently "tabs" and "activeTab" permissions weren't enough.
The error you are getting is what is produced when you attempt to inject into a tab for which you do not have permission to inject. This could be a normal tab, if you do not have appropriate `permissions` set in your *manifest.json*. More commonly it is that you are attempting to inject into a tab containing a page int...
26,044,416
I'm studying the C++ programming language and I'm reading the chapter about assignment operator ( = ). In C++ initalization and assignment are operation so similar that we can use the same notation. But my question is : when i initialize a variable am I doing it with the assignment operator ? When i assign to a variab...
2014/09/25
[ "https://Stackoverflow.com/questions/26044416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3697275/" ]
You asked > > when i initialize a variable am I doing it with the assignment operator ? > > > and said > > when we initialize a variable we are giving it a new value with the assignment operator > > > But, no, you are not. The symbol `=` is used for both copy-initialization and assignment, but initializatio...
Your thought are quite correct. With a constructor you are allocating a new object of that type, which has its own overhead. When you copy assign to a variable, instead, you don't want to create a new object since you already have one. What you just need is to set the corresponding member variables of the left hand si...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
The [**whereami** library by Gregory Pakosz](https://github.com/gpakosz/whereami) implements this for a variety of platforms, using the APIs mentioned in [mark4o's post](https://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937). This is most interesting if you "...
An alternative on Linux to using either `/proc/self/exe` or `argv[0]` is using the information passed by the ELF interpreter, made available by glibc as such: ``` #include <stdio.h> #include <sys/auxv.h> int main(int argc, char **argv) { printf("%s\n", (char *)getauxval(AT_EXECFN)); return(0); } ``` Note th...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
Depending on the version of **QNX Neutrino**, there are different ways to find the full path and name of the executable file that was used to start the running process. I denote the process identifier as `<PID>`. Try the following: 1. If the file `/proc/self/exefile` exists, then its contents are the requested informa...
If you're writing GPLed code and using GNU autotools, then a portable way that takes care of the details on many OSes (including Windows and macOS) is gnulib's [`relocatable-prog`](https://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html) module.
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
If you're writing GPLed code and using GNU autotools, then a portable way that takes care of the details on many OSes (including Windows and macOS) is gnulib's [`relocatable-prog`](https://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html) module.
You can use argv[0] and analyze the PATH environment variable. Look at : [A sample of a program that can find itself](http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=88086d6e1de021106d6e1de02110275d6e10RCRD)
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
> > If you ever had to support, say, Mac > OS X, which doesn't have /proc/, what > would you have done? Use #ifdefs to > isolate the platform-specific code > (NSBundle, for example)? > > > Yes, isolating platform-specific code with `#ifdefs` is the conventional way this is done. Another approach would be to have ...
> > But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. > > > You cannot do that (at least on Linux) -------------------------------------- Since an executable could, during execution of a [process](https://en.wikipedia.org/wiki/Pr...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
The [**whereami** library by Gregory Pakosz](https://github.com/gpakosz/whereami) implements this for a variety of platforms, using the APIs mentioned in [mark4o's post](https://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937). This is most interesting if you "...
Making this work reliably across platforms requires using #ifdef statements. The below code finds the executable's path in Windows, Linux, MacOS, Solaris or FreeBSD (although FreeBSD is untested). It uses [Boost](http://www.boost.org) 1.55.0 (or later) to simplify the code, but it's easy enough to remove if you want. ...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
Some OS-specific interfaces: * Mac OS X: [`_NSGetExecutablePath()`](https://stackoverflow.com/questions/799679/programatically-retrieving-the-absolute-path-of-an-os-x-command-line-app/1024933#1024933) ([man 3 dyld](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dyld....
An alternative on Linux to using either `/proc/self/exe` or `argv[0]` is using the information passed by the ELF interpreter, made available by glibc as such: ``` #include <stdio.h> #include <sys/auxv.h> int main(int argc, char **argv) { printf("%s\n", (char *)getauxval(AT_EXECFN)); return(0); } ``` Note th...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
Depending on the version of **QNX Neutrino**, there are different ways to find the full path and name of the executable file that was used to start the running process. I denote the process identifier as `<PID>`. Try the following: 1. If the file `/proc/self/exefile` exists, then its contents are the requested informa...
Well, of course, this doesn't apply to all projects. Still, `QCoreApplication::applicationFilePath()` never failed me in 6 years of C++/Qt development. Of course, one should read documentation thoroughly before attempting to use it: > > Warning: On Linux, this function will try to get the path from the > /proc file ...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
Some OS-specific interfaces: * Mac OS X: [`_NSGetExecutablePath()`](https://stackoverflow.com/questions/799679/programatically-retrieving-the-absolute-path-of-an-os-x-command-line-app/1024933#1024933) ([man 3 dyld](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dyld....
Just my two cents. You can find the current application's directory in C/C++ with cross-platform interfaces by using this code. ``` void getExecutablePath(char ** path, unsigned int * pathLength) { // Early exit when invalid out-parameters are passed if (!checkStringOutParameter(path, pathLength)) { ...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
AFAIK, no such way. And there is also an ambiguity: what would you like to get as the answer if the same executable has multiple hard-links "pointing" to it? (Hard-links don't actually "point", they *are* the same file, just at another place in the file system hierarchy.) Once `execve()` successfully executes a new bi...
> > But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. > > > You cannot do that (at least on Linux) -------------------------------------- Since an executable could, during execution of a [process](https://en.wikipedia.org/wiki/Pr...
1,023,306
It seems to me that Linux has it easy with /proc/self/exe. But I'd like to know if there is a convenient way to find the current application's directory in C/C++ with cross-platform interfaces. I've seen some projects mucking around with argv[0], but it doesn't seem entirely reliable. If you ever had to support, say,...
2009/06/21
[ "https://Stackoverflow.com/questions/1023306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41896/" ]
The use of `/proc/self/exe` is non-portable and unreliable. On my Ubuntu 12.04 system, you must be root to read/follow the symlink. This will make the Boost example and probably the `whereami()` solutions posted fail. This post is very long but discusses the actual issues and presents code which actually works along w...
AFAIK, no such way. And there is also an ambiguity: what would you like to get as the answer if the same executable has multiple hard-links "pointing" to it? (Hard-links don't actually "point", they *are* the same file, just at another place in the file system hierarchy.) Once `execve()` successfully executes a new bi...
37,399,228
There is an [article](https://jlordiales.wordpress.com/2012/12/13/the-builder-pattern-in-practice/) that I came across while I was looking for a good practice of [builder pattern](https://en.wikipedia.org/wiki/Builder_pattern). In the article, the author mentions about something that drew my attention. the pattern bei...
2016/05/23
[ "https://Stackoverflow.com/questions/37399228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3403689/" ]
> > "id":([0-9]), "name":"give the name you want" > > > Try this which will work for the example which has been given by you. "data":{"elements":[{"id":1, "name":"name1",...},{"id":2, "name":"name2",...},...]}
I would rather go for [JSON Path Extractor](http://jmeter-plugins.org/wiki/JSONPathExtractor/) it is much more suitable for dealing with JSON data than Regular Expression Extractor. The relevant JSON Path Query will look like: ``` $.data[?(@.name == 'name1')].id ``` Use [Debug Sampler](http://jmeter.apache.org/use...
37,399,228
There is an [article](https://jlordiales.wordpress.com/2012/12/13/the-builder-pattern-in-practice/) that I came across while I was looking for a good practice of [builder pattern](https://en.wikipedia.org/wiki/Builder_pattern). In the article, the author mentions about something that drew my attention. the pattern bei...
2016/05/23
[ "https://Stackoverflow.com/questions/37399228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3403689/" ]
> > "id":([0-9]), "name":"give the name you want" > > > Try this which will work for the example which has been given by you. "data":{"elements":[{"id":1, "name":"name1",...},{"id":2, "name":"name2",...},...]}
I used the following regex to solve the issue: \\"id\\":(\d+)[^{}[]]\*?\\”name\d\\"
37,399,228
There is an [article](https://jlordiales.wordpress.com/2012/12/13/the-builder-pattern-in-practice/) that I came across while I was looking for a good practice of [builder pattern](https://en.wikipedia.org/wiki/Builder_pattern). In the article, the author mentions about something that drew my attention. the pattern bei...
2016/05/23
[ "https://Stackoverflow.com/questions/37399228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3403689/" ]
I would rather go for [JSON Path Extractor](http://jmeter-plugins.org/wiki/JSONPathExtractor/) it is much more suitable for dealing with JSON data than Regular Expression Extractor. The relevant JSON Path Query will look like: ``` $.data[?(@.name == 'name1')].id ``` Use [Debug Sampler](http://jmeter.apache.org/use...
I used the following regex to solve the issue: \\"id\\":(\d+)[^{}[]]\*?\\”name\d\\"
5,410,749
Is it semantically correct to have multiple h2 or any header tags in one HTML document?
2011/03/23
[ "https://Stackoverflow.com/questions/5410749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/561957/" ]
Yes semantically that is correct. **Edit** It does not look like the w3 has any restriction on the max occurrences of header entities. <http://www.w3.org/TR/html40/struct/global.html#edef-H1> <http://www.w3.org/TR/html40/sgml/dtd.html#heading>
Yes. Note that you can also group headers in [header groups](http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-hgroup-element).
8,099,171
Should this delete all records in my SQL table? ``` <?php $con = mysql_connect("localhost","bikemap","pedalhard"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); mysql_query("DELETE * FROM gpsdata"); mysql_close($con); ?> ```
2011/11/11
[ "https://Stackoverflow.com/questions/8099171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467054/" ]
The [`DELETE` syntax](http://dev.mysql.com/doc/refman/5.6/en/delete.html) doesn't allow a star between `DELETE` and `FROM`. Try this instead: ``` mysql_query("DELETE FROM gpsdata"); ```
You might want to check out MySQL's [Truncate](http://dev.mysql.com/doc/refman/5.0/en/truncate-table.html) command. That should remove all records easily.
8,099,171
Should this delete all records in my SQL table? ``` <?php $con = mysql_connect("localhost","bikemap","pedalhard"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); mysql_query("DELETE * FROM gpsdata"); mysql_close($con); ?> ```
2011/11/11
[ "https://Stackoverflow.com/questions/8099171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467054/" ]
The [`DELETE` syntax](http://dev.mysql.com/doc/refman/5.6/en/delete.html) doesn't allow a star between `DELETE` and `FROM`. Try this instead: ``` mysql_query("DELETE FROM gpsdata"); ```
`DELETE` differs from `Truncate`. But if your use case is simple, go to any one. `Truncate` * DDL command * You can't rollback * Table Structure will be re-created. * Your indexes will be lost. * Will delete all rows. `DELETE` * DML command * You can rollback. * Structure remains as it is. * You can specify a range...
8,099,171
Should this delete all records in my SQL table? ``` <?php $con = mysql_connect("localhost","bikemap","pedalhard"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); mysql_query("DELETE * FROM gpsdata"); mysql_close($con); ?> ```
2011/11/11
[ "https://Stackoverflow.com/questions/8099171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467054/" ]
You might want to check out MySQL's [Truncate](http://dev.mysql.com/doc/refman/5.0/en/truncate-table.html) command. That should remove all records easily.
`DELETE` differs from `Truncate`. But if your use case is simple, go to any one. `Truncate` * DDL command * You can't rollback * Table Structure will be re-created. * Your indexes will be lost. * Will delete all rows. `DELETE` * DML command * You can rollback. * Structure remains as it is. * You can specify a range...
28,385,650
I am trying to populate an expandable listview from the database and the app crashes without any log My code: The onCreateView: ``` private View rootView; private ExpandableListView lv; private BaseExpandableListAdapter adapter; private String jsonResult; private String url = "http://reservations...
2015/02/07
[ "https://Stackoverflow.com/questions/28385650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Inline styling has a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity). Therefore `background` is overwriting the property [shorthand `background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#Background_Properties). Change `background` to `background-imag...
`background` is a **general** property, so this includes: `backgound-image`, `background-size`, `background-color`, `background-position`, etc. So **you should to use** in this case `background-image` only, because `background` is overwriting your above css defined properties. Regards
28,385,650
I am trying to populate an expandable listview from the database and the app crashes without any log My code: The onCreateView: ``` private View rootView; private ExpandableListView lv; private BaseExpandableListAdapter adapter; private String jsonResult; private String url = "http://reservations...
2015/02/07
[ "https://Stackoverflow.com/questions/28385650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Inline styling has a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity). Therefore `background` is overwriting the property [shorthand `background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#Background_Properties). Change `background` to `background-imag...
This will work if you change `background` to `background-image` see working demo here: <http://jsfiddle.net/3t7ftpky/> **Why does this work?** `background` is a shorthand property and by putting it inline it overrides the other `background-size` properties in the stylesheet. you can find out more about the [css backg...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Earlier I had linked my question with this one of yours and it was closed as a duplicate. But you are not so much interested in knowing a proof of the result, but rather you are interested in understanding the proof given in your textbook. The following answer is thus an explanation for the proof given in your textbook...
**Hint**: you don't need to use continuity, only the Darboux (intermediate value) property. Look at the minimum and maximum value of $f$ in the interval. Notice that they have to be distinct (otherwise it is clearly false), and then consider the relative placement of the four points where the extreme values are attai...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Suppose $f:[0,1]\to\mathbb{R}$ takes each of its values exactly twice. Consider the self-map FLIP of the interval $[0,1]$ switching the two points where the values of the function are equal. This FLIP a continuous map without fixed points. But any self-map of the closed interval must have a fixed point by (the trivial ...
**Hint**: you don't need to use continuity, only the Darboux (intermediate value) property. Look at the minimum and maximum value of $f$ in the interval. Notice that they have to be distinct (otherwise it is clearly false), and then consider the relative placement of the four points where the extreme values are attai...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Earlier I had linked my question with this one of yours and it was closed as a duplicate. But you are not so much interested in knowing a proof of the result, but rather you are interested in understanding the proof given in your textbook. The following answer is thus an explanation for the proof given in your textbook...
Suppose $f:[0,1]\to\mathbb{R}$ takes each of its values exactly twice. Consider the self-map FLIP of the interval $[0,1]$ switching the two points where the values of the function are equal. This FLIP a continuous map without fixed points. But any self-map of the closed interval must have a fixed point by (the trivial ...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Earlier I had linked my question with this one of yours and it was closed as a duplicate. But you are not so much interested in knowing a proof of the result, but rather you are interested in understanding the proof given in your textbook. The following answer is thus an explanation for the proof given in your textbook...
Given such a function, $[a,b]$ is partitioned into uncountably many pairs $\{x\_1,x\_2\}$ with $f(x\_1)=f(x\_2)$. Can two pairs $\{x\_1,x\_2\}$ and $\{x\_3,x\_4\}$ overlap? In such a acase we would have wlog $x\_1<x\_3<x\_2<x\_4$. Pick $c$ between $f(x\_1)$ and $f(x\_2)$. By the Intermediate value property, there exist...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Earlier I had linked my question with this one of yours and it was closed as a duplicate. But you are not so much interested in knowing a proof of the result, but rather you are interested in understanding the proof given in your textbook. The following answer is thus an explanation for the proof given in your textbook...
I think the following way may be simpler. Translation of the function doesnot change the generality. So assume that by translating f(x) we make it crosses the $x$ axis. Let denote it by $\tilde f$ By the hypothesis, $\exists x\_1,x\_2\in \mathbb R$ such that $\tilde f(x\_1)=0=\tilde f(x\_2)$ with $x\_1<x\_2$. Moreove...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Suppose $f:[0,1]\to\mathbb{R}$ takes each of its values exactly twice. Consider the self-map FLIP of the interval $[0,1]$ switching the two points where the values of the function are equal. This FLIP a continuous map without fixed points. But any self-map of the closed interval must have a fixed point by (the trivial ...
Given such a function, $[a,b]$ is partitioned into uncountably many pairs $\{x\_1,x\_2\}$ with $f(x\_1)=f(x\_2)$. Can two pairs $\{x\_1,x\_2\}$ and $\{x\_3,x\_4\}$ overlap? In such a acase we would have wlog $x\_1<x\_3<x\_2<x\_4$. Pick $c$ between $f(x\_1)$ and $f(x\_2)$. By the Intermediate value property, there exist...
1,848,216
I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution question a) $xe^{-3x}$ question b) $e^{3x} \sin x$ We have learned about the aux equations in second order, and we have touched on the reduction of order process Question $a)$ I see that $-...
2016/07/04
[ "https://math.stackexchange.com/questions/1848216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343437/" ]
Suppose $f:[0,1]\to\mathbb{R}$ takes each of its values exactly twice. Consider the self-map FLIP of the interval $[0,1]$ switching the two points where the values of the function are equal. This FLIP a continuous map without fixed points. But any self-map of the closed interval must have a fixed point by (the trivial ...
I think the following way may be simpler. Translation of the function doesnot change the generality. So assume that by translating f(x) we make it crosses the $x$ axis. Let denote it by $\tilde f$ By the hypothesis, $\exists x\_1,x\_2\in \mathbb R$ such that $\tilde f(x\_1)=0=\tilde f(x\_2)$ with $x\_1<x\_2$. Moreove...
46,310,909
I want to change the attribute "srcset" to "data-srcset" and "srt" to "data-srt" in Drupal 8 responsive images and i didn't find a solution in hours. Any ideas? Thanks. :-) AK
2017/09/19
[ "https://Stackoverflow.com/questions/46310909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2718363/" ]
Well looks like both are not currently possible. As of now I just used a forced way which is hopefully temporary. I have created and used the following base class for hubs: ```cs public abstract class MyHub : Hub { private static Dictionary<string, IHubClients> _clients = new Dictionary<string, IHubClients>(); ...
1. GlobalHost is gone. You need to inject `IHubContext<THub>` like in [this sample.](https://github.com/aspnet/SignalR-samples/blob/1fa7d8a330e77dcd21ced9220670c8772c1610a7/StockTickR/StockTickRApp/StockTicker.cs#L29) 2. This can be a bug in SignalR alpha1. Can you file an issue on <https://github.com/aspnet/signalr> a...
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
**tl;dr: different gear ratios are a feature, not a bug. Some cars use more gears for acceleration, some use them for better gas mileage. You can't do both.** > > At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mileage by keeping the same 5-speed gear ratios, while adding an additional gear to lowe...
Most vehicles will only have a single overdrive, where the second to the last gear will be a 1:1 ratio (or something near it). The notable thing here is the Tremec 6-speed transmissions (used in the Camaro, Viper, Corvette, Mustang, and others) which have the double overdrive. The main purpose of *more gears* is to a...
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
Most vehicles will only have a single overdrive, where the second to the last gear will be a 1:1 ratio (or something near it). The notable thing here is the Tremec 6-speed transmissions (used in the Camaro, Viper, Corvette, Mustang, and others) which have the double overdrive. The main purpose of *more gears* is to a...
If you have 20 gears, you would have to "shorten" each gear (ratio) to "match" the gear it came from and the gear it is going in. So you go through "smaller gears" faster (more gears).
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
Most vehicles will only have a single overdrive, where the second to the last gear will be a 1:1 ratio (or something near it). The notable thing here is the Tremec 6-speed transmissions (used in the Camaro, Viper, Corvette, Mustang, and others) which have the double overdrive. The main purpose of *more gears* is to a...
In most sport-oriented (and heavy towing) vehicles, the point of an extra transmission gear is to keep the engine operating between it's torque peak and HP peak. Thus, most models of vehicles that are base models will have a 5 speed manual (or 3 speed auto), while the sportier or heavy duty versions will have more gear...
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
**tl;dr: different gear ratios are a feature, not a bug. Some cars use more gears for acceleration, some use them for better gas mileage. You can't do both.** > > At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mileage by keeping the same 5-speed gear ratios, while adding an additional gear to lowe...
If you have 20 gears, you would have to "shorten" each gear (ratio) to "match" the gear it came from and the gear it is going in. So you go through "smaller gears" faster (more gears).
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
**tl;dr: different gear ratios are a feature, not a bug. Some cars use more gears for acceleration, some use them for better gas mileage. You can't do both.** > > At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mileage by keeping the same 5-speed gear ratios, while adding an additional gear to lowe...
In most sport-oriented (and heavy towing) vehicles, the point of an extra transmission gear is to keep the engine operating between it's torque peak and HP peak. Thus, most models of vehicles that are base models will have a 5 speed manual (or 3 speed auto), while the sportier or heavy duty versions will have more gear...
24,778
My 2013 Subaru WRX has a 5-speed manual, and I long for it to have a 6th gear when cruising on the highway. A friend has a 2012 Subaru STI with a 6-speed manual, and I noticed his car runs through the gears more quickly to achieve the same speeds. At 3300-3500 RPMs, shouldn't the WRX be able to achieve better gas mil...
2016/01/15
[ "https://mechanics.stackexchange.com/questions/24778", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/7047/" ]
In most sport-oriented (and heavy towing) vehicles, the point of an extra transmission gear is to keep the engine operating between it's torque peak and HP peak. Thus, most models of vehicles that are base models will have a 5 speed manual (or 3 speed auto), while the sportier or heavy duty versions will have more gear...
If you have 20 gears, you would have to "shorten" each gear (ratio) to "match" the gear it came from and the gear it is going in. So you go through "smaller gears" faster (more gears).
49,928,575
I'm looking to design a sorting process/algorithm that shuffles items in a list, but to do so uniquely based on the hash of an input; so that when the same input--essentially a passphrase--is hashed or processed, the same exact shuffling is reproduced. This would need to have the capacity to uniquely shuffle 26^4 thing...
2018/04/19
[ "https://Stackoverflow.com/questions/49928575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9671568/" ]
You can use the hash of your input as a seed to a random number generator that you then use to perform the shuffling. If two inputs are the same (have the same hash), then the RNG gets seeded the same way, resulting in the same shuffle.
If you have 26^4 items, there are about 10^240000 possible permutations, requiring a passphrase of at least 1 million characters (or so) to make the permutations guaranteed unique. So no, not really. But! If you just want to permute unpredictably based on the passphrase, just hash it, use the result as the seed of a P...
49,928,575
I'm looking to design a sorting process/algorithm that shuffles items in a list, but to do so uniquely based on the hash of an input; so that when the same input--essentially a passphrase--is hashed or processed, the same exact shuffling is reproduced. This would need to have the capacity to uniquely shuffle 26^4 thing...
2018/04/19
[ "https://Stackoverflow.com/questions/49928575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9671568/" ]
You can use the hash of your input as a seed to a random number generator that you then use to perform the shuffling. If two inputs are the same (have the same hash), then the RNG gets seeded the same way, resulting in the same shuffle.
One way to do it is to use your seed value as a permutation index. That is, given some seed value, `m`, you generate the mth permutation of those 26^4 elements. For example, the possible permutations of the numbers 1 through 3 are: ``` 123,132,213,231,312,321 ``` The fourth permutation, then, is 231. Eric Lippert ...
4,066,472
I am studying the Cartesian product of such a graph with other graphs. I want to ask if it has a known name? [![enter image description here](https://i.stack.imgur.com/ZfbEj.png)](https://i.stack.imgur.com/ZfbEj.png) By the way, for some special graphs, is there a good website to check?
2021/03/18
[ "https://math.stackexchange.com/questions/4066472", "https://math.stackexchange.com", "https://math.stackexchange.com/users/708389/" ]
Apparently (according to [this website](https://www.graphclasses.org/smallgraphs.html#nodes6)) this graph is called "X84", or "g6: ElD?" (whatever that means). Some details about this nomenclature have been helpfully provided in [David Scholz's answer](https://math.stackexchange.com/a/4066709/16078).
There is no well established name for this particular graph. However, there is a well known graph which is similar to some extend. It is called the [Banner graph](https://mathworld.wolfram.com/BannerGraph.html) [![enter image description here](https://i.stack.imgur.com/NH9pX.png)](https://i.stack.imgur.com/NH9pX.png)...
682,831
I had this question in the homework and i don't get why the answer is right. $B, A \rightarrow B \vDash\_{TAUT} A\ $ is not valid. If there exists a state $v$ such that $v(A) = f$ and $v(B) = t$ then both $B$ and $A \rightarrow B$ are satisfied while $A$ is not. Take for example, $A$ to be $\bot$ and $B$ to be $\top$...
2014/02/20
[ "https://math.stackexchange.com/questions/682831", "https://math.stackexchange.com", "https://math.stackexchange.com/users/91060/" ]
The question seems unclear to me - not the question you asked, the question they asked you ;-) I think the reasoning they are asking about is the following: * given $B$ and $A\to B$, we conclude $A$. This is an invalid deduction for the reasons given in the answer. I don't know what format you are using in your stu...
I'm assuming that the right symbol to be used is : $\vDash\_{TAUT}$; it means "tautologically implies" : if so, you attempted solution is not the right one. We want to prove that > > $B,A \rightarrow B \vDash\_{TAUT} A$ is not valid, i.e. $B,A \rightarrow B \nvDash\_{TAUT} A$ > > > To show this we need to find...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Perhaps you mean the process of attaching suffixes and/or prefixes to a root word to make a whole family of related words, like *hand*, *handy*, *handiness*, *unhand*, *unhanded*, and so on. The name for that is ***[agglutination](http://www.merriam-webster.com/dictionary/agglutination)*** and languages that rely on th...
When you make up a new word, generally, it's called a "neologism". Does that fit here? [Neologism](http://www.dictionary.com/browse/neologism): (noun) > > 1. a new word, meaning, usage, or phrase. > 2. the introduction or use of new words or new senses of existing words. > 3. a new doctrine, especially a new interpr...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
When you make up a new word, generally, it's called a "neologism". Does that fit here? [Neologism](http://www.dictionary.com/browse/neologism): (noun) > > 1. a new word, meaning, usage, or phrase. > 2. the introduction or use of new words or new senses of existing words. > 3. a new doctrine, especially a new interpr...
Nice answers here already, but the problem with agglutination is that it's a very unusual word that most people will be unfamiliar with. Indeed it sounds rather like the process of adding gluten to something... I would myself go for more of a comedic term which is itself agglutinated: I would call it ***Extenderizatio...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
When you make up a new word, generally, it's called a "neologism". Does that fit here? [Neologism](http://www.dictionary.com/browse/neologism): (noun) > > 1. a new word, meaning, usage, or phrase. > 2. the introduction or use of new words or new senses of existing words. > 3. a new doctrine, especially a new interpr...
Cobbled together from earlier comments... > > ***Inflection***, formerly **flection** or **accidence**, in linguistics, the change in the form of a word (in English, usually the addition of endings) to mark such distinctions as tense, person, number, gender, mood, voice, and case. > > [(Encyclopædia Britannica)](h...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Perhaps you mean the process of attaching suffixes and/or prefixes to a root word to make a whole family of related words, like *hand*, *handy*, *handiness*, *unhand*, *unhanded*, and so on. The name for that is ***[agglutination](http://www.merriam-webster.com/dictionary/agglutination)*** and languages that rely on th...
Increasement is already a word. * <https://en.wiktionary.org/wiki/increasement> * <http://www.merriam-webster.com/dictionary/increasement> * <http://www.thefreedictionary.com/Increasement> But I would offer this [Calvin and Hobbes](https://en.wikipedia.org/wiki/Calvin_and_Hobbes) strip: ![](https://i.stack.imgur.com...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Perhaps you mean the process of attaching suffixes and/or prefixes to a root word to make a whole family of related words, like *hand*, *handy*, *handiness*, *unhand*, *unhanded*, and so on. The name for that is ***[agglutination](http://www.merriam-webster.com/dictionary/agglutination)*** and languages that rely on th...
Nice answers here already, but the problem with agglutination is that it's a very unusual word that most people will be unfamiliar with. Indeed it sounds rather like the process of adding gluten to something... I would myself go for more of a comedic term which is itself agglutinated: I would call it ***Extenderizatio...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Perhaps you mean the process of attaching suffixes and/or prefixes to a root word to make a whole family of related words, like *hand*, *handy*, *handiness*, *unhand*, *unhanded*, and so on. The name for that is ***[agglutination](http://www.merriam-webster.com/dictionary/agglutination)*** and languages that rely on th...
Cobbled together from earlier comments... > > ***Inflection***, formerly **flection** or **accidence**, in linguistics, the change in the form of a word (in English, usually the addition of endings) to mark such distinctions as tense, person, number, gender, mood, voice, and case. > > [(Encyclopædia Britannica)](h...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Increasement is already a word. * <https://en.wiktionary.org/wiki/increasement> * <http://www.merriam-webster.com/dictionary/increasement> * <http://www.thefreedictionary.com/Increasement> But I would offer this [Calvin and Hobbes](https://en.wikipedia.org/wiki/Calvin_and_Hobbes) strip: ![](https://i.stack.imgur.com...
Nice answers here already, but the problem with agglutination is that it's a very unusual word that most people will be unfamiliar with. Indeed it sounds rather like the process of adding gluten to something... I would myself go for more of a comedic term which is itself agglutinated: I would call it ***Extenderizatio...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Increasement is already a word. * <https://en.wiktionary.org/wiki/increasement> * <http://www.merriam-webster.com/dictionary/increasement> * <http://www.thefreedictionary.com/Increasement> But I would offer this [Calvin and Hobbes](https://en.wikipedia.org/wiki/Calvin_and_Hobbes) strip: ![](https://i.stack.imgur.com...
Cobbled together from earlier comments... > > ***Inflection***, formerly **flection** or **accidence**, in linguistics, the change in the form of a word (in English, usually the addition of endings) to mark such distinctions as tense, person, number, gender, mood, voice, and case. > > [(Encyclopædia Britannica)](h...
328,085
On a programming site, I noticed <https://stackoverflow.com/questions/37460404/unexplained-increasement-of-variable> a beautiful word use, "increasement." Is there a term for, or how would you refer to, that - where you take a word, and use a different "form" of it. So, you're making up a new "form" of a word which...
2016/05/26
[ "https://english.stackexchange.com/questions/328085", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8286/" ]
Cobbled together from earlier comments... > > ***Inflection***, formerly **flection** or **accidence**, in linguistics, the change in the form of a word (in English, usually the addition of endings) to mark such distinctions as tense, person, number, gender, mood, voice, and case. > > [(Encyclopædia Britannica)](h...
Nice answers here already, but the problem with agglutination is that it's a very unusual word that most people will be unfamiliar with. Indeed it sounds rather like the process of adding gluten to something... I would myself go for more of a comedic term which is itself agglutinated: I would call it ***Extenderizatio...
74,209,759
I have a problem with my price regex which I'm trying to change. I want it to allow numbers like: * 11111,64 * 2 122,00 * 123,12 * 123 345,23 For now I have something like this, but it won't accept numbers without spaces. `'^\d{1,3}( \d{3}){0,10}[,]*[.]*([0-9]{0,2'})?$'` I tried changing `( \d{3})` to `(\s{0,1}\d{...
2022/10/26
[ "https://Stackoverflow.com/questions/74209759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20340538/" ]
i think you should add `<div class="image-conatiner"></div>` to have more control on images in your model don't leave them without any element to control them. check the code below ```css .Card_Badge { box-sizing: border-box; max-height: 350px; overflow: hidden; } .image-container{ display:flex; } ``` ```html <...
here this should work fine, use the gap property to set how far apart you want the elements to be. ``` .Card_Badge { box-sizing: border-box; max-height: 350px; overflow: hidden; display: flex; flex-flow: row nowrap; gap: 5em; } ```
57,440,254
I have created a `Django` app which is using `Celery` for task processing. It’s working fine locally but when I pushed it to `Heroku`, I found that app cannot connect to Celery worker. I can see worker is running without any problem. ``` $ heroku ps === web (Free): gunicorn my_django_project.wsgi --log-file - (1) we...
2019/08/10
[ "https://Stackoverflow.com/questions/57440254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/653397/" ]
`amqp://guest:**@127.0.0.1:5672` Refers to the backend celery tries to use, you need to setup a backend either rabbitMQ, Redis or something else. [The docs](https://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html#choosing-a-broker)
Celery requires a solution to send and receive messages; usually this comes in the form of a separate service called a message broker. You can choose * RabbitMQ * Redis * Amazon SQS (experimental) You can test this locally before setting up in Heroku by specifying a broker in your celery config, e.g.: `app = Celery(...
221,740
When using an exposed filter in a view, any data that doesn't meet the filter is removed from the page. Partially for SEO reasons, I'd like all the data to load (and stay in the HTML), but then the exposed filters will simply use CSS to hide the data that doesn't match the filter. Does that make sense? Is it possible?
2016/11/29
[ "https://drupal.stackexchange.com/questions/221740", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/17836/" ]
`getcwd` gets the current working directory, i.e. the one you're executing the script from. If you need `DRUPAL_ROOT` to refer to the root of your Drupal installation, run the script from that directory, not the one that contains your module. If you want to execute it from the module directory, fix the paths to the i...
Your code has issue in first line it-self: ``` define('DRUPAL_ROOT', getcwd()); ``` `getcwd()` as per described on [PHP.net](http://php.net/manual/en/function.getcwd.php) > > Gets the current working directory > > > Because of `getcwd()` your Drupal Root directory is set to your module directory and PHP isn't ...
39,195,024
Hello should I do like this: ``` new BitmapFont().draw("Hello World!"); new BitmapFont().draw("Hello Universe!"); ``` or ``` BitmapFont font = new BitmapFont(); font.draw("Hello World!"); font.draw("Hello Universe!"); ``` Does it matter for performance?
2016/08/28
[ "https://Stackoverflow.com/questions/39195024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6700693/" ]
The first option isn't only worse, it is not an option at all. It leaks memory. If you're doing this every frame, your game will crash pretty quickly on a phone. Anything that implements Disposable absolutely must be disposed before you lose the reference, or it leaks. The second option is fine for most cases. If you...
Definitely second option is better, because the first one creates 2 objects when 1 is really needed. On small scale this does not matter, but if all Java calls were made like the first one, garbage collector would take much more time (more objects - more time GC needs) and if there was a heavy load on constuctor it wou...
49,355,894
I have some Git-related doubt. I have done some changes from master branch and by mistake I have commited to master branch. I did: ``` git add. git commit "my changed" ``` But I could not push to the master branch due to some issues. So I have created another branch and from that branch I did push. But I was gettin...
2018/03/19
[ "https://Stackoverflow.com/questions/49355894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7130330/" ]
1. Just hit `git log` to find if you have all commits from master if your HEAD is ahead or at same level as master which means you have all commits from master (or) If you have created a branch from master `git checkout master` `git checkout -b new-branch` then YES. 2. When you have conflicts you have to resol...
1. If i created a new branch again from master whether i will have all committed changes from the master? > > Yes > > > 2. What step i need to follow to fix this conflict? > > EIther rebase/merge your branch withh/into master and resolve the > conflicts using > > > ``` git rebase origin/master git merge ...
57,199,918
(I use Java) I want to sort a sublist of objects by a property using a Collator so that is sorted by alphabetical order but ignoring accents. Problem is I have tried different things and none work. This sorts the sublists but doesn't ignore accents: ``` newList.subList(0, 5).sort(Comparator.comparing(element -> ele...
2019/07/25
[ "https://Stackoverflow.com/questions/57199918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11458457/" ]
Collator is also a Comparator. If the elements are String: ``` List<String> list = Arrays.asList("abc", "xyz", "bde"); Collator spCollator = Collator.getInstance(new Locale("es", "ES")); list.sort(spCollator); ``` If the elements are custom Object: ``` List<Element> list = Arrays.asList(new Element("abc"), new Ele...
Instead of using `Comparator.comparing`, you create a lambda to first extract the value and then use the collator to compare. ``` Collator spCollator = Collator.getInstance(new Locale("es", "ES")); newList.subList(0, 5).sort((e1, e2) -> spCollator.compare(e1.getValue(), e2.getValue())); ```
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
You might have an empty line in the beginning of that php file. Maybe space before start of PHP script
See lines 60, 61, and 63, and how they come *after* all your HTML? Put them before instead.
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
Cookies and Headers must be set before any output is sent to the browser. Try moving your login script to the top of the page. You might want to also consider sanitizing your queries to prevent malicious activity.
You might have an empty line in the beginning of that php file. Maybe space before start of PHP script
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
You might have an empty line in the beginning of that php file. Maybe space before start of PHP script
When PHP says it's already sent the headers, it means that some text has already been output by the script (or the script that called it). This includes any and all error messages. When the FIRST piece of text is output by PHP it sends its headers, but not before. In order to get HTTP cookies (part of the headers) to ...
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
You might have an empty line in the beginning of that php file. Maybe space before start of PHP script
If you do not have output\_buffering enabled in your php.ini you will get this error because it will start sending the html right away. You need to edit your php.ini to enable output buffering.
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
You might have an empty line in the beginning of that php file. Maybe space before start of PHP script
Is this on Windows? Check for BOM. Open it in Notepad and save it as ANSI to see if it helps.
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
Cookies and Headers must be set before any output is sent to the browser. Try moving your login script to the top of the page. You might want to also consider sanitizing your queries to prevent malicious activity.
See lines 60, 61, and 63, and how they come *after* all your HTML? Put them before instead.
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
Cookies and Headers must be set before any output is sent to the browser. Try moving your login script to the top of the page. You might want to also consider sanitizing your queries to prevent malicious activity.
When PHP says it's already sent the headers, it means that some text has already been output by the script (or the script that called it). This includes any and all error messages. When the FIRST piece of text is output by PHP it sends its headers, but not before. In order to get HTTP cookies (part of the headers) to ...
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
Cookies and Headers must be set before any output is sent to the browser. Try moving your login script to the top of the page. You might want to also consider sanitizing your queries to prevent malicious activity.
If you do not have output\_buffering enabled in your php.ini you will get this error because it will start sending the html right away. You need to edit your php.ini to enable output buffering.
2,804,659
Is it possible to programmatically find the default currency symbol for the current locale in BlackBerry?
2010/05/10
[ "https://Stackoverflow.com/questions/2804659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631/" ]
Cookies and Headers must be set before any output is sent to the browser. Try moving your login script to the top of the page. You might want to also consider sanitizing your queries to prevent malicious activity.
Is this on Windows? Check for BOM. Open it in Notepad and save it as ANSI to see if it helps.
276,025
Let's say I have multiple lines ***similar*** to below in a file. ``` Turbo is a cat. cats are good. cats are not dog. Coco is a black cat. cats are furry. cats are not dog. ``` now, if want to `grep` all the `^.*cat` but want to specially mention to capture till first (or nth) occurrence of the word `cat`. Desi...
2016/04/12
[ "https://unix.stackexchange.com/questions/276025", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/106632/" ]
`grep` only selects lines based on the regular expression specified and prints them. I think you are forced to pipe the output lines and use an additional command to do the job. Usually you would use `sed` or `awk` to do the job without `grep`, because they can both select lines and replace strings. There is a solut...
Here's a `sed` solution (e.g. print up to and including the 2nd occurrence; replace `2` with your no.): ``` sed -n 's/cat/&\ /2 t print d :print P' infile ``` This disables autoprinting via `-n` and attempts to replace the 2nd occurrence of `cat` with `cat`+ a newline character. If the substitution is successful it ...
276,025
Let's say I have multiple lines ***similar*** to below in a file. ``` Turbo is a cat. cats are good. cats are not dog. Coco is a black cat. cats are furry. cats are not dog. ``` now, if want to `grep` all the `^.*cat` but want to specially mention to capture till first (or nth) occurrence of the word `cat`. Desi...
2016/04/12
[ "https://unix.stackexchange.com/questions/276025", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/106632/" ]
With **POSIX grep**, you can only choose between printing the whole line, or not printing the line content at all. If you want to transform the line, you need to use another tool such as sed or awk. To print up to the first occurrence of `cat`: ``` sed -n 's/cat.*/cat/' awk 'sub(/cat.*/,"")' ``` Printing up to the *...
`grep` only selects lines based on the regular expression specified and prints them. I think you are forced to pipe the output lines and use an additional command to do the job. Usually you would use `sed` or `awk` to do the job without `grep`, because they can both select lines and replace strings. There is a solut...
276,025
Let's say I have multiple lines ***similar*** to below in a file. ``` Turbo is a cat. cats are good. cats are not dog. Coco is a black cat. cats are furry. cats are not dog. ``` now, if want to `grep` all the `^.*cat` but want to specially mention to capture till first (or nth) occurrence of the word `cat`. Desi...
2016/04/12
[ "https://unix.stackexchange.com/questions/276025", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/106632/" ]
With **POSIX grep**, you can only choose between printing the whole line, or not printing the line content at all. If you want to transform the line, you need to use another tool such as sed or awk. To print up to the first occurrence of `cat`: ``` sed -n 's/cat.*/cat/' awk 'sub(/cat.*/,"")' ``` Printing up to the *...
Here's a `sed` solution (e.g. print up to and including the 2nd occurrence; replace `2` with your no.): ``` sed -n 's/cat/&\ /2 t print d :print P' infile ``` This disables autoprinting via `-n` and attempts to replace the 2nd occurrence of `cat` with `cat`+ a newline character. If the substitution is successful it ...
4,211,470
I have a PHP page called `test.php` on which I link to a dynamic image called `image.php` as follows: ``` echo "<img src=\"image.php?ID=abc&X=123\" align=\"absmiddle\" style=\"margin:5px;\"><br>"; ``` The image file takes `ID` and `X` as GET parameters, and uses them to `include` an existing static image from my ser...
2010/11/18
[ "https://Stackoverflow.com/questions/4211470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/438585/" ]
It is not possible, because what your browser does to show the image is **direct access**. There will be a lot of advices about analysing `HTTP_REFERER`, but it will be a bad decisions, since this header is optional and in several circumstances it can be cutted off by firewall, antivirus, proxy, etc.
I) Use sessions: test.php: ``` <?php session_start(); //.... $_SESSION["allow_images"]="yes"; echo "<img src=\"image.php?ID=abc&X=123\" align=\"absmiddle\" style=\"margin:5px;\"><br>"; ?> ``` image.php: ``` <?php session_start(); if(isset($_SESSION["allow_images"]) { // render image unset($_SESSION["allow_im...
6,566,027
I'm trying to put a `QVBoxLayout` inside a `QScrollArea` in order for it to be scrollable vertically. However items don't seem to be added to it. I saw a suggestion that I ought to create an inner widget that the ScrollArea uses and to place the layout inside that, although it doesn't seem to have worked. My structure...
2011/07/03
[ "https://Stackoverflow.com/questions/6566027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
It turned out that I was lead down a wrong path by putting the layout as the layout of a widget. The actual way to do this is as simple as: ``` scrollarea = QScrollArea(parent.widget()) layout = QVBoxLayout(scrollarea) realmScroll.setWidget(layout.widget()) layout.addWidget(QLabel("Test")) ``` Which I'm pretty sure...
Try calling ``` self.realmScroll.setWidgetResizable(True) ```
6,566,027
I'm trying to put a `QVBoxLayout` inside a `QScrollArea` in order for it to be scrollable vertically. However items don't seem to be added to it. I saw a suggestion that I ought to create an inner widget that the ScrollArea uses and to place the layout inside that, although it doesn't seem to have worked. My structure...
2011/07/03
[ "https://Stackoverflow.com/questions/6566027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
OK, I just got done fighting with this. Here's a widget that can go into a scroll area (scrollarea->setWidget) and work correctly. It contains a QVBoxLayout and a list of label/listwidget pairs, each in their own little horizontal layout, and it does pretty much what you'd want. The important thing was reading the QSc...
Try calling ``` self.realmScroll.setWidgetResizable(True) ```
6,566,027
I'm trying to put a `QVBoxLayout` inside a `QScrollArea` in order for it to be scrollable vertically. However items don't seem to be added to it. I saw a suggestion that I ought to create an inner widget that the ScrollArea uses and to place the layout inside that, although it doesn't seem to have worked. My structure...
2011/07/03
[ "https://Stackoverflow.com/questions/6566027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
It turned out that I was lead down a wrong path by putting the layout as the layout of a widget. The actual way to do this is as simple as: ``` scrollarea = QScrollArea(parent.widget()) layout = QVBoxLayout(scrollarea) realmScroll.setWidget(layout.widget()) layout.addWidget(QLabel("Test")) ``` Which I'm pretty sure...
OK, I just got done fighting with this. Here's a widget that can go into a scroll area (scrollarea->setWidget) and work correctly. It contains a QVBoxLayout and a list of label/listwidget pairs, each in their own little horizontal layout, and it does pretty much what you'd want. The important thing was reading the QSc...
267,319
On the block layout page, I added the "Site Branding" block twice, once for normal use (all nodes except content type *landing page*) and once for landing page use (all nodes of content type *landing page*). I themed the block using the twig template **block--system-branding-block.html.twig**, but this modifies both b...
2018/08/10
[ "https://drupal.stackexchange.com/questions/267319", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/5147/" ]
There's a few things you can do. Here's three. 1. Consider using a pure CSS approach. If you look at the body element for your page there may well be different classes you can use to make different selectors for styling the block. Modern CSS, particularly with the availability of :before and :after pseudo selectors, i...
Try this module [Block Content Machine Name](https://www.drupal.org/project/block_content_machine_name) Will provide additional template suggestion like `block--block-content--[MACHINE_NAME].html.twig`.
18,409,476
We've been trying to "componentize" our Sitecore solution as we move forward, in prep for transitioning to Page Editor usage (Woot! Finally!), but we're still practically working primarily with Page templates that may be inheritance-based composites of page specific fields, plus 1:many of these componentized templates....
2013/08/23
[ "https://Stackoverflow.com/questions/18409476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404101/" ]
It looks like you have configured the allowed templates for your sublayout in the steps you describe above. This basically tells Sitecore; 'allow user to select items based on these templates for this sublayout'. This alone does not set up the data source on items using the sublayout. You still need to go into the pres...
When you start using sublayouts on which you will set your datasource try to use the marketplace "Sublayout Parameter Helper". When you use the class they provide as base class and have set everything up right in your Sitecore Environment you will find yourself having a "this.DatasourceItem" -> which will contain your ...
18,409,476
We've been trying to "componentize" our Sitecore solution as we move forward, in prep for transitioning to Page Editor usage (Woot! Finally!), but we're still practically working primarily with Page templates that may be inheritance-based composites of page specific fields, plus 1:many of these componentized templates....
2013/08/23
[ "https://Stackoverflow.com/questions/18409476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404101/" ]
It looks like you have configured the allowed templates for your sublayout in the steps you describe above. This basically tells Sitecore; 'allow user to select items based on these templates for this sublayout'. This alone does not set up the data source on items using the sublayout. You still need to go into the pres...
If you are using Sitecore 7 update 1 you can actually now use the attributes. From the Release Notes: > > To make it easier to get the data source for a sublayout from > code-behind, the data source is now transferred to the sublayout > control in a "sc\_datasource" attribute. (320768) > > > To get the data sourc...
51,738,902
I am using vuejs as a drop in for some minor functionality in a Laravel app (i.e. not components) and for some reason that I'm yet to discover `v-model` is not working. Here's my base layout blade file that was generated via `php artisan make:auth`, contents mostly removed as irrelevant: **resources/views/layouts/app...
2018/08/08
[ "https://Stackoverflow.com/questions/51738902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/648247/" ]
For vue.js 2 use the following: ```html <html> <body> <div id="app"> <h1>Vue: @{{message}}</h1> <input v-model="message"> </div> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <script type="text/javascript"> var app = new Vue({ el...
try the following code ```html @extends('layouts.app') @section('content') <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <div class="card"> <div class="card-body"> <div class="card-titl...
29,644,539
I have a button with an svg as a background. The `:hover` selector works fine but when I give it a transition, the button first gets smaller and then jumps back to the original size. How do I stop this behavior? here's my code: ```css a { width: 250px; display: block; color: rgba(0, 0, 0, .9); text-decora...
2015/04/15
[ "https://Stackoverflow.com/questions/29644539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4507540/" ]
You can use a workaround by adding `background-image` for the `pseudo` element ```css a { width: 250px; display: block; color: rgba(0, 0, 0, .9); text-decoration: none } .prod-ueber .cta-wrapper { position: absolute; left: 310px; width: 100px; top: 45px; z-index: 5 } .info-btn, .korb-bt...
Instead of setting the background of the image you can just set in the svg element itself. It might make you html a bit bigger but you can set the **<svg>** in a **[template](https://stackoverflow.com/questions/27954250/moving-to-svg-icons-how-to-separate-them-from-the-code/28029642#28029642).** First lets just use a ...
29,644,539
I have a button with an svg as a background. The `:hover` selector works fine but when I give it a transition, the button first gets smaller and then jumps back to the original size. How do I stop this behavior? here's my code: ```css a { width: 250px; display: block; color: rgba(0, 0, 0, .9); text-decora...
2015/04/15
[ "https://Stackoverflow.com/questions/29644539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4507540/" ]
You can use a workaround by adding `background-image` for the `pseudo` element ```css a { width: 250px; display: block; color: rgba(0, 0, 0, .9); text-decoration: none } .prod-ueber .cta-wrapper { position: absolute; left: 310px; width: 100px; top: 45px; z-index: 5 } .info-btn, .korb-bt...
If using a transition with a background-image the various background properties must also be explicitly declared e.g. { backgroundRepeat: 'no-repeat', backgroundSize: '30px 30px', backgroundPosition: '0px 0px' }
29,644,539
I have a button with an svg as a background. The `:hover` selector works fine but when I give it a transition, the button first gets smaller and then jumps back to the original size. How do I stop this behavior? here's my code: ```css a { width: 250px; display: block; color: rgba(0, 0, 0, .9); text-decora...
2015/04/15
[ "https://Stackoverflow.com/questions/29644539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4507540/" ]
Instead of setting the background of the image you can just set in the svg element itself. It might make you html a bit bigger but you can set the **<svg>** in a **[template](https://stackoverflow.com/questions/27954250/moving-to-svg-icons-how-to-separate-them-from-the-code/28029642#28029642).** First lets just use a ...
If using a transition with a background-image the various background properties must also be explicitly declared e.g. { backgroundRepeat: 'no-repeat', backgroundSize: '30px 30px', backgroundPosition: '0px 0px' }
295,538
I've tried to create a new environment using minipage, which has the same vertical space between paragraphs as would be there when not using the minipage. What I have so far is: ``` \usepackage{boxedminipage} % had to use this to get minipage \newlength{\currentparskip} \newenvironment{minipageparskip} {% \setlen...
2016/02/23
[ "https://tex.stackexchange.com/questions/295538", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/92107/" ]
Your `minipageparskip` environment does not expect an argument. I adjusted your definition, that the argument is passed through. ``` \newenvironment{minipageparskip}[1] {% \setlength{\currentparskip}{\parskip}% save the value \begin{minipage}{#1}% open the minipage \setlength{\parskip}{\currentparskip}% re...
You can also use a `tabular` to provide an unbreakable block. It doesn't suffer from the same [`\baseline` issues that `\parbox` and `minipage` have](https://tex.stackexchange.com/q/34971/5764). [![enter image description here](https://i.stack.imgur.com/X4No5.png)](https://i.stack.imgur.com/X4No5.png) ``` \documentcl...
41,474,237
I have 2 columns ***SKU\_new*** and **order\_ID** on #temp table that match with **SKU** and **ID** column of orders table i am using *inner join* but it keeps executing and does not show any result. my query is ``` SELECT t.SKU_new, t.ID_Order INTO #caseone FROM dbo.Order_No AS n JOIN dbo.Orders AS o ON ...
2017/01/04
[ "https://Stackoverflow.com/questions/41474237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7352050/" ]
> > When i type cast bf.a to int it gives the desired output (7). But when > i dont type cast it, it gives no output and gives no errors. Why is it > so? > > > The character (number 7) was written to the console. Character 7 is the [bell character](https://en.wikipedia.org/wiki/Bell_character). --- So you can'...
Char type bitfield is not supported. Bitfield declaration supports only 4 identifiers, * unsigned int * signed int * int * bool [Source](http://en.cppreference.com/w/c/language/bit_field)
41,474,237
I have 2 columns ***SKU\_new*** and **order\_ID** on #temp table that match with **SKU** and **ID** column of orders table i am using *inner join* but it keeps executing and does not show any result. my query is ``` SELECT t.SKU_new, t.ID_Order INTO #caseone FROM dbo.Order_No AS n JOIN dbo.Orders AS o ON ...
2017/01/04
[ "https://Stackoverflow.com/questions/41474237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7352050/" ]
You are printing the character who's value is 7. Others have pointed out that this is a special character that is usually not displayed. Cast your value to `int` or another non-char integer type to display the value, rather than the character. Go look at [the ascii table](http://www.asciitable.com/) and you'll see char...
Char type bitfield is not supported. Bitfield declaration supports only 4 identifiers, * unsigned int * signed int * int * bool [Source](http://en.cppreference.com/w/c/language/bit_field)
35,491,390
I've got a PowerShell script on PowerShell v4.0 (Windows 7 x64 SP1) that creates a pretty complex DataTable. I wanted to be able to place that DataTable code anywhere pretty easily, so I decided to wrap it in a simple function, like so: ``` function Get-UserDataTable { $DataTable = New-Object -TypeName System.Data...
2016/02/18
[ "https://Stackoverflow.com/questions/35491390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/696808/" ]
As the link in PerSerAl's comment suggests, the issue is caused because DataTable isn't an enumerable data type. To force it to be enumerable, you can use the unary comma operator to put it into an array as a single element. Arrays *are* enumerable. ``` function Get-UserDataTable { $DataTable = New-Object -TypeNam...
> > This question seem like a [duplicate for this one](https://stackoverflow.com/questions/39495766/how-to-return-specific-data-type-from-powershell-function-i-e-datatable), but you may want to look at the more elaborative info on [that answer & below](https://stackoverflow.com/questions/39495766/how-to-return-specifi...
260,118
I have a Postgres 10 database which is the model for an MVC app. On it many (200,000) LOBS get saved, eventually processed, and stored or deleted depending on some conditions. I have two problems. 1. The first is about disk space management, i.e. I want that my tablespace occupies only a portion of disk that I'll all...
2020/02/20
[ "https://dba.stackexchange.com/questions/260118", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/201608/" ]
System Dynamic Management Views ------------------------------- You might want to dive into the **[Execution Related Dynamic Management Views and Functions (Transact-SQL)](https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/execution-related-dynamic-management-views-and-functions...
Not out of the box, no. SQL Server does have a default trace, but the range of events captured is quite small <https://www.databasejournal.com/features/mssql/a-few-cool-things-you-can-identify-using-the-default-trace.html> and not much history is kept. Extended Events are the server-side replacement for SQL Profiler,...
260,118
I have a Postgres 10 database which is the model for an MVC app. On it many (200,000) LOBS get saved, eventually processed, and stored or deleted depending on some conditions. I have two problems. 1. The first is about disk space management, i.e. I want that my tablespace occupies only a portion of disk that I'll all...
2020/02/20
[ "https://dba.stackexchange.com/questions/260118", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/201608/" ]
I use Brent Ozar's [First Responder Kit PowerBI Dashboard](https://www.brentozar.com/first-aid/first-responder-kit-power-bi-dashboard/). You install some procs, create a table to store the data and then schedule a job to populate the data. You can drill down into performance of specific queries and lots of other cool ...
Not out of the box, no. SQL Server does have a default trace, but the range of events captured is quite small <https://www.databasejournal.com/features/mssql/a-few-cool-things-you-can-identify-using-the-default-trace.html> and not much history is kept. Extended Events are the server-side replacement for SQL Profiler,...
260,118
I have a Postgres 10 database which is the model for an MVC app. On it many (200,000) LOBS get saved, eventually processed, and stored or deleted depending on some conditions. I have two problems. 1. The first is about disk space management, i.e. I want that my tablespace occupies only a portion of disk that I'll all...
2020/02/20
[ "https://dba.stackexchange.com/questions/260118", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/201608/" ]
As for built-in features, older versions of SQL Server have the [Management Data Warehouse](https://learn.microsoft.com/en-us/sql/relational-databases/data-collection/management-data-warehouse?view=sql-server-ver15), which will collect performance data and store it in a separate database, optionally on a separate serve...
Not out of the box, no. SQL Server does have a default trace, but the range of events captured is quite small <https://www.databasejournal.com/features/mssql/a-few-cool-things-you-can-identify-using-the-default-trace.html> and not much history is kept. Extended Events are the server-side replacement for SQL Profiler,...
177,082
When I say > > My friends and I went snowboarding. > > > somebody said to me there is a grammar mistake in my sentence but I could not figure out what it is. What is the grammar mistake in the sentence? Should it be > > I and my friends went snowboarding. > > >
2018/08/23
[ "https://ell.stackexchange.com/questions/177082", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/11631/" ]
Your sentence is entirely correct. I'm not sure why they thought it was incorrect, but I'll explain why you're correct, and then guess what *their* mistake may have been. When we use two subjects together, we should be able to use either one by itself. > > My friends went snowboarding. > > > I went snowboarding. >...
Generally speaking.. > > My friends and I went snowboarding > > > ..would be considered good "proper" English and is grammatically correct. However, in general conversation people will say.. > > Me and my friends went snowboarding > > > ..which is *perfectly acceptable* in all but the most polite of circum...
177,082
When I say > > My friends and I went snowboarding. > > > somebody said to me there is a grammar mistake in my sentence but I could not figure out what it is. What is the grammar mistake in the sentence? Should it be > > I and my friends went snowboarding. > > >
2018/08/23
[ "https://ell.stackexchange.com/questions/177082", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/11631/" ]
It is possible your friend had your sentence confused with a similar grammar error that you did NOT make. It is incorrect to say "John gave apples to Ann and I" Same reason: You can say "John gave apples to Ann" but you cannot say "John gave apples to I"
"me and my friends" is a fixed construction, which works well as subject in this sentence, allowing the object form "me". "I and my friends" is not. One could argue that "my friends and me" is a totally acceptable construction too, but in this sentence, "me" would be followed by the verb, which makes it sound much too...
177,082
When I say > > My friends and I went snowboarding. > > > somebody said to me there is a grammar mistake in my sentence but I could not figure out what it is. What is the grammar mistake in the sentence? Should it be > > I and my friends went snowboarding. > > >
2018/08/23
[ "https://ell.stackexchange.com/questions/177082", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/11631/" ]
Your sentence is entirely correct. I'm not sure why they thought it was incorrect, but I'll explain why you're correct, and then guess what *their* mistake may have been. When we use two subjects together, we should be able to use either one by itself. > > My friends went snowboarding. > > > I went snowboarding. >...
> > My friends and I went snowboarding > > > There's nothing wrong with the sentence; it's perfect. How come somebody says that your sentence is not correct? Maybe he likes to use object pronouns when they are cojoined with other nouns/subject pronouns as many people tend to do so in informal speaking and writing...
177,082
When I say > > My friends and I went snowboarding. > > > somebody said to me there is a grammar mistake in my sentence but I could not figure out what it is. What is the grammar mistake in the sentence? Should it be > > I and my friends went snowboarding. > > >
2018/08/23
[ "https://ell.stackexchange.com/questions/177082", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/11631/" ]
> > My friends and I went snowboarding > > > There's nothing wrong with the sentence; it's perfect. How come somebody says that your sentence is not correct? Maybe he likes to use object pronouns when they are cojoined with other nouns/subject pronouns as many people tend to do so in informal speaking and writing...
"me and my friends" is a fixed construction, which works well as subject in this sentence, allowing the object form "me". "I and my friends" is not. One could argue that "my friends and me" is a totally acceptable construction too, but in this sentence, "me" would be followed by the verb, which makes it sound much too...