qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
433,009
I can't seem to be able to type in a password so that I may acquire access to #apt-get. I'm looking to update my system via terminal, but typing out my password does no good to get me into su, as the spaces stay blank, and what I know is the password won't go through. Has anyone else had this issue?
2014/03/12
[ "https://askubuntu.com/questions/433009", "https://askubuntu.com", "https://askubuntu.com/users/257348/" ]
In order to set up the `Alt-Gr` key you must go to (setting -> keyboard -> layout settings -> keyboard settings -> then go to the typing tab -> press and hold the Alternative Keyboard Key setting -> move you mouse down to select the key you want to assign `Alt-Gr` to. ![enter image description here](https://i.stack.im...
AltGr sounds like a lot of trouble for only a few symbols. A better choice might be the United States Alternative International keyboard. This one gives a choice of dozens of letters with diacritical marks . The k'bd is just like the standard k'bd except that the `~ ^' and the " are --dead-- keys ( delayed action ) unt...
433,009
I can't seem to be able to type in a password so that I may acquire access to #apt-get. I'm looking to update my system via terminal, but typing out my password does no good to get me into su, as the spaces stay blank, and what I know is the password won't go through. Has anyone else had this issue?
2014/03/12
[ "https://askubuntu.com/questions/433009", "https://askubuntu.com", "https://askubuntu.com/users/257348/" ]
This answer has screenshots for Gnome-Shell (Ubuntu Gnome 13.10). I suppose it will be similar for standard Unity, but if not, please chime in. First of all (and this is the most common problem), **to have AltGr working you need a keyboard layout which uses it**. For example, this is my keyboard layout (Settings -> R...
AltGr sounds like a lot of trouble for only a few symbols. A better choice might be the United States Alternative International keyboard. This one gives a choice of dozens of letters with diacritical marks . The k'bd is just like the standard k'bd except that the `~ ^' and the " are --dead-- keys ( delayed action ) unt...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
1: Use an IntentService to do your downloads. <http://developer.android.com/reference/android/app/IntentService.html> 2: Set up your IntentService using AlarmManager so that it runs even if the application is not running. You register with the AlarmManager <http://developer.android.com/reference/android/app/Alarm...
The important things to think about here is `Thread` , `Service` ,`File` , `Json`, `Context`,`Receiver` & `if else` & `for` maybe i did not understand your question but this is not a big deal sir, your programm your app to work in way where your app starts when the os broadcast `onBootCompleted`, then create a `Thre...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
The important things to think about here is `Thread` , `Service` ,`File` , `Json`, `Context`,`Receiver` & `if else` & `for` maybe i did not understand your question but this is not a big deal sir, your programm your app to work in way where your app starts when the os broadcast `onBootCompleted`, then create a `Thre...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
Try out this [library](https://github.com/nostra13/Android-Universal-Image-Loader) to manage images loading. > > Use a service to download the images. This I feel is mandatory because > I do not know how many images there will be, and I want the download > to proceed even if user exits the app > > > All downloa...
The important things to think about here is `Thread` , `Service` ,`File` , `Json`, `Context`,`Receiver` & `if else` & `for` maybe i did not understand your question but this is not a big deal sir, your programm your app to work in way where your app starts when the os broadcast `onBootCompleted`, then create a `Thre...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
Using a service can be a good option if you want the downloads to continue even if the user exits. Images that are stored in directories created using `getExternalStorageDirectory()` are automatically deleted when your app is uninstalled. Moreover you can check if the internal memory is large enough to store images. If...
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
Try out this [library](https://github.com/nostra13/Android-Universal-Image-Loader) to manage images loading. > > Use a service to download the images. This I feel is mandatory because > I do not know how many images there will be, and I want the download > to proceed even if user exits the app > > > All downloa...
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
Using a service can be a good option if you want the downloads to continue even if the user exits. Images that are stored in directories created using `getExternalStorageDirectory()` are automatically deleted when your app is uninstalled. Moreover you can check if the internal memory is large enough to store images. If...
The important things to think about here is `Thread` , `Service` ,`File` , `Json`, `Context`,`Receiver` & `if else` & `for` maybe i did not understand your question but this is not a big deal sir, your programm your app to work in way where your app starts when the os broadcast `onBootCompleted`, then create a `Thre...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
I use this class when downloading images, it caches the images, next time you will be downloading them it will just load from external memory, it manages the cache for you as well so you wont have to worry about setting cache to limited or unlimited, pretty efficient and fast. ``` public class ImageLoader { MemoryCac...
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
I'm using ormlite to store objects with urls too, I have a synchronization after the "sign in" screen on my app, on my experience I really recommend this library <https://github.com/thest1/LazyList> It's very simple: ``` ImageLoader imageLoader=new ImageLoader(context); imageLoader.DisplayImage(url, imageView); ``` ...
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
1: Use an IntentService to do your downloads. <http://developer.android.com/reference/android/app/IntentService.html> 2: Set up your IntentService using AlarmManager so that it runs even if the application is not running. You register with the AlarmManager <http://developer.android.com/reference/android/app/Alarm...
You should try downloading with this, ``` class DownloadFile extends AsyncTask<String,Integer,Long> { ProgressDialog mProgressDialog = new ProgressDialog(MainActivity.this);// Change Mainactivity.this with your activity name. String strFolderName; @Override protected void onPreExecute() { su...
33,610,111
I caņ't seem to get around this error message: ExecuteNonQuery: Connection property has not been initialized It refers to a `cmd.ExecuteNonQuery();` I'm not really sure what is going on, maybe the insert is not correct, but here is my code: ``` using System; using System.Collections.Generic; using System.ComponentMod...
2015/11/09
[ "https://Stackoverflow.com/questions/33610111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816142/" ]
I use this class when downloading images, it caches the images, next time you will be downloading them it will just load from external memory, it manages the cache for you as well so you wont have to worry about setting cache to limited or unlimited, pretty efficient and fast. ``` public class ImageLoader { MemoryCac...
The important things to think about here is `Thread` , `Service` ,`File` , `Json`, `Context`,`Receiver` & `if else` & `for` maybe i did not understand your question but this is not a big deal sir, your programm your app to work in way where your app starts when the os broadcast `onBootCompleted`, then create a `Thre...
36,252,233
I made One Class for executing hibernate select operations my code is working fine but i just need some help I am passing hibernate select query from some other class to get the result if my select query contains more than one column than I call the method getListbylimit(String query,int limit) its returns List but wh...
2016/03/27
[ "https://Stackoverflow.com/questions/36252233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5194837/" ]
Here is a general implementation using a helper class for finding the lowest X integers. With three columns, three instances of the helper class is created, and the data is then iterated to collect the 3 lowest values for each column. The advantages of this code are: * Only retains the lowest X values * Does not nee...
Say your data has N rows and M columns 1. Iterate over each column 2. Add all the elements in the column into a minHeap ( min priority queue) 3. Retrieve the first 3 numbers from the minHeap (these will be the 3 mins) 4. Clear the queue and move onto the next column O(n) space, O(M*N*lg(N)) time
44,426,498
When i setup static resources like js,css,templates on my web server, i forget to set cache period for them. by default web server set it "cache forever" (this is tomcat server and spring mvc) ``` <mvc:resources mapping="/resources/**" location="/resources/" /> ``` if dont specify `cache-period` then server will sen...
2017/06/08
[ "https://Stackoverflow.com/questions/44426498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4760059/" ]
You can append a version number to the URL ``` http://mydomin.com/resources/file.css?version=1 ``` For example; ``` <html> <head> <link href="resources/file.css?version=1" type="text/css" rel="stylesheet"/> <head> <body></body> </html> ```
I know you do not have jQuery or Ajax tagged in this, but the easiest way to reload your .js files is to use the jQuery getScript() function, which is just a shortcut way of doing an ajax http request. ``` $.getScript('../path_or_URL_to_your_js_file.js'); ``` This loads the external resource with a timestamp append...
27,450,369
I have the following homework assignment: > > Add a new method `retrieveAt` for the class `IntSLList` that takes an integer index position as a parameter. > > > The method returns the info inside the node at the index position. The index of the first node is 0. If the list is empty or the index is invalid, then dis...
2014/12/12
[ "https://Stackoverflow.com/questions/27450369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4238558/" ]
`Received:` headers are timestamped: ``` Received: from lb-ex1.int.icgroup.com (localhost [127.0.0.1]) by lb-ex1.localdomain (Postfix) with ESMTP id D6BDB1E26393 for <hd1@example.com>; Fri, 12 Dec 2014 12:09:24 -0500 (EST) ``` So, do `messageInstance.get_all()` and [sort](https://wiki.python.org/moin/HowTo/Sorting) ...
The `email.parser` class `HeaderParser` implements a dictionary-like interface, but actually seems to return the headers in the order you expect. ``` from email.parser import HeaderParser headers = HeaderParser().parse(open_filehandle, headersonly=True) for key, value in headers.items(): if key == 'Received': ...
27,450,369
I have the following homework assignment: > > Add a new method `retrieveAt` for the class `IntSLList` that takes an integer index position as a parameter. > > > The method returns the info inside the node at the index position. The index of the first node is 0. If the list is empty or the index is invalid, then dis...
2014/12/12
[ "https://Stackoverflow.com/questions/27450369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4238558/" ]
In python 3.6.7, the comments on the get\_all() method explicity state that the values are returned in the same order as they are in the message, so `messageInstance.get_all('Received')` should work fine. ``` def get_all(self, name, failobj=None): """Return a list of all the values for the named field. These ...
The `email.parser` class `HeaderParser` implements a dictionary-like interface, but actually seems to return the headers in the order you expect. ``` from email.parser import HeaderParser headers = HeaderParser().parse(open_filehandle, headersonly=True) for key, value in headers.items(): if key == 'Received': ...
30,251,819
I am developing a project using primefaces. **Code:** ``` <p:panel id="accountPolicyRichPanel"> <h:panelGrid id="outputPanelGrid"> <h:outputText value=""...../> <p:inputText id="InputTextId"/> <p:selectOneMenu id="suspendTypeId" value="..."> <f:selectItems value="#{Account...
2015/05/15
[ "https://Stackoverflow.com/questions/30251819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4513434/" ]
You have a problem and you want to use multi-threading to solve it. Now you have two problems. :) First of all you have to look at a way to decompose your problem into something that can be done in parallel. The way you have decomposed your problem right now is inherently sequential. There is no advantage to multi-thr...
you can use Thread3.setPriority(Thread.MIN\_PRIORITY); priority is int number 1-10 1 is the minimum and 10 is the maximum
43,836,829
This sounded simple, but I haven't been able to figure it out. Context: a VC tells a view to animate itself and the VC waits the animation to be completed before. I thought about doing something like this: In ViewController: ``` loadingView.animate() ``` In LoadingView (UIView subclass): ``` animate() -> Bool { ...
2017/05/07
[ "https://Stackoverflow.com/questions/43836829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7698127/" ]
My experience with Selenium is limited to some niche cases where I wanted some automation (for scraping I can normally get by with requests and BeautifulSoup) but I believe the reason you are getting **None** is because `execute_script` doesn't return a value to begin with (your script is basically just being injected ...
One way is to use javascript as below to get the table row along with the previous answers steps. WebDriver doesn't have a 'parent' method of its own. ``` div = driver.find_element_by_class_name("targetclass") targeta = div.find_element_by_link_text("target@email.com") tr = self.driver.execute_script("return arguments...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
If you are making a segue from the `CalendarMonthView` to the `CalendarFlyoutView` then you can just add this method to the `CalendarMonthView`. ``` -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ CalendarFlyoutView * view = segue.destinationViewController; view.buttonFrame = button.frame...
A couple of questions that need to be answered to best help you: 1) Are CalendarMonthView and CalendarFlyoutView UIView or UIViewController? You say view controller, but the class name says otherwise. 2) What is happening in the method 'dayButtonTapped'? Are you performing a segue there? Are you somehow creating or...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
Use the `transform` feature. // animate in year calendar \_yearCalendarView.hidden = NO; self.curMonthView.monthLabel.hidden = YES; ``` CalendarMonthView *monthView = [CalendarMonthView new]; monthView.delegate = self; CGRect buttonFrame = _currentDayButtonFrame; _yearCalendarView.frame = CGRectMak...
If you are making a segue from the `CalendarMonthView` to the `CalendarFlyoutView` then you can just add this method to the `CalendarMonthView`. ``` -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ CalendarFlyoutView * view = segue.destinationViewController; view.buttonFrame = button.frame...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
If you are making a segue from the `CalendarMonthView` to the `CalendarFlyoutView` then you can just add this method to the `CalendarMonthView`. ``` -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ CalendarFlyoutView * view = segue.destinationViewController; view.buttonFrame = button.frame...
It's still not very clear where the actual animation code is being run. In your question, you state "I want to get the frame of button and use it in this animation used in CalendarFlyoutView.m." which seems to imply the animation code is in CalendarFlyoutView, which seems like an odd place for it. There are a few thi...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
Use the `transform` feature. // animate in year calendar \_yearCalendarView.hidden = NO; self.curMonthView.monthLabel.hidden = YES; ``` CalendarMonthView *monthView = [CalendarMonthView new]; monthView.delegate = self; CGRect buttonFrame = _currentDayButtonFrame; _yearCalendarView.frame = CGRectMak...
A couple of questions that need to be answered to best help you: 1) Are CalendarMonthView and CalendarFlyoutView UIView or UIViewController? You say view controller, but the class name says otherwise. 2) What is happening in the method 'dayButtonTapped'? Are you performing a segue there? Are you somehow creating or...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
A couple of questions that need to be answered to best help you: 1) Are CalendarMonthView and CalendarFlyoutView UIView or UIViewController? You say view controller, but the class name says otherwise. 2) What is happening in the method 'dayButtonTapped'? Are you performing a segue there? Are you somehow creating or...
It's still not very clear where the actual animation code is being run. In your question, you state "I want to get the frame of button and use it in this animation used in CalendarFlyoutView.m." which seems to imply the animation code is in CalendarFlyoutView, which seems like an odd place for it. There are a few thi...
32,488,101
I want to do an animation that zooms in from a calendar, specifically with the origin and frame size being that of the button that represent's today's date. Here is the code for determining the todayButton inside CalendarMonthView.m: ``` NSDate *date = (weekdayOffset > 0) ? [_monthStartDate dateByAddingTimeInterval:-...
2015/09/09
[ "https://Stackoverflow.com/questions/32488101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5125365/" ]
Use the `transform` feature. // animate in year calendar \_yearCalendarView.hidden = NO; self.curMonthView.monthLabel.hidden = YES; ``` CalendarMonthView *monthView = [CalendarMonthView new]; monthView.delegate = self; CGRect buttonFrame = _currentDayButtonFrame; _yearCalendarView.frame = CGRectMak...
It's still not very clear where the actual animation code is being run. In your question, you state "I want to get the frame of button and use it in this animation used in CalendarFlyoutView.m." which seems to imply the animation code is in CalendarFlyoutView, which seems like an odd place for it. There are a few thi...
1,474,968
What is the coefficient of $x^9$ in the expansion of $(1+x)(1+x^2)(1+x^3)\cdots (1+x^{100})?$ --- I manually expanded $(1+x)(1+x^2)(1+x^3)...(1+x^{10})$ and calculated the coefficient of $x^9$ as $8$ but i dont know how to solve it without expanding.Please help me.
2015/10/11
[ "https://math.stackexchange.com/questions/1474968", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262197/" ]
The coefficient of $x^9$ is the number of [partitions](https://en.wikipedia.org/wiki/Partition_%28number_theory%29) of $9$ into distinct parts, i.e., the number of ways of writing $9$ as the sum of distinct positive integers when the order of the summands doesn’t matter. The sequence of these numbers is [OEIS A000009](...
In every factor of your product, you will need to pick either the $1$ or the $x^i$, so immediatly we see that for all factors with $i > 9$ we need to pick the $1$, otherwise we will get $x^k$ with $k > 9$. So we can just look at the product up till $(1 + x^9)$. Now we look at the number of ways to pick $1$ and $x^i$ he...
1,474,968
What is the coefficient of $x^9$ in the expansion of $(1+x)(1+x^2)(1+x^3)\cdots (1+x^{100})?$ --- I manually expanded $(1+x)(1+x^2)(1+x^3)...(1+x^{10})$ and calculated the coefficient of $x^9$ as $8$ but i dont know how to solve it without expanding.Please help me.
2015/10/11
[ "https://math.stackexchange.com/questions/1474968", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262197/" ]
I think the problem boils down to counting the number of ways to write $9$ as a sum of distinct, positive integers. There is the trivial case of $9=9$, and besides that try by hand to catch all other cases like $1+3+5$, $1+2+6$, etc. I think your best bet is to brute force this problem; one of those times where it's ju...
In every factor of your product, you will need to pick either the $1$ or the $x^i$, so immediatly we see that for all factors with $i > 9$ we need to pick the $1$, otherwise we will get $x^k$ with $k > 9$. So we can just look at the product up till $(1 + x^9)$. Now we look at the number of ways to pick $1$ and $x^i$ he...
7,623
Helo Guys, I want to know your experience about carbon material and grease Can I use normal grease with carbon ? I want to put grease onto fork and stem.... Or WD-40 or silicone penetrant would be ok ? Thank you.... Can I use this one ? ![http://i129.photobucket.com/albums/p231/picture_77/13012012170.jpg](https://i...
2012/01/11
[ "https://bicycles.stackexchange.com/questions/7623", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/3189/" ]
From [Sheldon Brown](http://sheldonbrown.com/gloss_g.html): > > Grease lubrication is commonly used on all ball bearings. Good mechanics also use grease (or oil) on the threads of most threaded fittings and fasteners, and also inside the steerer (to keep the stem from becoming stuck) and the seat tube (to keep the se...
Most automotive use grease is too thick for bicycle applications. It will lubricate, but it will add friction to the movement of the bike. Aside from the "weight" of the grease, you only need to worry about purity. Phil Wood, of Phil Wood Components, used to say that his most important criteria for his bicycle greas...
7,623
Helo Guys, I want to know your experience about carbon material and grease Can I use normal grease with carbon ? I want to put grease onto fork and stem.... Or WD-40 or silicone penetrant would be ok ? Thank you.... Can I use this one ? ![http://i129.photobucket.com/albums/p231/picture_77/13012012170.jpg](https://i...
2012/01/11
[ "https://bicycles.stackexchange.com/questions/7623", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/3189/" ]
From [Sheldon Brown](http://sheldonbrown.com/gloss_g.html): > > Grease lubrication is commonly used on all ball bearings. Good mechanics also use grease (or oil) on the threads of most threaded fittings and fasteners, and also inside the steerer (to keep the stem from becoming stuck) and the seat tube (to keep the se...
i would be careful of any type of grease i use on a bike.. Grease attracts the dirt and can lead to further issues on the mechanics of your bike. like stated before - use an oil specially formulated for your bike. and make sure after every cycle to clean your bike down and re-oil.
7,623
Helo Guys, I want to know your experience about carbon material and grease Can I use normal grease with carbon ? I want to put grease onto fork and stem.... Or WD-40 or silicone penetrant would be ok ? Thank you.... Can I use this one ? ![http://i129.photobucket.com/albums/p231/picture_77/13012012170.jpg](https://i...
2012/01/11
[ "https://bicycles.stackexchange.com/questions/7623", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/3189/" ]
Most automotive use grease is too thick for bicycle applications. It will lubricate, but it will add friction to the movement of the bike. Aside from the "weight" of the grease, you only need to worry about purity. Phil Wood, of Phil Wood Components, used to say that his most important criteria for his bicycle greas...
i would be careful of any type of grease i use on a bike.. Grease attracts the dirt and can lead to further issues on the mechanics of your bike. like stated before - use an oil specially formulated for your bike. and make sure after every cycle to clean your bike down and re-oil.
245,522
I have a field name where all the values are capitalized so I used title('string') to get my desired results: ``` 'OLONGAPO CITY' ``` will result to ``` 'Olongapo City'. ``` However, there are strings such as: ``` CITY OF MAKATI ``` I want it to appear as ``` 'City of Makati' ``` instead of ``` 'Cit...
2017/06/27
[ "https://gis.stackexchange.com/questions/245522", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/35246/" ]
You could try using something like the following expression: ``` replace(title("fieldName"), 'Of', 'of') ```
If you want proper title case rules (including correct handling of a/of/the/etc), you could grab the source of Titlecase.py (See <https://muffinresearch.co.uk/titlecasepy-titlecase-in-python/> ) and insert this in a custom expression function from the "Function Editor" tab in the expression builder: [![enter image des...
60,862,825
I find the method `public ValueStateDescriptor(String name,TypeInformation<T> typeInfo,T defaultValue)`is now deprecated and the documentation says to manage the default value by checking whether the contents of the state is null. I wonder what does this suggestion for?
2020/03/26
[ "https://Stackoverflow.com/questions/60862825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13110035/" ]
We have discovered that our own proxy were writing Access-Control-Allow-Origin header as well. That's why together with keycloak we got it twice. Our devops team has fixed the code of our proxy and it works now.
`*` is not valid value for `Access-Control-Allow-Origin` for sites running on https. Remove `*` from web origins client configuration in the Keycloak and configure all used web origin explicitly (no wildchars).
16,877,762
**This is a spoiler to task #3 of Project Euler! Don't continue to read, if you want to solve it by yourself.** I am trying to learn Haskell by writing programs for Project Euler. At the moment I'm trying to solve task #3 which asks for the largest prime factor of the number 600851475143. To do this, I create a list ...
2013/06/01
[ "https://Stackoverflow.com/questions/16877762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2068635/" ]
The Problem is the type declaration `primelist :: Int -> [Int]`. It forces Haskell to use native integers, i.e. 32-Bit integers on a 32-Bit platform. However, if you leave it out, Haskell will infer the function type to be `Integer -> [Integer]`. Integers allow computations with arbitrary precision, but are a little bi...
I am not sure if this will help you, but I also am working through Project Euler to help teach myself Haskell, and I devised the following solution: ``` defacto :: Integer -> Integer -> Integer defacto x p | x == p = 1 | x`mod`p==0 = defacto (x`div`p) p | otherwise = x gpf :: Integer -> Intege...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Database triggers are the preferred way to go here, if you can. However, recently I had to do this in client-side code and I ended up writing a class that created a deep (value) copy of the object when it was opened for editing, compared the two objects at save time (using ToString() only) and wrote any changes to an ...
I know this doesn't answer your question, but for the record, I prefer to handle this type of auditing logic in the database.
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Database triggers are the preferred way to go here, if you can. However, recently I had to do this in client-side code and I ended up writing a class that created a deep (value) copy of the object when it was opened for editing, compared the two objects at save time (using ToString() only) and wrote any changes to an ...
We have a table that all audit trail entries are stored in. A database trigger is on every table (it's put there by a stored procedure, but that's not relevant to this answer). When a value is changed, the old value is stored in the audit trail. Ours is a little complex in that we also have a look-up table that contain...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Database triggers are the preferred way to go here, if you can. However, recently I had to do this in client-side code and I ended up writing a class that created a deep (value) copy of the object when it was opened for editing, compared the two objects at save time (using ToString() only) and wrote any changes to an ...
I come more from the SW side that the DB side, if you create a set of DAOs (Data access objects) that you use for your interaction with the database. I would then insert the audit functionality into the respective functions in the DAOs that need to be trailed. The database trigger solution is also feasible, it depends...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know if it will fit seamlessly with your ORM, but i used [Point-in-Time](http://www.simple-talk.com/sql/database-administration/database-design-a-point-in-time-architecture/) database design for an ERP application and really recommend it. You automatically get History and Audit from this architecture, as well a...
We've implemented a similar solution, using AOP (aspectJ implementation). Using this particular points can be captured and specific operations can be performed. This can be plugged in and plugged off when we like. If you really want to do it in the app layer, i would suggest this. Hope it helps..
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I've done this in Hibernate (another ORM) using an Interceptor for the Session. That way the audit code is seperate from your code.
We have a table that all audit trail entries are stored in. A database trigger is on every table (it's put there by a stored procedure, but that's not relevant to this answer). When a value is changed, the old value is stored in the audit trail. Ours is a little complex in that we also have a look-up table that contain...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Database triggers are the preferred way to go here, if you can. However, recently I had to do this in client-side code and I ended up writing a class that created a deep (value) copy of the object when it was opened for editing, compared the two objects at save time (using ToString() only) and wrote any changes to an ...
We've implemented a similar solution, using AOP (aspectJ implementation). Using this particular points can be captured and specific operations can be performed. This can be plugged in and plugged off when we like. If you really want to do it in the app layer, i would suggest this. Hope it helps..
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know if it will fit seamlessly with your ORM, but i used [Point-in-Time](http://www.simple-talk.com/sql/database-administration/database-design-a-point-in-time-architecture/) database design for an ERP application and really recommend it. You automatically get History and Audit from this architecture, as well a...
I come more from the SW side that the DB side, if you create a set of DAOs (Data access objects) that you use for your interaction with the database. I would then insert the audit functionality into the respective functions in the DAOs that need to be trailed. The database trigger solution is also feasible, it depends...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
We've implemented a similar solution, using AOP (aspectJ implementation). Using this particular points can be captured and specific operations can be performed. This can be plugged in and plugged off when we like. If you really want to do it in the app layer, i would suggest this. Hope it helps..
We have a table that all audit trail entries are stored in. A database trigger is on every table (it's put there by a stored procedure, but that's not relevant to this answer). When a value is changed, the old value is stored in the audit trail. Ours is a little complex in that we also have a look-up table that contain...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I come more from the SW side that the DB side, if you create a set of DAOs (Data access objects) that you use for your interaction with the database. I would then insert the audit functionality into the respective functions in the DAOs that need to be trailed. The database trigger solution is also feasible, it depends...
We have a table that all audit trail entries are stored in. A database trigger is on every table (it's put there by a stored procedure, but that's not relevant to this answer). When a value is changed, the old value is stored in the audit trail. Ours is a little complex in that we also have a look-up table that contain...
148,291
I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on 1. OnSaving 2. OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using s...
2008/09/29
[ "https://Stackoverflow.com/questions/148291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I don't know if it will fit seamlessly with your ORM, but i used [Point-in-Time](http://www.simple-talk.com/sql/database-administration/database-design-a-point-in-time-architecture/) database design for an ERP application and really recommend it. You automatically get History and Audit from this architecture, as well a...
We have a table that all audit trail entries are stored in. A database trigger is on every table (it's put there by a stored procedure, but that's not relevant to this answer). When a value is changed, the old value is stored in the audit trail. Ours is a little complex in that we also have a look-up table that contain...
5,526,625
I am trying to start from scratch a website that has similar functionality to grubhub.com. Fundamentally, a website where restaurant owners can come on to the website, post their menu and most importantly customers will be able to order instant delivery online which sends an email or something to the restaurant. The ...
2011/04/02
[ "https://Stackoverflow.com/questions/5526625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/689355/" ]
I would use a premade CMS, unless i had a very solid reason not to (they did not have the functionality that i wanted). This would save you LOTS of time. If you are familiar with PHP, MySQL, CSS and the likes, starting should not be such a problem. You first design how you want your program to work, think of the datab...
You should definitely not build yourself a CMS from scratch. This will take a very long time and will definitely lead HUGE security holes and total lack of scalability if you don't know what you are doing. Take a look at this question: <https://softwareengineering.stackexchange.com/questions/46716/what-should-a-devel...
5,526,625
I am trying to start from scratch a website that has similar functionality to grubhub.com. Fundamentally, a website where restaurant owners can come on to the website, post their menu and most importantly customers will be able to order instant delivery online which sends an email or something to the restaurant. The ...
2011/04/02
[ "https://Stackoverflow.com/questions/5526625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/689355/" ]
You should consider that developing web applications without experience can lead to severe security issues. I would recommend using a premade CMS if it provides the features that you need for your application (or makes it possible to script additional features). If that is not the case, maybe consider using a web appl...
You should definitely not build yourself a CMS from scratch. This will take a very long time and will definitely lead HUGE security holes and total lack of scalability if you don't know what you are doing. Take a look at this question: <https://softwareengineering.stackexchange.com/questions/46716/what-should-a-devel...
3,232,098
I am trying to understand a step in the following proof of completeness of $L^p$ in [Stein-Shakarchi's Functional Analysis](http://assets.press.princeton.edu/chapters/s9627.pdf). (See the proof on page 5 of the link or at the end of this post.) At the beginning of the proof, it is said that > > Let $\{f\_n\}\_{n=1}^...
2019/05/19
[ "https://math.stackexchange.com/questions/3232098", "https://math.stackexchange.com", "https://math.stackexchange.com/users/459663/" ]
The authors mention at the beginning of the proof that > > The argument is essentially the same as for $L^1$ (or $L^2$); see Section 2, Chapter 2 and Section 1, Chapter 4 in [Book III](https://press.princeton.edu/titles/8008.html). > > > It is said clearly there (see also a snapshot at the end) that > > The e...
If $\{f\_n\}\_n$ is Cauchy, for each $k\in\Bbb N$ we can find an $N\_k$ (depending on the $k$ we just chose) such that $$ \|f\_n - f\_m\| < 2^{-k} \quad\text{ whenever } n,m\geq N\_k.$$ For $k+1$, we likewise get $$ \|f\_n - f\_m\| < 2^{-k-1} \quad\text{ whenever } n,m\geq N\_{k+1}.$$ Now, both inequalities will ho...
10,564,722
I'm new to PHP, I started about 3 weeks ago. I have a string, which is used with $\_POST to pass it to another page, the second page uses $\_GET to get these url and split it as desired. My problem is that, in my first page I use a String, and I want to encrypt it, so that I can pass it as a plan text. In the second ...
2012/05/12
[ "https://Stackoverflow.com/questions/10564722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1391170/" ]
You're thinking about this wrong. You NEVER trust information coming from the user's side. For example, if your user sends a form that says what item they want, DO NOT include the price in the form. Instead, get the price from the server (database), where it can be trusted.
Despite not fully understanding what you're trying to achieve, you can use base64 encoding: ``` $encoded_string = base64_encode ($string); $decoded_string = base64_decode ($encoded_string); ```
10,564,722
I'm new to PHP, I started about 3 weeks ago. I have a string, which is used with $\_POST to pass it to another page, the second page uses $\_GET to get these url and split it as desired. My problem is that, in my first page I use a String, and I want to encrypt it, so that I can pass it as a plan text. In the second ...
2012/05/12
[ "https://Stackoverflow.com/questions/10564722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1391170/" ]
You're thinking about this wrong. You NEVER trust information coming from the user's side. For example, if your user sends a form that says what item they want, DO NOT include the price in the form. Instead, get the price from the server (database), where it can be trusted.
What you probably want to do is pass the contents of the users cart (i.e. the items he'd like to order) to the payment site. Therefore, you should create a form like: ``` <form action="URL/to/paymentPage.php" method="post"> <!-- Item 1 --> <input type="hidden" name="items[0]" value="productID1"/> <input type="hidden" ...
10,564,722
I'm new to PHP, I started about 3 weeks ago. I have a string, which is used with $\_POST to pass it to another page, the second page uses $\_GET to get these url and split it as desired. My problem is that, in my first page I use a String, and I want to encrypt it, so that I can pass it as a plan text. In the second ...
2012/05/12
[ "https://Stackoverflow.com/questions/10564722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1391170/" ]
What you probably want to do is pass the contents of the users cart (i.e. the items he'd like to order) to the payment site. Therefore, you should create a form like: ``` <form action="URL/to/paymentPage.php" method="post"> <!-- Item 1 --> <input type="hidden" name="items[0]" value="productID1"/> <input type="hidden" ...
Despite not fully understanding what you're trying to achieve, you can use base64 encoding: ``` $encoded_string = base64_encode ($string); $decoded_string = base64_decode ($encoded_string); ```
12,456,578
Hi I have a table with name **test**. it got 7 columns **id , a , b , c , d , e , f.** All this columns contains either 1 or 0. Now i want make a query where i can choose only those columns whose value is 1. Something like this: ``` select (condition) from test where id = 5; ``` because i have a hotel table with ...
2012/09/17
[ "https://Stackoverflow.com/questions/12456578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1529342/" ]
Something like this perhaps? You may want to customize the behavior of the dropdown, but this shows the basic logic of handling the click events and preventing default behaviour (i.e. following links) if the menu isn't open: ``` $(function() { $('#main-menu a').click(function(e) { var listItem = $(this).cl...
i have done complete bins for above issue also placed demo link here. **Demo:** <http://codebins.com/bin/4ldqp72> **HTML** ``` <ul id="main-menu"> <li> <a href="#"> Link </a> </li> <li> <a href="#"> Link </a> </li> <li> <a href="#"> Link </a> <ul class="sub-men...
34,019,675
As in earlier version of symfony we user to generate a CRUD with the following command ``` $ php app/console generate:doctrine:crud ``` But in symfony 3.0.0 i could not find the app/console, even I tried checking the documentation for the same but was not able to find anything. Link to document <http://symfony.com/...
2015/12/01
[ "https://Stackoverflow.com/questions/34019675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1278758/" ]
Use bin/console instead of app/console. However, Symfony 3.0 was just released yesterday. <http://symfony.com/blog/symfony-3-0-0-released>. Most of the core concepts between S2 and S3 are the same but the implementations have changed significantly. For example, the form components work differently. Most of the current...
For Symfony 3 console is moved inside bin folder. So command should be ``` $ php bin/console generate:doctrine:crud ```
28,430,749
I have a C++ classe in a .h file like this: ``` #ifndef __GLWidget_h__ #define __GLWidget_h__ class PivotShape { // This is allowed void do_something() { std::cout << "Doing something\n"; } // This is not allowed void do_something_else(); } // This is not allowed void PivotShape::do_something_else()...
2015/02/10
[ "https://Stackoverflow.com/questions/28430749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1993403/" ]
You're breaking the One Definition Rule; defining the function in the header means there's a definition in every translation unit that includes the header, and you're usually only allowed a single definition in the program. Options: * Move the function definition into a source file, so there's just one definition; or...
Define the function in a source file or use `inline` to define it in the header file, outside the class definition. Note that you can still define it inside the class definition without the `inline` keyword. Related: [Member function definition](https://stackoverflow.com/questions/4837267/member-function-definition)
5,939,578
I would like to use shared memory between several processes, and would like to be able to keep using raw pointers (and stl containers). For this purpose, I am using shared memory mapped at a *fixed address*: ``` segment = new boost::interprocess::managed_shared_memory( boost::interprocess::open_or_create, "M...
2011/05/09
[ "https://Stackoverflow.com/questions/5939578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680410/" ]
This is a hard problem. If you are forking a single program to create children, and only the parent and the children will use the memory segment, just be sure to map it before you fork. The children will automatically inherit the mapping from their parent and there's no need to use a fixed address. If you aren't, then...
Read the address from a configuration file. That will allow easy experimentation, and make it easy to change the address as the circumstances change.
5,939,578
I would like to use shared memory between several processes, and would like to be able to keep using raw pointers (and stl containers). For this purpose, I am using shared memory mapped at a *fixed address*: ``` segment = new boost::interprocess::managed_shared_memory( boost::interprocess::open_or_create, "M...
2011/05/09
[ "https://Stackoverflow.com/questions/5939578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680410/" ]
Read the address from a configuration file. That will allow easy experimentation, and make it easy to change the address as the circumstances change.
Don't use hard-coded absolute addresses as shared memory area for security reasons, even when you don't uses forks or threads. This bypasses all ASLR protections. It enables any attacker predictable locations in the process' address space. It is pretty easy to search for such hard-coded pointers in a binary. You've be...
5,939,578
I would like to use shared memory between several processes, and would like to be able to keep using raw pointers (and stl containers). For this purpose, I am using shared memory mapped at a *fixed address*: ``` segment = new boost::interprocess::managed_shared_memory( boost::interprocess::open_or_create, "M...
2011/05/09
[ "https://Stackoverflow.com/questions/5939578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680410/" ]
Read the address from a configuration file. That will allow easy experimentation, and make it easy to change the address as the circumstances change.
My solution: The initialising program allows the system to select an appropriate segment address. This address is written to disc and retrieved for use by subsequent programs as required. Caveats: I am using 64 bit fedora 21 with Kdevelop 4.7 and find that 'void\*' is 64 bits long. Writing to disc of the segment head...
5,939,578
I would like to use shared memory between several processes, and would like to be able to keep using raw pointers (and stl containers). For this purpose, I am using shared memory mapped at a *fixed address*: ``` segment = new boost::interprocess::managed_shared_memory( boost::interprocess::open_or_create, "M...
2011/05/09
[ "https://Stackoverflow.com/questions/5939578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680410/" ]
This is a hard problem. If you are forking a single program to create children, and only the parent and the children will use the memory segment, just be sure to map it before you fork. The children will automatically inherit the mapping from their parent and there's no need to use a fixed address. If you aren't, then...
Don't use hard-coded absolute addresses as shared memory area for security reasons, even when you don't uses forks or threads. This bypasses all ASLR protections. It enables any attacker predictable locations in the process' address space. It is pretty easy to search for such hard-coded pointers in a binary. You've be...
5,939,578
I would like to use shared memory between several processes, and would like to be able to keep using raw pointers (and stl containers). For this purpose, I am using shared memory mapped at a *fixed address*: ``` segment = new boost::interprocess::managed_shared_memory( boost::interprocess::open_or_create, "M...
2011/05/09
[ "https://Stackoverflow.com/questions/5939578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/680410/" ]
This is a hard problem. If you are forking a single program to create children, and only the parent and the children will use the memory segment, just be sure to map it before you fork. The children will automatically inherit the mapping from their parent and there's no need to use a fixed address. If you aren't, then...
My solution: The initialising program allows the system to select an appropriate segment address. This address is written to disc and retrieved for use by subsequent programs as required. Caveats: I am using 64 bit fedora 21 with Kdevelop 4.7 and find that 'void\*' is 64 bits long. Writing to disc of the segment head...
49,007,767
I'm trying to exchange messages using multiple covert channels. So, basically, first i need to select the channel that i want to use for communication and then select the "destination\_ip" of the user that i want to chat with and after that the > > processMessage() > > > is called. Now, to move from one channel ...
2018/02/27
[ "https://Stackoverflow.com/questions/49007767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5467365/" ]
Memory access violation happen when you are trying to access to an unitialized variable, in this case the `channelmanager`. I can only see that you initialize `channelmanager` in the `processMessage()` method and you are closing the connection before initializing the `channelmanager` as it happen in: ``` close(destin...
Memory access violation is also called a segmentation fault (or segfault), occurs when the program tries to access a memory location that doesn't exist, or is otherwise inaccessible. We call this trying to access an illegal memory location. That memory is either non-existent or we aren't aren't allowed to touch it. If...
7,209,731
I am writing a program that does some batch processing. The batch elements can be processed independently of each other and we want to minimize overall processing time. So, instead of looping through each element in the batch one at a time, I am using an ExecutorService and submitting Callable objects to it: ``` p...
2011/08/26
[ "https://Stackoverflow.com/questions/7209731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332893/" ]
I don't think you can do much better than what you are currently doing, but here is an alternative: ``` public BatchElementStatus call() { return callMethod(1); } private callMethod(int methodCounter) { if (cancelled) { doRollback(); return new BatchElementStatus("FAIL"); } switch (metho...
Future has a cancel(boolean) method that will interrupt the running thread if true is passed in so replace the `if(!cancelled)` checks with `if(Thread.interrupted())` and return when you got a interrupt (you're not currently) note that this will reset the interrupted flag to false (so `if(Thread.interrupted()&&Thread...
7,209,731
I am writing a program that does some batch processing. The batch elements can be processed independently of each other and we want to minimize overall processing time. So, instead of looping through each element in the batch one at a time, I am using an ExecutorService and submitting Callable objects to it: ``` p...
2011/08/26
[ "https://Stackoverflow.com/questions/7209731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332893/" ]
I don't think you can do much better than what you are currently doing, but here is an alternative: ``` public BatchElementStatus call() { return callMethod(1); } private callMethod(int methodCounter) { if (cancelled) { doRollback(); return new BatchElementStatus("FAIL"); } switch (metho...
Your `ElementProcessor` can extend from `java.util.concurrent.FutureTask` which is > > A cancellable asynchronous computation. This class provides a base > implementation of Future, with methods to start and cancel a > computation, query to see if the computation is complete, and retrieve > the result of the comp...
31,111,914
When we use GET method we use ambersand(`&`) sign to send the data to a particular script. I'm sending data to a php script called `myscript.php` by the GET method from a javascript like the following : ``` http.open('GET', 'Myscript.php'+ '?d=' + value1 + '&c=' + value2 + '&f=' + value3); ``` But if the value1 or v...
2015/06/29
[ "https://Stackoverflow.com/questions/31111914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2884663/" ]
You need to encode it properly before putting it into url to turn ampersand to `%26`: * in PHP: `urlencode()` * in javascript: `encodeURIComponent()` You don't need to decode it in PHP, it will decode it for you to `&` character.
JS you can use ``` encodeURIComponent(str); ``` Example ``` str="garth&ggg&kkk"; str=encodeURIComponent(str); ``` It will replace & with %26
69,544,118
I'm working on a solution where I have a SQS queue with Lambda trigger. My understanding is Lambda will receive messages in batches to be processed, and once Lambda function is successful, the messages in the SQS queue is automatically deleted. However, how do I only allow some of those messages to be deleted? Let's a...
2021/10/12
[ "https://Stackoverflow.com/questions/69544118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5186759/" ]
Yes, by default, the Lambda function deletes all the messages upon success. You would need to handle this in your code, but not by changing the visibility timeout of the messages. Add DLQ (dead-letter queue) that will actually handle the failed messages (messages go to DLQ after a certain number of failed attempts to ...
For AWS Lambdas with an SQS trigger, by default, when your function encounters an error processing one or more messages in a given batch, the entire batch is marked as a failure. All of the messages in the batch are made visible again in the queue. Depending on your redrive policy, you can end up repeatedly processing ...
1,542
I have a problem similar in formulation to this post, with a few notable differences: [What simple methods are there for adaptively sampling a 2D function?](https://scicomp.stackexchange.com/questions/923/what-simple-methods-are-there-for-adaptively-sampling-a-2d-function) Like in that post: * I have a $f(x,y)$ and ...
2012/03/06
[ "https://scicomp.stackexchange.com/questions/1542", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/53/" ]
There is a paper in computer graphics called [Provably Good Sampling and Meshing of Surfaces](http://geometrica.saclay.inria.fr/team/Steve.Oudot/papers/bo-pgsms-05/bo-pgsms-05.pdf), which relies on you providing an oracle that determines all the intersections of an isoline with a given line segment. With that, it sampl...
You might try applying the core features of the Efficient Global Reliability Analysis (EGRA) method. This method was derived for the efficient computation of a probability of failure, but the guts of it are focused on doing what you describe - creating a model that is accurate only near a specific contour of interest. ...
17,416,488
What I want to implement is something like: ``` switch(flag) { case 1: var query=from w in db.someTable select w; break; case 2: query=from w in db.someTable where w.id==someID select w; break; case default:...
2013/07/02
[ "https://Stackoverflow.com/questions/17416488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526662/" ]
Declaring with `var` lets you shorten the code, but the variable that you declare remains statically typed, and the scope of that variable does not change. If you need to use a variable outside `switch`, declare it before the `switch` statement, like this: ``` IQueryable<SomeType> query = null; switch (...) { cas...
if it is same table , you can try this: ``` var query=from w in db.someTable select w; switch(flag) { case 1: break; case 2: query=query.Where(w.id==someID); break; default: query=null; //since linq is Delay query, if you don't use the data in query, it will do not...
17,416,488
What I want to implement is something like: ``` switch(flag) { case 1: var query=from w in db.someTable select w; break; case 2: query=from w in db.someTable where w.id==someID select w; break; case default:...
2013/07/02
[ "https://Stackoverflow.com/questions/17416488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526662/" ]
The `var` keyword is irrelevant. You can do it like this: ``` switch(flag) { case 1: { var query=from w in db.someTable select w; } break; case 2: { var query=from w in db.someTable where w.id==someID se...
if it is same table , you can try this: ``` var query=from w in db.someTable select w; switch(flag) { case 1: break; case 2: query=query.Where(w.id==someID); break; default: query=null; //since linq is Delay query, if you don't use the data in query, it will do not...
12,332
Почему в первом случае "к" будет приставкой,а во втором - "-юч" будет суффиксом? **Ключ воды и ключ дверной**
2012/11/15
[ "https://rus.stackexchange.com/questions/12332", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/1038/" ]
Это по каким же эврикам? Ключ - корень в обоих случаях. Фасмер даже допускает общность происхождения. I род. п. -а́ I., сюда же заключи́ть, укр. ключ, ст.-слав. ключь, болг. клю́чът, сербохорв. кљу̑ч, род. п. кљу́ча " крюк, ключ", словен. kljúč, чеш. klíč, слвц. kl᾽úč, польск. klucz, в.-луж. kluč, н.-луж. kluc. Ро...
Версия в этом видео интересная, но она не общепринятая, а авторская. Некая гипотеза, проверить которую сейчас уже практически нереально. Но она не лишена здравого смысла, хотя может оказаться и за уши притянутой. То есть у дверного ключа якобы корень "кл-" (от "кол" - кругляш - самый примитивный ключ, которым открывают...
20,279
Suppose that a Tor client wants to access a certain hidden service. According to the protocol, instead of submitting a request directly to the server IP (which is hidden[1][2]), this client submit a request via a series of relays. However, at some point, there will be a final relay in charge of delivering the client'...
2019/09/12
[ "https://tor.stackexchange.com/questions/20279", "https://tor.stackexchange.com", "https://tor.stackexchange.com/users/27707/" ]
Tor uses TCP tunnels, so - regardless of the previous answer - no need to use it. The hidden service is reached from the Tor node that is hosting it, usually through a localhost. The scenario you've described about IP revealing - yes, it *can* be a privacy problem. The design doc states clear - the system is anonymizin...
This is a bit of a simplistic explanation, but I hope it helps. The Tor service, running on the machine where the onion service is being hosted, reaches out to the Tor Network and says, if you want to use onion abcxyz.onion or port 80, then you have to talk to me (the service) but not to the IP of the machine. Because...
16,417,449
I create my own class and I want to use it in my new component but I am getting an error... The code is the following: ``` type TMyClass = class Name: string; Number: double; end; TMyComponent = class(TCustomPanel) private FMyClass: TMyClass; public procedure SetMyClass(aName: string; aNumbe...
2013/05/07
[ "https://Stackoverflow.com/questions/16417449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338944/" ]
The things that I can see wrong with your code at present are: 1. The property setter must receive a single parameter of the same type as the property, namely `TMyClass`. 2. The property setter must be a member of the class, but you've implemented it as a standalone procedure. 3. A published property needs to have a g...
Try this: ``` type TMyClass = class Name: string; Number: double; end; TMyComponent = class(TCustomPanel) private FMyClass: TMyClass; public procedure SetMyClass(Value: TMyClass); published property MyClass: TMyClass write SetMyClass; end; procedure TMyComponent.SetMyClass(Value); b...
16,417,449
I create my own class and I want to use it in my new component but I am getting an error... The code is the following: ``` type TMyClass = class Name: string; Number: double; end; TMyComponent = class(TCustomPanel) private FMyClass: TMyClass; public procedure SetMyClass(aName: string; aNumbe...
2013/05/07
[ "https://Stackoverflow.com/questions/16417449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338944/" ]
Try this: ``` type TMyClass = class Name: string; Number: double; end; TMyComponent = class(TCustomPanel) private FMyClass: TMyClass; public procedure SetMyClass(Value: TMyClass); published property MyClass: TMyClass write SetMyClass; end; procedure TMyComponent.SetMyClass(Value); b...
``` unit MyComponentTest2; interface uses SysUtils, Classes, Controls, Forms, ExtCtrls, Messages, Dialogs; type TMyClass = class Name: string; Number: double; end; TMyComponentTest2 = class(TCustomPanel) private FMyClass: TMyClass; public constructor Create(AOwner: TComponent); override; ...
16,417,449
I create my own class and I want to use it in my new component but I am getting an error... The code is the following: ``` type TMyClass = class Name: string; Number: double; end; TMyComponent = class(TCustomPanel) private FMyClass: TMyClass; public procedure SetMyClass(aName: string; aNumbe...
2013/05/07
[ "https://Stackoverflow.com/questions/16417449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338944/" ]
The things that I can see wrong with your code at present are: 1. The property setter must receive a single parameter of the same type as the property, namely `TMyClass`. 2. The property setter must be a member of the class, but you've implemented it as a standalone procedure. 3. A published property needs to have a g...
``` unit MyComponentTest2; interface uses SysUtils, Classes, Controls, Forms, ExtCtrls, Messages, Dialogs; type TMyClass = class Name: string; Number: double; end; TMyComponentTest2 = class(TCustomPanel) private FMyClass: TMyClass; public constructor Create(AOwner: TComponent); override; ...
43,016
I use VMware Fusion created a VM(Linux) in my Mac, but I don't know how to delivery the data from my Mac to the VM. If the VM is on the Windows I can use the WinSCP to load data to it, but how can I load data to VM from Mac? Some friend can recommend me a software to load data to Linux?
2017/06/16
[ "https://softwarerecs.stackexchange.com/questions/43016", "https://softwarerecs.stackexchange.com", "https://softwarerecs.stackexchange.com/users/28348/" ]
I have been using something called [Alpha VNC Lite](https://play.google.com/store/apps/details?id=de.abr.android.avnc). Alpha VNC lite doesn't seem to work on the home screen but most other apps seem to work fine. The device doesn't need to be rooted but you do not to enable a special keyboard and accessibility options...
There also is [droidVNC-NG](https://github.com/bk138/droidVNC-NG) (which I authored). It does not require root and runs on Android 7+. It's open-source and available for free on Google Play and F-Droid.
339,902
Suppose you are implementing a publication database and creating migrations to represent different publications. Each publication has a "year" associated with it. `t.column :year, ???` Would this year be best represented as an integer, date, or datetime?
2008/12/04
[ "https://Stackoverflow.com/questions/339902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39584/" ]
I suggest using integer. Both `Date` and `DateTime` have more precision than you want, which could be misleading. Even if you initialize them w/only a year, they will store a default month and day (Jan, 1). For example, if you used `Date`, your output would look like this: ``` >> m = YourModel.create(:year => '2008')...
Well, if you only care about the **year**, an integer will do just right. If you're not certain that you will never, ever, need month and day, then date, and if you also may need the hour/minute/second, then datetime, but if you need a datetime, it should not be called year :-)
339,902
Suppose you are implementing a publication database and creating migrations to represent different publications. Each publication has a "year" associated with it. `t.column :year, ???` Would this year be best represented as an integer, date, or datetime?
2008/12/04
[ "https://Stackoverflow.com/questions/339902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39584/" ]
I would recommend just going with Rails conventions and doing a `Date` data type. This way, if you ever *do* need the month and day, you can retrieve it. Plus, it's simple to do: ``` YourModel.date.year # => "1999" ```
Well, if you only care about the **year**, an integer will do just right. If you're not certain that you will never, ever, need month and day, then date, and if you also may need the hour/minute/second, then datetime, but if you need a datetime, it should not be called year :-)
339,902
Suppose you are implementing a publication database and creating migrations to represent different publications. Each publication has a "year" associated with it. `t.column :year, ???` Would this year be best represented as an integer, date, or datetime?
2008/12/04
[ "https://Stackoverflow.com/questions/339902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39584/" ]
I would recommend just going with Rails conventions and doing a `Date` data type. This way, if you ever *do* need the month and day, you can retrieve it. Plus, it's simple to do: ``` YourModel.date.year # => "1999" ```
I suggest using integer. Both `Date` and `DateTime` have more precision than you want, which could be misleading. Even if you initialize them w/only a year, they will store a default month and day (Jan, 1). For example, if you used `Date`, your output would look like this: ``` >> m = YourModel.create(:year => '2008')...
11,441,468
New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?
2012/07/11
[ "https://Stackoverflow.com/questions/11441468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962382/" ]
Without knowing how you imported it exactly: sounds like you are looking for [Source attachment](https://stackoverflow.com/questions/122160/is-there-an-easy-way-to-attach-source-in-eclipse). It might be better if you use the [Solr source code](http://apache.mirror.clusters.cc/lucene/solr/3.6.0/) directly. Check the RE...
You can also check out the whole Lucene/Solr source: 1. install Subclipse add-in 2. choose `New...` > `Project...` 3. `SVN` > `Checkout projects from SVN...` 4. add [this link](http://svn.apache.org/repos/asf/lucene/dev) as new repository 5. select branch `/branches/lucene_solr_3_6` (if you want last stable version. U...
11,441,468
New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?
2012/07/11
[ "https://Stackoverflow.com/questions/11441468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962382/" ]
Without knowing how you imported it exactly: sounds like you are looking for [Source attachment](https://stackoverflow.com/questions/122160/is-there-an-easy-way-to-attach-source-in-eclipse). It might be better if you use the [Solr source code](http://apache.mirror.clusters.cc/lucene/solr/3.6.0/) directly. Check the RE...
Run solr like this: ``` java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 start.jar ``` Solr will start, but wait you to connect from Eclipse to continue. Then in Eclipse, go to: 1. Run / Debug Configurations... 2. Select Remote Java Application 3. Press New button to create a new rem...
11,441,468
New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?
2012/07/11
[ "https://Stackoverflow.com/questions/11441468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962382/" ]
Without knowing how you imported it exactly: sounds like you are looking for [Source attachment](https://stackoverflow.com/questions/122160/is-there-an-easy-way-to-attach-source-in-eclipse). It might be better if you use the [Solr source code](http://apache.mirror.clusters.cc/lucene/solr/3.6.0/) directly. Check the RE...
``` ./solr start -p 8983 -f -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=0.0.0.0:8000" ``` Start solr with 1. provide app run on port 8983 2. provide Xrunjdwp:transport=dt\_socket 3. remote ip address 0.0.0.0:8000 and then go to eclipse [![solr debug mode config in eclipse](https://i.stack....
11,441,468
New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?
2012/07/11
[ "https://Stackoverflow.com/questions/11441468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962382/" ]
You can also check out the whole Lucene/Solr source: 1. install Subclipse add-in 2. choose `New...` > `Project...` 3. `SVN` > `Checkout projects from SVN...` 4. add [this link](http://svn.apache.org/repos/asf/lucene/dev) as new repository 5. select branch `/branches/lucene_solr_3_6` (if you want last stable version. U...
``` ./solr start -p 8983 -f -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=0.0.0.0:8000" ``` Start solr with 1. provide app run on port 8983 2. provide Xrunjdwp:transport=dt\_socket 3. remote ip address 0.0.0.0:8000 and then go to eclipse [![solr debug mode config in eclipse](https://i.stack....
11,441,468
New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?
2012/07/11
[ "https://Stackoverflow.com/questions/11441468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962382/" ]
Run solr like this: ``` java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 start.jar ``` Solr will start, but wait you to connect from Eclipse to continue. Then in Eclipse, go to: 1. Run / Debug Configurations... 2. Select Remote Java Application 3. Press New button to create a new rem...
``` ./solr start -p 8983 -f -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=0.0.0.0:8000" ``` Start solr with 1. provide app run on port 8983 2. provide Xrunjdwp:transport=dt\_socket 3. remote ip address 0.0.0.0:8000 and then go to eclipse [![solr debug mode config in eclipse](https://i.stack....
10,323,548
I am not using a coding language. This has to be straight regex. I need to add a variable length of whitespace between two strings. The string I am passing to the regex has the number of whitespaces in the string itself and will need to be replaced: ``` string1 *27* string2 ``` so I need to insert 27 whitespaces i...
2012/04/25
[ "https://Stackoverflow.com/questions/10323548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183408/" ]
This is not possible with straight regex. Regex would need some sort of parsing capabilities to use the captured variable and translate it into repeating spaces. The way you want replace to work is not possible, also. As the replace portion of a regex is a straight text replace, and not another regex evaluator....it w...
One way using a `perl` flavour regexp: ``` perl -e ' $s = q[string1 *27* string2]; $s =~ s/\s+\*(\d+)\*\s+/" " x $1/e; print $s ' ``` Output: ``` string1 string2 ```
239,405
As stated from the questions title: **What does 'beta' state of a SE site actually imply?** Could someone elaborate, which restrictions or drawbacks we should expect from a *'beta'* SE site? I could have well been missing something, that's already been answered, or is an easy to find policies concept.
2014/09/15
[ "https://meta.stackexchange.com/questions/239405", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/186472/" ]
Beta sites aren't full sites. They're sites in a "trial" period, to see if they have the potential to become successful sites, or if interest in them wanes and the community dies out. From time to time, the site's community will be asked to [evaluate their site to ensure it is fulfilling its goal](https://meta.stackexc...
Also, in addition to [Troyen's great answer](https://meta.stackexchange.com/a/239406/184589), another significant difference is that on Beta sites there are no moderator elections. The moderators are instead hand-picked by the Community Managers from the pool of members that contribute with valuable content and demons...
239,405
As stated from the questions title: **What does 'beta' state of a SE site actually imply?** Could someone elaborate, which restrictions or drawbacks we should expect from a *'beta'* SE site? I could have well been missing something, that's already been answered, or is an easy to find policies concept.
2014/09/15
[ "https://meta.stackexchange.com/questions/239405", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/186472/" ]
Beta sites aren't full sites. They're sites in a "trial" period, to see if they have the potential to become successful sites, or if interest in them wanes and the community dies out. From time to time, the site's community will be asked to [evaluate their site to ensure it is fulfilling its goal](https://meta.stackexc...
Although this doesn't answer your question specifically, you can glean a lot about how sites are created and grow in Area 51. Some die on the vine too. [StackExchange Area 51](http://area51.stackexchange.com)
239,405
As stated from the questions title: **What does 'beta' state of a SE site actually imply?** Could someone elaborate, which restrictions or drawbacks we should expect from a *'beta'* SE site? I could have well been missing something, that's already been answered, or is an easy to find policies concept.
2014/09/15
[ "https://meta.stackexchange.com/questions/239405", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/186472/" ]
Also, in addition to [Troyen's great answer](https://meta.stackexchange.com/a/239406/184589), another significant difference is that on Beta sites there are no moderator elections. The moderators are instead hand-picked by the Community Managers from the pool of members that contribute with valuable content and demons...
Although this doesn't answer your question specifically, you can glean a lot about how sites are created and grow in Area 51. Some die on the vine too. [StackExchange Area 51](http://area51.stackexchange.com)
47,374,425
On my app, I'm trying to make it so that if a user has a certain condition, he will ALWAYS be redirected to a certain page, no matter which route he tries to access. In this case, it's if he doesn't have a username (long story). **ComposerServiceProvider.php** : ``` public function boot() { View::composer('templa...
2017/11/19
[ "https://Stackoverflow.com/questions/47374425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2280332/" ]
Try this steps: You can use middleware for this scenario like below: 1. Create middleware `php artisan make:middleware CheckPoint` Inside `App\Http\Middleware\CheckPoint.php` File ``` use Closure; class CheckPoint { /** * Handle an incoming request. * * @param \Illu...
In `App\Http\Middleware` **create a new middleware**: ``` <?php namespace App\Http\Middleware; use Closure; class CheckYourCondition { public function handle($request, Closure $next) { if (! $request->user()->yourCondition()) { return redirect('your_target_routre'); } re...
44,027,873
Here is my problem: I have a task running a Docker image on Amazon ECS but I would like to make a new Docker image from the running instance of the container. I see the id of the instance on Amazon ECS; I have made an AMI but I would like to make a new docker image that I can pull from Amazon. Any ideas? Regards an...
2017/05/17
[ "https://Stackoverflow.com/questions/44027873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/462794/" ]
To create a image from container execute the command below: > > `docker commit container_id imagename` > > >
You can run `docker commit` ([docs](https://docs.docker.com/engine/reference/commandline/commit/)) to save the container to an image, then push that image with a new tag to the registry.
44,027,873
Here is my problem: I have a task running a Docker image on Amazon ECS but I would like to make a new Docker image from the running instance of the container. I see the id of the instance on Amazon ECS; I have made an AMI but I would like to make a new docker image that I can pull from Amazon. Any ideas? Regards an...
2017/05/17
[ "https://Stackoverflow.com/questions/44027873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/462794/" ]
To create a image from container execute the command below: > > `docker commit container_id imagename` > > >
Apart from the answer provided by @Ben Whaley, I personally suggest you to **make use of Docker APIs.** To use Docker APIs you need to **configure the docker daemon port and the procedure is explained here** [configuring docker daemon port](https://stackoverflow.com/questions/43699368/unable-to-start-docker-after-confi...
44,027,873
Here is my problem: I have a task running a Docker image on Amazon ECS but I would like to make a new Docker image from the running instance of the container. I see the id of the instance on Amazon ECS; I have made an AMI but I would like to make a new docker image that I can pull from Amazon. Any ideas? Regards an...
2017/05/17
[ "https://Stackoverflow.com/questions/44027873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/462794/" ]
To create a image from container execute the command below: > > `docker commit container_id imagename` > > >
This can be easily done by using "docker commit". Let's say you need an image, based on the latest from NGINX, with PHP, build-essential, and nano installed. I'll walk you through the process of pulling the image, running the container, accessing the container, adding the software, and committing the changes to a new ...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Couldn't solve the problem that way. This code, however, seems to work. ``` BST Insert(int x, BST T) { BST temp=T; BST node=(BST)malloc(sizeof(struct TreeNode)); node->Element=x; node->Left=NULL; node->Right=NULL; if (T==NULL) { T=node; return(...
You have the bug in your insert function. As I may assume, initially your tree is empty. so the first time you insert a node, the second argument is NULL, right? Then this function always returns NULL to you as you always pass a NULL value.
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Couldn't solve the problem that way. This code, however, seems to work. ``` BST Insert(int x, BST T) { BST temp=T; BST node=(BST)malloc(sizeof(struct TreeNode)); node->Element=x; node->Left=NULL; node->Right=NULL; if (T==NULL) { T=node; return(...
``` template <class T> class TreeNode{ private: T data; TreeNode<T>* right,*left; public: void setData(T d){ this->data =d; } T getData(){ return this->data; } void setRight(TreeNode<T>* r){ this->right =r; } TreeNode<T>* getRight(){ return this->right; } void setLeft(TreeNode<T>* r){ this->...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Couldn't solve the problem that way. This code, however, seems to work. ``` BST Insert(int x, BST T) { BST temp=T; BST node=(BST)malloc(sizeof(struct TreeNode)); node->Element=x; node->Left=NULL; node->Right=NULL; if (T==NULL) { T=node; return(...
Here is my version , it seems to be working. ``` struct tree{ tree *left; tree *right; int key; }; void insertBst(int k,tree *t) { tree *newK = new tree[sizeof(tree)]; newK->key = k; newK->left = NULL; newK->right = NULL; if((t)->key == NULL) { t=newK; return; } else{ ...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Here: ``` BST Insert(int x, BST T) { BST temp_node = T; while( T != NULL) { if (x < T->Element) T = T->Left; else if (x >= T->Element) T = T->Right; } T = newNode(x); return temp_node; } ``` You navigate the tree until you hit `T == NULL`. Then you cre...
Here is my version , it seems to be working. ``` struct tree{ tree *left; tree *right; int key; }; void insertBst(int k,tree *t) { tree *newK = new tree[sizeof(tree)]; newK->key = k; newK->left = NULL; newK->right = NULL; if((t)->key == NULL) { t=newK; return; } else{ ...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Couldn't solve the problem that way. This code, however, seems to work. ``` BST Insert(int x, BST T) { BST temp=T; BST node=(BST)malloc(sizeof(struct TreeNode)); node->Element=x; node->Left=NULL; node->Right=NULL; if (T==NULL) { T=node; return(...
Here's My implementation of the aforementioned problem: ``` bst* newNode(int x) { bst* T = new bst; T->value = x; T->left_child = T->right_child = NULL; return T; } bst* bst_insert_iter(bst* T,int val) { if (T == NULL) T = newNode(val); else { bst *temp_node = T; bool fl...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Couldn't solve the problem that way. This code, however, seems to work. ``` BST Insert(int x, BST T) { BST temp=T; BST node=(BST)malloc(sizeof(struct TreeNode)); node->Element=x; node->Left=NULL; node->Right=NULL; if (T==NULL) { T=node; return(...
Here: ``` BST Insert(int x, BST T) { BST temp_node = T; while( T != NULL) { if (x < T->Element) T = T->Left; else if (x >= T->Element) T = T->Right; } T = newNode(x); return temp_node; } ``` You navigate the tree until you hit `T == NULL`. Then you cre...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Here's My implementation of the aforementioned problem: ``` bst* newNode(int x) { bst* T = new bst; T->value = x; T->left_child = T->right_child = NULL; return T; } bst* bst_insert_iter(bst* T,int val) { if (T == NULL) T = newNode(val); else { bst *temp_node = T; bool fl...
You have the bug in your insert function. As I may assume, initially your tree is empty. so the first time you insert a node, the second argument is NULL, right? Then this function always returns NULL to you as you always pass a NULL value.
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Here: ``` BST Insert(int x, BST T) { BST temp_node = T; while( T != NULL) { if (x < T->Element) T = T->Left; else if (x >= T->Element) T = T->Right; } T = newNode(x); return temp_node; } ``` You navigate the tree until you hit `T == NULL`. Then you cre...
``` template <class T> class TreeNode{ private: T data; TreeNode<T>* right,*left; public: void setData(T d){ this->data =d; } T getData(){ return this->data; } void setRight(TreeNode<T>* r){ this->right =r; } TreeNode<T>* getRight(){ return this->right; } void setLeft(TreeNode<T>* r){ this->...
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Here: ``` BST Insert(int x, BST T) { BST temp_node = T; while( T != NULL) { if (x < T->Element) T = T->Left; else if (x >= T->Element) T = T->Right; } T = newNode(x); return temp_node; } ``` You navigate the tree until you hit `T == NULL`. Then you cre...
You have the bug in your insert function. As I may assume, initially your tree is empty. so the first time you insert a node, the second argument is NULL, right? Then this function always returns NULL to you as you always pass a NULL value.
12,550,086
I came across some threads on StackOverflow but none of them quite cleared my doubts. So the problem is simple. I need to iteratively insert elements into a binary tree. And this is my code. ``` BST newNode(int x) { BSTNodePtr node = (BSTNodePtr) malloc(sizeof(struct TreeNode)); node->Element = x; node->L...
2012/09/23
[ "https://Stackoverflow.com/questions/12550086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1123924/" ]
Here's My implementation of the aforementioned problem: ``` bst* newNode(int x) { bst* T = new bst; T->value = x; T->left_child = T->right_child = NULL; return T; } bst* bst_insert_iter(bst* T,int val) { if (T == NULL) T = newNode(val); else { bst *temp_node = T; bool fl...
Here is my version , it seems to be working. ``` struct tree{ tree *left; tree *right; int key; }; void insertBst(int k,tree *t) { tree *newK = new tree[sizeof(tree)]; newK->key = k; newK->left = NULL; newK->right = NULL; if((t)->key == NULL) { t=newK; return; } else{ ...
2,289,518
> > How to calculate $5^{2003}$ mod $13$ > > > using fermats little theorem 5^13-1 1 mod 13 (5^12)^166+11 mod 13 a+b modn=(a modn + b modn) modn (1+11mod13)mod13 12 mod 13 = 12 why answer is 8 ? how do we calculate this thanks
2017/05/20
[ "https://math.stackexchange.com/questions/2289518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/437586/" ]
All modulo 13, $$5^{2003} \equiv (5^{2})^{1001} (5)$$ $$\equiv (-1)^{1001}(5)$$ $$\equiv -5$$ $$\equiv 8$$
$5^{13-1}= 5^{12} \equiv 1 \mod 13$ $5^{2003} = 5^{12\*166 +11} = (5^{12})^{166}\*5^{11} \equiv 5^{11} \mod 13$ $5^{11}\*5 = 5^{12}\equiv 1 \mod 13$ So if $5^{11} \equiv x \mod 13$ then $5^{11}$ is a solution to $5x \equiv 1 \mod 13$. .... $5x \equiv 1,14,27,40 \mod 13$ so $5^{11} \equiv x\equiv 8 \equiv -5 \mod ...
54,736,145
-How can I scale the Y- and X- axis to 0,30 and 0,50 respectively and plot the data point according to the scale? -How do I change the color of groups 1, 2 and 3 to purple, orange and yellow? ``` library(ggplot2) library(plotly) ID <- c("Group 1", "Group 1", "Group 1", "Group 2", "Group 2", "Group 2", "Group 3", "...
2019/02/17
[ "https://Stackoverflow.com/questions/54736145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9710121/" ]
First, convert the x and y columns to number (they are factors in the data). Then, set the scale limits using scale\_x\_continuous and scale\_y\_continuous. Finally, use scale\_fill\_manual to change the colors (since you have a fourth group, I gave it another color). ``` library(tidyverse) df <- df %>% mutate(x = par...
From the above comments I could solve it like this. ``` library(ggplot2) library(plotly) ID <- c("Group 1", "Group 1", "Group 1", "Group 2", "Group 2", "Group 2", "Group 3", "Group 3", "Group 3", "Group 1", "Group 1", "Group 1") area <- c("Area 1", "Area 1", "Area 1","Area 2", "Area 2", "Area 2", "Area 3", "Area 3", ...
29,226,198
I'm looking for function that **Open window explorer in C language**. I have found this [answer]**([How can I open Windows Explorer to a certain directory from within a WPF app?](https://stackoverflow.com/questions/1746079/how-can-i-open-windows-explorer-to-a-certain-directory-from-within-a-wpf-app))**, but this is C# ...
2015/03/24
[ "https://Stackoverflow.com/questions/29226198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4427613/" ]
Try using SHOpenFolderAndSelectItems() function, which can open files in windows explorer. <https://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx>
Given the stslib.h library contains the system() function that let's you run shell commands, you should be able to run the command to open a new windows explorer window using the same command you would use in the terminal window. A guideline: <http://www.programmingsimplified.com/c-program-shutdown-computer>
29,226,198
I'm looking for function that **Open window explorer in C language**. I have found this [answer]**([How can I open Windows Explorer to a certain directory from within a WPF app?](https://stackoverflow.com/questions/1746079/how-can-i-open-windows-explorer-to-a-certain-directory-from-within-a-wpf-app))**, but this is C# ...
2015/03/24
[ "https://Stackoverflow.com/questions/29226198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4427613/" ]
The simplest way to open a certain directory in an explorer (here c:\program files) may be: ``` system("start \"\" \"c:\\program files\""); ```
Try using SHOpenFolderAndSelectItems() function, which can open files in windows explorer. <https://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx>