qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
21,161,430
Is any convinient way to dynamically render some page inside application and then retrieve its contents as `InputStream` or `String`? For example, the simplest way is: ``` // generate url Link link = linkSource.createPageRenderLink("SomePageLink"); String urlAsString = link.toAbsoluteURI() + "...
2014/01/16
[ "https://Stackoverflow.com/questions/21161430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479414/" ]
From your implementation it seems that you are using naive A\* algorithm. Use following way:- > > 1. A\* is algorithm which is implemented using priority queue similar to BFS. > 2. Heuristic function is evaluated at each node to define its fitness to be selected as next node to be visited. > 3. As new node is visited...
1. Find bottlenecks of your implementation using profiler . [ex. jprofiler is easy to use](http://java.dzone.com/articles/jprofiler-your-java-code-could) 2. Use threads in areas where algorithm can run simultaneously. 3. Profile your JavaVM to run faster. [Allocate more RAM](http://www.wikihow.com/Allocate-More-RAM-to-...
21,161,430
Is any convinient way to dynamically render some page inside application and then retrieve its contents as `InputStream` or `String`? For example, the simplest way is: ``` // generate url Link link = linkSource.createPageRenderLink("SomePageLink"); String urlAsString = link.toAbsoluteURI() + "...
2014/01/16
[ "https://Stackoverflow.com/questions/21161430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479414/" ]
A linked list is not a good data structure for the open set. You have to find the node with the smallest F from it, you can either search through the list in O(n) or insert in sorted position in O(n), either way it's O(n). With a heap it's only O(log n). Updating the G score would remain O(n) (since you have to find th...
From your implementation it seems that you are using naive A\* algorithm. Use following way:- > > 1. A\* is algorithm which is implemented using priority queue similar to BFS. > 2. Heuristic function is evaluated at each node to define its fitness to be selected as next node to be visited. > 3. As new node is visited...
7,242,568
How can I chceck on iPhone with regularexpressions NSStrring contain only this chars: `a-zA-Z` numbers `0-9` or specialchars: `!@#$%^&*()_+-={}[]:"|;'\<>?,./`
2011/08/30
[ "https://Stackoverflow.com/questions/7242568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/919602/" ]
``` NSCharacterSet *charactersToRemove = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 "] invertedSet]; NSString *stringValueOfTextField = [[searchBar.text componentsSeparatedByCharactersInSet:charactersToRemove] ...
For this purposes you can use standard class [NSRegularExpression](http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html)
7,242,568
How can I chceck on iPhone with regularexpressions NSStrring contain only this chars: `a-zA-Z` numbers `0-9` or specialchars: `!@#$%^&*()_+-={}[]:"|;'\<>?,./`
2011/08/30
[ "https://Stackoverflow.com/questions/7242568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/919602/" ]
``` NSCharacterSet *charactersToRemove = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 "] invertedSet]; NSString *stringValueOfTextField = [[searchBar.text componentsSeparatedByCharactersInSet:charactersToRemove] ...
``` NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\w[!@#$%^&*()_+-={}\[\]:\"|;'\<>?,./]" options:NSRegularExpressionCaseInsensitive error:&error]; NSUInteger numberOfMatches = [regex numberOfMatchesInString:string ...
41,503,110
What I need is to enable android location service and to set the current location as a destination, then when I close the application and going to another location and coming back to the original location (or when I will be close to the original location) I want the location service to identify that I am now in the ori...
2017/01/06
[ "https://Stackoverflow.com/questions/41503110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7383294/" ]
You need to add encoding. Try this, ``` src = $('#googlemap').attr('src'); src = encodeURI(src); $('#googlemap').attr('src', src); ```
``` str.replace(/[ø]/g,'%C3%B8'); ``` use regular expression to solve it. The above code will replace the special character.
41,503,110
What I need is to enable android location service and to set the current location as a destination, then when I close the application and going to another location and coming back to the original location (or when I will be close to the original location) I want the location service to identify that I am now in the ori...
2017/01/06
[ "https://Stackoverflow.com/questions/41503110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7383294/" ]
You need to add encoding. Try this, ``` src = $('#googlemap').attr('src'); src = encodeURI(src); $('#googlemap').attr('src', src); ```
It does actually. The `replace` function return a new string. Store new string into variable and change the src back. ``` var src; var newStr; src = $('#googlemap').attr('src'); newStr = src.replace('ø', '%C3%B8'); console.log(src); console.log(newStr); $('#googlemap').attr('src', newStr); ```
12,791,129
I call an activity called Activity1 from an Activity called MainActivity using the following: ``` Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivi...
2012/10/09
[ "https://Stackoverflow.com/questions/12791129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/992706/" ]
I don't believe you need to call the "finish()" method on onBackPressed. Android does that for you when you press the back button. The onBackPressed is used to last minuet tidy up (save stuff to sharepreferences, etc). Android default behaviour is to call onCreate whenever a new activity is place on the screen. You c...
in Actitity1 you define your WebView as: ``` private static WebView webView = null; ``` in `onCreate()` you only create it if it's null: ``` if(webView == null){ //create webview and load from network } ``` Use this approach wisely as it may easly lead to memory leaks if you point to objects in other activities...
26,361,849
I've designed a program that can encrypt 26 English letters. Here's how I'm handling the input. I'm reading it from a text file and stores it in a string. ``` ifstream L; string str1; char ch; L.open("ToBeCoded.txt"); while(iL.get(ch)) str1.push_back(ch); ``` However, it's inefficient, if I want to read a diffe...
2014/10/14
[ "https://Stackoverflow.com/questions/26361849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3839908/" ]
you can use istream getline instead <http://www.cplusplus.com/reference/istream/istream/getline/>
If you are on Windows you can use DragAcceptFiles and WM\_DROPFILES messages. More details here: <http://msdn.microsoft.com/en-us/library/bb776406(VS.85).aspx> <http://msdn.microsoft.com/en-us/library/bb774303(VS.85).aspx>
26,361,849
I've designed a program that can encrypt 26 English letters. Here's how I'm handling the input. I'm reading it from a text file and stores it in a string. ``` ifstream L; string str1; char ch; L.open("ToBeCoded.txt"); while(iL.get(ch)) str1.push_back(ch); ``` However, it's inefficient, if I want to read a diffe...
2014/10/14
[ "https://Stackoverflow.com/questions/26361849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3839908/" ]
I would suggest you use the `getline` for this kind of problem. <http://www.cplusplus.com/reference/string/string/getline/?kw=getline> getline is an ifstream function that will get the string user efficiently. If you wanted to get the whole string file, just go to the link that Neil Kirk posted: [Read whole ...
If you are on Windows you can use DragAcceptFiles and WM\_DROPFILES messages. More details here: <http://msdn.microsoft.com/en-us/library/bb776406(VS.85).aspx> <http://msdn.microsoft.com/en-us/library/bb774303(VS.85).aspx>
1,043,246
does nhibernate parse xml files everytime someone makes a request or just once when the application starts ? well here is what i m doing : ``` public class SessionManager { private readonly ISessionFactory _sessionFactory; public SessionManager() { _sessionFactory = GetSessionFactory(); } ...
2009/06/25
[ "https://Stackoverflow.com/questions/1043246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/72443/" ]
Once each time you instantiate an ISessionFactory off the top of my head...
It does it only once. If you would like to improve the performance of the application, use ngen.exe tool. nHibernate is usually slow for the first time, because of the amount of code that need to be compiled when the application starts for the first time. I had similiar probles with performance at application startup...
94,809
I have one requirement to update the customer first name and last name in address information section. I tried through csv file import/export method but it only update in account information section not in address information such as billing and shipping address in admin panel(customer->manage customer section). Curre...
2015/12/23
[ "https://magento.stackexchange.com/questions/94809", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/28881/" ]
Go admin side `System -> Import/Export -> Export` and Export all customer with all data After your exported csv file updates bellow header fields data ``` _address_firstname _address_lastname ``` Go admin side `System -> Import/Export -> Import` and upload your updated csv file **Make bellow settings :** 1. Enti...
**Select File to Import \*: upload updated file.** Its not uploading only processing.
66,760,581
Have to show one textbox only at a time, if click on toggle need to hide first textbox and need to show second textbox. If I click again need to show first textbox and hide second textbox. Tried below, but unable to display one textbox onload itself... HTML: ``` <div><input *ngIf="text1" id="test1" type="text" ...
2021/03/23
[ "https://Stackoverflow.com/questions/66760581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1989472/" ]
You can use 1booleanItem ```typescript toggle() { this.text1 = !this.text1; } ``` ```html <div><input *ngIf="text1" id="test1" type="text" placeholder="Textbox1" /> </div> <div> <input *ngIf="!text1" id="test2" type="text" placeholder="Textbox2" /> </div> <button (click)="toggle()">Toggle</button>...
> > Tried below, but unable to display one textbox onload itself > > > you can set the boolean of one of the text boxes to true: ``` public text1: boolean = true; ``` Using a single variable to track the visibility: ``` export class NgbdTypeaheadTemplate { public showText1: boolean = true; toggle() { ...
29,847
An often repeated phrase I hear is that "The enemies of the Christian are world, the flesh, and the devil." But I wonder, does God's word reveal to us that there are more enemies than those 3 that we should be wary of? The phrase above is not a phrase in the bible but it's no doubt passed around because it's easy to r...
2014/06/10
[ "https://christianity.stackexchange.com/questions/29847", "https://christianity.stackexchange.com", "https://christianity.stackexchange.com/users/11471/" ]
The phrase in question comes from the [Book of Common Prayer](http://en.wikipedia.org/wiki/Book_of_Common_Prayer), from [the Litany](http://justus.anglican.org/resources/bcp/1928/Litany.htm). > > FROM all evil and mischief; from sin; from the crafts and assaults of the devil; from thy wrath, and from everlasting damn...
The apostle John uses the word *world* (Greek transliteration, *cosmos*) 26 times in 1 John, 2 John, and Revelation (NIV). Here's how he unpacks the word in 1 John 2:16,17: > > "For all that is in the world, the lust of the flesh and the lust of the eyes and the boastful pride of life, is not from the Father, but is ...
51,554
I use a site on a regular basis so I wanted to make sure it was secure. One of the things I checked was that when I changed my first name to `<img src="http://blah.blah/blah/blah.notanextension" onerror=alert(document.cookie);>Henry` that it didn't give me the alert with all of my cookies (I had already determined that...
2014/02/14
[ "https://security.stackexchange.com/questions/51554", "https://security.stackexchange.com", "https://security.stackexchange.com/users/36184/" ]
Yes it could be a problem. It depends on the point that the first name field is sanitized. My first impressions that it was a DOM update that caused the alert to be shown (see [DOM based XSS](https://www.owasp.org/index.php/DOM_Based_XSS)). However, as you said you could refresh the page this is unlikely unless a hash ...
So from what you're saying it sounds like the update isn't persisted to the database, it shows on the page when you save it, but not if you navigate away and then back. If that's the case then this is likely to be a limited risk (not to say I wouldn't recommend fixing it though), as it would be hard to construct a val...
53,084,564
I am trying to find the maximum value in two array of zeros which I have populated using a loop as follows: ``` dydx = zeros(n+1) error = zeros(n+1) for i in range(n): dydx[i]=(y[i+1]-y[i])/h error[i]= cos(i)-dydx[i] ``` If I try to find `i = np.argmax(dydx)` I get a non callable error?
2018/10/31
[ "https://Stackoverflow.com/questions/53084564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10031292/" ]
Try using `np.max(dxdy)`. It should give you the max value.
Are you trying to solve a Euler's value. I.e. something like this? ``` import numpy as np x0=0 y0=1 xf=10 n=101 deltax=(xf-x0)/(n-1) x=np.linspace(x0,xf,n) y = np.zeros( [n] ) y[0]=y0 for i in range(1,n): y[i] = deltax*(-y[i-1] + np.sin(x[i-1]))+y[i-1] #for i in range ( n ) : # print ( x[i] , y[i] ) print(m...
53,084,564
I am trying to find the maximum value in two array of zeros which I have populated using a loop as follows: ``` dydx = zeros(n+1) error = zeros(n+1) for i in range(n): dydx[i]=(y[i+1]-y[i])/h error[i]= cos(i)-dydx[i] ``` If I try to find `i = np.argmax(dydx)` I get a non callable error?
2018/10/31
[ "https://Stackoverflow.com/questions/53084564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10031292/" ]
Try using `np.max(dxdy)`. It should give you the max value.
Is the above your full code, and are you using `zeros()` as a function or a list, `zeros=[]`? If it is a list, it cannot be called. When I tried the following, no error is returned: ``` def zeros(): n=0 dydx = zeros(n+1) error = zeros(n+1) for i in range(n): dydx[i]=(y[i+1]-y[i])/h error[i]= cos(i...
40,008,286
I want to bring up an EC2 instance at a particular time, run a java batch job and shut the instance down once done, using Java. I figured out how to bring up the instance and run my job. Need to know how can i shut it down once the job is done. Found out that it is possible by changing the "setDesiredCapacity" of the a...
2016/10/12
[ "https://Stackoverflow.com/questions/40008286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5118784/" ]
It appears that your requirements are: * On a regular schedule, start an Amazon EC2 instance that will run a batch job * At the conclusion of the job, terminate the EC2 instance Instead of using Auto Scaling (which is designed to dynamically scale capacity based upon demand), I would recommend: * **Use a schedule to...
You can use the following- * Cloudwatch Event Rule as Scheduler. Target would be Lambda in point 2. * Lambda to change the desired capacity of auto scaling group by calling "setDesiredCapacity" of the auto scaling group. * In order to shut down the instances after the batch job is complete, please use the AWS Java SDK...
94,648
The below Python 3 program scans 4 files `a.txt`, `b.txt`, `c.txt`, `d.txt` and then outputs the read data into a file `output.txt` in a formatted way. The first line of each file is guaranteed to have a header and the second line of each file will be blank. I'm required to scan those four files. Program: ``` def mai...
2015/06/25
[ "https://codereview.stackexchange.com/questions/94648", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/70403/" ]
If possible, use the new Java 8 datetime API (and there does not seem to be a constraint to use any older version). It is less cumbersome to do such operations there. You can get the difference in weeks easier and it is probably more readable. With `TemporalAdjusters` you can start from the first day of a month and go ...
The week does not start with a Monday in all regions (e.g. in the U.S., Sunday is the first day of the week). Therefore, instead of `Calendar.MONDAY`, you should use the `Calendar` method `getFirstDayOfWeek()` to determine the first day of the week (and compute the last day of the week from this value).
94,648
The below Python 3 program scans 4 files `a.txt`, `b.txt`, `c.txt`, `d.txt` and then outputs the read data into a file `output.txt` in a formatted way. The first line of each file is guaranteed to have a header and the second line of each file will be blank. I'm required to scan those four files. Program: ``` def mai...
2015/06/25
[ "https://codereview.stackexchange.com/questions/94648", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/70403/" ]
> > > ``` > public int year; > public String m1; > public String m2; > > > public Solution(int Y, String A, String B) throws ParseException { > this.year = Y; > this.m1 = A; > this.m2 = B; > > ``` > > These fields shouldn't be public. By making them public you've exposed them to the outside world. T...
The week does not start with a Monday in all regions (e.g. in the U.S., Sunday is the first day of the week). Therefore, instead of `Calendar.MONDAY`, you should use the `Calendar` method `getFirstDayOfWeek()` to determine the first day of the week (and compute the last day of the week from this value).
1,469,187
I have two computers on the same Wifi router. I want to ping the other one, it does not happen, I get a "destination host unreachable". Things I've already tried: I disabled the Firewall on both computers I tried to ping myself on both computers, I get a reply I capture the traffic in Wireshark, I can capture the ...
2019/08/08
[ "https://superuser.com/questions/1469187", "https://superuser.com", "https://superuser.com/users/169917/" ]
The question is identical to [Why does my remote process still run after killing an ssh session?](https://superuser.com/questions/20679/why-does-my-remote-process-still-run-after-killing-an-ssh-session). Also the answer is. By simply forcing the pseudo-TTY with `-t` on kill of PuTTY, the command on server end will end...
just add -t option can solve this problem
9,935,259
I have `Car` (table `cars`) method that `has_many` owners (table `owners`). How can I choose all cars, that has no owners (== in the table `owners` is no one row with respective car's ID)?
2012/03/29
[ "https://Stackoverflow.com/questions/9935259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/984621/" ]
I would do it as per below in the model.... ``` @cars_without_owners = Car.where("owner_id = ?", nil) ``` or to be safe.... ``` @cars_without_owners = Car.where("owner_id = ? OR owner_id = ?", nil, "") ```
You could use this, although it would be very slow if your tables have many records: ``` Car.where("not exists (select o.id from owners as o where o.car_id = cars.id)") ```
264,311
**I have 4 reserved instances with a few months left:** c1.medium (active) m1.small (active) m1.small (active) t1.micro (active) **In "My Instances" i see 5 stopped instances, and 4 running:** m1.small m1.small m1.large c1.medium **In the billing section, it's clear that i am billed for the ...
2011/04/28
[ "https://serverfault.com/questions/264311", "https://serverfault.com", "https://serverfault.com/users/79776/" ]
Your instances should automatically take advantage of reserve if there are reserves available. However, you have to remember that reserve [comes with a number of limitations](http://theagileadmin.com/2011/03/31/why-amazon-reserve-instances-torment-me/) - when you buy reserve they are locked to 1. Instance type 2. Ava...
Reserved instances are still on-demand instances, they have an hourly charge. That hourly charge is just cheaper than for a non-reserved on-demand instance.
64,422
On The New York Times I read the following sentence: > > The bad news here begins with the economy, which stinks. This is the > epicenter of the *dot-bomb*, the edge of the ailing Pacific Rim and > now a major casualty of tourist malaise. > > > What does *dot-bomb* mean?
2012/04/16
[ "https://english.stackexchange.com/questions/64422", "https://english.stackexchange.com", "https://english.stackexchange.com/users/24531/" ]
It's referring to the economic collapse of the "dot-com" boom, which occurred in the late 1990s. [This Wikipedia article](http://en.wikipedia.org/wiki/Dot-com_bubble) explains it rather well.
I don't have too many authoritative references, but I'd say that in this case it's probably a synecdoche, putting *dot-bomb*, a failed dot-com, for the *dot-com bust*, when a bunch of dot-coms failed. > > * NOAD and Oxford Dictionaries Online: `informal` an unsuccessful dot-com [ODO dot-com company]: : *many promisin...
64,422
On The New York Times I read the following sentence: > > The bad news here begins with the economy, which stinks. This is the > epicenter of the *dot-bomb*, the edge of the ailing Pacific Rim and > now a major casualty of tourist malaise. > > > What does *dot-bomb* mean?
2012/04/16
[ "https://english.stackexchange.com/questions/64422", "https://english.stackexchange.com", "https://english.stackexchange.com/users/24531/" ]
It generally means that the new dot-com economy will collapse. ie "bomb" in AE=to fail spectacularly. dot-com + bomb -> dot-bomb
I don't have too many authoritative references, but I'd say that in this case it's probably a synecdoche, putting *dot-bomb*, a failed dot-com, for the *dot-com bust*, when a bunch of dot-coms failed. > > * NOAD and Oxford Dictionaries Online: `informal` an unsuccessful dot-com [ODO dot-com company]: : *many promisin...
64,101,764
I want to change the background image of a project component when you hover over it. The img is in the array object. I already pull 'naam' and 'wat' from it, but the 'hover over and change the background to the img image' part I don't get. What do I need to do to make this work? I can't wrap my head around it. This i...
2020/09/28
[ "https://Stackoverflow.com/questions/64101764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12051775/" ]
I don't understand, for which component you want to change your background, but generally: ``` const imgs = ['imgOffHover.png', 'imgOnHover.png'] ImageDiv = () => { [bcgImg, setBcgImg] = useState(imgs[0]) return ( <div onMouseEnter={() => setBcgImg(imgs[1])} onMouseLeave={() => setBcgImg(imgs[0])}...
You can use css instead of JSX events like this [answer](https://stackoverflow.com/questions/41503150/adding-style-attributes-to-a-css-class-dynamically-in-react-app/55998158#55998158) You could state your backgrounds in your class like so: ``` .my-image-class { background-image: var(--my-image); background-repeat:...
64,101,764
I want to change the background image of a project component when you hover over it. The img is in the array object. I already pull 'naam' and 'wat' from it, but the 'hover over and change the background to the img image' part I don't get. What do I need to do to make this work? I can't wrap my head around it. This i...
2020/09/28
[ "https://Stackoverflow.com/questions/64101764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12051775/" ]
I don't understand, for which component you want to change your background, but generally: ``` const imgs = ['imgOffHover.png', 'imgOnHover.png'] ImageDiv = () => { [bcgImg, setBcgImg] = useState(imgs[0]) return ( <div onMouseEnter={() => setBcgImg(imgs[1])} onMouseLeave={() => setBcgImg(imgs[0])}...
So as far as i get it you want to change your components background.I made a solution which works as follows: * First make a state in functional component which will save your background image value ``` const [BgImg, setBgImg] = useState("") ``` * Second step make a mouse enter and mouse leave events that will be ca...
64,101,764
I want to change the background image of a project component when you hover over it. The img is in the array object. I already pull 'naam' and 'wat' from it, but the 'hover over and change the background to the img image' part I don't get. What do I need to do to make this work? I can't wrap my head around it. This i...
2020/09/28
[ "https://Stackoverflow.com/questions/64101764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12051775/" ]
So as far as i get it you want to change your components background.I made a solution which works as follows: * First make a state in functional component which will save your background image value ``` const [BgImg, setBgImg] = useState("") ``` * Second step make a mouse enter and mouse leave events that will be ca...
You can use css instead of JSX events like this [answer](https://stackoverflow.com/questions/41503150/adding-style-attributes-to-a-css-class-dynamically-in-react-app/55998158#55998158) You could state your backgrounds in your class like so: ``` .my-image-class { background-image: var(--my-image); background-repeat:...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
Top-to-bottom, then left-to-right: * Pythagorean Theorem * Area under a Gaussian (Normal distribution) * Fourier synthesis * Solution to a quadratic equation * Volume of a sphere * Differential cross section to the scattering amplitude in scattering theory (thanks to @SamFisher) * Raising operator for the quantum harm...
I'm a bit late to the party. However, here is a partial transcription, equation by equation: > > $$c^2 = a^2 + b^2$$ > > > This is the Pythagorean theorem, and corresponds to the right triangle labeled above. > > $$ > \int\_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi} > $$ > > > The [Gaussian integral](https:...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
Top-to-bottom, then left-to-right: * Pythagorean Theorem * Area under a Gaussian (Normal distribution) * Fourier synthesis * Solution to a quadratic equation * Volume of a sphere * Differential cross section to the scattering amplitude in scattering theory (thanks to @SamFisher) * Raising operator for the quantum harm...
To add a correction to David's answer, $\frac{d\sigma}{d\Omega} = |f(\theta, \phi)|^2$ relates the differential cross section to the scattering amplitude in scattering theory. The equation involving $J\_\pm$ shows the action of the raising ($+$) and lowering ($-$) operators on angular momentum eigenstates in quantum m...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
Top-to-bottom, then left-to-right: * Pythagorean Theorem * Area under a Gaussian (Normal distribution) * Fourier synthesis * Solution to a quadratic equation * Volume of a sphere * Differential cross section to the scattering amplitude in scattering theory (thanks to @SamFisher) * Raising operator for the quantum harm...
The right-hand-side is taken from the preface to Srednicki's textbook *Quantum Field Theory* (page 8), available online on [his webpage](https://web.physics.ucsb.edu/~mark/qft.html): [![enter image description here](https://i.stack.imgur.com/nyein.png)](https://i.stack.imgur.com/nyein.png) These are mostly equations ...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
Top-to-bottom, then left-to-right: * Pythagorean Theorem * Area under a Gaussian (Normal distribution) * Fourier synthesis * Solution to a quadratic equation * Volume of a sphere * Differential cross section to the scattering amplitude in scattering theory (thanks to @SamFisher) * Raising operator for the quantum harm...
Welp, here is my Latex practice for today. I will be going down the left side then move on to the right side, going down. 1. Pythagoras' Theorem: First off, we see a triangle with sides labeled $a$, $b$, and $c$, with below it, the equation $$a^2+b^2=c^2$$ This is, of course, Pythagoras' famous theorem and applies to...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
The right-hand-side is taken from the preface to Srednicki's textbook *Quantum Field Theory* (page 8), available online on [his webpage](https://web.physics.ucsb.edu/~mark/qft.html): [![enter image description here](https://i.stack.imgur.com/nyein.png)](https://i.stack.imgur.com/nyein.png) These are mostly equations ...
I'm a bit late to the party. However, here is a partial transcription, equation by equation: > > $$c^2 = a^2 + b^2$$ > > > This is the Pythagorean theorem, and corresponds to the right triangle labeled above. > > $$ > \int\_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi} > $$ > > > The [Gaussian integral](https:...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
The right-hand-side is taken from the preface to Srednicki's textbook *Quantum Field Theory* (page 8), available online on [his webpage](https://web.physics.ucsb.edu/~mark/qft.html): [![enter image description here](https://i.stack.imgur.com/nyein.png)](https://i.stack.imgur.com/nyein.png) These are mostly equations ...
To add a correction to David's answer, $\frac{d\sigma}{d\Omega} = |f(\theta, \phi)|^2$ relates the differential cross section to the scattering amplitude in scattering theory. The equation involving $J\_\pm$ shows the action of the raising ($+$) and lowering ($-$) operators on angular momentum eigenstates in quantum m...
2,892,685
I'm the sole author of a paper and in my introduction I've written: > > We are able to talk about... Doing so we manage to capture ... We accomplish this by embedding... > > > and I'm wondering whether it's correct to talk about myself in the plural like that, similar to the way that mathematicians tend to write ...
2018/08/24
[ "https://math.stackexchange.com/questions/2892685", "https://math.stackexchange.com", "https://math.stackexchange.com/users/90380/" ]
The right-hand-side is taken from the preface to Srednicki's textbook *Quantum Field Theory* (page 8), available online on [his webpage](https://web.physics.ucsb.edu/~mark/qft.html): [![enter image description here](https://i.stack.imgur.com/nyein.png)](https://i.stack.imgur.com/nyein.png) These are mostly equations ...
Welp, here is my Latex practice for today. I will be going down the left side then move on to the right side, going down. 1. Pythagoras' Theorem: First off, we see a triangle with sides labeled $a$, $b$, and $c$, with below it, the equation $$a^2+b^2=c^2$$ This is, of course, Pythagoras' famous theorem and applies to...
8,174,556
Here's an [example on JSFiddle](http://jsfiddle.net/haGWe/3/). Excerpt of code: ``` <table style="height:100%"> <tr height="20"><td></td></tr> <tr> <td>This gray cell fits all available height of table</td> </tr> <tr height="20"><td></td></tr> </table> ``` There is a table with three rows. Ro...
2011/11/17
[ "https://Stackoverflow.com/questions/8174556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052640/" ]
It sounds a bit like [mod\_security](https://modsecurity.org/), switched on and in its most aggressive mode, and it thinks you're trying to hack the site. The reason I say it only sounds a *bit* like that is because no-one should normally configure it to check POST data because that causes far too many false positives....
if you wish to use the following `base64encode()` and insert ,after read `base64decode()`
8,174,556
Here's an [example on JSFiddle](http://jsfiddle.net/haGWe/3/). Excerpt of code: ``` <table style="height:100%"> <tr height="20"><td></td></tr> <tr> <td>This gray cell fits all available height of table</td> </tr> <tr height="20"><td></td></tr> </table> ``` There is a table with three rows. Ro...
2011/11/17
[ "https://Stackoverflow.com/questions/8174556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052640/" ]
It sounds a bit like [mod\_security](https://modsecurity.org/), switched on and in its most aggressive mode, and it thinks you're trying to hack the site. The reason I say it only sounds a *bit* like that is because no-one should normally configure it to check POST data because that causes far too many false positives....
Send this into your db ``` <a href=www.google.com>Google</a> ``` or When called from db ``` echo "http://".$row_TabelName['RowName']; ``` It should solve your issue.
8,174,556
Here's an [example on JSFiddle](http://jsfiddle.net/haGWe/3/). Excerpt of code: ``` <table style="height:100%"> <tr height="20"><td></td></tr> <tr> <td>This gray cell fits all available height of table</td> </tr> <tr height="20"><td></td></tr> </table> ``` There is a table with three rows. Ro...
2011/11/17
[ "https://Stackoverflow.com/questions/8174556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052640/" ]
It sounds a bit like [mod\_security](https://modsecurity.org/), switched on and in its most aggressive mode, and it thinks you're trying to hack the site. The reason I say it only sounds a *bit* like that is because no-one should normally configure it to check POST data because that causes far too many false positives....
try: ``` if($_POST && !empty($_POST['save'])){ $text = mysql_real_escape_string(htmlentities($_POST['textarea'])); $title = mysql_real_escape_string(htmlentities($_POST['title'])); ```
8,174,556
Here's an [example on JSFiddle](http://jsfiddle.net/haGWe/3/). Excerpt of code: ``` <table style="height:100%"> <tr height="20"><td></td></tr> <tr> <td>This gray cell fits all available height of table</td> </tr> <tr height="20"><td></td></tr> </table> ``` There is a table with three rows. Ro...
2011/11/17
[ "https://Stackoverflow.com/questions/8174556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052640/" ]
try: ``` if($_POST && !empty($_POST['save'])){ $text = mysql_real_escape_string(htmlentities($_POST['textarea'])); $title = mysql_real_escape_string(htmlentities($_POST['title'])); ```
if you wish to use the following `base64encode()` and insert ,after read `base64decode()`
8,174,556
Here's an [example on JSFiddle](http://jsfiddle.net/haGWe/3/). Excerpt of code: ``` <table style="height:100%"> <tr height="20"><td></td></tr> <tr> <td>This gray cell fits all available height of table</td> </tr> <tr height="20"><td></td></tr> </table> ``` There is a table with three rows. Ro...
2011/11/17
[ "https://Stackoverflow.com/questions/8174556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052640/" ]
try: ``` if($_POST && !empty($_POST['save'])){ $text = mysql_real_escape_string(htmlentities($_POST['textarea'])); $title = mysql_real_escape_string(htmlentities($_POST['title'])); ```
Send this into your db ``` <a href=www.google.com>Google</a> ``` or When called from db ``` echo "http://".$row_TabelName['RowName']; ``` It should solve your issue.
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
Since it seems a bit strange to use induction to solve for particular case ($17^{200} - 1$), and it seems from your question that you want to see this solved via an inductive proof, let's use induction to solve a somewhat more general problem, and recover this particular example as a special case. So, let's make the c...
$17^{200} - 1$ is clearly even and so it remains to prove that it is a multiple of $5$. Now, $17^{200}= (15+2)^{200}=15a+2^{200}$. So it suffices to prove that $2^{200}-1$ is a multiple of $5$. Indeed, $2^{200}=(2^{4})^{50}=16^{50}=(5b+1)^{50}=5c+1$.
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
Since it seems a bit strange to use induction to solve for particular case ($17^{200} - 1$), and it seems from your question that you want to see this solved via an inductive proof, let's use induction to solve a somewhat more general problem, and recover this particular example as a special case. So, let's make the c...
We need to prove that for all $n$, $17^{4n} -1$ is divisible by 10. Consider when n=1: $17^{4} - 1 = (17^{2} - 1)(17^{2} +1)=(288)(290)$ this is obviously divisible by 10. Assume for some integer k that $17^{4k} -1$ is divisible by 10. Then $17^{4(k+1)} -1 =17^{4k+4} -1=(17^{4})(17^{4k}) -1 = (17^{4k} -1) + (17^{...
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
Since it seems a bit strange to use induction to solve for particular case ($17^{200} - 1$), and it seems from your question that you want to see this solved via an inductive proof, let's use induction to solve a somewhat more general problem, and recover this particular example as a special case. So, let's make the c...
Here is another proof that $k(k^4-1)$ is divisible by $10$, using some "fun" observations ;) The base case is $2(2^4-1) = 30$, which is easily seen to be $3\cdot10$ Assume $k^5-k = 10 a$ for some $a \in \mathbb{Z}$ $$(k+1)^5-(k+1)$$ $$=\left(k^5+5k^4+10k^3+10k^2+5k+1\right)-(k+1)$$ $$=k^5+5k^4+10k^3+10k^2+5k-k$$ $$...
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
Since it seems a bit strange to use induction to solve for particular case ($17^{200} - 1$), and it seems from your question that you want to see this solved via an inductive proof, let's use induction to solve a somewhat more general problem, and recover this particular example as a special case. So, let's make the c...
Consider a number with a $7$ in its units place. As we take powers of it, the units digit proceeds: $$7, 9, 3, 1, 7, 9, 3, 1, \ldots$$ Notice that when raised to a power that is a multiple of $4$, such a number ends up with a $1$ in its units place. Since $17$ has a $7$ in its units place, and since $200$ is a multip...
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
$17^{200} - 1$ is clearly even and so it remains to prove that it is a multiple of $5$. Now, $17^{200}= (15+2)^{200}=15a+2^{200}$. So it suffices to prove that $2^{200}-1$ is a multiple of $5$. Indeed, $2^{200}=(2^{4})^{50}=16^{50}=(5b+1)^{50}=5c+1$.
Here is another proof that $k(k^4-1)$ is divisible by $10$, using some "fun" observations ;) The base case is $2(2^4-1) = 30$, which is easily seen to be $3\cdot10$ Assume $k^5-k = 10 a$ for some $a \in \mathbb{Z}$ $$(k+1)^5-(k+1)$$ $$=\left(k^5+5k^4+10k^3+10k^2+5k+1\right)-(k+1)$$ $$=k^5+5k^4+10k^3+10k^2+5k-k$$ $$...
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
We need to prove that for all $n$, $17^{4n} -1$ is divisible by 10. Consider when n=1: $17^{4} - 1 = (17^{2} - 1)(17^{2} +1)=(288)(290)$ this is obviously divisible by 10. Assume for some integer k that $17^{4k} -1$ is divisible by 10. Then $17^{4(k+1)} -1 =17^{4k+4} -1=(17^{4})(17^{4k}) -1 = (17^{4k} -1) + (17^{...
Here is another proof that $k(k^4-1)$ is divisible by $10$, using some "fun" observations ;) The base case is $2(2^4-1) = 30$, which is easily seen to be $3\cdot10$ Assume $k^5-k = 10 a$ for some $a \in \mathbb{Z}$ $$(k+1)^5-(k+1)$$ $$=\left(k^5+5k^4+10k^3+10k^2+5k+1\right)-(k+1)$$ $$=k^5+5k^4+10k^3+10k^2+5k-k$$ $$...
1,564,981
I am trying to figure out how to prove $17^{200} - 1$ is a multiple of $10$. I am talking simple algebra stuff once everything is set in place. I have to use mathematical induction. I figure I need to split $17^{200}$ into something like $(17^{40})^5 - 1$ and have it as $n = 17^{40}$ and $n^5 - 1$. I just don't know...
2015/12/07
[ "https://math.stackexchange.com/questions/1564981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/296815/" ]
Consider a number with a $7$ in its units place. As we take powers of it, the units digit proceeds: $$7, 9, 3, 1, 7, 9, 3, 1, \ldots$$ Notice that when raised to a power that is a multiple of $4$, such a number ends up with a $1$ in its units place. Since $17$ has a $7$ in its units place, and since $200$ is a multip...
Here is another proof that $k(k^4-1)$ is divisible by $10$, using some "fun" observations ;) The base case is $2(2^4-1) = 30$, which is easily seen to be $3\cdot10$ Assume $k^5-k = 10 a$ for some $a \in \mathbb{Z}$ $$(k+1)^5-(k+1)$$ $$=\left(k^5+5k^4+10k^3+10k^2+5k+1\right)-(k+1)$$ $$=k^5+5k^4+10k^3+10k^2+5k-k$$ $$...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
1) Your functions, in order to be polymorphic, should be marked with **virtual** 2) Templated functions are instantiated at the POI and can't be virtual (what is the signature??How many vtable entries do you reserve?). **Templated functions are a compile-time mechanism, virtual functions a runtime one**. Some possibl...
Template methods cannot be virtual. One solution is to use static polymorphism to simulate the behavior of "template virtual" methods: ``` #include <iostream> #include <stdexcept> #include <string> template<typename D> class Base { template<typename T> std::string _method() { return "Base"; } public: tem...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
1) Your functions, in order to be polymorphic, should be marked with **virtual** 2) Templated functions are instantiated at the POI and can't be virtual (what is the signature??How many vtable entries do you reserve?). **Templated functions are a compile-time mechanism, virtual functions a runtime one**. Some possibl...
Another possible aproach to make your example work as you expect is to use `std::function`: ``` class Base { public: Base() { virtualFunction = [] () -> string { return {"Base"}; }; } template <class T> string do_smth() { return virtualFunction(); } function<string()> virtualFunction; }; class ...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
1) Your functions, in order to be polymorphic, should be marked with **virtual** 2) Templated functions are instantiated at the POI and can't be virtual (what is the signature??How many vtable entries do you reserve?). **Templated functions are a compile-time mechanism, virtual functions a runtime one**. Some possibl...
I had the same problem, but I actually came up with a working solution. The best way to show the solution is by an example: **What we want**(doesn't work, since you can't have virtual templates): ``` class Base { template <class T> virtual T func(T a, T b) {}; } class Derived { template <class T> T f...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
Template methods cannot be virtual. One solution is to use static polymorphism to simulate the behavior of "template virtual" methods: ``` #include <iostream> #include <stdexcept> #include <string> template<typename D> class Base { template<typename T> std::string _method() { return "Base"; } public: tem...
Another possible aproach to make your example work as you expect is to use `std::function`: ``` class Base { public: Base() { virtualFunction = [] () -> string { return {"Base"}; }; } template <class T> string do_smth() { return virtualFunction(); } function<string()> virtualFunction; }; class ...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
Template methods cannot be virtual. One solution is to use static polymorphism to simulate the behavior of "template virtual" methods: ``` #include <iostream> #include <stdexcept> #include <string> template<typename D> class Base { template<typename T> std::string _method() { return "Base"; } public: tem...
I had the same problem, but I actually came up with a working solution. The best way to show the solution is by an example: **What we want**(doesn't work, since you can't have virtual templates): ``` class Base { template <class T> virtual T func(T a, T b) {}; } class Derived { template <class T> T f...
22,422,845
Is it possible to declare some type of base class with template methods which i can override in derived classes? Following example: ``` #include <iostream> #include <stdexcept> #include <string> class Base { public: template<typename T> std::string method() { return "Base"; } }; class Derived : public Base {...
2014/03/15
[ "https://Stackoverflow.com/questions/22422845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1931663/" ]
Another possible aproach to make your example work as you expect is to use `std::function`: ``` class Base { public: Base() { virtualFunction = [] () -> string { return {"Base"}; }; } template <class T> string do_smth() { return virtualFunction(); } function<string()> virtualFunction; }; class ...
I had the same problem, but I actually came up with a working solution. The best way to show the solution is by an example: **What we want**(doesn't work, since you can't have virtual templates): ``` class Base { template <class T> virtual T func(T a, T b) {}; } class Derived { template <class T> T f...
163,042
> > **Possible Duplicate:** > > [Proving an interpolation inequality](https://math.stackexchange.com/questions/28589/proving-an-interpolation-inequality) > > > Let $f \in L^p$ and $f \in L^r$ where $1 \leqslant p \leqslant r$ . Then can we say that $f \in L^q$ if $p \leqslant q \leqslant r$? ($f : \mathbb R^n ...
2012/06/25
[ "https://math.stackexchange.com/questions/163042", "https://math.stackexchange.com", "https://math.stackexchange.com/users/34329/" ]
Yes: we write $q=ap+(1-a)r$ where $0<a<1$ (if $a\in \{0,1\}$ it's clear). We apply Hölder's inequality to the exponent $\frac 1a>1$ (it's conjugate is $\frac 1{1-a}$). We get $$\int\_{\Bbb R^n}|f|^qdx=\int\_{\Bbb R^n}(|f|^p)^a(|f|^r)^{1-a}dx\leq \left(\int\_{\Bbb R^n}|f|^p\right)^a\left(\int\_{\Bbb R^n}|f|^r\right)^{1...
**HINT** Split the $L^q$ integral over the sets $A$ and $A^C$, where $A = \{x \in \mathbb{R}^n: f(x) \leq 1\}$ argue out why both are finite making use of the fact that $f \in L^p, L^r$.
58,419,410
I am working on a .js web development file and with a radio selection of 0,1,2 I want to check the following >0 of the returned value: I have tried this for the first line: if (!$("input[name=bbClassification]:checked").val() > 0) { ``` if (!$("input[name=bbClassification]:checked").val()) { $("input[name=bbClass...
2019/10/16
[ "https://Stackoverflow.com/questions/58419410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11301190/" ]
If you send out links from your site that have an email address it might be related to this. <https://github.com/surbo/knockknock/blob/master/README.md>
basically, the phishing list you sent is not like suspicious emails or sender. The phishing list that includes that email, like this "http://amadermanikganj.com/Cpanelreport/equos/index.php?email=nobody@mycraftmail.com" indicates that in the param someone tried it with that email. not related to phish and suspicious ac...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
Hacking Together Our Own `import from '#id'` ============================================ Exports/imports between inline scripts aren't natively supported, but it was a fun exercise to hack together an implementation for my documents. Code-golfed down to a small block, I use it like this: ```html <script type="module...
I don't believe that's possible. For inline scripts you're stuck with one of the more traditional ways of modularizing code, like the namespacing you demonstrated using object literals. With [webpack](https://en.wikipedia.org/wiki/Webpack) you can do [code splitting](https://webpack.js.org/guides/code-splitting/) whi...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
This is possible with service workers. Since a service worker should be installed before it will be able to process a page, this requires to have a separate page to initialize a worker to avoid chicken/egg problem - or a page can reloaded when a worker is ready. Example ======= Here's a [demo](https://plnkr.co/edit/...
I don't believe that's possible. For inline scripts you're stuck with one of the more traditional ways of modularizing code, like the namespacing you demonstrated using object literals. With [webpack](https://en.wikipedia.org/wiki/Webpack) you can do [code splitting](https://webpack.js.org/guides/code-splitting/) whi...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
I don't believe that's possible. For inline scripts you're stuck with one of the more traditional ways of modularizing code, like the namespacing you demonstrated using object literals. With [webpack](https://en.wikipedia.org/wiki/Webpack) you can do [code splitting](https://webpack.js.org/guides/code-splitting/) whi...
We can use blob and importmap to import inline scripts. <https://github.com/xitu/inline-module> ```html <div id="app"></div> <script type="inline-module" id="foo"> const foo = 'bar'; export {foo}; </script> <script src="https://unpkg.com/inline-module/index.js" setup></script> <script type="module"> import {foo...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
Hacking Together Our Own `import from '#id'` ============================================ Exports/imports between inline scripts aren't natively supported, but it was a fun exercise to hack together an implementation for my documents. Code-golfed down to a small block, I use it like this: ```html <script type="module...
This is possible with service workers. Since a service worker should be installed before it will be able to process a page, this requires to have a separate page to initialize a worker to avoid chicken/egg problem - or a page can reloaded when a worker is ready. Example ======= Here's a [demo](https://plnkr.co/edit/...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
Hacking Together Our Own `import from '#id'` ============================================ Exports/imports between inline scripts aren't natively supported, but it was a fun exercise to hack together an implementation for my documents. Code-golfed down to a small block, I use it like this: ```html <script type="module...
I tweaked [Jeremy's](https://stackoverflow.com/a/43834063/13052533) answer with the use of [this article to prevent scripts from executing](https://medium.com/snips-ai/how-to-block-third-party-scripts-with-a-few-lines-of-javascript-f0b08b9c4c0) ``` <script data-info="https://stackoverflow.com/a/43834063"> // awsome gu...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
Hacking Together Our Own `import from '#id'` ============================================ Exports/imports between inline scripts aren't natively supported, but it was a fun exercise to hack together an implementation for my documents. Code-golfed down to a small block, I use it like this: ```html <script type="module...
We can use blob and importmap to import inline scripts. <https://github.com/xitu/inline-module> ```html <div id="app"></div> <script type="inline-module" id="foo"> const foo = 'bar'; export {foo}; </script> <script src="https://unpkg.com/inline-module/index.js" setup></script> <script type="module"> import {foo...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
This is possible with service workers. Since a service worker should be installed before it will be able to process a page, this requires to have a separate page to initialize a worker to avoid chicken/egg problem - or a page can reloaded when a worker is ready. Example ======= Here's a [demo](https://plnkr.co/edit/...
I tweaked [Jeremy's](https://stackoverflow.com/a/43834063/13052533) answer with the use of [this article to prevent scripts from executing](https://medium.com/snips-ai/how-to-block-third-party-scripts-with-a-few-lines-of-javascript-f0b08b9c4c0) ``` <script data-info="https://stackoverflow.com/a/43834063"> // awsome gu...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
This is possible with service workers. Since a service worker should be installed before it will be able to process a page, this requires to have a separate page to initialize a worker to avoid chicken/egg problem - or a page can reloaded when a worker is ready. Example ======= Here's a [demo](https://plnkr.co/edit/...
We can use blob and importmap to import inline scripts. <https://github.com/xitu/inline-module> ```html <div id="app"></div> <script type="inline-module" id="foo"> const foo = 'bar'; export {foo}; </script> <script src="https://unpkg.com/inline-module/index.js" setup></script> <script type="module"> import {foo...
43,817,297
I've been experimenting with new [native ECMAScript module support](https://jakearchibald.com/2017/es-modules-in-browsers/) that has recently been added to browsers. It's pleasant to finally be able import scripts directly and cleanly from JavaScript. [**`/example.html`**](https://795258201.glitch.me/example.html) ``...
2017/05/06
[ "https://Stackoverflow.com/questions/43817297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
I tweaked [Jeremy's](https://stackoverflow.com/a/43834063/13052533) answer with the use of [this article to prevent scripts from executing](https://medium.com/snips-ai/how-to-block-third-party-scripts-with-a-few-lines-of-javascript-f0b08b9c4c0) ``` <script data-info="https://stackoverflow.com/a/43834063"> // awsome gu...
We can use blob and importmap to import inline scripts. <https://github.com/xitu/inline-module> ```html <div id="app"></div> <script type="inline-module" id="foo"> const foo = 'bar'; export {foo}; </script> <script src="https://unpkg.com/inline-module/index.js" setup></script> <script type="module"> import {foo...
61,013,935
Given static 2 Given static 2-D array as follow: ``` int m[4][6]; ``` How do i access to `m[2][4]` without using operator[]?
2020/04/03
[ "https://Stackoverflow.com/questions/61013935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13212108/" ]
It turns out my python script wasn't fully closed- it was still running in task manager, so that's why the command prompt window wasn't able to close yet. For anyone who might need it: I was using python selenium in my script. At the end of the program, I had to switch my code : `browser.close() to browser.quit()` so...
exit command in this case won't work without arguments so I suggest you try: ``` exit /b ``` it will force the cmd window to close
61,013,935
Given static 2 Given static 2-D array as follow: ``` int m[4][6]; ``` How do i access to `m[2][4]` without using operator[]?
2020/04/03
[ "https://Stackoverflow.com/questions/61013935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13212108/" ]
It turns out my python script wasn't fully closed- it was still running in task manager, so that's why the command prompt window wasn't able to close yet. For anyone who might need it: I was using python selenium in my script. At the end of the program, I had to switch my code : `browser.close() to browser.quit()` so...
I think the start command is opening up your python interpreter. I simply write like this 1. `"C:\Users\abhic\AppData\Local\Programs\Python\Python36\python.exe" "C:\Users\abhic\Documents\sample.py"` 2. `exit` The first part in line 1 is the python interpreter location and the second inverted comma's contain the scr...
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
You can use the run once method here, mentioned a few times here, but there are a couple problems with that, depending on your use case. 1) You may want to re-hook the method later again, and have it run once again. Though I suppose you can reset your bool 2) You still have that reference which could end up keeping y...
I usually do something like the following to implement a 1 time event handler. ``` void OnControlClickOneTime(this Control c, EventHandler e) { EventHandler e2 = null; e2 = (s,args) => { c.Click -= e2; e(s,args); }; c.Click += e2; } ```
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
Greg, What you have **is not** an observer pattern, but rather a message queue. So you're just using the wrong design pattern for the problem you're trying to solve. Its easy enough to implement your own message queue from scratch using a `Queue{Action{object}}`, where objects enqueue themselves, and you simply deque...
I usually do something like the following to implement a 1 time event handler. ``` void OnControlClickOneTime(this Control c, EventHandler e) { EventHandler e2 = null; e2 = (s,args) => { c.Click -= e2; e(s,args); }; c.Click += e2; } ```
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
You can use the run once method here, mentioned a few times here, but there are a couple problems with that, depending on your use case. 1) You may want to re-hook the method later again, and have it run once again. Though I suppose you can reset your bool 2) You still have that reference which could end up keeping y...
You can use WeakReference objects to introduce so to say *weak subscribers*. During event firing you can check whether weak reference was already collected or not and remove this subscriber from the list of subscribers if necessary. The basic idea behind this is that when subscribers are GC collected, your handler wil...
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
Greg, What you have **is not** an observer pattern, but rather a message queue. So you're just using the wrong design pattern for the problem you're trying to solve. Its easy enough to implement your own message queue from scratch using a `Queue{Action{object}}`, where objects enqueue themselves, and you simply deque...
You can use the run once method here, mentioned a few times here, but there are a couple problems with that, depending on your use case. 1) You may want to re-hook the method later again, and have it run once again. Though I suppose you can reset your bool 2) You still have that reference which could end up keeping y...
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
The usual way would be to store a boolean value as to whether it should run... ``` bool runMyEvent = true; void Handler(object sender, EventArgs e) { if (runMyEvent) { // handler here runMyEvent = false; } else { return; } } ```
I usually do something like the following to implement a 1 time event handler. ``` void OnControlClickOneTime(this Control c, EventHandler e) { EventHandler e2 = null; e2 = (s,args) => { c.Click -= e2; e(s,args); }; c.Click += e2; } ```
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
You can use the run once method here, mentioned a few times here, but there are a couple problems with that, depending on your use case. 1) You may want to re-hook the method later again, and have it run once again. Though I suppose you can reset your bool 2) You still have that reference which could end up keeping y...
If it makes sense (and if you have access to the code that calls the handlers) maybe you could just remove all the events after you run the [handler](https://stackoverflow.com/questions/91778/how-to-remove-all-event-handlers-from-a-control). I don't know if this is a good idea either, just another thought.
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
You can use the run once method here, mentioned a few times here, but there are a couple problems with that, depending on your use case. 1) You may want to re-hook the method later again, and have it run once again. Though I suppose you can reset your bool 2) You still have that reference which could end up keeping y...
There is a thorough article on CodeProject: [Weak events](http://www.codeproject.com/KB/cs/WeakEvents.aspx), which deals with several solutions to this problem.
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
Greg, What you have **is not** an observer pattern, but rather a message queue. So you're just using the wrong design pattern for the problem you're trying to solve. Its easy enough to implement your own message queue from scratch using a `Queue{Action{object}}`, where objects enqueue themselves, and you simply deque...
There is a thorough article on CodeProject: [Weak events](http://www.codeproject.com/KB/cs/WeakEvents.aspx), which deals with several solutions to this problem.
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
how about a handler that runs only once? Something like this: ``` if (wasRun) return; wasRun = true; ```
I usually do something like the following to implement a 1 time event handler. ``` void OnControlClickOneTime(this Control c, EventHandler e) { EventHandler e2 = null; e2 = (s,args) => { c.Click -= e2; e(s,args); }; c.Click += e2; } ```
1,554,845
Is there a generally-accepted best practice for creating an event handler that unsubscribes itself? E.g., the first thing I came up with is something like: ``` // Foo.cs // ... Bar bar = new Bar(/* add'l req'd state */); EventHandler handler = new EventHandler(bar.HandlerMethod); bar.HandlerToUnsubscribe = handler;...
2009/10/12
[ "https://Stackoverflow.com/questions/1554845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6932/" ]
Greg, What you have **is not** an observer pattern, but rather a message queue. So you're just using the wrong design pattern for the problem you're trying to solve. Its easy enough to implement your own message queue from scratch using a `Queue{Action{object}}`, where objects enqueue themselves, and you simply deque...
If it makes sense (and if you have access to the code that calls the handlers) maybe you could just remove all the events after you run the [handler](https://stackoverflow.com/questions/91778/how-to-remove-all-event-handlers-from-a-control). I don't know if this is a good idea either, just another thought.
140,721
I work at an European company for 1,5 years now (50-100 employees) and I'm the only one in my job role. Management has a "learning by experience" mentality which means you just learn by doing, not by extended training. Because I need more challenges in my job role and because I have no one to learn from I requested if ...
2019/07/19
[ "https://workplace.stackexchange.com/questions/140721", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/57139/" ]
I think you already have the answer - the company has cash flow issues so dropping a few thousand euros on training that is essentially a "perk" is probably going to fall into the "luxury" rather than "essential" category. > > I already offered to pay a part of the course, but I don't want to pay it all myself becaus...
It sounds as though you have a pretty solid "no" on your employer investing in your future. Consider looking for a more challenging job in a larger, profitable company that supplements experiential learning with internal/external courses. Ask about company policy on this in your second or third interview — once you k...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Everything in clbuild (<http://common-lisp.net/project/clbuild>) should be a good candidate to be included. Incidentally, all packages in your list except Emacs are also managed by clbuild. I think it'd be good if the collection of projects in clbuild could gather some momentum towards standard-common-lisp-library-hood...
This does: <http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html> Of course I'd also like to learn more Python 3.0, erlang, and F#. I believe that functional languages (not to say that Python is a functional language) provide just a different perspective. The more perspective you have the better solutio...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Emacs almost prevented me from learning Common Lisp. It took a lot of effort to slog through it. Emacs and SLIME are too much for a beginner and will never be broadly satisfying to beginners. If I want to learn a new programming language, I want everything else to stay out of my way while I learn it. The task of learni...
Everything in clbuild (<http://common-lisp.net/project/clbuild>) should be a good candidate to be included. Incidentally, all packages in your list except Emacs are also managed by clbuild. I think it'd be good if the collection of projects in clbuild could gather some momentum towards standard-common-lisp-library-hood...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Everything in clbuild (<http://common-lisp.net/project/clbuild>) should be a good candidate to be included. Incidentally, all packages in your list except Emacs are also managed by clbuild. I think it'd be good if the collection of projects in clbuild could gather some momentum towards standard-common-lisp-library-hood...
I think the idea of including tutorials is an excellent one. In addition to the ones already stated, there is both the easiest book for newbies on lisp (A Gentle Introduction to Symbolic Computation) and several **excellent** websites hiding out there on the web that people should know about. Here they are: * [A Gent...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
I have some interest in learning Lisp, but I don't 'like' most of the resources available. How about extending this project to the creation of some sort of a "community" responsible for providing tutorials or something, in order to make Common Lisp more popular and easier to learn? Bad/weird/useless idea?
You should definitely add Vim too, configured with the [RainbowParenthsis](http://www.vim.org/scripts/script.php?script_id=1561) plugin. rlwrap for SBCL is a good idea, and so is (require :sb-aclrepl). Weblocks should come with cl-prevalence and maybe Elephant/BDB, too.
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
My suggestion is to include an HTTP server like [Hunchentoot](http://www.weitz.de/hunchentoot/) and a popular web framework. I suspect that most people that want to learn Lisp these days do so because of reading Paul Graham, and wanting to mimic his success at building Viaweb, so being able to easily create and modify ...
This does: <http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html> Of course I'd also like to learn more Python 3.0, erlang, and F#. I believe that functional languages (not to say that Python is a functional language) provide just a different perspective. The more perspective you have the better solutio...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Everything in clbuild (<http://common-lisp.net/project/clbuild>) should be a good candidate to be included. Incidentally, all packages in your list except Emacs are also managed by clbuild. I think it'd be good if the collection of projects in clbuild could gather some momentum towards standard-common-lisp-library-hood...
Emacs does have a bit of a learning curve, but it is great for serious development -- no pesky mouse-driven gui bling in the way of the (text-based) code. Out-of-the-box CUA-mode is enabled these days (so C-x, C-c, C-v works "standard"), and there is a menu with file-operations like save, etc, so it shouldn't that har...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Emacs almost prevented me from learning Common Lisp. It took a lot of effort to slog through it. Emacs and SLIME are too much for a beginner and will never be broadly satisfying to beginners. If I want to learn a new programming language, I want everything else to stay out of my way while I learn it. The task of learni...
As far as I undertand you are doing Thnake. Thank you for greate live distro! I tried it couple of days before and found it rather impressive and interesting. There are couple of things it obviously lacks, such as [LTK](http://www.peter-herth.de/ltk/) since you have already included Common Lisp and Tcl/Tk. And since...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Emacs does have a bit of a learning curve, but it is great for serious development -- no pesky mouse-driven gui bling in the way of the (text-based) code. Out-of-the-box CUA-mode is enabled these days (so C-x, C-c, C-v works "standard"), and there is a menu with file-operations like save, etc, so it shouldn't that har...
I think the idea of including tutorials is an excellent one. In addition to the ones already stated, there is both the easiest book for newbies on lisp (A Gentle Introduction to Symbolic Computation) and several **excellent** websites hiding out there on the web that people should know about. Here they are: * [A Gent...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
Reading [Paul Graham](http://paulgraham.com/) makes me want to learn Common Lisp. But if I actually sit down to try learning it, the urge subsides.
I think the idea of including tutorials is an excellent one. In addition to the ones already stated, there is both the easiest book for newbies on lisp (A Gentle Introduction to Symbolic Computation) and several **excellent** websites hiding out there on the web that people should know about. Here they are: * [A Gent...
360,612
I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled tog...
2008/12/11
[ "https://Stackoverflow.com/questions/360612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21778/" ]
I have some interest in learning Lisp, but I don't 'like' most of the resources available. How about extending this project to the creation of some sort of a "community" responsible for providing tutorials or something, in order to make Common Lisp more popular and easier to learn? Bad/weird/useless idea?
As far as I undertand you are doing Thnake. Thank you for greate live distro! I tried it couple of days before and found it rather impressive and interesting. There are couple of things it obviously lacks, such as [LTK](http://www.peter-herth.de/ltk/) since you have already included Common Lisp and Tcl/Tk. And since...
47,065,731
pretty new to kubernetes/kops, I have followed the tutorial for kops on aws, and I have created a cluster. I'd like to run a very simple container from hub.docker on the cluster, how do I go about adding this container to the cluster? Is it in the cluster config file or will I need to add another image to the nodes.
2017/11/02
[ "https://Stackoverflow.com/questions/47065731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4118800/" ]
In Kubernetes, container could be run as Pod, which is a resource in Kubernetes. You could prepare a yaml or json file to create your pod with command `kubectl create -f $yourfile` Example could be found here <https://github.com/kubernetes/kubernetes/blob/master/examples/javaweb-tomcat-sidecar/javaweb.yaml> And for ...
1. For example to run the nginx web server in your cluster you can use the command line below, this will download image from docker hub and start the instance. kubectl run nginx --image=nginx --port=80 Here is command <https://kubernetes.io/docs/user-guide/kubectl/v1.8/>. To run your image change the nginx with your...
50,068,387
I have the problem that when I want to have an id for my database I generate a random number for this the bad thing is that it is repeated. ``` public void Iniciar() { Random r = new Random(); int prevnum = -1; for (int loop = 0; loop < 10; loop++) { do { num = r.Next(1000,...
2018/04/27
[ "https://Stackoverflow.com/questions/50068387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9206372/" ]
If you are simply looking for unique IDs (and you don't require integers), you can use a UUID: ``` String id = Guid.NewGuid().ToString() ``` If you need a unique integer ID, you are better off using your database to generate them (such as mysql's `AUTO_INCREMENT`)
Simply: You cant, directly. `System.Random` can generate same number over and over again. If you still want to get 'unique random' numbers, you need to store generated numbers in a list, then check if newly generated number is in list. ``` using System; using System.Collections.Generic; class Program { public st...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Perhaps your best bet is using [NHibernate](http://nhibernate.org). It's arguably the best "industry standard" when it comes to both commercial and open source ORMs. It has been around a long while to become really stable, is used in many enterprise companies, is based on the even better known Hibernate (java), but has...
Man..I'd go with the **entity framework**. It supports Linq. The entity framework 4.0 has major performance improvements over 3.5. It has everything that you require in your post. EF is more then a ORM it is a framework. I think nhibernate is a joke compared to the M$ entity framework. Nhibernate really dropped the bal...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Just as a follow up to some of the answers here, there is NHibernate Linq spearheaded by the unbelievably prolific Oren Eini, AKA Ayende Rahien <http://ayende.com/Blog/archive/2009/07/26/nhibernate-linq-1.0-released.aspx> Haven't used it, but it looks very impressive. Seems like at some level it could even be a repla...
You could also look at [LLBLGen](http://LLBLGen.com) While it lacks a snappy name, it does have all the features you mentioned: It is drivers for most database version, Oracle and SQL and others It supports Linq, in that you can use Linq to query the LLBLgen generated objects It allows you to extend the generated obje...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Why not look at [subsonic](http://subsonicproject.com/)? I like it over the others because it's lightweight maps transparently to the database scheme (uses ActiveRecord) and fulfills all your requirements. > > It has to be very productive. > > > I think this is the job of every ORM? With subsonic you can use the ...
I know this question is almost 8 years old, but at least if there is a straggler to this question, they will get a more complete picture of the ORMs available. We've been using [Dapper](https://github.com/StackExchange/Dapper) for database access. It's very lightweight. It's extremely fast. I still get to write SQL (...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
I've used [Entity Framework](http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx) for a couple of projects and really liked it. There admittedly were some kinks in the first version, particularly the way it dealt with foreign keys and stored procedures, but version 2, which is in beta and part of VS 2010 looks...
You could also look at [LLBLGen](http://LLBLGen.com) While it lacks a snappy name, it does have all the features you mentioned: It is drivers for most database version, Oracle and SQL and others It supports Linq, in that you can use Linq to query the LLBLgen generated objects It allows you to extend the generated obje...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Given your requirements, I'd suggest checking out [Mindscape LightSpeed](http://www.mindscape.co.nz/products/lightspeed/default.aspx). It supports about eight or nine different databases, and is convention driven (with options for configuration), so is very easy to set up. It has a LINQ provider. It allows you to exten...
Just as a follow up to some of the answers here, there is NHibernate Linq spearheaded by the unbelievably prolific Oren Eini, AKA Ayende Rahien <http://ayende.com/Blog/archive/2009/07/26/nhibernate-linq-1.0-released.aspx> Haven't used it, but it looks very impressive. Seems like at some level it could even be a repla...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Just as a follow up to some of the answers here, there is NHibernate Linq spearheaded by the unbelievably prolific Oren Eini, AKA Ayende Rahien <http://ayende.com/Blog/archive/2009/07/26/nhibernate-linq-1.0-released.aspx> Haven't used it, but it looks very impressive. Seems like at some level it could even be a repla...
I know this question is almost 8 years old, but at least if there is a straggler to this question, they will get a more complete picture of the ORMs available. We've been using [Dapper](https://github.com/StackExchange/Dapper) for database access. It's very lightweight. It's extremely fast. I still get to write SQL (...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Perhaps your best bet is using [NHibernate](http://nhibernate.org). It's arguably the best "industry standard" when it comes to both commercial and open source ORMs. It has been around a long while to become really stable, is used in many enterprise companies, is based on the even better known Hibernate (java), but has...
I suggest checking out NHibernate. <https://www.hibernate.org/343.html>
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Given your requirements, I'd suggest checking out [Mindscape LightSpeed](http://www.mindscape.co.nz/products/lightspeed/default.aspx). It supports about eight or nine different databases, and is convention driven (with options for configuration), so is very easy to set up. It has a LINQ provider. It allows you to exten...
You could also look at [LLBLGen](http://LLBLGen.com) While it lacks a snappy name, it does have all the features you mentioned: It is drivers for most database version, Oracle and SQL and others It supports Linq, in that you can use Linq to query the LLBLgen generated objects It allows you to extend the generated obje...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Perhaps your best bet is using [NHibernate](http://nhibernate.org). It's arguably the best "industry standard" when it comes to both commercial and open source ORMs. It has been around a long while to become really stable, is used in many enterprise companies, is based on the even better known Hibernate (java), but has...
Why not look at [subsonic](http://subsonicproject.com/)? I like it over the others because it's lightweight maps transparently to the database scheme (uses ActiveRecord) and fulfills all your requirements. > > It has to be very productive. > > > I think this is the job of every ORM? With subsonic you can use the ...
1,691,607
I have a system that will allow users to send messages to thier clients. I want to limit the user to x amount of messages per day/week/month (depending on subscription). What is a good way to tally for the time period and reset the tally once the time period restarts? I would like to incorporate some sort of SQL job to...
2009/11/07
[ "https://Stackoverflow.com/questions/1691607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77712/" ]
Why not look at [subsonic](http://subsonicproject.com/)? I like it over the others because it's lightweight maps transparently to the database scheme (uses ActiveRecord) and fulfills all your requirements. > > It has to be very productive. > > > I think this is the job of every ORM? With subsonic you can use the ...
You could also look at [LLBLGen](http://LLBLGen.com) While it lacks a snappy name, it does have all the features you mentioned: It is drivers for most database version, Oracle and SQL and others It supports Linq, in that you can use Linq to query the LLBLgen generated objects It allows you to extend the generated obje...
11,202,485
In SQL Server, I need to design a `User` table. It should have a `UserID (int)`, a `RoleID (int)` and a `UserName (nvarchar(255))`. A user can be assigned with a name but possibly multiple roles so a `UserId` may correspond to multiple `RoleID`s. This makes it difficult to assign primary key to `UserID` as `UserID` ma...
2012/06/26
[ "https://Stackoverflow.com/questions/11202485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1021306/" ]
You should have: ``` 1. a user table with UsertId(int), UserName (Varchar) 2. a role table with RoleId(int), RoleName(Varchar) 3. a user_role table with user_id(int), role_id(int) ``` And don't forget to add the proper indexing and foreign keys.
Ye, have a table Roles, then RolesUsers with UserID and RoleID, and lastly a Users table edit: where the UserID + RoleID in the RolesUsers are a composite key
48,095,096
Default `font-size` for my code is equivalent to `10px` or `0.625em`. So as per this rule, to set the font size of `<p>` as `7px` I can use `0.7em`. But in my case browser is taking the fixed font size of `9px` (checked in "computed" section of browser) even if I decrease the font size of `<p>` as `0.5em` or less. [![...
2018/01/04
[ "https://Stackoverflow.com/questions/48095096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8873934/" ]
If you want font sizes in strict relation to the root font size (which is set in a a rule for `html` , not for `body`, and should be in `px`), you have to use the `rem` unit or percent, but not `em` (which will be in relation for the default browser size of a particular element or its parent) Aditionally, most browser...
As you say ***font size of p as 7px I can use 0.7em***, which is not correct because here your default font size is 16px. if ``` 10px == 0.625em then 7px = (0.625/10)*7em = 0.4375em ``` And if you are using **`10px`** as your default font, you have to set the **`body`** and **`html`** font size in **`px`** i.e. **`1...