qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
17,015
I have moved into a house with a nice Wolf-range griddle, and I would like to know what the primary advantages of the griddle are over a cast-iron skillet, including, is there anything I can do with a griddle that can not be done with a skillet? I have found that the primary downside to using the griddle is the time i...
2011/08/21
[ "https://cooking.stackexchange.com/questions/17015", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3418/" ]
Surface area is the biggest difference. You can do a much larger job on a griddle than in a skillet. Even 2 or 3 jobs at time, and when you are done there is just the griddle to clean and not several items. You will also want to pick up a '[bacon press](http://rads.stackoverflow.com/amzn/click/B00004UE7B)' to minimiz...
I'm going to just use to frying pans ('skillets'). The lack of sides allows stuff to fall off too easily - I fried chopped onions today - and there's no carrying handle - so you can't move the griddle to plate up. The other downer - my griddle's cast iron and it's just cracked while heating it !
17,015
I have moved into a house with a nice Wolf-range griddle, and I would like to know what the primary advantages of the griddle are over a cast-iron skillet, including, is there anything I can do with a griddle that can not be done with a skillet? I have found that the primary downside to using the griddle is the time i...
2011/08/21
[ "https://cooking.stackexchange.com/questions/17015", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3418/" ]
Yes, you don't have the edge of a pan in the way when going to flip things, but it also means that you don't have a mass of metal there to add as a heat sink, which can help dramatically when pre-heating your pans, as they'll be evenly heated across their bottom more quickly (at least, compared to something of the same...
I'm going to just use to frying pans ('skillets'). The lack of sides allows stuff to fall off too easily - I fried chopped onions today - and there's no carrying handle - so you can't move the griddle to plate up. The other downer - my griddle's cast iron and it's just cracked while heating it !
11,368,204
I followed a tutorial/instructions online to make a sidebar fixed position by making the sidebars position "fixed" and it worked fine. Now I realize that since my page has a min-width attribute, when the user scrolls sideways the content that doesn't move moves into the sidebar. So basically, I'm looking for a way to p...
2012/07/06
[ "https://Stackoverflow.com/questions/11368204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218699/" ]
Check out this fiddle: <http://jsfiddle.net/NfKca/> Modified css as: ``` #sidebar { position:fixed; height:500px; width: 100px; background-color: blue; } #content { box-sizing:border-box; background-color:purple; position:absolute; left:100px; } ```
You could set the `z-index: 1;` on the sidebar. If this doesn't help, it would be great if you could make a jsfiddle to illustrate what you mean more.
11,368,204
I followed a tutorial/instructions online to make a sidebar fixed position by making the sidebars position "fixed" and it worked fine. Now I realize that since my page has a min-width attribute, when the user scrolls sideways the content that doesn't move moves into the sidebar. So basically, I'm looking for a way to p...
2012/07/06
[ "https://Stackoverflow.com/questions/11368204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218699/" ]
As said by others, not possible with only css and html. However, you can do this with javascript/jquery. Just encase you want to use jquery to do this, first as watson said, change index of side bar (I had to make negative), just encase it jquery doesn't work for whatever reason for someone. Then add to your `<head>`...
You could set the `z-index: 1;` on the sidebar. If this doesn't help, it would be great if you could make a jsfiddle to illustrate what you mean more.
11,368,204
I followed a tutorial/instructions online to make a sidebar fixed position by making the sidebars position "fixed" and it worked fine. Now I realize that since my page has a min-width attribute, when the user scrolls sideways the content that doesn't move moves into the sidebar. So basically, I'm looking for a way to p...
2012/07/06
[ "https://Stackoverflow.com/questions/11368204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218699/" ]
As said by others, not possible with only css and html. However, you can do this with javascript/jquery. Just encase you want to use jquery to do this, first as watson said, change index of side bar (I had to make negative), just encase it jquery doesn't work for whatever reason for someone. Then add to your `<head>`...
Check out this fiddle: <http://jsfiddle.net/NfKca/> Modified css as: ``` #sidebar { position:fixed; height:500px; width: 100px; background-color: blue; } #content { box-sizing:border-box; background-color:purple; position:absolute; left:100px; } ```
9,453,761
I am debugging a website using firebug. The website opens a window, performs some operations and than closes it. This causes me to lose all of the firebug net history. Is there any way to prevent javastript from closing the window after its done, except changing the code?
2012/02/26
[ "https://Stackoverflow.com/questions/9453761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/847200/" ]
I haven't tried to use it, but there's a settings in FF which supposedly lets you do what you wish. Type about:config in the url bar and press enter. After a warning you'll see the list of config options. Search for dom.allow\_scripts\_to\_close\_windows and set its value to false.
You can rewrite the `open` method, which adds a `beforeunload` event. Have a look at the annotated code + bookmarklet below: Code: ``` javascript:(function(w){ var o = w.open; /* Stores original `window.open` method */ w.open = function() { /* Catches all window.open calls*/ var x = o.apply(w, a...
35,047,356
I have a problem with a post\_save function. The function is correctly triggered but the instance doesn't contains the value insereted. I checked the function using ipdb and there is nothing wrong. Simply the ManyToManyField is empty. The code: ``` @receiver(post_save, sender=Supplier) def set_generic_locations(sende...
2016/01/27
[ "https://Stackoverflow.com/questions/35047356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1640213/" ]
ManyToManyFields work a little bit differently with signals because of the difference in database structures. Instead of using the post\_save signal, you need to use the [m2m\_changed](https://docs.djangoproject.com/en/1.9/ref/signals/#m2m-changed) signal
For manytomanyfield, you have to save first your parent object () and then add your
69,617,819
When I search the internet for `react-native` optimizations / best practices (**Especially for `FlatLists` which are often greedy**), I always find the advice not to use the arrow functions `<Component onPress={() => ... }`. *Example 1 :* <https://reactnative.dev/docs/optimizing-flatlist-configuration#avoid-anonymous-...
2021/10/18
[ "https://Stackoverflow.com/questions/69617819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3197378/" ]
The answer has nothing to do with arrow functions, but rather understanding reference equality why react might decide to rerender a component. You can use useCallback to wrap your function. This will cause the reference to renderItem to only update when one of your callback dependencies updates. ``` const renderItem ...
The first situation is ideal, because when your app code runs it will create only one `renderItem` function. In the second situation, even if it doesn't have otherProps, you're not following the good practice because a new function is created every render in this line ``` renderItem={({ item: data }) => renderItem(dat...
69,617,819
When I search the internet for `react-native` optimizations / best practices (**Especially for `FlatLists` which are often greedy**), I always find the advice not to use the arrow functions `<Component onPress={() => ... }`. *Example 1 :* <https://reactnative.dev/docs/optimizing-flatlist-configuration#avoid-anonymous-...
2021/10/18
[ "https://Stackoverflow.com/questions/69617819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3197378/" ]
The answer has nothing to do with arrow functions, but rather understanding reference equality why react might decide to rerender a component. You can use useCallback to wrap your function. This will cause the reference to renderItem to only update when one of your callback dependencies updates. ``` const renderItem ...
to me as pointed out previously in other answers the issue is mainly due to the fact that if you use arrow functions inside the code, the function get redefined every time. Also this way of defining a function make this function unnamed so this is harder to track while debugging: on error stack trace you can see the na...
69,617,819
When I search the internet for `react-native` optimizations / best practices (**Especially for `FlatLists` which are often greedy**), I always find the advice not to use the arrow functions `<Component onPress={() => ... }`. *Example 1 :* <https://reactnative.dev/docs/optimizing-flatlist-configuration#avoid-anonymous-...
2021/10/18
[ "https://Stackoverflow.com/questions/69617819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3197378/" ]
The first situation is ideal, because when your app code runs it will create only one `renderItem` function. In the second situation, even if it doesn't have otherProps, you're not following the good practice because a new function is created every render in this line ``` renderItem={({ item: data }) => renderItem(dat...
to me as pointed out previously in other answers the issue is mainly due to the fact that if you use arrow functions inside the code, the function get redefined every time. Also this way of defining a function make this function unnamed so this is harder to track while debugging: on error stack trace you can see the na...
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
In your table component.ts declare a value called `renderedData: any;` Then in your constructor subscribe to the data that has been changed in your material table. I am guessing you are using a filterable table. ``` constructor(){ this.dataSource = new MatTableDataSource(TableData); this.dataSource.connect().subscr...
You can use ngx-csv for Angular 7 works fine "<https://www.npmjs.com/package/ngx-csv>." Get the data from the table with "this.dataSource.connect().subscribe(data=>this.renderedData=data);" and then use export function.
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
In your table component.ts declare a value called `renderedData: any;` Then in your constructor subscribe to the data that has been changed in your material table. I am guessing you are using a filterable table. ``` constructor(){ this.dataSource = new MatTableDataSource(TableData); this.dataSource.connect().subscr...
You can use [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) package to export in excel, csv, json or txt formats. It supports paginated tables too. Stackblitz demo: <https://stackblitz.com/edit/mte-demo>
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
In your table component.ts declare a value called `renderedData: any;` Then in your constructor subscribe to the data that has been changed in your material table. I am guessing you are using a filterable table. ``` constructor(){ this.dataSource = new MatTableDataSource(TableData); this.dataSource.connect().subscr...
You can use mat-table-exporter. To access the "export" method in the typescript code: ``` @ViewChild("exporter") exporter! : MatTableExporterDirective; <table mat-table matTableExporter [dataSource]="dataSource" #exporter="matTableExporter"> ```
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
In your table component.ts declare a value called `renderedData: any;` Then in your constructor subscribe to the data that has been changed in your material table. I am guessing you are using a filterable table. ``` constructor(){ this.dataSource = new MatTableDataSource(TableData); this.dataSource.connect().subscr...
It can be done with out using any library. For dynamic functionality do not convert html element in to csv. Such as, If would like to implement pagination etc. Then It can be done as follow: ``` exportCsv(): void { let csv = ''; for (let column = 0; column < this.columns.length; column++) { csv += this.columns...
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
You can use [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) package to export in excel, csv, json or txt formats. It supports paginated tables too. Stackblitz demo: <https://stackblitz.com/edit/mte-demo>
You can use ngx-csv for Angular 7 works fine "<https://www.npmjs.com/package/ngx-csv>." Get the data from the table with "this.dataSource.connect().subscribe(data=>this.renderedData=data);" and then use export function.
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
You can use ngx-csv for Angular 7 works fine "<https://www.npmjs.com/package/ngx-csv>." Get the data from the table with "this.dataSource.connect().subscribe(data=>this.renderedData=data);" and then use export function.
It can be done with out using any library. For dynamic functionality do not convert html element in to csv. Such as, If would like to implement pagination etc. Then It can be done as follow: ``` exportCsv(): void { let csv = ''; for (let column = 0; column < this.columns.length; column++) { csv += this.columns...
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
You can use [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) package to export in excel, csv, json or txt formats. It supports paginated tables too. Stackblitz demo: <https://stackblitz.com/edit/mte-demo>
You can use mat-table-exporter. To access the "export" method in the typescript code: ``` @ViewChild("exporter") exporter! : MatTableExporterDirective; <table mat-table matTableExporter [dataSource]="dataSource" #exporter="matTableExporter"> ```
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
You can use [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) package to export in excel, csv, json or txt formats. It supports paginated tables too. Stackblitz demo: <https://stackblitz.com/edit/mte-demo>
It can be done with out using any library. For dynamic functionality do not convert html element in to csv. Such as, If would like to implement pagination etc. Then It can be done as follow: ``` exportCsv(): void { let csv = ''; for (let column = 0; column < this.columns.length; column++) { csv += this.columns...
49,170,893
i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?
2018/03/08
[ "https://Stackoverflow.com/questions/49170893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6280170/" ]
You can use mat-table-exporter. To access the "export" method in the typescript code: ``` @ViewChild("exporter") exporter! : MatTableExporterDirective; <table mat-table matTableExporter [dataSource]="dataSource" #exporter="matTableExporter"> ```
It can be done with out using any library. For dynamic functionality do not convert html element in to csv. Such as, If would like to implement pagination etc. Then It can be done as follow: ``` exportCsv(): void { let csv = ''; for (let column = 0; column < this.columns.length; column++) { csv += this.columns...
20,932,644
I have the following [example](http://jsbin.com/ohonaYu/1/edit): ``` <div class="container"> <div class="left"></div> <div class="right"> <span class="number">1</span> <span class="number">2</span> </div> </div> ``` As you can see in the code above left div in not vertically aligned:![enter image descr...
2014/01/05
[ "https://Stackoverflow.com/questions/20932644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1006884/" ]
How about ``` select * from `post_plus` left join `post` on `post`.`id` = `post_plus`.`news_id` where `post`.`id` IS NULL ```
You can do this with a left join ``` SELECT p.id, pp.id FROM post p LEFT JOIN post_plus pp ON (pp.news_id = p.id) ``` you will get all rows from post and pp.id will be null on those rows that don't match. if you append a where clause you will get only the ones that do not match ``` SELECT p.id, pp.id FROM post p ...
20,932,644
I have the following [example](http://jsbin.com/ohonaYu/1/edit): ``` <div class="container"> <div class="left"></div> <div class="right"> <span class="number">1</span> <span class="number">2</span> </div> </div> ``` As you can see in the code above left div in not vertically aligned:![enter image descr...
2014/01/05
[ "https://Stackoverflow.com/questions/20932644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1006884/" ]
How about ``` select * from `post_plus` left join `post` on `post`.`id` = `post_plus`.`news_id` where `post`.`id` IS NULL ```
Or you can also use this ``` select * from post t1 join post_plus t2 on t1.id <> t2.news_id ```
20,932,644
I have the following [example](http://jsbin.com/ohonaYu/1/edit): ``` <div class="container"> <div class="left"></div> <div class="right"> <span class="number">1</span> <span class="number">2</span> </div> </div> ``` As you can see in the code above left div in not vertically aligned:![enter image descr...
2014/01/05
[ "https://Stackoverflow.com/questions/20932644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1006884/" ]
You can do this with a left join ``` SELECT p.id, pp.id FROM post p LEFT JOIN post_plus pp ON (pp.news_id = p.id) ``` you will get all rows from post and pp.id will be null on those rows that don't match. if you append a where clause you will get only the ones that do not match ``` SELECT p.id, pp.id FROM post p ...
Or you can also use this ``` select * from post t1 join post_plus t2 on t1.id <> t2.news_id ```
28,318,912
I need to write several formulas in CSS (or is there some other way?) and integrate it on my quiz website for students. I already found some interesting examples in here: <http://www.periodni.com/mathematical_and_chemical_equations_on_web.html> But I need one more, as can be seen in this picture: [![](https://i.stac...
2015/02/04
[ "https://Stackoverflow.com/questions/28318912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4527585/" ]
I upvoted Nplay comment, easychem seems really fun. Filthy, dirty way to achieve it with HTML (don't try this at home please) : ```html <p> <span style="visibility: hidden;">CH<sub>3</sub> - </span>CH<sub>3</sub><br/> <span style="visibility: hidden;">CH<sub>3</sub> - </span>|<br/> CH<sub>3</sub> - C - CH<s...
``` CO<sub>2</sub><br> H<sub>2</sub> + O --->H<sub>2</sub>O ``` CO2 H2 + O --->H2O
60,553,264
I need to compare the roman letters and get the correct integer out of it. If I'm correct, there should be a way to compare the hashmap key with the arraylist element and if they match, get the associated value from the key. The return 2020 is there just for test purposes, since I wrote a JUnit test in a different cl...
2020/03/05
[ "https://Stackoverflow.com/questions/60553264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13014882/" ]
As you said Apple does not provide a clear answer in the documentation. But, from the Apple WWDC 2019 conference video: <https://developer.apple.com/videos/play/wwdc2019/302/?time=637> > > "However, should you not return a 200 response, we will retry up to > three times to resend the notification to you" > > > S...
Apple will attempt to retry 3 times over 3 days.
60,553,264
I need to compare the roman letters and get the correct integer out of it. If I'm correct, there should be a way to compare the hashmap key with the arraylist element and if they match, get the associated value from the key. The return 2020 is there just for test purposes, since I wrote a JUnit test in a different cl...
2020/03/05
[ "https://Stackoverflow.com/questions/60553264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13014882/" ]
The retry policy for App Store server notifications depends on the version of the server notification. It retries as follows: > > * For version 1 notifications, it retries three times; at 6, 24, and 48 hours after the previous attempt. > * For version 2 notifications, it retries five times; at 1, 12, 24, 48, and 72 h...
As you said Apple does not provide a clear answer in the documentation. But, from the Apple WWDC 2019 conference video: <https://developer.apple.com/videos/play/wwdc2019/302/?time=637> > > "However, should you not return a 200 response, we will retry up to > three times to resend the notification to you" > > > S...
60,553,264
I need to compare the roman letters and get the correct integer out of it. If I'm correct, there should be a way to compare the hashmap key with the arraylist element and if they match, get the associated value from the key. The return 2020 is there just for test purposes, since I wrote a JUnit test in a different cl...
2020/03/05
[ "https://Stackoverflow.com/questions/60553264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13014882/" ]
Refer: <https://developer.apple.com/documentation/appstoreservernotifications/your_server> Upon receiving a server notification, respond to the App Store with an HTTP status code of 200 if the post was successful. If the post was unsuccessful, send HTTP 50x or 40x to have the App Store retry the notification. If the ...
Apple will attempt to retry 3 times over 3 days.
60,553,264
I need to compare the roman letters and get the correct integer out of it. If I'm correct, there should be a way to compare the hashmap key with the arraylist element and if they match, get the associated value from the key. The return 2020 is there just for test purposes, since I wrote a JUnit test in a different cl...
2020/03/05
[ "https://Stackoverflow.com/questions/60553264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13014882/" ]
The retry policy for App Store server notifications depends on the version of the server notification. It retries as follows: > > * For version 1 notifications, it retries three times; at 6, 24, and 48 hours after the previous attempt. > * For version 2 notifications, it retries five times; at 1, 12, 24, 48, and 72 h...
Apple will attempt to retry 3 times over 3 days.
60,553,264
I need to compare the roman letters and get the correct integer out of it. If I'm correct, there should be a way to compare the hashmap key with the arraylist element and if they match, get the associated value from the key. The return 2020 is there just for test purposes, since I wrote a JUnit test in a different cl...
2020/03/05
[ "https://Stackoverflow.com/questions/60553264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13014882/" ]
The retry policy for App Store server notifications depends on the version of the server notification. It retries as follows: > > * For version 1 notifications, it retries three times; at 6, 24, and 48 hours after the previous attempt. > * For version 2 notifications, it retries five times; at 1, 12, 24, 48, and 72 h...
Refer: <https://developer.apple.com/documentation/appstoreservernotifications/your_server> Upon receiving a server notification, respond to the App Store with an HTTP status code of 200 if the post was successful. If the post was unsuccessful, send HTTP 50x or 40x to have the App Store retry the notification. If the ...
41,433,932
I'm interested in instantiating a pool of workers, `the_pool`, using `multiprocessing.Pool` that uses a `Queue` for communication. However, each worker has an argument, `role`, that is unique to that worker and needs to be provided during worker initialization. This constraint is imposed by an API I'm interfacing with,...
2017/01/02
[ "https://Stackoverflow.com/questions/41433932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3417688/" ]
Why not use two worker functions, one for just for initialization? Like: ``` def worker_init(q): global queue queue = q def worker_main(role): # use the global `queue` freely here ``` Initialization is much the same as what you showed, except call `worker_init`: ``` the_pool = multiprocessing.Pool(3...
You can just create queue with roles: ``` import os import time import multiprocessing # A dummy function representing some fixed functionality. def do_something(x): print('I got a thing:', x) # A main function, run by our workers. (Remove role arg for working example) def worker_main(queue, roles): role = r...
74,378,006
I do host a gitea server and access git via https. The certificate is **not** self-signed, but from a proper CA, User Trust (<https://www.tbs-certificates.co.uk/FAQ/en/racine-USERTrustRSACertificationAuthority.html>). I'm using the latest git client for windows (2.38.1, 64bit) When i do a `git pull`, the error `unable...
2022/11/09
[ "https://Stackoverflow.com/questions/74378006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1155873/" ]
Make a typed getter so it has proper type and you don't have to store it ``` abstract class AbstractView { get ctx(): typeof AbstractView { return this.constructor as typeof AbstractView; } static getStatus() : string { return 'hi'; } } class TestView extends AbstractView { stat...
The error message is telling you the problem: > > "Property 'ctx' is missing in type **'typeof AbstractView'** but required in type **'AbstractView'**" > > > Make them match! The following compiles, though storing the constructor looks pretty weird. ``` abstract class AbstractView { ctx : typeof AbstractView;...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
There are several [design pattern repositories listed on Konigi web](http://konigi.com/wiki/design-pattern-repositories). From these, [Patternry](http://patternry.com/) allows you to create public and private collections of patterns.
Not a tool that I have got round to using myself yet but [Quince](http://quince.infragistics.com/) seems interesting. Personally I have found that having my own patterns sketchbook has been very useful, but I think you are looking for something more advanced and collaborative?
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
We have put together our own Wiki-based pattern library that contains screenshots, descriptions of use-cases, and notes on variations of the element/widget. The intention of the library was to enforce standardized designs across the different applications. In this regard, it has been of limited success. I attribute thi...
Not a tool that I have got round to using myself yet but [Quince](http://quince.infragistics.com/) seems interesting. Personally I have found that having my own patterns sketchbook has been very useful, but I think you are looking for something more advanced and collaborative?
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
We currently use a wiki that we have customized. It allows us to create detailed specs (flow charts, images, code snippets, comments, a history etc) that anyone with an account can access. Within this we have pixel specs and a library of common UI elements that are linked to pages (if needed) that explain the interacti...
There's a market for this type of product. We've done a lot of research on it and haven't found one that really fits the bill yet. In the past two org's I've worked on, we've built skunkworks pattern/component libraries by hand...typically a loose mix of PHP includes. We're toying with the idea of building some custo...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
There are several [design pattern repositories listed on Konigi web](http://konigi.com/wiki/design-pattern-repositories). From these, [Patternry](http://patternry.com/) allows you to create public and private collections of patterns.
We currently use a wiki that we have customized. It allows us to create detailed specs (flow charts, images, code snippets, comments, a history etc) that anyone with an account can access. Within this we have pixel specs and a library of common UI elements that are linked to pages (if needed) that explain the interacti...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
We currently use a wiki that we have customized. It allows us to create detailed specs (flow charts, images, code snippets, comments, a history etc) that anyone with an account can access. Within this we have pixel specs and a library of common UI elements that are linked to pages (if needed) that explain the interacti...
I've worked with various approaches to such libraries from creating graffle stencils to full design repos complete with wikis and working code widgets. If you have the resource and time, the latter does have some real benefits as fully coded examples can be useful in clarifying the patterns more comprehensively e.g. yo...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
Not a tool that I have got round to using myself yet but [Quince](http://quince.infragistics.com/) seems interesting. Personally I have found that having my own patterns sketchbook has been very useful, but I think you are looking for something more advanced and collaborative?
I've worked with various approaches to such libraries from creating graffle stencils to full design repos complete with wikis and working code widgets. If you have the resource and time, the latter does have some real benefits as fully coded examples can be useful in clarifying the patterns more comprehensively e.g. yo...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
We have put together our own Wiki-based pattern library that contains screenshots, descriptions of use-cases, and notes on variations of the element/widget. The intention of the library was to enforce standardized designs across the different applications. In this regard, it has been of limited success. I attribute thi...
This depends on the tools you're using. Usually you can create a master file placed in a shared location. I've seen this done with Powerpoint (just a ppt with elements), Visio (custom stencils), Axure RP (widget libraries / shared project) and Illustrator (don't know how it was done exactly).
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
We have put together our own Wiki-based pattern library that contains screenshots, descriptions of use-cases, and notes on variations of the element/widget. The intention of the library was to enforce standardized designs across the different applications. In this regard, it has been of limited success. I attribute thi...
There's a market for this type of product. We've done a lot of research on it and haven't found one that really fits the bill yet. In the past two org's I've worked on, we've built skunkworks pattern/component libraries by hand...typically a loose mix of PHP includes. We're toying with the idea of building some custo...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
There are several [design pattern repositories listed on Konigi web](http://konigi.com/wiki/design-pattern-repositories). From these, [Patternry](http://patternry.com/) allows you to create public and private collections of patterns.
There's a market for this type of product. We've done a lot of research on it and haven't found one that really fits the bill yet. In the past two org's I've worked on, we've built skunkworks pattern/component libraries by hand...typically a loose mix of PHP includes. We're toying with the idea of building some custo...
8,927
I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use. We want something that we can collaborate on and also share with visual designers and develop...
2011/07/12
[ "https://ux.stackexchange.com/questions/8927", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/4500/" ]
Internally here we use [confluence](http://www.atlassian.com/software/confluence/). One of our guys is in charge of keeping it in order, and we just all post use it as a way to reference the correct UI to use in a certain situation. That being said, we also use it as a discussion point when we believe an element is w...
There's a market for this type of product. We've done a lot of research on it and haven't found one that really fits the bill yet. In the past two org's I've worked on, we've built skunkworks pattern/component libraries by hand...typically a loose mix of PHP includes. We're toying with the idea of building some custo...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Not as long as you might think, especially if the room is not tightly sealed. Bugs will eat a corpse pretty efficiently, even without animals. If you are looking for this to be some romantic scene because there isn't viscera, well, it's going to smell if it's been sealed, no matter what. Even if they are bones. The b...
The rule of thumb is “100 degree-days to get bones”. I don't know what *degree* is measured from, but that should be a start for Google… And that turns up [this link](https://weather.com/science/news/flesh-bone-what-role-weather-plays-body-decomposition-20131031) which is a start. [This one, *The Rate of Decay in a Co...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
They discovered [Richard III's](https://en.wikipedia.org/wiki/Richard_III_of_England#Discovery_of_remains) bones a few years ago. Given that he died in 1485, bones do survive for around 5 centuries in soil. Flesh rots in air, bones desiccate. From what a quick Google search indicates, bones become powdery in air in a...
The rule of thumb is “100 degree-days to get bones”. I don't know what *degree* is measured from, but that should be a start for Google… And that turns up [this link](https://weather.com/science/news/flesh-bone-what-role-weather-plays-body-decomposition-20131031) which is a start. [This one, *The Rate of Decay in a Co...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Okay, there's not much data on timescales of human bones decaying away to nothing, because we bury/ cremate our dead. Also when folk come across a pile of bones, they tend to phone the police. So you might have to look at studies of animal bones and extrapolate from that. The search term you'll need is [taphonomy](http...
The rule of thumb is “100 degree-days to get bones”. I don't know what *degree* is measured from, but that should be a start for Google… And that turns up [this link](https://weather.com/science/news/flesh-bone-what-role-weather-plays-body-decomposition-20131031) which is a start. [This one, *The Rate of Decay in a Co...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
It really depends on four things 1. how well sealed the room is, keeping rodents out is essential, they will eat bone just for the calcium. 2. the humidity, fungi can eat bone so you want it dry, light is likewise the enemy. 3. the temprature, if it is exposed to freezing and thawing the bones will powderize quite qui...
The rule of thumb is “100 degree-days to get bones”. I don't know what *degree* is measured from, but that should be a start for Google… And that turns up [this link](https://weather.com/science/news/flesh-bone-what-role-weather-plays-body-decomposition-20131031) which is a start. [This one, *The Rate of Decay in a Co...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Not as long as you might think, especially if the room is not tightly sealed. Bugs will eat a corpse pretty efficiently, even without animals. If you are looking for this to be some romantic scene because there isn't viscera, well, it's going to smell if it's been sealed, no matter what. Even if they are bones. The b...
They discovered [Richard III's](https://en.wikipedia.org/wiki/Richard_III_of_England#Discovery_of_remains) bones a few years ago. Given that he died in 1485, bones do survive for around 5 centuries in soil. Flesh rots in air, bones desiccate. From what a quick Google search indicates, bones become powdery in air in a...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Okay, there's not much data on timescales of human bones decaying away to nothing, because we bury/ cremate our dead. Also when folk come across a pile of bones, they tend to phone the police. So you might have to look at studies of animal bones and extrapolate from that. The search term you'll need is [taphonomy](http...
Not as long as you might think, especially if the room is not tightly sealed. Bugs will eat a corpse pretty efficiently, even without animals. If you are looking for this to be some romantic scene because there isn't viscera, well, it's going to smell if it's been sealed, no matter what. Even if they are bones. The b...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Not as long as you might think, especially if the room is not tightly sealed. Bugs will eat a corpse pretty efficiently, even without animals. If you are looking for this to be some romantic scene because there isn't viscera, well, it's going to smell if it's been sealed, no matter what. Even if they are bones. The b...
It really depends on four things 1. how well sealed the room is, keeping rodents out is essential, they will eat bone just for the calcium. 2. the humidity, fungi can eat bone so you want it dry, light is likewise the enemy. 3. the temprature, if it is exposed to freezing and thawing the bones will powderize quite qui...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Okay, there's not much data on timescales of human bones decaying away to nothing, because we bury/ cremate our dead. Also when folk come across a pile of bones, they tend to phone the police. So you might have to look at studies of animal bones and extrapolate from that. The search term you'll need is [taphonomy](http...
They discovered [Richard III's](https://en.wikipedia.org/wiki/Richard_III_of_England#Discovery_of_remains) bones a few years ago. Given that he died in 1485, bones do survive for around 5 centuries in soil. Flesh rots in air, bones desiccate. From what a quick Google search indicates, bones become powdery in air in a...
49,109
From death to brittleness? Two bodies, on a bed, in an embrace. Windows and doors closed, so little to no air and light, but not completely air/light tight. No scavenger animals/rodents, but bugs would obviously be present. Humid (tropical rain-forest) environment. The aim is to have my characters stumble across this...
2016/07/31
[ "https://worldbuilding.stackexchange.com/questions/49109", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/21849/" ]
Okay, there's not much data on timescales of human bones decaying away to nothing, because we bury/ cremate our dead. Also when folk come across a pile of bones, they tend to phone the police. So you might have to look at studies of animal bones and extrapolate from that. The search term you'll need is [taphonomy](http...
It really depends on four things 1. how well sealed the room is, keeping rodents out is essential, they will eat bone just for the calcium. 2. the humidity, fungi can eat bone so you want it dry, light is likewise the enemy. 3. the temprature, if it is exposed to freezing and thawing the bones will powderize quite qui...
102,279
I am trying to solve the recurrence below but I find myself stuck. $T(n) = \frac{n}{2}T(\frac{n}{2}) + \log n$ I have tried coming up with a guess by drawing a recurrence tree. What I have found is number of nodes at a level: $\frac{n}{2^{i}}$ running time at each node: $\log \frac{n}{2^{i}}$ total running time ...
2012/01/25
[ "https://math.stackexchange.com/questions/102279", "https://math.stackexchange.com", "https://math.stackexchange.com/users/14078/" ]
Consider the equality $$ 1+x+x^2+...+x^n=\frac{x^{n + 1} -1}{x-1} $$ Differentiate it by $x$, then multiply by $x$: $$ x+2x^2+3x^3+...+n x^n=\frac{nx^{n+2} - (n + 1)x^{n+1} + x}{(x-1)^2} $$ Now we can substitute $x=\frac{1}{2}$ and obtain $$ \sum\limits\_{i=0}^n\frac{i}{2^i}=n\left(\frac{1}{2}\right)^{n} - (n + 1)...
**Summary:** Like in several questions of the same ilk asked previously on the site, the recursion can only determine each $T(n)$ as a function of $T(2i+1)$ and $k\geqslant0$, where $n=(2i+1)2^k$. Furthermoree, the series considered by the OP are simply not relevant to the asymptotics of $T(n)$. The growth of $T(n)$ of...
102,279
I am trying to solve the recurrence below but I find myself stuck. $T(n) = \frac{n}{2}T(\frac{n}{2}) + \log n$ I have tried coming up with a guess by drawing a recurrence tree. What I have found is number of nodes at a level: $\frac{n}{2^{i}}$ running time at each node: $\log \frac{n}{2^{i}}$ total running time ...
2012/01/25
[ "https://math.stackexchange.com/questions/102279", "https://math.stackexchange.com", "https://math.stackexchange.com/users/14078/" ]
Consider the equality $$ 1+x+x^2+...+x^n=\frac{x^{n + 1} -1}{x-1} $$ Differentiate it by $x$, then multiply by $x$: $$ x+2x^2+3x^3+...+n x^n=\frac{nx^{n+2} - (n + 1)x^{n+1} + x}{(x-1)^2} $$ Now we can substitute $x=\frac{1}{2}$ and obtain $$ \sum\limits\_{i=0}^n\frac{i}{2^i}=n\left(\frac{1}{2}\right)^{n} - (n + 1)...
The summation $$ \sum\limits\_{i=0}^n \frac{i}{2^{i}} $$ is equal to $$ \sum\limits\_{i=0}^n i(\frac{1}{2})^i $$ which is of the form $$ \sum\limits\_{i=0}^n ix^i, x = \frac{1}{2} $$ Consider the summation $$ \sum\limits\_{i=0}^n x^i = \frac{x^{n+1} - 1}{x - 1} $$ By differentiating with respect to $x$ we have $...
13,383
I need a web based project management software. It should basically have: * Issue tracker * Wiki (not mandatory) * Git integration * Progress It should be open source and I should be able to install it onto my server. Currently, I have found the following options : * [ProjeQtOr](http://www.projeqtor.org/) * [MyColl...
2014/10/22
[ "https://softwarerecs.stackexchange.com/questions/13383", "https://softwarerecs.stackexchange.com", "https://softwarerecs.stackexchange.com/users/8417/" ]
I'd recommend using **[Trac](http://trac.edgewall.org/)** (for details and screenshots, see my answers [here](https://softwarerecs.stackexchange.com/a/7501/185) and [here](https://softwarerecs.stackexchange.com/a/1560/185). Trac fulfills all your requirements listed: * **Issue tracker:** Yes. * **Wiki:** Yes. * **GIT ...
There are various options out there: Gitlab, Redmine, Launchpad, and [others](https://en.wikipedia.org/wiki/Comparison_of_project_management_software). Out of all of these, I have the best experience with **GitLab**, which is used by the likes of the **GNOME project and F-Droid**. (According to Wikipedia, other users ...
53,573,017
I am using lit html to create custom web components in my project. And my problem is when I try to use the CSS target selector in a web component it wont get triggered, but when I am doing it without custom component the code works perfectly. Could someone shed some light to why this is happening and to what would be t...
2018/12/01
[ "https://Stackoverflow.com/questions/53573017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10558165/" ]
LitElement uses a Shadow DOM to render its content. Shadow DOM isolates the CSS style defined inside and prevent selecting inner content from the outide with CSS selectors. For that reason, the `:target` pseudo-class won't work. Instead, you could use a standard (vanilla) custom element instead of the LitElement. Wi...
Bit in late, i've experienced the same problem! So i'm following one of two paths: 1. Use a lit element but without the shadowDOM, to do that in your Lit element call the method **createRenderRoot()** ```js createRenderRoot () { return this } ``` 2. Instead handle the CSS logic with :target i'm handling the a...
46,308,541
I have a linechart, and by default I need to show just a subset of elements, then show a different subset on dropdown event. Here is initial code: ``` varlines = svg.append("g") .attr('id', 'lines') .selectAll('g') .data(datum.filter(function(d) { return d.group == 'default' }), ...
2017/09/19
[ "https://Stackoverflow.com/questions/46308541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2286597/" ]
If you look at your `varlines`, you'll see that it is just an **enter** selection: ``` varlines = svg.append("g") .attr('id', 'lines') .selectAll('g') .data(datum.filter(function(d) { return d.group == 'default' }), function(d) { return d.name } ).enter()...
Here is my new code following Gerardo's recommendations as well as this Mike's tutorial: <https://bl.ocks.org/EmbraceLife/efb531e68ce46c51cb1df2ca360348bb> ``` function update(data) { var varlines = svg.selectAll(".varlines") .data(data, function(d) {return d.name}); // ENTER // Create new elements as need...
21,889,087
I'm using this line of code: ``` $("#middle_child").contents().filter(function(){return this.nodeType == Node.TEXT_NODE;}).text(); ``` For now, I'm just placing this in a console.log(). I'm using Chrome for testing & value returns as an empty string, but the value should return "Middle Child". This is the HTML: ``...
2014/02/19
[ "https://Stackoverflow.com/questions/21889087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3277004/" ]
You were on the right track. Just needed to make minor changes. The following query will give you the desired results. In inner query got the first 4 columns and to get rank cross joined that to `(SELECT @curRank := 0) r` which is MySQL trick for getting rank. in the end just needed to order by Cnt to make it work. ``...
I'm sure SaUce's answer's fine - but there still seems to be too much query there! ``` SELECT username , user , category , COUNT(*) num , @i:=@i+1 rank FROM tbla a JOIN tblB b ON b.userid = a.user , (SELECT @i:=0)var WHERE category = 1 GROUP BY user ORDER BY num DESC...
5,391,816
i have a javascript file about 6000+ lines of codes created by myself. Now it has functions for different sections of my site.. Now what i want to ask is that should i use that large file or divide it in parts for respective sections and call it in respective section.
2011/03/22
[ "https://Stackoverflow.com/questions/5391816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229849/" ]
I would suggest using 1 large one, as that requires only 1 http request. And with the right server setup it is only loaded once as it becomes cached.
It depends on how much the HTTP request cost is Vs. how likely a visitor is to access one of the sections with specific JS Vs. how much bandwidth is saved for the other pages.
5,391,816
i have a javascript file about 6000+ lines of codes created by myself. Now it has functions for different sections of my site.. Now what i want to ask is that should i use that large file or divide it in parts for respective sections and call it in respective section.
2011/03/22
[ "https://Stackoverflow.com/questions/5391816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229849/" ]
I would suggest using 1 large one, as that requires only 1 http request. And with the right server setup it is only loaded once as it becomes cached.
If it's just a question of serving the file, then one large one is almost definitely better, particularly if your server has gzip compression turned on (which it should). However, you might also want to break the file up into smaller parts to improve the readability and maintainability aspects of the code. In such a ...
5,391,816
i have a javascript file about 6000+ lines of codes created by myself. Now it has functions for different sections of my site.. Now what i want to ask is that should i use that large file or divide it in parts for respective sections and call it in respective section.
2011/03/22
[ "https://Stackoverflow.com/questions/5391816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229849/" ]
I would suggest using 1 large one, as that requires only 1 http request. And with the right server setup it is only loaded once as it becomes cached.
Lately, it appears as if the best approach is to split it up into smaller files and load only the needed ones, in parallell, using some kind of JS loader (like [Head JS](http://headjs.com) for example; click the link and scroll down to the headline "Combining scripts" to read more about the performance difference). An...
5,391,816
i have a javascript file about 6000+ lines of codes created by myself. Now it has functions for different sections of my site.. Now what i want to ask is that should i use that large file or divide it in parts for respective sections and call it in respective section.
2011/03/22
[ "https://Stackoverflow.com/questions/5391816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229849/" ]
It depends on how much the HTTP request cost is Vs. how likely a visitor is to access one of the sections with specific JS Vs. how much bandwidth is saved for the other pages.
If it's just a question of serving the file, then one large one is almost definitely better, particularly if your server has gzip compression turned on (which it should). However, you might also want to break the file up into smaller parts to improve the readability and maintainability aspects of the code. In such a ...
5,391,816
i have a javascript file about 6000+ lines of codes created by myself. Now it has functions for different sections of my site.. Now what i want to ask is that should i use that large file or divide it in parts for respective sections and call it in respective section.
2011/03/22
[ "https://Stackoverflow.com/questions/5391816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229849/" ]
It depends on how much the HTTP request cost is Vs. how likely a visitor is to access one of the sections with specific JS Vs. how much bandwidth is saved for the other pages.
Lately, it appears as if the best approach is to split it up into smaller files and load only the needed ones, in parallell, using some kind of JS loader (like [Head JS](http://headjs.com) for example; click the link and scroll down to the headline "Combining scripts" to read more about the performance difference). An...
32,892,143
I have been using nodejs a lot lately but I keep coming up against a similar error. There are a huge amount of projects out there and a lot of them have npm packages, but whenever I attempt `npm install --save some-package` I can't seem to figure out how to use them. I don't mean things like express, or mongoose, which...
2015/10/01
[ "https://Stackoverflow.com/questions/32892143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2091965/" ]
You still need to include those scripts in your page. Use a good old `<script src="…">` or some module loader. (e.g. [require.js](http://requirejs.org/))
what I did was instead of using masonry package download jQuery masonry script and add it as a "script tag" /js file and you can form layout easily in css
32,892,143
I have been using nodejs a lot lately but I keep coming up against a similar error. There are a huge amount of projects out there and a lot of them have npm packages, but whenever I attempt `npm install --save some-package` I can't seem to figure out how to use them. I don't mean things like express, or mongoose, which...
2015/10/01
[ "https://Stackoverflow.com/questions/32892143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2091965/" ]
You still need to include those scripts in your page. Use a good old `<script src="…">` or some module loader. (e.g. [require.js](http://requirejs.org/))
The `masonry-layout` npm package will install the .js you need into `node_modules/masonry-layout/dist/masonry.pkgd.min.js`. You need to include that file in a `<script>` tag on your page.
28,824,570
So Im keep coming up with typeError: Cannot read property 'style' undefined. It situated on the last line of javascript. Anyone any suggestions. The finished piece is to be a marquee with vertically scrolling text. ```js window.onload = defineMarquee; var timeID; var marqueeTxt = new Array(); var marqueeOff = true...
2015/03/03
[ "https://Stackoverflow.com/questions/28824570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4318762/" ]
1. Hmm no, because with your piece of code you make ALL methods on the collection class available for a static call. That's not the purpose of the (abstract) factory pattern. 2. (Magic) methods like `__callStatic` or `call_user_func_array` are very tricky because a developer can use it to call every method. 3. What wou...
Does it make sense for `Collection` to extend `Document`? It seems to me like a `Collection` could *have* `Document`(s), but not *be* a `Document`... So I would say this code looks a bit tangled. Also, with the factory method, you really want to use that to instantiate a different concrete subclass of either `Document...
252,729
I know you get 2 set pieces in the new season for reaching level 70, what else do you have to do to get the other 4 pieces? Can you get a free set again if you complete the parameters with a new character?
2016/01/21
[ "https://gaming.stackexchange.com/questions/252729", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/73403/" ]
You get two more set pieces for completing the Chapter 4 objective "Mercy" (Defeat Zoltan Kulle on Torment II) and two pieces for completing the Chapter 4 objective "Great Expectations" (Complete a Level 20 Greater Rift solo).
As yuuki didn't answer this: **NO**, you can't get the items on other characters.
31,655,986
I have an asp.net gridview which displays two rows for each record, using the following code below (example). However using a dropdownlist which is on the top of the page, based on its selection (1 or 2) I want the gridview to update itself on the following way: option 1 = display two rows per record. option 2 = dis...
2015/07/27
[ "https://Stackoverflow.com/questions/31655986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135218/" ]
**Client Side** One way would be to use JavaScript or jQuery to show/hide the second row. For this, I recommend replacing the table with `<div>`'s and adding the class to the `div` tag instead of the `td` tag, or splitting out the tables, as shown in the Server Side example. Here's a jQuery example: ``` $("#ddl").ch...
with a dropdownlist you could use the OnSelectedIndexChanged function. like this: ```html <asp:DropDownList runat="server" ID="ddlDemo" on SelectedIndexChanged="ddlDemo_SelectedIndexChanged"> <asp:ListItem Value="1">one</asp:ListItem><asp:ListItem Value="2">tow</asp:ListItem> </asp:DropDownList> ``` and in the ...
31,655,986
I have an asp.net gridview which displays two rows for each record, using the following code below (example). However using a dropdownlist which is on the top of the page, based on its selection (1 or 2) I want the gridview to update itself on the following way: option 1 = display two rows per record. option 2 = dis...
2015/07/27
[ "https://Stackoverflow.com/questions/31655986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135218/" ]
There is code based on one of my database, just change parameters (this is *server side* example, someone else provide here client side example) : aspx : ``` <asp:DropDownList runat="server" ID="ddlChoice" AutoPostBack="true"> <asp:ListItem Text="One row"></asp:ListItem> <asp:ListItem Text="Two rows"></...
with a dropdownlist you could use the OnSelectedIndexChanged function. like this: ```html <asp:DropDownList runat="server" ID="ddlDemo" on SelectedIndexChanged="ddlDemo_SelectedIndexChanged"> <asp:ListItem Value="1">one</asp:ListItem><asp:ListItem Value="2">tow</asp:ListItem> </asp:DropDownList> ``` and in the ...
31,655,986
I have an asp.net gridview which displays two rows for each record, using the following code below (example). However using a dropdownlist which is on the top of the page, based on its selection (1 or 2) I want the gridview to update itself on the following way: option 1 = display two rows per record. option 2 = dis...
2015/07/27
[ "https://Stackoverflow.com/questions/31655986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135218/" ]
There is code based on one of my database, just change parameters (this is *server side* example, someone else provide here client side example) : aspx : ``` <asp:DropDownList runat="server" ID="ddlChoice" AutoPostBack="true"> <asp:ListItem Text="One row"></asp:ListItem> <asp:ListItem Text="Two rows"></...
**Client Side** One way would be to use JavaScript or jQuery to show/hide the second row. For this, I recommend replacing the table with `<div>`'s and adding the class to the `div` tag instead of the `td` tag, or splitting out the tables, as shown in the Server Side example. Here's a jQuery example: ``` $("#ddl").ch...
72,341,977
I have been trying to find solutions for this for a few days now and can't seem to get anything to work. The script below shows/hides columns in the tabs and works perfectly in the named sheet. I just need it to run through all of the tabs, **except for the first few**,and be applied in them too. I just don't underst...
2022/05/22
[ "https://Stackoverflow.com/questions/72341977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19176386/" ]
SQLAlchemy itself only calls the cursor's `execute` method, which does not support executing multiple statements. However it's possible to access the DB API connection directly, and call its `executescript` method: ```py import sqlalchemy as sa engine = sa.create_engine('sqlite:///so72341960.db') # Create a table fo...
This is because sqlite3 only supports executing one statement at a time. If you want to execute multiple statements, they need to be separate commands. For example, ```py statements = [] // put your statements in this array for statement in statements: session.execute(text(statement)) ``` This will iterate over th...
8,188,172
I am pretty new to rails so this may be an easy question, but I was looking to create a Rails app that would use youtube in it. I have found that youtube\_it seems to be the gem of choice for a task like this but I am having trouble using it. Basically, I want to use the gem so that I can get videos from specific users...
2011/11/18
[ "https://Stackoverflow.com/questions/8188172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1054494/" ]
it looks like what you want to print out is the name of the playlist - but that is an attribute of the playlist object, so you'll need something like: ``` <% @playlists.each do |playlist| %> <p>Playlist: <%= playlist.title %></p> <% end %> ``` otherwise ruby is trying to "print" the playlist object - which just do...
<https://github.com/kylejginavan/youtube_it> or youtube\_it is the new version of youtube\_g. This was forked and enhanced. If you need any enhancements please reach out to me.
8,188,172
I am pretty new to rails so this may be an easy question, but I was looking to create a Rails app that would use youtube in it. I have found that youtube\_it seems to be the gem of choice for a task like this but I am having trouble using it. Basically, I want to use the gem so that I can get videos from specific users...
2011/11/18
[ "https://Stackoverflow.com/questions/8188172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1054494/" ]
it looks like what you want to print out is the name of the playlist - but that is an attribute of the playlist object, so you'll need something like: ``` <% @playlists.each do |playlist| %> <p>Playlist: <%= playlist.title %></p> <% end %> ``` otherwise ruby is trying to "print" the playlist object - which just do...
you have a complete demo that I made here <http://youtube-it.heroku.com/> included source!
54,264,668
Hello everyone i have the following row as a sample in my table ``` id shop_id start_time end_time 1 21 10:00 11:00 ``` and i want to check whether start\_time and end\_time exist in table or not I am using following query but not working correctly, Where i am wrong ? ``` se...
2019/01/19
[ "https://Stackoverflow.com/questions/54264668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10784895/" ]
You need to clearly separate the checks on the `shop_id` and the time ranges: ``` SELECT * FROM usr_booking WHERE shop_id = 21 AND (start_time BETWEEN '10:10:00' AND '11:01:00' OR end_time BETWEEN '10:10:00' AND '11:01:00'); ``` The `AND` operator in MySQL has higher precedence than the `OR` operator. S...
Try to make groups in such type of queries ``` select * from usr_booking where shop_id='21' AND ((start_time between '10:10:00' and '11:01:00') OR (end_time between '10:10:00' and '11:01:00')) ``` Add the extra brackets make groups.
54,264,668
Hello everyone i have the following row as a sample in my table ``` id shop_id start_time end_time 1 21 10:00 11:00 ``` and i want to check whether start\_time and end\_time exist in table or not I am using following query but not working correctly, Where i am wrong ? ``` se...
2019/01/19
[ "https://Stackoverflow.com/questions/54264668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10784895/" ]
You need to clearly separate the checks on the `shop_id` and the time ranges: ``` SELECT * FROM usr_booking WHERE shop_id = 21 AND (start_time BETWEEN '10:10:00' AND '11:01:00' OR end_time BETWEEN '10:10:00' AND '11:01:00'); ``` The `AND` operator in MySQL has higher precedence than the `OR` operator. S...
Try this Query: ``` SELECT * FROM usr_booking Where shop_id='21' AND start_time BETWEEN '10:10:00' AND '11:01:00' AND end_time BETWEEN '10:10:00' AND '11:01:00' ```
54,264,668
Hello everyone i have the following row as a sample in my table ``` id shop_id start_time end_time 1 21 10:00 11:00 ``` and i want to check whether start\_time and end\_time exist in table or not I am using following query but not working correctly, Where i am wrong ? ``` se...
2019/01/19
[ "https://Stackoverflow.com/questions/54264668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10784895/" ]
You need to clearly separate the checks on the `shop_id` and the time ranges: ``` SELECT * FROM usr_booking WHERE shop_id = 21 AND (start_time BETWEEN '10:10:00' AND '11:01:00' OR end_time BETWEEN '10:10:00' AND '11:01:00'); ``` The `AND` operator in MySQL has higher precedence than the `OR` operator. S...
Try this ``` SELECT * FROM usr_booking WHERE shop_id=21 AND (start_time BETWEEN '10:10:00' AND '11:01:00') OR (end_time BETWEEN '10:10:00' AND '11:01:00') ```
54,264,668
Hello everyone i have the following row as a sample in my table ``` id shop_id start_time end_time 1 21 10:00 11:00 ``` and i want to check whether start\_time and end\_time exist in table or not I am using following query but not working correctly, Where i am wrong ? ``` se...
2019/01/19
[ "https://Stackoverflow.com/questions/54264668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10784895/" ]
You need to clearly separate the checks on the `shop_id` and the time ranges: ``` SELECT * FROM usr_booking WHERE shop_id = 21 AND (start_time BETWEEN '10:10:00' AND '11:01:00' OR end_time BETWEEN '10:10:00' AND '11:01:00'); ``` The `AND` operator in MySQL has higher precedence than the `OR` operator. S...
If you are given the times '10:10:00' and '11:01:00' and you want to know if anything overlaps with that period, then the logic is: ``` select b.* from usr_booking where shop_id = 21 and -- do not use single quotes for numeric constants (assuming `shop_id` is a number end_time > '10:10:00' and start_time...
12,996,365
I have coding below: ``` try{ address = "http://isbndb.com//api/books.xml? access_key=CKEHIG4D&index1=isbn&value1=" +barcode; URL url = new URL(address); URLConnection conn = url.openConnection(); DocumentBuilderF...
2012/10/21
[ "https://Stackoverflow.com/questions/12996365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1740540/" ]
Make sure you are importing the right Element class ([org.w3c.dom.Element](http://developer.android.com/reference/org/w3c/dom/Element.html)).
Change "LongTitle" --> "TitleLong" in ``` NodeList title = element.getElementsByTagName("LongTitle"); ```
56,630,969
I have one json file with 100 columns and I want to read all columns along with predefined datatype of two columns. I know that I could do this with schema option: ``` struct1 = StructType([StructField("npi", StringType(), True), StructField("NCPDP", StringType(), True) spark.read.json(path=abc.json, schema=struct1)...
2019/06/17
[ "https://Stackoverflow.com/questions/56630969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5219480/" ]
According to [official documentation](https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.DataFrameReader.json), schema can be either a `StructType` or a `String`. I can advice you 2 solutions : ### 1 - You use the schema of a dummy file If you have one light file with the same schema (ie o...
You can read all the data first and then convert the two columns in question: ``` df = spark.read.json(path=abc.json) df.withColumn("npi", df["npi"].cast("string"))\ .withColumn("NCPDP", df["NCPDP"].cast("string")) ```
3,945,342
I started building an app under an individual developer account. In preparing to beta and release this I'm switching over to a new company account. I'm trying to prepare a checklist of the things I will need to update in order to move the project over to the new account. * Install new development certificate and prof...
2010/10/15
[ "https://Stackoverflow.com/questions/3945342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296003/" ]
Here is my checklist in addition to your list: * Change Version of your app to 1.0 in case if this is your first time you submit the app. If it's an update make sure it has higher version number than the one on app store * Add Code Signing Entitlement file to the project * Remove debug code like NSLog * Build the App ...
Make sure to clear your Mac user account's Keychain of all old certificates (or use a different Mac User account), clear the Xcode Organizer of all old provisions and then quit and restart Xcode, and delete all old provisions off of your device (Edit: you can keep the old provisions if they are named differently and ar...
25,179,650
Is it good practice to declare object inside [`block scope`](http://msdn.microsoft.com/en-us/library/1t0wsc67.aspx) Condition ``` If item.DocType = 1 Then Dim objass As Assignment = DBFactory.GetAssignmentDB.AssignmentGetByID(vis.AssignmentID) End If ``` OR should i declare object outside t...
2014/08/07
[ "https://Stackoverflow.com/questions/25179650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1263981/" ]
That entirely depends on the scenario. If you want to use the variable within the condition only, then declare it inside the condition. If you want the variable to be used outside of the If statement, then it's scope must extend to outside the condition. There is no 'good practice' for all scenarios. Sometimes it'll ...
Normally it is good coding style to declare variables in the smalles scope they are used. I.e. in your example it depends if you want to access ´ass´ outside the if condition. - If you declare ´ass` inside it, you cannot access it outside.
246,823
*Prenote: I have asked this question first on [math stackexhange](https://math.stackexchange.com/questions/1882475/gauss-theorem-for-null-boundaries), but a user suggested that mathoverflow might be a better place for this question. Upon thinking about it I have agreed with him and copy-pasted the question here.* *Not...
2016/08/04
[ "https://mathoverflow.net/questions/246823", "https://mathoverflow.net", "https://mathoverflow.net/users/85500/" ]
Gauss' Theorem has nothing to do with the (pseudo-)metric. Is just a consequence of Stokes' theorem. Stokes's theorem says that, for any $n-1$ form $\omega$, $$ \int\_M d\omega = \int\_{\partial M} \omega. $$ Now fix any smooth measure $\mu$ (i.e. given by a smooth non-vanishing top dimensional form, or a density if...
Okay, as Futurologist pointed out, the decomposition $X=\langle X,N\rangle N+Y$ is incorrect. In fact, this was quite a rookie mistake. Instead, let $\{e\_1,...,e\_{n-1}\}=\{\partial/\partial y^1,...,\partial/\partial y^{n-1}\}$ be a positively oriented holonomic frame on $\partial M$, and let $N$ be a transversal alo...
15,024,035
I'm experiencing a very slow startup of gvim with tex files and the latex-suite plugin. For example, opening [this tex file](https://bitbucket.org/andrenarchy/funcall/raw/25d83535b4839ae1598a620b4cb7315a467ccc4b/funcall.tex) takes 7 seconds. A minimal .vimrc file only contains the following line: ``` filetype plugin o...
2013/02/22
[ "https://Stackoverflow.com/questions/15024035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219479/" ]
The reason for that error lies in the fact that you try to map a Set of plain Objects. Object is not a JPA-entity and therefore it cannot be mapped to a relational type. You'll need to create an entity named Occurence and map it the way you did it with the Set of Objects.
I think the problem is here mappedBy = "pk.chemicalStructure" Check that you have a ManyToOne relation in this class like: ``` @ManyToOne @JoinColumn(name = "chemicalstructure_id", nullable = false) @ForeignKey(name = "fk_chemicalstructure_id") private Occurence occurence; ``` then mappedBy = "occurence" The error ...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
I have two Prolific USB-to-serial adapters but they are made by different Vendors (one is Prolific, the other ATEN). I've used their supplied drivers just fine. Note that there are open source drivers for these devices too available here: <https://github.com/failberg/osx-pl2303> FYI my use case is actually patching th...
Just to be clear, **I have not used this device myself.** Stewart Cheshire, creator of ZeroConf (the basis of Bonjour), gave a Google Tech Talk on the subject of ZeroConf, and presented a couple of embedded devices (Cameras, and an RS-232 unit). I've always wanted to try this out, but have never had a good enough use...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
I have two Prolific USB-to-serial adapters but they are made by different Vendors (one is Prolific, the other ATEN). I've used their supplied drivers just fine. Note that there are open source drivers for these devices too available here: <https://github.com/failberg/osx-pl2303> FYI my use case is actually patching th...
I'm professionaly using a [Roline USB to Serial 0.3 m long adapter](http://shop.roline.com/roline_converter_cable_usb_to_serial_0_3_m/12.02.1089-20.html?t_Action=searchKatalog&t_SearchValue=&t_Sort=&manufacturer=&device=&t_Hier=&t_SubHier=&t_lager=&t_CatID=3078&t_ParentID=3077). I'm using the [PL2303 OSX driver](http:/...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
I have two Prolific USB-to-serial adapters but they are made by different Vendors (one is Prolific, the other ATEN). I've used their supplied drivers just fine. Note that there are open source drivers for these devices too available here: <https://github.com/failberg/osx-pl2303> FYI my use case is actually patching th...
Both Prolific PL2303 and FTDI devices work fine. I'm using a TrendNET TU-S9 v2 currently (PL-2303). Other than the vendor provided driver or driver from Prolific's Taiwan website, options include <https://www.mac-usb-serial.com> (fairly inexpensive driver), and the nice Mac app <https://www.decisivetactics.com/product...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
Just to be clear, **I have not used this device myself.** Stewart Cheshire, creator of ZeroConf (the basis of Bonjour), gave a Google Tech Talk on the subject of ZeroConf, and presented a couple of embedded devices (Cameras, and an RS-232 unit). I've always wanted to try this out, but have never had a good enough use...
I'm professionaly using a [Roline USB to Serial 0.3 m long adapter](http://shop.roline.com/roline_converter_cable_usb_to_serial_0_3_m/12.02.1089-20.html?t_Action=searchKatalog&t_SearchValue=&t_Sort=&manufacturer=&device=&t_Hier=&t_SubHier=&t_lager=&t_CatID=3078&t_ParentID=3077). I'm using the [PL2303 OSX driver](http:/...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
Just to be clear, **I have not used this device myself.** Stewart Cheshire, creator of ZeroConf (the basis of Bonjour), gave a Google Tech Talk on the subject of ZeroConf, and presented a couple of embedded devices (Cameras, and an RS-232 unit). I've always wanted to try this out, but have never had a good enough use...
Both Prolific PL2303 and FTDI devices work fine. I'm using a TrendNET TU-S9 v2 currently (PL-2303). Other than the vendor provided driver or driver from Prolific's Taiwan website, options include <https://www.mac-usb-serial.com> (fairly inexpensive driver), and the nice Mac app <https://www.decisivetactics.com/product...
9,648
I have various devices to connect to my iMac using good-old RS-232. Of course, I only have USB connectors on my machine. I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support. What is the most-stable, best-suppor...
2011/03/05
[ "https://apple.stackexchange.com/questions/9648", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1794/" ]
I'm professionaly using a [Roline USB to Serial 0.3 m long adapter](http://shop.roline.com/roline_converter_cable_usb_to_serial_0_3_m/12.02.1089-20.html?t_Action=searchKatalog&t_SearchValue=&t_Sort=&manufacturer=&device=&t_Hier=&t_SubHier=&t_lager=&t_CatID=3078&t_ParentID=3077). I'm using the [PL2303 OSX driver](http:/...
Both Prolific PL2303 and FTDI devices work fine. I'm using a TrendNET TU-S9 v2 currently (PL-2303). Other than the vendor provided driver or driver from Prolific's Taiwan website, options include <https://www.mac-usb-serial.com> (fairly inexpensive driver), and the nice Mac app <https://www.decisivetactics.com/product...
14,082,113
I didnt quite understand whats is the `effect.World` and `effect.View` etc. and why we put the matricies in them? ``` foreach (ModelMesh mesh in model1.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = Matrix.CreateWorld(Vector3.Zero, Vector3.Forwar...
2012/12/29
[ "https://Stackoverflow.com/questions/14082113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1673384/" ]
effect.World is not a matrix representing the world. It is a matrix representing a 3d object's (mesh, model) position and orientation relative to the 3d game world. Each object will have a different effect.World matrix if they are positioned differently &/or pointed differently. effect.View is a matrix that represents...
From MSDN; [`BasicEffect.World`](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.basiceffect.world.aspx) > > Gets or sets the world matrix. **Use this matrix to change the position > of the model, using world coordinates**. > > > [`BasicEffect.View`](http://msdn.microsoft.com/en-us/libr...
10,701,393
Should an HTML email message begin like any valid HTML-document and should it even have a DOCTYPE declaration?
2012/05/22
[ "https://Stackoverflow.com/questions/10701393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92063/" ]
HTML emails should include a doctype, html and body declaration if you intend to do anything fancy at all. There are a multitude of guides on this subject which can help you learn how to properly code HTML Email, but most of them disregard the specifics of a doctype, which is how I stumbled on your question. I sugges...
No, since most email clients strip out the `<html>` and `<body>` tags and replace them with their own (see hotmail). As for the doctype, see: <http://www.campaignmonitor.com/blog/post/3317/correct-doctype-to-use-in-html-email/> Assuming you're using a table for your layout (you should be) you'd have one all encompass...
10,701,393
Should an HTML email message begin like any valid HTML-document and should it even have a DOCTYPE declaration?
2012/05/22
[ "https://Stackoverflow.com/questions/10701393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92063/" ]
HTML emails should include a doctype, html and body declaration if you intend to do anything fancy at all. There are a multitude of guides on this subject which can help you learn how to properly code HTML Email, but most of them disregard the specifics of a doctype, which is how I stumbled on your question. I sugges...
Mail clients **are not** web-browsers. They support a small subset of HTML and almost every client behaves differently parsing those HTML elements. Therefore elements like `html`, `head`, `body` or `DOCTYPE` are irrelevant and usually discarded by the mail client. From Wikipedia: > > HTML mail allows the sender to p...
33,302,235
I have a problem with reading from .xlsx (Excel) file. I tried to use: ``` var fileName = @"C:\automated_testing\ProductsUploadTemplate-2015-10-22.xlsx"; var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName); var adapter = new OleDbDataAdap...
2015/10/23
[ "https://Stackoverflow.com/questions/33302235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3146582/" ]
If you are reading data from `Excel` file, you can use `EPPlus` NuGet package, and use following code: ``` //using OfficeOpenXml; using (ExcelPackage xlPackage = new ExcelPackage(new FileInfo(@"C:\YourDirectory\sample.xlsx"))) { var myWorksheet = xlPackage.Workbook.Worksheets.First(); //select sheet here var t...
Reading Excel files with OLE provider is possible only if MS Jet engine (MS Access) is installed. I noticed that you decided to use .NET interop to API but this is not a good idea: it requires installed MS Excel and doesn't recommended to use for automation on servers. If you don't need to support old (binary) Excel ...
55,691,091
[![error](https://i.stack.imgur.com/Uw9j2.jpg)](https://i.stack.imgur.com/Uw9j2.jpg) I am trying to transfer some text files on SFTP Server using Putty command line option. I have a batch file with the following commands: ``` ( echo cd /inbox echo mput c:\temp\*.txt echo bye echo cd c:\temp\ echo del c:\temp\*.txt )...
2019/04/15
[ "https://Stackoverflow.com/questions/55691091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6089571/" ]
You don't need to make 2 connections to the db for getting the same data. You could create a collection of objects and use them in place like such... ``` <?php $arr = []; $sql = "SELECT category.name as cat, article.name as art from category JOIN article ON category.id = article.id"; $query = mysqli_query($...
You can prepare the strings that will hold the `<option>` in 1 loop, then simply echo them. In example : ``` <?php $sql = "SELECT category.name as cat, article.name as art FROM category JOIN article ON category.id = article.id"; $query = mysqli_query($conn, $sql); $articles = "...
9,942,275
I'm working with two-dimensional array-values that should be inserted into a ArrayList. But this is done in a for-loop and the value of the two-dimensional array-value gets changed as the loop runs since it is just used as an temp-variable (which makes all of the variables stored in the ArrayList gets changed as this v...
2012/03/30
[ "https://Stackoverflow.com/questions/9942275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255810/" ]
The problem is the way Array is added to the Object here. You are not adding the Array to the Object. What is happening is you are adding the address to the location in memory where the Array resides. So every time you add the Array to the Object, you are adding the same address every time. So every Array in the Object...
You need to use array's `clone()` method to make its copy: ``` //for example int[][] copy = (int[][])arraySource.clone(); ```
9,942,275
I'm working with two-dimensional array-values that should be inserted into a ArrayList. But this is done in a for-loop and the value of the two-dimensional array-value gets changed as the loop runs since it is just used as an temp-variable (which makes all of the variables stored in the ArrayList gets changed as this v...
2012/03/30
[ "https://Stackoverflow.com/questions/9942275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255810/" ]
At the end each add needs to create an own object. To use **clone** is one way. Or to add always the values in pairs, in an other. A totally different way is to use serialization. This make sense when you do not want to calculate this values but to log it. In this case you need an outputStream What is best is defin...
You need to use array's `clone()` method to make its copy: ``` //for example int[][] copy = (int[][])arraySource.clone(); ```
9,942,275
I'm working with two-dimensional array-values that should be inserted into a ArrayList. But this is done in a for-loop and the value of the two-dimensional array-value gets changed as the loop runs since it is just used as an temp-variable (which makes all of the variables stored in the ArrayList gets changed as this v...
2012/03/30
[ "https://Stackoverflow.com/questions/9942275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255810/" ]
The problem is the way Array is added to the Object here. You are not adding the Array to the Object. What is happening is you are adding the address to the location in memory where the Array resides. So every time you add the Array to the Object, you are adding the same address every time. So every Array in the Object...
At the end each add needs to create an own object. To use **clone** is one way. Or to add always the values in pairs, in an other. A totally different way is to use serialization. This make sense when you do not want to calculate this values but to log it. In this case you need an outputStream What is best is defin...
25,668,796
I'm trying to make a function that changes a char array from the main function, that's what I'm trying to do: ``` #include <stdlib.h> #include <stdio.h> #include <conio.h> void change(char *a); int main() { char a[] = "hello"; printf("\na = %s", a); change(a); printf("%\na = %s", a); getch(); } ...
2014/09/04
[ "https://Stackoverflow.com/questions/25668796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3174594/" ]
The main problem is that you are sending a copy of the char pointer a by doing this: ``` void change(char *a) { a = "goodbye"; } ``` if you want to change a value in another function you should do this: ``` #include <stdlib.h> #include <stdio.h> #include <conio.h> void change(char **a); int main() { char ...
I changed the function, now it works, this way: ``` void change(char *a) { strcpy(a, "goodbye"); } ```
25,668,796
I'm trying to make a function that changes a char array from the main function, that's what I'm trying to do: ``` #include <stdlib.h> #include <stdio.h> #include <conio.h> void change(char *a); int main() { char a[] = "hello"; printf("\na = %s", a); change(a); printf("%\na = %s", a); getch(); } ...
2014/09/04
[ "https://Stackoverflow.com/questions/25668796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3174594/" ]
Several problems with this code, but first we need to take a step back and talk about how arrays are handled in C. Except when it is the operand of the `sizeof` or unary `&` operators, or is a string literal used to initialize another array in a declaration, an expression of type "N-element array of `T`" will be conve...
The main problem is that you are sending a copy of the char pointer a by doing this: ``` void change(char *a) { a = "goodbye"; } ``` if you want to change a value in another function you should do this: ``` #include <stdlib.h> #include <stdio.h> #include <conio.h> void change(char **a); int main() { char ...
25,668,796
I'm trying to make a function that changes a char array from the main function, that's what I'm trying to do: ``` #include <stdlib.h> #include <stdio.h> #include <conio.h> void change(char *a); int main() { char a[] = "hello"; printf("\na = %s", a); change(a); printf("%\na = %s", a); getch(); } ...
2014/09/04
[ "https://Stackoverflow.com/questions/25668796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3174594/" ]
Several problems with this code, but first we need to take a step back and talk about how arrays are handled in C. Except when it is the operand of the `sizeof` or unary `&` operators, or is a string literal used to initialize another array in a declaration, an expression of type "N-element array of `T`" will be conve...
I changed the function, now it works, this way: ``` void change(char *a) { strcpy(a, "goodbye"); } ```
67,481,013
I am using react-select with styled component and it is working but I want to use tailwind classes using twin macro. ``` import tw from 'twin.macro'; import styled from 'styled-components'; import Select from 'react-select'; export const StyledReactSelect = styled(Select)(() => [ ` .Select__control { height: 4...
2021/05/11
[ "https://Stackoverflow.com/questions/67481013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2585973/" ]
When you define a Coroutine, eg; ```cs using System.Collections; public class C { private void before() { } private void after() { } public IEnumerator MyCoroutine() { before(); yield return null; after(); } } ``` The compiler defines a new type to track the state of the m...
Unity doesn't have anything built in to support this. So, let's go over what saving a coroutine entails. A started & incomplete coroutine has local variables, a yield instruction that they are currently at. And the yield that they are currently at may instantiate an anonymous `YieldInstruction`. So, if you would want...
40,142,675
The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order. For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6). Is there something I am missing? ``` public static<E ext...
2016/10/19
[ "https://Stackoverflow.com/questions/40142675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5900887/" ]
In order to perform a merge, you need to peek at the next value, so see which next value to use. Eventually, one of the lists will run out of values before the other, so you need to check for that. One trick is to use `null` as an End-Of-Data marker, assuming that lists cannot contain `null` values, which is a fair a...
I'm going to assume you intended something like this with your use of `PushbackIterator`: ``` while (aIter.hasNext() && bIter.hasNext()) { E aElem = aIter.next(); E bElem = bIter.next(); if (aElem.compareTo(bElem) <= 0) { result.add(aElem); bIter.pushback(bElem); } else { result...
40,142,675
The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order. For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6). Is there something I am missing? ``` public static<E ext...
2016/10/19
[ "https://Stackoverflow.com/questions/40142675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5900887/" ]
In order to perform a merge, you need to peek at the next value, so see which next value to use. Eventually, one of the lists will run out of values before the other, so you need to check for that. One trick is to use `null` as an End-Of-Data marker, assuming that lists cannot contain `null` values, which is a fair a...
Same approach of merging 2 arrays can also be used with iterators tweaking a little bit. you can use adding elements instead of printing if needed. ``` static void printItr(Iterator<String> it1, Iterator<String> it2) { String firstString=null,secondString = null; boolean moveAheadIt1 = true, moveAheadIt2 = tru...