states

Tiger/Lines or shapefiles of USA states and cities?

时光毁灭记忆、已成空白 提交于 2019-12-18 12:02:46
问题 i've been asked to generate some demographic reports (crime rates, birth/deaths, etc) based on state and cities for the USA. I have all the demographic data (provided by our client) but can't seem to find any places which have the boundaries (read: LAT/LONG's) of the USA States and their cities. Our data are Lat/Long points of data (eg. a crime, a birth, etc) and we want to get some mapped reports and also datamine using Sql server (we're using MS Sql 2008, but that shouldn't impact this

Disable some states if specific products are in cart in Woocommerce

拜拜、爱过 提交于 2019-12-12 23:10:19
问题 Using woocommerce, I managed to change the states to the counties here in Ireland, including the following code in the function.php function wc_ie_counties_add_counties( $states ) { $states['IE'] = array( 'Carlow' => 'Carlow', 'Cavan' => 'Cavan', 'Clare' => 'Clare', 'Cork' => 'Cork', 'Donegal' => 'Donegal', 'Dublin' => 'Dublin', 'Galway' => 'Galway', 'Kerry' => 'Kerry', 'Kildare' => 'Kildare', 'Kilkenny' => 'Kilkenny', 'Laois' => 'Laois', 'Leitrim' => 'Leitrim', 'Limerick' => 'Limerick',

regular expression to convert state names to abbreviations

萝らか妹 提交于 2019-12-11 16:34:12
问题 I'm working on a project that requires only the use of regular expression to convert state names (must be case insensitive) to their two letter abbreviations. I cannot use any sort of development environment or link to any databases or xml or ini files. Please help! 回答1: Since states don't have something regular in them regular expressions is the WRONG tool. I would suggest getting a new project. However, the only solution (apart from stupid illogical hacks) is to hardcore every state: s

woocommerce exclude state free shipping (australian states)

我只是一个虾纸丫 提交于 2019-12-11 10:03:46
问题 I'm trying to implement woocommerces exclude states from free shipping (Australian Site) snippet but am running into this error: 'Fatal error: Call to a member function get_shipping_state() on a non-object in /home/bpcsport/public_html/wp-content/plugins/wa-exclude/wa-exclude.php on line 30' My client needs to exclude Western Australia from the free-shipping deal they offer through woocommerce. I get the error either way if I put it in my themes function.php or via plug-in format. I've also

tf.nn.dynamic_rnn

和自甴很熟 提交于 2019-12-09 20:55:19
将一个序列编码为一个向量。输入一批固定长度的特征向量序列(三维),输出整个序列的特征表示: 函数原型为: tf.nn.dynamic_rnn(cell, inputs,sequence_length=None,initial_state=None, dtype=None, parallel_iterations=None,swap_memory=False,time_major=False,scope=None) 其中: cell:单个rnn单元,RNNCell的实例,可以是rnn,LSTM等 input:输入,三维张量 time_major:输入和输出张量每一维的含义,默认为False,则认为输入的是[batch_size,max_time,input_size]的张量,当设置为True时,则认为输入的是[max_time,batch_size,input_size]的张量 initial_state:初始状态 sequence_length:如果当前时间步的index超过该序列的实际长度时,则该时间步不进行计算,RNN的state复制上一个时间步的,同时该时间步的输出全部为零。所以要想得到正确的符合序列本身长度的输出,还要经过一步tf.gather_nd(参见 https://blog.csdn.net/Hello_word5/article/details/103464426

vue心得

[亡魂溺海] 提交于 2019-12-08 22:38:30
关于条件渲染: 如果是逻辑值作为条件的话,用下面这种方式: 这里 item.enabled 取值为 true 或者 false <td> <span v-if="!item.enabled" class="badge badge-success">空闲</span> <span v-else class="badge badge-danger">占用</span> </td> 如果是普通值作为条件的话,用下面这种方式: <td> <span v-if="item.states=='激活'" class="badge badge-success">{{item.states}}</span> <span v-else="item.states=='禁用'" class="badge badge-danger">{{item.states}}</span> </td> 来源: https://www.cnblogs.com/lyjblogg/p/12008369.html

How to understand the state type in Haskell's ST monad

帅比萌擦擦* 提交于 2019-12-06 06:04:50
问题 Jones and Launchbury described in their paper "Lazy Functional State Threads" the ST monad. To ensure that mutable variables can't be used outside the context (or "thread") they have been created in, they use special types, including one of higher rank. Here four important examples: newVar :: ∀ s a. a -> ST s (MutVar s a) readVar :: ∀ s a. MutVar s a -> ST s a writeVar :: ∀ s a. MutVar s a -> a -> ST s () runST :: ∀ a. (∀ s. ST s a) -> a In order to get the idea behind that construction I

Spring Boot 2.x实战之StateMachine

梦想与她 提交于 2019-12-04 05:02:23
本文首发于个人网站: Spring Boot 2.x实战之StateMachine Spring StateMachine是一个状态机框架,在Spring框架项目中,开发者可以通过简单的配置就能获得一个业务状态机,而不需要自己去管理状态机的定义、初始化等过程。今天这篇文章,我们通过一个案例学习下Spring StateMachine框架的用法。 案例介绍 假设在一个业务系统中,有这样一个对象,它有三个状态:草稿、待发布、发布完成,针对这三个状态的业务动作也比较简单,分别是:上线、发布、回滚。该业务状态机如下图所示。 实战 接下来,基于上面的业务状态机进行Spring StateMachine的演示。 创建一个基础的Spring Boot工程,在主pom文件中加入Spring StateMachine的依赖: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0

How to inherit states with mxml?

梦想与她 提交于 2019-12-04 02:41:11
I have the following panel component called AdvancedPanel with controlBarContent: <!-- AdvancedPanel.mxml --> <s:Panel> <s:states> <s:State name="normal" /> <s:State name="edit" /> </s:states> <s:controlBarContent> <s:Button includeIn="edit" label="Show in edit" /> <s:Button label="Go to edit" click="{currentState='edit'}" /> </s:controlBarContent> </s:Panel> I created a second panel, called CustomAdvancedPanel based on the AdvancedPanel since I don't want to redeclare the controlBarContent <!-- CustomAdvancedPanel.mxml --> <local:AdvancedPanel> <s:Button includeIn="edit" label="Extra edit

【Unity】编辑器小教程

我与影子孤独终老i 提交于 2019-12-03 14:02:41
写在前面 Unity最强大的地方之一是它扩展性非常强的编辑器。Unite Europe 2016上有一个视频专门讲编辑器编程的: https://www.youtube.com/watch?v=9bHzTDIJX_Q 这里大概记录一下里面的关键点。 场景一 关注点 : 绘制重要区域,Gizmos.DrawXXX OnDrawGizmos和OnDrawGizmosSelected回调函数 点击Gizmos按钮就可以在Game视图也看到线框了 // OnDrawGizmos()会在编辑器的Scene视图刷新的时候被调用 // 我们可以在这里绘制一些用于Debug的数据 void OnDrawGizmos() { Gizmos.color = new Color( 1f , 0f , 0f , 1f ); Gizmos.DrawWireCube( transform.position + BoxCollider.center, BoxCollider.size ); Gizmos.color = new Color( 1f , 0f , 0f , 0.3f ); Gizmos.DrawCube( transform.position + BoxCollider.center, BoxCollider.size ); } // OnDrawGizmosSelect(