qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
233,574
I'm moving a couple of servers to a colo and was wondering what you would recommend for a hardware firewall to sit in front of them? Is it fine to just get the cheapest Cisco/Fortigate/Juniper/whatever firewall? I don't need anything fancy, pretty much just port forwarding.
2011/02/09
[ "https://serverfault.com/questions/233574", "https://serverfault.com", "https://serverfault.com/users/546/" ]
I would not get the cheapest firewall. You need to look at your requirements such as throughput, active connections, security, vpn requirements and more. If it needs to be cheap I would recommend setting up a separate linux box as the firewall using iptables. If there is budget for a firewall but you need something sma...
You are probably looking at "wasting" at least 1U of rack space for this firewall. I would not buy a consumer-grade cheapie firewall. The Juniper Netscreen SSG5 would probably meet your needs, but it is a paperback size format and doesn't come with rack arms (that I recall). The first "rackable" SSG is the SSG140, bu...
233,574
I'm moving a couple of servers to a colo and was wondering what you would recommend for a hardware firewall to sit in front of them? Is it fine to just get the cheapest Cisco/Fortigate/Juniper/whatever firewall? I don't need anything fancy, pretty much just port forwarding.
2011/02/09
[ "https://serverfault.com/questions/233574", "https://serverfault.com", "https://serverfault.com/users/546/" ]
I would not get the cheapest firewall. You need to look at your requirements such as throughput, active connections, security, vpn requirements and more. If it needs to be cheap I would recommend setting up a separate linux box as the firewall using iptables. If there is budget for a firewall but you need something sma...
Alternatively - get a Mikrotik RB1100 and see how far it lasts (50mbit for smallish packets was on the table by someone running game servers). It is CHEAP and has a TON of features in RouterOS. Uses very little power, too. Then later you can upgrade to something more powerfull if needed. Again, the RB1100 is CHEAP to...
233,574
I'm moving a couple of servers to a colo and was wondering what you would recommend for a hardware firewall to sit in front of them? Is it fine to just get the cheapest Cisco/Fortigate/Juniper/whatever firewall? I don't need anything fancy, pretty much just port forwarding.
2011/02/09
[ "https://serverfault.com/questions/233574", "https://serverfault.com", "https://serverfault.com/users/546/" ]
You are probably looking at "wasting" at least 1U of rack space for this firewall. I would not buy a consumer-grade cheapie firewall. The Juniper Netscreen SSG5 would probably meet your needs, but it is a paperback size format and doesn't come with rack arms (that I recall). The first "rackable" SSG is the SSG140, bu...
Alternatively - get a Mikrotik RB1100 and see how far it lasts (50mbit for smallish packets was on the table by someone running game servers). It is CHEAP and has a TON of features in RouterOS. Uses very little power, too. Then later you can upgrade to something more powerfull if needed. Again, the RB1100 is CHEAP to...
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
This outputs your version: ``` System.Environment.Version.ToString() ```
[Environment.Version](http://msdn2.microsoft.com/en-us/library/system.environment.version)
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
This outputs your version: ``` System.Environment.Version.ToString() ```
``` <%@ Page language="C#" %> <% Response.Write(".NET Framework Version: " + Environment.Version.ToString()); %> ```
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
This outputs your version: ``` System.Environment.Version.ToString() ```
### Enable Trace Enabling Trace is another option view every details of rendered page, including .NET Version Add **Trace="true"** in page directive ``` <%@ Page Trace="true" %> ``` Scroll down to bottom and you will see rendered .NET Version
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
This outputs your version: ``` System.Environment.Version.ToString() ```
Actually, you all got the CLR version (but not really either, you actually get a string that is hard-coded in mscorlib.dll). For the actual ASP.NET version, as you see it on the YSOD error pages, see here (they are NOT the same): ``` using System; namespace MyElmahReplacement { public class MyVersionInfo {...
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
[Environment.Version](http://msdn2.microsoft.com/en-us/library/system.environment.version)
### Enable Trace Enabling Trace is another option view every details of rendered page, including .NET Version Add **Trace="true"** in page directive ``` <%@ Page Trace="true" %> ``` Scroll down to bottom and you will see rendered .NET Version
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
[Environment.Version](http://msdn2.microsoft.com/en-us/library/system.environment.version)
Actually, you all got the CLR version (but not really either, you actually get a string that is hard-coded in mscorlib.dll). For the actual ASP.NET version, as you see it on the YSOD error pages, see here (they are NOT the same): ``` using System; namespace MyElmahReplacement { public class MyVersionInfo {...
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
``` <%@ Page language="C#" %> <% Response.Write(".NET Framework Version: " + Environment.Version.ToString()); %> ```
### Enable Trace Enabling Trace is another option view every details of rendered page, including .NET Version Add **Trace="true"** in page directive ``` <%@ Page Trace="true" %> ``` Scroll down to bottom and you will see rendered .NET Version
3,308,437
How can I see the version of .net framework which renders my aspx page on remote server?
2010/07/22
[ "https://Stackoverflow.com/questions/3308437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259881/" ]
``` <%@ Page language="C#" %> <% Response.Write(".NET Framework Version: " + Environment.Version.ToString()); %> ```
Actually, you all got the CLR version (but not really either, you actually get a string that is hard-coded in mscorlib.dll). For the actual ASP.NET version, as you see it on the YSOD error pages, see here (they are NOT the same): ``` using System; namespace MyElmahReplacement { public class MyVersionInfo {...
260,924
Assume a multi-line file (`myInput.txt`) with lines comprising one or more words. ``` echo -e "Foo\nFoo bar\nFoo baz\nFoo bar baz\nBar\nBaz\nBaz qux\nBaz qux quux\nQux quux" > myInput.txt ``` I wish to remove all one-word lines that are identical with the first word of any multi-word lines **using Python**. ``` ech...
2021/05/19
[ "https://codereview.stackexchange.com/questions/260924", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/122794/" ]
```py # Get all lines with more than one word more_than_one = list(compress(myList, [len(e.strip().split(" "))>1 for e in myList])) ``` * The function `split` splits by whitespaces by default, there is no need to pass the explicit argument * Lines have been stripped already when reading the file, using `strip` seems ...
Although you have several useful suggestions already, they don't quite cut to the heart of the matter. Your example fits into a common type of problem: read a text file; parse it to extract information; perform some computations on that information; and report to the user. In my experience one of the best things you ca...
260,924
Assume a multi-line file (`myInput.txt`) with lines comprising one or more words. ``` echo -e "Foo\nFoo bar\nFoo baz\nFoo bar baz\nBar\nBaz\nBaz qux\nBaz qux quux\nQux quux" > myInput.txt ``` I wish to remove all one-word lines that are identical with the first word of any multi-word lines **using Python**. ``` ech...
2021/05/19
[ "https://codereview.stackexchange.com/questions/260924", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/122794/" ]
Based on your code, the lines don't need to be kept in order. This code reads each line of the file once. If there are multiple words on a line, it is appended to `combined_lines` and the first words is added to a set of first words. Another set is used for single words. At the end, any single words that aren't a firs...
Although you have several useful suggestions already, they don't quite cut to the heart of the matter. Your example fits into a common type of problem: read a text file; parse it to extract information; perform some computations on that information; and report to the user. In my experience one of the best things you ca...
2,582,951
Also I want to know how to add meta data while indexing so that i can boost some parameters
2010/04/06
[ "https://Stackoverflow.com/questions/2582951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150887/" ]
Lucene indexes text not files - you'll need some other process for extracting the text out of the file and running Lucene over that.
see <https://github.com/WolfgangFahl/pdfindexer> for a java solution that uses PDFBox and Apache Lucene to split the PDF files page by page to text, index these text-pages and create a resulting html index file that links to the pages in the pdf sources by using a corresponding open parameter.
2,582,951
Also I want to know how to add meta data while indexing so that i can boost some parameters
2010/04/06
[ "https://Stackoverflow.com/questions/2582951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150887/" ]
There are several frameworks for extracting text suitable for Lucene indexing from rich text files (pdf, ppt etc.) * One of them is [Apache Tika](http://lucene.apache.org/tika/), a sub-project of Lucene. * [Apache POI](http://poi.apache.org/) is a more general document handling project inside Apache. * There are also ...
see <https://github.com/WolfgangFahl/pdfindexer> for a java solution that uses PDFBox and Apache Lucene to split the PDF files page by page to text, index these text-pages and create a resulting html index file that links to the pages in the pdf sources by using a corresponding open parameter.
2,582,951
Also I want to know how to add meta data while indexing so that i can boost some parameters
2010/04/06
[ "https://Stackoverflow.com/questions/2582951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150887/" ]
You can use Apache [Tika](http://lucene.apache.org/tika/index.html). Tika is a toolkit for detecting and extracting metadata and structured text content from various documents using existing parser libraries. Supported Document Formats * HyperText Markup Language * XML and derived formats * Microsoft Office document ...
see <https://github.com/WolfgangFahl/pdfindexer> for a java solution that uses PDFBox and Apache Lucene to split the PDF files page by page to text, index these text-pages and create a resulting html index file that links to the pages in the pdf sources by using a corresponding open parameter.
2,314,637
All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the...
2010/02/22
[ "https://Stackoverflow.com/questions/2314637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164257/" ]
Gridviews have different item templates that you can use for editing and inserting data. That'd be an easy way to go about it. As long as you set your datakeyid property to the primary key in the database, you should be able to make template fields based off of whether or not you're editing or inserting data. The com...
the out of the box grid is not too bad. Here are a few links on master detail records in asp.net this should get you started on the CRUD opperations. <http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-the-same-page.html> <http://msdn.microsoft.com/en-us/library/aa581796.aspx> <http://www....
2,314,637
All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the...
2010/02/22
[ "https://Stackoverflow.com/questions/2314637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164257/" ]
You should definitely use edit and insert templates. All you have to do is give the button/link the command name such as insert/delete/update and you can allow the Grid to do most of all the work. [Check out this link](http://www.codeproject.com/KB/aspnet/InsertingWithGridView.aspx) I think you'll learn to love the g...
the out of the box grid is not too bad. Here are a few links on master detail records in asp.net this should get you started on the CRUD opperations. <http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-the-same-page.html> <http://msdn.microsoft.com/en-us/library/aa581796.aspx> <http://www....
2,314,637
All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the...
2010/02/22
[ "https://Stackoverflow.com/questions/2314637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164257/" ]
Gridviews have different item templates that you can use for editing and inserting data. That'd be an easy way to go about it. As long as you set your datakeyid property to the primary key in the database, you should be able to make template fields based off of whether or not you're editing or inserting data. The com...
this is the best site for what you are after **www.Asp.Net** * [**Data Access Tutorials controls**](http://www.asp.net/learn/data-access/) * [**Master/Detail Using a Selectable Master GridView with a Details DetailView**](http://www.asp.net/learn/data-access/tutorial-10-cs.aspx) * [**Using TemplateFields in the GridV...
2,314,637
All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the...
2010/02/22
[ "https://Stackoverflow.com/questions/2314637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164257/" ]
You should definitely use edit and insert templates. All you have to do is give the button/link the command name such as insert/delete/update and you can allow the Grid to do most of all the work. [Check out this link](http://www.codeproject.com/KB/aspnet/InsertingWithGridView.aspx) I think you'll learn to love the g...
this is the best site for what you are after **www.Asp.Net** * [**Data Access Tutorials controls**](http://www.asp.net/learn/data-access/) * [**Master/Detail Using a Selectable Master GridView with a Details DetailView**](http://www.asp.net/learn/data-access/tutorial-10-cs.aspx) * [**Using TemplateFields in the GridV...
2,088,079
Differentiate $$\:\left(x-1/2\right)^2+\left(y-1/4\right)^2=5/16$$ With respect to $x.$ The above simplifies to $$x^2-x+y^2-\frac{y}{2} = 0$$ I know that you have to take the implicit derivative, such that $$\frac{d}{dx}(x^2-x+y^2-\frac{y}{2}) = \frac{d}{dx}(0)$$ Thus $$2x-1+2y-\frac{1}{2}=0$$ and $$y=-x+\frac...
2017/01/07
[ "https://math.stackexchange.com/questions/2088079", "https://math.stackexchange.com", "https://math.stackexchange.com/users/293926/" ]
Your error is first forgetting that $y$ depends on $x$ (I assume because implicit derivatives are mentioned and $x(y)$ would be pretty mean) and then getting confused and solving for $y$ and not $y'$. You are right that you need to take $$ \frac{d}{dx}(x^2-x+y^2-y/2)=0 $$ But $y$ is a function of $x$ so this should ...
It should be $2x-1+\left(2y-\frac{1}{2}\right)y'=0$
68,883,343
I'm trying to only call an axios call once per render from an event handler (onClick basically), so I'm using useEffect and inside that useEffect, I'm using useState. Problem is - when onClick is called, I get the following error: > > Error: Invalid hook call. Hooks can only be called inside of the body of a function...
2021/08/22
[ "https://Stackoverflow.com/questions/68883343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/200025/" ]
You need to redo your hook so it would not start loading unconditionally but instead return a callback that might be called to initiate loading at some moment: ``` const [loadCollections, { isLoading, data, error }] = useLazyAxiosGet('collections'); .... onCancel: loadCollections ``` I propose to follow [approach...
A user in discord provided this solution: <https://codesandbox.io/s/cool-frog-9vim0?file=/src/App.js> ```js import { useState, useEffect, useCallback } from "react"; import axios from "axios"; import "./styles.css"; const fetchDataFromApi = () => { return axios( `https://jsonplaceholder.typicode.com/todos/${ ...
5,047
I would like to draw a land for a motocross game. I've been thinking of Bezier Curves but I am not sure whether this is the best approach. Can you give me some advice? I want to do it in JavaScript, not very good choice but it's personal project so for time being it's OK.
2010/10/31
[ "https://gamedev.stackexchange.com/questions/5047", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/2938/" ]
I found a couple of links that might be useful for others: Example script of Bezier implementation in JS <http://jsfromhell.com/math/bezier> It can be used from JavaScript or ActionScript to animate along a bezier path. <http://code.google.com/p/javascript-beziers/> Online drawing script/plot, quite useful if...
Instead of beziers, you probably want b-splines or catmull-rom splines. ``` float bspline(float t, float p0, float p1, float p2, float p3) { float it = 1.0f - t; float b0 = it*it*it * (1.0f / 6.0f); float b1 = (3*t*t*t - 6*t*t +4) * (1.0f / 6.0f); float b2 = (-3*t*t*t +3*t*t + 3*t + 1) * (1.0f / 6.0f); floa...
9,056
I want to implement mutual exclusion for $n$ processes. Critical section code: ``` int turn = 0; /* shared control variable */ Pi: /* i is 0 or 1 */ while (turn != i) ; /* busy wait */ CSi; turn = 1 - i; ``` This solution from [this page](http://phoenix.goucher.edu/~kellih...
2013/01/20
[ "https://cs.stackexchange.com/questions/9056", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/6488/" ]
From my understanding of the 2-processor, if you want to do the same thing you would delete the statement (I truly dont know why you had it. There could be something interesting behind this statement of yours). ``` i = turn ``` and instead, let each of the $n$ processors have an id from $\{1, \dots, n\}$. Then, yo...
Take a look at Allen B. Downey's ["The Little Book of Semaphores](http://www.greenteapress.com/semaphores/), it discusses synchronization in great depth. In any case, schemes based on just the atomicity of writing to memory are unwieldly and of no practical use (real CPUs have special instructions that simplify impleme...
5,914,507
Hey all. I need to work on all of the skills that come along with working with web services in Android. Most of the apps I've worked on have used static/local data. Obviously, to create something powerful, I need to learn how to work with web services. To that end, does anyone have any recommendations for an easy API...
2011/05/06
[ "https://Stackoverflow.com/questions/5914507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479180/" ]
You have many API that you can use to leverage your skills. Facebook is one of them but you can also have a look at websites such as Read It Later, Instapaper, Delicious or MeeGo that use simple web API with JSON/XML to transmit data.
My suggestion would be to go with Facebook; <http://developers.facebook.com/docs/guides/mobile/#android> While many others might disagree, some maybe saying it isn't a web service at all, personally I liked the idea of having many different kinds of data. And chose to do some experiments on top of Facebook Graph API ...
5,914,507
Hey all. I need to work on all of the skills that come along with working with web services in Android. Most of the apps I've worked on have used static/local data. Obviously, to create something powerful, I need to learn how to work with web services. To that end, does anyone have any recommendations for an easy API...
2011/05/06
[ "https://Stackoverflow.com/questions/5914507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479180/" ]
My suggestion would be to go with Facebook; <http://developers.facebook.com/docs/guides/mobile/#android> While many others might disagree, some maybe saying it isn't a web service at all, personally I liked the idea of having many different kinds of data. And chose to do some experiments on top of Facebook Graph API ...
First web API I used was Flickr. They have great documentation, most (all?) of the data can be returned in JSON format, and it's pretty expansive. I thought it was pretty simple to use, myself.
5,914,507
Hey all. I need to work on all of the skills that come along with working with web services in Android. Most of the apps I've worked on have used static/local data. Obviously, to create something powerful, I need to learn how to work with web services. To that end, does anyone have any recommendations for an easy API...
2011/05/06
[ "https://Stackoverflow.com/questions/5914507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479180/" ]
You have many API that you can use to leverage your skills. Facebook is one of them but you can also have a look at websites such as Read It Later, Instapaper, Delicious or MeeGo that use simple web API with JSON/XML to transmit data.
First web API I used was Flickr. They have great documentation, most (all?) of the data can be returned in JSON format, and it's pretty expansive. I thought it was pretty simple to use, myself.
16,949,444
I added a Blog Archive widget to my [Orchard CMS blog](http://logiczone.me/logically-me/archive/2013/6). It displayed the archive dates as intended and clicking the date displays a list of blog posts that fall under the date. The problem I have is with the list of blog posts that are being shown. They do not seem to fo...
2013/06/05
[ "https://Stackoverflow.com/questions/16949444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2457314/" ]
You are right, that list should have a class on it. Please file a bug for it. The fix is simple but requires modification of the blog module. In BlogPostController, after the line saying `var list = Shape.List();`, add this: ``` list.Classes.Add("blog-archive"); ```
Override ListByarchive View from Orchard.Blogs/Views/BlogPost in your Theme in the view instead of line ``` @Display(Model.ContentItems) ``` which renders the archilves list replace it with ``` @{ var blogPosts = Model.ContentItems; var items = blogPosts.Items; } ///write your own logic here @for...
36,386,213
I am trying to achieve the functionality seen on Google Play where a CardView has an options menu that can be clicked and you can click on the card to view more detail on the card. I have implemented an OnItemTouch listener on my RecyclerView which works fine and responds when touched, taking me to another activity. H...
2016/04/03
[ "https://Stackoverflow.com/questions/36386213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810110/" ]
If you don't want to handle the clicks of CardView children, OnItemTouchListener is the way. But if you want to handle the cliks of cardview children, you may have to attach OnClickListener (in the Adapter class' DataObjectHolder or onBindViewHolder method) to the CardView or its immediate child (which can be any lay...
Instead of using OnItemTouchListener to handle RecyclerView item click events, use OnClickListener for the itemView which you get in the ViewHolder. ``` public class MyViewHolder extends RecyclerView.ViewHolder implements OnClickListener{ public MyViewHolder(View itemView){ super(itemView); itemVie...
29,643,473
So, for my question have a look at my Jmeter setup: ![Jmeter setup](https://i.stack.imgur.com/Wk4Ex.png) Let me explain what's happening and then move on to my question. **Explanation** On the server I have a guava cache (with timeout of 5 seconds) and a DB hooked up to it. Request A sends data (read from csv file) ...
2015/04/15
[ "https://Stackoverflow.com/questions/29643473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3354890/" ]
If anyone is interested in the answer. I found out that the easiest way to do this is to create a random variable (in variable `rnd`) and a beanshell postprocessor, both under Http request A. The beanshell code is: ``` import kg.apc.jmeter.modifiers.FifoMap; if (vars.get("rnd").equals("1")) { FifoMap.getInstance(...
Did you try to use Inter-Thread Communication PostProcessor outside of http-request - for instanse, inside "Simple Controller" which is placed after http-request? In this case you can use any logic controllers (if, throughput, etc.)
36,060
I have read about sakkayaditti <https://www.wisdomlib.org/definition/sakkayaditti> Sakkayaditti means something in Buddhism, Pali. please help me to clarify
2019/11/22
[ "https://buddhism.stackexchange.com/questions/36060", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/17327/" ]
This is a key concept in the Early Buddhist Texts: > > [MN 64](https://suttacentral.net/mn64/en/sujato#mn64:3.4): Anusetvevassa sakkāyadiṭṭhānusayo. > > > [MN 64](https://suttacentral.net/mn64/en/sujato#mn64:3.4): Yet the underlying tendency to ***identity view*** still lies within them. > > > Identity View is ...
This is misunderstood by many people today. They say sakkaya ditti means: self view. According to dhamma, when a peraon become 1st entrant (sotāpanna) he uproots the sakkaya ditti. So if sakkaya ditti means self view, then that person no need to go beyond that point, since there's noone (no self view) to attain nibbana...
36,060
I have read about sakkayaditti <https://www.wisdomlib.org/definition/sakkayaditti> Sakkayaditti means something in Buddhism, Pali. please help me to clarify
2019/11/22
[ "https://buddhism.stackexchange.com/questions/36060", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/17327/" ]
This is a key concept in the Early Buddhist Texts: > > [MN 64](https://suttacentral.net/mn64/en/sujato#mn64:3.4): Anusetvevassa sakkāyadiṭṭhānusayo. > > > [MN 64](https://suttacentral.net/mn64/en/sujato#mn64:3.4): Yet the underlying tendency to ***identity view*** still lies within them. > > > Identity View is ...
> > Ime kho, āvuso visākha, pañcupādānakkhandhā **sakkāyo** vutto > bhagavatā > > > These five clinging-aggregates are the **self-identification** > described by the Blessed One. > > > The craving that makes for further becoming — accompanied by passion & > delight, relishing now here & now there — i.e., craving f...
36,060
I have read about sakkayaditti <https://www.wisdomlib.org/definition/sakkayaditti> Sakkayaditti means something in Buddhism, Pali. please help me to clarify
2019/11/22
[ "https://buddhism.stackexchange.com/questions/36060", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/17327/" ]
> > Ime kho, āvuso visākha, pañcupādānakkhandhā **sakkāyo** vutto > bhagavatā > > > These five clinging-aggregates are the **self-identification** > described by the Blessed One. > > > The craving that makes for further becoming — accompanied by passion & > delight, relishing now here & now there — i.e., craving f...
This is misunderstood by many people today. They say sakkaya ditti means: self view. According to dhamma, when a peraon become 1st entrant (sotāpanna) he uproots the sakkaya ditti. So if sakkaya ditti means self view, then that person no need to go beyond that point, since there's noone (no self view) to attain nibbana...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
`file` is a stack variable in `ListFiles()` and you're returning a pointer to it. Once you return from that function, the variable will cease to exist, so the returned pointer will be invalid. If you want to return a string, you should [allocate it on the heap](http://pubs.opengroup.org/onlinepubs/009695399/functions/...
You're trying to display a string value char file[30] that is allocated on the stack (function stack). The content of this memory is not guaranteed after the method return. You should allocate it dynamically (for ex. malloc) or eventually use global value, or allocate it on the stack of the outer function (in your exam...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
Follow [`George Skoptsov`](https://stackoverflow.com/users/1257977/george-skoptsov) recommendations. But If you don't have the [`strdup()`](http://pubs.opengroup.org/onlinepubs/009695399/functions/strdup.html) function,then use this: ``` char* strdup(const char* org) { if(org == NULL) return NULL; char* newst...
`file` is a stack variable in `ListFiles()` and you're returning a pointer to it. Once you return from that function, the variable will cease to exist, so the returned pointer will be invalid. If you want to return a string, you should [allocate it on the heap](http://pubs.opengroup.org/onlinepubs/009695399/functions/...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
What you're doing is returning a pointer to a local variable, which used to be allocated on stack. Change your return statement to ``` return strdup(file); ```
You're trying to display a string value char file[30] that is allocated on the stack (function stack). The content of this memory is not guaranteed after the method return. You should allocate it dynamically (for ex. malloc) or eventually use global value, or allocate it on the stack of the outer function (in your exam...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
Follow [`George Skoptsov`](https://stackoverflow.com/users/1257977/george-skoptsov) recommendations. But If you don't have the [`strdup()`](http://pubs.opengroup.org/onlinepubs/009695399/functions/strdup.html) function,then use this: ``` char* strdup(const char* org) { if(org == NULL) return NULL; char* newst...
you shouldn't return data that sits on automatic storage, when you return it goes out of scope.
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
What you're doing is returning a pointer to a local variable, which used to be allocated on stack. Change your return statement to ``` return strdup(file); ```
You are returning a pointer points to the stack variable. When the function returns, the stack gets popped off. The stack variable no longer exists, the pointer become a dangling pointer. One solution is to allocate the appropriate amount of memory in the main function, and pass the pointer to the memory to the helpe...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
Follow [`George Skoptsov`](https://stackoverflow.com/users/1257977/george-skoptsov) recommendations. But If you don't have the [`strdup()`](http://pubs.opengroup.org/onlinepubs/009695399/functions/strdup.html) function,then use this: ``` char* strdup(const char* org) { if(org == NULL) return NULL; char* newst...
You're trying to display a string value char file[30] that is allocated on the stack (function stack). The content of this memory is not guaranteed after the method return. You should allocate it dynamically (for ex. malloc) or eventually use global value, or allocate it on the stack of the outer function (in your exam...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
You are returning a pointer points to the stack variable. When the function returns, the stack gets popped off. The stack variable no longer exists, the pointer become a dangling pointer. One solution is to allocate the appropriate amount of memory in the main function, and pass the pointer to the memory to the helpe...
You're trying to display a string value char file[30] that is allocated on the stack (function stack). The content of this memory is not guaranteed after the method return. You should allocate it dynamically (for ex. malloc) or eventually use global value, or allocate it on the stack of the outer function (in your exam...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
Follow [`George Skoptsov`](https://stackoverflow.com/users/1257977/george-skoptsov) recommendations. But If you don't have the [`strdup()`](http://pubs.opengroup.org/onlinepubs/009695399/functions/strdup.html) function,then use this: ``` char* strdup(const char* org) { if(org == NULL) return NULL; char* newst...
You are returning a pointer points to the stack variable. When the function returns, the stack gets popped off. The stack variable no longer exists, the pointer become a dangling pointer. One solution is to allocate the appropriate amount of memory in the main function, and pass the pointer to the memory to the helpe...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
What you're doing is returning a pointer to a local variable, which used to be allocated on stack. Change your return statement to ``` return strdup(file); ```
`file` is a stack variable in `ListFiles()` and you're returning a pointer to it. Once you return from that function, the variable will cease to exist, so the returned pointer will be invalid. If you want to return a string, you should [allocate it on the heap](http://pubs.opengroup.org/onlinepubs/009695399/functions/...
10,131,464
I am working on some kind of file sharing program which is written in C. There is a function that can read a data file and store the data into a string and return this string to main function and the main function send back to client. Codes are shown below ``` char* ListFiles(){ FILE *fp; char file[30]; ch...
2012/04/12
[ "https://Stackoverflow.com/questions/10131464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113845/" ]
`file` is a stack variable in `ListFiles()` and you're returning a pointer to it. Once you return from that function, the variable will cease to exist, so the returned pointer will be invalid. If you want to return a string, you should [allocate it on the heap](http://pubs.opengroup.org/onlinepubs/009695399/functions/...
you shouldn't return data that sits on automatic storage, when you return it goes out of scope.
47,978,833
I'm creating my first bootstrap frontend, and I'm experiencing some issues which I'm not able to solve: [![row](https://i.stack.imgur.com/az6go.png)](https://i.stack.imgur.com/az6go.png) The row expanding to the whole width of the container, the max column width (12 units) will not extend to this width: [![column](h...
2017/12/26
[ "https://Stackoverflow.com/questions/47978833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7109315/" ]
your class name wrong `col_xl-12` to change class name `col-xl-12` [![enter image description here](https://i.stack.imgur.com/P6IcL.png)](https://i.stack.imgur.com/P6IcL.png) <https://v4-alpha.getbootstrap.com/layout/grid/>
I'm seeing a typo, try to change: `col_xl-12` to -> `col-xl-12`
47,978,833
I'm creating my first bootstrap frontend, and I'm experiencing some issues which I'm not able to solve: [![row](https://i.stack.imgur.com/az6go.png)](https://i.stack.imgur.com/az6go.png) The row expanding to the whole width of the container, the max column width (12 units) will not extend to this width: [![column](h...
2017/12/26
[ "https://Stackoverflow.com/questions/47978833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7109315/" ]
your class name wrong `col_xl-12` to change class name `col-xl-12` [![enter image description here](https://i.stack.imgur.com/P6IcL.png)](https://i.stack.imgur.com/P6IcL.png) <https://v4-alpha.getbootstrap.com/layout/grid/>
1. Remove container from your coding. Then the row will have full width 2. your class should be `col-*-*`, but you used `col_xl-12` The HTML Structure Will be: ``` <div class="row"> <div class="/* Container or Container-fluid or Col-* */"> </div> </div> ```
47,978,833
I'm creating my first bootstrap frontend, and I'm experiencing some issues which I'm not able to solve: [![row](https://i.stack.imgur.com/az6go.png)](https://i.stack.imgur.com/az6go.png) The row expanding to the whole width of the container, the max column width (12 units) will not extend to this width: [![column](h...
2017/12/26
[ "https://Stackoverflow.com/questions/47978833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7109315/" ]
I'm seeing a typo, try to change: `col_xl-12` to -> `col-xl-12`
1. Remove container from your coding. Then the row will have full width 2. your class should be `col-*-*`, but you used `col_xl-12` The HTML Structure Will be: ``` <div class="row"> <div class="/* Container or Container-fluid or Col-* */"> </div> </div> ```
15,385,002
I am using django-cms to design a site,as of now i had to create a basic home page with a menu bar like `About Us`, `Products`, `Contact Us` etc., I had done all the necessary settings of `django` and `django-cms`, activated the admin section and working perfectly. I have created a `Home Page template` that contains...
2013/03/13
[ "https://Stackoverflow.com/questions/15385002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1342109/" ]
If this is your page layout in the admin section (`/admin/cms/page`): ``` - Home (level=0) - About Us (level=1) - About Company Services (level=2) - Foo Bar (level=3) - Our Management Team (level=2) - Some Other Section (level=1) - Some Sub Section (level=2) - ... ``` ...
use the {% show\_menu %} template tag to render menus. Be sure to read the documentation for that as well.
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
The question is internally inconsistent. I will assume if a line has 3 commas then we want to change the first and last comma to a period. Otherwise the line has 2 commas and we only want to change the last comma to a period: ``` $ sed -E '/(,[^,]+){3}/ { s/^([^,]+),/\1./ }; s/,([^,]+)$/.\1/' P7.csv 30,-4.098511E-02 3...
You can try this sed: ```bash cat file 30,-4,098511E-02 66,7,-1,865433 42,35,18,15199 30,05,-4,098511E-02 sed -E 's/^([0-9]*),([0-9])/\1.\2/; s/([0-9]),([0-9E-]*)$/\1.\2/' file 30,-4,098511E-02 66.7,-1.865433 42.35,18.15199 30.05,-4.098511E-02 ``` Here `^([0-9]*),([0-9])` matches 2 digits at start separated by a `...
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
Assuming you know there are only 2 columns *and* the second column is always a floating-point number (when there are any), you can use this: ``` awk -F, 'NF == 3 { $0 = $1FS$2"."$3 } NF == 4 { $0 = $1"."$2FS$3"."$4 } 1' infile ```
You can try this sed: ```bash cat file 30,-4,098511E-02 66,7,-1,865433 42,35,18,15199 30,05,-4,098511E-02 sed -E 's/^([0-9]*),([0-9])/\1.\2/; s/([0-9]),([0-9E-]*)$/\1.\2/' file 30,-4,098511E-02 66.7,-1.865433 42.35,18.15199 30.05,-4.098511E-02 ``` Here `^([0-9]*),([0-9])` matches 2 digits at start separated by a `...
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
You could easily do this tsk in `awk`. Please try following code written and tested in GNU `awk`. ``` awk ' BEGIN{ FS=OFS="," } NF==3{ match($0,/(^[^,]*),([^,]*),(.*$)/,arr) print arr[1],arr[2]"."arr[3] next } NF==4{ match($0,/(^[^,]*),([^,]*),([^,]*),(.*)$/,arr) print arr[1]"."arr[2],arr[3]"."arr[4] } ' I...
You can try this sed: ```bash cat file 30,-4,098511E-02 66,7,-1,865433 42,35,18,15199 30,05,-4,098511E-02 sed -E 's/^([0-9]*),([0-9])/\1.\2/; s/([0-9]),([0-9E-]*)$/\1.\2/' file 30,-4,098511E-02 66.7,-1.865433 42.35,18.15199 30.05,-4.098511E-02 ``` Here `^([0-9]*),([0-9])` matches 2 digits at start separated by a `...
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
Assuming you know there are only 2 columns *and* the second column is always a floating-point number (when there are any), you can use this: ``` awk -F, 'NF == 3 { $0 = $1FS$2"."$3 } NF == 4 { $0 = $1"."$2FS$3"."$4 } 1' infile ```
The question is internally inconsistent. I will assume if a line has 3 commas then we want to change the first and last comma to a period. Otherwise the line has 2 commas and we only want to change the last comma to a period: ``` $ sed -E '/(,[^,]+){3}/ { s/^([^,]+),/\1./ }; s/,([^,]+)$/.\1/' P7.csv 30,-4.098511E-02 3...
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
You could easily do this tsk in `awk`. Please try following code written and tested in GNU `awk`. ``` awk ' BEGIN{ FS=OFS="," } NF==3{ match($0,/(^[^,]*),([^,]*),(.*$)/,arr) print arr[1],arr[2]"."arr[3] next } NF==4{ match($0,/(^[^,]*),([^,]*),([^,]*),(.*)$/,arr) print arr[1]"."arr[2],arr[3]"."arr[4] } ' I...
The question is internally inconsistent. I will assume if a line has 3 commas then we want to change the first and last comma to a period. Otherwise the line has 2 commas and we only want to change the last comma to a period: ``` $ sed -E '/(,[^,]+){3}/ { s/^([^,]+),/\1./ }; s/,([^,]+)$/.\1/' P7.csv 30,-4.098511E-02 3...
73,660,460
Using this code I have write/replace data in an excel file. But now i need to do the same thing for csv file. Can someone help me with that? ```py with pd.ExcelWriter('2.xlsx', mode='a', engine='openpyxl', if_sheet_exists='replace') as writer: fm_data.to_excel(writer, sheet_name='Raw Data1') ```
2022/09/09
[ "https://Stackoverflow.com/questions/73660460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19875567/" ]
Assuming you know there are only 2 columns *and* the second column is always a floating-point number (when there are any), you can use this: ``` awk -F, 'NF == 3 { $0 = $1FS$2"."$3 } NF == 4 { $0 = $1"."$2FS$3"."$4 } 1' infile ```
You could easily do this tsk in `awk`. Please try following code written and tested in GNU `awk`. ``` awk ' BEGIN{ FS=OFS="," } NF==3{ match($0,/(^[^,]*),([^,]*),(.*$)/,arr) print arr[1],arr[2]"."arr[3] next } NF==4{ match($0,/(^[^,]*),([^,]*),([^,]*),(.*)$/,arr) print arr[1]"."arr[2],arr[3]"."arr[4] } ' I...
2,243,423
i want the assemblies (\*.dll) files for silverlight charting controls or give me path that where does it stoer when we install the toolkit in our computer
2010/02/11
[ "https://Stackoverflow.com/questions/2243423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/255609/" ]
When you've installed the toolkit you will find the dlls in:- `C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Toolkit\Nov09\Bin` or on a 32 bit system:- `C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Toolkit\Nov09\Bin` The above is obviously for the November 09 release, no doubt as this answer ages the ...
There should be a toolkit folder under C:\Program Files\Microsoft SDKs\Silverlight\v3.0\ after installing toolkit.
1,774,129
I'm looking for a good way to find the process ID of a particular Windows Service. In particular, I need to find the pid of the default "WebClient" service that ships with Windows. It's hosted as a "local service" within a svchost.exe process. I see that when I use netstat to see what processes are using what ports it...
2009/11/21
[ "https://Stackoverflow.com/questions/1774129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19404/" ]
[`QueryServiceStatusEx`](http://msdn.microsoft.com/en-us/library/ms684941%28VS.85%29.aspx) returns a [`SERVICE_STATUS_PROCESS`](http://msdn.microsoft.com/en-us/library/ms685992%28VS.85%29.aspx), which contains the process identifier for the process under which the service is running. You can use [`OpenService`](http:...
Here's a minimalist C++ function to do exactly what you want: ``` DWORD GetServicePid(const char* serviceName) { const auto hScm = OpenSCManager(nullptr, nullptr, NULL); const auto hSc = OpenService(hScm, serviceName, SERVICE_QUERY_STATUS); SERVICE_STATUS_PROCESS ssp = {}; DWORD bytesNeeded = 0; Q...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
I found a good benchmark comparison web page that basically compares 5 renowned databases: * LevelDB * Kyoto TreeDB * SQLite3 * MDB * BerkeleyDB You should check it out before making your choice: <http://symas.com/mdb/microbench/>. P.S - I know you've already tested them, but you should also consider that your confi...
300 M \* 8 bytes = 2.4GB. That will probably fit into memory (if the OS does not restrict the address space to 31 bits) Since you'll also need to handle overflow, (either by a rehashing scheme or by chaining) memory gets even tighter, for linear probing you probably need > 400M slots, chaining will increase the sizeof ...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
500,000 entries per second without holding the working set in memory? Wow. In the general case this is not possible using HDDs and even difficult SSDs. Have you any locality properties that might help to make the task a bit easier? What kind of queries do you have?
Berkely DB could do it for you. I acheived 50000 inserts per second about 8 years ago and a final database of 70 billion records.
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
David Segleau, here. Product Manager for Berkeley DB. The most common problem with BDB performance is that people don't configure the cache size, leaving it at the default, which is pretty small. The second most common problem is that people write application behavior emulators that do random look-ups (even though th...
Try [ZooLib](http://www.zoolib.org/). It provides a database with a C++ API, that was originally written for a high-performance multimedia database for educational institutions called Knowledge Forum. It could handle 3,000 simultaneous Mac and Windows clients (also written in ZooLib - it's a cross-platform applicatio...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
David Segleau, here. Product Manager for Berkeley DB. The most common problem with BDB performance is that people don't configure the cache size, leaving it at the default, which is pretty small. The second most common problem is that people write application behavior emulators that do random look-ups (even though th...
We use [Redis](http://redis.io/). Written in C, its only slightly more complicated than memcached by design. Never tried to use that many rows but for us latency is very important and it handles those latencies well and lets us store the data in the disk Here is a [bench mark blog entry](http://antirez.com/post/redis-...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
300 M \* 8 bytes = 2.4GB. That will probably fit into memory (if the OS does not restrict the address space to 31 bits) Since you'll also need to handle overflow, (either by a rehashing scheme or by chaining) memory gets even tighter, for linear probing you probably need > 400M slots, chaining will increase the sizeof ...
We use [Redis](http://redis.io/). Written in C, its only slightly more complicated than memcached by design. Never tried to use that many rows but for us latency is very important and it handles those latencies well and lets us store the data in the disk Here is a [bench mark blog entry](http://antirez.com/post/redis-...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
Try [ZooLib](http://www.zoolib.org/). It provides a database with a C++ API, that was originally written for a high-performance multimedia database for educational institutions called Knowledge Forum. It could handle 3,000 simultaneous Mac and Windows clients (also written in ZooLib - it's a cross-platform applicatio...
We use [Redis](http://redis.io/). Written in C, its only slightly more complicated than memcached by design. Never tried to use that many rows but for us latency is very important and it handles those latencies well and lets us store the data in the disk Here is a [bench mark blog entry](http://antirez.com/post/redis-...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
David Segleau, here. Product Manager for Berkeley DB. The most common problem with BDB performance is that people don't configure the cache size, leaving it at the default, which is pretty small. The second most common problem is that people write application behavior emulators that do random look-ups (even though th...
300 M \* 8 bytes = 2.4GB. That will probably fit into memory (if the OS does not restrict the address space to 31 bits) Since you'll also need to handle overflow, (either by a rehashing scheme or by chaining) memory gets even tighter, for linear probing you probably need > 400M slots, chaining will increase the sizeof ...
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
David Segleau, here. Product Manager for Berkeley DB. The most common problem with BDB performance is that people don't configure the cache size, leaving it at the default, which is pretty small. The second most common problem is that people write application behavior emulators that do random look-ups (even though th...
500,000 entries per second without holding the working set in memory? Wow. In the general case this is not possible using HDDs and even difficult SSDs. Have you any locality properties that might help to make the task a bit easier? What kind of queries do you have?
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
David Segleau, here. Product Manager for Berkeley DB. The most common problem with BDB performance is that people don't configure the cache size, leaving it at the default, which is pretty small. The second most common problem is that people write application behavior emulators that do random look-ups (even though th...
Berkely DB could do it for you. I acheived 50000 inserts per second about 8 years ago and a final database of 70 billion records.
7,229,552
I am trying to create a key/value database with 300,000,000 key/value pairs of 8 bytes each (both for the key and the value). The requirement is to have a very fast key/value mechanism which can query about 500,000 entries per second. I tried BDB, Tokyo DB, Kyoto DB, and levelDB and they all perform very bad when it c...
2011/08/29
[ "https://Stackoverflow.com/questions/7229552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/741628/" ]
I found a good benchmark comparison web page that basically compares 5 renowned databases: * LevelDB * Kyoto TreeDB * SQLite3 * MDB * BerkeleyDB You should check it out before making your choice: <http://symas.com/mdb/microbench/>. P.S - I know you've already tested them, but you should also consider that your confi...
Try [ZooLib](http://www.zoolib.org/). It provides a database with a C++ API, that was originally written for a high-performance multimedia database for educational institutions called Knowledge Forum. It could handle 3,000 simultaneous Mac and Windows clients (also written in ZooLib - it's a cross-platform applicatio...
36,711,068
My middleware class is in different class library project and controller is in different project. What I am trying to do, if specific condition does not meet then redirect to the Custom Controller/Action method from middleware. However, I am not able to do that with Response.Redirect method. How can I do this in midd...
2016/04/19
[ "https://Stackoverflow.com/questions/36711068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1421482/" ]
It seems you're using a middleware for the wrong reasons. I recommend that you either have the middleware return a (very minimal) 404 by simply writing it to the response stream (instead of forwarding to `Next()`), or don't do this in a middleware at all but instead in a globally registered `IActionFilter` in your MVC...
Here is middleware that examines the request and redirects. It works with either inline middleware or with a middleware class. ``` public void Configure(IApplicationBuilder app) { // use inline middleware app.Use(async (context, next) => { // if specific condition does not meet if (context....
36,711,068
My middleware class is in different class library project and controller is in different project. What I am trying to do, if specific condition does not meet then redirect to the Custom Controller/Action method from middleware. However, I am not able to do that with Response.Redirect method. How can I do this in midd...
2016/04/19
[ "https://Stackoverflow.com/questions/36711068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1421482/" ]
It seems you're using a middleware for the wrong reasons. I recommend that you either have the middleware return a (very minimal) 404 by simply writing it to the response stream (instead of forwarding to `Next()`), or don't do this in a middleware at all but instead in a globally registered `IActionFilter` in your MVC...
You can use "Request Editing Middleware" to change the nature of the request as it moves down the pipeline. This fits in with the general "best practices" and will be more efficient than sending a redirect notice back to the browser. This example redirects to an action method than can return an image: ``` public clas...
36,711,068
My middleware class is in different class library project and controller is in different project. What I am trying to do, if specific condition does not meet then redirect to the Custom Controller/Action method from middleware. However, I am not able to do that with Response.Redirect method. How can I do this in midd...
2016/04/19
[ "https://Stackoverflow.com/questions/36711068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1421482/" ]
Here is middleware that examines the request and redirects. It works with either inline middleware or with a middleware class. ``` public void Configure(IApplicationBuilder app) { // use inline middleware app.Use(async (context, next) => { // if specific condition does not meet if (context....
You can use "Request Editing Middleware" to change the nature of the request as it moves down the pipeline. This fits in with the general "best practices" and will be more efficient than sending a redirect notice back to the browser. This example redirects to an action method than can return an image: ``` public clas...
9,837,050
In MSTest, the `[Shadowing]` attribute helps you to unit test a private method from another assembly. Here is the related link : [What is the Shadowing attribute that the VS uses when it generates unit tests?](https://stackoverflow.com/questions/3443755/what-is-the-shadowing-attribute-that-the-vs-uses-when-it-generates...
2012/03/23
[ "https://Stackoverflow.com/questions/9837050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/411924/" ]
I would preffer to exercise all the private methods thru the public available calls. There must be a path to execute each private line from a public call and if it is not there you can delete that code. Using internal instead of private could end with a big mess, I won't use that approach.
As a Java developer, I do. I don't change access levels, either. I use reflection to get access to private methods. I don't have to grant it to my users, and I don't have to show them my unit tests. It's a dirty secret of Java: you can always circumvent access restrictions with reflection. I don't know if it's also tr...
9,837,050
In MSTest, the `[Shadowing]` attribute helps you to unit test a private method from another assembly. Here is the related link : [What is the Shadowing attribute that the VS uses when it generates unit tests?](https://stackoverflow.com/questions/3443755/what-is-the-shadowing-attribute-that-the-vs-uses-when-it-generates...
2012/03/23
[ "https://Stackoverflow.com/questions/9837050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/411924/" ]
1. No, private methods should not be tested. Your application will interact with public API only. So you should test expected behavior of your class for this interaction. Private methods is a part of inner logic implementation. Users of your class should not be care how it implemented. 2. No, it is not good. See above....
I would preffer to exercise all the private methods thru the public available calls. There must be a path to execute each private line from a public call and if it is not there you can delete that code. Using internal instead of private could end with a big mess, I won't use that approach.
9,837,050
In MSTest, the `[Shadowing]` attribute helps you to unit test a private method from another assembly. Here is the related link : [What is the Shadowing attribute that the VS uses when it generates unit tests?](https://stackoverflow.com/questions/3443755/what-is-the-shadowing-attribute-that-the-vs-uses-when-it-generates...
2012/03/23
[ "https://Stackoverflow.com/questions/9837050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/411924/" ]
To answer your questions briefly: 1. In general, they shouldn't. Most of the times, your private bits will be tested while testing class contract/public API. For the times this is not possible, testing private method is unit test just as anything else. 2. This is fairly common. While changing visibility might be consi...
I would preffer to exercise all the private methods thru the public available calls. There must be a path to execute each private line from a public call and if it is not there you can delete that code. Using internal instead of private could end with a big mess, I won't use that approach.
9,837,050
In MSTest, the `[Shadowing]` attribute helps you to unit test a private method from another assembly. Here is the related link : [What is the Shadowing attribute that the VS uses when it generates unit tests?](https://stackoverflow.com/questions/3443755/what-is-the-shadowing-attribute-that-the-vs-uses-when-it-generates...
2012/03/23
[ "https://Stackoverflow.com/questions/9837050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/411924/" ]
1. No, private methods should not be tested. Your application will interact with public API only. So you should test expected behavior of your class for this interaction. Private methods is a part of inner logic implementation. Users of your class should not be care how it implemented. 2. No, it is not good. See above....
As a Java developer, I do. I don't change access levels, either. I use reflection to get access to private methods. I don't have to grant it to my users, and I don't have to show them my unit tests. It's a dirty secret of Java: you can always circumvent access restrictions with reflection. I don't know if it's also tr...
9,837,050
In MSTest, the `[Shadowing]` attribute helps you to unit test a private method from another assembly. Here is the related link : [What is the Shadowing attribute that the VS uses when it generates unit tests?](https://stackoverflow.com/questions/3443755/what-is-the-shadowing-attribute-that-the-vs-uses-when-it-generates...
2012/03/23
[ "https://Stackoverflow.com/questions/9837050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/411924/" ]
To answer your questions briefly: 1. In general, they shouldn't. Most of the times, your private bits will be tested while testing class contract/public API. For the times this is not possible, testing private method is unit test just as anything else. 2. This is fairly common. While changing visibility might be consi...
As a Java developer, I do. I don't change access levels, either. I use reflection to get access to private methods. I don't have to grant it to my users, and I don't have to show them my unit tests. It's a dirty secret of Java: you can always circumvent access restrictions with reflection. I don't know if it's also tr...
214,215
![](https://i.imgur.com/kq8sPmh.png) I would like to have these expressions aligned so that the kerning and slightly different character widths do not result in an uneven overall appearance. I tried using an `align` environment within `algorithm` but it resulted in errors. Here is a MWE: ![](https://i.imgur.com/AVI6W...
2014/11/27
[ "https://tex.stackexchange.com/questions/214215", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/9610/" ]
Something like this? ``` \begin{tikzpicture} % Set horizontal range \pgfmathsetmacro{\nx}{8} % Set vertical range \pgfmathsetmacro{\ny}{2.5} \pgfmathsetmacro{\xmin}{2*(sqrt(\ny+1)-1)/\ny} \pgfmathsetmacro{\xmint}{2/sqrt(\ny)} \pgfmathsetmacro{\xminb}{4/\ny} \pgfmathsetmacro{\xmax}{2*\nx} \begin{axis}[xmin=0,xmax=\...
May be this: ``` \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ xmax=1, xmin=0, ymax=10, ymin=-250, ] \addplot[ red, %smooth, %% this will spoil the plot domain=-5:5, samples=1000,thick ] {0.5/x²-22/x}; \end{axis} \end{tikzpicture} \e...
214,215
![](https://i.imgur.com/kq8sPmh.png) I would like to have these expressions aligned so that the kerning and slightly different character widths do not result in an uneven overall appearance. I tried using an `align` environment within `algorithm` but it resulted in errors. Here is a MWE: ![](https://i.imgur.com/AVI6W...
2014/11/27
[ "https://tex.stackexchange.com/questions/214215", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/9610/" ]
May be this: ``` \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ xmax=1, xmin=0, ymax=10, ymin=-250, ] \addplot[ red, %smooth, %% this will spoil the plot domain=-5:5, samples=1000,thick ] {0.5/x²-22/x}; \end{axis} \end{tikzpicture} \e...
Try this ``` \documentclass[border=2pt]{standalone} % Drawing \usepackage{tikz} \usepackage{physics} \usepackage{nicefrac} \usetikzlibrary{arrows.meta} % to control arrow size \tikzset{>={Latex[length=4,width=4]}} % for LaTeX arrow head % Tikz Library \begin{document} \begin{tikzpicture} % Axis \...
214,215
![](https://i.imgur.com/kq8sPmh.png) I would like to have these expressions aligned so that the kerning and slightly different character widths do not result in an uneven overall appearance. I tried using an `align` environment within `algorithm` but it resulted in errors. Here is a MWE: ![](https://i.imgur.com/AVI6W...
2014/11/27
[ "https://tex.stackexchange.com/questions/214215", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/9610/" ]
Something like this? ``` \begin{tikzpicture} % Set horizontal range \pgfmathsetmacro{\nx}{8} % Set vertical range \pgfmathsetmacro{\ny}{2.5} \pgfmathsetmacro{\xmin}{2*(sqrt(\ny+1)-1)/\ny} \pgfmathsetmacro{\xmint}{2/sqrt(\ny)} \pgfmathsetmacro{\xminb}{4/\ny} \pgfmathsetmacro{\xmax}{2*\nx} \begin{axis}[xmin=0,xmax=\...
Try this ``` \documentclass[border=2pt]{standalone} % Drawing \usepackage{tikz} \usepackage{physics} \usepackage{nicefrac} \usetikzlibrary{arrows.meta} % to control arrow size \tikzset{>={Latex[length=4,width=4]}} % for LaTeX arrow head % Tikz Library \begin{document} \begin{tikzpicture} % Axis \...
19,640,710
My buttons aren't lining up correctly... whats wrong? ``` private void loadPuzzleButtons() { if (active_puzzle != null) { int devider = 5; int count = 0; JToggleButton puzzleButton[] = new JToggleButton[active_puzzle.getNumberOfPieces()]; for(int row = 0; row < active_puzzle.get...
2013/10/28
[ "https://Stackoverflow.com/questions/19640710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4102299/" ]
Try to use [LayoutManager](http://docs.oracle.com/javase/tutorial/uiswing/layout/using.html) to fill panel properly
what do .getcolumns and getrows output. try it. output the column and row inside the inner loop and make sure you get at least those numbers right. are you sure row ever increments?
61,849,978
I'm working to show notifications from Server-Sent Event. I checked that every time the browser tries to reconnect with the source about 3 seconds after each connection is closed. That event is getting a call too fast, so my server is loaded too. So how do I change the reopening time to increase? I have to do at least...
2020/05/17
[ "https://Stackoverflow.com/questions/61849978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6293856/" ]
There exist universally accepted definitions of lock-freedom and wait-freedom, and the definitions provided in your question are consistent with those. And I would strongly assume that the C++ standard committee certainly sticks to definitions that are universally accepted in the scientific community. In general, publ...
Since there are many definitions of wait-freedom1 and people choose different ones, I think that a precise definition is paramount, and a distinction between its specializations is necessary and useful. These [are](https://concurrencyfreaks.blogspot.com/2013/05/lock-free-and-wait-free-definition-and.html) the universa...
48,092,940
Does anyone have a working function available to use within Oracle using PL/SQL which implements the Luhn Mod 16 Algorithm to generate a check digit for an input code number such as the following example? `0B012722900021AC35B2` LOGIC 1. Map from HEX into Decimal equivalent `0 B 0 1 2 7 2 2 9 0 0 0 2 1 A C 3 5 B 2` - ...
2018/01/04
[ "https://Stackoverflow.com/questions/48092940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9172160/" ]
How about this? ``` CREATE OR REPLACE TYPE VARCHAR_TABLE_TYPE AS TABLE OF VARCHAR2(1000); DECLARE luhn VARCHAR2(100) := '0B012722900021AC35B2'; digits VARCHAR_TABLE_TYPE; DigitSum INTEGER; BEGIN SELECT REGEXP_SUBSTR(luhn, '.', 1, LEVEL) BULK COLLECT INTO digits FROM dual CONNECT BY REGEX...
Here is a function which implements the steps you outlined in your question: ``` create or replace function get_luhn_16_check_digit ( p_str in varchar) return pls_integer is b16 sys.dbms_debug_vc2coll := sys.dbms_debug_vc2coll() ; n16 sys.odcinumberlist := sys.odcinumberlist(); tot simple_integer...
238,856
Recently, I read a book called "Swallowed Star". In the story, a virus changes human DNA enough for humans to have unbelievable superpowers and skills. Some even obtain the ability to have their own gravitational pull and not breathe in space. I want to know if it is actually possible for genes to be able to cause suc...
2022/12/03
[ "https://worldbuilding.stackexchange.com/questions/238856", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99833/" ]
Viruses and pathogens can affect everything that is based on genetic expression or biochemistry: there are known examples of pathogens changing the behavior of their hosts, for example, not forgetting that any pathogen tries to turn its host into a replicator of themselves. What a virus cannot do is changing the laws ...
In real life many people have genes for diseases they will never have. The unlucky ones are the people who get cancer, for example, after suffering a severe infection. The Epstein-Barr virus "turns on" the genes responsible for a certain kind of blood cancer. This is called epi-genetics. It's still a developing field. ...
238,856
Recently, I read a book called "Swallowed Star". In the story, a virus changes human DNA enough for humans to have unbelievable superpowers and skills. Some even obtain the ability to have their own gravitational pull and not breathe in space. I want to know if it is actually possible for genes to be able to cause suc...
2022/12/03
[ "https://worldbuilding.stackexchange.com/questions/238856", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99833/" ]
Viruses and pathogens can affect everything that is based on genetic expression or biochemistry: there are known examples of pathogens changing the behavior of their hosts, for example, not forgetting that any pathogen tries to turn its host into a replicator of themselves. What a virus cannot do is changing the laws ...
I would argue that a sufficiently complex (that is, likely not natural) retro-virus could make some changes like super-strong, super-fast, likely significantly improved senses of sight and hearing. Even there it might only express (either fully or even partially) in children rather than already-grown individuals. And t...
238,856
Recently, I read a book called "Swallowed Star". In the story, a virus changes human DNA enough for humans to have unbelievable superpowers and skills. Some even obtain the ability to have their own gravitational pull and not breathe in space. I want to know if it is actually possible for genes to be able to cause suc...
2022/12/03
[ "https://worldbuilding.stackexchange.com/questions/238856", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99833/" ]
I would argue that a sufficiently complex (that is, likely not natural) retro-virus could make some changes like super-strong, super-fast, likely significantly improved senses of sight and hearing. Even there it might only express (either fully or even partially) in children rather than already-grown individuals. And t...
In real life many people have genes for diseases they will never have. The unlucky ones are the people who get cancer, for example, after suffering a severe infection. The Epstein-Barr virus "turns on" the genes responsible for a certain kind of blood cancer. This is called epi-genetics. It's still a developing field. ...
238,856
Recently, I read a book called "Swallowed Star". In the story, a virus changes human DNA enough for humans to have unbelievable superpowers and skills. Some even obtain the ability to have their own gravitational pull and not breathe in space. I want to know if it is actually possible for genes to be able to cause suc...
2022/12/03
[ "https://worldbuilding.stackexchange.com/questions/238856", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99833/" ]
There is no conceivable way for a change in a human's genes to enable them to alter the laws of physics (i.e. give them their own gravitational pull). Not needing to breathe for extended periods could be made possible with some form of extremely efficient [anaerobic respiration](https://en.wikipedia.org/wiki/Anaerobic...
In real life many people have genes for diseases they will never have. The unlucky ones are the people who get cancer, for example, after suffering a severe infection. The Epstein-Barr virus "turns on" the genes responsible for a certain kind of blood cancer. This is called epi-genetics. It's still a developing field. ...
238,856
Recently, I read a book called "Swallowed Star". In the story, a virus changes human DNA enough for humans to have unbelievable superpowers and skills. Some even obtain the ability to have their own gravitational pull and not breathe in space. I want to know if it is actually possible for genes to be able to cause suc...
2022/12/03
[ "https://worldbuilding.stackexchange.com/questions/238856", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99833/" ]
There is no conceivable way for a change in a human's genes to enable them to alter the laws of physics (i.e. give them their own gravitational pull). Not needing to breathe for extended periods could be made possible with some form of extremely efficient [anaerobic respiration](https://en.wikipedia.org/wiki/Anaerobic...
I would argue that a sufficiently complex (that is, likely not natural) retro-virus could make some changes like super-strong, super-fast, likely significantly improved senses of sight and hearing. Even there it might only express (either fully or even partially) in children rather than already-grown individuals. And t...
21,075,929
I'm trying to preserve the current height of the page when doing an Ajax call. Almost the whole content is hidden before showing the new content, so the browser scrolls to the top of the page because there is no content below during the transition. ``` linksPages.on('click',function(e){ e.preventDefault();...
2014/01/12
[ "https://Stackoverflow.com/questions/21075929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2571840/" ]
The `popoverControllerDidDismissPopover:` in the delegate is not called when 'dismissPopoverAnimated:' is used. From the [Apple Documentation](https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html#jumpTo_4) for `popoverControllerDidDismissPo...
There are two ways to dismiss a popover. (a) tapping outside the popover; and (b) doing it programmatically with ``` [self.popover dismissPopoverAnimated:YES]; ``` If you do it programmatically, then the docs (<https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protoco...
21,075,929
I'm trying to preserve the current height of the page when doing an Ajax call. Almost the whole content is hidden before showing the new content, so the browser scrolls to the top of the page because there is no content below during the transition. ``` linksPages.on('click',function(e){ e.preventDefault();...
2014/01/12
[ "https://Stackoverflow.com/questions/21075929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2571840/" ]
The `popoverControllerDidDismissPopover:` in the delegate is not called when 'dismissPopoverAnimated:' is used. From the [Apple Documentation](https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html#jumpTo_4) for `popoverControllerDidDismissPo...
popoverControllerDidDismissPopover is not called on Dismiss, but its called when you click outside the popoverController contentview. <https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html#jumpTo_4>
21,075,929
I'm trying to preserve the current height of the page when doing an Ajax call. Almost the whole content is hidden before showing the new content, so the browser scrolls to the top of the page because there is no content below during the transition. ``` linksPages.on('click',function(e){ e.preventDefault();...
2014/01/12
[ "https://Stackoverflow.com/questions/21075929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2571840/" ]
There are two ways to dismiss a popover. (a) tapping outside the popover; and (b) doing it programmatically with ``` [self.popover dismissPopoverAnimated:YES]; ``` If you do it programmatically, then the docs (<https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protoco...
popoverControllerDidDismissPopover is not called on Dismiss, but its called when you click outside the popoverController contentview. <https://developer.apple.com/library/ios/documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html#jumpTo_4>
15,951,412
Sometimes I see constructs like [`$('<img/>')`](https://stackoverflow.com/questions/6124409/image-size-before-is-in-dom). How is `$('<img/>')` different from `$('img')` and where can I read more about this? I tried looking at [jQuery Selectors](http://api.jquery.com/category/selectors/) but found nothing related to th...
2013/04/11
[ "https://Stackoverflow.com/questions/15951412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1257965/" ]
The jQuery function is overloaded to construct new jQuery elements when passed a string that looks like HTML. From the [docs](http://api.jquery.com/jQuery/#jQuery2): > > If a string is passed as the parameter to $(), jQuery examines the > string to see if it looks like HTML (i.e., it starts with `<tag ... >`). > If...
`$('<img/>')` **creates** an image, whereas `$('img')` selects all currently existing images.
15,951,412
Sometimes I see constructs like [`$('<img/>')`](https://stackoverflow.com/questions/6124409/image-size-before-is-in-dom). How is `$('<img/>')` different from `$('img')` and where can I read more about this? I tried looking at [jQuery Selectors](http://api.jquery.com/category/selectors/) but found nothing related to th...
2013/04/11
[ "https://Stackoverflow.com/questions/15951412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1257965/" ]
`$('<img/>')` **creates** an image, whereas `$('img')` selects all currently existing images.
`$('<img />')` creates a new `<img />` element to be inserted to the DOM. `$('img')` selects all existing `<img />` elements. Generally, one would use `$('<img />')` to create elements in the DOM as follows: ``` var toAppend = $('<img />'); toAppend.appendTo($('#myDiv')); ``` Whereas you could use the `$('img');` ...
15,951,412
Sometimes I see constructs like [`$('<img/>')`](https://stackoverflow.com/questions/6124409/image-size-before-is-in-dom). How is `$('<img/>')` different from `$('img')` and where can I read more about this? I tried looking at [jQuery Selectors](http://api.jquery.com/category/selectors/) but found nothing related to th...
2013/04/11
[ "https://Stackoverflow.com/questions/15951412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1257965/" ]
The jQuery function is overloaded to construct new jQuery elements when passed a string that looks like HTML. From the [docs](http://api.jquery.com/jQuery/#jQuery2): > > If a string is passed as the parameter to $(), jQuery examines the > string to see if it looks like HTML (i.e., it starts with `<tag ... >`). > If...
`$('<img />')` creates a new `<img />` element to be inserted to the DOM. `$('img')` selects all existing `<img />` elements. Generally, one would use `$('<img />')` to create elements in the DOM as follows: ``` var toAppend = $('<img />'); toAppend.appendTo($('#myDiv')); ``` Whereas you could use the `$('img');` ...
46,971,445
This is my `BindingAdapter`: ``` @BindingAdapter(value = *arrayOf("bind:commentsAdapter", "bind:itemClick", "bind:avatarClick", "bind:scrolledUp"), requireAll = false) fun initWithCommentsAdapter(recyclerView: RecyclerView, commentsAdapter: CommentsAdapter, itemClick: (item: EntityCommentIt...
2017/10/27
[ "https://Stackoverflow.com/questions/46971445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4710549/" ]
**Short Answer** Instead of using Kotlin generic lambda types, use **interfaces** with a single method that matches both return type and parameters of your method reference (`itemClick`) or your listener (`avatarClick`). You can also use abstract classes with a single abstract method, also with matching parameters and...
I ran into the same case, and what worked was having it declared as variable defining its type, that worked with the compiler `val avatarClick:(item: EntityCommentItem)->Unit = {}`
11,175,453
This question has been asked before but i still don't understand it fully so here it goes. If i have a class with a property (a non-nullable double or int) - can i read and write the property with multiple threads? I have read somewhere that since doubles are 64 bytes, it is possible to read a double property on one...
2012/06/24
[ "https://Stackoverflow.com/questions/11175453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/907734/" ]
> > If i have a class with a property (a non-nullable double or int) - can i read and write the property with multiple theads? > > > I assume you mean "without any synchronization". `double` and `long` are both 64 *bits* (8 bytes) in size, and are *not* guaranteed to be written atomically. So if you were moving f...
These operations are not atomic, that's why the [`Interlocked`](http://msdn.microsoft.com/en-us/library/system.threading.interlocked.aspx) class exists in the first place, with methods like `Increment(Int32)` and `Increment(Int64)`. To ensure thread safety, you should use at least this class, if not more complex locki...
263,517
I'm trying to set a different existing material on 5 Instances made with Instance on Points. Trying both 3.0.1 and 3.1 to no avail. Is there any value or attribute that signifies which instance you are on? I want to build a setup for texture painting with 5 copies of a character and therefore I am linking a rigify ri...
2022/05/13
[ "https://blender.stackexchange.com/questions/263517", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/27347/" ]
After a bit of faffing around, I've so far established that the *Set Material Index* node will work only if the incoming geometry, with materials assigned to slots, is on the same branch. The materials do not have to be assigned to faces of the incoming geometry... it just has to have its slots filled. In this example...
Managed to figure it out with inspiration from this answer:[How to access geonode generated "instance ID" from Cycles material?](https://blender.stackexchange.com/questions/248920/how-to-access-geonode-generated-instance-id-from-cycles-material?rq=1) My node setup looks like below and assigns materials all in geometry...
263,517
I'm trying to set a different existing material on 5 Instances made with Instance on Points. Trying both 3.0.1 and 3.1 to no avail. Is there any value or attribute that signifies which instance you are on? I want to build a setup for texture painting with 5 copies of a character and therefore I am linking a rigify ri...
2022/05/13
[ "https://blender.stackexchange.com/questions/263517", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/27347/" ]
Managed to figure it out with inspiration from this answer:[How to access geonode generated "instance ID" from Cycles material?](https://blender.stackexchange.com/questions/248920/how-to-access-geonode-generated-instance-id-from-cycles-material?rq=1) My node setup looks like below and assigns materials all in geometry...
`STORE NAMED ATTRIBUTE` for points with value as `ID` before `INSTANCE ON POINTS`, then `NAMED ATTRIBUTE` integer using the same name from the `STORED NAMED ATTRIBUTE` on the ID for the selection on a `RANDOM VALUE` using boolean [![enter image description here](https://i.stack.imgur.com/LB0M9.png)](https://i.stack.img...
263,517
I'm trying to set a different existing material on 5 Instances made with Instance on Points. Trying both 3.0.1 and 3.1 to no avail. Is there any value or attribute that signifies which instance you are on? I want to build a setup for texture painting with 5 copies of a character and therefore I am linking a rigify ri...
2022/05/13
[ "https://blender.stackexchange.com/questions/263517", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/27347/" ]
After a bit of faffing around, I've so far established that the *Set Material Index* node will work only if the incoming geometry, with materials assigned to slots, is on the same branch. The materials do not have to be assigned to faces of the incoming geometry... it just has to have its slots filled. In this example...
`STORE NAMED ATTRIBUTE` for points with value as `ID` before `INSTANCE ON POINTS`, then `NAMED ATTRIBUTE` integer using the same name from the `STORED NAMED ATTRIBUTE` on the ID for the selection on a `RANDOM VALUE` using boolean [![enter image description here](https://i.stack.imgur.com/LB0M9.png)](https://i.stack.img...
3,068,306
I am trying to concatenate clobs in a PL/SQL loop and it has been returning null whilst when using DBMS\_OUTPUT prints out the loop values and when executing each result of the clobs gives an output as well. The system is meant to execute an already stored SQL in a table based on the report name passed into it. This p...
2010/06/18
[ "https://Stackoverflow.com/questions/3068306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197945/" ]
Don't know about your code. Here is how it works for me: Whenever I create a function returning a clob value I do this: ``` function foo return clob is l_clob clob; begin dbms_lob.createtemporary(lob_loc => l_clob, cache => true, dur => dbms_lob.call); ... return l_clob; end; ``` When concatenating...
You have to use `dbms_lob.substr(your clob parameter,start position, length)` e.g `dbms_output('my clob value:' || dbms_lob.substr(your clob parameter,start position, length);` But you can print in a string max 4000 character, you can then use this in a looping function to print 4000 characters in each line.
28,487
I want to run a Mathematica code repeatedly, even after the kernel shuts down when it is out of memory, because I have designed my program to continue appending the data to a file. Currently, I have to restart the kernel manually every 10 minutes. Does anyone have an idea how one can automate this process? Thanks.
2013/07/12
[ "https://mathematica.stackexchange.com/questions/28487", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/8523/" ]
If you preselect a range of cells before execution you can continue execution past kernel quit using the option below. Selection and evaluation can be automated and done repeatedly. ``` SetOptions[$FrontEnd, "ClearEvaluationQueueOnKernelQuit" -> False] ``` Ref : <https://stackoverflow.com/a/13740555/879601> (`Memor...
Here is what rm -rf just mentioned, in the form of an example: ``` Do[ MemoryConstrained[ a = Range[10^n], 10000]; Print[Total[a]], {n, 1, 10} ] ``` Output: ``` 55 5050 500500 500500 500500 500500 500500 500500 500500 500500 ``` By using `MemoryConstrained`, you don't get any changes in the list `a...
50,304,502
I'm building one app where on top of Camera view I need to show something. Here is my code. ``` import 'dart:async'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; List<CameraDescription> cameras; void main() async { runApp(new MaterialApp( home: new CameraApp(), )); } class C...
2018/05/12
[ "https://Stackoverflow.com/questions/50304502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304215/" ]
I had this problem before and putting a height into the parent widget of `AspectRatio` fixed it.
I solved the problem this way: ``` children: <Widget>[ (controller== null) ? Container() : controller.value.Initialized ? Container(child: CameraPreview(controller)) : Container(), ], ```
50,304,502
I'm building one app where on top of Camera view I need to show something. Here is my code. ``` import 'dart:async'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; List<CameraDescription> cameras; void main() async { runApp(new MaterialApp( home: new CameraApp(), )); } class C...
2018/05/12
[ "https://Stackoverflow.com/questions/50304502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304215/" ]
If you have created and assigned value to the variable and still it shows `getter 'value' was called on null`, try to `Run` or `Restart` your app instead of `Hot Reload`. Because `Hot Reload` will not call `initstate()` (where variables assign their values) which will be only called by `Restarting` the app.
giving height to widget which is throwing error solved my issue
50,304,502
I'm building one app where on top of Camera view I need to show something. Here is my code. ``` import 'dart:async'; import 'package:flutter/material.dart'; import 'package:camera/camera.dart'; List<CameraDescription> cameras; void main() async { runApp(new MaterialApp( home: new CameraApp(), )); } class C...
2018/05/12
[ "https://Stackoverflow.com/questions/50304502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/304215/" ]
In the `initState`, you don't always instantiate a controller. Which means it can be `null`. Therefore inside the `build` method, you need to check null to not crash ``` (!this.controller?.value?.initialized ?? false) ? new Container() : cameraView , ```
giving height to widget which is throwing error solved my issue