qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
75,078
EDIT : Sorry, my question clearly wasn't clear. I don't want to report attempted server attacks internally; we already have systems that log. record and report that activity. What I was keen to do was to report the attacks to the perpetrator's ISP or somesuch. Original question: Our sites are immune to SQL Injection...
2009/10/16
[ "https://serverfault.com/questions/75078", "https://serverfault.com", "https://serverfault.com/users/23154/" ]
Donate your logs to [SANS](http://isc.sans.org/howto.html)! They have a client for most firewalls that will pull the logs and send them to the DShield database.
Most ISPs have an abuse@ispname.com email address for reporting such things.. If you can revers lookup the ISP name from the IP I would send the info there.
75,078
EDIT : Sorry, my question clearly wasn't clear. I don't want to report attempted server attacks internally; we already have systems that log. record and report that activity. What I was keen to do was to report the attacks to the perpetrator's ISP or somesuch. Original question: Our sites are immune to SQL Injection...
2009/10/16
[ "https://serverfault.com/questions/75078", "https://serverfault.com", "https://serverfault.com/users/23154/" ]
Either everyone else understood something else or I did, but from what I can understand you are trying to report the people attempting SQL injections to their ISPs. This will usually be a dead end, and you're better off just blocking the users attempting the attacks, as most machines performing attacks are not usually...
Most ISPs have an abuse@ispname.com email address for reporting such things.. If you can revers lookup the ISP name from the IP I would send the info there.
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
To create one you could use a low power uC like a the msp430. It would be fairly cheap to build. Most of the msp430 value line chips have I2C or SPI built in. you would have to look up how to drive the brushless motor and those 2 links could give you a good start.
Another vote for using a low power uC! I would suggest a small PIC - it would be easy to write some software to convert I2C to PWM outputs as these devices have good built peripheral options. The advantage is you can also implement a local control loop by measuring feedback from the A/D port of actual position or vel...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
To create one you could use a low power uC like a the msp430. It would be fairly cheap to build. Most of the msp430 value line chips have I2C or SPI built in. you would have to look up how to drive the brushless motor and those 2 links could give you a good start.
Use an MSP430 as an I2C slave. I just used the standard I2C code that you can download on the TI wiki. It doesn't work for MSPGCC though and you need to use a chip that supports I2C, such as an MSP430F2013 (which you can get free samples of). [Check out the sample code here](https://gist.github.com/745942) or you can d...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
To create one you could use a low power uC like a the msp430. It would be fairly cheap to build. Most of the msp430 value line chips have I2C or SPI built in. you would have to look up how to drive the brushless motor and those 2 links could give you a good start.
There is a similar question [here](https://electronics.stackexchange.com/questions/8027/implementing-my-own-esc). This was my answer: > > Here is an introduction to electronic speed control systems: <http://www.stefanv.com/electronics/escprimer.html> > > > Actual design depends on the type of motor you want to driv...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
To create one you could use a low power uC like a the msp430. It would be fairly cheap to build. Most of the msp430 value line chips have I2C or SPI built in. you would have to look up how to drive the brushless motor and those 2 links could give you a good start.
Hi not to be particular but too many people are stating that any uC can generate PWM signals. That is true but almost all ESCs require PPM signals like what are used to drive servos. There is a big (big enough to damage an ESC) difference.
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
Use an MSP430 as an I2C slave. I just used the standard I2C code that you can download on the TI wiki. It doesn't work for MSPGCC though and you need to use a chip that supports I2C, such as an MSP430F2013 (which you can get free samples of). [Check out the sample code here](https://gist.github.com/745942) or you can d...
Another vote for using a low power uC! I would suggest a small PIC - it would be easy to write some software to convert I2C to PWM outputs as these devices have good built peripheral options. The advantage is you can also implement a local control loop by measuring feedback from the A/D port of actual position or vel...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
Hi not to be particular but too many people are stating that any uC can generate PWM signals. That is true but almost all ESCs require PPM signals like what are used to drive servos. There is a big (big enough to damage an ESC) difference.
Another vote for using a low power uC! I would suggest a small PIC - it would be easy to write some software to convert I2C to PWM outputs as these devices have good built peripheral options. The advantage is you can also implement a local control loop by measuring feedback from the A/D port of actual position or vel...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
Use an MSP430 as an I2C slave. I just used the standard I2C code that you can download on the TI wiki. It doesn't work for MSPGCC though and you need to use a chip that supports I2C, such as an MSP430F2013 (which you can get free samples of). [Check out the sample code here](https://gist.github.com/745942) or you can d...
There is a similar question [here](https://electronics.stackexchange.com/questions/8027/implementing-my-own-esc). This was my answer: > > Here is an introduction to electronic speed control systems: <http://www.stefanv.com/electronics/escprimer.html> > > > Actual design depends on the type of motor you want to driv...
7,925
I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically [this motor](http://www.sparkfun.com/products/9697). However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of...
2010/12/16
[ "https://electronics.stackexchange.com/questions/7925", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81/" ]
Hi not to be particular but too many people are stating that any uC can generate PWM signals. That is true but almost all ESCs require PPM signals like what are used to drive servos. There is a big (big enough to damage an ESC) difference.
There is a similar question [here](https://electronics.stackexchange.com/questions/8027/implementing-my-own-esc). This was my answer: > > Here is an introduction to electronic speed control systems: <http://www.stefanv.com/electronics/escprimer.html> > > > Actual design depends on the type of motor you want to driv...
70,285,234
If I refresh the page when I'm logged in, the Guard redirects me to the login page. Is there a way for redirecting to the login page only if the user truly log out? I am using frontend as angular (version: 12.2.13)and backend as firebase. auth.guard.ts ``` import { Injectable } from "@angular/core"; import { Activate...
2021/12/09
[ "https://Stackoverflow.com/questions/70285234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17632514/" ]
You are already doing it correctly. for example: ``` lst_keywords_physics_dict = {'a': 1, 'b': 2} for k in lst_keywords_physics_dict.keys(): if len(k) == 1: lst_keywords_physics_dict.pop(k) break ``` So, what was the issue you were facing? , I can modify the answer accordingly.
#We can use this method in python 3 to delete the keys when iterating throug the dictionary without getting the error regarding changing size of dictionary. ``` for k in list(lst_keywords_physics_dict.keys()): if (len(k)<3): lst_keywords_physics_dict.pop(k) ```
40,335,515
Is it possible to change the color a button with a label using a random generator? For ex.. Label "A" is the title/color dictator and will notify "Button 1 and Button 2" what colors they will generate to be randomly.
2016/10/31
[ "https://Stackoverflow.com/questions/40335515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4490046/" ]
Use strtok\_r(). It's the same behaviour as strtok, but allow you to work with multiple strings "simultaneously". ``` char *strtok_r(char *str, const char *delim, char **saveptr); ``` > > The strtok\_r() function is a reentrant version strtok(). The saveptr argument is a pointer to a char \* variable that is used i...
Your function `getmask()` invokes undefined behavior: * you copy the string argument into a local array `x`; * you parse that with `strtok()` which returns a pointer into the same local array `x`. * you return this pointer `mask` to the caller. This pointer becomes invalid as soon as you exit this function. You shoul...
40,335,515
Is it possible to change the color a button with a label using a random generator? For ex.. Label "A" is the title/color dictator and will notify "Button 1 and Button 2" what colors they will generate to be randomly.
2016/10/31
[ "https://Stackoverflow.com/questions/40335515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4490046/" ]
Use strtok\_r(). It's the same behaviour as strtok, but allow you to work with multiple strings "simultaneously". ``` char *strtok_r(char *str, const char *delim, char **saveptr); ``` > > The strtok\_r() function is a reentrant version strtok(). The saveptr argument is a pointer to a char \* variable that is used i...
`strtok()` cannot be used on comma separated strings if there are null values there e.g. "one,two,,four,five,,,eight". Using `strtok(token,",")` will return "one", "two","four"... where you might have thought an null string "" would be returned after"two". This caught me out when trying to parse the output from a GPS ...
52,283
I am intentionally not specifying a country for the following as I am interested in answers for different countries. Lets say that instead of global warming we would have global cooling - the ice caps grow, seas shrink and with them a lot of land is uncovered. Who owns the new land uncovered in such a scenario?
2020/06/12
[ "https://law.stackexchange.com/questions/52283", "https://law.stackexchange.com", "https://law.stackexchange.com/users/31951/" ]
We don't have to imagine shrinking seas. New land is created all the time by volcanoes. The answer is that the ownership of the new land depends on the circumstances. It may become part of an adjacent parcel, depending on how the deed is written. More than one landowner might have a reasonable claim, in which case ther...
New land is not only created by volcanoes, but also manmade, for example by the dutch, or it appears almost by itself at the north sea coast of Germany, especialyl around coast protection constructions around some of the islands. Who owns the land? In the case of the german north sea coast, it is owned by the commune ...
52,283
I am intentionally not specifying a country for the following as I am interested in answers for different countries. Lets say that instead of global warming we would have global cooling - the ice caps grow, seas shrink and with them a lot of land is uncovered. Who owns the new land uncovered in such a scenario?
2020/06/12
[ "https://law.stackexchange.com/questions/52283", "https://law.stackexchange.com", "https://law.stackexchange.com/users/31951/" ]
We don't have to imagine shrinking seas. New land is created all the time by volcanoes. The answer is that the ownership of the new land depends on the circumstances. It may become part of an adjacent parcel, depending on how the deed is written. More than one landowner might have a reasonable claim, in which case ther...
In the United States, this is a non-issue because US constitutional law doesn't care about "land", i.e. dry dirt, it cares about territory. The standard interpretation is that "federal lands" are owned by the citizens of the US, but held in trust by the US government. Congress has the authority to sell, buy, lease or ...
52,283
I am intentionally not specifying a country for the following as I am interested in answers for different countries. Lets say that instead of global warming we would have global cooling - the ice caps grow, seas shrink and with them a lot of land is uncovered. Who owns the new land uncovered in such a scenario?
2020/06/12
[ "https://law.stackexchange.com/questions/52283", "https://law.stackexchange.com", "https://law.stackexchange.com/users/31951/" ]
New land is not only created by volcanoes, but also manmade, for example by the dutch, or it appears almost by itself at the north sea coast of Germany, especialyl around coast protection constructions around some of the islands. Who owns the land? In the case of the german north sea coast, it is owned by the commune ...
In the United States, this is a non-issue because US constitutional law doesn't care about "land", i.e. dry dirt, it cares about territory. The standard interpretation is that "federal lands" are owned by the citizens of the US, but held in trust by the US government. Congress has the authority to sell, buy, lease or ...
29,586,667
I'm testing react-native PushNotificationIOS. <http://facebook.github.io/react-native/docs/pushnotificationios.html#content> I bind event like below in `componentWillMount` function ``` PushNotificationIOS.addEventListener('notification', this._onNotification); ``` and I send push notification from server to devic...
2015/04/12
[ "https://Stackoverflow.com/questions/29586667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4778806/" ]
Push notifications don't work out of the box and this is not documented on the React Native docs. There are a few things you need to add to your project first in order to wire up notifications. I found this information from an open issue on github <https://github.com/facebook/react-native/pull/1979#issue-94795697>. Yo...
I found this too so wrote a replacement module to handle receiving push notifications - <https://github.com/darylrowland/react-native-remote-push>
1,364,361
Having seen the answers coming out of questions like [this one](https://stackoverflow.com/questions/1163393/best-scala-imitation-of-groovys-safe-dereference-operator "this one") involving horror shows like trying to catch the NPE and dredge the mangled name out of the stack trace, I am asking this question so I can ans...
2009/09/01
[ "https://Stackoverflow.com/questions/1364361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/89872/" ]
Like so: ``` case class ?:[T](x: T) { def apply(): T = x def apply[U >: Null](f: T => U): ?:[U] = if (x == null) ?:[U](null) else ?:[U](f(x)) } ``` And in action: ``` scala> val x = ?:("hel")(_ + "lo ")(_ * 2)(_ + "world")() x: java.lang.String = hello hello world scala> val x = ?:("hel")(_ + "lo ")(_ ...
Added `orElse` ```scala case class ?:[T](x: T) { def apply(): T = x def apply[U >: Null](f: T => U): ?:[U] = if (x == null) ?:[U](null) else ?:[U](f(x)) def orElse(y: T): T = if (x == null) y else x } ``` ```scala scala> val x = ?:(obj)(_.subField)(_.subSubField).orElse("not found") x: java.la...
12,423,716
I'm working on a drawing application which requires high levels of accuracy, and I'm wondering which of the major browser platforms (including the HTML Canvas element, and Flash) give the best sub-pixel layout accuracy, both for drawn elements (rectangles in the Canvas or Flash, absolutely positioned DIVs in the browse...
2012/09/14
[ "https://Stackoverflow.com/questions/12423716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1014822/" ]
Currently, you can expect the best rounding and sub-pixel support to come from Mozilla with IE as the runner up. IE might end up being more fine tuned, but their release cycles are so long that Mozilla is likely to stay ahead of them. As far as doing sub-pixel layout, you may be chasing a wisp, because the sub-pixel a...
**Short answer:** No. It is NOT possible/documented. And even if determined experimentally, it is NOT guaranteed to remain the same in future. **Long answer:** At sub-pixel accuracies, there is a lot of variance among Browsers/OS/HW about how the input is captured/rendered. With h/w acceleration being enabled...
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
you are comparing the pointer value, which is different you need to use [`strcmp`](http://en.cppreference.com/w/cpp/string/byte/strcmp) to compare c string. or use [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) ``` if (strcmp(val, file_data) == 0) { cout<<"Matched"<<endl; } else { co...
The `==` test compares the addresses `val` and `file_data`. Instead of `==`, to compare the contents of the character arrays use the function `strcmp()`.
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
you are comparing the pointer value, which is different you need to use [`strcmp`](http://en.cppreference.com/w/cpp/string/byte/strcmp) to compare c string. or use [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) ``` if (strcmp(val, file_data) == 0) { cout<<"Matched"<<endl; } else { co...
character arrays have no the comparision operator. So instead of comparing arrays theirself you are comparing addresses of first elements of the arrays.
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
you are comparing the pointer value, which is different you need to use [`strcmp`](http://en.cppreference.com/w/cpp/string/byte/strcmp) to compare c string. or use [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) ``` if (strcmp(val, file_data) == 0) { cout<<"Matched"<<endl; } else { co...
The given code, ``` char file_data[10]; std::ifstream file_read ("D:\\myfile.txt"); cout<<"Enter the number to search"<<endl; char val[10]; cin>>val; while(!file_read.eof()) { file_read>>file_data; cout<<file_data<<endl; } if (val == file_data) { cout<<"Matched"<<endl; } else { ...
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
you are comparing the pointer value, which is different you need to use [`strcmp`](http://en.cppreference.com/w/cpp/string/byte/strcmp) to compare c string. or use [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) ``` if (strcmp(val, file_data) == 0) { cout<<"Matched"<<endl; } else { co...
The == operator will simply compare the address. You will need to use strcmp function.
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
The `==` test compares the addresses `val` and `file_data`. Instead of `==`, to compare the contents of the character arrays use the function `strcmp()`.
character arrays have no the comparision operator. So instead of comparing arrays theirself you are comparing addresses of first elements of the arrays.
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
The given code, ``` char file_data[10]; std::ifstream file_read ("D:\\myfile.txt"); cout<<"Enter the number to search"<<endl; char val[10]; cin>>val; while(!file_read.eof()) { file_read>>file_data; cout<<file_data<<endl; } if (val == file_data) { cout<<"Matched"<<endl; } else { ...
character arrays have no the comparision operator. So instead of comparing arrays theirself you are comparing addresses of first elements of the arrays.
20,459,074
I want to know that, How offset works in WPF in GradientStop ``` <Grid.Background> <LinearGradientBrush> <GradientStopCollection> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="Red" Offset="1" /> </GradientStopCollection> </Linear...
2013/12/08
[ "https://Stackoverflow.com/questions/20459074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2875566/" ]
The == operator will simply compare the address. You will need to use strcmp function.
character arrays have no the comparision operator. So instead of comparing arrays theirself you are comparing addresses of first elements of the arrays.
20,275,467
Hi everybody my problem is the following: I want to write a testunit for a class i have written. For this I have the following Junit code: ``` 1 package ts; 2 import ts.TransitionSystem; 3 import ts.ConcreteTransitionSystem; 4 import java.util.Set; 5 import java.util.HashSet; 6 import java.util.HashMap; ...
2013/11/28
[ "https://Stackoverflow.com/questions/20275467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2251084/" ]
It's basic member scoping. ConcreteTransitionSystem.\_initialStates and \_states are default or package level visibility. If you want to access them in this fashion, you could make them public or add getters (I'd recommend the latter). More here <http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html>
Because the compiler thinks the variable ts has the type "TransitionSystem". You can change the code to: ``` ConcreteTransitionSystem ts = new ConcreteTransitionSystem(); ```
20,275,467
Hi everybody my problem is the following: I want to write a testunit for a class i have written. For this I have the following Junit code: ``` 1 package ts; 2 import ts.TransitionSystem; 3 import ts.ConcreteTransitionSystem; 4 import java.util.Set; 5 import java.util.HashSet; 6 import java.util.HashMap; ...
2013/11/28
[ "https://Stackoverflow.com/questions/20275467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2251084/" ]
Your initial problem is, that you attempt to access the classes internal variables via the `TransitionSystem` interface - you will of course have only access to the methods (and possibly constants) defined in your interface. This is really a good thing, as it separates the public contract (the interface) from the imple...
Because the compiler thinks the variable ts has the type "TransitionSystem". You can change the code to: ``` ConcreteTransitionSystem ts = new ConcreteTransitionSystem(); ```
57,849,569
I have a React component named "Badge" returning some Text that is styled bold. ``` render() { return ( <div> <Text weight={'bold'}> {this.props.label} </Text> </div> ) ``` Now, I use "Badge" in another component named "Card".   Because in Badge component all Text is styled bold, the whole sentence i...
2019/09/09
[ "https://Stackoverflow.com/questions/57849569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9209492/" ]
If you want to pass the `text` with `html` tag then you have to pass all the text/tags in `html` form. Check below code. ``` import React, { Component } from 'react'; import ReactDOM,{ render } from 'react-dom'; import Badge from './Badge'; import './style.css'; class App extends React.Component { render() { re...
The more appropriate system is take label value as badge's children. to declare Badge component code like this example: ``` const Badge = props => { return ( <div className={`badge-class`}> <Text weight={'bold'}> {props.children} </Text> </div> ) } ``` and now...
24,170,402
We have run into a strange bug that we're having problems debugging. We have a MDI workspace that uses Microsoft CAB, DevExpress components, and .Net 3.5. If users open two windows in the workspace that each contain a `UserControl` bound to two separate data models, then minimize both of them, the first window to mi...
2014/06/11
[ "https://Stackoverflow.com/questions/24170402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/302677/" ]
I don't know the internal workings the WinForm widget, but it seems that since you've encountered an issue with **overriding** equals that you'd be better off **working around**. **If you need to evaluate equality for your own purposes:** An approach is to provide your own method to evaluate equality, rather than ch...
`BindingContext` object are not sharing its fields and properties with any other `BindingContext` because its fields and properties are not static. But, it is possible to have one `BindingContext` object for several controls. In the first case if several controls have the same parent and have not their own `Bindin...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
For future solution-searchers having the same or similar problem... I had the same (or similar) problem with my little asp web app. But used this solution, which worked instantly: > > The solution for me was to install the “Static Content” support for IIS. > > > 1. Go to “Turn Windows features on or off” > 2. Selec...
For me, the issue was with this part of my web.config: ``` <authentication mode="Forms"> <forms timeout="2880" loginUrl="/Home?expired=true" requireSSL="false" protection="All" cookieless="UseCookies" /> </authentication> ``` I had to change requireSSL from true to false when running under loca...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
In my case, I had the `<staticContent>` tag in the `web.config` file. I had to comment it, run the project (then all css, js, images loaded), uncomment it and run the project again, somehow it worked...
I forgot the permissions. <https://serverfault.com/a/260778/30695> Had to add `IIS_IUSRS` with read permissions.
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
In addition to Authentication and all the other issues mentioned above, check your web application's Handler Mappings in IIS. The culprit could be a catch-all \* handler hijacking your .css and .js requests. In my case I recently installed ColdFusion on one of our servers and that added managed handlers to IIS making...
For me, the issue was with this part of my web.config: ``` <authentication mode="Forms"> <forms timeout="2880" loginUrl="/Home?expired=true" requireSSL="false" protection="All" cookieless="UseCookies" /> </authentication> ``` I had to change requireSSL from true to false when running under loca...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
For future solution-searchers having the same or similar problem... I had the same (or similar) problem with my little asp web app. But used this solution, which worked instantly: > > The solution for me was to install the “Static Content” support for IIS. > > > 1. Go to “Turn Windows features on or off” > 2. Selec...
I forgot the permissions. <https://serverfault.com/a/260778/30695> Had to add `IIS_IUSRS` with read permissions.
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
Okay here's what I did to resolve my issue. 1. Since my app files are in a file share the Anonymous user account couldn't access them. This is because by default IUSR account is used for Anoymous user. In IIS->Site->Authentication set Anonymous Authentication to Application Pool Identity if you have created a custom a...
In addition to Authentication and all the other issues mentioned above, check your web application's Handler Mappings in IIS. The culprit could be a catch-all \* handler hijacking your .css and .js requests. In my case I recently installed ColdFusion on one of our servers and that added managed handlers to IIS making...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
For future solution-searchers having the same or similar problem... I had the same (or similar) problem with my little asp web app. But used this solution, which worked instantly: > > The solution for me was to install the “Static Content” support for IIS. > > > 1. Go to “Turn Windows features on or off” > 2. Selec...
In addition to Authentication and all the other issues mentioned above, check your web application's Handler Mappings in IIS. The culprit could be a catch-all \* handler hijacking your .css and .js requests. In my case I recently installed ColdFusion on one of our servers and that added managed handlers to IIS making...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
In my case, I had the `<staticContent>` tag in the `web.config` file. I had to comment it, run the project (then all css, js, images loaded), uncomment it and run the project again, somehow it worked...
For me, the issue was with this part of my web.config: ``` <authentication mode="Forms"> <forms timeout="2880" loginUrl="/Home?expired=true" requireSSL="false" protection="All" cookieless="UseCookies" /> </authentication> ``` I had to change requireSSL from true to false when running under loca...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
Okay here's what I did to resolve my issue. 1. Since my app files are in a file share the Anonymous user account couldn't access them. This is because by default IUSR account is used for Anoymous user. In IIS->Site->Authentication set Anonymous Authentication to Application Pool Identity if you have created a custom a...
In my case, I had the `<staticContent>` tag in the `web.config` file. I had to comment it, run the project (then all css, js, images loaded), uncomment it and run the project again, somehow it worked...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
Okay here's what I did to resolve my issue. 1. Since my app files are in a file share the Anonymous user account couldn't access them. This is because by default IUSR account is used for Anoymous user. In IIS->Site->Authentication set Anonymous Authentication to Application Pool Identity if you have created a custom a...
For me, the issue was with this part of my web.config: ``` <authentication mode="Forms"> <forms timeout="2880" loginUrl="/Home?expired=true" requireSSL="false" protection="All" cookieless="UseCookies" /> </authentication> ``` I had to change requireSSL from true to false when running under loca...
3,771,831
I have 2 Windows 2008 R2 x64 servers NLB, ARR with shared configuration. I have the application files in a network share. ASP.net pages (.aspx) come up fine but no css,images,js work. I also have a .htm file shows css and images just fine. In the iis log I do see a 401.3 message. So it seems to be permissions but not ...
2010/09/22
[ "https://Stackoverflow.com/questions/3771831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/331884/" ]
Okay here's what I did to resolve my issue. 1. Since my app files are in a file share the Anonymous user account couldn't access them. This is because by default IUSR account is used for Anoymous user. In IIS->Site->Authentication set Anonymous Authentication to Application Pool Identity if you have created a custom a...
For future solution-searchers having the same or similar problem... I had the same (or similar) problem with my little asp web app. But used this solution, which worked instantly: > > The solution for me was to install the “Static Content” support for IIS. > > > 1. Go to “Turn Windows features on or off” > 2. Selec...
50,180,144
I have a question regarding recursive/cumulative addition of a particular column for example: Click on example How do I write this in SAS code which generates cumalitive addition with respect to column. Please help me with this. Thank you in Advance [Example](https://i.stack.imgur.com/N68Lp.png)
2018/05/04
[ "https://Stackoverflow.com/questions/50180144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7222586/" ]
use sum statement ``` data have; input val; datalines; 1 2 3 ; data want; set have; newval+val; run; ```
Using `Retain` functionality. You can reuse the code below as basis for any iterative/cumulative calculations. ``` data have; input A; datalines; 1 2 3 ; run; data want; set have; Retain B; /* If condition to initialize B only once, _N_ is the current row number */ if _N_= 1 then B=0; B=B+A; /* p...
33,931,201
I am looking for a simplest way to parse disks in zpool. A list of disks in space separated format. For example below output shows zpool information. Is there any command to get list of physical disks only? ``` # zpool status pool pool: pool state: ONLINE scan: none requested config: ...
2015/11/26
[ "https://Stackoverflow.com/questions/33931201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/934363/" ]
This should work although it might need some fixes for complex `zpool status` output : ``` # cat parsezs awk ' NF != 5 {next} $1 == "NAME" {getline;show=1;next} $1 ~ "mirror" {next} $1 ~ "raidz" {next} $1 ~ "replacing" {next} $1 ~ "error" {next} show == 1 {printf("%s ",$1)} END {printf("\n")}' # zpool ...
This will also work and shows you the pool name too. Note that you need `nawk`, which is a more modern version of Awk on Solaris: ``` zpool status | nawk 'BEGIN{Disp=0}{if($1=="pool:") {if(Disp!=0) print ""; else Disp = 1; printf("%s ",$2)} ; if($1~"^c[0-9]") printf("%s ",$1)}END{print ""}' ``` The `Disp` variable ...
18,496,011
I have a main activity which is showing/hiding a bunch of fragments. There is a login activity at the very start that logs the user in. When the user presses home or the multi-tasking button, the app should start a timer that (after the timer runs out) automatically logs the user out. This could be when the user return...
2013/08/28
[ "https://Stackoverflow.com/questions/18496011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1191353/" ]
Please have a look at this **tutorial** about the Fragment-Lifecycle: > > <http://developer.android.com/reference/android/app/Fragment.html#Lifecycle> > > > It explains the lifecycle of the Fragment with respect to its **Activity**. When the user presses the **home-button** for example: **onPause()** - fragment...
The methods called on the fragment's lifecycle are the same that the activity's. You can check the complete set of methods that are called right here: [Fragments](http://developer.android.com/guide/components/fragments.html)
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
### Simpler implementation You don't need `naturals` at all, and `offset` either. You could make the outer loop iterate over the `range(start, end)`, and for each value check if it can be divided by any one of `nums`, and add to the sum. ``` msum = 0 for i in range(start, end): for num in nums: if i % num...
One big problem I see with your code is that you're using `range` to construct a data structure with the entire range of possible numbers in it. This could lead to huge memory requirements if `start` is far from `end`. A better choice would be to put the multiples you've already used into a `dict` ([dictionary](https:/...
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
If there are \$m\$ numbers in `multiple` and \$n\$ numbers in the range from `start` to `end`, then the function in the original post takes \$O(mn)\$. There's an alternative algorithm, using the [inclusion–exclusion principle](http://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle), that takes \$O(m2^m)\$, ...
One big problem I see with your code is that you're using `range` to construct a data structure with the entire range of possible numbers in it. This could lead to huge memory requirements if `start` is far from `end`. A better choice would be to put the multiples you've already used into a `dict` ([dictionary](https:/...
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
One big problem I see with your code is that you're using `range` to construct a data structure with the entire range of possible numbers in it. This could lead to huge memory requirements if `start` is far from `end`. A better choice would be to put the multiples you've already used into a `dict` ([dictionary](https:/...
I would suggest a simpler solution because Python is 'battery-included': ``` def multiple_sum(start, end, step): return sum(range(start + (start % step), end, step)) ``` This makes use of (fast) built-ins and reads like pseudocode.
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
### Simpler implementation You don't need `naturals` at all, and `offset` either. You could make the outer loop iterate over the `range(start, end)`, and for each value check if it can be divided by any one of `nums`, and add to the sum. ``` msum = 0 for i in range(start, end): for num in nums: if i % num...
If there are \$m\$ numbers in `multiple` and \$n\$ numbers in the range from `start` to `end`, then the function in the original post takes \$O(mn)\$. There's an alternative algorithm, using the [inclusion–exclusion principle](http://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle), that takes \$O(m2^m)\$, ...
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
### Simpler implementation You don't need `naturals` at all, and `offset` either. You could make the outer loop iterate over the `range(start, end)`, and for each value check if it can be divided by any one of `nums`, and add to the sum. ``` msum = 0 for i in range(start, end): for num in nums: if i % num...
I would suggest a simpler solution because Python is 'battery-included': ``` def multiple_sum(start, end, step): return sum(range(start + (start % step), end, step)) ``` This makes use of (fast) built-ins and reads like pseudocode.
92,619
[Project Euler problem 1](https://projecteuler.net/problem=1) says: > > Find the sum of all the multiples of 3 or 5 below 1000. > > > I have written a program that will return the sum of the multiples of *any* list of positive integers. So for example if I wanted to know the sum of every integer that was a multip...
2015/06/04
[ "https://codereview.stackexchange.com/questions/92619", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/57863/" ]
If there are \$m\$ numbers in `multiple` and \$n\$ numbers in the range from `start` to `end`, then the function in the original post takes \$O(mn)\$. There's an alternative algorithm, using the [inclusion–exclusion principle](http://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle), that takes \$O(m2^m)\$, ...
I would suggest a simpler solution because Python is 'battery-included': ``` def multiple_sum(start, end, step): return sum(range(start + (start % step), end, step)) ``` This makes use of (fast) built-ins and reads like pseudocode.
4,773,982
I've got a sample code from MSDN and I've found code syntax I've never seen before: ``` namespace Mvc3RemoteVal.Controllers { public class HomeController : Controller { IUserDB _repository; #if InMemDB public HomeController() : this(InMemoryDB.Instance) { } #else ...
2011/01/23
[ "https://Stackoverflow.com/questions/4773982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257234/" ]
Those are called [preprocessor directives](http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx) and exist since .NET 1.0. They allow you to define different compilation directives such as `InMemDB` and the compiler will evaluate or not the block if this variable has been defined. The documentation of the [#if directi...
These are not new features for Framework 4 this are features you can use for development stage and testing: you can declare: ``` #Define something ``` and then ``` #if something ``` all the code that is in that "if" will be executed. all the code that isn't, won't.
12,937,977
Is latest spring 3 framework compatible with apache tomcat application server - version 6.0.14? Also can what is the best version of hibernate i can use along with latest version of spring. Is it fine to use configuration xml file in the spring 3 application setup instead of @configuration annotation in the code ? ...
2012/10/17
[ "https://Stackoverflow.com/questions/12937977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1197338/" ]
Yes - Spring 3 will work fine with version 6.0.14 of Tomcat. hibernate 4.1.7 should work fine. Yes you can use an XML configuration rather than annotations, I've used both in Spring an Tomcat an it works fine. To be honest, I find I prefer the annotations simply by the fact the XML tends to erode quite quickly and is...
*spring 3 framework compatible with apache tomcat 6* **yes.** *best version of hibernate* **4, the latest and greatest.** *Is it fine to use configuration xml file* **yes** (tomcat is not a full blown application server btw, that would be jboss glassfish et al)
24,638,834
I'm trying to run some tests, seven to be specific, I've created my xml file and all and it works correctly, my test file has a package which has the seven tests in it, so the thing is, when the xml file is executed it opens a new browser window for each test (in case you were wondering, I do have the driver quit and c...
2014/07/08
[ "https://Stackoverflow.com/questions/24638834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3010145/" ]
Instead of `@AfterTest` and `@BeforeTest` use `@BeforeSuite` and `@AfterSuite` Create a BaseTest class containing @BeforeSuite and @AfterSuite. ``` public class BaseTest{ static WebDriver driver; @BeforeSuite public void start() { driver = new FFDriver(); driver.get(url); } @After...
As far as I understand, if you say you want "to get is to close each browser after each test is finished", you need to use @AfterMethod and @BeforeMethod. This would ensure that after every @Test runs, the browser gets closed. With @AfterTest, this would happen just once - note Test in @AfterTest maps to `<test>` in ...
47,090
Consider a rectangular cross sectional beam for instance with dimensions a = 1 mm and b = 1 mm, fixed at one end and transverse force at the other. I will get the maximum stress at the farthest away point from the neutral axis. Now, if I decrease the dimensions to a = 0.5 mm and b = 0.5 mm, then we know that the maximu...
2021/09/10
[ "https://engineering.stackexchange.com/questions/47090", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/30547/" ]
It is actually more complicated than that. * the magnitude of the stress increases 8 fold * the tensile forces increase so that they generate the counteracting bending moment. --- When you decrease the cross-section from 1mm x 1mm to 0.5mm x 0.5m, the cross-sectional area decreases to 1/4 of the original but * the ...
Section properties in a fluxural member play a dual role as opposed to members in simple tension or compression. in a tension member stress increases jist because there are less fibers to share the load. But in a beam's reduction in section has dual effect of rediucing the second area moment which weakens the beam's ...
50,626,223
i am fairly new to React and this is my first project with Redux. I get some data and set it in the state-tree. When my reducer `ADD_PRODUCTS_TO_CART` runs, my `Products->render()` runs, but `Product->render()` does not, despite having a key. Here is a gist, it was the most basic i could boil it down to. Hope it ma...
2018/05/31
[ "https://Stackoverflow.com/questions/50626223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7744500/" ]
In `render` function of `Product` you got: ``` if (data.Variations) { //TODO: Variation logic return false; } ``` Because in `data` you got `Variations` param, it goes through this scope (beacause `Variations` is not `null` or `undefined`) and returns null instead of rendering component. remove `return false` a...
Like @kiarashws said, whenever you `return false` in your `render()` method, it doesn't render. Make sure to not render only when you don't want to. Is commonly see code like this: ``` render() { if (props.shouldNotRender) return null or false; return <div> ... </div> } ```
28,507,978
I want to format my output of a Java program so that I can see "how deep" the recursion is. How to do it? It is really important not to get lost in my recursion tree. Example output (trivial recursion function for counting the nth number from 0): ``` This is the first recursive call. Input value: 3. This is the s...
2015/02/13
[ "https://Stackoverflow.com/questions/28507978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280359/" ]
You can use a variable (like `level`) that represents how deep you are. It starts at 1 and it increments at each recursive call. ``` public static void main(String[] args) { function(3, 1); } public static String function(int input, int level) { String tab = ""; for (int i = 0; i < level - 1; i++) { ...
Well, if you're using System.out.println, than you should be able to use "\tThis is the..." to indent the line on most java output windows. I don't understand if this is what you're asking for though. If you don't know which recursion you're in, than you'd have to crawl Thread.currentThread().getStackTrace(). ``` Str...
28,507,978
I want to format my output of a Java program so that I can see "how deep" the recursion is. How to do it? It is really important not to get lost in my recursion tree. Example output (trivial recursion function for counting the nth number from 0): ``` This is the first recursive call. Input value: 3. This is the s...
2015/02/13
[ "https://Stackoverflow.com/questions/28507978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4280359/" ]
You can use a variable (like `level`) that represents how deep you are. It starts at 1 and it increments at each recursive call. ``` public static void main(String[] args) { function(3, 1); } public static String function(int input, int level) { String tab = ""; for (int i = 0; i < level - 1; i++) { ...
In your output function include a prefix string argument. Every time you call your function pass in prefix + " ". Example: ``` public void output(String prefix){ // Whenever you print, start with prefix System.out.println(prefix + ...); // When you call your recursive method String childPrefix = prefix+" ...
44,533,925
I'm trying to switch from MacVim to VSCode and I use [VSCode Vim](https://github.com/VSCodeVim/Vim) extension. The most annoying thing I found so far is: if I search with `/` command - I can't disable a highlighting of search results. Could you pls help me to find a way how to hide search result highlighting after I'...
2017/06/14
[ "https://Stackoverflow.com/questions/44533925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797346/" ]
I've found an answer: in `settings.json` ``` "vim.normalModeKeyBindingsNonRecursive": [ { "before":["<C-n>"], "after":[], "commands": [ { "command": ":nohl" } ] } ] ```
Alternately, you can also just set `vim.hlsearch` to false.
44,533,925
I'm trying to switch from MacVim to VSCode and I use [VSCode Vim](https://github.com/VSCodeVim/Vim) extension. The most annoying thing I found so far is: if I search with `/` command - I can't disable a highlighting of search results. Could you pls help me to find a way how to hide search result highlighting after I'...
2017/06/14
[ "https://Stackoverflow.com/questions/44533925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797346/" ]
I've found an answer: in `settings.json` ``` "vim.normalModeKeyBindingsNonRecursive": [ { "before":["<C-n>"], "after":[], "commands": [ { "command": ":nohl" } ] } ] ```
You can also just bind it to escape, which isn't bound to anything in normal mode. ``` "vim.normalModeKeyBindingsNonRecursive": [ { "before": [ "<Esc>" ], "commands": [ ":nohl" ], } ] ```
44,533,925
I'm trying to switch from MacVim to VSCode and I use [VSCode Vim](https://github.com/VSCodeVim/Vim) extension. The most annoying thing I found so far is: if I search with `/` command - I can't disable a highlighting of search results. Could you pls help me to find a way how to hide search result highlighting after I'...
2017/06/14
[ "https://Stackoverflow.com/questions/44533925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797346/" ]
Alternately, you can also just set `vim.hlsearch` to false.
You can also just bind it to escape, which isn't bound to anything in normal mode. ``` "vim.normalModeKeyBindingsNonRecursive": [ { "before": [ "<Esc>" ], "commands": [ ":nohl" ], } ] ```
42,254,095
I have 2 entities in which totally 12 properties are there of 3 variations of min, max and average of some particular type of fields. Hence I refactored the 2 entities into 3 entities making the 3rd entity as 'Values' which contains 3 properties i.e min, max and average. And reduced the 12 properties into 4 relationshi...
2017/02/15
[ "https://Stackoverflow.com/questions/42254095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3113797/" ]
Based on your description, I would undo the refactoring and go back to using properties instead of relationships. You're adding complexity for no real benefit, and the `Values` entity is (as you're finding) too generic to really be useful or meaningful. This refactoring isn't serving any useful purpose; don't fix it, r...
You should look into [Weak Relationships (Fetched Properties)](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreData/HowManagedObjectsarerelated.html#//apple_ref/doc/uid/TP40001075-CH17-SW13) for how to manage relationships correctly and the solution for your error code. > > Most object ...
9,418,499
Lets say a table like this (just for illustration): ``` KEY VALUE 1 A 2 A 3 B 4 C 5 A 6 B 7 C 8 A 9 C ``` I need a **SINGLE SQL** to get the key of the 3th (or less) occurrence for EACH value? ``` VALUE KEY A 5 (more than 3 occurrences,...
2012/02/23
[ "https://Stackoverflow.com/questions/9418499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112670/" ]
I suspect there is a simpler way to write this without needing 3 layers of nesting. But this should work. ``` SQL> ed Wrote file afiedt.buf 1 with x as ( 2 select 1 key, 'A' val from dual union all 3 select 2, 'A' from dual union all 4 select 3, 'B' from dual union all 5 select 4, 'C' from dual...
``` SELECT t1.Value, t1."KEY" FROM (SELECT ROW_NUMBER() OVER (PARTITION BY Value ORDER BY "KEY") AS RowNumber, "KEY", Value FROM MyTable) t1 LEFT JOIN (SELECT ROW_NUMBER() OVER (PARTITION BY Value ORDER BY "KEY") AS RowNumber, "KEY", Value FROM MyTable) t2 ON t2.Value =...
9,950,449
I have an issue where I'm using the Nivo jQuery slider on a HTTPS: site and its javascript seems to be throwing a mixed content error in IE 8. I currently have a forum post up in the Dev7 Studios forum with no response yet. And I've googled for a couple of days on the IE 8 mixed content error. So far, I haven't found...
2012/03/30
[ "https://Stackoverflow.com/questions/9950449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1195158/" ]
I ran into the same problem, and have traced it to a bug in IE8. The comments on this page led me to a solution: <http://blogs.msdn.com/b/ieinternals/archive/2009/06/22/https-mixed-content-in-ie8.aspx> This MS dev says: > > Fascinating. This is a race condition. > > > The debugger reports that the following is th...
I was having same issue. In the header section I changed the src from `http://"mysite"/jquery.nivo.slider.pack.js` to just `/jquery.nivo.slider.pack.js` and worked.
37,132,999
I want sql query for update a record. For example there are 3 columns in my table - Name , Address, Email and when I update any one column other columns value should be null without set null to them. Like ``` Update tbl_Student set Name = 'XYZ' where id = 1 ``` In above case only Name column should update and oth...
2016/05/10
[ "https://Stackoverflow.com/questions/37132999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4767485/" ]
Wrapping the $scope.broadcast(); call inside a $scope.$evalAsync works for me: ``` myApp.controller('FirstController', function ($scope, $rootScope) { $scope.myInput = 'Initial data'; $scope.broadcast = function() { console.log ('broadcasting: ' + $scope.myInput); $rootScope.$broadcast('myEvent', $scope.m...
basically the listeners is not ready and myEvent broadcast already so first you should emit the event to controller "FirstController" and then broadcast to the "SecondController" then it will work. Here is the fiddle ``` var myApp = angular.module('myApp',[]); myApp.controller('FirstController', function ($scope, $r...
57,660,213
I need to do something quit simple - I would like to do a one time http request to a static data - I would like to do it either when the application starts or as "lazy-loading", when needed. I would like to send the http request one time and set a variable (member -> property) with the returning results, so I can use t...
2019/08/26
[ "https://Stackoverflow.com/questions/57660213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6721134/" ]
What I would do is take the best of Observable: ```js @Injectable({providedIn: 'root'}) export class LutData { _someData : somedataType[] = null; constructor(private lutService : LutService){} //The service is a simple http service public someData() : Observable<somedataType[]> { if (th...
Store data in a service is very good way of making data available for all the components and also maintain the consistency. But calling the http request whenever your project is start or app is render on the device, depend on the use case. It's good, If you need updated data at least once whenever user land on your p...
32,566,682
how can I set radio button checked by default in Weebly using html and css? I'am trying to do something like this: ``` .wsite-form-radio-container input { checked: "checked"; } ```
2015/09/14
[ "https://Stackoverflow.com/questions/32566682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5252142/" ]
I don't know what the options are in Weebly, but for the default check you could **use only HTML**. ``` <input type="radio" checked>Blue<br> <input type="radio">Red ``` Notice that I added `checked` to the blue one. This makes it checked by default. To style a checked radio button you could **use CSS**. ``` input:...
Just add 'checked' to the input tag like this: `<input type="radio" checked>`
12,599,477
The following code causes null-pointer exception during execution. It just said null pointer exception. When I put the hotItem class outside of the function, it works without any problem. Once I put it into the function, it will cause null pointer exception. I just want to know why this would happen and what is the ...
2012/09/26
[ "https://Stackoverflow.com/questions/12599477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1699903/" ]
Use a view model that is adapted to the requirements of your view: ``` public class PriceViewModel { public int[] SelectedPriceIds { get; set; } public IEnumerable<SelectListItem> Prices { get; set; } } ``` A ListBoxFor requires 2 properties on your view model: 1. A collection property of a primitive type (...
i can select multiple value in your listbox so i will suggest to do this in another type you can use like this below.... you use this js file.. ``` <script type="text/javascript" src="@Url.Content("~/jquery-1.6.4.min.js")"></script> <script type="text/javascript" src="@Url.Content("~/chosen.jquery.js")"></scr...
56,281,212
My `JFrame` for my program opens up extremely small, I have looked at a couple similar problems and fixes but none have worked so far... [![](https://i.imgur.com/bqqQmfd.png)](https://i.imgur.com/bqqQmfd.png) I am completely stumped with this, usually when I use the jframes it never does this, have I forgotten someth...
2019/05/23
[ "https://Stackoverflow.com/questions/56281212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try this put this code in your `initComponents()`: ``` this.setVisible(true); this.getContentPane().setSize(400, 400); ``` Or this: ``` this.setPreferredSize(new Dimension(400, 300)); this.pack(); this.setLocationRelativeTo(null); this.setVisible(true); ``` I think that the order matters in this case
In `initComponents()` method write: ``` setSize(400, 400); setVisible(true);//call at the end of initiComponents method ``` then adjust size to your liking. You may also use `setPreferredSize`, `setMinimumSize`, `setMaximumSize` methods or `setExtendedState` to get full screen window. Example of full screen mode: ...
17,079,816
I have two check boxes in a page.If one check all check box is clicked, the other's check boxes are also enabled with the selected box. **jQuery** ``` $("#box_all").click(function () { $('td input[type=checkbox]').attr('checked', this.checked); }); $("#book_all").click(function () { $('td input[type=checkbox]')...
2013/06/13
[ "https://Stackoverflow.com/questions/17079816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289720/" ]
i dont know where you put yours css file sow this are things that have to work ``` 1- <link href="..css/main.css" rel="stylesheet" type="text/css" /> 2- <link href="/css/main.css" rel="stylesheet" type="text/css" /> 3-<link href="../css/main.css" rel="stylesheet" type="text/css" /> ``` if no one of them work there i...
Try this [I assuming css folder on root directory, css file path might be not correct.] ``` <link href="~/css/main.css" rel="stylesheet" type="text/css" /> ``` instead of ``` <link href="css/main.css" rel="stylesheet" type="text/css" /> ``` and place `<!DOCTYPE` before `<html>` tag.
17,079,816
I have two check boxes in a page.If one check all check box is clicked, the other's check boxes are also enabled with the selected box. **jQuery** ``` $("#box_all").click(function () { $('td input[type=checkbox]').attr('checked', this.checked); }); $("#book_all").click(function () { $('td input[type=checkbox]')...
2013/06/13
[ "https://Stackoverflow.com/questions/17079816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289720/" ]
When linking to stylesheets in your masterpage, its always good to use the asp.net link instead of html link. This ensures that asp.net will resolve the paths from your root directory. All that you need to do for this is add the attribute `runat="server"`. ``` <link href="~/css/main.css" rel="stylesheet" type="text/cs...
Try this [I assuming css folder on root directory, css file path might be not correct.] ``` <link href="~/css/main.css" rel="stylesheet" type="text/css" /> ``` instead of ``` <link href="css/main.css" rel="stylesheet" type="text/css" /> ``` and place `<!DOCTYPE` before `<html>` tag.
17,079,816
I have two check boxes in a page.If one check all check box is clicked, the other's check boxes are also enabled with the selected box. **jQuery** ``` $("#box_all").click(function () { $('td input[type=checkbox]').attr('checked', this.checked); }); $("#book_all").click(function () { $('td input[type=checkbox]')...
2013/06/13
[ "https://Stackoverflow.com/questions/17079816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289720/" ]
i dont know where you put yours css file sow this are things that have to work ``` 1- <link href="..css/main.css" rel="stylesheet" type="text/css" /> 2- <link href="/css/main.css" rel="stylesheet" type="text/css" /> 3-<link href="../css/main.css" rel="stylesheet" type="text/css" /> ``` if no one of them work there i...
Your code seems have no error. Only possibility that i can assume is issue in the paths. Use one the following depending on your stylesheet location: ``` / -Site root ~/ -Root directory of the application ``` try adding: ``` runat="server" ``` in your path as well. Good luck!
17,079,816
I have two check boxes in a page.If one check all check box is clicked, the other's check boxes are also enabled with the selected box. **jQuery** ``` $("#box_all").click(function () { $('td input[type=checkbox]').attr('checked', this.checked); }); $("#book_all").click(function () { $('td input[type=checkbox]')...
2013/06/13
[ "https://Stackoverflow.com/questions/17079816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289720/" ]
When linking to stylesheets in your masterpage, its always good to use the asp.net link instead of html link. This ensures that asp.net will resolve the paths from your root directory. All that you need to do for this is add the attribute `runat="server"`. ``` <link href="~/css/main.css" rel="stylesheet" type="text/cs...
Your code seems have no error. Only possibility that i can assume is issue in the paths. Use one the following depending on your stylesheet location: ``` / -Site root ~/ -Root directory of the application ``` try adding: ``` runat="server" ``` in your path as well. Good luck!
362,244
Let us consider the following function $$F(x) = \sum\_i \frac{a\_i}{x - y\_i}$$ Is it possible to simplify $F(x)$ so that the repeated sum for each value of $x$ can be avoided ?
2013/04/15
[ "https://math.stackexchange.com/questions/362244", "https://math.stackexchange.com", "https://math.stackexchange.com/users/72657/" ]
It is "well-known" that every complex value of the Weierstrass function appears exactly two times (including multiplicities) inside the fundamental parallelogram. Further, this function is even. Therefore the set of solutions consists of two parts: \begin{align} nz=z\;\mathrm{mod}\;\Lambda,\qquad nz=-z\;\mathrm{mod}\;\...
Does this work? Write \begin{eqnarray\*} \wp (z) &=& \dfrac{1}{z^2} + \sum\_{k=1}^m(2k+1)S\_{2k+2}z^{2k}\\ \wp(nz) &=& \dfrac{1}{(nz)^2} + \sum\_{k=1}^m(2k+1)S\_{2k+2}(nz)^{2k} \end{eqnarray\*} Then look at it term-by-term, \begin{eqnarray\*} \dfrac{1}{z^2}=\dfrac{1}{(nz)^2} \Rightarrow (nz)^2-z^2=0\Rightarrow (n+1)z...
28,297,304
I am developing a RESTful Android app using SyncAdapter. I have watched some screencasts and read some tutorials, but they only address basic dynamics. Before starting to write the code, I would like to try and receive feedback from expert users about concurrency issues. Step 1. The user `U` inserts a new entry `E` in...
2015/02/03
[ "https://Stackoverflow.com/questions/28297304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774133/" ]
Since you are using fadeOut(), the `user-result` element is hidden when the second notification comes. So ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); $("#user-result").html(data).show().delay( 2500 ).fadeOut( 800 ); ```
Yes, the problem with `fadeout` that hides message container. Before showing new message you have to show container back: ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); ```
28,297,304
I am developing a RESTful Android app using SyncAdapter. I have watched some screencasts and read some tutorials, but they only address basic dynamics. Before starting to write the code, I would like to try and receive feedback from expert users about concurrency issues. Step 1. The user `U` inserts a new entry `E` in...
2015/02/03
[ "https://Stackoverflow.com/questions/28297304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774133/" ]
Since you are using fadeOut(), the `user-result` element is hidden when the second notification comes. So ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); $("#user-result").html(data).show().delay( 2500 ).fadeOut( 800 ); ```
once any element fadeout, it wont appear until page reloaded or fadeIn() ``` if(data == 1){ $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").fadeIn("slow"); setTimeout( function() ...
28,297,304
I am developing a RESTful Android app using SyncAdapter. I have watched some screencasts and read some tutorials, but they only address basic dynamics. Before starting to write the code, I would like to try and receive feedback from expert users about concurrency issues. Step 1. The user `U` inserts a new entry `E` in...
2015/02/03
[ "https://Stackoverflow.com/questions/28297304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774133/" ]
Since you are using fadeOut(), the `user-result` element is hidden when the second notification comes. So ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); $("#user-result").html(data).show().delay( 2500 ).fadeOut( 800 ); ```
You need to use setInterval(function(){}); in order to cycle each time.
28,297,304
I am developing a RESTful Android app using SyncAdapter. I have watched some screencasts and read some tutorials, but they only address basic dynamics. Before starting to write the code, I would like to try and receive feedback from expert users about concurrency issues. Step 1. The user `U` inserts a new entry `E` in...
2015/02/03
[ "https://Stackoverflow.com/questions/28297304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774133/" ]
Yes, the problem with `fadeout` that hides message container. Before showing new message you have to show container back: ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); ```
once any element fadeout, it wont appear until page reloaded or fadeIn() ``` if(data == 1){ $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").fadeIn("slow"); setTimeout( function() ...
28,297,304
I am developing a RESTful Android app using SyncAdapter. I have watched some screencasts and read some tutorials, but they only address basic dynamics. Before starting to write the code, I would like to try and receive feedback from expert users about concurrency issues. Step 1. The user `U` inserts a new entry `E` in...
2015/02/03
[ "https://Stackoverflow.com/questions/28297304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/774133/" ]
Yes, the problem with `fadeout` that hides message container. Before showing new message you have to show container back: ``` $("#user-result").html("<font color ='#006600'> Logged in | Redirecting..</font>").show(); ```
You need to use setInterval(function(){}); in order to cycle each time.
66,044,532
Amazon ECS supports two different types of health checks: * [Target Group health checks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) make a configurable network request * [Container health checks](https://aws.amazon.com/about-aws/whats-new/2018/03/amazon-ecs-supports-contai...
2021/02/04
[ "https://Stackoverflow.com/questions/66044532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2824722/" ]
The AWS documentation is somewhat vague on this topic, but does suggest a high degree of coupling between ALB & ECS when it comes to health checks. i.e. see the [documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html) for `healthCheckGracePeriodSeconds` and `m...
In my experience, either one will cause your container to be decommissioned. I would say you probably don't need the container health check if you have a target group performing the check.
15,904,800
I am working on a project which fetches the contact list and the user will be able to send an email. Any help or advice will be greatly appreciated. I know it can be done in phone-gap. Thanks in advance.
2013/04/09
[ "https://Stackoverflow.com/questions/15904800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2262166/" ]
Taking a function is easy... it's just like any other argument. ``` def example(somefunc): somefunc() example(someFunction) example(lambda x: x ** 2) ``` Returning one is a little trickier, but not much. You can return a lambda: ``` def example2(): return lambda x: x + 1 ``` Or you can build an inner funct...
math.sqrt(x) is NOT a (Python) function, math.sqrt is a function. Notice the missing (x). In the same vein, 1/(2 \* math.sqrt(x)) is not a function but (lambda x: 1/(2 \* math.sqrt(x))) is a function. The issue is that ``` a = lambda x: x ``` and ``` b = lambda x: x ``` will yield two different python function...
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
try this > > ### 1) Change the extension of your .apk to .zip > > > ### 2) Open and remove the folder META-INF > > > ### 3) Change the extension to .apk > > > ### 4) Use the jarsigner and zipalign with your new keystore. > > > hope it helps
Signing for release: $1.apk -> $1\_release.apk" GeneralMills&GoogleApps#2012 Step 1: Removing any previous signing Change the extension of your .apk to .zip Open and delete the folder META-INF Change the extension to .apk Or Command: • zip [originalapk] Example: • zip "$1".apk -d Step 2: Signing with release.keyst...
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
try this > > ### 1) Change the extension of your .apk to .zip > > > ### 2) Open and remove the folder META-INF > > > ### 3) Change the extension to .apk > > > ### 4) Use the jarsigner and zipalign with your new keystore. > > > hope it helps
Assuming your keys are stored in `keys.keystore`, you can run: ``` $ keytool -list -keystore keys.keystore Your keystore contains 1 entry your_key_alias, Jan 3, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 8C:C3:6A:DC:7E:B6:12:F1:4C:D5:EE:F1:AE:17:FB:90:89:73:50:53 ``` to determine the alias of your key....
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
If you are looking for a quick simple solution, you can use **Google's `apksigner` command line** tool which is available in revision 24.0.3 and higher. > > > ``` > apksigner sign --ks release.jks application.apk > > ``` > > You can find more information about apksigner tool, at the developer Android site. <ht...
All the solutions above work. Just a note why it didn't work for you when you re-zipped: Some of the files inside the .apk need to remain stored (compression at 0%). This is because Android will use memory mapping (mmap) to read the contents without unpacking into memory. Such files are .ogg and some of the icons.
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
Signing for release: $1.apk -> $1\_release.apk" GeneralMills&GoogleApps#2012 Step 1: Removing any previous signing Change the extension of your .apk to .zip Open and delete the folder META-INF Change the extension to .apk Or Command: • zip [originalapk] Example: • zip "$1".apk -d Step 2: Signing with release.keyst...
All the solutions above work. Just a note why it didn't work for you when you re-zipped: Some of the files inside the .apk need to remain stored (compression at 0%). This is because Android will use memory mapping (mmap) to read the contents without unpacking into memory. Such files are .ogg and some of the icons.
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
If you are looking for a quick simple solution, you can use **Google's `apksigner` command line** tool which is available in revision 24.0.3 and higher. > > > ``` > apksigner sign --ks release.jks application.apk > > ``` > > You can find more information about apksigner tool, at the developer Android site. <ht...
Note if you use [v2 signing schema](https://source.android.com/security/apksigning/v2.html) (which you will automatically if you use build-tools 24.0.3+ in AS) you cannot just remove the META-INF folder from the APK since v2 adds its signing data to a zip meta block. Google's [new apksigner](https://developer.android....
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
Note if you use [v2 signing schema](https://source.android.com/security/apksigning/v2.html) (which you will automatically if you use build-tools 24.0.3+ in AS) you cannot just remove the META-INF folder from the APK since v2 adds its signing data to a zip meta block. Google's [new apksigner](https://developer.android....
``` zip -d my_application.apk META-INF/\* keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name zipalign -v 4 your_project_name-unaligned.apk ...
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
Signing for release: $1.apk -> $1\_release.apk" GeneralMills&GoogleApps#2012 Step 1: Removing any previous signing Change the extension of your .apk to .zip Open and delete the folder META-INF Change the extension to .apk Or Command: • zip [originalapk] Example: • zip "$1".apk -d Step 2: Signing with release.keyst...
Assuming your keys are stored in `keys.keystore`, you can run: ``` $ keytool -list -keystore keys.keystore Your keystore contains 1 entry your_key_alias, Jan 3, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 8C:C3:6A:DC:7E:B6:12:F1:4C:D5:EE:F1:AE:17:FB:90:89:73:50:53 ``` to determine the alias of your key....
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
try this > > ### 1) Change the extension of your .apk to .zip > > > ### 2) Open and remove the folder META-INF > > > ### 3) Change the extension to .apk > > > ### 4) Use the jarsigner and zipalign with your new keystore. > > > hope it helps
``` zip -d my_application.apk META-INF/\* keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name zipalign -v 4 your_project_name-unaligned.apk ...
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
If you are looking for a quick simple solution, you can use **Google's `apksigner` command line** tool which is available in revision 24.0.3 and higher. > > > ``` > apksigner sign --ks release.jks application.apk > > ``` > > You can find more information about apksigner tool, at the developer Android site. <ht...
``` zip -d my_application.apk META-INF/\* keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name zipalign -v 4 your_project_name-unaligned.apk ...
3,267,216
If I have an apk can I remove the current signing and some how re-sign it with a different .keystore file and still have the application install? **Update**: I managed to get it to work with Jorgesys' solution and where I messed up before was that I unzipped the .apk then rezipped it after removing the META-INF folder...
2010/07/16
[ "https://Stackoverflow.com/questions/3267216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
If you are looking for a quick simple solution, you can use **Google's `apksigner` command line** tool which is available in revision 24.0.3 and higher. > > > ``` > apksigner sign --ks release.jks application.apk > > ``` > > You can find more information about apksigner tool, at the developer Android site. <ht...
Assuming your keys are stored in `keys.keystore`, you can run: ``` $ keytool -list -keystore keys.keystore Your keystore contains 1 entry your_key_alias, Jan 3, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 8C:C3:6A:DC:7E:B6:12:F1:4C:D5:EE:F1:AE:17:FB:90:89:73:50:53 ``` to determine the alias of your key....
1,397,496
A colleague at work has a Kingston 240GB SSD drive which has come out of a now dead computer. We want to be able to recover some data from it (no backups sadly) however the drive won't mount properly. I am using an Anker USB3 external HDD enclosure which I know to be working correctly. The drive has come from an Apple...
2019/01/23
[ "https://superuser.com/questions/1397496", "https://superuser.com", "https://superuser.com/users/244470/" ]
* Font size: 16 * Standard font, Serif font: *Times New Roman* * Sans-serif font: *Arial* * Fixed-width font: *Consolas*
You don't need to know the original fonts, here's how to do it: First, close Google Chrome, so your changes don't get overwritten. Go to your Google Chrome settings folder, in Ubuntu, i found it in `.config/google-chrome` In this folder, open up the file `Default/Preferences`, Search and replace references to your ...
1,397,496
A colleague at work has a Kingston 240GB SSD drive which has come out of a now dead computer. We want to be able to recover some data from it (no backups sadly) however the drive won't mount properly. I am using an Anker USB3 external HDD enclosure which I know to be working correctly. The drive has come from an Apple...
2019/01/23
[ "https://superuser.com/questions/1397496", "https://superuser.com", "https://superuser.com/users/244470/" ]
* Font size: 16 * Standard font, Serif font: *Times New Roman* * Sans-serif font: *Arial* * Fixed-width font: *Consolas*
Just open `chrome://settings/fonts` and you will see the `Customize fonts` settings. Note that these settings may be different when you change the default language used to display the Google Chrome UI. [Customize fonts settings page](https://i.stack.imgur.com/XjgNa.png) Reference : <https://www.maketecheasier.com/cha...
1,397,496
A colleague at work has a Kingston 240GB SSD drive which has come out of a now dead computer. We want to be able to recover some data from it (no backups sadly) however the drive won't mount properly. I am using an Anker USB3 external HDD enclosure which I know to be working correctly. The drive has come from an Apple...
2019/01/23
[ "https://superuser.com/questions/1397496", "https://superuser.com", "https://superuser.com/users/244470/" ]
* Font size: 16 * Standard font, Serif font: *Times New Roman* * Sans-serif font: *Arial* * Fixed-width font: *Consolas*
i tried @pragman solution and got the same fonts for all styles, but not defaults :( so i removed the `webkit` option entirely, it was: ``` "webkit": { "webprefs": { "default_fixed_font_size": 13, "default_font_size": 16, "fonts": { "sansserif": { "Zyyy": "Custom" }, ...
1,397,496
A colleague at work has a Kingston 240GB SSD drive which has come out of a now dead computer. We want to be able to recover some data from it (no backups sadly) however the drive won't mount properly. I am using an Anker USB3 external HDD enclosure which I know to be working correctly. The drive has come from an Apple...
2019/01/23
[ "https://superuser.com/questions/1397496", "https://superuser.com", "https://superuser.com/users/244470/" ]
Just open `chrome://settings/fonts` and you will see the `Customize fonts` settings. Note that these settings may be different when you change the default language used to display the Google Chrome UI. [Customize fonts settings page](https://i.stack.imgur.com/XjgNa.png) Reference : <https://www.maketecheasier.com/cha...
You don't need to know the original fonts, here's how to do it: First, close Google Chrome, so your changes don't get overwritten. Go to your Google Chrome settings folder, in Ubuntu, i found it in `.config/google-chrome` In this folder, open up the file `Default/Preferences`, Search and replace references to your ...
1,397,496
A colleague at work has a Kingston 240GB SSD drive which has come out of a now dead computer. We want to be able to recover some data from it (no backups sadly) however the drive won't mount properly. I am using an Anker USB3 external HDD enclosure which I know to be working correctly. The drive has come from an Apple...
2019/01/23
[ "https://superuser.com/questions/1397496", "https://superuser.com", "https://superuser.com/users/244470/" ]
i tried @pragman solution and got the same fonts for all styles, but not defaults :( so i removed the `webkit` option entirely, it was: ``` "webkit": { "webprefs": { "default_fixed_font_size": 13, "default_font_size": 16, "fonts": { "sansserif": { "Zyyy": "Custom" }, ...
You don't need to know the original fonts, here's how to do it: First, close Google Chrome, so your changes don't get overwritten. Go to your Google Chrome settings folder, in Ubuntu, i found it in `.config/google-chrome` In this folder, open up the file `Default/Preferences`, Search and replace references to your ...
84,578
> > [![enter image description here](https://i.stack.imgur.com/4rjtu.png)](https://i.stack.imgur.com/4rjtu.png) > > > **Across** > > 1. Having very bad taste > > 4. English elite school > > 8. Shiraz's country > > 9. Russian car > > 10. Body part or storage device > > 12. "Pas" in *faux pas* ...
2019/05/31
[ "https://puzzling.stackexchange.com/questions/84578", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
Across: 1. Having very bad taste > > Sick > > > 4. English elite school > > Eton > > > 8. Shiraz's country > > Iran > > > 9. Russian car > > Lada > > > 10. Body part or storage device > > Disc > > > 12. "Pas" in faux pas > > Step > > > 13. Mall customer > > Shopper > > > ...
Partial Answer (combnination of everyone's work with credits) Across: ------- 8: Shiraz's country > > IRAN > > > 9: A Russian Car > > LADA (thanks @Ak19!) > > > 12: "Pas" in faux pas > > STEP > > > 15: Baseballer Gehrig > > LOU > > > Down: ----- 1: Accompanying dish > > SIDE? > > > ...
84,578
> > [![enter image description here](https://i.stack.imgur.com/4rjtu.png)](https://i.stack.imgur.com/4rjtu.png) > > > **Across** > > 1. Having very bad taste > > 4. English elite school > > 8. Shiraz's country > > 9. Russian car > > 10. Body part or storage device > > 12. "Pas" in *faux pas* ...
2019/05/31
[ "https://puzzling.stackexchange.com/questions/84578", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
Across: 1. Having very bad taste > > Sick > > > 4. English elite school > > Eton > > > 8. Shiraz's country > > Iran > > > 9. Russian car > > Lada > > > 10. Body part or storage device > > Disc > > > 12. "Pas" in faux pas > > Step > > > 13. Mall customer > > Shopper > > > ...
Partial ACROSS ====== 9: A Russian Car > > Lada? > > > 10: Body part or storage device > > Disk > > > 25. Actor Ayres & others > > Lews > > > 26: A common last name in Pakistan > > Khan > > > DOWN ==== 5: London Art gallery > > Tate > > > 7: California Wine region > > Napa (T...
84,578
> > [![enter image description here](https://i.stack.imgur.com/4rjtu.png)](https://i.stack.imgur.com/4rjtu.png) > > > **Across** > > 1. Having very bad taste > > 4. English elite school > > 8. Shiraz's country > > 9. Russian car > > 10. Body part or storage device > > 12. "Pas" in *faux pas* ...
2019/05/31
[ "https://puzzling.stackexchange.com/questions/84578", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
Across: 1. Having very bad taste > > Sick > > > 4. English elite school > > Eton > > > 8. Shiraz's country > > Iran > > > 9. Russian car > > Lada > > > 10. Body part or storage device > > Disc > > > 12. "Pas" in faux pas > > Step > > > 13. Mall customer > > Shopper > > > ...
4 across: > > [ETON](https://www.etoncollege.com/) > > > 11 down > > [COLUMNS](https://en.wikipedia.org/wiki/Column#Orders_of_Columns) > > > 22 down > > SEA > > >
3,047,909
On compilation of the CUDA SDK, I'm getting a nvcc fatal : Unsupported gpu architecture 'compute\_20' My toolkit is 2.3 and on a shared system (i.e cant really upgrade) and the driver version is also 2.3, running on 4 Tesla C1060s If it helps, the problem is being called in radixsort. It appears that a few people onl...
2010/06/15
[ "https://Stackoverflow.com/questions/3047909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/252556/" ]
I believe compute\_20 is targeting Fermi hardware, which you do not have. Also, Cuda 2.3 doesn't support Fermi features or compute\_20. Try using compute\_13 instead.
You are compiling the 3.x SDK with a 2.3 Toolkit, that won't work since as you've now seen compute\_20 is not supported. The simplest solution is to either upgrade your Toolkit or downgrade your SDK. You could try changing the makefile (common.mk in C/common) on Linux or changing the Build Properties on Windows to sel...
16,086,851
In spreadsheet cell B1, the value is -1200. I want cell B2 to copy the value of B1 and limit (validate?) it to no less than -800. I'm using google docs but can also use excel if those functions are not available in google docs. Edit: If B1 has the value of 2000, B2 should have the value of 2000. If B1 has the valu...
2013/04/18
[ "https://Stackoverflow.com/questions/16086851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2295658/" ]
Excel formula would be pretty easy, probably similar in Google Spreadsheets: In B2, put this formula: `=If(B1<-800,-800,B1)` This is saying: If the value in B1 is *less than* -800, then put the value "-800". Otherwise, use the value from B1. This effectively puts a "floor" or a lower bound on the formula.
You don't need any maths here. I'm using Excel but I think it is pretty similar in Google. Suppose that B3 holds floor, no constants in formulae :-) B2 => =if( b1 > $b$3; b1; $b$3) b3 position is fixed so you can copy the expression
16,086,851
In spreadsheet cell B1, the value is -1200. I want cell B2 to copy the value of B1 and limit (validate?) it to no less than -800. I'm using google docs but can also use excel if those functions are not available in google docs. Edit: If B1 has the value of 2000, B2 should have the value of 2000. If B1 has the valu...
2013/04/18
[ "https://Stackoverflow.com/questions/16086851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2295658/" ]
Excel & Google Spreadsheets ``` =Max(B1,-800) ```
Excel formula would be pretty easy, probably similar in Google Spreadsheets: In B2, put this formula: `=If(B1<-800,-800,B1)` This is saying: If the value in B1 is *less than* -800, then put the value "-800". Otherwise, use the value from B1. This effectively puts a "floor" or a lower bound on the formula.