标签: store

带有ExtJS 4商店的HTTP标头

我已经有几家店铺实现了.但在某个时刻,我会在所有这些中添加HTTP标头.我怎么能用ExtJS 4做到这一点?

extjs store http-headers extjs4

7
推荐指数
1
解决办法
6774
查看次数

将多个选择选项存储到PHP数组中

我有一个选择框列表是否可以选择多个选项:

<select name="access_list[ ]" size="7" multiple="multiple">
<?php $res=mysql_query("select * from list" ,$conn);
while($row=mysql_fetch_assoc($res))
echo"<option value=".$row['id'].">".$row['name']."</option>";?>
</select>
Run Code Online (Sandbox Code Playgroud)

如何选择的值(一起选择多个值)可以存储在数组中.我想这会为每个订单做吗?

php arrays select store options

7
推荐指数
2
解决办法
3万
查看次数

ExtJs模型代理与商店代理

好吧,我坚持认为应该是ExtJs中的基本任务.我正在编写一个简单的登录脚本,它将用户名和密码组合发送到RESTful Web服务,如果凭据正确,则会收到GUID.

我的问题是,我使用模型代理还是商店代理?

据我所知,Models表示单个记录,而Stores用于处理包含多个记录的数据集.如果这是正确的,那么看起来模型代理就是要走的路.

根据Sencha在http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Model上的文档,代码看起来像这样:

Ext.define('AuthenticationModel', {
    extend: 'Ext.data.Model',
    fields: ['username', 'password'],

    proxy: {
        type: 'rest',
        url : '/authentication'
    }
});

//get a reference to the authentication model class
var AuthenticationModel = Ext.ModelManager.getModel('AuthenticationModel');
Run Code Online (Sandbox Code Playgroud)

到目前为止一切正常,直到下一步:

//Use the configured RestProxy to make a GET request
AuthenticationModel.load('???', {
    success: function(session) {
        console.log('Login successful');
    }
});
Run Code Online (Sandbox Code Playgroud)

Model类的load()方法是一个期望单个唯一标识符的静态调用.登录通常取决于两个因素,用户名和密码.

因此,似乎存储代理是在ExtJS中验证某人的用户名和密码凭证组合的唯一方法.有人可以验证和解释吗?任何帮助理解这一点将不胜感激.

model extjs store restful-authentication extjs4

7
推荐指数
1
解决办法
7297
查看次数

javamail - store.close() 对打开的文件夹有影响吗?

我正在使用 javamail 建立与 gmail 的 IMAP 连接。一切正常。我只是想防止滥用服务器内存。

我的问题是:当我关闭商店时会发生什么?[store.close();] 是否关闭所有打开的文件夹?必须关闭所有文件夹吗?

如果我将特定文件夹保持打开状态,则会带来巨大的速度优势。

imap store jakarta-mail

6
推荐指数
1
解决办法
3061
查看次数

ExtJS等待多个商店加载

我将如何等待多个商店加载?我有一个案例,我需要在加载两个不同的商店时做一些工作,所以使用store.on("load", fn)一个商店是不够的.

javascript extjs store extjs4

6
推荐指数
2
解决办法
1万
查看次数

如何在Core Data中存储来自NSMutable Array的数据?

我正在制作的应用程序Polyline根据用户坐标绘制CLLocationManager(这些都保存在一起NSMutableArray)

当应用关闭时,当前折线消失.如何在应用程序启动时存储要在CoreData中检索的点数组?用户在启动应用程序后所采取的所有过去"路线"应该被恢复并覆盖在地图上(这可能相当多,因此CoreData似乎是我收集的最佳选择).

这是我用来从加载的坐标创建MKPolyline的代码

-(IBAction)didClickLoadCoordinates:(id)sender {
// get a reference to the appDelegate so you can access the global managedObjectContext
AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;

NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"Route"];
NSError *error;
id results = [appDelegate.managedObjectContext executeFetchRequest:request error:&error];

if ([results count]) {
    polyLine = (Route *)(results[0]);
    NSArray *coordinates = polyLine.coordinates;
    int ct = 0;
    for (CLLocation *loc in coordinates) {
        NSLog(@"location %d: %@", ct++, loc);


    }


    // this copies the array to your mutableArray …
Run Code Online (Sandbox Code Playgroud)

store core-data nsmutablearray persist polyline

6
推荐指数
1
解决办法
1万
查看次数

Python:在列表中存储多个数据帧

我有一个循环读取文档中的 Excel 工作表。我想将它们全部存储在一个列表中:

  DF_list= list()

  for sheet in sheets:
     df= pd.read_excel(...)
     DF_list = DF_list.append(df)
Run Code Online (Sandbox Code Playgroud)

如果我输入:

[df df df df]
Run Code Online (Sandbox Code Playgroud)

有用。

抱歉,我有 Matlab 背景,不太习惯 Python,但我喜欢它。谢谢。

python store list dataframe pandas

6
推荐指数
3
解决办法
5万
查看次数

Found non-callable @@iterator in reactjs store

TypeError: Found non-callable @@iterator

const  middelware ={thunk};
 const Store = createStore(
      rootReducer,initialState, compose(
          applyMiddleware(...middelware),
           window.devToolsExtension ? window.devToolsExtension() : f=> f

const  middelware ={thunk};
 const Store = createStore(
      rootReducer,initialState, compose(
          applyMiddleware(...middelware),
           window.devToolsExtension ? window.devToolsExtension() : f=> f
Run Code Online (Sandbox Code Playgroud)

javascript store reactjs

6
推荐指数
1
解决办法
1万
查看次数

使用 $ 符号访问 svelte 存储会导致引用错误

我有一个store.js文件,其内容是:

\n
import { writable } from 'svelte/store';\nexport  const generateds = writable(0);\n\nconsole.log("generateds", $generateds)\n
Run Code Online (Sandbox Code Playgroud)\n

每次我尝试访问 $ generateds (在此文件内部或外部)时,我都会收到此错误:

\n
Uncaught ReferenceError: $generateds is not defined\n    at stores.js:4\n    at main.js:6\n
Run Code Online (Sandbox Code Playgroud)\n

当我在新项目中使用store时,没有问题。我找不到我当前项目的问题所在。

\n

这是我正在使用的 npm 包的列表:

\n
\xe2\x94\x80\xe2\x94\x80 @fortawesome/free-solid-svg-icons@5.14.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @material/layout-grid@7.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @mdi/js@5.9.55\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @rollup/plugin-commonjs@17.1.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @rollup/plugin-node-resolve@11.2.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/button@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/card@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/drawer@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/fab@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/icon-button@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/list@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/select@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/textfield@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @smui/top-app-bar@1.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 @sveltejs/svelte-virtual-list@3.0.1\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 autoprefixer@9.8.6\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dropzone@5.7.2\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 eslint-plugin-svelte3@2.7.3\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 eslint@7.9.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 firebase@7.24.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 firestore-export-import@0.10.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 mathlive@0.59.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 node-sass@4.14.1\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 postcss@8.2.6\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 query-string@6.13.2\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-analyzer@4.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-css-only@3.1.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-livereload@2.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-postcss@4.0.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-sass@1.2.2\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-svelte@7.1.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup-plugin-terser@7.0.2\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 rollup@2.39.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 sass@1.32.7\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 sirv-cli@1.0.11\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte-fa@2.1.1\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte-loading-spinners@0.1.1\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte-materialify@0.3.5\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte-preprocess@4.6.9\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte-routing@1.5.0\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 svelte@3.32.3\n …
Run Code Online (Sandbox Code Playgroud)

store svelte

6
推荐指数
1
解决办法
2950
查看次数

将 Pinia 与 Vue.js Web 组件结合使用

问题已更新

我正在尝试将Pinia的商店与使用Vue.js创建的 Web 组件一起使用,但控制台中出现以下错误:

[Vue 警告]:在 <HelloWorld.ce msg="message"> 处找不到注入“Symbol(pinia)”

我有一个非常简单的例子。

  1. 主要.ts
import { defineCustomElement } from 'vue'
import HelloWorld from './components/HelloWorld.ce.vue'

const ExampleElement = defineCustomElement(HelloWorld)
customElements.define('hello-world', ExampleElement)
Run Code Online (Sandbox Code Playgroud)
  1. 商店.ts
import { defineStore, createPinia, setActivePinia } from "pinia";

setActivePinia(createPinia());

export const useCounterStore = defineStore('counter', {
  state: () => ({
    counter: 0,
  }),

  actions: {
    increment() {
      this.counter++;
    },
  },
});
Run Code Online (Sandbox Code Playgroud)
  1. HelloWorld.ce.vue
<script setup lang="ts">
import { ref } from 'vue'
import { useCounterStore } from '../store.ts'

defineProps<{ msg: string …
Run Code Online (Sandbox Code Playgroud)

store web-component vue.js vue-component pinia

6
推荐指数
1
解决办法
1514
查看次数