forked from sheetjs/docs.sheetjs.com
		
	idb
This commit is contained in:
		
							parent
							
								
									aa59cc10ad
								
							
						
					
					
						commit
						04083d4d1e
					
				| @ -89,7 +89,7 @@ class SheetJSFlutterState extends State<SheetJSFlutter> { | ||||
| 
 | ||||
| #### Running SheetJS Scripts | ||||
| 
 | ||||
| Since fetching assets is asychronous, it is recommended to create a wrapper | ||||
| Since fetching assets is asynchronous, it is recommended to create a wrapper | ||||
| `async` function and sequentially await each script: | ||||
| 
 | ||||
| ```dart | ||||
| @ -158,8 +158,6 @@ The iOS simulator runs iOS 16.2 on an iPhone 14 Pro Max. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| ### Base Project | ||||
| 
 | ||||
| 1) Disable telemetry. | ||||
| 
 | ||||
| ```bash | ||||
|  | ||||
| @ -182,7 +182,8 @@ The following Web APIs are featured in separate demos: | ||||
|   return (<li style={listyle} {...(item.customProps?.class ? {className: item.customProps.class}: {})}> | ||||
|     <a href={item.href}>{item.label}</a>{item.customProps?.summary && (" - " + item.customProps.summary)} | ||||
|   </li>); | ||||
| })}</ul> | ||||
| })} | ||||
| <li><a href="/docs/demos/local/indexeddb">IndexedDB API</a></li></ul> | ||||
| 
 | ||||
| ### SQL Databases | ||||
| 
 | ||||
|  | ||||
| @ -3,12 +3,12 @@ title: IndexedDB API | ||||
| pagination_prev: demos/desktop/index | ||||
| pagination_next: demos/local/index | ||||
| sidebar_custom_props: | ||||
|   type: web | ||||
|   summary: Reading and writing data in browser storage | ||||
| --- | ||||
| 
 | ||||
| <head> | ||||
|   <script type="text/javascript" src="https://unpkg.com/localforage@1.10.0/dist/localforage.min.js"></script> | ||||
|   <script type="text/javascript" src="https://unpkg.com/dexie@3.2.3/dist/dexie.js"></script> | ||||
|   <script type="text/javascript" src="https://unpkg.com/dexie@3.2.4/dist/dexie.js"></script> | ||||
| </head> | ||||
| 
 | ||||
| :::warning | ||||
| @ -20,6 +20,10 @@ in production applications. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| The IndexedDB API provides an in-browser sandboxed local data store for JSON | ||||
| objects. Like the [Local Storage API](/docs/demos/data/storageapi), IndexedDB is | ||||
| a popular choice for offline storage. | ||||
| 
 | ||||
| ## Wrapper Libraries | ||||
| 
 | ||||
| A number of popular wrapper libraries seek to simplify IndexedDB operations. | ||||
| @ -35,7 +39,7 @@ production sites. | ||||
| 
 | ||||
| :::note | ||||
| 
 | ||||
| This demo was last tested on 2023 February 26 with `localForage` 1.10.0 | ||||
| This demo was last tested on 2023 June 1 with `localForage` 1.10.0 | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -102,7 +106,7 @@ function SheetJSLocalForage() { | ||||
| 
 | ||||
| :::note | ||||
| 
 | ||||
| This demo was last tested on 2023 February 26 with DexieJS 3.2.3 | ||||
| This demo was last tested on 2023 June 1 with DexieJS 3.2.4 | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| @ -227,7 +231,3 @@ function SheetJSDexieExport() { | ||||
|   return ( <pre><button onClick={xport}><b>Do it!</b></button></pre> ); | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ### AlaSQL | ||||
| 
 | ||||
| [AlaSQL](/docs/demos/data/alasql) ships with an IndexedDB backend. | ||||
| @ -19,7 +19,7 @@ TensorFlow.js and other ML libraries. | ||||
| 
 | ||||
| :::note | ||||
| 
 | ||||
| Live code blocks in this page load the standalone build from version `3.18.0`. | ||||
| Live code blocks in this page load the standalone build from version `4.6.0`. | ||||
| 
 | ||||
| For use in web frameworks, the `@tensorflow/tfjs` module should be used. | ||||
| 
 | ||||
| @ -46,11 +46,15 @@ function worksheet_to_csv_url(worksheet) { | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| [This demo mirrors `TFjs` docs](https://js.tensorflow.org/api/latest/#data.csv), | ||||
| fetching [an XLSX export of the example dataset](https://sheetjs.com/data/bht.xlsx). | ||||
| 
 | ||||
| <details><summary><b>TF CSV Demo using XLSX files</b> (click to show)</summary> | ||||
| 
 | ||||
| This demo shows a simple model fitting using the "Boston Housing" dataset. The | ||||
| [sample XLSX file](https://sheetjs.com/data/bht.xlsx) contains the data. | ||||
| 
 | ||||
| The demo first fetches the XLSX file and generates CSV text. A blob URL is | ||||
| generated and fed to `tf.data.csv`.  The rest of the demo follows the official | ||||
| example in the TensorFlow documentation. | ||||
| 
 | ||||
| :::caution | ||||
| 
 | ||||
| If the live demo shows a message | ||||
| @ -96,7 +100,7 @@ function SheetJSToTFJSCSV() { | ||||
|     }}}); | ||||
|     model.summary(); | ||||
|   }); | ||||
|   return ( <pre><b><a href="https://js.tensorflow.org/api/latest/#data.csv">Original CSV demo</a></b><br/><br/> | ||||
|   return ( <pre> | ||||
|     <button onClick={doit}>Click to run</button> | ||||
|     {output} | ||||
|   </pre> ); | ||||
|  | ||||
| @ -18,7 +18,7 @@ run in the web browser, demos will include interactive examples. | ||||
| - [`Local File Access`](/docs/demos/local/file) | ||||
| - [`LocalStorage and SessionStorage`](/docs/demos/data/storageapi) | ||||
| - [`Web SQL Database`](/docs/demos/data/websql) | ||||
| - [`IndexedDB`](/docs/demos/data/indexeddb) | ||||
| - [`IndexedDB`](/docs/demos/local/indexeddb) | ||||
| 
 | ||||
| ### Web Frameworks | ||||
| 
 | ||||
|  | ||||
| @ -216,6 +216,7 @@ const config = { | ||||
|         /* local */ | ||||
|         { from: '/docs/demos/clipboard', to: '/docs/demos/local/clipboard/' }, | ||||
|         { from: '/docs/demos/localfile', to: '/docs/demos/local/file/' }, | ||||
|         { from: '/docs/demos/data/indexeddb', to: '/docs/demos/local/indexeddb/' }, | ||||
|         /* desktop */ | ||||
|         { from: '/docs/demos/cli', to: '/docs/demos/desktop/cli/' }, | ||||
|         { from: '/docs/getting-started/demos/cli', to: '/docs/demos/desktop/cli/' }, | ||||
|  | ||||
							
								
								
									
										4
									
								
								docz/static/tfjs/tf.min.js
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										4
									
								
								docz/static/tfjs/tf.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user