qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
6,480
I'm interested in doing pano stitching digitally. There are several apps that look promising. I'm looking at learning Hugin (**<http://hugin.sourceforge.net/>**), but before I start investing the time in it, I thought I'd solicit opinions on what a good beginner pano stitching app might be... I'm intending to stitch ...
2011/01/06
[ "https://photo.stackexchange.com/questions/6480", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2998/" ]
The only program I've used is Hugin, but I'm really happy with it. I think it's pretty easy to use, and for the most part it's an automatic process. You'll spend most of your time waiting for the software to process the photos, so your best bet is to just install some software and start using it so you can get your res...
THE beginner pano app has to be Autostitch. There is almost no interface, you open a bunch of files and select the output size. That's it! It does not get any easier than that. Then there is also Microsoft ICE. It's the same principle in that it stitches without user input but it does let you tweak the horizon, center...
6,480
I'm interested in doing pano stitching digitally. There are several apps that look promising. I'm looking at learning Hugin (**<http://hugin.sourceforge.net/>**), but before I start investing the time in it, I thought I'd solicit opinions on what a good beginner pano stitching app might be... I'm intending to stitch ...
2011/01/06
[ "https://photo.stackexchange.com/questions/6480", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2998/" ]
THE beginner pano app has to be Autostitch. There is almost no interface, you open a bunch of files and select the output size. That's it! It does not get any easier than that. Then there is also Microsoft ICE. It's the same principle in that it stitches without user input but it does let you tweak the horizon, center...
In addition to picking your software, you'll want to remember a couple things while shooting. First, always shoot in manual mode, and use the same exposure for all your shots. If you let the camera adjust aperture and/or shutter from shot to shot, even the best stitching software will have a hard time avoiding a patch...
6,480
I'm interested in doing pano stitching digitally. There are several apps that look promising. I'm looking at learning Hugin (**<http://hugin.sourceforge.net/>**), but before I start investing the time in it, I thought I'd solicit opinions on what a good beginner pano stitching app might be... I'm intending to stitch ...
2011/01/06
[ "https://photo.stackexchange.com/questions/6480", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2998/" ]
The only program I've used is Hugin, but I'm really happy with it. I think it's pretty easy to use, and for the most part it's an automatic process. You'll spend most of your time waiting for the software to process the photos, so your best bet is to just install some software and start using it so you can get your res...
In addition to picking your software, you'll want to remember a couple things while shooting. First, always shoot in manual mode, and use the same exposure for all your shots. If you let the camera adjust aperture and/or shutter from shot to shot, even the best stitching software will have a hard time avoiding a patch...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
There's also another argument to be made for how these shots are made. Historically, the show has used scale models (way before CGI), which are held up by invisible strings and thus must comply with the local laws of gravity... of the studio set.
There's no good in-universe explanation. The Enterprise always seems to be travelling from planet to planet in a 2D plane, which would be unrealistic due to the thickness of even our disc-like Milky Way galaxy. Bear in mind that the starships of Star Trek are inspired substantially by naval vessels. The organizational...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
In-universe: First, even though space is indeed 3D, most solar systems/galaxies are relatively flat. So, a ship enroute from, say, DS9 to Earth would approach the Sol system at a relatively low angle of incidence relative to the ecliptic plane of the galaxy (but possibly not to the ecliptic plane of the Sol system its...
I used to scoff at the idea that all battles must be upright and planar. I aplaud that Star Wars III broke from that model albeit at a local scale. If you look at distance or time, and your goal is to minimize distance between two points in the same galaxy, you would want to maintain a Z-level consistent with or the s...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
There is one instance of the Enterprise D approaching from "underneath" in the episode [All Good Things...](http://en.memory-alpha.org/wiki/All_Good_Things..._%28episode%29). There is a [video](http://www.youtube.com/watch?v=P0R0mdEP5fc&feature=player_detailpage&t=137) of that on youtube. However since that sequence i...
In the Star Trek universe (and most sci-fi), while space has zero gravity, the ships all have artificial gravity. Ships rendering aid to and needing to dock (or couple) with one another would need to align their artificial gravity with as closely a possible to avoid accidents and/or injury when moving between vessels. ...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
This is primarily attributable to Hollywood style. Even though it is realistic, Star Trek more often chooses what "looks right" instead. People are used to observing things in a 2D or gravity constrained 3D frame of reference, so when things are near each other, but in different planes of travel, it doesn't really look...
I used to scoff at the idea that all battles must be upright and planar. I aplaud that Star Wars III broke from that model albeit at a local scale. If you look at distance or time, and your goal is to minimize distance between two points in the same galaxy, you would want to maintain a Z-level consistent with or the s...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
In-universe: First, even though space is indeed 3D, most solar systems/galaxies are relatively flat. So, a ship enroute from, say, DS9 to Earth would approach the Sol system at a relatively low angle of incidence relative to the ecliptic plane of the galaxy (but possibly not to the ecliptic plane of the Sol system its...
Stellar navigation usually requires a fixed point of reference. When planes navigate the surface of the earth is that reference[![enter image description here](https://i.stack.imgur.com/d8eN2.jpg)](https://i.stack.imgur.com/d8eN2.jpg). In space one possible affixed point of reference is the galactic center and if you'r...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
In-universe: First, even though space is indeed 3D, most solar systems/galaxies are relatively flat. So, a ship enroute from, say, DS9 to Earth would approach the Sol system at a relatively low angle of incidence relative to the ecliptic plane of the galaxy (but possibly not to the ecliptic plane of the Sol system its...
There is one instance of the Enterprise D approaching from "underneath" in the episode [All Good Things...](http://en.memory-alpha.org/wiki/All_Good_Things..._%28episode%29). There is a [video](http://www.youtube.com/watch?v=P0R0mdEP5fc&feature=player_detailpage&t=137) of that on youtube. However since that sequence i...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
This is primarily attributable to Hollywood style. Even though it is realistic, Star Trek more often chooses what "looks right" instead. People are used to observing things in a 2D or gravity constrained 3D frame of reference, so when things are near each other, but in different planes of travel, it doesn't really look...
Because it looks good, and it's easier. A long time ago, I used to play the Traveller RPG (<https://en.wikipedia.org/wiki/Traveller_(role-playing_game)>). In the combat rules for ship to ship combat it actually said that since any three points depict a plane, then any combat involving 2 or 3 ships should just be handl...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
There was one episode in one of the Star Treks where the captain commented that the other ships were thinking in 2D, and he outwitted them by some 3D thinking. I think this is because we do not often think in 3D - we naturally tend to think in a 2D mode, and so when captains of ships meet others, they tend to align the...
Stellar navigation usually requires a fixed point of reference. When planes navigate the surface of the earth is that reference[![enter image description here](https://i.stack.imgur.com/d8eN2.jpg)](https://i.stack.imgur.com/d8eN2.jpg). In space one possible affixed point of reference is the galactic center and if you'r...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
In Enterprise, vessels often docked with one another (prior to frequent use of the transporters). In-universe, vessels orienting themselves on equal planes could just be a remnant of an earlier commonly-performed maneuver, sort of a standard operating procedure akin to hailing and the like.
I used to scoff at the idea that all battles must be upright and planar. I aplaud that Star Wars III broke from that model albeit at a local scale. If you look at distance or time, and your goal is to minimize distance between two points in the same galaxy, you would want to maintain a Z-level consistent with or the s...
6,394
Space is just open 3D space, right? In Star Trek, ships are always coming from somewhere else: different solar systems, galaxies, etc. However, when they meet, they always seem to be on parallel planes (facing each other). In some episodes I recall seeing ships that were adrift (and they appeared facing a different tr...
2011/10/23
[ "https://scifi.stackexchange.com/questions/6394", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/2463/" ]
This is primarily attributable to Hollywood style. Even though it is realistic, Star Trek more often chooses what "looks right" instead. People are used to observing things in a 2D or gravity constrained 3D frame of reference, so when things are near each other, but in different planes of travel, it doesn't really look...
There's no good in-universe explanation. The Enterprise always seems to be travelling from planet to planet in a 2D plane, which would be unrealistic due to the thickness of even our disc-like Milky Way galaxy. Bear in mind that the starships of Star Trek are inspired substantially by naval vessels. The organizational...
72,475,420
I'd like to prevent/skip some tests cases during runinng others in python. I couldn't achive to use @unittest.skip(reason) on my case. It always generates a Script Error in python unittest. My code; ``` import unittest @unittest.skip("something") def main(): try: something = [] for _ in range(4):...
2022/06/02
[ "https://Stackoverflow.com/questions/72475420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11260690/" ]
You need to use **npm install cors** var cors = require('cors') app.use(cors()) try this hope it will help to you
install the cors dependency and then use it is a middleware ``` app.use(cors()); ``` After this, if you make a request to your server, a new header will be returned as follows, ***`Access-Control-Allow-Origin: *`*** It determines which origins are allowed to access server resources over CORS. The \* wildcard allo...
23,378
[**Móvil**](http://dle.rae.es/?id=PxcFux4) es: > > 1. adj. Que puede moverse o se mueve por sí mismo. U. t. c. s. > > > [**portátil**](http://dle.rae.es/?id=Tl21X5Z) es: > > 1. adj. Movible y fácil de transportar. > > > y [**movible**](http://dle.rae.es/?id=PxNNmcd) es: > > 1. adj. Que por sí puede mo...
2017/11/27
[ "https://spanish.stackexchange.com/questions/23378", "https://spanish.stackexchange.com", "https://spanish.stackexchange.com/users/-1/" ]
El caso es que, durante sus primeros años de vida (años 70 y principios de los 80), ambos términos estuvieron por así decirlo "peleando", tal como puede verse en [estos resultados de Google Ngram](https://books.google.com/ngrams/graph?content=tel%C3%A9fono%20m%C3%B3vil%2Ctel%C3%A9fono%20port%C3%A1til&year_start=1970&ye...
Hubiera querido hacer un comentario más que una respuesta, pero no me alcanzaban los caracteres. Creo que la decisión de utilizar determinada terminología técnica tiene que ver con: * las características o especificaciones del dispositivo * cuestiones comerciales (o sea, qué suena mejor para el consumidor) Como pued...
682,387
If $U$ and $W$ are subspaces of $V$ whose dimension is $9$, and $\dim(U) = 3$, and $\dim(W) = 5$, what could be the possible values of $\dim(U \cap W)$? By thinking about it it seems the possible values are $0, 1, 2, 3$ because the intersection could not possible be more than the dimension of the smallest one, right? ...
2014/02/19
[ "https://math.stackexchange.com/questions/682387", "https://math.stackexchange.com", "https://math.stackexchange.com/users/129313/" ]
By dim(U \ W) I assume you mean $\dim(U \cap W)$, the dimension of the intersection? If that's the case then yes, you are correct, the possible dimensions are $0, 1, 2, 3$. To prove that you can't have a dimension larger than $3$ you do exactly as you have suggested, you observe that $U \cap V$ is a subspace of $U$ so...
We know that $U\cap W$ is a subspace of $U$, so has dimension at most $3$. Each of the dimensions between $0$ and $3$ occurs, however. Indeed, pick a basis $\{v\_1,\ldots,v\_9\}$ of $V$. Let $U=span\{v\_1,v\_2,v\_3\}$. To get $\dim(U\cap W)=j$, where $j\in\{0,1,2,3\}$, set $W:=span\{v\_{4-j},\ldots,v\_{9-j}\}$.
7,408
Say I'm building an order book and two bids come in at price $p$ and volumes $v\_1$ and $v\_2$. Which option is better * To store the order as $\{p, v\_1+v\_2\}$ or * To store the order as $\{p,v\_1\}$ and $\{p,v\_2\}$ and then manually aggregate orders when I need, say, a `bestBid` value Is there any analytical insi...
2013/03/01
[ "https://quant.stackexchange.com/questions/7408", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/1217/" ]
The "correct" way is the way best suited to your trading. Regardless as to your data structure of choice, you have to maintain a list of all orders active on your book. That's because subsequent messages reference Order ID and you have to look up the corresponding order to determine the price level being acted upon. G...
I have never implemented an order book, but I don't see immediate benefits from this aggregation. If you merge the volumes, then during the actual execution you'll have additionally to take into account that these orders came from different market participants. This seems to add additional complexity to your implementa...
7,408
Say I'm building an order book and two bids come in at price $p$ and volumes $v\_1$ and $v\_2$. Which option is better * To store the order as $\{p, v\_1+v\_2\}$ or * To store the order as $\{p,v\_1\}$ and $\{p,v\_2\}$ and then manually aggregate orders when I need, say, a `bestBid` value Is there any analytical insi...
2013/03/01
[ "https://quant.stackexchange.com/questions/7408", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/1217/" ]
[Louis's answer](https://quant.stackexchange.com/a/7414/35) hints at the problem. Most market-data feed formats only use the order's *reference ID* for cancel, replace, or execute; they do not list the symbol or side. So you'll need a way to look-up the particular order by ID alone just to make adjustments. You can agg...
I have never implemented an order book, but I don't see immediate benefits from this aggregation. If you merge the volumes, then during the actual execution you'll have additionally to take into account that these orders came from different market participants. This seems to add additional complexity to your implementa...
15,685,997
I have a script where I use PHP with Smarty. I only want to rescue a variable through a multiple checkbox with values with several options of selects. How do I do this? Below is the current structure, but it does not bring the values ​​of the selects when I click the checkbox of `name = "orcar"` ``` {foreach from=$pl...
2013/03/28
[ "https://Stackoverflow.com/questions/15685997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2199629/" ]
There is no need to add a default first option... Just use [`.prop()`](http://api.jquery.com/prop/#prop2) and change the `selectedIndex`: ``` $('#qwe').prop('selectedIndex', -1); ``` DEMO: <http://jsfiddle.net/dirtyd77/j76yH/2/> Let me know if you have any questions!
Select boxes must always have a value selected (by default the first option). If you want such a behavior, just add an empty option to the top of your list, with whatever value ( eg -1 ) you want.
15,685,997
I have a script where I use PHP with Smarty. I only want to rescue a variable through a multiple checkbox with values with several options of selects. How do I do this? Below is the current structure, but it does not bring the values ​​of the selects when I click the checkbox of `name = "orcar"` ``` {foreach from=$pl...
2013/03/28
[ "https://Stackoverflow.com/questions/15685997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2199629/" ]
There is no need to add a default first option... Just use [`.prop()`](http://api.jquery.com/prop/#prop2) and change the `selectedIndex`: ``` $('#qwe').prop('selectedIndex', -1); ``` DEMO: <http://jsfiddle.net/dirtyd77/j76yH/2/> Let me know if you have any questions!
How about this? ``` <select id="demo"> <option value="-1">---</option> <option value="1">1</option> <option value="2">1</option> </select> ``` As hexblot said, every selectbox has a selected value. Always.. ;)
15,685,997
I have a script where I use PHP with Smarty. I only want to rescue a variable through a multiple checkbox with values with several options of selects. How do I do this? Below is the current structure, but it does not bring the values ​​of the selects when I click the checkbox of `name = "orcar"` ``` {foreach from=$pl...
2013/03/28
[ "https://Stackoverflow.com/questions/15685997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2199629/" ]
There is no need to add a default first option... Just use [`.prop()`](http://api.jquery.com/prop/#prop2) and change the `selectedIndex`: ``` $('#qwe').prop('selectedIndex', -1); ``` DEMO: <http://jsfiddle.net/dirtyd77/j76yH/2/> Let me know if you have any questions!
Try with the following statement: ``` if ($('#qwe option[selected="selected"]').val() === undefined) return -1; ```
24,088,978
I'm using Visual Studio 2008 and seems that there is not CaretPosition function into richtextbox propreties. How can i get the entire rows at caret position? For example I've written this: ``` show databases; show tables;/* (the caret (|) is flashing just here so after pressing a button i w...
2014/06/06
[ "https://Stackoverflow.com/questions/24088978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3686730/" ]
If you are using **WPF**: ``` TextPointer caretPos = rtb.CaretPosition; TextPointer start=caretPos.GetLineStartPosition(0); TextPointer end = (caretPos.GetLineStartPosition(1) != null ? caretPos.GetLineStartPosition(1) : caretPos.DocumentEnd); TextRange tr = new TextRange(start, end); ...
There most certainly **is** a [RichTextBox.CaretPosition](http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox.caretposition%28v=vs.85%29.aspx) property available as of .NET Framework version 3.0.
153,920
Code I am trying to run: ``` $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); ``` The result: > > PHP Warning: odbc\_exec(): SQL error: [unixODBC][IBM][iSeries Access > ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid > tokens: INTO., SQL state 37000 in SQLExecDirect in .....
2008/09/30
[ "https://Stackoverflow.com/questions/153920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
The iSeries flavor of DB2 does not support the SQL DESCRIBE statement. Instead, you have to query the system table: ``` select * from qsys2.columns where table_schema = 'my_schema' and table_name = 'my_table' ```
To me it looks like you need to provide a way for the statement to return a value "Valid tokens: INTO" tells me that. I haven't used DESCRIBE before, but I would imagine that it returns something. Interactive SQL doesn't allow the command so I can't really help you much further than that. BTW, add the iSeries tag to ...
153,920
Code I am trying to run: ``` $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); ``` The result: > > PHP Warning: odbc\_exec(): SQL error: [unixODBC][IBM][iSeries Access > ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid > tokens: INTO., SQL state 37000 in SQLExecDirect in .....
2008/09/30
[ "https://Stackoverflow.com/questions/153920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
> > This statement can only be embedded in an application program. It is an executable statement that cannot be dynamically prepared. It must not be specified in Java. > > > From the iSeries DB2 SQL Reference.
To me it looks like you need to provide a way for the statement to return a value "Valid tokens: INTO" tells me that. I haven't used DESCRIBE before, but I would imagine that it returns something. Interactive SQL doesn't allow the command so I can't really help you much further than that. BTW, add the iSeries tag to ...
153,920
Code I am trying to run: ``` $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); ``` The result: > > PHP Warning: odbc\_exec(): SQL error: [unixODBC][IBM][iSeries Access > ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid > tokens: INTO., SQL state 37000 in SQLExecDirect in .....
2008/09/30
[ "https://Stackoverflow.com/questions/153920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
The iSeries flavor of DB2 does not support the SQL DESCRIBE statement. Instead, you have to query the system table: ``` select * from qsys2.columns where table_schema = 'my_schema' and table_name = 'my_table' ```
If you just need the column names try ``` select * from <TABLE> where 0 = 1 ``` I don't know how to get the column types, indexes, keys, &c
153,920
Code I am trying to run: ``` $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); ``` The result: > > PHP Warning: odbc\_exec(): SQL error: [unixODBC][IBM][iSeries Access > ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid > tokens: INTO., SQL state 37000 in SQLExecDirect in .....
2008/09/30
[ "https://Stackoverflow.com/questions/153920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
> > This statement can only be embedded in an application program. It is an executable statement that cannot be dynamically prepared. It must not be specified in Java. > > > From the iSeries DB2 SQL Reference.
If you just need the column names try ``` select * from <TABLE> where 0 = 1 ``` I don't know how to get the column types, indexes, keys, &c
153,920
Code I am trying to run: ``` $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); ``` The result: > > PHP Warning: odbc\_exec(): SQL error: [unixODBC][IBM][iSeries Access > ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid > tokens: INTO., SQL state 37000 in SQLExecDirect in .....
2008/09/30
[ "https://Stackoverflow.com/questions/153920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
The iSeries flavor of DB2 does not support the SQL DESCRIBE statement. Instead, you have to query the system table: ``` select * from qsys2.columns where table_schema = 'my_schema' and table_name = 'my_table' ```
> > This statement can only be embedded in an application program. It is an executable statement that cannot be dynamically prepared. It must not be specified in Java. > > > From the iSeries DB2 SQL Reference.
50,131,667
I worked with Support Vector Machine for classification with skicit-learn library several time previously. But I only interacted with data contain text and number in ".csv" format. Currently, I am wanting to use Support Vector Machine for image classification. Can you help me how to convert image to type like ".csv" fo...
2018/05/02
[ "https://Stackoverflow.com/questions/50131667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7500942/" ]
Use `String.replace()` with RegExp to reformat the string to the JSON format and parse it using `JSON.parse()`: ```js const str = '[{nodeName=PrinterName123456, serNo=Serial12345, ipAddress=192.168.1.134, macAddress=MA:CA:DD:RE:SS}]'; const json = str .replace(/([^\[\]{}=\s,]+)/g, '"$1"') .replace(/=/g, ':'); ...
You can replace * `{` with `{"` * `}` with `"}` * `,\s*` with `","` * `=` with `":"` In this order to create a valid JSON string and then parse. ```js var input = "[{nodeName=PrinterName123456, serNo=Serial12345, ipAddress=192.168.1.134, macAddress=MA:CA:DD:RE:SS}]"; var output = JSON.parse( input.replace(/{/g,...
50,131,667
I worked with Support Vector Machine for classification with skicit-learn library several time previously. But I only interacted with data contain text and number in ".csv" format. Currently, I am wanting to use Support Vector Machine for image classification. Can you help me how to convert image to type like ".csv" fo...
2018/05/02
[ "https://Stackoverflow.com/questions/50131667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7500942/" ]
Use `String.replace()` with RegExp to reformat the string to the JSON format and parse it using `JSON.parse()`: ```js const str = '[{nodeName=PrinterName123456, serNo=Serial12345, ipAddress=192.168.1.134, macAddress=MA:CA:DD:RE:SS}]'; const json = str .replace(/([^\[\]{}=\s,]+)/g, '"$1"') .replace(/=/g, ':'); ...
With javascript's `replace` function, you should be able to convert this to valid JSON. Try this: ``` var inputString = '[{nodeName=PrinterName123456, serNo=Serial12345, ipAddress=192.168.1.134, macAddress=MA:CA:DD:RE:SS}]'; var json = JSON.parse(inputString.replace(/([^={]*)=([^,}]*)(,\s?)?/g, '"$1": "$2"$3')); ```...
32,066,340
inputmask in combination with gwt in the following way: ``` public class JQueryMask { public native static void setMask(Element elem,String mask) /*-{ $wnd.jQuery(elem).find("input").inputmask(mask); $wnd.jQuery(elem).find("input").change(function(e) { }); }-*/; public nati...
2015/08/18
[ "https://Stackoverflow.com/questions/32066340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446552/" ]
GWTTestCases use their own HTML host page (because, well, technically, you may not even have one, or not a static one), so if you need jQuery for your tests, you have to load it from the tests themselves (e.g. using `ScriptInjector`, either from your test method or from `gwtSetUp()`)
Thanks to Thomas Broyer I have implemented the following code: ``` Callback c=new Callback() { ``` `@Override public void onSuccess(Void result) { ScriptInjector.fromUrl("urlTo/jquery.inputmask.js").setWindow(ScriptInjector.TOP_WINDOW).setCallback(new Callback<Void, Exception>() { @Override public void onSucc...
14,822,751
I know I can do the following: ``` EXEC Server_Name.DBName.sys.sp_executesql N'TRUNCATE TABLE dbo.table_name' ``` But what if I want to use a synonym for the table? I'm on SERVER1 and I want to truncate a table on SERVER2 using a synonym for the table name. Is this possible?
2013/02/11
[ "https://Stackoverflow.com/questions/14822751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1336632/" ]
My workaround was using the synonyms table to lookup underlying table name, then running a dynamic SQL statement. It is documented that synonyms cannot be used with TRUNCATE, but at least this is a decent workaround. ``` DECLARE @TableName VARCHAR(500) = (SELECT TOP 1 base_object_name FROM Server_Name.DBName.sys.s...
Create a Stored Procedure in Server2 Database for Truncate Tables then call the Stored Procedure from Server1. Like this: ``` EXEC [Server2].[DBName].[SchemaName].sp_TruncateTable; ```
395,314
I'm trying to write down a pretty complicated formula with LaTeX. This is [![enter image description here](https://i.stack.imgur.com/JfXVm.jpg)](https://i.stack.imgur.com/JfXVm.jpg) what I want to obtain, and this is [![enter image description here](https://i.stack.imgur.com/icGkh.jpg)](https://i.stack.imgur.com/ic...
2017/10/09
[ "https://tex.stackexchange.com/questions/395314", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/145267/" ]
``` \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left.\begin{aligned} \min/\max\ & f_{i}(x), & i & = 1,2,\dots,k; \\ s.t.\ & g_{j}(x)\geq0, & j & =1,2,\dots,J; \\ & h_{p}(x)=0, & p & =1,2,\dots,H; \\ & x_{...
Something like this? [![enter image description here](https://i.stack.imgur.com/Jdm9P.png)](https://i.stack.imgur.com/Jdm9P.png) ``` \documentclass{article} \usepackage{newtxtext,newtxmath} % Times Roman clone \begin{document} \[ \renewcommand\arraystretch{1.25} \left.\begin{array}{r@{\hspace{1.5mm}}l@{\quad}l@{}} \m...
395,314
I'm trying to write down a pretty complicated formula with LaTeX. This is [![enter image description here](https://i.stack.imgur.com/JfXVm.jpg)](https://i.stack.imgur.com/JfXVm.jpg) what I want to obtain, and this is [![enter image description here](https://i.stack.imgur.com/icGkh.jpg)](https://i.stack.imgur.com/ic...
2017/10/09
[ "https://tex.stackexchange.com/questions/395314", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/145267/" ]
``` \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left.\begin{aligned} \min/\max\ & f_{i}(x), & i & = 1,2,\dots,k; \\ s.t.\ & g_{j}(x)\geq0, & j & =1,2,\dots,J; \\ & h_{p}(x)=0, & p & =1,2,\dots,H; \\ & x_{...
You simply forgot that `3 columns requires`5&`: each column requires 1 ampersand for the alignment point and one to ‘enter’ the *new* column. Here are two simple ways to obtain what you want: in the place of the pair `\left. ... \right\}`, you can either use the `rcases` environment from `mathtools` (which loads `amsm...
395,314
I'm trying to write down a pretty complicated formula with LaTeX. This is [![enter image description here](https://i.stack.imgur.com/JfXVm.jpg)](https://i.stack.imgur.com/JfXVm.jpg) what I want to obtain, and this is [![enter image description here](https://i.stack.imgur.com/icGkh.jpg)](https://i.stack.imgur.com/ic...
2017/10/09
[ "https://tex.stackexchange.com/questions/395314", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/145267/" ]
Something like this? [![enter image description here](https://i.stack.imgur.com/Jdm9P.png)](https://i.stack.imgur.com/Jdm9P.png) ``` \documentclass{article} \usepackage{newtxtext,newtxmath} % Times Roman clone \begin{document} \[ \renewcommand\arraystretch{1.25} \left.\begin{array}{r@{\hspace{1.5mm}}l@{\quad}l@{}} \m...
You simply forgot that `3 columns requires`5&`: each column requires 1 ampersand for the alignment point and one to ‘enter’ the *new* column. Here are two simple ways to obtain what you want: in the place of the pair `\left. ... \right\}`, you can either use the `rcases` environment from `mathtools` (which loads `amsm...
26,641,307
My number is 495 plain and simple. I'm trying to format this number to have it display $4.95 what I've done is `number_format($number, 2, '.', '')` but that outputs `495.00` I know it can't be this difficult. Anyone familiar with `number_format`? I just need it to add a decimal two numbers from the right so the ce...
2014/10/29
[ "https://Stackoverflow.com/questions/26641307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2415481/" ]
If you're working with integers instead of floats, you'd first have to divide by 100. ``` $number = 495; echo number_format($number/100, 2, '.', '') ```
Assuming your numbers are all whole numbers you can do the following: ``` $mynum = 495; function formatMyNum($num) { return $num/100; } ```
26,641,307
My number is 495 plain and simple. I'm trying to format this number to have it display $4.95 what I've done is `number_format($number, 2, '.', '')` but that outputs `495.00` I know it can't be this difficult. Anyone familiar with `number_format`? I just need it to add a decimal two numbers from the right so the ce...
2014/10/29
[ "https://Stackoverflow.com/questions/26641307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2415481/" ]
If you're working with integers instead of floats, you'd first have to divide by 100. ``` $number = 495; echo number_format($number/100, 2, '.', '') ```
Number format just displays `floats` using N number of decimals and the decimal/thousand separator characters you choose. If you passed `4.95` to it, it would show fine so to do that just divide your `$number` by `100` before passing it to the function. ``` echo number_format($number/100, 2, '.', ''); ```
622,392
It's a very common scenario: some process wants to drop a file on a server every 30 minutes or so. Simple, right? Well, I can think of a bunch of ways this could go wrong. For instance, processing a file may take more or less than 30 minutes, so it's possible for a new file to arrive before I'm done with the previous ...
2009/03/07
[ "https://Stackoverflow.com/questions/622392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The key is to do the initial juggling at the *sending* end. All the sender needs to do is: 1. Store the file with a unique filename. 2. As soon as the file has been sent, move it to a subdirectory called e.g. `completed`. Assuming there is only a single receiver process, all the receiver needs to do is: 1. Periodica...
File transfers is one of the classics of system integration. I'd recommend you to get the [Enterprise Integration Patterns](http://www.eaipatterns.com/) book to build your own answer to these questions -- to some extent, the answer depends on the technologies and platforms you are using for endpoint implementation and ...
622,392
It's a very common scenario: some process wants to drop a file on a server every 30 minutes or so. Simple, right? Well, I can think of a bunch of ways this could go wrong. For instance, processing a file may take more or less than 30 minutes, so it's possible for a new file to arrive before I'm done with the previous ...
2009/03/07
[ "https://Stackoverflow.com/questions/622392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The key is to do the initial juggling at the *sending* end. All the sender needs to do is: 1. Store the file with a unique filename. 2. As soon as the file has been sent, move it to a subdirectory called e.g. `completed`. Assuming there is only a single receiver process, all the receiver needs to do is: 1. Periodica...
If the OS supports it, use file system hooks to intercept open and close file operations. Something like [Dazuko](http://dazuko.dnsalias.org/wiki/index.php/Main_Page). Other operating systems may let you know about file operations in anoter way, for example Novell Open Enterprise Server lets you define epochs, and [rea...
622,392
It's a very common scenario: some process wants to drop a file on a server every 30 minutes or so. Simple, right? Well, I can think of a bunch of ways this could go wrong. For instance, processing a file may take more or less than 30 minutes, so it's possible for a new file to arrive before I'm done with the previous ...
2009/03/07
[ "https://Stackoverflow.com/questions/622392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If the OS supports it, use file system hooks to intercept open and close file operations. Something like [Dazuko](http://dazuko.dnsalias.org/wiki/index.php/Main_Page). Other operating systems may let you know about file operations in anoter way, for example Novell Open Enterprise Server lets you define epochs, and [rea...
File transfers is one of the classics of system integration. I'd recommend you to get the [Enterprise Integration Patterns](http://www.eaipatterns.com/) book to build your own answer to these questions -- to some extent, the answer depends on the technologies and platforms you are using for endpoint implementation and ...
64,113,718
I want to enable searching in just one field "XYZ". I am using the follwing code but it's giving me error. Could you please help me with it? ``` { "dynamic": "false", "properties": { "ABC": { "type": "text", "index": false, "store": true }, "PQR": { "type": "text", "inde...
2020/09/29
[ "https://Stackoverflow.com/questions/64113718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14286580/" ]
You can use [enabled mapping parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/enabled.html#enabled) > > The enabled setting, which can be applied only to the top-level > mapping definition and to object fields, causes Elasticsearch to skip > parsing of the contents of the field entirely. The...
Looks like you are getting below exception: > > "reason": "failed to create query: Cannot search on field [PQR] since > it is not indexed.", > > > And its correct as in order to search it **needs to be indexed, which is controlled by index param which you have set as false**. Your current setup is correct and yo...
64,113,718
I want to enable searching in just one field "XYZ". I am using the follwing code but it's giving me error. Could you please help me with it? ``` { "dynamic": "false", "properties": { "ABC": { "type": "text", "index": false, "store": true }, "PQR": { "type": "text", "inde...
2020/09/29
[ "https://Stackoverflow.com/questions/64113718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14286580/" ]
You can use [enabled mapping parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/enabled.html#enabled) > > The enabled setting, which can be applied only to the top-level > mapping definition and to object fields, causes Elasticsearch to skip > parsing of the contents of the field entirely. The...
I believe you are not using the syntax correctly : ``` PUT indexName { "mappings": { // <=============== This is missing "dynamic": false, "properties": { "ABC": { "type": "text", //<============= If type is object, use 'enabled' instead of 'index' "index": false, "store": tru...
37,068,026
I need implement custom http source with cross origin: \*. How to do it? [Spring XD Doc](http://docs.spring.io/spring-xd/docs/current-SNAPSHOT/reference/html/#_introduction_16) Need examples
2016/05/06
[ "https://Stackoverflow.com/questions/37068026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2280027/" ]
Developing your custom source would require you to have basic knowledge on spring integration. Anyways here is an example: You would require to write 4 files: File 1: ------- crossoriginsource.xml ``` <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance...
Need implement MessageProducerSupport. With response headers: `response.setHeader("Access-Control-Allow-Origin", "*");` For example: fork spring-xd-http-extension. Look NettyHttpInboundChannelAdapter as example.
88,138
I'm worldbuilding an earth-like planet with no axial tilt, in order to maximize extreme climates (like deserts). However, there will still be pockets of fertile land, which will be populated by humans, with a technological level similar to that of the ancient civilizations of the fertile crescent, like the babylonians....
2017/08/06
[ "https://worldbuilding.stackexchange.com/questions/88138", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/20681/" ]
Many (if not all) plants in our Earth adapted to season cycle, it's not the other way around. This means that, unless you are thinking of "straightening" our world axis, somehow, the plants in that world would have adapted to the no-seasons situation. It is unclear (to me) what You exactly need: * If you need wheat a...
You could choose to have an elliptical orbit, and this would create a seasonal effect. It would however be pretty similar in result to having an Axial Tilt. I would look to produce a climatic variance through a different agency. There's a couple of methods I can think of 1. Multiple Moons, that have extremely slow orb...
88,138
I'm worldbuilding an earth-like planet with no axial tilt, in order to maximize extreme climates (like deserts). However, there will still be pockets of fertile land, which will be populated by humans, with a technological level similar to that of the ancient civilizations of the fertile crescent, like the babylonians....
2017/08/06
[ "https://worldbuilding.stackexchange.com/questions/88138", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/20681/" ]
### Grape*v*ines (Although grapewine as a riff on wine grapes is darn clever!) Ivy, grape, are (or can be) vines. (In the UK *vines* means *grapevines*, in the US *vines* often refer to other plant species) Our hearts are great examples of periodic biology. No seasons necessary. I suspect that plants evolving on a m...
You could choose to have an elliptical orbit, and this would create a seasonal effect. It would however be pretty similar in result to having an Axial Tilt. I would look to produce a climatic variance through a different agency. There's a couple of methods I can think of 1. Multiple Moons, that have extremely slow orb...
88,138
I'm worldbuilding an earth-like planet with no axial tilt, in order to maximize extreme climates (like deserts). However, there will still be pockets of fertile land, which will be populated by humans, with a technological level similar to that of the ancient civilizations of the fertile crescent, like the babylonians....
2017/08/06
[ "https://worldbuilding.stackexchange.com/questions/88138", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/20681/" ]
Many (if not all) plants in our Earth adapted to season cycle, it's not the other way around. This means that, unless you are thinking of "straightening" our world axis, somehow, the plants in that world would have adapted to the no-seasons situation. It is unclear (to me) what You exactly need: * If you need wheat a...
### Grape*v*ines (Although grapewine as a riff on wine grapes is darn clever!) Ivy, grape, are (or can be) vines. (In the UK *vines* means *grapevines*, in the US *vines* often refer to other plant species) Our hearts are great examples of periodic biology. No seasons necessary. I suspect that plants evolving on a m...
88,138
I'm worldbuilding an earth-like planet with no axial tilt, in order to maximize extreme climates (like deserts). However, there will still be pockets of fertile land, which will be populated by humans, with a technological level similar to that of the ancient civilizations of the fertile crescent, like the babylonians....
2017/08/06
[ "https://worldbuilding.stackexchange.com/questions/88138", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/20681/" ]
Many (if not all) plants in our Earth adapted to season cycle, it's not the other way around. This means that, unless you are thinking of "straightening" our world axis, somehow, the plants in that world would have adapted to the no-seasons situation. It is unclear (to me) what You exactly need: * If you need wheat a...
Yes you could have agriculture, but it would be limited to what grows in the tropics now. Most temperate plants have a dormancy period and a chilling requirement. This is true for both seeds and buds. E.g. most conifer seeds require 30-90 days stored moist at temperataures between 2 and 5 C. Peaches require somewhere...
88,138
I'm worldbuilding an earth-like planet with no axial tilt, in order to maximize extreme climates (like deserts). However, there will still be pockets of fertile land, which will be populated by humans, with a technological level similar to that of the ancient civilizations of the fertile crescent, like the babylonians....
2017/08/06
[ "https://worldbuilding.stackexchange.com/questions/88138", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/20681/" ]
### Grape*v*ines (Although grapewine as a riff on wine grapes is darn clever!) Ivy, grape, are (or can be) vines. (In the UK *vines* means *grapevines*, in the US *vines* often refer to other plant species) Our hearts are great examples of periodic biology. No seasons necessary. I suspect that plants evolving on a m...
Yes you could have agriculture, but it would be limited to what grows in the tropics now. Most temperate plants have a dormancy period and a chilling requirement. This is true for both seeds and buds. E.g. most conifer seeds require 30-90 days stored moist at temperataures between 2 and 5 C. Peaches require somewhere...
145,241
**Edit: I have solved this by myself. See [my answer below](https://stackoverflow.com/questions/145241/change-the-value-of-a-text-box-to-its-current-order-in-a-sortable-tab/145388#145388)** ----------------------------------------------------------------------------------------------------------------------------------...
2008/09/28
[ "https://Stackoverflow.com/questions/145241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2592/" ]
Hardnrg in #jquery ended up solving it for me. It involved adding an id="" to each input: ``` <form name="productform"> <table cellspacing="0" id="table-2" name="productform"> <thead> <tr><td>Product</td> <td>Order</td></tr> </thead> <tbody> <tr class="row1" i...
Hmmm.. I think you want to do something like this: ``` $("input:text", "#table-2").each( function(i){ this.value=i+1; }); ``` The $().each() function's info is here: <http://docs.jquery.com/Core/each>
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Using that many divs is a disease we call 'divitis'. It comes from the sickness that makes a developer forget he can frequently use elements such as ul, p, and so on as they are for positioning and styling without the need to wrap them in a div. Frequently, you can remove such extra div elements without harm other than...
While the site may have been designed by professionals, there are many techniques that age very badly. ``` <div align="center"> ``` As an example, the align attribute was deprecated from HTML 4.01 in preference of using CSS for style, not HTML attributes. Therefore, beware of examples such as this. Less mark-up is ...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
While the site may have been designed by professionals, there are many techniques that age very badly. ``` <div align="center"> ``` As an example, the align attribute was deprecated from HTML 4.01 in preference of using CSS for style, not HTML attributes. Therefore, beware of examples such as this. Less mark-up is ...
Sites with excessive markup in this way are often generated using frameworks such as Drupal or Joomla. It is common for sites to have several layers of elements because (1) the template will need elements that act as wrappers for sections of the page, but also the framework may generate a `<div>` for each section as w...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Using that many divs is a disease we call 'divitis'. It comes from the sickness that makes a developer forget he can frequently use elements such as ul, p, and so on as they are for positioning and styling without the need to wrap them in a div. Frequently, you can remove such extra div elements without harm other than...
Since CSS2 is pretty limited, we have to resort to using tricks and hacks to get certain.. pretty things to work, such as `border-radius`. This is probably the same case. Also, in many scenarios, wrapper divs are used to groups things together to make the code more readable. They could also be used in javascript manip...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Since CSS2 is pretty limited, we have to resort to using tricks and hacks to get certain.. pretty things to work, such as `border-radius`. This is probably the same case. Also, in many scenarios, wrapper divs are used to groups things together to make the code more readable. They could also be used in javascript manip...
Sites with excessive markup in this way are often generated using frameworks such as Drupal or Joomla. It is common for sites to have several layers of elements because (1) the template will need elements that act as wrappers for sections of the page, but also the framework may generate a `<div>` for each section as w...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Using that many divs is a disease we call 'divitis'. It comes from the sickness that makes a developer forget he can frequently use elements such as ul, p, and so on as they are for positioning and styling without the need to wrap them in a div. Frequently, you can remove such extra div elements without harm other than...
Sites with excessive markup in this way are often generated using frameworks such as Drupal or Joomla. It is common for sites to have several layers of elements because (1) the template will need elements that act as wrappers for sections of the page, but also the framework may generate a `<div>` for each section as w...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Using that many divs is a disease we call 'divitis'. It comes from the sickness that makes a developer forget he can frequently use elements such as ul, p, and so on as they are for positioning and styling without the need to wrap them in a div. Frequently, you can remove such extra div elements without harm other than...
Although that site is not a great example of current professional web development techniques, many `divs` `spans` and other semantic elements may be used and never styled. Many times, extra markup will be used for modularity. Many programmers know about design patterns such as the Singleton or Observer patterns. In HT...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Using that many divs is a disease we call 'divitis'. It comes from the sickness that makes a developer forget he can frequently use elements such as ul, p, and so on as they are for positioning and styling without the need to wrap them in a div. Frequently, you can remove such extra div elements without harm other than...
BEFORE READING THIS ANSWER: understand it is not my choice but that of the employers to use the methods explained below, I do not recommend the methods explained below nor do I like them but sometimes we do what we have to do :-( I would like to give you an example, I recently wrote a custom module on a custom applic...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
Although that site is not a great example of current professional web development techniques, many `divs` `spans` and other semantic elements may be used and never styled. Many times, extra markup will be used for modularity. Many programmers know about design patterns such as the Singleton or Observer patterns. In HT...
Sites with excessive markup in this way are often generated using frameworks such as Drupal or Joomla. It is common for sites to have several layers of elements because (1) the template will need elements that act as wrappers for sections of the page, but also the framework may generate a `<div>` for each section as w...
6,693,365
would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas? Follows the following code that adds and removes the drop and are now...
2011/07/14
[ "https://Stackoverflow.com/questions/6693365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757604/" ]
BEFORE READING THIS ANSWER: understand it is not my choice but that of the employers to use the methods explained below, I do not recommend the methods explained below nor do I like them but sometimes we do what we have to do :-( I would like to give you an example, I recently wrote a custom module on a custom applic...
Sites with excessive markup in this way are often generated using frameworks such as Drupal or Joomla. It is common for sites to have several layers of elements because (1) the template will need elements that act as wrappers for sections of the page, but also the framework may generate a `<div>` for each section as w...
69,619,187
There is a [blog post about Rust](https://lucumr.pocoo.org/2018/3/31/you-cant-rust-that/), where it is explained why Rust can't have self-referencing members. There is an example with a slice storing offset and length instead of the pointer. I want to apply this to an object, where different parts need references to o...
2021/10/18
[ "https://Stackoverflow.com/questions/69619187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1856854/" ]
You could just use [`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html): ```rust use std::rc::Rc; struct Part0 {} struct Part1 { at_0: Rc<Part0>, } struct Part2 { at_0: Rc<Part0>, at_1: Rc<Part1>, } struct Whole { at_0: Rc<Part0>, at_1: Rc<Part1>, at_2: Rc<Part2>, } fn main() { let ...
you can use some black magic of unsafe, and encapsulate the logic private to your struct promise SAFETY internally ``` #[derive(Debug)] struct Part0 { data: Vec<u8>, } struct Part1 { pdata0: NonNull<Part0> } struct Part2 { pdata0: NonNull<Part0>, pdata1: NonNull<Part1>, } struct Whole { p0: Part...
69,619,187
There is a [blog post about Rust](https://lucumr.pocoo.org/2018/3/31/you-cant-rust-that/), where it is explained why Rust can't have self-referencing members. There is an example with a slice storing offset and length instead of the pointer. I want to apply this to an object, where different parts need references to o...
2021/10/18
[ "https://Stackoverflow.com/questions/69619187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1856854/" ]
> > But in my scenario, Part1 and Part2 are always inside the Whole (and it is known at compile time). > > > In that case, there's no reason for `Part1` and `Part2` to be structs of their own: their fields could instead be defined directly on `Whole`. Defining them as structs of their own might have made sense if ...
you can use some black magic of unsafe, and encapsulate the logic private to your struct promise SAFETY internally ``` #[derive(Debug)] struct Part0 { data: Vec<u8>, } struct Part1 { pdata0: NonNull<Part0> } struct Part2 { pdata0: NonNull<Part0>, pdata1: NonNull<Part1>, } struct Whole { p0: Part...
103,936
Do you need the Improved Unarmed Strike feat to avoid provoking attacks of opportunities when using cestus, brass knuckles, spiked bauntlets, or any weapon that considers its actions as an unarmed strike attack?
2017/07/20
[ "https://rpg.stackexchange.com/questions/103936", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/8085/" ]
As a weapon, no. ================ Cestus, Brass knuckles, spiked gauntlets, and normal gauntlets are all their own light weapons. They are not Unarmed Strikes, which are a different pseudo-weapon. As such, using them as weapons works just like using a shortsword (except gauntlets have a perk in this regard, see below)...
According to the [Weapons](http://www.d20pfsrd.com/equipment/weapons/) tables, Both the unarmed strike and the gauntlet are in the "Unarmed attacks" table and even the gauntlet's description clearly mentions that attacking with the gauntlet is considered an unarmed attack that deals lethal damage by default, that by th...
12,734,021
I have a Custom Object in Salesforce that users routinely access and edit within the Salesforce online environment. Lets call them **RootObjects** to keep things simple. I am attempting to retrieve the "LastModifiedDate" the **RootObjects** using the Salesforce API. The goal is to determine when they were last edited ...
2012/10/04
[ "https://Stackoverflow.com/questions/12734021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/185749/" ]
As many who commented suspected, there was a Workflow in place that was modifying the objects. I am going with a "Save" Workflow that will update a custom date/time field. Thanks for all the suggestions!
Try to use ModifiedById field.
5,306
I've been reading about brain plasticity and how the brain can "rewire" itself. One of the things that is not clear to me - how neurons can establish new connections. **Does this rewiring mean that neurons can "disconnect" from other neurons to reuse existing dendrites**? Or do neurons grow new dendrites to make thes...
2012/11/22
[ "https://biology.stackexchange.com/questions/5306", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/577/" ]
I haven't read anything particularly about dendrites being reshaped, though I would expect them to be as flexible as other parts of the cells. The more commonly discussed topic (in my literary experience) is reshaping of the axon's branches before forming synaptic terminals. These branches are not fixed even in adults...
Under conditions where the sensory input to the cortex has been altered, large-scale changes in dendritic branching have been observed after enriched environment experience (e.g. Greenough and Volkmar, 1973) and sensory deprivation (e.g. Tailby et al. 2005). However there is a discrepancy between those *post-mortem* st...
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
I am also an American English speaker, and I hear the usage you're asking about occasionally. For whatever reason, it's usually with *might* rather than *would*; "might it be an idea to..." I hear its implications similarly to how Ed Guiness describes, where it is in fact asking about whether it's a *good* idea, but th...
*Would it be a good idea if...* is frequently used in English. Somehow, you have to specify that the idea you will outline is good. You can also split it in two sentences as in *I have an idea: why don't we do the following*. In that case, people are assuming you think it's a good idea.
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
*An idea*, used in phrases like *that's an idea*, means *worthy of consideration*. The sentence you wrote could be rewritten as > > Would moving the bike shed a bit to the left be worthy of consideration? > > > I would not use *an idea* to mean *a good idea*.
*Would it be a good idea if...* is frequently used in English. Somehow, you have to specify that the idea you will outline is good. You can also split it in two sentences as in *I have an idea: why don't we do the following*. In that case, people are assuming you think it's a good idea.
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
From my experience (American Eng.), *Would it be an idea...* is very uncommon, and while I might understand that you're looking for an opinion on its merits, if you asked something like > > Would it be an idea if I shot myself in the leg? > > > My initial (perhaps smart aleck) reaction would be more along the lin...
*Would it be a good idea if...* is frequently used in English. Somehow, you have to specify that the idea you will outline is good. You can also split it in two sentences as in *I have an idea: why don't we do the following*. In that case, people are assuming you think it's a good idea.
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
You don't hear "would it be an idea" often in English, if at all. Pretty much anything, any suggestion, would be *an idea* of some kind. Stating it this way might even invite a snarky response, such as: "Yes, that's *an idea*. So is jumping in the lake." What you might say, however, if you weren't sure your idea had m...
I would neither use "idea" or "good idea", as both sound very German to me (although I'm also a German native speaker). There are several other options in English conveying the same notion. e.g.: > > Do you think it's sensible to ... > > > Does it make sense to ... > > > Does it work ... > > >
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
As a native English (NZ/Aust/British) speaker, when I hear this phrase I do immediately assume the person suggesting the idea thinks it has some merit. Why else would they have suggested it? With regard to the absence of positive adjectives such as "...a *good* idea..." I believe this is somewhat dependent on a cultu...
I am also an American English speaker, and I hear the usage you're asking about occasionally. For whatever reason, it's usually with *might* rather than *would*; "might it be an idea to..." I hear its implications similarly to how Ed Guiness describes, where it is in fact asking about whether it's a *good* idea, but th...
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
As a native English (NZ/Aust/British) speaker, when I hear this phrase I do immediately assume the person suggesting the idea thinks it has some merit. Why else would they have suggested it? With regard to the absence of positive adjectives such as "...a *good* idea..." I believe this is somewhat dependent on a cultu...
I would neither use "idea" or "good idea", as both sound very German to me (although I'm also a German native speaker). There are several other options in English conveying the same notion. e.g.: > > Do you think it's sensible to ... > > > Does it make sense to ... > > > Does it work ... > > >
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
From my experience (American Eng.), *Would it be an idea...* is very uncommon, and while I might understand that you're looking for an opinion on its merits, if you asked something like > > Would it be an idea if I shot myself in the leg? > > > My initial (perhaps smart aleck) reaction would be more along the lin...
As a native English (NZ/Aust/British) speaker, when I hear this phrase I do immediately assume the person suggesting the idea thinks it has some merit. Why else would they have suggested it? With regard to the absence of positive adjectives such as "...a *good* idea..." I believe this is somewhat dependent on a cultu...
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
As a native English (NZ/Aust/British) speaker, when I hear this phrase I do immediately assume the person suggesting the idea thinks it has some merit. Why else would they have suggested it? With regard to the absence of positive adjectives such as "...a *good* idea..." I believe this is somewhat dependent on a cultu...
*An idea*, used in phrases like *that's an idea*, means *worthy of consideration*. The sentence you wrote could be rewritten as > > Would moving the bike shed a bit to the left be worthy of consideration? > > > I would not use *an idea* to mean *a good idea*.
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
From my experience (American Eng.), *Would it be an idea...* is very uncommon, and while I might understand that you're looking for an opinion on its merits, if you asked something like > > Would it be an idea if I shot myself in the leg? > > > My initial (perhaps smart aleck) reaction would be more along the lin...
I am also an American English speaker, and I hear the usage you're asking about occasionally. For whatever reason, it's usually with *might* rather than *would*; "might it be an idea to..." I hear its implications similarly to how Ed Guiness describes, where it is in fact asking about whether it's a *good* idea, but th...
11,177
In colloquial German, you can say something to the effect of > > Would it be an idea to move the bike shed a bit to the left? > > > and it is immediately understood that "an idea" is supposed to mean "a good idea". I tend to use this "an idea" in my English conversations as well, but I am unsure about its valid...
2011/02/03
[ "https://english.stackexchange.com/questions/11177", "https://english.stackexchange.com", "https://english.stackexchange.com/users/239/" ]
From my experience (American Eng.), *Would it be an idea...* is very uncommon, and while I might understand that you're looking for an opinion on its merits, if you asked something like > > Would it be an idea if I shot myself in the leg? > > > My initial (perhaps smart aleck) reaction would be more along the lin...
I would neither use "idea" or "good idea", as both sound very German to me (although I'm also a German native speaker). There are several other options in English conveying the same notion. e.g.: > > Do you think it's sensible to ... > > > Does it make sense to ... > > > Does it work ... > > >
329,759
I have a Windows 2008 R2 server that is a Hyper-V host (Dell PowerEdge T300). Today for the first time I encountered an odd situation; i lost connection with one of the guest machines but logging on physically it seems the guest OS is still running but no longer contactable via the network. I tried to shut down the gu...
2011/11/10
[ "https://serverfault.com/questions/329759", "https://serverfault.com", "https://serverfault.com/users/1352/" ]
The hotfix in [Microsoft KB2263829](http://support.microsoft.com/kb/2263829) might solve this problem.
It sounds like some kind of serious glitch occured. At this point, a hard reboot is probably your only option. As a side note, make sure you upgrade your BIOS to the latest revision (for microcode updates), and make sure the needed virtualization exetnsions are turned on. Same goes for drivers, particularly the driver...
329,759
I have a Windows 2008 R2 server that is a Hyper-V host (Dell PowerEdge T300). Today for the first time I encountered an odd situation; i lost connection with one of the guest machines but logging on physically it seems the guest OS is still running but no longer contactable via the network. I tried to shut down the gu...
2011/11/10
[ "https://serverfault.com/questions/329759", "https://serverfault.com", "https://serverfault.com/users/1352/" ]
It sounds like some kind of serious glitch occured. At this point, a hard reboot is probably your only option. As a side note, make sure you upgrade your BIOS to the latest revision (for microcode updates), and make sure the needed virtualization exetnsions are turned on. Same goes for drivers, particularly the driver...
I had the same, the host server took about 20 - 30 minutes to shut down. This was because the hyper-v machines were running and the host needed to stop or pauze these first (and that was what took so long in my case).
329,759
I have a Windows 2008 R2 server that is a Hyper-V host (Dell PowerEdge T300). Today for the first time I encountered an odd situation; i lost connection with one of the guest machines but logging on physically it seems the guest OS is still running but no longer contactable via the network. I tried to shut down the gu...
2011/11/10
[ "https://serverfault.com/questions/329759", "https://serverfault.com", "https://serverfault.com/users/1352/" ]
The hotfix in [Microsoft KB2263829](http://support.microsoft.com/kb/2263829) might solve this problem.
Are you running any other applications on the hyper-v host? I've seen this type of issue when there has been AV running on the host.
329,759
I have a Windows 2008 R2 server that is a Hyper-V host (Dell PowerEdge T300). Today for the first time I encountered an odd situation; i lost connection with one of the guest machines but logging on physically it seems the guest OS is still running but no longer contactable via the network. I tried to shut down the gu...
2011/11/10
[ "https://serverfault.com/questions/329759", "https://serverfault.com", "https://serverfault.com/users/1352/" ]
Are you running any other applications on the hyper-v host? I've seen this type of issue when there has been AV running on the host.
I had the same, the host server took about 20 - 30 minutes to shut down. This was because the hyper-v machines were running and the host needed to stop or pauze these first (and that was what took so long in my case).
329,759
I have a Windows 2008 R2 server that is a Hyper-V host (Dell PowerEdge T300). Today for the first time I encountered an odd situation; i lost connection with one of the guest machines but logging on physically it seems the guest OS is still running but no longer contactable via the network. I tried to shut down the gu...
2011/11/10
[ "https://serverfault.com/questions/329759", "https://serverfault.com", "https://serverfault.com/users/1352/" ]
The hotfix in [Microsoft KB2263829](http://support.microsoft.com/kb/2263829) might solve this problem.
I had the same, the host server took about 20 - 30 minutes to shut down. This was because the hyper-v machines were running and the host needed to stop or pauze these first (and that was what took so long in my case).
30,376,692
I have a MultiMap suppose Company which has String as a Key and another MultiMap suppose Employee as a Value. Employee Multimap has String as a key and another multimap as a value. My question is how do I retrieve and iterate multimap stored inside multimap? I am using Apache common MultiMap. Example: compMap has 2 co...
2015/05/21
[ "https://Stackoverflow.com/questions/30376692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3495155/" ]
Converting my comment into answer :) Hi, You can try this code snippet ``` <%= UnicodeLanguageUtil.get(pageContext, "please-choose-file-type") %> ``` HTH
The solution is : ``` alert('<%= UnicodeLanguageUtil.get(pageContext, "please-choose-file-type"") %>'); ```
28,757,881
How to find the original report of a linked report in SSRS. Could anyone let me know how to find the main report of a linked report in the report manager.
2015/02/27
[ "https://Stackoverflow.com/questions/28757881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3519008/" ]
To find the original report open Report Manager (YourReportingServer/Reports/Pages/Folder.aspx) in your browser and select **'Manage'** in the option menu of report. ![enter image description here](https://i.stack.imgur.com/wcLRp.png) There in properties you can see **'Link to'** field that's the main report and you ...
You can also query in TSQL the list of linked reports. ``` SELECT [Original_Report] = [prt].[Path] , [Linked_Report] = [rpt].[Path] FROM [ReportServer].[dbo].[Catalog](NOLOCK) AS [rpt] LEFT JOIN [ReportServer].[dbo].[Catalog](NOLOCK) AS [prt] ON [prt].[ItemID] = [rpt].[LinkSourceID] WHERE 1 = 1 ...
36,339,756
I have a form with two subforms (3 tables, total). Tables: PI (patient information) Referrals Reports The form displays PI at the top and then Referrals and Reports as subforms (see screenshot below) [![enter image description here](https://i.stack.imgur.com/Kr1m1.jpg)](https://i.stack.imgur.com/Kr1m1.jpg) I...
2016/03/31
[ "https://Stackoverflow.com/questions/36339756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4576335/" ]
Please see [this page](http://access.mvps.org/access/forms/frm0031.htm) on how to refer to controls and properties on sub and parent forms. As for the button for applying the filter, this should be a Toggle Button, clicked for applying the filter, or up, for removing it. In your case, add to the Referrals sub Form a T...
SubForm controls on PI Form have LinkChildFields property and LinkMasterFields property. **Edit:** You can have Reports form as a subform in Referrals sub form. Iv'e done it a few times, it runs nicely. It just may limit you a-bit in form design. [MSDN Article on SubForm.LinkChildFields Property](https://msdn.microso...
20,469,007
So I've been trying my hand at game of life and I noticed that the cells only stay confined within the grid that I've created. I want to try and make it continuous so if a cell reaches one side it will continue from the other side. Similar to the game pac-man when you leave from the left to come back into the game from...
2013/12/09
[ "https://Stackoverflow.com/questions/20469007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3082486/" ]
Start considering a one dimension array, of size ARRAY\_SIZE. What do you want that array to return when you ask for a cell of a negative index ? What about a for an index >= ARRAY\_SIZE ? What operators does that make you think of (hint : <= 0, % ARRAY\_SIZE, ...) This will lead you to a more generic solution that d...
It looks like you are taking a summation over nearest neighbours, so all you need to do to make it wrap around is to extend the summation to include the cells on the other side if `(i,j)` is an edge cell. You could do this fairly easily by adding else statements to the central `if` to check for the cases where `l` or ...
20,469,007
So I've been trying my hand at game of life and I noticed that the cells only stay confined within the grid that I've created. I want to try and make it continuous so if a cell reaches one side it will continue from the other side. Similar to the game pac-man when you leave from the left to come back into the game from...
2013/12/09
[ "https://Stackoverflow.com/questions/20469007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3082486/" ]
Assuming a grid size of `0` to `n-1` for `x` and `0` to `m-1` for `y` (where `n` is the size of the `x` dimension and `m` is the size of the `y` dimension, what you want to do is check if the coordinates are in-range, and move accordingly. So (pseudocode): ``` // normal move calculation code here if (x < 0) { x =...
It looks like you are taking a summation over nearest neighbours, so all you need to do to make it wrap around is to extend the summation to include the cells on the other side if `(i,j)` is an edge cell. You could do this fairly easily by adding else statements to the central `if` to check for the cases where `l` or ...
11,382,217
I am looking for ways to split a string into an array, sort of `str_split()`, where the chunks are all of different sizes. I could do that by looping through the string with a bunch of `substr()`, but that looks neither elegant nor efficient. Is there a function that accept a string and an array, like (`1, 18, 32, 41...
2012/07/08
[ "https://Stackoverflow.com/questions/11382217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320581/" ]
There is nothing in PHP that will do that for you (it's a bit specific). So as radashk just siad, you just have to write a function ``` function getParts($string, $positions){ $parts = array(); foreach ($positions as $position){ $parts[] = substr($string, 0, $position); $string = substr($strin...
A slightly more flexible variant, useful to parse ASCII tables with fixed-length records: ``` function ParseIrregularString ($string, $lengths) { $parts = array(); foreach ($lengths as $StringKey => $position) { $parts[$StringKey] = substr($string, 0, $position); $string = substr($string, $position);...
11,382,217
I am looking for ways to split a string into an array, sort of `str_split()`, where the chunks are all of different sizes. I could do that by looping through the string with a bunch of `substr()`, but that looks neither elegant nor efficient. Is there a function that accept a string and an array, like (`1, 18, 32, 41...
2012/07/08
[ "https://Stackoverflow.com/questions/11382217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320581/" ]
There is nothing in PHP that will do that for you (it's a bit specific). So as radashk just siad, you just have to write a function ``` function getParts($string, $positions){ $parts = array(); foreach ($positions as $position){ $parts[] = substr($string, 0, $position); $string = substr($strin...
Just for future references the regular expressions method @jay suggested goes like this: ``` $regex="/(.{1})(.{18})(.{32})(.{41})(.{108})(.{125})(.{137})(.{152})(.{161})/"; preg_match($regex,$myfixedlengthstring,$arr); ``` where **$myfixedlengthstring** is the target string and **$arr** gives you the result
11,382,217
I am looking for ways to split a string into an array, sort of `str_split()`, where the chunks are all of different sizes. I could do that by looping through the string with a bunch of `substr()`, but that looks neither elegant nor efficient. Is there a function that accept a string and an array, like (`1, 18, 32, 41...
2012/07/08
[ "https://Stackoverflow.com/questions/11382217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320581/" ]
There is nothing in PHP that will do that for you (it's a bit specific). So as radashk just siad, you just have to write a function ``` function getParts($string, $positions){ $parts = array(); foreach ($positions as $position){ $parts[] = substr($string, 0, $position); $string = substr($strin...
I would use [unpack](http://php.net/unpack)(): ``` $str = "?ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890...."; $array = unpack("a1first/a26second/a10third/a*rest",$str); print_r($array); ``` This returns: ``` Array ( [first] => ? [second] => ABCDEFGHIJKLMNOPQRSTUVWXYZ [third] => 1234567890 [rest] => .... ) ...
11,382,217
I am looking for ways to split a string into an array, sort of `str_split()`, where the chunks are all of different sizes. I could do that by looping through the string with a bunch of `substr()`, but that looks neither elegant nor efficient. Is there a function that accept a string and an array, like (`1, 18, 32, 41...
2012/07/08
[ "https://Stackoverflow.com/questions/11382217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320581/" ]
Just for future references the regular expressions method @jay suggested goes like this: ``` $regex="/(.{1})(.{18})(.{32})(.{41})(.{108})(.{125})(.{137})(.{152})(.{161})/"; preg_match($regex,$myfixedlengthstring,$arr); ``` where **$myfixedlengthstring** is the target string and **$arr** gives you the result
A slightly more flexible variant, useful to parse ASCII tables with fixed-length records: ``` function ParseIrregularString ($string, $lengths) { $parts = array(); foreach ($lengths as $StringKey => $position) { $parts[$StringKey] = substr($string, 0, $position); $string = substr($string, $position);...
11,382,217
I am looking for ways to split a string into an array, sort of `str_split()`, where the chunks are all of different sizes. I could do that by looping through the string with a bunch of `substr()`, but that looks neither elegant nor efficient. Is there a function that accept a string and an array, like (`1, 18, 32, 41...
2012/07/08
[ "https://Stackoverflow.com/questions/11382217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320581/" ]
I would use [unpack](http://php.net/unpack)(): ``` $str = "?ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890...."; $array = unpack("a1first/a26second/a10third/a*rest",$str); print_r($array); ``` This returns: ``` Array ( [first] => ? [second] => ABCDEFGHIJKLMNOPQRSTUVWXYZ [third] => 1234567890 [rest] => .... ) ...
A slightly more flexible variant, useful to parse ASCII tables with fixed-length records: ``` function ParseIrregularString ($string, $lengths) { $parts = array(); foreach ($lengths as $StringKey => $position) { $parts[$StringKey] = substr($string, 0, $position); $string = substr($string, $position);...
39,411,162
I have two json: I want to create json with those two array; ``` var __columns = ["Field1", "Field2", "Field3", "Field4"]; var __rows = ["valueField1_1", "valueField2_1", "valueField3_1", "valueField4_1", "valueField1_2", "valueField2_2", "valueField3_2", "valueField4_2", "valueField1_3", "valueField2_3", "valueFiel...
2016/09/09
[ "https://Stackoverflow.com/questions/39411162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6813318/" ]
ES6 solution using **[`Array.from`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from)** and **[`Array#reduce`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)** methods. ```js var __columns = ["Field1", "Field2", "Field3", "Field4"]; ...
One way to achieve this is using loops ```js var __columns = ["Field1", "Field2", "Field3", "Field4"]; var __rows = ["valueField1_1", "valueField2_1", "valueField3_1", "valueField4_1", "valueField1_2", "valueField2_2", "valueField3_2", "valueField4_2", "valueField1_3", "valueField2_3", "valueField3_3", "valueField4_3...
39,411,162
I have two json: I want to create json with those two array; ``` var __columns = ["Field1", "Field2", "Field3", "Field4"]; var __rows = ["valueField1_1", "valueField2_1", "valueField3_1", "valueField4_1", "valueField1_2", "valueField2_2", "valueField3_2", "valueField4_2", "valueField1_3", "valueField2_3", "valueFiel...
2016/09/09
[ "https://Stackoverflow.com/questions/39411162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6813318/" ]
``` function convertToJsonArr(__columns, __rows){ var obj = {}; var arr = []; var len = __columns.length; var count = 0; $.each(__rows , function(key, value){ if(count >= len){ count = 0; arr.push(obj); obj = {}; } obj[__columns[count++]] = value; }) arr.push(obj); return arr; } ``` you can...
One way to achieve this is using loops ```js var __columns = ["Field1", "Field2", "Field3", "Field4"]; var __rows = ["valueField1_1", "valueField2_1", "valueField3_1", "valueField4_1", "valueField1_2", "valueField2_2", "valueField3_2", "valueField4_2", "valueField1_3", "valueField2_3", "valueField3_3", "valueField4_3...
324,202
When I run `sudo apt-get upgrade`, the dpkg error appears and interupts the process. Error details: ``` Setting up python-minimal (2.7.3-0ubuntu7.1) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr...
2013/07/25
[ "https://askubuntu.com/questions/324202", "https://askubuntu.com", "https://askubuntu.com/users/141418/" ]
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does. So, try this and see if it helps you out: ``` sudo apt-get install --reinstall python2.7-minimal sudo apt-get upgrade ``` If even that does't work, perhaps your $PYTHONPATH is messed up somehow. ``` nan...
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7. There are three files of concern in /usr/bin: ``` python (symlink) python2.7 python3 (symlink) ``` If you do `ls -l /usr/bin | grep python` you will see what each symlink po...
324,202
When I run `sudo apt-get upgrade`, the dpkg error appears and interupts the process. Error details: ``` Setting up python-minimal (2.7.3-0ubuntu7.1) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr...
2013/07/25
[ "https://askubuntu.com/questions/324202", "https://askubuntu.com", "https://askubuntu.com/users/141418/" ]
Follow the solution by Soroosh. [Broken python (2.7) after manually building and installing python 2.6](https://askubuntu.com/questions/270011/broken-python-2-7-after-manually-building-and-installing-python-2-6/560317#560317) Enter `sudo -i` for root access. Paste the command and wait about 20 minutes. Runs perfectly...
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7. There are three files of concern in /usr/bin: ``` python (symlink) python2.7 python3 (symlink) ``` If you do `ls -l /usr/bin | grep python` you will see what each symlink po...
324,202
When I run `sudo apt-get upgrade`, the dpkg error appears and interupts the process. Error details: ``` Setting up python-minimal (2.7.3-0ubuntu7.1) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr...
2013/07/25
[ "https://askubuntu.com/questions/324202", "https://askubuntu.com", "https://askubuntu.com/users/141418/" ]
Try this ``` sudo apt purge libpython* ``` I removed python2.7 and 3.7, then deleted related files from the system. After that I found I can't reinstall python2.7 Tried many methods still not working, including : > > remove soft links > > > del virtual env dirs > > > autoremove > > > > ``` > sudo dpkg --pur...
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7. There are three files of concern in /usr/bin: ``` python (symlink) python2.7 python3 (symlink) ``` If you do `ls -l /usr/bin | grep python` you will see what each symlink po...
324,202
When I run `sudo apt-get upgrade`, the dpkg error appears and interupts the process. Error details: ``` Setting up python-minimal (2.7.3-0ubuntu7.1) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr...
2013/07/25
[ "https://askubuntu.com/questions/324202", "https://askubuntu.com", "https://askubuntu.com/users/141418/" ]
Follow the solution by Soroosh. [Broken python (2.7) after manually building and installing python 2.6](https://askubuntu.com/questions/270011/broken-python-2-7-after-manually-building-and-installing-python-2-6/560317#560317) Enter `sudo -i` for root access. Paste the command and wait about 20 minutes. Runs perfectly...
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does. So, try this and see if it helps you out: ``` sudo apt-get install --reinstall python2.7-minimal sudo apt-get upgrade ``` If even that does't work, perhaps your $PYTHONPATH is messed up somehow. ``` nan...
324,202
When I run `sudo apt-get upgrade`, the dpkg error appears and interupts the process. Error details: ``` Setting up python-minimal (2.7.3-0ubuntu7.1) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr...
2013/07/25
[ "https://askubuntu.com/questions/324202", "https://askubuntu.com", "https://askubuntu.com/users/141418/" ]
Follow the solution by Soroosh. [Broken python (2.7) after manually building and installing python 2.6](https://askubuntu.com/questions/270011/broken-python-2-7-after-manually-building-and-installing-python-2-6/560317#560317) Enter `sudo -i` for root access. Paste the command and wait about 20 minutes. Runs perfectly...
Try this ``` sudo apt purge libpython* ``` I removed python2.7 and 3.7, then deleted related files from the system. After that I found I can't reinstall python2.7 Tried many methods still not working, including : > > remove soft links > > > del virtual env dirs > > > autoremove > > > > ``` > sudo dpkg --pur...
18,832,952
I have this cpp file: ```cpp //pkgnative_tries__native_NativeSystem.cpp #include <pkgnative_tries__native_NativeSystem.h> #include<iostream> using namespace std; extern "C" JNIEXPORT void JNICALL Java_pkgnative_tries__1native_NativeSystem_println (JNIEnv *env, jobject obj, jstring javaString) { //Get the native...
2013/09/16
[ "https://Stackoverflow.com/questions/18832952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759845/" ]
C++ does mangle the names of functions in the DLLs, if you are on windows you can use dumpbin to see what the function name looks like in dll.
In your case the line "native\_files/pkgnative\_tries\_\_native\_NativeSystem.dll" is seems messy, please check it. I have resolved the same type of issue by adding ``` System.loadLibrary("your library name"); ``` To each method where they are needed and please also verify that the path of **library** is correct. ...
34,899,129
I have now run out of ideas and Google is not helping either. I believe the issue is rather simple to solve, but currently I am not seeing why it happens. Everything works fine on my testing environment with dev mode. But doesn't work on production where the dev mode is off and proxy files need to be generated manual...
2016/01/20
[ "https://Stackoverflow.com/questions/34899129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585305/" ]
Use margin-bottom style inside h2 ``` margin-bottom:-10px; ``` To decrease space we should use values in negative.
I faced the same issue. Setting Line height on the p and all heading tag works for me. ``` h1,h2,h3,h4,h5,h6,p{ margin: 0; // if there is margin padding:0; // if there is padding line-height: 0px !important; // you should set line height according to your requirement. } ``` This will affect all children's ...
34,899,129
I have now run out of ideas and Google is not helping either. I believe the issue is rather simple to solve, but currently I am not seeing why it happens. Everything works fine on my testing environment with dev mode. But doesn't work on production where the dev mode is off and proxy files need to be generated manual...
2016/01/20
[ "https://Stackoverflow.com/questions/34899129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585305/" ]
You have to remove the margin from both h2 and p. ``` h2{ margin-bottom: 0; } p{ margin-top: 0; } ``` [here](https://jsfiddle.net/539qdkrg/) is a jsfiddle to see the results
Use the [Adjacent sibling combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinator) ``` h2 + p { margin-top: 0; } ``` Which makes paragraphs that immediately follow an H2 headline have a top margin of 0. You may also have to alter the bottom margin of the headline.
34,899,129
I have now run out of ideas and Google is not helping either. I believe the issue is rather simple to solve, but currently I am not seeing why it happens. Everything works fine on my testing environment with dev mode. But doesn't work on production where the dev mode is off and proxy files need to be generated manual...
2016/01/20
[ "https://Stackoverflow.com/questions/34899129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585305/" ]
Add this style below your html, i thing it can be usefull ``` <style> h2, p { margin: 0; } </style> ```
I faced the same issue. Setting Line height on the p and all heading tag works for me. ``` h1,h2,h3,h4,h5,h6,p{ margin: 0; // if there is margin padding:0; // if there is padding line-height: 0px !important; // you should set line height according to your requirement. } ``` This will affect all children's ...
34,899,129
I have now run out of ideas and Google is not helping either. I believe the issue is rather simple to solve, but currently I am not seeing why it happens. Everything works fine on my testing environment with dev mode. But doesn't work on production where the dev mode is off and proxy files need to be generated manual...
2016/01/20
[ "https://Stackoverflow.com/questions/34899129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585305/" ]
Simple use following css will remove default all padding and margin. Because here h2 use default spacing. ``` *{ margin:0; padding:0; } ``` Previous result: ```html <td style="width:427px;"> <h2 style="color:#156CA4">Quotation</h2> <p style="color:#00A651">abc Technologies Pvt Ltd</p> </td> ``` New wor...
Use the [Adjacent sibling combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinator) ``` h2 + p { margin-top: 0; } ``` Which makes paragraphs that immediately follow an H2 headline have a top margin of 0. You may also have to alter the bottom margin of the headline.
34,899,129
I have now run out of ideas and Google is not helping either. I believe the issue is rather simple to solve, but currently I am not seeing why it happens. Everything works fine on my testing environment with dev mode. But doesn't work on production where the dev mode is off and proxy files need to be generated manual...
2016/01/20
[ "https://Stackoverflow.com/questions/34899129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585305/" ]
Try adjusting the line height property using CSS. I would recommend giving it an id though if you only want it to affect this p tag in particular ``` p { line-height: 0px; } ``` There is also the possibility of negative margins (which isn't considered best practice, but will work in your case): ``` p { marg...
Add this style below your html, i thing it can be usefull ``` <style> h2, p { margin: 0; } </style> ```