qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
2,923,072
the below code was working until a few days back, but it started giving exception ``` <cfpop action="getall" name="qMessage" server="mail.forestweb.com" port="995" username="email***@industryintel.com" password="******" timeout="30" /> ``` I am running this code every 10 minutes to fetch ...
2010/05/27
[ "https://Stackoverflow.com/questions/2923072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/217294/" ]
The root cause for me, when I had this problem, was that my harddrive was nearly full combined with the fact that there were some invalid spool files in the spool directory. I cleared some space on the harddrive that my cf server was on and the email started sending again.
Port 995 is typically used for SSL secured connections. Natively, CFPOP does not support SSL. However, there is a way, check out this post <http://www.thecfguy.com/post.cfm/ssl-support-with-cfpop> Hope that helps.
1,890,333
When I run this code in device release mode, it pulls a "SIGABRT" on the "[mapView setRegion:region animated:TRUE];" line. However, I don't get the problem in either debug or simulator mode. I'm a novice in xcode. What am I doing wrong? ``` - (void)initUI { // add a map view in available area startupPage = [[CSNet a...
2009/12/11
[ "https://Stackoverflow.com/questions/1890333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/138622/" ]
You never set the region.span.longitudeDelta in the above code. I'd recommend using the MKCoordinateRegionMake function to set both values and both deltas, so you don't end up with stale or random values.
Jason's comment was accurate and helpful - I'd "check" it if possible. My release code is behaving differently. Once that I looked at the stack (thanks for the hint, Jason), I realized the code bugs out when mapView is set to longitudeDelta of 0. This behavior appears to not only differ between debug/release and device...
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Not feeling anything in your abs means that your abs arent getting the workout that they are supposed to . The key to developing strong abs is to perform the crunches slowly, let the muscles slowly expand and then contract, even on the negative rep where you are going back down. If you work them out well then you shoul...
Check your form. Make sure you are doing the workouts properly. Then repeat until you feel the burn in your abs. It may be that you have a better core than you think. If you gained weight and you think you arent feeling the abs workout, take time out and go running. Do some three miles, rest for two to three minutes a...
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Check your form. Make sure you are doing the workouts properly. Then repeat until you feel the burn in your abs. It may be that you have a better core than you think. If you gained weight and you think you arent feeling the abs workout, take time out and go running. Do some three miles, rest for two to three minutes a...
Anterior pelvic tilt or ATP "could be due to a number of reasons such as **increased** erector spinae and **hip flexor strength relative** to **gluteal and abdominal strength**." Your main goal based on your question is to fix your excessive anterior pelvic tilt. To accomplish this you must address basic principals i...
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
You can try crunches on a Gym ball . Doing crunches on a Gym ball requires more stability and let you arch more , than doing on a bench or flat surface, which restrict your movement . Start with doing small range , and as you progress or become more comfortable increase the range of extension. Doing crunches on Gym bal...
You don't need up and down, up and down. Just hold in contract position for 30 seconds. Do this 3 times, 30 seconds each exercise. You will see your body transformation. Regards
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Not feeling anything in your abs means that your abs arent getting the workout that they are supposed to . The key to developing strong abs is to perform the crunches slowly, let the muscles slowly expand and then contract, even on the negative rep where you are going back down. If you work them out well then you shoul...
If your doing crunches and your feeling it in your lower back, stop and watch some videos. Your focus needs to be on the contraction. Tense your stomach and then perform the crunch. <http://deadliftworkouts.com/strengthen-middle-effective-abdominal-workout/>
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
You can try crunches on a Gym ball . Doing crunches on a Gym ball requires more stability and let you arch more , than doing on a bench or flat surface, which restrict your movement . Start with doing small range , and as you progress or become more comfortable increase the range of extension. Doing crunches on Gym bal...
If your doing crunches and your feeling it in your lower back, stop and watch some videos. Your focus needs to be on the contraction. Tense your stomach and then perform the crunch. <http://deadliftworkouts.com/strengthen-middle-effective-abdominal-workout/>
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Check your form. Make sure you are doing the workouts properly. Then repeat until you feel the burn in your abs. It may be that you have a better core than you think. If you gained weight and you think you arent feeling the abs workout, take time out and go running. Do some three miles, rest for two to three minutes a...
You don't need up and down, up and down. Just hold in contract position for 30 seconds. Do this 3 times, 30 seconds each exercise. You will see your body transformation. Regards
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
You can try crunches on a Gym ball . Doing crunches on a Gym ball requires more stability and let you arch more , than doing on a bench or flat surface, which restrict your movement . Start with doing small range , and as you progress or become more comfortable increase the range of extension. Doing crunches on Gym bal...
Anterior pelvic tilt or ATP "could be due to a number of reasons such as **increased** erector spinae and **hip flexor strength relative** to **gluteal and abdominal strength**." Your main goal based on your question is to fix your excessive anterior pelvic tilt. To accomplish this you must address basic principals i...
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
You can try crunches on a Gym ball . Doing crunches on a Gym ball requires more stability and let you arch more , than doing on a bench or flat surface, which restrict your movement . Start with doing small range , and as you progress or become more comfortable increase the range of extension. Doing crunches on Gym bal...
Check your form. Make sure you are doing the workouts properly. Then repeat until you feel the burn in your abs. It may be that you have a better core than you think. If you gained weight and you think you arent feeling the abs workout, take time out and go running. Do some three miles, rest for two to three minutes a...
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Check your form. Make sure you are doing the workouts properly. Then repeat until you feel the burn in your abs. It may be that you have a better core than you think. If you gained weight and you think you arent feeling the abs workout, take time out and go running. Do some three miles, rest for two to three minutes a...
If your doing crunches and your feeling it in your lower back, stop and watch some videos. Your focus needs to be on the contraction. Tense your stomach and then perform the crunch. <http://deadliftworkouts.com/strengthen-middle-effective-abdominal-workout/>
17,868
first of all I just want to say that I have an Excessive Anterior Pelvic Tilt. When I am working out my abs I don't feel anything except when I do crunches on the machine. any other workout just makes my lower back arch and I don't feel anything in my abdominal... when I had lost about 21 kg I was feeling my abs worki...
2014/06/17
[ "https://fitness.stackexchange.com/questions/17868", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/9928/" ]
Not feeling anything in your abs means that your abs arent getting the workout that they are supposed to . The key to developing strong abs is to perform the crunches slowly, let the muscles slowly expand and then contract, even on the negative rep where you are going back down. If you work them out well then you shoul...
You don't need up and down, up and down. Just hold in contract position for 30 seconds. Do this 3 times, 30 seconds each exercise. You will see your body transformation. Regards
60,385,509
First let me state that all my coding is self taught so my knowledge is functional but not deep. I am creating a Google sheet for my HR team in my company to track Paid Time Off. I had built triggers to send emails when time was submitted. It worked before the migration to V8 but doesn't now, and I don't know enough ab...
2020/02/24
[ "https://Stackoverflow.com/questions/60385509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12956702/" ]
Seems that un-migrating is optional, but Google is auto-migrating scripts to V8. Part of the problem is that Google is automatically migrating scripts that pass their compatibility tests. And apparently some use of MailApp.sendEmail will pass the test but will in fact fail when the script is run. <https://developer...
The migration to V8 is optional. If you aren't ready or you don't have time to make your code compatible with it, just disable it. To do this, click Run > Disable new Apps Script runtime powered by Chrome V8. [![](https://i.stack.imgur.com/egViO.png)](https://i.stack.imgur.com/egViO.png)
60,385,509
First let me state that all my coding is self taught so my knowledge is functional but not deep. I am creating a Google sheet for my HR team in my company to track Paid Time Off. I had built triggers to send emails when time was submitted. It worked before the migration to V8 but doesn't now, and I don't know enough ab...
2020/02/24
[ "https://Stackoverflow.com/questions/60385509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12956702/" ]
Seems that un-migrating is optional, but Google is auto-migrating scripts to V8. Part of the problem is that Google is automatically migrating scripts that pass their compatibility tests. And apparently some use of MailApp.sendEmail will pass the test but will in fact fail when the script is run. <https://developer...
It seems like a lot of triggers don't work with V8 Runtime migration. I have a trigger on onOpen () and it doesn't work when the sheet is opened by a collaborator. However, it works well when it is opened by the owner. I haven't found a solution yet ...
18,160,602
Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, however if another IF block (inner IF) follows the initial IF, then no error is triggered and there are more lines. How is this possible? Example ``` if (true) if (true) System.out.prin...
2013/08/10
[ "https://Stackoverflow.com/questions/18160602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084784/" ]
No errors because it equals to ``` if (true) { if (true) { System.out.println("true"); } else { System.out.println("false"); } } ``` And a valid syntax. But please always use `{}` otherwise, it's very hard to understand where the `if` block ends exactly.
That's because your outer `if` block really contains a single statement. * If inner `if` condition is true, the outer `if` is equivalent to: ``` if (true) System.out.println("true"); ``` * And if, inner `if` condition if `false`, it is equivalent to: ``` if (true) System.out.println("false"); ``` Still, i...
18,160,602
Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, however if another IF block (inner IF) follows the initial IF, then no error is triggered and there are more lines. How is this possible? Example ``` if (true) if (true) System.out.prin...
2013/08/10
[ "https://Stackoverflow.com/questions/18160602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084784/" ]
No errors because it equals to ``` if (true) { if (true) { System.out.println("true"); } else { System.out.println("false"); } } ``` And a valid syntax. But please always use `{}` otherwise, it's very hard to understand where the `if` block ends exactly.
consider this IF statement as: ``` if(true) { if(true) { System.out.println("true"); } else { System.out.println("false"); } } ``` if first `IF` is `true` it goes to next statement, here next statement is also a `IF` and also `true` therefore it executes st...
18,160,602
Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, however if another IF block (inner IF) follows the initial IF, then no error is triggered and there are more lines. How is this possible? Example ``` if (true) if (true) System.out.prin...
2013/08/10
[ "https://Stackoverflow.com/questions/18160602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084784/" ]
> > Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, > > > Correction. An `if` statement without braces can have only one *statement* that is executed when the condition is met. And the syntax of `if` goes something like ``` if (<con...
That's because your outer `if` block really contains a single statement. * If inner `if` condition is true, the outer `if` is equivalent to: ``` if (true) System.out.println("true"); ``` * And if, inner `if` condition if `false`, it is equivalent to: ``` if (true) System.out.println("false"); ``` Still, i...
18,160,602
Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, however if another IF block (inner IF) follows the initial IF, then no error is triggered and there are more lines. How is this possible? Example ``` if (true) if (true) System.out.prin...
2013/08/10
[ "https://Stackoverflow.com/questions/18160602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084784/" ]
That's because your outer `if` block really contains a single statement. * If inner `if` condition is true, the outer `if` is equivalent to: ``` if (true) System.out.println("true"); ``` * And if, inner `if` condition if `false`, it is equivalent to: ``` if (true) System.out.println("false"); ``` Still, i...
consider this IF statement as: ``` if(true) { if(true) { System.out.println("true"); } else { System.out.println("false"); } } ``` if first `IF` is `true` it goes to next statement, here next statement is also a `IF` and also `true` therefore it executes st...
18,160,602
Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, however if another IF block (inner IF) follows the initial IF, then no error is triggered and there are more lines. How is this possible? Example ``` if (true) if (true) System.out.prin...
2013/08/10
[ "https://Stackoverflow.com/questions/18160602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084784/" ]
> > Normally in JAVA if an IF statement doesn't have curly brackets can have only one line that is executed when IF condition is met, > > > Correction. An `if` statement without braces can have only one *statement* that is executed when the condition is met. And the syntax of `if` goes something like ``` if (<con...
consider this IF statement as: ``` if(true) { if(true) { System.out.println("true"); } else { System.out.println("false"); } } ``` if first `IF` is `true` it goes to next statement, here next statement is also a `IF` and also `true` therefore it executes st...
4,554,110
I am running PHP version 5.1.6 currently, but I would have an application which makes pretty heavy use of the `json_encode` and `json_decode` functions, as such, I would like to add these functions to my server's install of PHP (as these functions only ship with PHP versions PHP 5.2 +) What is the best way of doing th...
2010/12/29
[ "https://Stackoverflow.com/questions/4554110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/220519/" ]
If you're unable to upgrade, use PEAR's [Services\_JSON](http://pear.php.net/package/Services_JSON). It works as of PHP 4.3 so you should be fine.
Maybe you should put somewhere in the root of your application a call to a checker function that does [function\_exists()](http://no.php.net/manual/en/function.function-exists.php) for a couple of your needed function and if not stops the execution to prevent unwanted results.
129,282
I want one of my applications to use Tor; however the app itself does not have proxy setting and it uses the System proxy. The problem is that I don't want to set my system proxy and I just want this one application to use tor. I searched a bit for a solution, I came up with `torify`. I have installed `tor` and `torif...
2014/05/01
[ "https://apple.stackexchange.com/questions/129282", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/61684/" ]
### Tell your command where your myapp.app resides You need to provide the open command an absolute or relative [path](http://en.wikipedia.org/wiki/Path_(computing)) to the application, unless the executable is already within your [$PATH](http://en.wikipedia.org/wiki/PATH_(variable)), or you change your working direct...
You're right. `open` launches the program in the background, so Torify doesn't work. The solution is to start the app by directly invoking its binary. Here's how: ``` torify /Applications/MyApp.app/Contents/MacOS/MyApp ```
4,691,956
I am trying achieve the same effect as typing ``` mv ./images/*.{pdf,eps,jpg,svg} ./images/junk/ ``` at the command line, from inside a bash script. I have: ``` MYDIR="./images" OTHERDIR="./images/junk" SUFFIXES='{pdf,eps,jpg,svg}' mv "$MYDIR/"*.$SUFFIXES "$OTHERDIR/" ``` which, when run, gives the not unexpe...
2011/01/14
[ "https://Stackoverflow.com/questions/4691956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/468894/" ]
A deleted answer was on the right track. A slight modification to your attempt: ``` shopt -s extglob MYDIR="./images" OTHERDIR="./images/junk" SUFFIXES='@(pdf|eps|jpg|svg)' mv "$MYDIR/"*.$SUFFIXES "$OTHERDIR/" ``` Brace expansion is done before variable expansion, but variable expansion is done before pathname exp...
You'll need to eval that line in order for it to work, like so: ``` MYDIR="./images" OTHERDIR="./images/junk" SUFFIXES='{pdf,eps,jpg,svg}' eval "mv \"$MYDIR\"/*.$SUFFIXES \"$OTHERDIR/\"" ``` Now, this has problems, in particular, if you don't trust `$SUFFIXES`, it might contain an injection attack, but for this si...
4,691,956
I am trying achieve the same effect as typing ``` mv ./images/*.{pdf,eps,jpg,svg} ./images/junk/ ``` at the command line, from inside a bash script. I have: ``` MYDIR="./images" OTHERDIR="./images/junk" SUFFIXES='{pdf,eps,jpg,svg}' mv "$MYDIR/"*.$SUFFIXES "$OTHERDIR/" ``` which, when run, gives the not unexpe...
2011/01/14
[ "https://Stackoverflow.com/questions/4691956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/468894/" ]
A deleted answer was on the right track. A slight modification to your attempt: ``` shopt -s extglob MYDIR="./images" OTHERDIR="./images/junk" SUFFIXES='@(pdf|eps|jpg|svg)' mv "$MYDIR/"*.$SUFFIXES "$OTHERDIR/" ``` Brace expansion is done before variable expansion, but variable expansion is done before pathname exp...
You can write a function: `function expand { for arg in "$@"; do [[ -f $arg ]] && echo $arg; done }` then call it with what you want to expand: `expand "$MYDIR/"*.$SUFFIXES` You can also make it a script expand.sh if you like.
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
I am on Windows, and alt+0169 alt+0170 will give me two arrows using wingdings 3, but they are LEFT and RIGHT arrows, not up and down. In any event, I would probably refer to the ones I wanted as UNICODE (U+00A9) (x00A9 = 169) and (U+00AA) (x00AA = 170).
I don't have a Mac, but quoting Wikipedia: [Unicode input](http://en.wikipedia.org/wiki/Unicode_input#In_Mac_OS): > > In Mac OS X and in Mac OS 8.5 and > later: one chooses the Unicode Hex > Input keyboard layout. Holding down > the Option key, one then types the > four-digit hex Unicode code point. On > releasi...
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
The Unicode values for these arrows are xf0c7 and xf0c8 respectively, so a completely unambiguous specification would be: Font: Wingdings 3; Unicode 0xf0c7 (up arrow), 0xf0c8 (down arrow). David Blatner wrote a great [post](http://indesignsecrets.com/type-any-unicode-character-you-want-in-indesign.php) on InDesign Sec...
I am on Windows, and alt+0169 alt+0170 will give me two arrows using wingdings 3, but they are LEFT and RIGHT arrows, not up and down. In any event, I would probably refer to the ones I wanted as UNICODE (U+00A9) (x00A9 = 169) and (U+00AA) (x00AA = 170).
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
It seems there are indeed keyboard shortcuts which produce these two arrows. But I'm not sure I understand all the issues. Type: * `Ç` for the up-arrow Mac: `shift`+`option`+`c` PC: `alt`+`0199` on the numpad * `È` for the down-arrow Mac: `option`+``E` PC: `alt`+`0200` on the numpad How did I find these out? I w...
I am on Windows, and alt+0169 alt+0170 will give me two arrows using wingdings 3, but they are LEFT and RIGHT arrows, not up and down. In any event, I would probably refer to the ones I wanted as UNICODE (U+00A9) (x00A9 = 169) and (U+00AA) (x00AA = 170).
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
The Unicode values for these arrows are xf0c7 and xf0c8 respectively, so a completely unambiguous specification would be: Font: Wingdings 3; Unicode 0xf0c7 (up arrow), 0xf0c8 (down arrow). David Blatner wrote a great [post](http://indesignsecrets.com/type-any-unicode-character-you-want-in-indesign.php) on InDesign Sec...
I don't have a Mac, but quoting Wikipedia: [Unicode input](http://en.wikipedia.org/wiki/Unicode_input#In_Mac_OS): > > In Mac OS X and in Mac OS 8.5 and > later: one chooses the Unicode Hex > Input keyboard layout. Holding down > the Option key, one then types the > four-digit hex Unicode code point. On > releasi...
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
An alternative solution could be to create a new font in which these characters are mapped to keyboard characters. You could put the arrows on say `a` and `b` (or maybe even `^` and `v` to make them easier to remember) Yes, there's a possible question around copyright/redistribution issues, but they perhaps don't need...
I don't have a Mac, but quoting Wikipedia: [Unicode input](http://en.wikipedia.org/wiki/Unicode_input#In_Mac_OS): > > In Mac OS X and in Mac OS 8.5 and > later: one chooses the Unicode Hex > Input keyboard layout. Holding down > the Option key, one then types the > four-digit hex Unicode code point. On > releasi...
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
It seems there are indeed keyboard shortcuts which produce these two arrows. But I'm not sure I understand all the issues. Type: * `Ç` for the up-arrow Mac: `shift`+`option`+`c` PC: `alt`+`0199` on the numpad * `È` for the down-arrow Mac: `option`+``E` PC: `alt`+`0200` on the numpad How did I find these out? I w...
I don't have a Mac, but quoting Wikipedia: [Unicode input](http://en.wikipedia.org/wiki/Unicode_input#In_Mac_OS): > > In Mac OS X and in Mac OS 8.5 and > later: one chooses the Unicode Hex > Input keyboard layout. Holding down > the Option key, one then types the > four-digit hex Unicode code point. On > releasi...
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
The Unicode values for these arrows are xf0c7 and xf0c8 respectively, so a completely unambiguous specification would be: Font: Wingdings 3; Unicode 0xf0c7 (up arrow), 0xf0c8 (down arrow). David Blatner wrote a great [post](http://indesignsecrets.com/type-any-unicode-character-you-want-in-indesign.php) on InDesign Sec...
An alternative solution could be to create a new font in which these characters are mapped to keyboard characters. You could put the arrows on say `a` and `b` (or maybe even `^` and `v` to make them easier to remember) Yes, there's a possible question around copyright/redistribution issues, but they perhaps don't need...
2,100
I am working on a corporate standards book for a client. Client works with two design agencies, my office and Other Agency. Both agencies play nicely together. In one particular file, Other Agency created a chart with some arrows (up and down). These arrows are two particular characters in Wingdings 3. These arrows do...
2011/05/18
[ "https://graphicdesign.stackexchange.com/questions/2100", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/52/" ]
It seems there are indeed keyboard shortcuts which produce these two arrows. But I'm not sure I understand all the issues. Type: * `Ç` for the up-arrow Mac: `shift`+`option`+`c` PC: `alt`+`0199` on the numpad * `È` for the down-arrow Mac: `option`+``E` PC: `alt`+`0200` on the numpad How did I find these out? I w...
An alternative solution could be to create a new font in which these characters are mapped to keyboard characters. You could put the arrows on say `a` and `b` (or maybe even `^` and `v` to make them easier to remember) Yes, there's a possible question around copyright/redistribution issues, but they perhaps don't need...
52,206,302
I'm writing a translator for uni project which should translate given Pascal code into assembler code using flex/bison. I've written parser and lexer, which generates symbol table (atm works correctly only without procedures and functions). And my question is, how do I generate assembler code from it and print it to fi...
2018/09/06
[ "https://Stackoverflow.com/questions/52206302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10306136/" ]
So you've got this bit of code: ``` compound_statement: START {fprintf(output, "lab0\n");} optional_statements END ``` You're on the right track doing it this way, but you get a segmentation fault when you add it in and this is because `output` isn't initialised. I can't see where you've declar...
In your parser, for example, you have a pattern: ``` | term MULOP factor ``` You would like to put an action on that pattern that was something like: ``` { fprintf(output, "mul term, factor, result\n"); } ``` but it starts to get sticky very quickly: where are term, factor and where should you put the result? The...
184,312
The size of the close-votes queue is 55k questions. 2,331 review were made today, It is decreasing but it really need some speed as it may take few years to match other review queues. I have some suggestions: 1. Review queues only contains the post which have already two close votes (and asked in the last seven days,...
2013/06/13
[ "https://meta.stackexchange.com/questions/184312", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/183757/" ]
To address each of these individually: 1. > > Review queues only contains the post which have already 2 close votes, as 1 close vote can not always be correct(some user cast vote just because they do not get the post). > > > This suggestion makes it difficult to close old questions. Close votes bleed away after a...
I would rather just have two close vote queues. One for "last active 30+ days ago" (other than close votes, maybe even make this only if new answers are added to avoid "edit... close vote" games) and one for questions with activity in the last month. I understand closing older questions is good, but closing new, poo...
184,312
The size of the close-votes queue is 55k questions. 2,331 review were made today, It is decreasing but it really need some speed as it may take few years to match other review queues. I have some suggestions: 1. Review queues only contains the post which have already two close votes (and asked in the last seven days,...
2013/06/13
[ "https://meta.stackexchange.com/questions/184312", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/183757/" ]
I created [this query](https://data.stackexchange.com/stackoverflow/query/119571/posts-by-number-of-close-votes) a few days ago when I was investigating the practicalities of doing some of these, specifically [Rosinante's (excellent) suggestion](https://meta.stackexchange.com/questions/151833/huge-close-votes-review-qu...
I would rather just have two close vote queues. One for "last active 30+ days ago" (other than close votes, maybe even make this only if new answers are added to avoid "edit... close vote" games) and one for questions with activity in the last month. I understand closing older questions is good, but closing new, poo...
24,968
Is there any duration and/or distance of flight beyond which airlines are legally obliged to feed passengers without charging them for it? If so, what is the limit? In case jurisdictions matter, I'm flying from Australia to Japan with Jetstar, a presumably Australian airline.
2014/03/12
[ "https://travel.stackexchange.com/questions/24968", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/324/" ]
I was flying from Singapore to New Zealand (11 hours). Jetstar will not feed you without additional charge. This is company policy. They won't even bring you tea or coffee without charging. In addition, economy class is creepily cold. Bring some warm clothes. In business class meals included in cost of flight ticked. ...
The terms and conditions for a Qantas flight I'm on explicitly mentions that JetStar usually doesn't supply food and beverage as an inclusion. This suggests that they aren't merely bluffing about not supplying it: > > **Jetstar (JQ) & Jetstar Asia (3K) Flights - Onboard Inclusions/Exclusions** > > Food, beverages...
24,968
Is there any duration and/or distance of flight beyond which airlines are legally obliged to feed passengers without charging them for it? If so, what is the limit? In case jurisdictions matter, I'm flying from Australia to Japan with Jetstar, a presumably Australian airline.
2014/03/12
[ "https://travel.stackexchange.com/questions/24968", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/324/" ]
No, there is no regulation that obliges airlines to provide free food during the normal operation of flights. However, [in the EU they *do* have to](http://www.airpassengerrights.eu/en/flight-delay.html) provide free "meals and refreshments in a reasonable relation to the waiting time" when a flight is delayed by more...
The terms and conditions for a Qantas flight I'm on explicitly mentions that JetStar usually doesn't supply food and beverage as an inclusion. This suggests that they aren't merely bluffing about not supplying it: > > **Jetstar (JQ) & Jetstar Asia (3K) Flights - Onboard Inclusions/Exclusions** > > Food, beverages...
194,009
When cat is given two heredocs, it only outputs the second one. ``` $ cat <<HERE > adsf > qwer > HERE adsf qwer $ cat <<HERE <<ALT > qwer > asdf > HERE > zxcv > yuop > ALT zxcv yuop ``` This also applies if given a heredoc and a file, atlhought I notice that if I give it a file and a heredoc (reversed order), it sti...
2015/04/02
[ "https://unix.stackexchange.com/questions/194009", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5032/" ]
`cat` without any args will read its standard input (i.e. file descriptor 0) until end of file, and copy that to its standard output (i.e. file descriptor 1). `cat` with one or more args will try to open those args in turn as its input, and copy the data to its standard output. It ignores the standard input in that ca...
I have no idea where it can be usefull but: ``` cat <<HERE qwer asdf $(cat <<ALT zxcv yuop ALT ) HERE ```
194,009
When cat is given two heredocs, it only outputs the second one. ``` $ cat <<HERE > adsf > qwer > HERE adsf qwer $ cat <<HERE <<ALT > qwer > asdf > HERE > zxcv > yuop > ALT zxcv yuop ``` This also applies if given a heredoc and a file, atlhought I notice that if I give it a file and a heredoc (reversed order), it sti...
2015/04/02
[ "https://unix.stackexchange.com/questions/194009", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5032/" ]
On systems with `/dev/fd/x`: ``` cat - << E0 /dev/fd/3 3<< E3 foo bar E0 bar baz E3 ``` That is, open the two *here documents* on different file descriptors. If you open them both on fd 0, of course the last open overrides the previous ones. The above would be more useful with commands like `paste` though. Note th...
I have no idea where it can be usefull but: ``` cat <<HERE qwer asdf $(cat <<ALT zxcv yuop ALT ) HERE ```
194,009
When cat is given two heredocs, it only outputs the second one. ``` $ cat <<HERE > adsf > qwer > HERE adsf qwer $ cat <<HERE <<ALT > qwer > asdf > HERE > zxcv > yuop > ALT zxcv yuop ``` This also applies if given a heredoc and a file, atlhought I notice that if I give it a file and a heredoc (reversed order), it sti...
2015/04/02
[ "https://unix.stackexchange.com/questions/194009", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/5032/" ]
There are a number of ways of redirecting a command's standard input (`stdin`): * `command <file` Simple redirection: stdin will be the file * `command <&n` Duplicate other fd: stdin will be a duplication of `fd` n * `command <<word` Here doc: stdin will be the script up to `word` * `other | command` Pipe: stdin comes...
I have no idea where it can be usefull but: ``` cat <<HERE qwer asdf $(cat <<ALT zxcv yuop ALT ) HERE ```
2,947,467
i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist ...
2010/06/01
[ "https://Stackoverflow.com/questions/2947467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355093/" ]
Through DynamicReports you can create dynamic reports quickly and easily. Take a look at following [step by step](http://dynamicreports.sourceforge.net/getting_started.html) tutorial.
Another approach I have taken other than what @jeshurun has mentioned, is outlined in the following [post](http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html). Both of these approaches have worked for me depending on what I needed.
2,947,467
i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist ...
2010/06/01
[ "https://Stackoverflow.com/questions/2947467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355093/" ]
Through DynamicReports you can create dynamic reports quickly and easily. Take a look at following [step by step](http://dynamicreports.sourceforge.net/getting_started.html) tutorial.
[DynamicJasper](http://dynamicjasper.com/) (DJ) is the best and more well - documented solution in my opinion. It offers every feature of DynamicReports but also includes Struts2 and WebWork integration and a clean excel report. Read more at the site.
2,947,467
i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist ...
2010/06/01
[ "https://Stackoverflow.com/questions/2947467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355093/" ]
In case you want to achieve this directly from JasperReports without having to learn to use another library have a look at the following tutorial available [here](http://blog.jeshurun.ca/technology/how-to-dynamically-modify-a-jasperreports-report).
Another approach I have taken other than what @jeshurun has mentioned, is outlined in the following [post](http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html). Both of these approaches have worked for me depending on what I needed.
2,947,467
i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist ...
2010/06/01
[ "https://Stackoverflow.com/questions/2947467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355093/" ]
In case you want to achieve this directly from JasperReports without having to learn to use another library have a look at the following tutorial available [here](http://blog.jeshurun.ca/technology/how-to-dynamically-modify-a-jasperreports-report).
[DynamicJasper](http://dynamicjasper.com/) (DJ) is the best and more well - documented solution in my opinion. It offers every feature of DynamicReports but also includes Struts2 and WebWork integration and a clean excel report. Read more at the site.
2,947,467
i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist ...
2010/06/01
[ "https://Stackoverflow.com/questions/2947467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/355093/" ]
[DynamicJasper](http://dynamicjasper.com/) (DJ) is the best and more well - documented solution in my opinion. It offers every feature of DynamicReports but also includes Struts2 and WebWork integration and a clean excel report. Read more at the site.
Another approach I have taken other than what @jeshurun has mentioned, is outlined in the following [post](http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html). Both of these approaches have worked for me depending on what I needed.
47,769,389
I have a problem with my react app. I have form with 2 components (two separate pickers), and I need to change component state when the date is incorrect. Here is the code: ``` constructor(props: EditFormProps) { super(props); this.state = { isValidDate: true, isValidTime: true } as E...
2017/12/12
[ "https://Stackoverflow.com/questions/47769389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7886462/" ]
The "-lm" is a linker option but you have only included it in your compilation rule (`main.o: main.c`). You need to include it in your linker rule (`main: main.o find_root.o`). As it stand the `-lm` option is ignored during compilation and missing during linking.
The linker flags aren't used when compiling, but when linking, so the command for the `main` rule should have `-lm`, rather than the command for the `*.o` files. Better would be just to set the appropriate variables, and let Make use its built-in rules: ```make #Makefile LDLIBS += -lm CFLAGS += -Wall --pedantic -std...
56,922,191
I'm using the react-bootstrap-typeahead module in one of my application. This is working fine, except in one case. I'm not able to submit the form by pressing the ENTER key if there are no results. ie; if there are **suggestions** provided by react-bootstrap-typeahead, I'm able to select one of the options and submi...
2019/07/07
[ "https://Stackoverflow.com/questions/56922191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/791799/" ]
The issue is likely calling `this.form.submit()`, which handles the form submission in the DOM (instead of React), and as you say, takes it out of your control. It's refreshing the page because you don't have control over the event to call `event.preventDefault()`. Instead of `this.form.submit`, you should call `this....
If you noticed the code in my question, I'm handling multiple events. Especially `onChange` and `onKeyDown`. Couple of things we need to understand about `react-bootstrap-typeahead` is 1. `onChange`, react-bootstrap-typeahead will pass the selected object to callback whereas `onKeyDown` react-bootstrap-typeahead will...
3,101,705
i'am writing some swing applications(not rich clients, running standalone) with a lot of domain models. Those are Java Beans, bound to the UI via presentation models. Now i need to save all the domain data in some kind of a custom project file format. The software will go through many versions, in wich the domain mod...
2010/06/23
[ "https://Stackoverflow.com/questions/3101705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/98311/" ]
Using hibernate is a good possibility. Some [embedded database exist](http://hsqldb.org/) , so you could launch it when the application starts before starting hibernate. The advantage of course is that if you ever wanted to convert the code from standalone to server based, your java bean - hibernate - db model would ...
Using JPA you could save all info into any of JSON/XML/Excel/ODF format, if using DataNucleus as a JPA implementation (as long as the data needing saving is suitable for persisting using JPA). Depends on the data, but of those formats listed something like XML could be more suitable. --Andy ([DataNucleus](http://www.d...
3,101,705
i'am writing some swing applications(not rich clients, running standalone) with a lot of domain models. Those are Java Beans, bound to the UI via presentation models. Now i need to save all the domain data in some kind of a custom project file format. The software will go through many versions, in wich the domain mod...
2010/06/23
[ "https://Stackoverflow.com/questions/3101705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/98311/" ]
I'am using XStream now. The sweet spot is, that with a little configuration i don't need to modify my model - saving/loading just works out of the box. Versioning will probably be done using XSLT to transform older save files into their newer versions. Actually that would be very straight forward, since i can save an ...
Using JPA you could save all info into any of JSON/XML/Excel/ODF format, if using DataNucleus as a JPA implementation (as long as the data needing saving is suitable for persisting using JPA). Depends on the data, but of those formats listed something like XML could be more suitable. --Andy ([DataNucleus](http://www.d...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
A `@Spy` is used to spy on what happens when calling services (and useful to eg. assert the presence or absence of transitive method invocations), what you want is the `@Mock` annotation: ``` public class class1Test { @Mock MyService myService; ... ``` This will result in all `myService` methods returning nu...
This should suits your need: ``` @RunWith(MockitoJunitRunner.class) public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void setUp() { this.class1 = new Class1(myService); // creates this constructor. } @Test public void methodT...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
I solved this by using spring java config. I extended my default config file in my test config file. ``` @Configuration public class TestConfig extends DefaultConfig { @Bean public MyService myService() { return Mockito.spy(new MyServiceImpl()); } } ``` Now my test class goes l...
A `@Spy` is used to spy on what happens when calling services (and useful to eg. assert the presence or absence of transitive method invocations), what you want is the `@Mock` annotation: ``` public class class1Test { @Mock MyService myService; ... ``` This will result in all `myService` methods returning nu...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
Do you mean *anyString()* rather than "someString" in your `setUp` method? This can also be `eq("someString")` if you are calling your method with a specific string. From my understanding of Mockito I don't use spys since they probably indicate a class design issue. Why don't you `@Mock` the whole of `MyService`, so; ...
This should suits your need: ``` @RunWith(MockitoJunitRunner.class) public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void setUp() { this.class1 = new Class1(myService); // creates this constructor. } @Test public void methodT...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
Modified, ``` public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void onceBeforeEachTest() { MockitoAnnotations.initMocks(this); this.class1 = new Class1(myService); Mockito.when(myService).doSomethingElse(anyString()...
This should suits your need: ``` @RunWith(MockitoJunitRunner.class) public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void setUp() { this.class1 = new Class1(myService); // creates this constructor. } @Test public void methodT...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
To replace your Bean with mock in some test use [Springockito](https://bitbucket.org/kubek2k/springockito/wiki/Home) or better [Springockito-annotations](https://bitbucket.org/kubek2k/springockito/wiki/springockito-annotations). Something like this should work: ``` @ContextConfiguration(loader = SpringockitoContextLo...
This should suits your need: ``` @RunWith(MockitoJunitRunner.class) public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void setUp() { this.class1 = new Class1(myService); // creates this constructor. } @Test public void methodT...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
I solved this by using spring java config. I extended my default config file in my test config file. ``` @Configuration public class TestConfig extends DefaultConfig { @Bean public MyService myService() { return Mockito.spy(new MyServiceImpl()); } } ``` Now my test class goes l...
This should suits your need: ``` @RunWith(MockitoJunitRunner.class) public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void setUp() { this.class1 = new Class1(myService); // creates this constructor. } @Test public void methodT...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
I solved this by using spring java config. I extended my default config file in my test config file. ``` @Configuration public class TestConfig extends DefaultConfig { @Bean public MyService myService() { return Mockito.spy(new MyServiceImpl()); } } ``` Now my test class goes l...
Do you mean *anyString()* rather than "someString" in your `setUp` method? This can also be `eq("someString")` if you are calling your method with a specific string. From my understanding of Mockito I don't use spys since they probably indicate a class design issue. Why don't you `@Mock` the whole of `MyService`, so; ...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
I solved this by using spring java config. I extended my default config file in my test config file. ``` @Configuration public class TestConfig extends DefaultConfig { @Bean public MyService myService() { return Mockito.spy(new MyServiceImpl()); } } ``` Now my test class goes l...
Modified, ``` public class class1Test { @Mock private MyService myService; private Class1 class1; @Before public void onceBeforeEachTest() { MockitoAnnotations.initMocks(this); this.class1 = new Class1(myService); Mockito.when(myService).doSomethingElse(anyString()...
15,635,385
I have a SQL Server 2008 table with a field declared as VARBINARY (8000) A stored procedure is used to write to this table, and it takes a parameter of VARBINARY (8000) The C# code calls the stored procedure passing in a byte[] as this parameter. In certain circumstances a SQL exception is thrown because the field i...
2013/03/26
[ "https://Stackoverflow.com/questions/15635385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20339/" ]
I solved this by using spring java config. I extended my default config file in my test config file. ``` @Configuration public class TestConfig extends DefaultConfig { @Bean public MyService myService() { return Mockito.spy(new MyServiceImpl()); } } ``` Now my test class goes l...
To replace your Bean with mock in some test use [Springockito](https://bitbucket.org/kubek2k/springockito/wiki/Home) or better [Springockito-annotations](https://bitbucket.org/kubek2k/springockito/wiki/springockito-annotations). Something like this should work: ``` @ContextConfiguration(loader = SpringockitoContextLo...
339,876
hello everyone i'm try very hard to switch to other user created by me with password but i am not able to switch it, i've searched on google but i don't know what type of error is it it says access denied for user ''@'localhost' to database '\*', and i get one more error when i try to switch user and it says, you have ...
2011/12/11
[ "https://serverfault.com/questions/339876", "https://serverfault.com", "https://serverfault.com/users/103784/" ]
Seems like the username is empty. Please note you can't switch users when you're in MySQL shell. You'd have to exit to the Linux shell, then connect to mysql again with the other username, e.g.: ``` mysql -u myuser -p ``` Hope this helps. If not, please be more specific with your question.
As stated above to connect to your database you need to use the command `mysql -u USER -p`. This means connect as USER and require a password prompt. I have also noticed that when I am adding new users you have to make sure to grant permissions to connect. Many times you will see that hostnames aren't working properly...
38,247,321
The new router (3.0.0) provides the `provideRouter` function which takes an array argument of the type `RouterConfig`... The official developer guide provides a tutorial by bootstrapping a `const`. Example: `export const APP_ROUTER_PROVIDERS = [ provideRouter(routes) ];` I just want to bootstrap it as a `class` `-...
2016/07/07
[ "https://Stackoverflow.com/questions/38247321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6240666/" ]
you need to get elements by tag name on the select rather than entire document ``` function myFunction() { var select = document.getElementById("mySelect_two"); var x = select.selectedIndex; alert(select.getElementsByTagName("option")[x].value); } ```
with options ``` var sel = document.getElementById("mySelect_two"); var selectedIndex = sel.selectedIndex; var value = sel.options[selectedIndex].value; ``` with getElementsByTagName ``` var sel = document.getElementById("mySelect_two"); var selectedIndex = sel.selectedIndex; var value = sel.getElementsByTagName("o...
38,247,321
The new router (3.0.0) provides the `provideRouter` function which takes an array argument of the type `RouterConfig`... The official developer guide provides a tutorial by bootstrapping a `const`. Example: `export const APP_ROUTER_PROVIDERS = [ provideRouter(routes) ];` I just want to bootstrap it as a `class` `-...
2016/07/07
[ "https://Stackoverflow.com/questions/38247321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6240666/" ]
you need to get elements by tag name on the select rather than entire document ``` function myFunction() { var select = document.getElementById("mySelect_two"); var x = select.selectedIndex; alert(select.getElementsByTagName("option")[x].value); } ```
Use below script to get selected options value: ```js var e = document.getElementById("mySelect_two"); var str = e.options[e.selectedIndex].value; alert(str) ``` ```html <select id="mySelect_two"> <option value="India">India</option> <option value="Nepal" selected>Nepal</option> <option value="Spain">Spain</opti...
68,844,942
I want to make my paragraphs 3 lines long at most. If it goes beyond that, I show a "read more" button. [![enter image description here](https://i.stack.imgur.com/FU6Kz.png)](https://i.stack.imgur.com/FU6Kz.png) The "read more" button should be hidden for the first post. I know how to limit the paragraphs using CSS,...
2021/08/19
[ "https://Stackoverflow.com/questions/68844942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14962409/" ]
Please be aware that `line-clamp` doesn't have great support across browsers yet (see <https://caniuse.com/?search=line-clamp>). You may be better off creating the ellipsis yourself. You can obtain the height in pixels of an element using this: ``` var clientHeight = document.getElementById('my-element').clientHeight...
Edit: Got it working thanks to @Alexander van Oostenrijk. Here's my solution below. ``` <% posts.forEach(function(post) { %> <div class="post-div"> <h1><a href="/posts/<%=post._id%>"><%= post.title %></a></h1> <p class="post-p"><%= post.content %></p> <a class="read-more-btn" href="/posts/<%=post._id%>">...
21,967,382
When I press back in my activity , it calls the `onSaveInstanceState()` and saves the "bundle savedInstanceState" which is right. But I want to destroy it or set it to null **only when I press back button or on destroying activity** I just need `onSaveInstanceState()` inside my activity for configuration changes. I ...
2014/02/23
[ "https://Stackoverflow.com/questions/21967382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3250600/" ]
You can add app manifest to exact your app to run as administrator ([msdn](http://msdn.microsoft.com/en-us/library/bb756929.aspx)). Add the following code to your manifest file: ``` <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> ``` Adding app manifest step by step: 1. Right-click on the...
you want to enable this by default on you'r computer only right? because on other computer you can't, this what security all about
36,992
I was wondering how to add a network drive. My school has a network drive that shares files between students and teachers. I cannot figure out how to connect it. I did: smb:\IP Address Any help? --- The server is a Windows and running Windows 2008. Thanks!
2011/04/25
[ "https://askubuntu.com/questions/36992", "https://askubuntu.com", "https://askubuntu.com/users/-1/" ]
You were almost there with your example ('I did: smb:\IP Address'), but looks like you've got the address wrong, it's got to be in URI format like a web address. Either go by Clive's example or try these: * Open up Nautilus/File Manager * Hit Control + L (to bring up location bar) * Type **smb://(ip\_address)/(share)...
On Lucid and later versions of Ubuntu: Places, Connect to Server, service type -> Windows share and enter your Windows user name and password. In the Server box you can either put the server's static IP address or its name on the network (ask your school systems administrator for these values if you don't know them).
47,439,110
I have a `Product` model and also an `Attribute` model. The relationship between `Product` and `Attribute` is many to many. On my `Product` model I am trying to create a dynamic accessor. I am familiar with Laravel's accessors and mutators feature as documented [here](https://laravel.com/docs/5.5/eloquent-mutators#acce...
2017/11/22
[ "https://Stackoverflow.com/questions/47439110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2755440/" ]
Yes, you can add your own piece of logic into the getAttribute() function of the Eloquent Model class (override it in your model), but in my opinion, it's not a good practice. Maybe you can have a function: ``` public function getProductAttr($name) { foreach ($this->productAttributes as $attribute) { if (...
Override Magic method - **\_\_get()** method. Try this. ``` public function __get($key) { foreach ($this->productAttributes as $attribute) { if ($attribute->code === $key) { return $attribute->pivot->value; } } return parent::__get($key); } ```
47,439,110
I have a `Product` model and also an `Attribute` model. The relationship between `Product` and `Attribute` is many to many. On my `Product` model I am trying to create a dynamic accessor. I am familiar with Laravel's accessors and mutators feature as documented [here](https://laravel.com/docs/5.5/eloquent-mutators#acce...
2017/11/22
[ "https://Stackoverflow.com/questions/47439110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2755440/" ]
Yes, you can add your own piece of logic into the getAttribute() function of the Eloquent Model class (override it in your model), but in my opinion, it's not a good practice. Maybe you can have a function: ``` public function getProductAttr($name) { foreach ($this->productAttributes as $attribute) { if (...
I think probably Олег Шовкун answer is the right one but if you did want to use the model attribute notation you could get the required argument into the model via a class variable. ``` class YourModel extends Model{ public $code; public function getProductAttribute() { //a more eloquent way to get the req...
47,439,110
I have a `Product` model and also an `Attribute` model. The relationship between `Product` and `Attribute` is many to many. On my `Product` model I am trying to create a dynamic accessor. I am familiar with Laravel's accessors and mutators feature as documented [here](https://laravel.com/docs/5.5/eloquent-mutators#acce...
2017/11/22
[ "https://Stackoverflow.com/questions/47439110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2755440/" ]
Override Magic method - **\_\_get()** method. Try this. ``` public function __get($key) { foreach ($this->productAttributes as $attribute) { if ($attribute->code === $key) { return $attribute->pivot->value; } } return parent::__get($key); } ```
I think probably Олег Шовкун answer is the right one but if you did want to use the model attribute notation you could get the required argument into the model via a class variable. ``` class YourModel extends Model{ public $code; public function getProductAttribute() { //a more eloquent way to get the req...
13,312,939
Am setting the caption for the JQGrid and headerbutton appears; and how can remove this? Just need title to my grid. Headerbutton is to collapse/expand; but i don't need that. ``` <a class="ui-jqgrid-titlebar-close HeaderButton" href="javascript:void(0)" role="link style="right: 0px;"> <span class="ui-icon ui-icon-cir...
2012/11/09
[ "https://Stackoverflow.com/questions/13312939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1769790/" ]
You should just use the corresponding jqGrid option ``` hidegrid: false ```
hidegrid: false; worked. I have gone little long route to get the same behavior. ``` $('#results_div div').find('.HeaderButton').hide(); ```
33,134,467
I'd difficulties to obtain what I want. To simplify, I take an html page. And it's perfect rendering. ``` <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1"> <title>Nat-Call</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-language" content="fr" /> <met...
2015/10/14
[ "https://Stackoverflow.com/questions/33134467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3378770/" ]
Finding the appropriate version of `println` ignores the return type. See [JLS 15.13.2](https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.13.1). It wouldn't make sense to include it, because there can't be two versions of a method with the same parameters but a different return type. But now the comp...
It seems like a bug in `javac` compiler. The problem lies in overloaded `println()` method. It has different implementations based on type you write: `int`, `long`, `String`, etc. So expression: `System.out::println` has 10 methods to choose from. One of them can be deduced to `Runnable`, 9 others to `Consumer<T>`. So...
5,099,887
All the codes are for a form validation. What I don't understand is the general idea of the JavaScript codes. Could someone explain the general idea behind this JavaScript code and also explain `function validForm()` and function `validBasedOnClass(thisClass)`? Thank you very much. This HTML page contains form fields ...
2011/02/24
[ "https://Stackoverflow.com/questions/5099887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/590074/" ]
One section at a time: ``` window.onload = initForms; function initForms() { for (var i=0; i< document.forms.length; i++) { document.forms[i].onsubmit = function() {return validForm();} } } ``` This sets up any form on the page to first call the `validForm()` before it is submit, if this function re...
**In Summary**: As per this code JS function validForm is being attached to onSubmit event of all the forms on this page. JS function validForm is iterating through all the elements of form checking if the css classname "reqd" is defined on those elements. If classname is "reqd" and value is blank on an element then it...
5,099,887
All the codes are for a form validation. What I don't understand is the general idea of the JavaScript codes. Could someone explain the general idea behind this JavaScript code and also explain `function validForm()` and function `validBasedOnClass(thisClass)`? Thank you very much. This HTML page contains form fields ...
2011/02/24
[ "https://Stackoverflow.com/questions/5099887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/590074/" ]
**In Summary**: As per this code JS function validForm is being attached to onSubmit event of all the forms on this page. JS function validForm is iterating through all the elements of form checking if the css classname "reqd" is defined on those elements. If classname is "reqd" and value is blank on an element then it...
Given that this is straight out of *JavaScript & Ajax for the Web: Visual QuickStart Guide, 7th edition*1, what in particular are you having trouble with in the (line-by-line) explanation on pages 167-171? 1 Co-written by me, btw.
5,099,887
All the codes are for a form validation. What I don't understand is the general idea of the JavaScript codes. Could someone explain the general idea behind this JavaScript code and also explain `function validForm()` and function `validBasedOnClass(thisClass)`? Thank you very much. This HTML page contains form fields ...
2011/02/24
[ "https://Stackoverflow.com/questions/5099887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/590074/" ]
One section at a time: ``` window.onload = initForms; function initForms() { for (var i=0; i< document.forms.length; i++) { document.forms[i].onsubmit = function() {return validForm();} } } ``` This sets up any form on the page to first call the `validForm()` before it is submit, if this function re...
Given that this is straight out of *JavaScript & Ajax for the Web: Visual QuickStart Guide, 7th edition*1, what in particular are you having trouble with in the (line-by-line) explanation on pages 167-171? 1 Co-written by me, btw.
63,503,157
I understand that generators in python atleast are memeory efficent as it deals with one item at a time but how does this make it time efficent (if it is) ? Specifically, say I'm using generator function to load one data at a time for a machine learning task. At the end of the day, I will still need to loop over all t...
2020/08/20
[ "https://Stackoverflow.com/questions/63503157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8266719/" ]
Treating a generator as a lazy sequence, it is usually *less* time efficient as a corresponding eager sequence. ```py %timeit sum((x*2 for x in range(5000))) # lazy generator 366 µs ± 9.24 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %timeit sum([x*2 for x in range(5000)]) # eager list 308 µs ± 3.12 µs ...
No. Generators are, inherently, slower than similar alternatives (like list comprehensions). **But** If you're looking to reduce memory by loading data with generators, you probably shouldn't worry about this performance difference. It's more often the case that the performance bottleneck be at disk I/O and/or syscal...
63,503,157
I understand that generators in python atleast are memeory efficent as it deals with one item at a time but how does this make it time efficent (if it is) ? Specifically, say I'm using generator function to load one data at a time for a machine learning task. At the end of the day, I will still need to loop over all t...
2020/08/20
[ "https://Stackoverflow.com/questions/63503157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8266719/" ]
Treating a generator as a lazy sequence, it is usually *less* time efficient as a corresponding eager sequence. ```py %timeit sum((x*2 for x in range(5000))) # lazy generator 366 µs ± 9.24 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %timeit sum([x*2 for x in range(5000)]) # eager list 308 µs ± 3.12 µs ...
Generators are a feature you use. the implementation for a specific task is and whether it scales or not is a different story. You can read a single item each time, and you can read a bulk of data each time and process them at each time. So depending on your situation, the later can be a much better option. in which...
46,922,824
I'm trying to add a keypress listener that only listens to a keypress of 'a' and when it's triggered, the background will turn to a transparent white, with its border slightly greyed. This is what I have, and somehow it's not working. (Don't mind the other CSS classes, they're just for font decoration) Can someone sho...
2017/10/25
[ "https://Stackoverflow.com/questions/46922824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6575962/" ]
Remove the `.` in `addClass('.test_card')`. Also bind the event to the document and not to the div so that every time you press `a`, the event will fire ```js $(document).keypress(function(event) { if (event.which == '97') { $('#test').addClass('test_card'); } }); ``` ```css body { background: black; ...
``` $(function(){ $("#test").bind("keydown", function( event ) { console.log(event.which) //I think 97 is the character code for 'a' if(event.which == 65){ $(this).addClass('test_card'); }else{ event.preventDefault(); } }); $('#test').focus(); }); ``` add yo...
719,064
I'm looking to gain an intuitive understanding of the geodesic equation (which incorporates the Christoffel symbol) and how it is used to calculate the radial attraction of gravity. In its native form it reads as - $${d^2 x^\mu \over d\tau^2} = - \Gamma^\mu\_{\alpha\beta} u^\alpha u^\beta \tag{1}$$ The Christoffel sym...
2022/07/19
[ "https://physics.stackexchange.com/questions/719064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143858/" ]
As you wrote initially, $\Gamma^{\mu}\_{\alpha\beta}$ describes the $\mu^{th}$ component of the change in the $\alpha^{th}$ basis vector when we move it along the $\beta^{th}$ coordinate. Also, we consider torsion-free connections so we have symmetry in the lower two indices, so in the above interpretation, you can int...
The metric reads $$ds^2=g\_{tt}~c^2dt^2-g\_{rr}~dr^2+r^2~d\phi^2.$$ Lets define $$ds\equiv c~ d\tau,~~~\dot{t} \equiv \frac{dt}{d\tau},~~~\dot{r} \equiv \frac{dr}{d\tau}.$$ The four-velocity is then $$u^{\mu}=(\dot{t},\dot{r},0,0).$$Because of energy conservation it holds$$g\_{tt}~\dot{t}=k\equiv \frac{E}{m c^2}=const....
719,064
I'm looking to gain an intuitive understanding of the geodesic equation (which incorporates the Christoffel symbol) and how it is used to calculate the radial attraction of gravity. In its native form it reads as - $${d^2 x^\mu \over d\tau^2} = - \Gamma^\mu\_{\alpha\beta} u^\alpha u^\beta \tag{1}$$ The Christoffel sym...
2022/07/19
[ "https://physics.stackexchange.com/questions/719064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143858/" ]
The metric reads $$ds^2=g\_{tt}~c^2dt^2-g\_{rr}~dr^2+r^2~d\phi^2.$$ Lets define $$ds\equiv c~ d\tau,~~~\dot{t} \equiv \frac{dt}{d\tau},~~~\dot{r} \equiv \frac{dr}{d\tau}.$$ The four-velocity is then $$u^{\mu}=(\dot{t},\dot{r},0,0).$$Because of energy conservation it holds$$g\_{tt}~\dot{t}=k\equiv \frac{E}{m c^2}=const....
If the idea is to get an intuitive notion of gravitational attraction expressed by the geodesic equation, it is better to remind that Schwartzschild solution is a tiny correction of Newtonian gravity for ordinary examples. Departing from the equation: $${d^2 x^\mu \over d\lambda^2} = - \Gamma^\mu\_{\alpha\beta} u^\alp...
719,064
I'm looking to gain an intuitive understanding of the geodesic equation (which incorporates the Christoffel symbol) and how it is used to calculate the radial attraction of gravity. In its native form it reads as - $${d^2 x^\mu \over d\tau^2} = - \Gamma^\mu\_{\alpha\beta} u^\alpha u^\beta \tag{1}$$ The Christoffel sym...
2022/07/19
[ "https://physics.stackexchange.com/questions/719064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143858/" ]
As you wrote initially, $\Gamma^{\mu}\_{\alpha\beta}$ describes the $\mu^{th}$ component of the change in the $\alpha^{th}$ basis vector when we move it along the $\beta^{th}$ coordinate. Also, we consider torsion-free connections so we have symmetry in the lower two indices, so in the above interpretation, you can int...
> > The Christoffel symbol itself $\Gamma^\mu\_{αβ}$ can be read as follows; > the two lower indices, $α$ and $β$, describe the change > in the $\alpha$ basis vector caused by a change in the $\beta$ coordinate. > The upper index μ then gives the specific direction in which > the change in the basis vector occurs in. ...
719,064
I'm looking to gain an intuitive understanding of the geodesic equation (which incorporates the Christoffel symbol) and how it is used to calculate the radial attraction of gravity. In its native form it reads as - $${d^2 x^\mu \over d\tau^2} = - \Gamma^\mu\_{\alpha\beta} u^\alpha u^\beta \tag{1}$$ The Christoffel sym...
2022/07/19
[ "https://physics.stackexchange.com/questions/719064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143858/" ]
As you wrote initially, $\Gamma^{\mu}\_{\alpha\beta}$ describes the $\mu^{th}$ component of the change in the $\alpha^{th}$ basis vector when we move it along the $\beta^{th}$ coordinate. Also, we consider torsion-free connections so we have symmetry in the lower two indices, so in the above interpretation, you can int...
If the idea is to get an intuitive notion of gravitational attraction expressed by the geodesic equation, it is better to remind that Schwartzschild solution is a tiny correction of Newtonian gravity for ordinary examples. Departing from the equation: $${d^2 x^\mu \over d\lambda^2} = - \Gamma^\mu\_{\alpha\beta} u^\alp...
719,064
I'm looking to gain an intuitive understanding of the geodesic equation (which incorporates the Christoffel symbol) and how it is used to calculate the radial attraction of gravity. In its native form it reads as - $${d^2 x^\mu \over d\tau^2} = - \Gamma^\mu\_{\alpha\beta} u^\alpha u^\beta \tag{1}$$ The Christoffel sym...
2022/07/19
[ "https://physics.stackexchange.com/questions/719064", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143858/" ]
> > The Christoffel symbol itself $\Gamma^\mu\_{αβ}$ can be read as follows; > the two lower indices, $α$ and $β$, describe the change > in the $\alpha$ basis vector caused by a change in the $\beta$ coordinate. > The upper index μ then gives the specific direction in which > the change in the basis vector occurs in. ...
If the idea is to get an intuitive notion of gravitational attraction expressed by the geodesic equation, it is better to remind that Schwartzschild solution is a tiny correction of Newtonian gravity for ordinary examples. Departing from the equation: $${d^2 x^\mu \over d\lambda^2} = - \Gamma^\mu\_{\alpha\beta} u^\alp...
3,085,366
I'm implementing an image cache system for caching downloaded image. My strategy is based upon two-level cache: Memory-level and disk-level. My class is very similar to the class used in the [droidfu project](http://github.com/kaeppler/droid-fu/blob/master/src/main/java/com/github/droidfu/imageloader/ImageCache.java)...
2010/06/21
[ "https://Stackoverflow.com/questions/3085366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329692/" ]
Don't do it! SoftReference is already enough! Actually SoftReference is designed to do exactly what you need. Sometimes SoftReference doesn't do what you need. Then you just get rid of SoftReference and write your own memory management logic. But as far as you use SoftReference you should not be worried about memory c...
I am using one-third of the heap for Image cache. ``` int memoryInMB = activityManager.getMemoryClass(); long totalAppHeap = memoryInMB * 1024 * 1024; int runtimeCacheLimit = (int)totalAppHeap/3; ``` By the way, about soft reference, in Android Soft references do not work as you expect. There is a platform issue th...
3,085,366
I'm implementing an image cache system for caching downloaded image. My strategy is based upon two-level cache: Memory-level and disk-level. My class is very similar to the class used in the [droidfu project](http://github.com/kaeppler/droid-fu/blob/master/src/main/java/com/github/droidfu/imageloader/ImageCache.java)...
2010/06/21
[ "https://Stackoverflow.com/questions/3085366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329692/" ]
Don't do it! SoftReference is already enough! Actually SoftReference is designed to do exactly what you need. Sometimes SoftReference doesn't do what you need. Then you just get rid of SoftReference and write your own memory management logic. But as far as you use SoftReference you should not be worried about memory c...
I've been looking into different caching mechanisms for my scaled bitmaps, both memory and disk cache examples. The examples where to complex for my needs, so I ended up making my own bitmap memory cache using LruCache. You can look at a working code-example [here](https://github.com/jansoren/android-simple-gameapi/bl...
3,085,366
I'm implementing an image cache system for caching downloaded image. My strategy is based upon two-level cache: Memory-level and disk-level. My class is very similar to the class used in the [droidfu project](http://github.com/kaeppler/droid-fu/blob/master/src/main/java/com/github/droidfu/imageloader/ImageCache.java)...
2010/06/21
[ "https://Stackoverflow.com/questions/3085366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/329692/" ]
I am using one-third of the heap for Image cache. ``` int memoryInMB = activityManager.getMemoryClass(); long totalAppHeap = memoryInMB * 1024 * 1024; int runtimeCacheLimit = (int)totalAppHeap/3; ``` By the way, about soft reference, in Android Soft references do not work as you expect. There is a platform issue th...
I've been looking into different caching mechanisms for my scaled bitmaps, both memory and disk cache examples. The examples where to complex for my needs, so I ended up making my own bitmap memory cache using LruCache. You can look at a working code-example [here](https://github.com/jansoren/android-simple-gameapi/bl...
48,456,961
I download MySQL ZIP Archive from here : <https://dev.mysql.com/downloads/mysql/> (Windows (x86, 64-bit), ZIP Archive) I have never installed using a zip file. So I follow this tutorial : <https://www.youtube.com/watch?v=kJbwKQqwtoE&t=495s> From the youtube tutorial, after extract the zip file, there exist `my-defau...
2018/01/26
[ "https://Stackoverflow.com/questions/48456961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5281051/" ]
You can achieve the same effect using `plt.scatter`. Personal preference, as the syntax is shorter and more succinct: ``` df1 = [2.5, 2.5, 2, 3, 4, 3.5] sns.set_style("whitegrid") fig, ax = plt.subplots(figsize=(8,8)) plot1 = sns.boxplot(ax=ax, x=df1, linewidth=5) plt.scatter(3.5, 0, marker='o', s=100) ```
Is this what you're looking for? ``` df1 = [2.5, 2.5, 2, 3, 4, 3.5] sns.set_style("whitegrid") fig, ax = plt.subplots(figsize=(8,8)) sns.boxplot(ax=ax, x=df1, linewidth=5) # sns scatter, with regression fit turned off sns.regplot(x=np.array([3.5]), y=np.array([0]), scatter=True, fit_reg=False, marker='o', ...
81,452
Injecting a sinusoid say, $Z = A \sin(k\_x X + k\_y Y - \omega t)$, $K = 2 \pi f/c$, for example, assume $f = 10$ Hz or $50$ Hz, and $c = 50$ m/s, now if I draw the 2D K-space plot with the following script ``` n=40 f = 50 # Temporal frequency in Hz c = 50 # wave speed 50 m/s k = 2.0 * np.pi * f / c # wavenumber k...
2022/02/09
[ "https://dsp.stackexchange.com/questions/81452", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/61511/" ]
In your case the wave number $k = 2\pi f/c=2\pi$, $k\_x$ and $k\_y$ should satisfy $$ k^2 = k\_x^2+k\_y^2 $$ which means they are not always real. But the direction of propagation of wave is easy to obtain given $k\_x$ and $k\_y$. The wave vector contains the information of both direction and the wave number: $$ \vec{k...
So, for 1D signal, the wave directed at 90 degree while for 2D, the direction of propagation is 45 degree. [ N.B. unfortunately, my comment option is blocked!]
81,452
Injecting a sinusoid say, $Z = A \sin(k\_x X + k\_y Y - \omega t)$, $K = 2 \pi f/c$, for example, assume $f = 10$ Hz or $50$ Hz, and $c = 50$ m/s, now if I draw the 2D K-space plot with the following script ``` n=40 f = 50 # Temporal frequency in Hz c = 50 # wave speed 50 m/s k = 2.0 * np.pi * f / c # wavenumber k...
2022/02/09
[ "https://dsp.stackexchange.com/questions/81452", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/61511/" ]
In your case the wave number $k = 2\pi f/c=2\pi$, $k\_x$ and $k\_y$ should satisfy $$ k^2 = k\_x^2+k\_y^2 $$ which means they are not always real. But the direction of propagation of wave is easy to obtain given $k\_x$ and $k\_y$. The wave vector contains the information of both direction and the wave number: $$ \vec{k...
I can change the above python script to plot the 2 dimensional plane wave. The script is as follows: ``` import numpy as np import random import matplotlib.pyplot as plt import cmath from scipy import signal import math f = 19; # Temporal frequency fs = 100; # sampling frequency Ts = 1/fs; # sample...
81,452
Injecting a sinusoid say, $Z = A \sin(k\_x X + k\_y Y - \omega t)$, $K = 2 \pi f/c$, for example, assume $f = 10$ Hz or $50$ Hz, and $c = 50$ m/s, now if I draw the 2D K-space plot with the following script ``` n=40 f = 50 # Temporal frequency in Hz c = 50 # wave speed 50 m/s k = 2.0 * np.pi * f / c # wavenumber k...
2022/02/09
[ "https://dsp.stackexchange.com/questions/81452", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/61511/" ]
As already commented so far, for the linear wave equation to be satisfied in any number of dimensions the condition (here shown for three dimensions) $$ k^{2} = k\_{x}^{2} + k\_{y}^{2} + k\_{z}^{2}$$ must hold. Now, consider the complex exponential solution of the linearised wave equation of the form $$ p(x, y, z, t...
So, for 1D signal, the wave directed at 90 degree while for 2D, the direction of propagation is 45 degree. [ N.B. unfortunately, my comment option is blocked!]
81,452
Injecting a sinusoid say, $Z = A \sin(k\_x X + k\_y Y - \omega t)$, $K = 2 \pi f/c$, for example, assume $f = 10$ Hz or $50$ Hz, and $c = 50$ m/s, now if I draw the 2D K-space plot with the following script ``` n=40 f = 50 # Temporal frequency in Hz c = 50 # wave speed 50 m/s k = 2.0 * np.pi * f / c # wavenumber k...
2022/02/09
[ "https://dsp.stackexchange.com/questions/81452", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/61511/" ]
As already commented so far, for the linear wave equation to be satisfied in any number of dimensions the condition (here shown for three dimensions) $$ k^{2} = k\_{x}^{2} + k\_{y}^{2} + k\_{z}^{2}$$ must hold. Now, consider the complex exponential solution of the linearised wave equation of the form $$ p(x, y, z, t...
I can change the above python script to plot the 2 dimensional plane wave. The script is as follows: ``` import numpy as np import random import matplotlib.pyplot as plt import cmath from scipy import signal import math f = 19; # Temporal frequency fs = 100; # sampling frequency Ts = 1/fs; # sample...
30,891,029
I have a little bit strange situation. I am compiling on some device. If I compile **in Release mode**, e.g. ``` makeCore projectname release exe ``` All is fine. If I compile **in debug mode**: ``` makeCore projectname debug exe ``` I get following warning: ``` src/administration.c: In function 'SetIp': src/adm...
2015/06/17
[ "https://Stackoverflow.com/questions/30891029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You should not rely on [implicit declarations](https://stackoverflow.com/a/9182835/2838364), but if `InputIp` is defined as `int InputIp();` you should be fine.
Trying to provide punctual answers: 1. `Does this mean in the release mode it is safe to use my application`: The warning means the compiler cannot find the `InputIp` function prototype. No differences in the run-time behavior of your application (caused by this warning) are expected between the two binary flavors. Yo...
30,891,029
I have a little bit strange situation. I am compiling on some device. If I compile **in Release mode**, e.g. ``` makeCore projectname release exe ``` All is fine. If I compile **in debug mode**: ``` makeCore projectname debug exe ``` I get following warning: ``` src/administration.c: In function 'SetIp': src/adm...
2015/06/17
[ "https://Stackoverflow.com/questions/30891029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There are a couple of possible reasons why you get a difference. 1. Lower compiler warning level in release build. This is the most probable reason. 2. Conditional code. Something like this could be the cause: ``` `#ifndef DEBUG` `#include "ip.h"` `#endif` ``` Note that `implicit declaration` is a warning you ...
Trying to provide punctual answers: 1. `Does this mean in the release mode it is safe to use my application`: The warning means the compiler cannot find the `InputIp` function prototype. No differences in the run-time behavior of your application (caused by this warning) are expected between the two binary flavors. Yo...
30,891,029
I have a little bit strange situation. I am compiling on some device. If I compile **in Release mode**, e.g. ``` makeCore projectname release exe ``` All is fine. If I compile **in debug mode**: ``` makeCore projectname debug exe ``` I get following warning: ``` src/administration.c: In function 'SetIp': src/adm...
2015/06/17
[ "https://Stackoverflow.com/questions/30891029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In C89, if the function is prototyped like this (and this prototype is visible at the point of the function body, or the function body uses the same prototype): ``` s32 InputIp(s32 line, u8 * text, s32 otherline, u8 *IP, u8 coordx, s32 coordy); ``` and assuming `u8` is an 8-bit type, then calling this function witho...
Trying to provide punctual answers: 1. `Does this mean in the release mode it is safe to use my application`: The warning means the compiler cannot find the `InputIp` function prototype. No differences in the run-time behavior of your application (caused by this warning) are expected between the two binary flavors. Yo...
30,891,029
I have a little bit strange situation. I am compiling on some device. If I compile **in Release mode**, e.g. ``` makeCore projectname release exe ``` All is fine. If I compile **in debug mode**: ``` makeCore projectname debug exe ``` I get following warning: ``` src/administration.c: In function 'SetIp': src/adm...
2015/06/17
[ "https://Stackoverflow.com/questions/30891029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There are a couple of possible reasons why you get a difference. 1. Lower compiler warning level in release build. This is the most probable reason. 2. Conditional code. Something like this could be the cause: ``` `#ifndef DEBUG` `#include "ip.h"` `#endif` ``` Note that `implicit declaration` is a warning you ...
You should not rely on [implicit declarations](https://stackoverflow.com/a/9182835/2838364), but if `InputIp` is defined as `int InputIp();` you should be fine.
30,891,029
I have a little bit strange situation. I am compiling on some device. If I compile **in Release mode**, e.g. ``` makeCore projectname release exe ``` All is fine. If I compile **in debug mode**: ``` makeCore projectname debug exe ``` I get following warning: ``` src/administration.c: In function 'SetIp': src/adm...
2015/06/17
[ "https://Stackoverflow.com/questions/30891029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There are a couple of possible reasons why you get a difference. 1. Lower compiler warning level in release build. This is the most probable reason. 2. Conditional code. Something like this could be the cause: ``` `#ifndef DEBUG` `#include "ip.h"` `#endif` ``` Note that `implicit declaration` is a warning you ...
In C89, if the function is prototyped like this (and this prototype is visible at the point of the function body, or the function body uses the same prototype): ``` s32 InputIp(s32 line, u8 * text, s32 otherline, u8 *IP, u8 coordx, s32 coordy); ``` and assuming `u8` is an 8-bit type, then calling this function witho...
220,952
I want to get all values of all M1 Attribute Option values like in Magento backend. I have this code ``` SELECT eav_attribute_option_value.option_id, eav_attribute_option_value.`value`, eav_attribute_option.attribute_id FROM eav_attribute_option_value INNER JOIN eav_attribut...
2018/04/03
[ "https://magento.stackexchange.com/questions/220952", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/23700/" ]
Please note that **Is Default** is not a column but this value is exist in the main attribute table "eav\_attribute", So you need also to join this table. The same for Store label: The Store label is the value itself but the difference is in the store\_id. Please try this query and modify it depending on your needs. ...
Please try this query you can easily get all option values in 1 row instead different rows ``` SELECT eav_attribute_option_value.option_id, GROUP_CONCAT(eav_attribute_option_value.value, ','), eav_attribute_option_value.store_id, eav_attribute_option.attribute_id, eav_attribute_option.sort_order, ...
19,789,601
I'd like to add a range of values I have in an array of arrays into a range of cells in an Excel spreadsheet; I wrote the following but it fails: ``` use Win32::OLE; use Cwd; eval {$excel = Win32::OLE->GetActiveObject('Excel.Application')}; die "Excel not installed" if $@; unless (defined $excel) { $excel = Win3...
2013/11/05
[ "https://Stackoverflow.com/questions/19789601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2364438/" ]
The [documentation example](http://search.cpan.org/~jdb/Win32-OLE/lib/Win32/OLE.pm#EXAMPLES) passes an array [reference](http://perldoc.perl.org/perlreftut.html): ``` $sheet->Range("A8:C9")->{Value} = [[ undef, 'Xyzzy', 'Plugh' ], [ 42, 'Perl', 3.1415 ]]; ``` Change your code ...
Check out the speed improvement I got from setting a range of cells to an array of values verses setting each cell to a value, 1 cell at a time: Process times: -------------- ```none start 29:29 to stop 31:41 = 2 min, 12 sec (The SLOW WAY) start 19:55 to stop 20:33 = 0 min, 38 sec (The SPEEDY WAY) ``...
74,335,444
I am making a twitter clone application with VueJS 3. I saved Twitter's logo as a .svg file and can use it with the `<img />` tag. I can also change its color when I give the `<svg>` tag the `fill="#fff"` attribute. However, I want to use this .svg file in multiple places and in different colors. So I tried to dynami...
2022/11/06
[ "https://Stackoverflow.com/questions/74335444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17466049/" ]
It is because you overwrite the content of `dict` with every iteration if it is outside the loop but in `list` it is only a reference and not a new `dict`. If you move it into the loop it will work, cause it is focused to each iteartion and become a separat/individual `dict`: ``` for event in events: events_dict =...
the answer is related to the topic of cloning objects (shallow copy and deep copy): Assignment statements in python do not create copies of objects, they only bind names to an object. for immutable objects, that usually don't make a difference. but for working with mutable objects (like the dict used here) the assignme...
563,364
I know how to prove the statement when two r.v. are independent. But how to prove it when the r.v. are correlated? Edit:or counter example?
2013/11/12
[ "https://math.stackexchange.com/questions/563364", "https://math.stackexchange.com", "https://math.stackexchange.com/users/108034/" ]
The idea of bases in linear algebra is that they allow you to work with coordinates and forget about the actual nature of the vectors. You know a basis of $p^3$. One example could be $1,x,x^2,x^3$. Then, every polynomial in $p^3$ can be identified by its coordinates in this basis. So, the polynomial $a+bx+cx^2+dx^3$ i...
Here is a similar way: Note that $A=\{ x \mapsto a + bx + (a+b)x^2+d x^3 \}\_{a,b,d}$. Choose $(a,b,d)$ from $(1,0,0),(0,1,0),(0,0,1)$ to get $g\_1(x) = 1+x^2, g\_2(x)=x+x^2, g\_3(x) = x^3$. It should be clear that $A = \operatorname{sp} \{g\_1,g\_2,g\_3\}$, it remains to check that the $g\_k$ are linearly independen...
6,719,913
I currently have an image gallery with 30 - 40 images. Upon page load the user can visually see the images loading for a pretty significant amount of time (less than pretty). The gallery is using jcarousel prev / next buttons to navigate to images as well as thumbnails. I am looking for ways to optimize the way the gal...
2011/07/16
[ "https://Stackoverflow.com/questions/6719913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/437592/" ]
We implemented this in our website do the following thing. 1. When you construct the carousel , don't construct all the images with src value with images 2. For the first four or five images have the images for src attributes 3. for the next all images store the image valvue in some custom value and give src as some o...
Yes, lazy-loading of images is very neat technique to improve performance. You should show some of them (depending of size). Then jCarousel has a way of loading dynamically the rest of images: ``` jQuery('#mycarousel').jcarousel({ itemLoadCallback: mycarousel_itemLoadCallback }); ``` You can define that callbac...
22,035,867
i am developing one application in that i want to display map on my device Android 2.3.3, it not display shows error in my log cat i got steps got SHA1 code from debug.keystore create a new project in google apis console register a new id enabled google maps android api v2 create an android key using as input SHA1;it.m...
2014/02/26
[ "https://Stackoverflow.com/questions/22035867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3081942/" ]
Indeed, the overwrite confirmation cannot be turned off with `:w!`, and `:set autoread` doesn't help in this case, neither. What does work is instructing Vim to explicitly check for changes before the write: ``` :checktime | w ```
I believe ``` set autoread ``` should do it. It tells Vim to automatically re-reads the file changed outside Vim.
22,035,867
i am developing one application in that i want to display map on my device Android 2.3.3, it not display shows error in my log cat i got steps got SHA1 code from debug.keystore create a new project in google apis console register a new id enabled google maps android api v2 create an android key using as input SHA1;it.m...
2014/02/26
[ "https://Stackoverflow.com/questions/22035867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3081942/" ]
Indeed, the overwrite confirmation cannot be turned off with `:w!`, and `:set autoread` doesn't help in this case, neither. What does work is instructing Vim to explicitly check for changes before the write: ``` :checktime | w ```
I saw this in a mailing list. Apparently it is called if the file has changed timestamp, after a call to an external shell command. ``` function! ProcessFileChangedShell() if v:fcs_reason == 'mode' || v:fcs_reason == 'time' let v:fcs_choice = '' else let v:fcs_choice = 'ask' endif endfuncti...
22,035,867
i am developing one application in that i want to display map on my device Android 2.3.3, it not display shows error in my log cat i got steps got SHA1 code from debug.keystore create a new project in google apis console register a new id enabled google maps android api v2 create an android key using as input SHA1;it.m...
2014/02/26
[ "https://Stackoverflow.com/questions/22035867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3081942/" ]
Indeed, the overwrite confirmation cannot be turned off with `:w!`, and `:set autoread` doesn't help in this case, neither. What does work is instructing Vim to explicitly check for changes before the write: ``` :checktime | w ```
Add this to your `~/.vimrc` file: ``` set autoread nnoremap <C-u> :checktime<CR> ``` Now whenever you want vim to reload external changes, just click `CTRL-U` :)