qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
8,017,384
I'm building a web page form with jquery append() , html() etc and I'm at the point where I have to write the script shown below to the page ( which gets called by some other external include script by ID I think) What's the best way to write this script to the page or include it so the external calling script can fin...
2011/11/05
[ "https://Stackoverflow.com/questions/8017384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/659196/" ]
Triggers can definitely be a huge problem, especially if there are multiple layers of them. It makes debugging, performance tuning, and understanding the data logic almost impossible. But if you keep your design to a single layer (a trigger for the table), and it is used soley for auditing (i.e. putting the updated ti...
Its true that some triggers can often be a source of confusion and frustration when debugging, especially when there are cascading foreign key updates. But they do have their use. In this case, you have a choice of updating 400 stored procedures, and updating the date manually. If you miss one of those stored procs,...
25,236,719
I have string "02Years02Months". In the SSRS Report i need to show the string like "02 Years 02 Months". Is there any good method in SSRS report Expression. Please advice, Thanks
2014/08/11
[ "https://Stackoverflow.com/questions/25236719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1283795/" ]
I found the solution, Here is the answer ``` =Left(Fields!Value, 2) & " " & Mid(Fields!Value, 3, 5) & " " & Mid(Fields!Value, 8, 2) & " " & Right(Fields!Value, 6) ``` Thanks for the support
=Left(Fields!String.Value, 2) & " " & Mid(Fields!String.Value, 3, 7) & " " & Right(Fields!String.Value, 6) That's assuming your numbers will always be padding with zeroes as in the example above, and given you replace the Fields!String.Value with the field containing the string being returned in your report.
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
[You shouldn't be doing the "`addSubview`" thing up there](https://stackoverflow.com/questions/1759194/displaying-uiimagepickercontroller-within-another-uiview) but instead do: ``` [self presentViewController:imagePicker animated:YES completion:nil]; ```
Dont know why the cancel button is not working. But make this change it will select the image you are clicking. If you want an cancel event add it by creating custom `UIBarButton`and add it. ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIIma...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Is the `getPhoto:` method in the `UIView` subclass? If thats the case, then it would be better to: 1. Move the `getPhoto:` code out of the `UIView` subclass entirely, and put it in the view's parent view controller. 2. Make your `UIButton` a property of your UIView: `@property (nonatomic, strong) UIButton *myButton;`...
Try: ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker.view removeFromSuperview]; UIImageView *patientImage = [[UIImageView alloc] init]; patientImage.frame = CGRectMake(625, 25, 83, 103); UIImage *chosenImage = info[UIIm...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Dont know why the cancel button is not working. But make this change it will select the image you are clicking. If you want an cancel event add it by creating custom `UIBarButton`and add it. ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIIma...
Remove the `[self.addSubView:imagePicker.view];` and instead `[self presentViewController:imagePicker animated:YES completion:NULL];` You are dismissing the variable `picker` although `picker` is undefined. Instead put: `[self dismissModalViewControllerAnimated:YES completion:NULL];` and make sure its at the end o...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Is the `getPhoto:` method in the `UIView` subclass? If thats the case, then it would be better to: 1. Move the `getPhoto:` code out of the `UIView` subclass entirely, and put it in the view's parent view controller. 2. Make your `UIButton` a property of your UIView: `@property (nonatomic, strong) UIButton *myButton;`...
Dont know why the cancel button is not working. But make this change it will select the image you are clicking. If you want an cancel event add it by creating custom `UIBarButton`and add it. ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIIma...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Instead of adding the picker as a subview, you should add the picker to a `UIPopoverController`. You can then display it from within your `UIView` subclass by using the `presentPopoverFromRect:inView:permittedArrowDirections:animated:` popover method like this: ``` self.popover = [[UIPopoverController alloc] initWit...
Dont know why the cancel button is not working. But make this change it will select the image you are clicking. If you want an cancel event add it by creating custom `UIBarButton`and add it. ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIIma...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Try: ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker.view removeFromSuperview]; UIImageView *patientImage = [[UIImageView alloc] init]; patientImage.frame = CGRectMake(625, 25, 83, 103); UIImage *chosenImage = info[UIIm...
Remove the `[self.addSubView:imagePicker.view];` and instead `[self presentViewController:imagePicker animated:YES completion:NULL];` You are dismissing the variable `picker` although `picker` is undefined. Instead put: `[self dismissModalViewControllerAnimated:YES completion:NULL];` and make sure its at the end o...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Instead of adding the picker as a subview, you should add the picker to a `UIPopoverController`. You can then display it from within your `UIView` subclass by using the `presentPopoverFromRect:inView:permittedArrowDirections:animated:` popover method like this: ``` self.popover = [[UIPopoverController alloc] initWit...
Try: ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker.view removeFromSuperview]; UIImageView *patientImage = [[UIImageView alloc] init]; patientImage.frame = CGRectMake(625, 25, 83, 103); UIImage *chosenImage = info[UIIm...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
[You shouldn't be doing the "`addSubview`" thing up there](https://stackoverflow.com/questions/1759194/displaying-uiimagepickercontroller-within-another-uiview) but instead do: ``` [self presentViewController:imagePicker animated:YES completion:nil]; ```
Remove the `[self.addSubView:imagePicker.view];` and instead `[self presentViewController:imagePicker animated:YES completion:NULL];` You are dismissing the variable `picker` although `picker` is undefined. Instead put: `[self dismissModalViewControllerAnimated:YES completion:NULL];` and make sure its at the end o...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
[You shouldn't be doing the "`addSubview`" thing up there](https://stackoverflow.com/questions/1759194/displaying-uiimagepickercontroller-within-another-uiview) but instead do: ``` [self presentViewController:imagePicker animated:YES completion:nil]; ```
Try: ``` - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker.view removeFromSuperview]; UIImageView *patientImage = [[UIImageView alloc] init]; patientImage.frame = CGRectMake(625, 25, 83, 103); UIImage *chosenImage = info[UIIm...
17,232,270
I have button which when I click displays the camera (works perfectly) ``` - (IBAction)getPhoto:(id)sender { NSLog( @"Button clicked!" ); imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSource...
2013/06/21
[ "https://Stackoverflow.com/questions/17232270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1682427/" ]
Is the `getPhoto:` method in the `UIView` subclass? If thats the case, then it would be better to: 1. Move the `getPhoto:` code out of the `UIView` subclass entirely, and put it in the view's parent view controller. 2. Make your `UIButton` a property of your UIView: `@property (nonatomic, strong) UIButton *myButton;`...
Remove the `[self.addSubView:imagePicker.view];` and instead `[self presentViewController:imagePicker animated:YES completion:NULL];` You are dismissing the variable `picker` although `picker` is undefined. Instead put: `[self dismissModalViewControllerAnimated:YES completion:NULL];` and make sure its at the end o...
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
try this ``` boolean contains = Arrays.asList(arr).contains(str); ```
Loop the array and check each entry with your user values ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; for (int i = 0; i < code.length; i++) { if (userCode.equals(code[i]) || oldUser.equals(code[i])) { //do } } ``` Or using `Arrays.asList()`, ``` List<String> codes = Arrays....
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
To achieve a simple verification you can loop through your array OR Easy way to do it ``` List< String > code = Arrays.asList( new String[] { "1111", "2222", "3333", "4444", "5555" } ); String userCode; String oldUser; if (code.contains(userCode) || code.contains(oldUser)) { //doStuff() } else { return; }...
try this ``` boolean contains = Arrays.asList(arr).contains(str); ```
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
try this ``` boolean contains = Arrays.asList(arr).contains(str); ```
Use a foreach with a boolean var ``` boolean isTheSame; For(String myArrayCodes; code;) { if (userCode.equals(myArrayCodes) || oldUser.equals(myArrayCodes)) isTheSame = true; break; } } if (isTheSame) { // usercode or oldUser is on array doSomething(); } else { } ```
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
To achieve a simple verification you can loop through your array OR Easy way to do it ``` List< String > code = Arrays.asList( new String[] { "1111", "2222", "3333", "4444", "5555" } ); String userCode; String oldUser; if (code.contains(userCode) || code.contains(oldUser)) { //doStuff() } else { return; }...
Loop the array and check each entry with your user values ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; for (int i = 0; i < code.length; i++) { if (userCode.equals(code[i]) || oldUser.equals(code[i])) { //do } } ``` Or using `Arrays.asList()`, ``` List<String> codes = Arrays....
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
Loop the array and check each entry with your user values ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; for (int i = 0; i < code.length; i++) { if (userCode.equals(code[i]) || oldUser.equals(code[i])) { //do } } ``` Or using `Arrays.asList()`, ``` List<String> codes = Arrays....
Use a foreach with a boolean var ``` boolean isTheSame; For(String myArrayCodes; code;) { if (userCode.equals(myArrayCodes) || oldUser.equals(myArrayCodes)) isTheSame = true; break; } } if (isTheSame) { // usercode or oldUser is on array doSomething(); } else { } ```
25,478,624
Can you give me a hand please. I need to do a check, to check if the userCode matches any code in my string array or if the oldUser code also matches any code from the array ``` String[] code = {"1111", "2222", "3333", "4444", "5555"}; String userCode; String oldUser; if (userCode.equals(code) || oldUser.equals(cod...
2014/08/25
[ "https://Stackoverflow.com/questions/25478624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3792198/" ]
To achieve a simple verification you can loop through your array OR Easy way to do it ``` List< String > code = Arrays.asList( new String[] { "1111", "2222", "3333", "4444", "5555" } ); String userCode; String oldUser; if (code.contains(userCode) || code.contains(oldUser)) { //doStuff() } else { return; }...
Use a foreach with a boolean var ``` boolean isTheSame; For(String myArrayCodes; code;) { if (userCode.equals(myArrayCodes) || oldUser.equals(myArrayCodes)) isTheSame = true; break; } } if (isTheSame) { // usercode or oldUser is on array doSomething(); } else { } ```
10,134,154
PHP Smarty keeps complaining since my variable money isn't a double that I cant use `money_format` on it, now I am trying to convert `$money` into a double, how do I do that? ``` $money = 100; $money|string_format:"01.2f"|money_format:"%(#10n" ```
2012/04/13
[ "https://Stackoverflow.com/questions/10134154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1324780/" ]
The question gives insufficient information to provide a complete answer. The "bad adaptive filter type" message means that the PNG file is either corrupted or was generated by a buggy encoder. Each scanline of a PNG file begins with a "filter type" byte which must be 0, 1, 2, 3, or 4.
I had this issue before, the image was corrupted by unknown reason, the solution of catching such an error can be using the code below (in Python): ``` try: Image.open(path).tobytes() except IOError: print('detect error img %s' % path) continue ```
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Let's forget for a moment about "I", and "wanting". Here are some: * Negative things: + Minimise or eliminate "suffering" + Minimise attachment, and craving, associated with suffering + Minimise [defilements](https://en.wikipedia.org/wiki/Kleshas_(Buddhism)) + Minimise [fetters](https://en.wikipedia.org/wiki/Fett...
Nibbana is not of the world. Nibbana is experienced by the mind & not by the self. In Buddhism, the 'self' is merely a thought (SN 22.81). > > There is, bhikkhus, that base (sense experience) where there is no earth, no water, no > fire, no air; no base consisting of the infinity of space, no base > consisting of t...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
You used to desire stuff from the world before you understood the Dhamma. After you understood the Dhamma, you can and will still desire stuff from the world. The only difference is you do it in accordance with the Middle Way, the Noble Eightfold Path, the five precepts and principles of virtue (sila). You don't sudd...
You can want to be strong instead of weak. You can want to be a master instead of victim of circumstances. You can want to learn to control your mind. You can want to help others feel less suffering, in both ways (external and internal help). You can want to know the truth from the myths. This world is a dream and eve...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Let's forget for a moment about "I", and "wanting". Here are some: * Negative things: + Minimise or eliminate "suffering" + Minimise attachment, and craving, associated with suffering + Minimise [defilements](https://en.wikipedia.org/wiki/Kleshas_(Buddhism)) + Minimise [fetters](https://en.wikipedia.org/wiki/Fett...
Maybe, upon further analysis of the terms of your question, the **yearning** for an answer will just... fade away. *That in the world by which one is a perceiver of the world, a conceiver of the world—this is called the world in the Noble One’s Discipline.* **SN 35.116** *Yet it is just within this fathom-long body, ...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Let's forget for a moment about "I", and "wanting". Here are some: * Negative things: + Minimise or eliminate "suffering" + Minimise attachment, and craving, associated with suffering + Minimise [defilements](https://en.wikipedia.org/wiki/Kleshas_(Buddhism)) + Minimise [fetters](https://en.wikipedia.org/wiki/Fett...
You can want to be strong instead of weak. You can want to be a master instead of victim of circumstances. You can want to learn to control your mind. You can want to help others feel less suffering, in both ways (external and internal help). You can want to know the truth from the myths. This world is a dream and eve...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Let's forget for a moment about "I", and "wanting". Here are some: * Negative things: + Minimise or eliminate "suffering" + Minimise attachment, and craving, associated with suffering + Minimise [defilements](https://en.wikipedia.org/wiki/Kleshas_(Buddhism)) + Minimise [fetters](https://en.wikipedia.org/wiki/Fett...
You used to desire stuff from the world before you understood the Dhamma. After you understood the Dhamma, you can and will still desire stuff from the world. The only difference is you do it in accordance with the Middle Way, the Noble Eightfold Path, the five precepts and principles of virtue (sila). You don't sudd...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
You can want to be strong instead of weak. You can want to be a master instead of victim of circumstances. You can want to learn to control your mind. You can want to help others feel less suffering, in both ways (external and internal help). You can want to know the truth from the myths. This world is a dream and eve...
Isn't a paradox to say everything is impermanent? Doesn't the view "everything is impermanent" remain in your mind until you die? So, there you have it, you can have something permanent until you die. You can also permanently (until you die) abstain from killing, abstain from taking what is not given, avoid sexual mis...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Nibbana is not of the world. Nibbana is experienced by the mind & not by the self. In Buddhism, the 'self' is merely a thought (SN 22.81). > > There is, bhikkhus, that base (sense experience) where there is no earth, no water, no > fire, no air; no base consisting of the infinity of space, no base > consisting of t...
You can want to be strong instead of weak. You can want to be a master instead of victim of circumstances. You can want to learn to control your mind. You can want to help others feel less suffering, in both ways (external and internal help). You can want to know the truth from the myths. This world is a dream and eve...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Maybe, upon further analysis of the terms of your question, the **yearning** for an answer will just... fade away. *That in the world by which one is a perceiver of the world, a conceiver of the world—this is called the world in the Noble One’s Discipline.* **SN 35.116** *Yet it is just within this fathom-long body, ...
Isn't a paradox to say everything is impermanent? Doesn't the view "everything is impermanent" remain in your mind until you die? So, there you have it, you can have something permanent until you die. You can also permanently (until you die) abstain from killing, abstain from taking what is not given, avoid sexual mis...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Let's forget for a moment about "I", and "wanting". Here are some: * Negative things: + Minimise or eliminate "suffering" + Minimise attachment, and craving, associated with suffering + Minimise [defilements](https://en.wikipedia.org/wiki/Kleshas_(Buddhism)) + Minimise [fetters](https://en.wikipedia.org/wiki/Fett...
Isn't a paradox to say everything is impermanent? Doesn't the view "everything is impermanent" remain in your mind until you die? So, there you have it, you can have something permanent until you die. You can also permanently (until you die) abstain from killing, abstain from taking what is not given, avoid sexual mis...
25,272
What is worth desiring from the world when everything is impermanent ? I can't even desire Nirvana , because I never get it. [Here](https://suttacentral.net/en/mn1) it states that I can not say Nibbana as mine or me or myself( I can not say I am in state of Nibbana and I can not say Nibbana as mine): > > “He directl...
2018/02/16
[ "https://buddhism.stackexchange.com/questions/25272", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/11541/" ]
Nibbana is not of the world. Nibbana is experienced by the mind & not by the self. In Buddhism, the 'self' is merely a thought (SN 22.81). > > There is, bhikkhus, that base (sense experience) where there is no earth, no water, no > fire, no air; no base consisting of the infinity of space, no base > consisting of t...
Isn't a paradox to say everything is impermanent? Doesn't the view "everything is impermanent" remain in your mind until you die? So, there you have it, you can have something permanent until you die. You can also permanently (until you die) abstain from killing, abstain from taking what is not given, avoid sexual mis...
47,057,693
I am trying to use awk for parsing a text file that looks like this: ``` 001 data John Smith address "London" | occupation "Driver" | exercise_level "Medium" 002 data Rob Edward address "Cardiff" | occupation "Physiotherapist" | exercise_level "High" 003 data Dara Pronk address "Groningen" | countr...
2017/11/01
[ "https://Stackoverflow.com/questions/47057693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5761845/" ]
Using GNU awk ``` $ awk '{match($0,/occupation "([^"]*)"/,arr);print $1,$2,$3,$4,arr[1]}' infile 001 data John Smith Driver 002 data Rob Edward Physiotherapist 003 data Dara Pronk Teacher 004 data Marina Francesca Chef ``` Other awk ``` $ awk '{ match($0,/occupation "([^"]*)"/); s=substr($0,RSTAR...
Using any old awk (GNU works too but is not required): ``` $ awk -F'\t' '{split($5,a,/ *\| */); for (i in a) { split(a[i],b," "); d[b[1]]=b[2] } print $1 OFS $2 OFS $3 OFS $4 OFS d["occupation"]}' i 001 data John Smith "Driver" 002 data Rob Edward "Physiotherapist" 003 data Dara Pronk "Teacher" 004 data Marina Frances...
18,103,241
this is my code, can you tell me whats the problem? ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/background_bf" android:orientation="v...
2013/08/07
[ "https://Stackoverflow.com/questions/18103241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/350491/" ]
As Raghunandan said, every View have to be marked as clickable to get the onClick handler to work. Try this for your TextViews: ``` <TextView android:id="@+id/langFrench" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawableLef...
Make sure you have implemented the onClickListner() interface in your activity class. and also make sure you have register your all TextViews with the interface like this in `onCreate()` method. ``` TextView btnDutch = (TextView ) findViewById(R.id.langDutch); btnDutch.setOnClickListener(this); ``` this should work...
93,192
This is a question triggered by [this post](https://physics.stackexchange.com/questions/93124/divergent-series) [Madelung's constant](http://en.wikipedia.org/wiki/Madelung_constant) is defined to the coefficient of electrostatic potential energy in a ionic crystal. In the example of $NaCl$, \begin{equation} M = \sum\...
2014/01/11
[ "https://physics.stackexchange.com/questions/93192", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/35693/" ]
This is not a rigorous answer to OP's questions, as we have not done any calculations or estimates. The [Madelung constant](http://en.wikipedia.org/wiki/Madelung_constant) for the $NaCl$ crystal (of infinite size) is formally the sum $$\tag{1} \sum\_{\vec{r}\in \mathbb{Z}^3\backslash\{\vec{0}\}}\frac{(-1)^{x+y+z}}{|...
> > 1. Expanding sphere leads to a divergent series. OK, what if I make a perfect spherical sample of , will the experimentally measured Madelung's constant to be infinity? > > > This is an interesting thought experiment -- what would nature actually do if someone tried to carve out a sphere shaped NaCl crystal? I...
84,612
I have a set of force profiles of an industrial machine. I'm trying to develop an algorithm that tries to understand when a new profile is "anomalous" with respect to the ones in "normal operating conditions". In the picture below you can see the force profiles (function of time). I want the blue curve found checked a...
2020/10/28
[ "https://datascience.stackexchange.com/questions/84612", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/106450/" ]
I strongly recommend to start with a simple statistical data analysis. In this approach you take the [Moving Average/Median](https://en.wikipedia.org/wiki/Moving_average) of signals and if one signal shows a magnitude -/+ 3 times standard deviation, you mark it as anomaly. [Please have a look at this answer for Python ...
Trust me and use the **Isolation Forest** from [scikit-learn](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.IsolationForest.html), and if you want to have more options with Isolation Forese use the library [PYOD](https://pyod.readthedocs.io/en/latest/_modules/pyod/models/iforest.html).
107,291
I’m a bit confused on why higher elevations/decreased atmospheric pressure wouldn't affect the vapor pressure of a liquid-or have a negligible affect on vapor pressure. With decreased atmospheric pressure, boiling point decreases, and a decrease in BP would increase vapor pressure. So isn’t atmospheric pressure changi...
2018/12/31
[ "https://chemistry.stackexchange.com/questions/107291", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/72892/" ]
The boiling point of a liquid is the temperature such that the liquid's vapor pressure is equal to the atmospheric pressure. When you go to a higher altitude, the boiling point is lower not because the vapor pressure of the liquid at a given temperature has changed, but because there is less atmospheric pressure. The...
Vapor pressure does affect boiling point, but it doesn't go the other way. BP depends on VP, and VP depends on temperature. It is a one way relationship.
37,169,323
The following is easy on SQL but I cannot figure out how to do it on Pandas. My inputs are: ``` import pandas as p symb = p.DataFrame(['a', 'b', 'c'], columns=['symb']) fld = p.DataFrame(['field1', 'field2', 'field3'], columns=['fld']) ``` I want to be able to get the following DataFrame as output: ``` symb f...
2016/05/11
[ "https://Stackoverflow.com/questions/37169323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4947923/" ]
First create new columns with same values in both `DataFrames`. Then use [`merge`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.merge.html) by them and then [`drop`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop.html) helper column: ``` symb['one'] = 1 fld['one'] = 1 print...
Solution ======== ``` pd.DataFrame(index=symb.symb, columns=fld.fld).fillna(0).stack().reset_index()[['symb', 'fld']] ```
37,571,149
With regards to the below code, I am trying to return a variable from inside of loop. I am calling the loop from inside of a function, however when the script is run I get "Uncaught ReferenceError: newVar is not defined". Could someone explain why the value isn't being returned? <https://jsfiddle.net/95nxwxf4/> ``...
2016/06/01
[ "https://Stackoverflow.com/questions/37571149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1528308/" ]
You need to assign the value returned from `loopFunction`: ``` var privateFunction = (function privateFunction() { var newVar = loopFunction(); document.querySelector('.result').innerHTML = newVar; })(); ``` Edit: This is because the `newVar` assigned in `loopFunction` is scoped to that function, meaning it on...
newVar is not defined because the scope of the variable newVar is only defined in the loopFunction. a value is in fact being returned for the loopFunction, but it is just that, a value, the variable newVar has fallen out of scope and as such is not defined in this line. ``` document.querySelector('.result').innerHTM...
3,635,775
In a DexEpress ASPxGridView I have a column that contains voltage. The original values look like 200, 1000, 120 but I am applying a scaling that transforms the values into 200 V, 1 kV and 120 V. How do I sort the column based on the original values and not the string values? (In a .Net datagrid I had 2 columns: one w...
2010/09/03
[ "https://Stackoverflow.com/questions/3635775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18631/" ]
Set the column's Settings.SortMode to the Value property. This should force the grid sort value in this column the way you need it.
I had a problem with sorting. I sorted a column by using ``` this.gvRuleDetail.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] { new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.gcRuleOrder, DevExpress.Data.ColumnSortOrder.Ascending)}); ``` but then I realized that column shown ...
6,757,587
Is there any efficient way to check and report in a log file or on the console may be... when ever the VPN is disconnected? ``` import time print time.asctime( time.localtime(time.time()) ) ``` Can print the time but I do not know what is the code to recursively find whether the VPN is active or not. Pinging it in a...
2011/07/20
[ "https://Stackoverflow.com/questions/6757587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804735/" ]
This solution is system dependent, I do know that it works on Linux because I've done something similar, but not sure about Windows though. I don't know if you want a solution not involving ping, but I think this is a good solution. ``` import logging, os, time PING_HOST='10.10.10.10' # some host on the other side o...
In case the IP of vpn changes, you can check if a tunnel has been established at all. ``` import psutil import logging, os, time import subprocess import sys procname = "yourprocess_name" while True: cmdout = subprocess.Popen(["ifconfig | grep tun"],stdout = subprocess.PIPE, shell=True).communicate()[0] prin...
6,757,587
Is there any efficient way to check and report in a log file or on the console may be... when ever the VPN is disconnected? ``` import time print time.asctime( time.localtime(time.time()) ) ``` Can print the time but I do not know what is the code to recursively find whether the VPN is active or not. Pinging it in a...
2011/07/20
[ "https://Stackoverflow.com/questions/6757587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/804735/" ]
This solution is system dependent, I do know that it works on Linux because I've done something similar, but not sure about Windows though. I don't know if you want a solution not involving ping, but I think this is a good solution. ``` import logging, os, time PING_HOST='10.10.10.10' # some host on the other side o...
This method uses the NAME of the HOST "Connection-specific DNS Suffix" associated with your IP (Mostly the corporation's VPN): ``` import os import platform def check_ping(): hostname = "xyz.com" #hostname will be..Name under: "Connection-specific DNS Suffix" when you type "ipconfig" in cmd.. response = os.syste...
16,757,465
I have to rename my selected sheets (tabs of sheets) continuously in order to keep them updated with new additions i.e. sorting them based on new names, numbers or other criteria. I have made a table of all the names in one particular sheet and after processing that table (changing names, numbers etc) I want to use i...
2013/05/26
[ "https://Stackoverflow.com/questions/16757465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2355133/" ]
I guess you mean something like url encoding. ``` function gsearchquery(text) { var query = encodeURIComponent(text); return query; } ```
Your current replace statement will replace only the first match. Replacing your text replace statement with the following should solve it: ``` var query = text.replace(/\s+/g, "+"); ```
16,757,465
I have to rename my selected sheets (tabs of sheets) continuously in order to keep them updated with new additions i.e. sorting them based on new names, numbers or other criteria. I have made a table of all the names in one particular sheet and after processing that table (changing names, numbers etc) I want to use i...
2013/05/26
[ "https://Stackoverflow.com/questions/16757465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2355133/" ]
I guess you mean something like url encoding. ``` function gsearchquery(text) { var query = encodeURIComponent(text); return query; } ```
try using this change.. hope this was a help to u ``` function gsearchquery(text) { var query = text.split(' ').join('+'); return query; } ```
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
One reason to divide a clock by two is to obtain an even 50% duty cycle square wave. It may be that the 8085 internally uses both clock edges, and wouldn't function if one half of the cycle happened to be much shorter than the other. In the days when the 8085 was new, those nice canned oscillators weren't common, and...
There are lots of reasons to split the instruction cycle into multiple clock cycles. A good example is accessing the main memory bus. Most modern processors are Von-Neumann architectures; that is, their code and data both exist in the same memory chip. Well, if you want to read an instruction, and that instruction is ...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
One reason to divide a clock by two is to obtain an even 50% duty cycle square wave. It may be that the 8085 internally uses both clock edges, and wouldn't function if one half of the cycle happened to be much shorter than the other. In the days when the 8085 was new, those nice canned oscillators weren't common, and...
At the time this chip was designed, people used as few transistors as possible in the CPU, to make them small enough to fit on the available chips. I suspect that practically every "register" (both programmer-visible instruction-set registers and also internal microarchitecture latches) in a CPU of that era stored dat...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
One reason to divide a clock by two is to obtain an even 50% duty cycle square wave. It may be that the 8085 internally uses both clock edges, and wouldn't function if one half of the cycle happened to be much shorter than the other. In the days when the 8085 was new, those nice canned oscillators weren't common, and...
Clock is nothing but a moment when you want an event to occur. Now, we do not prefer level triggering in digital circuits because when more time is given, interaction may occur between different circuits within the microprocessor leading to short circuits. So we GO FOR EDGE TRIGGERING. Now, the microprocessor doesn't k...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
One reason to divide a clock by two is to obtain an even 50% duty cycle square wave. It may be that the 8085 internally uses both clock edges, and wouldn't function if one half of the cycle happened to be much shorter than the other. In the days when the 8085 was new, those nice canned oscillators weren't common, and...
Internally, the core of the 8085A requires a two-phase clock. The internal logic that derives the two clock phases also divides the input clock by two. As previously stated, the reason for using a 6.144MHz input clock is for baud-rate purposes, the chip will run just fine at 6MHz. The chip is actually rated at 3MHz req...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
At the time this chip was designed, people used as few transistors as possible in the CPU, to make them small enough to fit on the available chips. I suspect that practically every "register" (both programmer-visible instruction-set registers and also internal microarchitecture latches) in a CPU of that era stored dat...
There are lots of reasons to split the instruction cycle into multiple clock cycles. A good example is accessing the main memory bus. Most modern processors are Von-Neumann architectures; that is, their code and data both exist in the same memory chip. Well, if you want to read an instruction, and that instruction is ...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
There are lots of reasons to split the instruction cycle into multiple clock cycles. A good example is accessing the main memory bus. Most modern processors are Von-Neumann architectures; that is, their code and data both exist in the same memory chip. Well, if you want to read an instruction, and that instruction is ...
Clock is nothing but a moment when you want an event to occur. Now, we do not prefer level triggering in digital circuits because when more time is given, interaction may occur between different circuits within the microprocessor leading to short circuits. So we GO FOR EDGE TRIGGERING. Now, the microprocessor doesn't k...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
There are lots of reasons to split the instruction cycle into multiple clock cycles. A good example is accessing the main memory bus. Most modern processors are Von-Neumann architectures; that is, their code and data both exist in the same memory chip. Well, if you want to read an instruction, and that instruction is ...
Internally, the core of the 8085A requires a two-phase clock. The internal logic that derives the two clock phases also divides the input clock by two. As previously stated, the reason for using a 6.144MHz input clock is for baud-rate purposes, the chip will run just fine at 6MHz. The chip is actually rated at 3MHz req...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
At the time this chip was designed, people used as few transistors as possible in the CPU, to make them small enough to fit on the available chips. I suspect that practically every "register" (both programmer-visible instruction-set registers and also internal microarchitecture latches) in a CPU of that era stored dat...
Clock is nothing but a moment when you want an event to occur. Now, we do not prefer level triggering in digital circuits because when more time is given, interaction may occur between different circuits within the microprocessor leading to short circuits. So we GO FOR EDGE TRIGGERING. Now, the microprocessor doesn't k...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
At the time this chip was designed, people used as few transistors as possible in the CPU, to make them small enough to fit on the available chips. I suspect that practically every "register" (both programmer-visible instruction-set registers and also internal microarchitecture latches) in a CPU of that era stored dat...
Internally, the core of the 8085A requires a two-phase clock. The internal logic that derives the two clock phases also divides the input clock by two. As previously stated, the reason for using a 6.144MHz input clock is for baud-rate purposes, the chip will run just fine at 6MHz. The chip is actually rated at 3MHz req...
4,458
Why is it that the produced clock frequency is 6.144 MHz, but internally it (8085 processor) uses only 3.072 MHz. Also what leads to the specific value of 6.144 in a clock. I found an answer at yahoo.... <http://answers.yahoo.com/question/index?qid=20080810090119AAurr2i> but I must admit I didn't still get it it wel...
2010/09/19
[ "https://electronics.stackexchange.com/questions/4458", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1163/" ]
Internally, the core of the 8085A requires a two-phase clock. The internal logic that derives the two clock phases also divides the input clock by two. As previously stated, the reason for using a 6.144MHz input clock is for baud-rate purposes, the chip will run just fine at 6MHz. The chip is actually rated at 3MHz req...
Clock is nothing but a moment when you want an event to occur. Now, we do not prefer level triggering in digital circuits because when more time is given, interaction may occur between different circuits within the microprocessor leading to short circuits. So we GO FOR EDGE TRIGGERING. Now, the microprocessor doesn't k...
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
It's the [2038 bug](http://www.2038bug.com/) which is like y2k where systems can't handle dates after that year due to 32 bit limitations. Use the [DateTime class](http://php.net/DateTime) instead which does work around this issue. **For PHP 5.3+** ``` $date = new DateTime('1980-02-15'); $date->add(new DateInterval(...
75 years from 1980 is 2055, which is past the highest date value that can be represented in a 32-bit integer. Therefore the result becomes 0, which is the 1970 date you observe.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
strtotime() uses a unix timestamp, so it overflows if it attempts to calculate years beyond 2038 and reverts back to 1970. To get around this, use the DateTime object. <http://php.net/manual/en/book.datetime.php> To add a period of time to a DateTime object, use DateTime::add, which takes a DateInterval as a paramete...
75 years from 1980 is 2055, which is past the highest date value that can be represented in a 32-bit integer. Therefore the result becomes 0, which is the 1970 date you observe.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
For unix timestamp, the maximum representable time is 2038-01-19. At 03:14:07 UTC. So you can't represent/operate time that over it by using timestamp.
75 years from 1980 is 2055, which is past the highest date value that can be represented in a 32-bit integer. Therefore the result becomes 0, which is the 1970 date you observe.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
PHP's dates are limited to a range from 01-01-1970 to 19-01-2038. You will have to use a different method for working with dates. PEAR has a Date class : [PEAR Date](http://pear.php.net/package/Date/redirected)
75 years from 1980 is 2055, which is past the highest date value that can be represented in a 32-bit integer. Therefore the result becomes 0, which is the 1970 date you observe.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
It's the [2038 bug](http://www.2038bug.com/) which is like y2k where systems can't handle dates after that year due to 32 bit limitations. Use the [DateTime class](http://php.net/DateTime) instead which does work around this issue. **For PHP 5.3+** ``` $date = new DateTime('1980-02-15'); $date->add(new DateInterval(...
strtotime() uses a unix timestamp, so it overflows if it attempts to calculate years beyond 2038 and reverts back to 1970. To get around this, use the DateTime object. <http://php.net/manual/en/book.datetime.php> To add a period of time to a DateTime object, use DateTime::add, which takes a DateInterval as a paramete...
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
It's the [2038 bug](http://www.2038bug.com/) which is like y2k where systems can't handle dates after that year due to 32 bit limitations. Use the [DateTime class](http://php.net/DateTime) instead which does work around this issue. **For PHP 5.3+** ``` $date = new DateTime('1980-02-15'); $date->add(new DateInterval(...
For unix timestamp, the maximum representable time is 2038-01-19. At 03:14:07 UTC. So you can't represent/operate time that over it by using timestamp.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
It's the [2038 bug](http://www.2038bug.com/) which is like y2k where systems can't handle dates after that year due to 32 bit limitations. Use the [DateTime class](http://php.net/DateTime) instead which does work around this issue. **For PHP 5.3+** ``` $date = new DateTime('1980-02-15'); $date->add(new DateInterval(...
PHP's dates are limited to a range from 01-01-1970 to 19-01-2038. You will have to use a different method for working with dates. PEAR has a Date class : [PEAR Date](http://pear.php.net/package/Date/redirected)
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
strtotime() uses a unix timestamp, so it overflows if it attempts to calculate years beyond 2038 and reverts back to 1970. To get around this, use the DateTime object. <http://php.net/manual/en/book.datetime.php> To add a period of time to a DateTime object, use DateTime::add, which takes a DateInterval as a paramete...
For unix timestamp, the maximum representable time is 2038-01-19. At 03:14:07 UTC. So you can't represent/operate time that over it by using timestamp.
10,924,849
``` $somedate = "1980-02-15"; $otherdate = strtotime('+1 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1981-02-15 ``` and ``` $somedate = "1980-02-15"; $otherdate = strtotime('+2 year', strtotime($somedate)); echo date('Y-m-d', $otherdate); ``` outputs ``` 1982-02-15 ``` but ...
2012/06/07
[ "https://Stackoverflow.com/questions/10924849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/810065/" ]
strtotime() uses a unix timestamp, so it overflows if it attempts to calculate years beyond 2038 and reverts back to 1970. To get around this, use the DateTime object. <http://php.net/manual/en/book.datetime.php> To add a period of time to a DateTime object, use DateTime::add, which takes a DateInterval as a paramete...
PHP's dates are limited to a range from 01-01-1970 to 19-01-2038. You will have to use a different method for working with dates. PEAR has a Date class : [PEAR Date](http://pear.php.net/package/Date/redirected)
10,633,173
I need to make mobile app using sencha as client and django as server I am sending request as follows to server ``` url: 'http://localhost:8000/api/user/?format=jsonp', method: 'GET', headers : {'Authorization' : CryptoJS.HmacSHA256("password", "1154590211545902"),'Content-Type':'application/j...
2012/05/17
[ "https://Stackoverflow.com/questions/10633173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1355249/" ]
* Django authentication module doesn't store the password in the database as a plain text. * rather it apply hashing algorithms like 'SHA1' on the password and stores it (as a hash value). * From the hash value you can't get the password as plain text. * You can apply the same hashing algorithm on the given password an...
Assuming you're using the built-in authentication framework, this is fully documented: [Manually checking a user's password](https://docs.djangoproject.com/en/1.3/topics/auth/#manually-checking-a-user-s-password).
1,478
How do I calculate how long a battery operated product will run? Here's what I've got: 1. 2 AA, 1.5V, 2700mAH batteries 2. Voltage Regulator with a Iq of 25 uA 3. Voltage Regulator Eff = 80% 4. Active Current = 50mA 5. Sleep Current = 1uA 6. Duty Cycle = 99.9% (only active 0.1% of the time) 7. Active Voltage is 3.3V ...
2010/01/15
[ "https://electronics.stackexchange.com/questions/1478", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/204/" ]
My calculation, probably missing something, but here's what I did: $$ 1 \mathrm{\ \mu A} + (50 \mathrm{\ mA} \times 0.1\%) + 25 \mathrm{\ \mu A} = 76 \mathrm{\ \mu A} $$ $$ \frac{76 \mathrm{\ \mu A}}{ 80 \, \% \mbox{ efficiency}} = 88 \mathrm{\ \mu A} $$ Round up to \$100 \mathrm{\ \mu A} = 0.1 \mathrm{\ mA}\$ ...
The output current required from the 3.3V regulator is \$1 \mu A \times 0.999 + 50mA \times 0.001 + 25uA = 75.999uA \$ The output power is \$ 3.3V \times 75.999 \mu A = 250.8\mu W\$ The input power to the regulator is \$ \frac{250.8\mu W}{0.8} = 313.5\mu W \$ When the batteries are fully charged the input curr...
17,519,877
I have a stored procedure called `Delete_CreditPayment` as follows: ``` ALTER PROCEDURE [dbo].[Delete_CreditPayment] (@CollectionID nvarchar(50)) AS BEGIN UPDATE Acc_CreditDocuments Set Acc_Status = 3010001 WHERE Acc_DocumentRef = (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_Documen...
2013/07/08
[ "https://Stackoverflow.com/questions/17519877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2503958/" ]
Change to ``` ALTER PROCEDURE [dbo].[Delete_CreditPayment] (@CollectionID nvarchar(50)) AS BEGIN UPDATE Acc_CreditDocuments Set Acc_Status = 3010001 WHERE Acc_DocumentRef IN (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_DocumentNo = @CollectionID); END ```
``` (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_DocumentNo = @CollectionID) ``` This query is retruning more than value. You need to modified your query so that it will return only one row. you can do it either by putting `distinct` , `top 1` or modifying your above query as below according t...
17,519,877
I have a stored procedure called `Delete_CreditPayment` as follows: ``` ALTER PROCEDURE [dbo].[Delete_CreditPayment] (@CollectionID nvarchar(50)) AS BEGIN UPDATE Acc_CreditDocuments Set Acc_Status = 3010001 WHERE Acc_DocumentRef = (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_Documen...
2013/07/08
[ "https://Stackoverflow.com/questions/17519877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2503958/" ]
Your `WHERE` is not ideal. You don't need to add sub-query in `WHERE` condition in this case (since you are using the same table in the sub-query). You could do it directly like this: ``` UPDATE Acc_CreditDocuments Set Acc_Status = 3010001 WHERE Acc_DocumentNo = @CollectionID); ``` So your whole query (alter procedu...
``` (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_DocumentNo = @CollectionID) ``` This query is retruning more than value. You need to modified your query so that it will return only one row. you can do it either by putting `distinct` , `top 1` or modifying your above query as below according t...
17,519,877
I have a stored procedure called `Delete_CreditPayment` as follows: ``` ALTER PROCEDURE [dbo].[Delete_CreditPayment] (@CollectionID nvarchar(50)) AS BEGIN UPDATE Acc_CreditDocuments Set Acc_Status = 3010001 WHERE Acc_DocumentRef = (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_Documen...
2013/07/08
[ "https://Stackoverflow.com/questions/17519877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2503958/" ]
Try this one - ``` UPDATE a SET Acc_Status = 3010001 FROM dbo.Acc_CreditDocuments a WHERE EXISTS( SELECT 1 FROM dbo.Acc_CreditDocuments b WHERE b.Acc_DocumentNo = @CollectionID AND a.Acc_DocumentRef = b.Acc_DocumentRef ) ``` Or this - ``` UPDATE dbo.Acc_CreditDocuments SET Acc_Status = 301...
``` (SELECT Acc_DocumentRef From Acc_CreditDocuments WHERE Acc_DocumentNo = @CollectionID) ``` This query is retruning more than value. You need to modified your query so that it will return only one row. you can do it either by putting `distinct` , `top 1` or modifying your above query as below according t...
39,053,333
I am giving array to select multiple options through alert dialog I want to disable selection if array is full I have been able to stop adding items to array after it reaches the limit but not able to disable the checkboxes ``` AlertDialog.Builder builder=new AlertDialog.Builder(this); View view=inflater.inflate(R....
2016/08/20
[ "https://Stackoverflow.com/questions/39053333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6648201/" ]
``` builder.setMultiChoiceItems(array, checkedGenres, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int which, boolean isChecked) { if(isChecked) { if (!selectedgenre.contains(String.valueOf(which))...
In your else part put clickable false on your checkbox and also change the color so that user can identify it.
39,053,333
I am giving array to select multiple options through alert dialog I want to disable selection if array is full I have been able to stop adding items to array after it reaches the limit but not able to disable the checkboxes ``` AlertDialog.Builder builder=new AlertDialog.Builder(this); View view=inflater.inflate(R....
2016/08/20
[ "https://Stackoverflow.com/questions/39053333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6648201/" ]
okay I have solved the issue, after two days I came to know disabling checkbox is lengthy and hectic process but we can prohibit the selection, and that's what I wanted to do. here is my solution ``` builder.setMultiChoiceItems(array, checkedGenres, new DialogInterface.OnMultiChoiceClickListener() { int co...
``` builder.setMultiChoiceItems(array, checkedGenres, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int which, boolean isChecked) { if(isChecked) { if (!selectedgenre.contains(String.valueOf(which))...
39,053,333
I am giving array to select multiple options through alert dialog I want to disable selection if array is full I have been able to stop adding items to array after it reaches the limit but not able to disable the checkboxes ``` AlertDialog.Builder builder=new AlertDialog.Builder(this); View view=inflater.inflate(R....
2016/08/20
[ "https://Stackoverflow.com/questions/39053333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6648201/" ]
Views inside a ListView are reusable, so [items aren't really linked to a view](https://stackoverflow.com/a/6923513/9179761). You can however enable or disable a view when it's being added to the ListView inside your AlertDialog's ListView. [ViewGroup.setOnHierarchyChangeListener](https://developer.android.com/referenc...
``` builder.setMultiChoiceItems(array, checkedGenres, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int which, boolean isChecked) { if(isChecked) { if (!selectedgenre.contains(String.valueOf(which))...
39,053,333
I am giving array to select multiple options through alert dialog I want to disable selection if array is full I have been able to stop adding items to array after it reaches the limit but not able to disable the checkboxes ``` AlertDialog.Builder builder=new AlertDialog.Builder(this); View view=inflater.inflate(R....
2016/08/20
[ "https://Stackoverflow.com/questions/39053333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6648201/" ]
okay I have solved the issue, after two days I came to know disabling checkbox is lengthy and hectic process but we can prohibit the selection, and that's what I wanted to do. here is my solution ``` builder.setMultiChoiceItems(array, checkedGenres, new DialogInterface.OnMultiChoiceClickListener() { int co...
In your else part put clickable false on your checkbox and also change the color so that user can identify it.
39,053,333
I am giving array to select multiple options through alert dialog I want to disable selection if array is full I have been able to stop adding items to array after it reaches the limit but not able to disable the checkboxes ``` AlertDialog.Builder builder=new AlertDialog.Builder(this); View view=inflater.inflate(R....
2016/08/20
[ "https://Stackoverflow.com/questions/39053333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6648201/" ]
Views inside a ListView are reusable, so [items aren't really linked to a view](https://stackoverflow.com/a/6923513/9179761). You can however enable or disable a view when it's being added to the ListView inside your AlertDialog's ListView. [ViewGroup.setOnHierarchyChangeListener](https://developer.android.com/referenc...
In your else part put clickable false on your checkbox and also change the color so that user can identify it.
47,751,974
I Have a file name like that "Informe\_Pro\_Bra-201712110918.xlsx", i can fixe name and date but hours no because it's variable. So i want using code stage of BluePrism (C#) put the last 4 caracters "HHMM" as wilcards, to get others files in this date even with different extension. What do for that? Help Please
2017/12/11
[ "https://Stackoverflow.com/questions/47751974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8863900/" ]
For searching files you can use for that object "Utility - File Management", action: "Get files". there are two inputs: * Folder * Patterns CSV Please use Pattern: ``` "Informe_Pro_Bra-20171211*.xlsx" ``` That way you can quickly find the file that you're looking for.
Get the all file in the collection and then apply the filter like ``` "FileName like 'Info_*.xlsx'" ``` You will be getting another collection with filtered one loop through it. As we're already having the path append the FileName and generate the dynamic path like ``` [FTP_Path]&"\"&[Collection.Filename] ```
39,907,544
Let's suppose I was going to design a platform like [Airbnb](https://en.wikipedia.org/wiki/Airbnb). They have a website as well as native apps on various mobile platforms. I've been researching app design, and from what I've gathered, the most effective way to do this is to build an API for the back-end, like a REST A...
2016/10/07
[ "https://Stackoverflow.com/questions/39907544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472966/" ]
This is probably due to the `Exclude VCS Ignored Paths` setting in Atom's Core settings. Please try the search again after unselecting the respective checkbox in the settings: [![Atom Settings](https://i.stack.imgur.com/Yf8SN.png)](https://i.stack.imgur.com/Yf8SN.png) You can find this setting on the first page of th...
**For MacOS:** `Atom` > `Preferences` > `Settings` > uncheck `Exclude VCS Ignored Paths` and now I have a full search and now, you can search through all the files.
33,219,649
I have a doubt about C initializers. If we user an initializer like: ``` int a[2] = {1, 3}; ``` in a static storage variable, I understand (think) that the compiler puts that data automatically in the .data of the elf file. But when we do that inside a function to initialize a variable that will be in the stack wha...
2015/10/19
[ "https://Stackoverflow.com/questions/33219649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3817226/" ]
It's just a question of syntax. Since C99, you can do precisely that, but you need an explicit cast in order to tell the compiler what the {...} block that follows is: ``` foo = (struct mystruct){1, 2}; ``` Note that the above is an assignment, not an initialization. So the following is also legal: ``` for (int i ...
you need to distinguish between code that is functionally different and code that is syntactically different. Compiler and language designers and writers first focus on providing features, like static data, vs local (stack), .... A secondary consideration is 'syntactical sugar' that is simplified syntax for doing some...
55,960,969
Just working on basic coding skills and when I make changes in the css file the changes do not show up on non of my browsers. Here is my index.html code: ``` <html> <head> <link ref="stylesheet" href="css/style.css?v=1.1"> </head> <body> <div class="ios-switch"> <div class="switch-body"> ...
2019/05/02
[ "https://Stackoverflow.com/questions/55960969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10211196/" ]
Go to DeveloperTools (F12) than setting (F1), and at the Network preferences check (Disable cache (while DevTools is open) - Refresh the page
You can refresh the page cleaning it's cache by pressing [Ctrl] + [F5] (reload).
55,960,969
Just working on basic coding skills and when I make changes in the css file the changes do not show up on non of my browsers. Here is my index.html code: ``` <html> <head> <link ref="stylesheet" href="css/style.css?v=1.1"> </head> <body> <div class="ios-switch"> <div class="switch-body"> ...
2019/05/02
[ "https://Stackoverflow.com/questions/55960969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10211196/" ]
Go to DeveloperTools (F12) than setting (F1), and at the Network preferences check (Disable cache (while DevTools is open) - Refresh the page
@ForestProgramming, none of the cache solutions are going to fix this because its not related to your cache. For one reason or another your web server is failing. Since you are just using HTML/CSS just open the HTML file in your browser instead of using localhost. You can do this in the file menu, then open, and find ...
55,960,969
Just working on basic coding skills and when I make changes in the css file the changes do not show up on non of my browsers. Here is my index.html code: ``` <html> <head> <link ref="stylesheet" href="css/style.css?v=1.1"> </head> <body> <div class="ios-switch"> <div class="switch-body"> ...
2019/05/02
[ "https://Stackoverflow.com/questions/55960969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10211196/" ]
Go to DeveloperTools (F12) than setting (F1), and at the Network preferences check (Disable cache (while DevTools is open) - Refresh the page
You css file looks invalid. try removing this from it ``enter code here` For CSS validation try using the validator [here](https://jigsaw.w3.org/css-validator/validator) ``` * { margin:0; padding:0; } .ios-switch{`enter code here` display: flex; flex-direction: row; align-items: center; marg...
38,397,407
I am using a hasMany in my Model class to retrive the clients notes, how ever i want to order these notes by the latest date created in laravel blade template. My code is below and im getting an error on this. Please advice me.. ``` @foreach($clients->notes->orderBy('created_at', 'desc') as $note) <table class=...
2016/07/15
[ "https://Stackoverflow.com/questions/38397407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3579266/" ]
Guessing, because you haven't told us *what* error you're getting, but: `$clients->notes` is an already-fetched collection of results. `$clients->notes()` is a query builder that you can apply further logic like ordering or additional criteria to. You likely want: ``` $clients->notes()->orderBy('created_at', 'desc')...
Data must be ordered within controller or models. If you have used hasMany validation in model you can do as mentioned below ``` In model write association public function notes() { return $this->hasMany('Note')->orderBy('created_at', 'desc'); } In your controller function associate client wi...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
I appreciate this motive about being aggressive towards the chat users who are regularly breaking "Be Nice" policy and being problematic for constructive discussions in chat rooms. I also support action against chat rooms which attract flags and controversies on a regular basis. This also makes chat a useful place afte...
The concept of "normal user", "room owner" and "moderator" needs to be expanded into more granular abilities: (imagine file system per-user rights, it's a very similar concept) * Room owners who can change other room owners' and users' abilities (so you can have some users with limited extra abilities and who can't ch...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
I just need to drop my view cents here. I already wrote a comment: > > Ah yep I can *confirm* that you close rooms in that case, unfortunately you suggest that it would be possible to reopen chats. However **you didn't give a final statement for more then 6 month**, that you will leave the room closed. That is how **...
I predict some day that Stack Exchange will be up for a notable prize in some social studies area. And they will look at this decision as the reason that SE does not deserve one. The disturbance in chat is trying to tell you something very important. I do not know what that something is. But I hear it screaming out ...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
Chat self-moderation starts with the individual user. We've been talking about ways to make moderation easier (and that's desperately needed!), about ways to empower room owners more, about automatic suspensions with teeth... but the individual user, the author of a chat message, lacks one important ability: **after tw...
The problem I have with this, and I suspect part of the reason the rules have to be really vague, is that there are (at least) two completely different kinds of chatrooms. 1. "Third place" chatrooms. Long-lived rooms where people can go to hang out and banter. These places work best when they are welcoming, and it mak...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
So, in keeping with [This Meta.SO post](https://meta.stackoverflow.com/a/366914/2370483), I figure I might as well mention the obvious: Chat moderation tools are terrible ================================== Let me describe a real event that illustrates this. I was in a room where there's banter. People sometimes take ...
> > We're More Aggressively Enforcing Self-Moderation In Chat > > > Self moderation? Surely if there's an issue, moderators aren't doing their job. Surely you then need to improve the moderation rather than anything else. > > While the timing of this post coincides with us expressing some serious concerns aroun...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
The problem I have with this, and I suspect part of the reason the rules have to be really vague, is that there are (at least) two completely different kinds of chatrooms. 1. "Third place" chatrooms. Long-lived rooms where people can go to hang out and banter. These places work best when they are welcoming, and it mak...
Bravo for the initiative. Some proposals, motivated by the topic sentence of the blog post: > > Too many people experience Stack Overflow as a hostile or elitist place, especially newer coders, **women**, people of color, and others in marginalized groups. [boldface added] > > > 1. Put either this whole post as w...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
So, in keeping with [This Meta.SO post](https://meta.stackoverflow.com/a/366914/2370483), I figure I might as well mention the obvious: Chat moderation tools are terrible ================================== Let me describe a real event that illustrates this. I was in a room where there's banter. People sometimes take ...
There are rooms that regularly and consistently [violate this Meta post](https://meta.stackexchange.com/questions/289398/if-youre-gonna-talk-politics-you-must-respect-those-who-disagree?rq=1). For ages, nothing has been done to either those rooms or the posters there who get flagged. Is this new policy going to be a u...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
I just need to drop my view cents here. I already wrote a comment: > > Ah yep I can *confirm* that you close rooms in that case, unfortunately you suggest that it would be possible to reopen chats. However **you didn't give a final statement for more then 6 month**, that you will leave the room closed. That is how **...
Bravo for the initiative. Some proposals, motivated by the topic sentence of the blog post: > > Too many people experience Stack Overflow as a hostile or elitist place, especially newer coders, **women**, people of color, and others in marginalized groups. [boldface added] > > > 1. Put either this whole post as w...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
I just need to drop my view cents here. I already wrote a comment: > > Ah yep I can *confirm* that you close rooms in that case, unfortunately you suggest that it would be possible to reopen chats. However **you didn't give a final statement for more then 6 month**, that you will leave the room closed. That is how **...
> > We're More Aggressively Enforcing Self-Moderation In Chat > > > Self moderation? Surely if there's an issue, moderators aren't doing their job. Surely you then need to improve the moderation rather than anything else. > > While the timing of this post coincides with us expressing some serious concerns aroun...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
There are rooms that regularly and consistently [violate this Meta post](https://meta.stackexchange.com/questions/289398/if-youre-gonna-talk-politics-you-must-respect-those-who-disagree?rq=1). For ages, nothing has been done to either those rooms or the posters there who get flagged. Is this new policy going to be a u...
Bravo for the initiative. Some proposals, motivated by the topic sentence of the blog post: > > Too many people experience Stack Overflow as a hostile or elitist place, especially newer coders, **women**, people of color, and others in marginalized groups. [boldface added] > > > 1. Put either this whole post as w...
309,645
While the timing of this post coincides with us expressing [some serious concerns](https://stackoverflow.blog/2018/04/26/stack-overflow-isnt-very-welcoming-its-time-for-that-to-change/) around how we're not doing a good job of helping and guiding Stack Overflow to remain a welcoming place for everyone, this is somethin...
2018/04/30
[ "https://meta.stackexchange.com/questions/309645", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/50049/" ]
So, in keeping with [This Meta.SO post](https://meta.stackoverflow.com/a/366914/2370483), I figure I might as well mention the obvious: Chat moderation tools are terrible ================================== Let me describe a real event that illustrates this. I was in a room where there's banter. People sometimes take ...
I predict some day that Stack Exchange will be up for a notable prize in some social studies area. And they will look at this decision as the reason that SE does not deserve one. The disturbance in chat is trying to tell you something very important. I do not know what that something is. But I hear it screaming out ...
14,248
I am trying to use the Curve Number Method to calculate the peak flow over an area. The precipitation is provided in a table, with the first column being the time (hr), second column being the incremental rainfall at each time (inch.), and the third being the cumulative rainfall (inch). If I am calculating the peak fl...
2017/03/14
[ "https://engineering.stackexchange.com/questions/14248", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/10463/" ]
According to TR-55, [here](https://www.nrcs.usda.gov/Internet/FSE_DOCUMENTS/stelprdb1044171.pdf), you use total rainfall. This requires a bit more information about the watershed, namely the time of concentration (which affects the unit peak discharge). Then, from TR-55: $$\begin{align}q\_p &= q\_uA\_mQF\_p\\ \text{wh...
Short answer is that you should use the cumulative rainfall in inches (to calculate runoff for each time step) and not the intensity in inch per hour for that time. Using runoff curve number, we need to account for initial abstraction. $$\begin{align}Q &= 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for~~ P ...
11,713,223
I have a dropdown menu that slides up and down when toggled to reveal it's menu items. The problem is that when i go to click one of the menu items after the menu has slid down, it is recognized as a toggle and the menu slides up without opening the link of the menu item. HTML ``` <li class="dropdown"> <a...
2012/07/29
[ "https://Stackoverflow.com/questions/11713223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1128290/" ]
`UIGestureRecognizer` has a property `view` which is the view the gesture recognizer is attached to. Therefore, in your handler method, `gestureRecognizer.view` is the button that the LPGR is attached to and `gestureRecognizer.view.tag` is the button's tag. **ADDED:** Sample code: ``` - (void)longPressHandler:(UILo...
You can simply create a subclass of `UILongPressGestureRecognizer` and add a `tag` property to it. You could also use [associated objects](http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html) to add the property with a category.
338,221
The idea is download a video in parts (from different servers) but starting to play before video file is complete. The issue is that VideoDisplay component doesn't read the video file if it is opened for writing and vice-versa: writing is impossible if VideoDisplay plays the video...
2008/12/03
[ "https://Stackoverflow.com/questions/338221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I know I may sound totally off-topic, but you should make sure you've properly considered video streaming thru Flash Media Server, Wowza or Red5 before you put that much effort in downloading a file in chunks. Just a thought..
What about having multiple parts of the video, so playing can begin as soon as first part gets downloaded. So the parts have to be concatenated somehow at client side. (Additionally, if one's connection is insufficient, showing a loading symbol is fine.)
338,221
The idea is download a video in parts (from different servers) but starting to play before video file is complete. The issue is that VideoDisplay component doesn't read the video file if it is opened for writing and vice-versa: writing is impossible if VideoDisplay plays the video...
2008/12/03
[ "https://Stackoverflow.com/questions/338221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I know I may sound totally off-topic, but you should make sure you've properly considered video streaming thru Flash Media Server, Wowza or Red5 before you put that much effort in downloading a file in chunks. Just a thought..
Open the file in Shared mode, if that is possible with Air. Mainstream OS's (Windows, Linux, MacOS) have this functionality built in. Use two threads: In thread 1 (the downloader thread) open the file in Shared mode to allow reading from other threads and processes. In thread 2 (the player thread) open the file in S...
10,275,000
there. I am trying to program a server. The server receive some information from client and it sends the information to the other server and it receive the response. Do I need to use select() on this case? or Pthread only is enough to do this. my server has many clients connecting concurrently please answer me ...
2012/04/23
[ "https://Stackoverflow.com/questions/10275000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > I can't code something like myVariable.Where(); since it's not IEnumerable > > > I don't really understand by what you mean with this. As for the error, it says you can't cast from the `IEnumerable` to `ExpenseItem`. You have to apply it like you final example like so and return the item rather than `IEnumera...
If you will use this: ``` public IEnumerable<ExpenseItem> ToFind(string trip) { return this.Where(e => e.Trip == trip); } ``` You need to use this, note the FirstOrDefault: ``` selectedExpense = roster .ToFind((string)tripSelect.SelectedItem) .FirstOrDefault(); ``` Your selectedExpense is not an I...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
You can convert the warning into an error by using the following compiler options `-Wreturn-type -Werror=return-type`. Check out This [link](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
The obvious answer is: because it's not an error. It's only an error if `x` is false and if the caller uses the return value, neither of which can necessarily be determined by the compiler, at least in the general case. In this particular case (returning a pointer), it wouldn't be too difficult to require a `return` f...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
It is not allowed (undefined behaviour). However, the standard does not require a diagnostic in this case. The standard doesn't require the last statement to be `return` because of code like this: ``` while (true) { if (condition) return 0; } ``` This always returns 0, but a dumb compiler cannot see it. Note that...
Use the [-Wall](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall) flag in [GCC](https://en.wikipedia.org/wiki/GNU_Compiler_Collection). > > warning: control reaches end of non-void function > > > Or more specifically, [-Wreturn-type](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
You can convert the warning into an error by using the following compiler options `-Wreturn-type -Werror=return-type`. Check out This [link](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
What the standard says about this kind of programming is that it produces *undefined behavior*. Undefined behavior is the joy and pity of C/C++, but it is also a fundamental feature of the language design that allows for many of the low-level optimizations that make C a sort of "high level assembler" (it is not, actua...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
As far as I remember, Visual Studio 2008 warns you about a "execution path that does not have a return value". It is allowed in the meaning of that "C++ won't stop you from shooting you in the foot". So you are to think, not the compiler.
What the standard says about this kind of programming is that it produces *undefined behavior*. Undefined behavior is the joy and pity of C/C++, but it is also a fundamental feature of the language design that allows for many of the low-level optimizations that make C a sort of "high level assembler" (it is not, actua...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
It is not allowed (undefined behaviour). However, the standard does not require a diagnostic in this case. The standard doesn't require the last statement to be `return` because of code like this: ``` while (true) { if (condition) return 0; } ``` This always returns 0, but a dumb compiler cannot see it. Note that...
My guess: Because sometimes the programmer knows better than the compiler. With this simple example, it's clear that someting is wrong, but consider a switch of many values, or many checks in general. You, as the coder, *know* that certain values just will not be passed in to the function, but the compiler doesn't and ...
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
You can convert the warning into an error by using the following compiler options `-Wreturn-type -Werror=return-type`. Check out This [link](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
As far as I remember, Visual Studio 2008 warns you about a "execution path that does not have a return value". It is allowed in the meaning of that "C++ won't stop you from shooting you in the foot". So you are to think, not the compiler.
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
It is not allowed (undefined behaviour). However, the standard does not require a diagnostic in this case. The standard doesn't require the last statement to be `return` because of code like this: ``` while (true) { if (condition) return 0; } ``` This always returns 0, but a dumb compiler cannot see it. Note that...
You can convert the warning into an error by using the following compiler options `-Wreturn-type -Werror=return-type`. Check out This [link](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
6,260,917
Unlike Java, in C/C++ the following is **allowed**: ``` int* foo () { if(x) return p; // What if control reaches here? } ``` This often causes crashes and it is hard to debug problems. Why doesn't the *standard* enforce to have a **final return** for non-`void` functions? (Compilers generate an error for a ...
2011/06/07
[ "https://Stackoverflow.com/questions/6260917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/514235/" ]
My guess: Because sometimes the programmer knows better than the compiler. With this simple example, it's clear that someting is wrong, but consider a switch of many values, or many checks in general. You, as the coder, *know* that certain values just will not be passed in to the function, but the compiler doesn't and ...
As far as I remember, Visual Studio 2008 warns you about a "execution path that does not have a return value". It is allowed in the meaning of that "C++ won't stop you from shooting you in the foot". So you are to think, not the compiler.