hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
08d1b39122b0cb341e488970965dec566275079d
208
kt
Kotlin
helper/stuntman/src/main/java/com/lukevanoort/stuntman/SMView.kt
lvanoort/Cellarmanapp
138cd4d7f3f42fbdd36b7535c5f6c39930ae8988
[ "Apache-2.0" ]
null
null
null
helper/stuntman/src/main/java/com/lukevanoort/stuntman/SMView.kt
lvanoort/Cellarmanapp
138cd4d7f3f42fbdd36b7535c5f6c39930ae8988
[ "Apache-2.0" ]
null
null
null
helper/stuntman/src/main/java/com/lukevanoort/stuntman/SMView.kt
lvanoort/Cellarmanapp
138cd4d7f3f42fbdd36b7535c5f6c39930ae8988
[ "Apache-2.0" ]
null
null
null
package com.lukevanoort.stuntman interface SMView<S: Any, T : SMViewModel<S, Any>> { abstract fun bindViewModel(vm : T) abstract fun setState(state: S) abstract fun unbindViewModel() }
23.111111
52
0.682692
90e841729f848d63186b5e3ef88cd615c203ffdb
2,467
py
Python
crawler/grabber/__init__.py
bmwant/chemister
fbefcc9f548acc69966b6fbe19c4486f471fb390
[ "MIT" ]
null
null
null
crawler/grabber/__init__.py
bmwant/chemister
fbefcc9f548acc69966b6fbe19c4486f471fb390
[ "MIT" ]
1
2020-04-29T23:35:21.000Z
2020-04-29T23:35:21.000Z
crawler/grabber/__init__.py
bmwant/chemister
fbefcc9f548acc69966b6fbe19c4486f471fb390
[ "MIT" ]
null
null
null
""" Grab information needed from a resource and store it. """ import asyncio from abc import ABC, abstractmethod from datetime import datetime from utils import get_logger, get_date_cache_key from crawler.models.bid import ( insert_new_bid, get_bid_by_signature, ) from crawler.models.resource import Resource class BaseGrabber(ABC): def __init__(self, resource: Resource, *, fetcher=None, parser=None, cache=None, engine=None): self.resource = resource self.fetcher = fetcher self.parser = parser self.cache = cache self.engine = engine self.logger = get_logger(self.__class__.__name__.lower()) self._exception = None def __str__(self): return 'Grabber[{}] for resource [{}]'.format( self.__class__.__name__, self.name ) @property def name(self): return self.resource.name @property def urls(self): return self.resource.urls def _save_exception(self, fut): self._exception = fut.exception() def __await__(self): fut = asyncio.ensure_future(self.update()) fut.add_done_callback(self._save_exception) return fut.__await__() async def close(self): self.logger.debug('Closing fetcher connections...') await self.fetcher.close() self.logger.debug('Closing db engine connections...') self.engine.close() await self.engine.wait_closed() async def update(self): data = await self.get_rates() if self.cache is not None: cache_key = get_date_cache_key(datetime.now()) await self.cache.set(cache_key, data) # todo: insert rates here for history return data @abstractmethod async def get_rates(self): return {} async def insert_new_bids(self, bids): insert_tasks = [] async def insert_new_bid_task(*args, **kwargs): async with self.engine.acquire() as conn: self.logger.debug('Inserting new bid...') return await insert_new_bid(conn, *args, **kwargs) for bid in bids: async with self.engine.acquire() as conn: already_stored = await get_bid_by_signature(conn, bid) if not already_stored: insert_tasks.append( insert_new_bid_task(bid, resource=self.resource)) await asyncio.gather(*insert_tasks)
28.686047
70
0.62951
53b54cda80aad866c08b1b811059a724ba807b47
2,302
java
Java
src/com/systemtap/android/Config.java
yuchen112358/SystemTap
b5c9617facdb1fdec0f3ef0f22d89ee3f89a0da9
[ "Apache-2.0" ]
null
null
null
src/com/systemtap/android/Config.java
yuchen112358/SystemTap
b5c9617facdb1fdec0f3ef0f22d89ee3f89a0da9
[ "Apache-2.0" ]
null
null
null
src/com/systemtap/android/Config.java
yuchen112358/SystemTap
b5c9617facdb1fdec0f3ef0f22d89ee3f89a0da9
[ "Apache-2.0" ]
null
null
null
package com.systemtap.android; import java.io.File; public class Config { private static final String MAIN_DIR = "systemtap"; private static final String MODULES_DIR = "modules"; private static final String STAP_OUTPUT_DIR = "stap_output"; private static final String STAP_LOG_DIR = "stap_log"; private static final String STAP_RUN_DIR = "stap_run"; public static final String MEDIA_PATH = "/sdcard/"/*Environment.getExternalStorageDirectory().getAbsolutePath()*/; public static final String MAIN_PATH = MAIN_DIR; public static final String MAIN_ABSOLUTE_PATH = MEDIA_PATH + File.separator + MAIN_DIR; public static final String MODULES_PATH = MAIN_DIR + File.separator + MODULES_DIR; public static final String MODULES_ABSOLUTE_PATH = MEDIA_PATH + File.separator + MAIN_DIR + File.separator + MODULES_DIR; public static final String STAP_OUTPUT_PATH = MAIN_DIR + File.separator + STAP_OUTPUT_DIR; public static final String STAP_OUTPUT_ABSOLUTE_PATH = MEDIA_PATH + File.separator + MAIN_DIR + File.separator + STAP_OUTPUT_DIR; public static final String STAP_LOG_PATH = MAIN_DIR + File.separator + STAP_LOG_DIR; public static final String STAP_LOG_ABSOLUTE_PATH = MEDIA_PATH + File.separator + MAIN_DIR + File.separator + STAP_LOG_DIR; public static final String STAP_RUN_PATH = MAIN_DIR + File.separator + STAP_RUN_DIR; public static final String STAP_RUN_ABSOLUTE_PATH = MEDIA_PATH + File.separator + MAIN_DIR + File.separator + STAP_RUN_DIR; public static final String MODULE_EXT = ".ko"; public static final String PID_EXT = ".pid"; public static final String STAP_CONFIG = "stap.config"; public static final String STAP_RUN_NAME = "staprun"; public static final String STAP_IO_NAME = "stapio"; public static final String STAP_MERGE_NAME = "stapmerge"; public static final String STAP_SH_NAME = "stapsh"; public static final String STAP_SCRIPT_NAME = "start_stap.sh"; public static final String KILL_SCRIPT_NAME = "kill.sh"; public static final String KILL_CONFIG = "kill.config"; public static final String BUSYBOX_NAME = "busybox"; public static final String MODULE_CONF_FILE_EXT = ".txt"; public static final String MODULE_CONF_FILE_ENTRY_STATUS = "status"; public static final int TIMER_TASK_PERIOD = 5 * 60 * 1000; }
39.689655
130
0.775847
907e3f79500f211b55db18030885d0ff4d701cf6
1,671
kt
Kotlin
app/src/main/java/com/gatow/salman/talashehuroof/presenter/storage/StorageUtils.kt
salmanmalik-pk/talash-e-huroof
50133c3c0ebc8186543454ffe54640e85bd91176
[ "MIT" ]
null
null
null
app/src/main/java/com/gatow/salman/talashehuroof/presenter/storage/StorageUtils.kt
salmanmalik-pk/talash-e-huroof
50133c3c0ebc8186543454ffe54640e85bd91176
[ "MIT" ]
null
null
null
app/src/main/java/com/gatow/salman/talashehuroof/presenter/storage/StorageUtils.kt
salmanmalik-pk/talash-e-huroof
50133c3c0ebc8186543454ffe54640e85bd91176
[ "MIT" ]
null
null
null
package com.gatow.salman.talashehuroof.presenter.storage import android.annotation.SuppressLint import android.content.Context import com.gatow.salman.talashehuroof.BuildConfig.APPLICATION_ID import com.gatow.salman.talashehuroof.models.Player import com.gatow.salman.talashehuroof.presenter.level.LevelBuilder /** * Used to preserve game status across app restarts * @author Salman Ibrahim (salmanmaik-pk) */ class StorageUtils { private val wordFinderAlias = APPLICATION_ID /** * Get player information from SharedPreferences * @param context used to access SharedPref * @return the player of the game */ fun getPlayer(ctx: Context): Player { val sharedPreferences = ctx.getSharedPreferences(wordFinderAlias, Context.MODE_PRIVATE) return Player( level = sharedPreferences.getInt("level", 1) ) } /** * Save the player information on SharedPreferences * @param context used to access SharedPref * @param player player to be saved */ fun savePlayer(ctx: Context, player: Player) { require(player.level in 0..LevelBuilder() .getLevels().size) val sharedPreferences = ctx.getSharedPreferences(wordFinderAlias, Context.MODE_PRIVATE) val editor = sharedPreferences.edit() editor.putInt("level", player.level) editor.apply() } /** * Full delete game saved preferences */ @SuppressLint("ApplySharedPref") fun deleteData(ctx: Context) { val sharedPreferences = ctx.getSharedPreferences(wordFinderAlias, Context.MODE_PRIVATE) sharedPreferences.edit().clear().commit() } }
31.528302
95
0.700778
12e18736ad905c8d79f0927b1c91321b3db9f347
2,941
html
HTML
HTML-TEST- SALAO/index.html
Nicholasmendespereira/HTML-CSS-E-JS-EXERCICIOS
6523582f9cceadc4a80fb407269aece1ac8dbbf4
[ "MIT" ]
null
null
null
HTML-TEST- SALAO/index.html
Nicholasmendespereira/HTML-CSS-E-JS-EXERCICIOS
6523582f9cceadc4a80fb407269aece1ac8dbbf4
[ "MIT" ]
null
null
null
HTML-TEST- SALAO/index.html
Nicholasmendespereira/HTML-CSS-E-JS-EXERCICIOS
6523582f9cceadc4a80fb407269aece1ac8dbbf4
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Salão Stylo Feminino</title> <link rel="shortcut icon" href="favicon/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="./STYLE/style.css"> </head> <body> <header> <h1>Salão Stylo Feminino</h1> <div>Sua satisfação ou o dinheiro de volta!</div> <span></span> </header> <nav> <span ><a href="#">Página inicial</a></span> <span ><a href="#">Agendar</a></span> <span class="menu"><a href="#">Empresa</a></span> <!--Mostrar a Equipe--> <span id="promo"><a href="#">Promoções</a></span> <span ><img id="burguer" src="interação/menuhamberguer.png" alt="menu"></span> </nav> <main> <article> <h2>PENTEADOS</h1> <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae nemo deleniti possimus voluptates natus voluptas, doloribus quis harum ad inventore hic ea, ipsa provident quam rem aperiam accusantium sunt eos?loem Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore vitae aliquam veniam eaque culpa molestiae sequi non reiciendis, perferendis odio, fugiat molestias, ratione exercitationem deleniti sint. Ipsum harum sed assumenda?Lorem ipsum dolor, sit amet consectetur adipisicing elit. Tenetur harum animi error eos amet ducimus omnis eaque ex doloribus minima, provident, dolorum consequuntur corporis dolor enim explicabo suscipit ipsam! Consectetur?Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos ab reprehenderit alias cumque accusantium commodi voluptatibus. Ex neque labore, enim rem sint est vitae autem maxime illo natus deleniti inventore? </p> <br> <h2 id="coloracao">COLORAÇÃO</h2> <div class="container"> <img id="imagemcolor" src="imagens/imagem-coloracao-pq.jpg.jpg" alt="imagen coloração"> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum omnis vel reiciendis harum alias molestiae quasi a rerum quia. Culpa, ipsum totam. Iusto assumenda amet dignissimos voluptatibus inventore reiciendis deserunt?Lorem ipsum dolor sit amet consectetur, adipisicing elit. Autem adipisci enim ab reprehenderit unde sapiente consequatur pariatur beatae aspernatur, hic doloribus assumenda voluptatibus repudiandae minus iste quae nobis aliquam itaque?Lorem ipsum dolor sit, amet consectetur adipisicing elit. Totam, laudantium veritatis? Recusandae praesentium sunt hic maxime cum dolor, sint officiis sed. Dolore veritatis pariatur amet molestias tenetur! Eos, sunt aliquid?</p> </div> </article> </main> <footer> </footer> </body> </html>
61.270833
708
0.682421
53c518c1fdc1b48817613c2909ae8090a6c9fdad
6,416
java
Java
src/main/java/party/lemons/trapexpansion/block/SpikeTrapFloorBlock.java
Juuxel/trap-expansion-fabric
7e813c6de19e52475a6d74ec8f7ac546c8195e7d
[ "MIT" ]
null
null
null
src/main/java/party/lemons/trapexpansion/block/SpikeTrapFloorBlock.java
Juuxel/trap-expansion-fabric
7e813c6de19e52475a6d74ec8f7ac546c8195e7d
[ "MIT" ]
null
null
null
src/main/java/party/lemons/trapexpansion/block/SpikeTrapFloorBlock.java
Juuxel/trap-expansion-fabric
7e813c6de19e52475a6d74ec8f7ac546c8195e7d
[ "MIT" ]
null
null
null
package party.lemons.trapexpansion.block; import net.minecraft.entity.EntityContext; import net.minecraft.sound.SoundEvent; import net.minecraft.state.property.DirectionProperty; import net.minecraft.util.math.Direction; import net.minecraft.util.shape.VoxelShape; import party.lemons.trapexpansion.init.TrapExpansionBlocks; import party.lemons.trapexpansion.init.TrapExpansionSounds; import party.lemons.trapexpansion.misc.SpikeDamageSource; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.fluid.FluidState; import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemPlacementContext; import net.minecraft.sound.SoundCategory; import net.minecraft.state.StateFactory; import net.minecraft.state.property.BooleanProperty; import net.minecraft.state.property.IntegerProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BoundingBox; import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.IWorld; import net.minecraft.world.ViewableWorld; import net.minecraft.world.World; import java.util.List; import java.util.Random; public class SpikeTrapFloorBlock extends Block { protected static final VoxelShape AABB_UP = VoxelShapes.cuboid(0.0D, 0.0D, 0.0D, 1.0D, 0.1D, 1.0D); protected static final VoxelShape AABB_DOWN = VoxelShapes.cuboid(0.0D, 0.9D, 0.0D, 1.0D, 1.0D, 1.0D); public static final IntegerProperty OUT = IntegerProperty.create("out", 0, 2); public static final DirectionProperty DIRECTION = DirectionProperty.create("direction", f->f.getAxis().isVertical()); public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public SpikeTrapFloorBlock(Settings settings) { super(settings); this.setDefaultState(this.stateFactory.getDefaultState().with(OUT, 0).with(DIRECTION, Direction.UP).with(WATERLOGGED, false)); } public SpikeTrapFloorBlock(Settings settings, boolean child) { super(settings); } @Override public FluidState getFluidState(BlockState var1) { return var1.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(var1); } @Override public BlockState getStateForNeighborUpdate(BlockState var1, Direction var2, BlockState var3, IWorld var4, BlockPos var5, BlockPos var6) { if (var1.get(WATERLOGGED)) { var4.getFluidTickScheduler().schedule(var5, Fluids.WATER, Fluids.WATER.getTickRate(var4)); } return super.getStateForNeighborUpdate(var1, var2, var3, var4, var5, var6); } public VoxelShape getOutlineShape(BlockState state, BlockView bv, BlockPos pos, EntityContext ctx) { return getCollisionShape(state, bv, pos, ctx); } @Override public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { if(!world.isClient && !entity.removed) { int i = state.get(OUT); if(i == 0) { this.updateState(world, pos, state, i); } if(i == 2 && world.getTime() % 5 == 0) { entity.damage(SpikeDamageSource.SPIKE, 3); } } } @Deprecated @Override public void neighborUpdate(BlockState state, World world, BlockPos pos, Block var4, BlockPos var5, boolean var6) { world.getBlockTickScheduler().schedule(pos, this, this.getTickRate(world)); } @Deprecated @Override public void onScheduledTick(BlockState state, World world, BlockPos pos, Random random) { if (!world.isClient) { int i = state.get(OUT); if (i > 0 || world.isReceivingRedstonePower(pos)) { this.updateState(world, pos, state, i); } } } @Deprecated @Override public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState state2, boolean bool) { if(state.get(OUT) > 0 || world.isReceivingRedstonePower(pos)) world.getBlockTickScheduler().schedule(pos, this, this.getTickRate(world)); } @Override public int getTickRate(ViewableWorld var1) { return 5; } @Override public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, EntityContext context) { if(state.get(DIRECTION) == Direction.UP) return AABB_UP; return AABB_DOWN; } @Override public boolean isFullBoundsCubeForCulling(BlockState var1) { return false; } public BlockState getPlacementState(ItemPlacementContext ctx) { FluidState fs = ctx.getWorld().getFluidState(ctx.getBlockPos()); boolean isWater = fs.getFluid() == Fluids.WATER; if(ctx.getFacing() == Direction.DOWN) return this.getDefaultState().with(DIRECTION, Direction.DOWN).with(WATERLOGGED, isWater); switch(ctx.getFacing()) { case NORTH: case SOUTH: case WEST: case EAST: return TrapExpansionBlocks.SPIKE_TRAP_WALL.getDefaultState().with(SpikeTrapWallBlock.DIRECTION_WALL, ctx.getFacing()).with(WATERLOGGED, isWater); } return this.getDefaultState().with(WATERLOGGED, isWater); } @Deprecated @Override public boolean hasComparatorOutput(BlockState var1) { return true; } @Deprecated @Override public int getComparatorOutput(BlockState var1, World var2, BlockPos var3) { return var1.get(OUT); } protected void updateState(World world, BlockPos pos, BlockState state, int outValue) { int change = 0; boolean powered = world.isReceivingRedstonePower(pos); if(!powered && !hasEntity(world, pos, state)) { change = -1; } else if(outValue < 2) { change = 1; } int endValue = Math.max(0, outValue + change); if(change != 0) { SoundEvent sound = TrapExpansionSounds.SOUND_SPIKE_1; if(endValue == 2) sound = TrapExpansionSounds.SOUND_SPIKE_2; world.playSound(null, pos, sound, SoundCategory.BLOCKS, 1F, 0.5F + (world.random.nextFloat() / 2)); } world.setBlockState(pos, state.with(OUT, endValue)); world.scheduleBlockRender(pos); if(endValue != 2 || !powered) world.getBlockTickScheduler().schedule(pos, this, this.getTickRate(world)); } protected boolean hasEntity(World worldIn, BlockPos pos, BlockState state) { List<? extends Entity > list; list= worldIn.getEntities(Entity.class, new BoundingBox(0, 0, 0, 1, 1, 1).offset(pos), e->true); if (!list.isEmpty()) { for (Entity entity : list) { if (!entity.canAvoidTraps()) { return true; } } } return false; } @Override protected void appendProperties(StateFactory.Builder<Block, BlockState> st) { st.add(OUT).add(DIRECTION).add(WATERLOGGED); } }
28.017467
149
0.744077
d262439db97e3ac7f41b17248bcf882e497b34ce
1,230
kt
Kotlin
app/src/main/java/net/maiatoday/mkay/db/dao/EntryDao.kt
maiatoday/MKay
46f9ead2c9ccbbd50252811b8b82772da154773d
[ "MIT" ]
null
null
null
app/src/main/java/net/maiatoday/mkay/db/dao/EntryDao.kt
maiatoday/MKay
46f9ead2c9ccbbd50252811b8b82772da154773d
[ "MIT" ]
null
null
null
app/src/main/java/net/maiatoday/mkay/db/dao/EntryDao.kt
maiatoday/MKay
46f9ead2c9ccbbd50252811b8b82772da154773d
[ "MIT" ]
null
null
null
package net.maiatoday.mkay.db.dao import android.arch.lifecycle.LiveData import android.arch.persistence.room.* import net.maiatoday.mkay.db.entity.* import java.util.* /** * Created by maia on 2017/05/25. */ @Dao abstract class EntryDao { @Query("SELECT COUNT(*) FROM entries") abstract fun count(): Int @Query("SELECT * FROM entries") abstract fun getAll(): LiveData<List<Entry>> @Query("SELECT * FROM entries WHERE id = :id") abstract fun get(id: Long): Entry? @Query("SELECT * FROM entries WHERE id = :id") abstract fun getEntryWithMoods(id: Long): EntryWithMoods @Insert(onConflict = OnConflictStrategy.REPLACE) abstract fun insertOrUpdate(vararg items: Entry): List<Long> @Delete abstract fun delete(item: Entry) fun createEntry(name: String, sentiment: Int, energy: Int, location: Location): Long { return insertOrUpdate(Entry(name=name,sentiment=sentiment, energy=energy, date=Date(), location=location)).get(0) } @Query("SELECT * FROM entries WHERE id = :id") abstract fun getEntryWithComments(id: Long): EntryAllComments @Query("SELECT * FROM entries WHERE id = :id") abstract fun getCompleteEntry(id: Long): EntryComplete }
28.604651
121
0.7
654ad9f66cc00d76dc7800cff09e9d14c95e20e3
2,259
py
Python
tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
tpdatasrc/tpgamefiles/rules/char_class/class020_archmage.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
from toee import * import char_class_utils ################################################### def GetConditionName(): return "Archmage" def GetSpellCasterConditionName(): return "Archmage Spellcasting" def GetCategory(): return "Core 3.5 Ed Prestige Classes" def GetClassDefinitionFlags(): return CDF_CoreClass def GetClassHelpTopic(): return "TAG_ARCHMAGES" classEnum = stat_level_archmage ################################################### class_feats = { } class_skills = (skill_alchemy, skill_concentration, skill_craft, skill_knowledge_all, skill_profession, skill_search, skill_spellcraft) def IsEnabled(): return 1 def GetHitDieType(): return 4 def GetSkillPtsPerLevel(): return 2 def GetBabProgression(): return base_attack_bonus_type_non_martial def IsFortSaveFavored(): return 0 def IsRefSaveFavored(): return 0 def IsWillSaveFavored(): return 1 def GetSpellListType(): return spell_list_type_arcane def GetSpellSourceType(): return spell_source_type_arcane def IsClassSkill(skillEnum): return char_class_utils.IsClassSkill(class_skills, skillEnum) def IsClassFeat(featEnum): return char_class_utils.IsClassFeat(class_feats, featEnum) def GetClassFeats(): return class_feats def IsAlignmentCompatible( alignment): return 1 def CanCastArcaneLvl7(obj): # TODO: generalize (to support other arcane classes) if obj.stat_level_get(stat_level_sorcerer) >= 14: return 1 if obj.stat_level_get(stat_level_wizard) >= 13: return 1 def HasSpellFocusInTwoSchool( obj ): sf1 = 0 for p in range(feat_spell_focus_abjuration, feat_spell_focus_transmutation+1): if obj.has_feat(p): sf1 = p break if sf1 == 0: return 0 sf2 = 0 for p in range(feat_spell_focus_abjuration, feat_spell_focus_transmutation+1): if obj.has_feat(p) and p != sf1: sf2 = p break if sf2 == 0: return 0 return 1 def ObjMeetsPrereqs( obj ): return 0 # WIP # skill ranks (only Disable Device since Escape Artist, Decipher Script and Knowledge Arcana aren't implemented in ToEE) if obj.skill_ranks_get(skill_spellcraft) < 15: return 0 if (not obj.has_feat(feat_skill_focus_spellcraft)): return 0 if (not CanCastArcaneLvl7(obj)): return 0 if (not HasSpellFocusInTwoSchool(obj)): return 0 return 1
20.916667
135
0.736609
fd5a37efd94262c6c71c857af4e9552e761f38ca
3,439
h
C
third_party/blink/renderer/modules/direct_sockets/udp_socket.h
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
third_party/blink/renderer/modules/direct_sockets/udp_socket.h
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
third_party/blink/renderer/modules/direct_sockets/udp_socket.h
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_DIRECT_SOCKETS_UDP_SOCKET_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_DIRECT_SOCKETS_UDP_SOCKET_H_ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "services/network/public/mojom/udp_socket.mojom-blink.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/public/mojom/direct_sockets/direct_sockets.mojom-blink.h" #include "third_party/blink/renderer/bindings/core/v8/active_script_wrappable.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h" #include "third_party/blink/renderer/modules/modules_export.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/heap/member.h" #include "third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h" namespace net { class IPEndPoint; } // namespace net namespace blink { class ExecutionContext; class MODULES_EXPORT UDPSocket final : public ScriptWrappable, public ActiveScriptWrappable<UDPSocket>, public ExecutionContextClient, public network::mojom::blink::UDPSocketListener { DEFINE_WRAPPERTYPEINFO(); public: explicit UDPSocket(ExecutionContext* execution_context, ScriptPromiseResolver&); ~UDPSocket() override; UDPSocket(const UDPSocket&) = delete; UDPSocket& operator=(const UDPSocket&) = delete; // Called by NavigatorSocket when initiating a connection: mojo::PendingReceiver<blink::mojom::blink::DirectUDPSocket> GetUDPSocketReceiver(); mojo::PendingRemote<network::mojom::blink::UDPSocketListener> GetUDPSocketListener(); void Init(int32_t result, const absl::optional<net::IPEndPoint>& local_addr, const absl::optional<net::IPEndPoint>& peer_addr); // Web-exposed functions ScriptPromise close(ScriptState*, ExceptionState&); String remoteAddress() const; uint16_t remotePort() const; // network::mojom::blink::UDPSocketListener: void OnReceived(int32_t result, const absl::optional<::net::IPEndPoint>& src_addr, absl::optional<::base::span<const ::uint8_t>> data) override; // ScriptWrappable: bool HasPendingActivity() const override; void Trace(Visitor* visitor) const override; private: void OnSocketListenerConnectionError(); void DoClose(bool is_local_close); Member<ScriptPromiseResolver> init_resolver_; FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle feature_handle_for_scheduler_; mojo::Remote<blink::mojom::blink::DirectUDPSocket> udp_socket_; mojo::Receiver<network::mojom::blink::UDPSocketListener> socket_listener_receiver_{this}; Member<ScriptPromiseResolver> send_resolver_; absl::optional<net::IPEndPoint> local_addr_; absl::optional<net::IPEndPoint> peer_addr_; }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_MODULES_DIRECT_SOCKETS_UDP_SOCKET_H_
37.791209
99
0.78075
a1369022e86ca831f72f39c66e5783693ab8b9ac
1,016
swift
Swift
Sources/Data/Entity/Transformers/Generic/BidirectionalValueTransformer.swift
Pointwelve/Bitpal-iOS
ac1eff918db0b28ab8990b0f7de4dee49bfe0d17
[ "Apache-2.0" ]
1
2020-03-18T19:15:28.000Z
2020-03-18T19:15:28.000Z
Data/Data/Entity/Transformers/Generic/BidirectionalValueTransformer.swift
Pointwelve/Bitpal-iOS
ac1eff918db0b28ab8990b0f7de4dee49bfe0d17
[ "Apache-2.0" ]
null
null
null
Data/Data/Entity/Transformers/Generic/BidirectionalValueTransformer.swift
Pointwelve/Bitpal-iOS
ac1eff918db0b28ab8990b0f7de4dee49bfe0d17
[ "Apache-2.0" ]
1
2020-05-19T05:24:34.000Z
2020-05-19T05:24:34.000Z
// // BidirectionalValueTransformer.swift // Data // // Created by Ryne Cheow on 17/4/17. // Copyright © 2017 Pointwelve. All rights reserved. // import Foundation import RxSwift protocol BirectionalValueTransformer: ValueTransformer { func transform(_ input: Output) -> Observable<Input> } class BidirectionalValueTransformerBox<I, O>: BirectionalValueTransformer { typealias Input = I typealias Output = O typealias TransformClosure = (I) -> Observable<O> typealias InverseClosure = (O) -> Observable<I> private let transformClosure: TransformClosure private let inverseClosure: InverseClosure init(_ transformClosure: @escaping TransformClosure, _ inverseClosure: @escaping InverseClosure) { self.transformClosure = transformClosure self.inverseClosure = inverseClosure } func transform(_ input: I) -> Observable<O> { return transformClosure(input) } func transform(_ input: O) -> Observable<I> { return inverseClosure(input) } }
25.4
75
0.724409
164d66a0c338514be5061551f2ab986df51fddd3
221
ts
TypeScript
src/main.ts
Ibrahim-Islam/ng2-outlook-imgur
c68ecc1585768503bef97e01b56abe4caad832f8
[ "MIT" ]
null
null
null
src/main.ts
Ibrahim-Islam/ng2-outlook-imgur
c68ecc1585768503bef97e01b56abe4caad832f8
[ "MIT" ]
null
null
null
src/main.ts
Ibrahim-Islam/ng2-outlook-imgur
c68ecc1585768503bef97e01b56abe4caad832f8
[ "MIT" ]
null
null
null
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; Office.initialize = (reason: any) => { platformBrowserDynamic().bootstrapModule(AppModule); };
36.833333
75
0.737557
40a3b4a834ef0bbd9a067a992d2fd9790bfbf330
5,193
py
Python
kuryr_libnetwork/utils.py
bbc/kuryr-libnetwork
8f7866809240acd52667f9e47a5df4a700d9290b
[ "Apache-2.0" ]
26
2016-05-23T01:18:10.000Z
2020-04-20T14:01:07.000Z
kuryr_libnetwork/utils.py
bbc/kuryr-libnetwork
8f7866809240acd52667f9e47a5df4a700d9290b
[ "Apache-2.0" ]
1
2019-11-01T13:03:25.000Z
2019-11-01T13:03:26.000Z
kuryr_libnetwork/utils.py
bbc/kuryr-libnetwork
8f7866809240acd52667f9e47a5df4a700d9290b
[ "Apache-2.0" ]
16
2016-07-02T23:46:51.000Z
2021-05-21T09:55:02.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import os import sys import time import traceback import flask import jsonschema from neutronclient.common import exceptions as n_exceptions from oslo_concurrency import processutils from oslo_log import log from werkzeug import exceptions as w_exceptions from kuryr.lib import constants as lib_const from kuryr.lib import exceptions from kuryr.lib import utils as lib_utils from kuryr_libnetwork import constants as const LOG = log.getLogger(__name__) SG_POSTFIX = 'exposed_ports' # Return all errors as JSON. From http://flask.pocoo.org/snippets/83/ def make_json_app(import_name, **kwargs): """Creates a JSON-oriented Flask app. All error responses that you don't specifically manage yourself will have application/json content type, and will contain JSON that follows the libnetwork remote driver protocol. { "Err": "405: Method Not Allowed" } See: - https://github.com/docker/libnetwork/blob/3c8e06bc0580a2a1b2440fe0792fbfcd43a9feca/docs/remote.md#errors # noqa """ app = flask.Flask(import_name, **kwargs) @app.errorhandler(exceptions.KuryrException) @app.errorhandler(n_exceptions.NeutronClientException) @app.errorhandler(jsonschema.ValidationError) @app.errorhandler(processutils.ProcessExecutionError) def make_json_error(ex): LOG.error("Unexpected error happened: %s", ex) traceback.print_exc(file=sys.stderr) response = flask.jsonify({"Err": str(ex)}) response.status_code = w_exceptions.InternalServerError.code if isinstance(ex, w_exceptions.HTTPException): response.status_code = ex.code elif isinstance(ex, n_exceptions.NeutronClientException): response.status_code = ex.status_code elif isinstance(ex, jsonschema.ValidationError): response.status_code = w_exceptions.BadRequest.code content_type = 'application/vnd.docker.plugins.v1+json; charset=utf-8' response.headers['Content-Type'] = content_type return response for code in w_exceptions.default_exceptions: app.register_error_handler(code, make_json_error) return app def get_sandbox_key(container_id): """Returns a sandbox key constructed with the given container ID. :param container_id: the ID of the Docker container as string :returns: the constructed sandbox key as string """ return os.path.join(lib_utils.DOCKER_NETNS_BASE, container_id[:12]) def get_neutron_port_name(docker_endpoint_id): """Returns a Neutron port name. :param docker_endpoint_id: the EndpointID :returns: the Neutron port name formatted appropriately """ return '-'.join([docker_endpoint_id, lib_utils.PORT_POSTFIX]) def get_sg_expose_name(port_id): """Returns a Neutron security group name. :param port_id: The Neutron port id to create a security group for :returns: the Neutron security group name formatted appropriately """ return '-'.join([port_id, SG_POSTFIX]) def create_net_tags(tag): tags = [] tags.append(const.NEUTRON_ID_LH_OPTION + ':' + tag[:32]) if len(tag) > 32: tags.append(const.NEUTRON_ID_UH_OPTION + ':' + tag[32:64]) return tags def existing_net_tag(netid): return const.KURYR_EXISTING_NEUTRON_NET + ':' + netid[:12] def make_net_tags(tag): tags = create_net_tags(tag) return ','.join(map(str, tags)) def make_net_name(netid, tags=True): if tags: return const.NET_NAME_PREFIX + netid[:8] return netid def make_subnet_name(pool_cidr): return const.SUBNET_NAME_PREFIX + pool_cidr def create_port_tags(tag): tags = [] tags.append(const.NEUTRON_ID_LH_OPTION + ':' + tag[:32]) if len(tag) > 32: tags.append(const.NEUTRON_ID_UH_OPTION + ':' + tag[32:64]) return tags def make_port_tags(tag): tags = create_port_tags(tag) return ','.join(map(str, tags)) def wait_for_port_active(neutron_client, neutron_port_id, vif_plug_timeout): port_active = False tries = 0 while True: try: port = neutron_client.show_port(neutron_port_id) except n_exceptions.NeutronClientException as ex: LOG.error('Could not get the port %s to check ' 'its status', ex) else: if port['port']['status'] == lib_const.PORT_STATUS_ACTIVE: port_active = True if port_active or (vif_plug_timeout > 0 and tries >= vif_plug_timeout): break LOG.debug('Waiting for port %s to become ACTIVE', neutron_port_id) tries += 1 time.sleep(1) return port_active
31.095808
120
0.706335
4590435b4930b7990d00602636c1039a4a009baa
32
rs
Rust
src/lib.rs
AbooMinister25/Lite
06aede2912d6f8f9134746dcd02033fad0454790
[ "MIT" ]
19
2020-11-20T22:30:06.000Z
2022-03-16T00:56:56.000Z
src/lib.rs
AbooMinister25/Lite
06aede2912d6f8f9134746dcd02033fad0454790
[ "MIT" ]
null
null
null
src/lib.rs
AbooMinister25/Lite
06aede2912d6f8f9134746dcd02033fad0454790
[ "MIT" ]
2
2021-08-02T17:15:37.000Z
2021-08-19T12:41:52.000Z
pub mod errors; pub mod parser;
10.666667
15
0.75
b8e3738033859dfe543d95cfdca9224a18a87a19
6,293
rs
Rust
src/thumb_formats/load_store_sign_extended.rs
gba-rs/gba-emu
7197a7873aff2b8b3e363d4271822f0a7cf41078
[ "Apache-2.0", "MIT" ]
2
2020-07-11T02:45:04.000Z
2020-10-22T21:24:03.000Z
src/thumb_formats/load_store_sign_extended.rs
gba-rs/gba-emu
7197a7873aff2b8b3e363d4271822f0a7cf41078
[ "Apache-2.0", "MIT" ]
null
null
null
src/thumb_formats/load_store_sign_extended.rs
gba-rs/gba-emu
7197a7873aff2b8b3e363d4271822f0a7cf41078
[ "Apache-2.0", "MIT" ]
null
null
null
use crate::operations::instruction::Instruction; use crate::cpu::cpu::{CPU, THUMB_PC}; use crate::operations::load_store::{DataTransfer, DataType, data_transfer_execute}; use crate::memory::memory_bus::MemoryBus; use core::fmt; pub struct LoadStoreSignExtended { h_flag: bool, sign_extended: bool, offset_register: u8, base_register: u8, destination_register: u8, } impl From<u16> for LoadStoreSignExtended { fn from(value: u16) -> LoadStoreSignExtended { return LoadStoreSignExtended { h_flag: ((value & 0x800) >> 11) != 0, sign_extended: ((value & 0x400) >> 10) != 0, offset_register: ((value & 0x1C0) >> 6) as u8, base_register: ((value & 0x38) >> 3) as u8, destination_register: (value & 0x7) as u8, }; } } impl fmt::Debug for LoadStoreSignExtended { fn fmt( & self, f: & mut fmt::Formatter < '_ > ) -> fmt::Result { let instruction = format!("r{:?}, [r{:?}, r{:?}]", self.destination_register, self.base_register, self.offset_register); let instr_type; if !self.sign_extended && !self.h_flag { instr_type = format!("STRH"); } else if !self.sign_extended && self.h_flag { instr_type = format!("LDRH"); } else if self.sign_extended && !self.h_flag { instr_type = format!("LDSB"); } else { instr_type = format!("LDSH"); } write!(f, "{} {}", instr_type, instruction ) } } impl Instruction for LoadStoreSignExtended { fn execute(&self, cpu: &mut CPU, mem_bus: &mut MemoryBus) -> u32 { let data_type = if !self.h_flag && self.sign_extended { DataType::Byte } else { DataType::Halfword }; let is_load; if !self.sign_extended && !self.h_flag { is_load = false; } else { is_load = true; } let transfer_info = DataTransfer { is_pre_indexed: true, write_back: false, load: is_load, is_signed: self.sign_extended, data_type: data_type, base_register: self.base_register, destination: self.destination_register, }; let target_address = cpu.get_register(self.base_register) + cpu.get_register(self.offset_register); let base; if self.base_register == THUMB_PC { base = cpu.get_register(self.base_register) + 2; } else { base = cpu.get_register(self.base_register); } data_transfer_execute(transfer_info, base, target_address, cpu, mem_bus); mem_bus.cycle_clock.get_cycles() } fn asm(&self) -> String { return format!("{:?}", self); } fn cycles(&self) -> u32 {return 3;} // 1s + 1n + 1l // unless pc then its 5 2s + 2n + 1l but that isn't known till later. } #[cfg(test)] mod tests { use super::*; use crate::gba::GBA; #[test] fn test_store_halfword() { let format = LoadStoreSignExtended::from(0x52A6); let mut gba = GBA::default(); gba.cpu.set_register(2, 0x02); gba.cpu.set_register(4, 0x08000006); gba.cpu.set_register(6, 0xF2F1); format.execute(&mut gba.cpu, &mut gba.memory_bus); assert_eq!(format.h_flag, false); assert_eq!(format.sign_extended, false); assert_eq!(format.offset_register, 2); assert_eq!(format.base_register, 4); assert_eq!(format.destination_register, 6); assert_eq!(gba.memory_bus.read_u16(0x02 + 0x08000006), 0xF2F1); } #[test] fn test_load_halfword() { let format = LoadStoreSignExtended::from(0x5AA6); let mut gba = GBA::default(); gba.cpu.set_register(2, 0x4); gba.cpu.set_register(4, 0x08000008); gba.memory_bus.write_u32(0x08000008 + 0x4, 0xF1A1); format.execute(&mut gba.cpu, &mut gba.memory_bus); assert_eq!(format.h_flag, true); assert_eq!(format.sign_extended, false); assert_eq!(format.offset_register, 2); assert_eq!(format.base_register, 4); assert_eq!(format.destination_register, 6); assert_eq!(gba.cpu.get_register(format.destination_register), 0x0000_F1A1) } #[test] fn test_load_sign_extended_byte () { let format = LoadStoreSignExtended::from(0x56A6); let mut gba = GBA::default(); gba.cpu.set_register(2, 0x4); gba.cpu.set_register(4, 0x08000008); gba.memory_bus.write_u32(0x08000008 + 0x4, 0xA1); format.execute(&mut gba.cpu, &mut gba.memory_bus); assert_eq!(format.h_flag, false); assert_eq!(format.sign_extended, true); assert_eq!(format.offset_register, 2); assert_eq!(format.base_register, 4); assert_eq!(format.destination_register, 6); assert_eq!(gba.cpu.get_register(format.destination_register), 0xFFFF_FFA1) } #[test] fn test_load_sign_extended_halfword_negative () { let format = LoadStoreSignExtended::from(0x5EA6); let mut gba = GBA::default(); gba.cpu.set_register(2, 0x4); gba.cpu.set_register(4, 0x08000008); gba.memory_bus.write_u32(0x08000008 + 0x4, 0xFF01); format.execute(&mut gba.cpu, &mut gba.memory_bus); assert_eq!(format.h_flag, true); assert_eq!(format.sign_extended, true); assert_eq!(format.offset_register, 2); assert_eq!(format.base_register, 4); assert_eq!(format.destination_register, 6); assert_eq!(gba.cpu.get_register(format.destination_register), 0xFFFF_FF01); } #[test] fn test_load_sign_extended_halfword_positive () { let format = LoadStoreSignExtended::from(0x5EA6); let mut gba = GBA::default(); gba.cpu.set_register(2, 0x4); gba.cpu.set_register(4, 0x08000008); gba.memory_bus.write_u32(0x08000008 + 0x4, 0x1F01); format.execute(&mut gba.cpu, &mut gba.memory_bus); assert_eq!(format.h_flag, true); assert_eq!(format.sign_extended, true); assert_eq!(format.offset_register, 2); assert_eq!(format.base_register, 4); assert_eq!(format.destination_register, 6); assert_eq!(gba.cpu.get_register(format.destination_register), 0x0000_1F01); } }
34.387978
128
0.620054
966546eb0f9d54ae9b760d5aa0ddd72552df6ca7
502
php
PHP
app/Models/Cliente.php
AcunaRibon/AlanaPetshoft
1f26766e1e9df461891244668464383bba24715b
[ "MIT" ]
3
2022-03-03T20:13:08.000Z
2022-03-07T21:24:06.000Z
app/Models/Cliente.php
AcunaRibon/AlanaPetshoft
1f26766e1e9df461891244668464383bba24715b
[ "MIT" ]
null
null
null
app/Models/Cliente.php
AcunaRibon/AlanaPetshoft
1f26766e1e9df461891244668464383bba24715b
[ "MIT" ]
null
null
null
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Notifications\Notifiable; use Laravel\Sanctum\HasApiTokens; class Cliente extends Model { use HasFactory; protected $table='cliente'; protected $primaryKey ='id_cliente'; protected $fillable =['nombres_cliente','apellidos_cliente', 'correo_electronico_cliente','celular_cliente','direccion_cliente','estado_cliente']; public $timestamps = false; }
25.1
147
0.790837
fa0b107425969bb15e260419c1c25637b70a456a
3,435
swift
Swift
JustPeek/Classes/PeekViewController.swift
FroeMic/JustPeek
de96e8572661de199fdd1ec248e0a31bf106d4fb
[ "Apache-2.0" ]
null
null
null
JustPeek/Classes/PeekViewController.swift
FroeMic/JustPeek
de96e8572661de199fdd1ec248e0a31bf106d4fb
[ "Apache-2.0" ]
null
null
null
JustPeek/Classes/PeekViewController.swift
FroeMic/JustPeek
de96e8572661de199fdd1ec248e0a31bf106d4fb
[ "Apache-2.0" ]
null
null
null
// // PeekViewController.swift // JustPeek // // Copyright 2016 Just Eat Holdings Ltd. // import UIKit internal class PeekViewController: UIViewController { fileprivate let peekContext: PeekContext fileprivate let contentView: UIView fileprivate let peekView: PeekView internal init?(peekContext: PeekContext) { self.peekContext = peekContext guard let contentViewController = peekContext.destinationViewController else { return nil } // NOTE: it seems UIVisualEffectView has a blur radius too high for what we want to achieve... moreover // it's not safe to animate it's alpha component peekView = PeekView(frame: peekContext.initalPreviewFrame(), contentView: contentViewController.view) contentView = UIApplication.shared.keyWindow!.blurredSnapshotView //UIScreen.mainScreen().blurredSnapshotView super.init(nibName: nil, bundle: nil) peekView.frame = convertedInitialFrame() } override func viewDidLoad() { super.viewDidLoad() view.addSubview(contentView) contentView.addSubview(peekView) } internal required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) must not be used") } internal func peek(_ completion: ((Bool) -> Void)? = nil) { animatePeekView(true, completion: completion) } internal func pop(_ completion: ((Bool) -> Void)?) { animatePeekView(false, completion: completion) } fileprivate func convertedInitialFrame() -> CGRect { return self.view.convert(peekContext.initalPreviewFrame(), from: peekContext.sourceView) } fileprivate func animatePeekView(_ forBeingPresented: Bool, completion: ((Bool) -> Void)?) { let destinationFrame = forBeingPresented ? peekContext.finalPreviewFrame() : convertedInitialFrame() contentView.alpha = forBeingPresented ? 0.0 : 1.0 let contentViewAnimation = { [weak self] in if let strongSelf = self { strongSelf.contentView.alpha = 1.0 - strongSelf.contentView.alpha } } peekView.animateToFrame(destinationFrame, alongsideAnimation: contentViewAnimation, completion: completion) } } private extension UIScreen { var blurredSnapshotView: UIView { get { let view = UIScreen.main.snapshotView(afterScreenUpdates: false) return view.blurredSnapshotView } } } private extension UIView { var blurredSnapshotView: UIView { get { let view = UIImageView(frame: bounds) if let image = snapshot { let radius = CGFloat(20.0) // just because with this value the result looks good view.image = image.applyBlur(withRadius: radius, tintColor: nil, saturationDeltaFactor: 1.0, maskImage: nil) } return view } } var snapshot: UIImage? { get { UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0.0) if let context = UIGraphicsGetCurrentContext() { layer.render(in: context) } else { drawHierarchy(in: bounds, afterScreenUpdates: false) } let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return image } } }
34.009901
124
0.64163
13430f34889e1946100a12897d11e8707f875c8c
64
h
C
defs.h
dranzerashi/recipie-manager-cpp-training
2a36b912209bc36441f0e7562fa726b242eb9268
[ "MIT" ]
null
null
null
defs.h
dranzerashi/recipie-manager-cpp-training
2a36b912209bc36441f0e7562fa726b242eb9268
[ "MIT" ]
null
null
null
defs.h
dranzerashi/recipie-manager-cpp-training
2a36b912209bc36441f0e7562fa726b242eb9268
[ "MIT" ]
null
null
null
#ifndef DEFS_H #define DEFS_H #define MAX_RECIPES 32 #endif
8
23
0.75
4446c5b13dbbe194218c416b2d6d78220921af00
40,059
asm
Assembly
software/application/ifirm.asm
JCLemme/eprisc
05a792c1845982bf5571e2eed5e3f3cef845d2e2
[ "MIT" ]
null
null
null
software/application/ifirm.asm
JCLemme/eprisc
05a792c1845982bf5571e2eed5e3f3cef845d2e2
[ "MIT" ]
null
null
null
software/application/ifirm.asm
JCLemme/eprisc
05a792c1845982bf5571e2eed5e3f3cef845d2e2
[ "MIT" ]
null
null
null
; epRISC Interactive Firmware ; copyright 2018 by John C Lemme, jclemme (at) proportionallabs (dot) com ; Layout of the dictionary ; Word 0 Defined[0Empty,1Code,2Variable,3Constant],Precedence[0Norm,1Immd],Pad[2bit],NameSize[1byte] ; Word 1..n Packed name, zero padded ; Word n+1 Next definition ; Word n+2 Code pointer ; Word n+3 Data...n ; Layout of memory ; 0000 Interpreter ; 1000 Data stack ; 1200 Return stack ; 1400 Input buffer ; 1600 Word buffer ; 1700 Call stack ; 1800 Current base ; 1801 Current word address ; 1802 Current word length ; 1803 ? ; 1804 --Reserved-- ; 2000 Beginning of dictionary ; 4000 Beginning of heap ; Layout of registers ; Xw Return stack pointer (RSP) ; Xw Data stack pointer (DSP) ; Xx Data DSP ; Xy Data DSP+1 ; ; Yw Input address ; Yx Num of characters entered ; Yy Word address ; Yz Word that we're working with ; Zw Temporary (Temp) ; Zx Character in word ; ============= ; Instruction Pointer and Entry !ip h00004000 !def BUS_BASE_ADDRESS h2000 :entry brch.a a:main ; ============= ; BIOS Routines !include "../rom/bios_bus.asm" !include "../rom/bios_uart_fast.asm" !include "../rom/bios_spi.asm" !include "../rom/bios_string.asm" !include "../rom/bios_sdcard.asm" !include "../rom/bios_debug.asm" ; ============= ; Defines !def DSP Xw !def RSP Xx !def StackWorkA Xy !def StackWorkB Xz !def InptAddr Yw !def InptOffs Yx !def DictAddr Yy !def HeapAddr Yz !def Temp Zw !def AuxOutput Zy !def Output Zz !def MemBase 1800 !def MemLastAddr 1801 !def MemLastLen 1802 ; ============= ; Strings !zone ifirm_str :.welcome !str "epRISC Interactive Firmware v0.3\n\n" :.okprompt !str "ok\n" :.tmpmatch !str "match " :.wordhit !str "Word " !zone ifirm_errstr :.setleft !str ">>>>" :.setright !str "<<<<\n" :.setstack !str "Current stack ([dsp-2], [dsp-1], [dsp]):\n" :.generic !str "Generic/undefined error" :.overflow !str "Stack overflow" :.underflow !str "Stack underflow" :.undefined !str "Undefined word" :.lookup !data $ifirm_errstr.generic $ifirm_errstr.overflow $ifirm_errstr.underflow $ifirm_errstr.undefined ; ============= ; Subroutine - Push Number to Data Stack ; Pushes a number to the data stack. Uses %AuxOutput for parameters - maybe bad design? :sub_pushds stor.o s:%AuxOutput r:%DSP o:#h00 ; Save data to the stack addr.v d:%DSP a:%DSP v:#h01 ; Increment DSP rtrn.s ; Return ; ============= ; Subroutine - Pop Number from Data Stack ; Pops a number from the data stack. Outputs to %Output :sub_popsds subr.v d:%DSP a:%DSP v:#h01 ; Decrement DSP cmpr.v a:%DSP v:#h10 s:#h04 brch.a c:%LST a:.underflowd ; Report underflow errors load.o d:%Output r:%DSP o:#h00 ; Load data from the stack rtrn.s ; Return :.underflowd addr.v d:%DSP a:%DSP v:#h01 ; Fix stack move.v d:%Temp v:#h02 push.r s:%Temp call.s a:sub_callerror ; Report the failure ; ============= ; Subroutine - Push Number to Return Stack ; Pushes a number to the return stack. Uses %AuxOutput for parameters - maybe bad design? :sub_pushrs stor.o s:%AuxOutput r:%RSP o:#h00 ; Save data to the stack addr.v d:%RSP a:%RSP v:#h01 ; Increment RSP rtrn.s ; Return ; ============= ; Subroutine - Pop Number from Return Stack ; Pops a number from the return stack. Outputs to %Output :sub_popsrs subr.v d:%RSP a:%RSP v:#h01 ; Decrement RSP cmpr.v a:%RSP v:#h12 s:#h04 brch.a c:%LST a:.underflowd ; Report underflow errors load.o d:%Output r:%RSP o:#h00 ; Load data from the stack rtrn.s ; Return :.underflowr addr.v d:%RSP a:%RSP v:#h01 ; Fix stack move.v d:%Temp v:#h02 push.r s:%Temp call.s a:sub_callerror ; Report the failure ; ============= ; Subroutine - Tokenizer ; Extracts the first token from a string, breaking on the first instance of the token or a null terminator !zone ifirm_sub_tokenize !def CurrAddr Yw !def TokenBrk Yx !def StrLen Zy !def StrAddr Zz :sub_tokenize push.r s:%CurrAddr push.r s:%TokenBrk subr.v d:%SP a:%SP v:#h03 pops.r d:%TokenBrk pops.r d:%CurrAddr addr.v d:%SP a:%SP v:#h05 ; Grab parameters from the stack move.v d:%StrLen v:#h00 ; The string has no length right now move.v d:%StrAddr v:#h00 ; And it doesn't exist in memory yet :.leadloop load.o d:%Temp r:%CurrAddr ; Get the character cmpr.r a:%Temp b:%TokenBrk ; Is it the token character? brch.a c:%NEQ a:.subword ; If not, exit cmpr.v a:%Temp v:#h00 ; Is it the null terminator? brch.a c:%EQL a:.cleanup ; If so, there isn't a word in here at all and we should leave addr.v d:%CurrAddr a:%CurrAddr v:#h01 brch.a a:.leadloop ; Else, keep on truckin :.subword move.r d:%StrAddr s:%CurrAddr ; This character is the first character in the string :.wordloop load.o d:%Temp r:%CurrAddr ; Get the character cmpr.r a:%Temp b:%TokenBrk ; Is it the token character? brch.a c:%EQL a:.tokenfound ; If so, exit cmpr.v a:%Temp v:#h00 ; Is it the null terminator? brch.a c:%EQL a:.tokenfound ; If so, behave like you found the token character addr.v d:%CurrAddr a:%CurrAddr v:#h01 addr.v d:%StrLen a:%StrLen v:#h01 ; The string is ONE CHARACTER LONGER brch.a a:.wordloop ; Else, keep on truckin :.tokenfound ; I don't remember if we need to do something here, so I'll leave the label :.cleanup pops.r d:%TokenBrk pops.r d:%CurrAddr rtrn.s ; Restore and exit ; ============= ; Subroutine - Dictionary Lookup ; Finds a dictionary entry that matches a given name !zone ifirm_sub_dictlookup !def StrAddr Yw !def StrLen Yx !def DictAddr Yy !def EntryLen Zy !def EntryAddr Zz :sub_dictlookup push.r s:%StrAddr push.r s:%StrLen subr.v d:%SP a:%SP v:#h03 pops.r d:%StrLen pops.r d:%StrAddr addr.v d:%SP a:%SP v:#h05 ; Grab parameters from the stack move.v d:%DictAddr v:#h6000 ; Reset the dictionary pointer move.v d:%HeapAddr v:#h7000 ; Reset the heap pointer :.searchloop load.o d:%Temp r:%DictAddr ; Get the description word of the entry cmpr.v d:%Temp a:%Temp v:#h00 ; Is the word zero? brch.a c:%EQL a:.noentry ; If so, we ran out of entries masr.v d:%Temp a:%Temp v:#hFF s:#h0A ; Extract the word length cmpr.r a:%StrLen b:%Temp ; Do the word lengths match? brch.a c:%NEQ a:.nolength ; If not, loop down a few push.r s:%StrAddr push.r s:%Temp push.r s:%DictAddr ; This will save us from hard math later on addr.v d:%DictAddr a:%DictAddr v:#h01 ; String begins one word after definition :.nameloop push.r s:%DictAddr push.r s:%StrAddr load.o d:%DictAddr r:%DictAddr load.o d:%StrAddr r:%StrAddr ; A particularly stupid way of saving a couple of registers cmpr.r a:%DictAddr b:%StrAddr ; Match? brch.a c:%NEQ a:.nomatch ; If not, abort pops.r d:%StrAddr pops.r d:%DictAddr addr.v d:%StrAddr a:%StrAddr v:#h01 addr.v d:%DictAddr a:%DictAddr v:#h01 subr.v d:%Temp a:%Temp v:#h01 ; Advance da pointers cmpr.v a:%Temp v:#h00 brch.a c:%NEQ a:.nameloop ; Loop back up if that word matched :.match pops.r d:%EntryAddr pops.r d:%EntryLen pops.r d:%StrAddr ; Combo of cleanup and saving the dictionary entry brch.a a:.cleanup :.nomatch pops.r d:%StrAddr pops.r d:%DictAddr ; Cleanup pops.r d:%DictAddr pops.r d:%Temp pops.r d:%StrAddr ; Restore the variables we saved :.nolength addr.v d:%Temp a:%Temp v:#h01 addr.r d:%DictAddr a:%DictAddr b:%Temp load.o d:%DictAddr r:%DictAddr ; Get the address of the next entry brch.a a:.searchloop :.noentry move.v d:%EntryAddr v:#h00 move.v d:%EntryLen v:#h00 ; There was no match, so set everything to zero :.cleanup pops.r d:%StrLen pops.r d:%StrAddr rtrn.s ; Restore and exit ; ============= ; Subroutine - Number Converter ; Converts a Forth-style number into a value !zone ifirm_sub_numconvert !def StrAddr Yw !def StrLen Yx !def Base Yy !def Status Zy !def Value Zz :sub_numconvert push.r s:%StrAddr push.r s:%StrLen push.r s:%Base subr.v d:%SP a:%SP v:#h04 pops.r d:%StrLen pops.r d:%StrAddr addr.v d:%SP a:%SP v:#h06 ; Grab parameters from the stack move.v d:%Base v:#h0A ; The default base is 10 move.v d:%Status v:#h00 ; Clear the status register :.modloop load.o d:%Temp r:%StrAddr ; Load the character :.chkpremature cmpr.v a:%Temp v:#h00 ; Is it empty? brch.a c:%NEQ a:.chknegative ; If not, loop down brch.a a:.numberfail ; Abort - there is no number here :.chknegative cmpr.v a:%Temp v:#c'-' ; Is it negative? brch.a c:%NEQ a:.chkpound ; If not, loop down orbt.v d:%Status a:%Status v:#h01 ; Record that the value should be negative brch.a a:.nextmod ; Move on :.chkpound cmpr.v a:%Temp v:#c'#' ; Is it decimal? brch.a c:%NEQ a:.chkampersand ; If not, loop down move.v d:%Base v:#h0A ; Set the base to 10 brch.a a:.nextmod ; Move on :.chkampersand cmpr.v a:%Temp v:#c'&' ; Is it decimal? brch.a c:%NEQ a:.chkdollar ; If not, loop down move.v d:%Base v:#h0A ; Set the base to 10 brch.a a:.nextmod ; Move on :.chkdollar cmpr.v a:%Temp v:#c'$' ; Is it hex? brch.a c:%NEQ a:.chkpercent ; If not, loop down move.v d:%Base v:#h10 ; Set the base to 16 brch.a a:.nextmod ; Move on :.chkpercent cmpr.v a:%Temp v:#c'%' ; Is it binary? brch.a c:%NEQ a:.itsanumber ; If not, loop down move.v d:%Base v:#h02 ; Set the base to 2 :.nextmod addr.v d:%StrAddr a:%StrAddr v:#h01 subr.v d:%StrLen a:%StrLen v:#h01 ; Next character please cmpr.v a:%StrLen v:#h00 ; Are we out of characters? brch.a c:%NEQ a:.modloop ; If not, keep looking :.itsanumber move.v d:%Value v:#h00 ; Clear the accumulator :.numberloop load.o d:%Temp r:%StrAddr ; Load the character cmpr.v a:%Temp v:#h00 ; Is it empty? brch.a c:%NEQ a:.notfinished ; If not, loop down brch.a a:.finish ; Return the number since we're done here :.notfinished orbt.v d:%Temp a:%Temp v:#h20 subr.v d:%Temp a:%Temp v:#h30 ; Force lowercase and shrink down to number range cmpr.v a:%Temp v:#h0A ; Is the digit part of the alphabet? brch.a c:%LST a:.checkrange ; If not, skip this next bit subr.v d:%Temp a:%Temp v:#h27 ; Drop the ASCII lowercase alphabet range (starting at 0x61) to 0xA :.checkrange cmpr.r a:%Temp b:%Base ; Is the number outside of the acceptable range for the base? brch.a c:%GET a:.numberfail ; If so, abort push.r s:%Base ; Make a backup of the base push.r s:%StrLen ; Need another register move.v d:%StrLen v:#h00 ; (Our temporary accumulator) :.multiply addr.r d:%StrLen a:%StrLen b:%Value ; Add another value subr.v d:%Base a:%Base v:#h01 ; This method doesn't work for base == 0, but that doesn't exist so whatever cmpr.v a:%Base v:#h00 ; Done? brch.a c:%NEQ a:.multiply ; If not, better keep going move.r d:%Value s:%StrLen ; Save the multiplied value pops.r d:%StrLen pops.r d:%Base ; And restore working registers addr.r d:%Value a:%Value b:%Temp ; Add the last place :.nextdigit addr.v d:%StrAddr a:%StrAddr v:#h01 subr.v d:%StrLen a:%StrLen v:#h01 ; Next character please cmpr.v a:%StrLen v:#h00 ; Are we out of characters? brch.a c:%NEQ a:.numberloop ; If not, keep looking :.finish cmpr.v a:%Status v:#h01 ; Is the number negative? brch.a c:%NEQ a:.finishstat ; If not, skip the next thing notb.r d:%Value a:%Value addr.v d:%Value a:%Value v:#h01 ; Make it negative :.finishstat move.v d:%Status v:#h00 ; Clear the status register brch.a a:.cleanup ; And exit :.numberfail move.v d:%Status v:#hFF ; A positive status indicates that the string isn't a number :.cleanup pops.r d:%Base pops.r d:%StrLen pops.r d:%StrAddr rtrn.s ; Restore and exit ; ============= ; Subroutine - Number Output ; Outputs a number in the current base. !zone ifirm_sub_numoutput !def Value Yw !def Base Yy !def Divided Zy !def Records Zz :sub_numoutput push.r s:%Value push.r s:%Base subr.v d:%SP a:%SP v:#h03 pops.r d:%Value addr.v d:%SP a:%SP v:#h04 ; Grab parameters from the stack move.v d:%Base v:#h0A ; Just decimal for right now move.v d:%Records v:#h00 ; Print no characters yet cmpr.v a:%Value v:#h00 ; Is the value negative? brch.a c:%GET a:.calcloop ; If not, keep on goin notb.r d:%Value a:%Value addr.v d:%Value a:%Value v:#h01 ; Make positive move.v d:%Records v:#c'-' push.r s:%Records move.v d:%Records v:#h01 ; Quick and dirty negative hack :.calcloop move.v d:%Divided v:#h00 ; Clear divided count :.divideloop cmpr.r a:%Value b:%Base ; Is there a remainder? brch.a c:%LST a:.exitdivide ; Not yet? Then keep it up addr.v d:%Divided a:%Divided v:#h01 ; Record the new number subr.r d:%Value a:%Value b:%Base ; Subtract out a base brch.a a:.divideloop ; Loop it :.exitdivide push.r s:%Value ; Save the digit move.r d:%Value s:%Divided ; Keep the transfer addr.v d:%Records a:%Records v:#h01 ; And note how many digits we kept cmpr.v a:%Value v:#h00 ; Are there more digits to copy? brch.a c:%NEQ a:.calcloop ; If so, keep chuggin :.printloop pops.r d:%Value ; Get the digit back addr.v d:%Value a:%Value v:#h30 ; Push it up to ASCII digit range cmpr.v a:%Value v:#h3A ; Does this need to be a letter? brch.a c:%LST a:.display ; If not, don't make it a letter addr.v d:%Value a:%Value v:#h07 ; Push it a little higher to ASCII uppercase range :.display push.r s:%Records push.r s:%Value call.s a:ser_send pops.r d:%Value pops.r d:%Records ; Print the character, keeping in mind that Records will be zapped subr.v d:%Records a:%Records v:#h01 cmpr.v a:%Records v:#h00 ; We done? brch.a c:%NEQ a:.printloop ; If not, keep going move.v d:%Value v:#h20 push.r s:%Value call.s a:ser_send pops.r d:%Value ; Print the extra space :.cleanup pops.r d:%Base pops.r d:%Value rtrn.s ; Restore and exit ; ============= ; Subroutine - Error Display ; Displays an error message and the current top of stack. Returns to interpreter, aborting execution. !zone ifirm_sub_callerror !def WordAddr Yw !def WordLen Yx !def TypeError Yy !def AuxOutput Zy !def Output Zz :sub_callerror subr.v d:%SP a:%SP v:#h01 pops.r d:%TypeError addr.v d:%SP a:%SP v:#h02 ; Grab parameters from the stack. No need to save them move.v d:%Temp v:#h0A push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print '\n' ; STEP ONE - Print the error that was thrown move.v d:%Temp v:#h3A push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print ':' move.v d:%Temp v:#h20 push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print ' ' push.r s:%TypeError call.s a:sub_numoutput pops.r d:%TypeError ; Print the error number move.v d:%Temp v:#h3A push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print ':' move.v d:%Temp v:#h20 push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print ' ' move.v d:%Temp v:ifirm_errstr.lookup addr.r d:%Temp a:%Temp b:%TypeError load.o d:%Temp r:%Temp ; Grab address of string push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; And print the error move.v d:%Temp v:#h0A push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print '\n' ; STEP TWO - Print the word that fucked us move.v d:%Temp v:ifirm_errstr.setleft push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print ">>>>" load.o d:%WordAddr r:%GL o:#hMemLastAddr load.o d:%WordLen r:%GL o:#hMemLastLen ; Get the name of the word :.nameloop load.o d:%Temp r:%WordAddr push.r s:%Temp call.s a:ser_send pops.r d:%Temp addr.v d:%WordAddr a:%WordAddr v:#h01 subr.v d:%WordLen a:%WordLen v:#h01 cmpr.v a:%WordLen v:#h00 brch.a c:%NEQ a:.nameloop ; Print the bad word move.v d:%Temp v:ifirm_errstr.setright push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print "<<<<\n" ; STEP THREE - Print the stack dump. This is badness move.v d:%Temp v:ifirm_errstr.setstack push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print stack layout message subr.v d:%Temp a:%DSP v:#h03 load.o d:%Temp r:%Temp push.r s:%Temp call.s a:sub_numoutput pops.r d:%Temp ; DSP - 2 subr.v d:%Temp a:%DSP v:#h02 load.o d:%Temp r:%Temp push.r s:%Temp call.s a:sub_numoutput pops.r d:%Temp ; DSP - 1 subr.v d:%Temp a:%DSP v:#h01 load.o d:%Temp r:%Temp push.r s:%Temp call.s a:sub_numoutput pops.r d:%Temp ; DSP move.v d:%Temp v:#h0A push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print '\n' brch.a a:errreentry ; Branch back to the interpreter ; ============= ; Machine Setup ; Initializes the machine. Not necessary when running as a program but good to have anyway !zone ifirm_code :main move.v d:%GL v:#h00 ; The global register is mostly used for branches move.v d:%SP v:#h1700 ; Set up the call stack move.v d:%RSP v:#h1200 ; Set up the return stack move.v d:%DSP v:#h1000 ; Set up the data stack move.v d:%InptAddr v:#h1400 ; Set up the command buffer move.v d:%InptOffs v:#00 ; Set up the command buffer offset move.v d:%Temp v:#h0A stor.o s:%Temp r:%GL o:#hMemBase ; Store the default numerical base - decimal call.s a:ioc_init move.v d:%Temp v:#h7FFF push.r s:%Temp move.v d:%Temp v:#h00 push.r s:%Temp call.s a:ioc_send pops.r d:%Temp pops.r d:%Temp ; Reset the I/O controller :.welcome move.v d:%Temp v:ifirm_str.welcome push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print the welcome message brch.a a:cmdentry ; Jump down to the command handler ; ============= ; Command Buffer ; Gets commands from the user !zone ifirm_cmdbuffer :errreentry move.v d:%SP v:#h1700 ; Set up the call stack :cmdreentry move.v d:%InptAddr v:#h1400 ; Reset the input pointer move.v d:%Temp v:ifirm_str.okprompt push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print the "ok" prompt :cmdentry move.v d:%InptOffs v:#00 ; Set up the command buffer offset :.cmdloop call.s a:ser_srcv ; Get a character from the terminal cmpr.v a:%Output v:#h08 ; Is character a backspace? brch.a c:%NEQ a:.notback ; If not, loop down a few addr.v d:%InptOffs a:%InptOffs v:#h01 ; Decrement the buffer offset move.v d:%Output v:#h08 push.r s:%Output call.s a:ser_send pops.r d:%Output ; Echo a backspace brch.a a:.cmdloop ; And loop back around :.notback cmpr.v a:%Output v:#h0D ; Is character an enter? brch.a c:%NEQ a:.notenter ; If not, loop down a few addr.r d:%Temp a:%InptAddr b:%InptOffs stor.o s:%GL r:%Temp ; Store a zero move.v d:%Temp v:#h20 push.r s:%Temp call.s a:ser_send pops.r d:%Temp ; Print the "I'm processing" space brch.a a:intpentry ; And jump to the interpreter :.notenter cmpr.v a:%InptOffs v:#h10 s:#h03 ; Is the command buffer full? brch.a c:%LET a:.notfull ; If not, loop down a few brch.a a:.cmdloop ; Loop back around, since we can't do anything anymore :.notfull addr.r d:%Temp a:%InptAddr b:%InptOffs stor.o s:%Output r:%Temp ; Store the character addr.v d:%InptOffs a:%InptOffs v:#h01 ; Increment the buffer offset push.r s:%Output call.s a:ser_send pops.r d:%Output ; Echo the character brch.a a:.cmdloop ; And loop back around ; ============= ; Interpreter ; Starts executing the provided words !zone ifirm_interpreter :intpentry move.v d:%InptAddr v:#h1400 ; Reset the input pointer move.v d:%DictAddr v:#h6000 ; Reset the dictionary pointer :.runloop push.r s:%InptAddr move.v d:%Temp v:#h20 push.r s:%Temp call.s a:sub_tokenize pops.r d:%Temp pops.r d:%Temp ; Get a space-delimited string from the input cmpr.v a:%AuxOutput v:#h00 ; Is the string's length zero? brch.a c:%EQL a:.runfinish ; If so, there are no more words to execute push.r s:%Output move.v d:%Temp v:ifirm_str.wordhit push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print the hit message pops.r d:%Output ; Keep in mind that other routines generally clobber Zz stor.o s:%AuxOutput r:%GL o:#hMemLastLen stor.o s:%Output r:%GL o:#hMemLastAddr ; Store the last word called push.r s:%AuxOutput push.r s:%Output ; Save these so we know where to go next push.r s:%Output push.r s:%AuxOutput call.s a:sub_dictlookup pops.r d:%Temp pops.r d:%Temp ; See if there's a dictionary entry matching the word cmpr.v a:%Output v:#h00 ; Is the entry's address zero? brch.a c:%EQL a:.notfound ; If so, the word is invalid addr.v d:%AuxOutput a:%AuxOutput v:#h02 addr.r d:%Output a:%Output b:%AuxOutput ; Calculate the code address load.o d:%Output r:%Output ; Load it push.r s:%Output move.v d:%Temp v:ifirm_str.tmpmatch push.r s:%Temp call.s a:str_puts pops.r d:%Temp ; Print the error message pops.r d:%Output brch.o r:%Output l:%SVSK ; And run the word pops.r d:%Output pops.r d:%AuxOutput ; Restore the buffer pointer and length addr.r d:%InptAddr a:%Output b:%AuxOutput ; Move the buffer pointer to the next word brch.a a:.runloop ; And loop back up to run another word :.notfound pops.r d:%Output pops.r d:%AuxOutput ; Clear the stack push.r s:%AuxOutput push.r s:%Output ; Save these so we know where to go next push.r s:%Output push.r s:%AuxOutput call.s a:sub_numconvert pops.r d:%Temp pops.r d:%Temp ; See if the result was a number cmpr.v a:%AuxOutput v:#h00 ; Was it a number brch.a c:%NEQ a:.notnumber ; If not, abort move.r d:%AuxOutput s:%Output call.s a:sub_pushds ; Onto the stack it goes pops.r d:%Output pops.r d:%AuxOutput ; Restore the buffer pointer and length addr.r d:%InptAddr a:%Output b:%AuxOutput ; Move the buffer pointer to the next word brch.a a:.runloop :.notnumber move.v d:%Temp v:#h03 push.r s:%Temp call.s a:sub_callerror pops.r d:%Temp ; This pop will never be called but whatever :.runfinish brch.a a:cmdreentry ; Not sure if something else needs to be done here, so I'll make it separate ; ============= ; Dictionary ; Predefined words !ip h00006000 :dict_restart !data h40700000 !wstr "restart" !data $dict_period !data $entry ; IT'S A HACK AGAIN :dict_period !data h40100000 !wstr "." !data $dict_add !data $dictc_period :dictc_period call.s a:sub_popsds ; Retrieve the number push.r s:%Output call.s a:sub_numoutput pops.r d:%Output ; Print it rtrn.s ; And return :dict_add !data h40100000 !wstr "+" !data $dict_subtract !data $dictc_add :dictc_add call.s a:sub_popsds move.r d:%StackWorkA s:%Output call.s a:sub_popsds move.r d:%StackWorkB s:%Output ; Get the terms addr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Add em call.s a:sub_pushds ; And put back on the data stack rtrn.s ; And return :dict_subtract !data h40100000 !wstr "-" !data $dict_create !data $dictc_subtract :dictc_subtract call.s a:sub_popsds move.r d:%StackWorkA s:%Output call.s a:sub_popsds move.r d:%StackWorkB s:%Output ; Get the terms subr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Subtract em call.s a:sub_pushds ; And put back on the data stack rtrn.s ; And return :dict_create !data h40600000 !wstr "create" !data $dict_nullentry !data $dictc_create :dictc_create call.s a:sub_popsds move.r d:%StackWorkA s:%Output call.s a:sub_popsds move.r d:%StackWorkB s:%Output ; Get the terms subr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Subtract em call.s a:sub_pushds ; And put back on the data stack rtrn.s ; And return ; ============= ; Heap ; Data and code words !ip h00007000 :dict_nullentry !data h00000000
46.310983
144
0.392271
d290856e6b70aad429fb2dec37409e85d6e67a63
839
php
PHP
application/views/server/error/403.php
sekilas13/kir-13
95d9b1137a300adcd713212b8b5a01ba09067218
[ "MIT" ]
null
null
null
application/views/server/error/403.php
sekilas13/kir-13
95d9b1137a300adcd713212b8b5a01ba09067218
[ "MIT" ]
null
null
null
application/views/server/error/403.php
sekilas13/kir-13
95d9b1137a300adcd713212b8b5a01ba09067218
[ "MIT" ]
null
null
null
<section class="mt-4"> <div class="row justify-content-center"> <div class="col-10"> <div class="card shadow-lg bg-dark text-center"> <div class="card-body"> <div class="row text-light"> <div class="col"> <h1 class="display-1">403</h1> <h3 class="display-3">AKSES DITOLAK</h3> </div> </div> <div class="row"> <p>Anda tidak boleh memasuki laman ini. <a href="<?= base_url('profil'); ?>" class="text-primary">Kembali</a></p> <small class="text-secondary">Status Code ( 403 ) </small> </div> </div> </div> </div> </div> </section>
41.95
137
0.412396
bcd91cadb5420ef4694e3158eca1adc95363544c
629
js
JavaScript
spec/services/rules/SumValues.Spec.js
jasonLiu001/game-play-simulator-request
42c00d0b9e3bbcf0d0fd53f72b406916385fb8ae
[ "MIT" ]
null
null
null
spec/services/rules/SumValues.Spec.js
jasonLiu001/game-play-simulator-request
42c00d0b9e3bbcf0d0fd53f72b406916385fb8ae
[ "MIT" ]
null
null
null
spec/services/rules/SumValues.Spec.js
jasonLiu001/game-play-simulator-request
42c00d0b9e3bbcf0d0fd53f72b406916385fb8ae
[ "MIT" ]
null
null
null
let SumValues = require('../../../dist/services/rules/SumValues').SumValues; let Config = require('../../../dist/config/Config').Config; describe("SumValues Test", () => { let sumValues; Config.globalVariable.last_PrizeNumber = "37274"; beforeEach((done) => { sumValues = new SumValues(); done(); }); it("filterNumbers test", (done) => { sumValues.filterNumbers() .then((result) => { expect(result.killNumberResult).not.toContain('247'); expect(result.killNumberResult).toContain('003'); done(); }); }); });
31.45
76
0.551669
9f59069d4f323bbee221d7d89c4a99f46d7f95d6
3,625
pkb
SQL
taxonomy/biosql/biosql-schema/sql/biosqldb-ora/PkgAPI/Term_Synonym.pkb
sauloal/projects
79068b20251fd29cadbc80a5de550fc77332788d
[ "MIT" ]
null
null
null
taxonomy/biosql/biosql-schema/sql/biosqldb-ora/PkgAPI/Term_Synonym.pkb
sauloal/projects
79068b20251fd29cadbc80a5de550fc77332788d
[ "MIT" ]
null
null
null
taxonomy/biosql/biosql-schema/sql/biosqldb-ora/PkgAPI/Term_Synonym.pkb
sauloal/projects
79068b20251fd29cadbc80a5de550fc77332788d
[ "MIT" ]
1
2018-10-26T05:13:42.000Z
2018-10-26T05:13:42.000Z
-- -*-Sql-*- mode (to keep my emacs happy) -- -- API Package Body for Term_Synonym. -- -- Scaffold auto-generated by gen-api.pl. gen-api.pl is -- Copyright 2002-2003 Genomics Institute of the Novartis Research Foundation -- Copyright 2002-2008 Hilmar Lapp -- -- This file is part of BioSQL. -- -- BioSQL is free software: you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as -- published by the Free Software Foundation, either version 3 of the -- License, or (at your option) any later version. -- -- BioSQL is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public License -- along with BioSQL. If not, see <http://www.gnu.org/licenses/>. -- CREATE OR REPLACE PACKAGE BODY TSyn IS TSyn_cached SG_TERM_SYNONYM.TRM_OID%TYPE DEFAULT NULL; cache_key VARCHAR2(128) DEFAULT NULL; CURSOR TSyn_c (TSyn_TRM_OID IN SG_TERM_SYNONYM.TRM_OID%TYPE, TSyn_NAME IN SG_TERM_SYNONYM.NAME%TYPE) RETURN SG_TERM_SYNONYM%ROWTYPE IS SELECT t.* FROM SG_TERM_SYNONYM t WHERE t.Trm_Oid = TSyn_Trm_Oid AND t.Name = TSyn_Name ; FUNCTION get_oid( TSyn_NAME IN SG_TERM_SYNONYM.NAME%TYPE DEFAULT NULL, TRM_OID IN SG_TERM_SYNONYM.TRM_OID%TYPE DEFAULT NULL, Trm_NAME IN SG_TERM.NAME%TYPE DEFAULT NULL, ONT_OID IN SG_TERM.ONT_OID%TYPE DEFAULT NULL, ONT_NAME IN SG_ONTOLOGY.NAME%TYPE DEFAULT NULL, Trm_IDENTIFIER IN SG_TERM.IDENTIFIER%TYPE DEFAULT NULL, do_DML IN NUMBER DEFAULT BSStd.DML_NO) RETURN SG_TERM_SYNONYM.TRM_OID%TYPE IS pk SG_TERM_SYNONYM.TRM_OID%TYPE DEFAULT NULL; TSyn_row TSyn_c%ROWTYPE; TRM_OID_ SG_TERM.OID%TYPE DEFAULT TRM_OID; key_str VARCHAR2(128) DEFAULT TSyn_Name || '|' || Trm_Oid || '|' || Ont_Oid || '|' || Ont_Name || '|' || Trm_Name || '|' || Trm_Identifier; BEGIN -- initialize -- look up IF pk IS NULL THEN IF (key_str = cache_key) THEN pk := TSyn_cached; ELSE -- reset cache cache_key := NULL; TSyn_cached := NULL; -- look up SG_TERM IF (TRM_OID_ IS NULL) THEN TRM_OID_ := Trm.get_oid( Trm_NAME => Trm_NAME, ONT_OID => ONT_OID, ONT_NAME => ONT_NAME, Trm_IDENTIFIER => Trm_IDENTIFIER); END IF; -- do the look up FOR TSyn_row IN TSyn_c (TRM_OID_, TSyn_NAME) LOOP pk := TSyn_row.TRM_OID; -- cache result cache_key := key_str; TSyn_cached := pk; END LOOP; END IF; END IF; -- insert/update if requested IF (pk IS NULL) AND ((do_DML = BSStd.DML_I) OR (do_DML = BSStd.DML_UI)) THEN -- look up foreign keys if not provided: -- look up SG_TERM successful? IF (TRM_OID_ IS NULL) THEN raise_application_error(-20101, 'failed to look up Trm <' || Trm_NAME || '|' || ONT_OID || '|' || ONT_NAME || '|' || Trm_IDENTIFIER || '>'); END IF; -- insert the record and obtain the primary key pk := do_insert( NAME => TSyn_NAME, TRM_OID => TRM_OID_); END IF; -- no update here -- return the foreign key RETURN TRM_OID_; END; FUNCTION do_insert( TRM_OID IN SG_TERM_SYNONYM.TRM_OID%TYPE, NAME IN SG_TERM_SYNONYM.NAME%TYPE) RETURN SG_TERM_SYNONYM.TRM_OID%TYPE IS BEGIN -- insert the record INSERT INTO SG_TERM_SYNONYM ( NAME, TRM_OID) VALUES (NAME, TRM_OID) ; -- return the foreign key RETURN Trm_OID; END; END TSyn; /
30.462185
140
0.679448
e664b126e93cb39d6e46dbeebe4091b776cd4837
1,398
go
Go
everydate/15/15.go
unbule/leetcode
870c0e334e7944473d5331e3b4c7fdd8ef17f410
[ "Apache-2.0" ]
2
2021-10-04T08:33:08.000Z
2021-10-04T10:51:35.000Z
everydate/15/15.go
unbule/leetcode
870c0e334e7944473d5331e3b4c7fdd8ef17f410
[ "Apache-2.0" ]
null
null
null
everydate/15/15.go
unbule/leetcode
870c0e334e7944473d5331e3b4c7fdd8ef17f410
[ "Apache-2.0" ]
null
null
null
package main import ( "fmt" "sort" "strconv" ) func main() { nums := []int{-1, 0, 1, 2, -1, -4} fmt.Println(threeSum(nums)) } func threeSum(nums []int) [][]int { res := [][]int{} mapp := make(map[string]int) n := len(nums) sort.Ints(nums) //fmt.Println(nums) for i := 0; i < n-2; i++ { for j := i + 1; j < n-1; j++ { slic := nums[j+1:] index := sort.SearchInts(slic, 0-(nums[i]+nums[j])) if index >= len(slic) { continue } if (nums[i]+nums[j])+slic[index] == 0 { cn := make([]int, 3) //fmt.Println("numssss") cn[0] = nums[i] cn[1] = nums[j] cn[2] = slic[index] res = append(res, cn) } } } ans := [][]int{} str := "" for x := 0; x < len(res); x++ { str = "" for _, num := range res[x] { str += strconv.Itoa(num) } if mapp[str] == 1 { continue } ans = append(ans, res[x]) mapp[str] = 1 } return ans } func threeSum1(nums []int) [][]int { n := len(nums) sort.Ints(nums) res := make([][]int, 0) for a := 0; a < n; a++ { if a > 0 && nums[a] == nums[a-1] { continue } c := n - 1 target := -1 * nums[a] for b := a + 1; b < n; b++ { if b > a+1 && nums[b] == nums[b-1] { continue } for b < c && nums[b]+nums[c] > target { c-- } if b == c { break } if nums[b]+nums[c] == target { res = append(res, []int{nums[a], nums[b], nums[c]}) } } } return res }
16.447059
55
0.473534
39fb52e123bb6f3e3b8d3eeaf29eb035a308afa4
4,479
java
Java
src/main/java/org/logo/viewer/logo/graphic/frontend/menu/LogoMenu_About.java
marcosperanza/logo
c893fdf54b3a59c000052858ba16ada4c77709c5
[ "Apache-2.0" ]
null
null
null
src/main/java/org/logo/viewer/logo/graphic/frontend/menu/LogoMenu_About.java
marcosperanza/logo
c893fdf54b3a59c000052858ba16ada4c77709c5
[ "Apache-2.0" ]
null
null
null
src/main/java/org/logo/viewer/logo/graphic/frontend/menu/LogoMenu_About.java
marcosperanza/logo
c893fdf54b3a59c000052858ba16ada4c77709c5
[ "Apache-2.0" ]
null
null
null
/** * * Copyright 2003-2011 Simple Logo Viewer * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.logo.viewer.logo.graphic.frontend.menu; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.GridLayout; import java.awt.Image; import java.awt.MediaTracker; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.net.URL; import javax.swing.BorderFactory; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.KeyStroke; import org.logo.viewer.logo.graphic.frontend.LogoInterface; /** * Una <b>LogoMenu_About</b> * * @author Marco Speranza * @version 0.2 */ public class LogoMenu_About extends JMenu implements ActionListener { /** * Associazione con logo interface */ private LogoInterface logointerface; /** * Creates a new instance of LogoMenu * * @param logointerface * istanza di logo Interface */ public LogoMenu_About(LogoInterface logointerface) { super("About"); this.logointerface = logointerface; setMnemonic(KeyEvent.VK_A); JMenuItem menuItem = makeEntryMenu(); add(menuItem); } /** * Crea il Menu About * * @return Il menu Item */ private JMenuItem makeEntryMenu() { JMenuItem menuItemExit = new JMenuItem("About", KeyEvent.VK_A); menuItemExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.ALT_MASK)); menuItemExit.setActionCommand("About"); menuItemExit.addActionListener(this); return menuItemExit; } /** * Action Perfored * * @param e * Action Event */ public void actionPerformed(ActionEvent e) { if ("About".equals(e.getActionCommand())) { /* * JOptionPane.showMessageDialog(logointerface, "Logo\npipoo", * "About",JOptionPane.INFORMATION_MESSAGE); */ JDialog f = new JDialog(this.logointerface, "About", true); f.setResizable(false); f.setSize(400, 400); JTabbedPane tPanel = new JTabbedPane(); // MediaTracker mt = new MediaTracker(this); Image splashIm = null; MyLogo p2 = null; MediaTracker mt = new MediaTracker(this); URL imageURL = LogoMenu_About.class .getResource("../Img/turtle1.gif"); if (imageURL != null) { splashIm = Toolkit.getDefaultToolkit().createImage(imageURL); p2 = new MyLogo(splashIm); } JPanel tot = new JPanel(new BorderLayout()); JPanel p = new JPanel(new GridLayout(6, 1)); p.setBorder(BorderFactory.createTitledBorder("About")); JLabel l = new JLabel("Visualizzatore LOGO"); l.setFont(new Font(null, Font.BOLD, 20)); JLabel l2 = new JLabel( "Programma scritto da Marco Speranza (marco_speranza@tin.it)"); JLabel l3 = new JLabel( "per il corso di Linguaggi di Programmazione Speciali"); JLabel l4 = new JLabel("prof. Laurent Thery"); JLabel l5 = new JLabel( "Developed with NetBeans IDE 3.5.1 - Java 1.4.1"); JLabel l6 = new JLabel("Under Linux Slackware 9.0"); l5.setFont(new Font(null, Font.PLAIN, 10)); l6.setFont(new Font(null, Font.PLAIN, 10)); p.add(l); p.add(l2); p.add(l3); p.add(l4); p.add(l5); p.add(l6); tot.add(p, BorderLayout.CENTER); tPanel.addTab("About", p2); tPanel.addTab("Detail", tot); f.setLocationRelativeTo(null); // center it f.getContentPane().add(tPanel); f.pack(); f.setVisible(true); } } } class MyLogo extends JPanel { Image i; MyLogo(Image i) { super(new GridLayout(1, 1)); // super(); setPreferredSize(new Dimension(400, 400)); this.i = i; } MyLogo(Image i, int w, int h) { super(new GridLayout(1, 1)); setSize(w, h); // setPreferredSize(new Dimension(w, h)); this.i = i; } public void paint(Graphics g) { if (i != null) { g.drawImage(i, 0, 0, this); } } }
24.342391
75
0.691896
9e347357c3806ff0a0232de972219366b467c0b8
22,194
rs
Rust
rustednes-sdl/src/emulator.rs
jasonrhansen/RustedNES
9317c381ad00cfa3a16bd5924c36dd135522afcb
[ "Apache-2.0", "MIT" ]
5
2020-04-27T18:03:48.000Z
2022-01-20T17:42:11.000Z
rustednes-sdl/src/emulator.rs
jasonrhansen/RustedNES
9317c381ad00cfa3a16bd5924c36dd135522afcb
[ "Apache-2.0", "MIT" ]
null
null
null
rustednes-sdl/src/emulator.rs
jasonrhansen/RustedNES
9317c381ad00cfa3a16bd5924c36dd135522afcb
[ "Apache-2.0", "MIT" ]
null
null
null
use rustednes_common::debugger::{DebugEmulator, Debugger}; use rustednes_common::emulation_mode::EmulationMode; use rustednes_common::state::StateManager; use rustednes_common::time::TimeSource; use rustednes_core::cartridge::Cartridge; use rustednes_core::cpu::CPU_FREQUENCY; use rustednes_core::input::Button; use rustednes_core::memory::Memory; use rustednes_core::nes::Nes; use rustednes_core::ppu::{SCREEN_HEIGHT, SCREEN_WIDTH}; use rustednes_core::sink::*; use sdl2::event::{Event, WindowEvent}; use sdl2::keyboard::{KeyboardState, Keycode, Mod, Scancode}; use sdl2::pixels::{Color, PixelFormat, PixelFormatEnum}; use sdl2::rect::Rect; use sdl2::render::{Canvas, Texture}; use sdl2::video::{FullscreenType, Window}; use sdl2::{EventPump, Sdl}; use tracing::error; use std::path::PathBuf; use std::time::Duration; use std::{mem, thread}; const CPU_CYCLE_TIME_NS: u64 = (1e9_f64 / CPU_FREQUENCY as f64) as u64 + 1; const DEBUG_WIDTH: u32 = 256; const DEBUG_HEIGHT: u32 = 176; const NUMBER_KEYCODES: &[Keycode] = &[ Keycode::Num0, Keycode::Num1, Keycode::Num2, Keycode::Num3, Keycode::Num4, Keycode::Num5, Keycode::Num6, Keycode::Num7, Keycode::Num8, Keycode::Num9, ]; pub struct Emulator<A: AudioSink, T: TimeSource> { nes: Nes, sdl_context: Sdl, mode: EmulationMode, audio_frame_sink: A, time_source: T, start_time_ns: u64, emulated_cycles: u64, emulated_instructions: u64, debugging_graphics: bool, debug_palette_selector: usize, state_manager: StateManager, } impl<A, T> Emulator<A, T> where A: AudioSink, T: TimeSource, { pub fn new( sdl_context: Sdl, cartridge: Cartridge, audio_frame_sink: A, time_source: T, rom_path: PathBuf, ) -> Emulator<A, T> where A: AudioSink, T: TimeSource, { Emulator { nes: Nes::new(cartridge), sdl_context, mode: EmulationMode::Running, audio_frame_sink, time_source, start_time_ns: 0, emulated_cycles: 0, emulated_instructions: 0, debugging_graphics: false, debug_palette_selector: 0, state_manager: StateManager::new(rom_path, NUMBER_KEYCODES.len()), } } pub fn run(&mut self, start_debugger: bool) { let video_subsystem = self.sdl_context.video().unwrap(); let debug_scale = 4; let debug_window = video_subsystem .window( "Debug", DEBUG_WIDTH * debug_scale, DEBUG_HEIGHT * debug_scale, ) .resizable() .hidden() .build() .unwrap(); let mut debug_canvas = debug_window.into_canvas().build().unwrap(); debug_canvas.set_draw_color(Color::BLACK); debug_canvas.clear(); debug_canvas.present(); let window = video_subsystem .window( "RustedNES", SCREEN_WIDTH as u32 * 2, SCREEN_HEIGHT as u32 * 2, ) .position_centered() .resizable() .maximized() .build() .unwrap(); let mut canvas = window.into_canvas().present_vsync().build().unwrap(); canvas.set_draw_color(Color::BLACK); canvas.clear(); canvas.present(); let texture_creator = canvas.texture_creator(); let mut texture = texture_creator .create_texture( Some(PixelFormatEnum::RGB888), sdl2::render::TextureAccess::Target, SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32, ) .unwrap(); self.start_time_ns = self.time_source.time_ns(); let mut debugger = Debugger::new(); if start_debugger { self.mode = EmulationMode::Debugging; debugger.start(&mut self.nes); } // Main event/emulation loop let mut event_pump = self.sdl_context.event_pump().unwrap(); loop { if !self.handle_events( &mut event_pump, &mut debugger, &mut canvas, &mut debug_canvas, ) { break; } let mut frame_written = false; let mut quit = false; canvas .with_texture_canvas(&mut texture, |canvas| { // Run enough emulator cycles to catch up with the time that has passed since the // previous loop iteration. let mut video_frame_sink = CanvasVideoSink::new(canvas); let target_time_ns = self.time_source.time_ns() - self.start_time_ns; let target_cycles = target_time_ns / CPU_CYCLE_TIME_NS; match self.mode { EmulationMode::Running => { let mut start_debugger = false; while self.emulated_cycles < target_cycles && !start_debugger { let (cycles, trigger_watchpoint) = self .nes .step(&mut video_frame_sink, &mut self.audio_frame_sink); self.emulated_cycles += cycles as u64; self.emulated_instructions += 1; if trigger_watchpoint || debugger.at_breakpoint(&self.nes) { start_debugger = true; } } if start_debugger { self.mode = EmulationMode::Debugging; debugger.start(&mut self.nes); } } EmulationMode::Debugging => { if debugger.run_commands(self, &mut video_frame_sink) { quit = true; return; } } } frame_written = video_frame_sink.frame_written(); }) .unwrap(); if quit { break; } if frame_written { self.render_frame(&mut canvas, &mut texture); if self.mode == EmulationMode::Running { self.update_gamepad(event_pump.keyboard_state()); } } if self.debugging_graphics { self.render_debug_window(&mut debug_canvas); } thread::sleep(Duration::new(0, 1_000_000_000 / 60)); } self.cleanup(&mut canvas); } fn step<V: VideoSink>(&mut self, video_frame_sink: &mut V) -> (u32, bool) { let (cycles, trigger_watchpoint) = self.nes.step(video_frame_sink, &mut self.audio_frame_sink); self.emulated_cycles += cycles as u64; self.emulated_instructions += 1; (cycles, trigger_watchpoint) } /// Returns false to signal to end emulation. fn handle_events( &mut self, events: &mut EventPump, debugger: &mut Debugger, canvas: &mut Canvas<Window>, debug_canvas: &mut Canvas<Window>, ) -> bool { for event in events.poll_iter() { match event { Event::KeyDown { window_id, keycode: Some(keycode), keymod, .. } => { let main_window = canvas.window().id() == window_id; let debug_window = debug_canvas.window().id() == window_id; match (keycode, keymod) { (Keycode::Escape, Mod::NOMOD) if main_window => { return false; } (Keycode::F11, Mod::NOMOD) | (Keycode::F, Mod::LCTRLMOD | Mod::RCTRLMOD) | (Keycode::Return, Mod::LALTMOD | Mod::RALTMOD) if main_window => { self.toggle_fullscreen(canvas); } (Keycode::F12, Mod::NOMOD) => { self.mode = EmulationMode::Debugging; debugger.start(&mut self.nes); } (Keycode::F12, Mod::LSHIFTMOD | Mod::RSHIFTMOD) if main_window => { self.toggle_debugging(debug_canvas); } (Keycode::Space, Mod::NOMOD) if debug_window => { self.cycle_debug_palette_selector(); } (Keycode::P, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.pulse_1_enabled = !settings.pulse_1_enabled; } (Keycode::LeftBracket, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.pulse_2_enabled = !settings.pulse_2_enabled; } (Keycode::T, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.triangle_enabled = !settings.triangle_enabled; } (Keycode::N, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.noise_enabled = !settings.noise_enabled; } (Keycode::D, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.dmc_enabled = !settings.dmc_enabled; } (Keycode::F, Mod::NOMOD) => { let settings = &mut self.nes.interconnect.apu.settings; settings.filter_enabled = !settings.filter_enabled; } _ => {} } let ctrl_mod = matches!(keymod, Mod::LCTRLMOD | Mod::RCTRLMOD); for (slot, &num_keycode) in NUMBER_KEYCODES.iter().enumerate() { if keycode == num_keycode { if ctrl_mod { self.state_manager.load_state(&mut self.nes, slot); } else { self.state_manager.save_state(&self.nes, slot); } } } } Event::Window { window_id, win_event, .. } => { let main_window = canvas.window().id() == window_id; let debug_window = debug_canvas.window().id() == window_id; match win_event { WindowEvent::Close if main_window => { return false; } WindowEvent::Close if debug_window => { self.toggle_debugging(debug_canvas); } _ => {} } self.start_time_ns = self.time_source.time_ns() - (self.emulated_cycles * CPU_CYCLE_TIME_NS); } Event::Quit { .. } => return false, _ => {} } } true } fn update_gamepad(&mut self, keyboard_state: KeyboardState) { let game_pad_1 = &mut self.nes.interconnect.input.game_pad_1; game_pad_1.set_button_pressed(Button::A, keyboard_state.is_scancode_pressed(Scancode::X)); game_pad_1.set_button_pressed(Button::B, keyboard_state.is_scancode_pressed(Scancode::Z)); game_pad_1.set_button_pressed( Button::Select, keyboard_state.is_scancode_pressed(Scancode::Space), ); game_pad_1.set_button_pressed( Button::Start, keyboard_state.is_scancode_pressed(Scancode::Return), ); game_pad_1.set_button_pressed(Button::Up, keyboard_state.is_scancode_pressed(Scancode::Up)); game_pad_1.set_button_pressed( Button::Down, keyboard_state.is_scancode_pressed(Scancode::Down), ); game_pad_1.set_button_pressed( Button::Left, keyboard_state.is_scancode_pressed(Scancode::Left), ); game_pad_1.set_button_pressed( Button::Right, keyboard_state.is_scancode_pressed(Scancode::Right), ); } fn set_fullscreen(&mut self, canvas: &mut Canvas<Window>, fullscreen: bool) { let state = if fullscreen { FullscreenType::Desktop } else { FullscreenType::Off }; canvas .window_mut() .set_fullscreen(state) .unwrap_or_else(|e| { error!("Unable to change fullscreen state: {:?}", e); }); } fn toggle_fullscreen(&mut self, canvas: &mut Canvas<Window>) { self.set_fullscreen( canvas, matches!(canvas.window().fullscreen_state(), FullscreenType::Off), ); } fn toggle_debugging(&mut self, debug_canvas: &mut Canvas<Window>) { if self.debugging_graphics { debug_canvas.window_mut().hide(); } else { debug_canvas.window_mut().show(); } self.debugging_graphics = !self.debugging_graphics; } /// Render a frame of emulation. fn render_frame(&mut self, canvas: &mut Canvas<Window>, texture: &mut Texture) { let (canvas_width, canvas_height) = canvas.window().drawable_size(); let dest_rect = scale_to_canvas( SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32, canvas_width, canvas_height, ); canvas.set_draw_color(Color::BLACK); canvas.clear(); canvas.copy(texture, None, Some(dest_rect)).unwrap(); canvas.present(); } /// Render debug info fn render_debug_window(&mut self, debug_canvas: &mut Canvas<Window>) { // Load palette colors // // $3F00 Universal background color // $3F01-$3F03 Background palette 0 // $3F05-$3F07 Background palette 1 // $3F09-$3F0B Background palette 2 // $3F0D-$3F0F Background palette 3 // $3F11-$3F13 Sprite palette 0 // $3F15-$3F17 Sprite palette 1 // $3F19-$3F1B Sprite palette 2 // $3F1D-$3F1F Sprite palette 3 let palette: Vec<u32> = (0x3F00..=0x3F1F) .map(|addr| { let addr = if addr % 4 == 0 { 0x3F00 } else { addr }; XRGB8888_PALETTE[(self.nes.interconnect.ppu.mem.read_byte(addr) & 0x3F) as usize] }) .collect(); let pixel_format: PixelFormat = PixelFormatEnum::RGB888.try_into().unwrap(); let mut mapper = self.nes.interconnect.mapper.borrow_mut(); let texture_creator = debug_canvas.texture_creator(); let mut texture = texture_creator .create_texture( None, sdl2::render::TextureAccess::Target, DEBUG_WIDTH, DEBUG_HEIGHT, ) .unwrap(); debug_canvas .with_texture_canvas(&mut texture, |canvas| { // Draw pattern tables // // DCBA98 76543210 // --------------- // 0HRRRR CCCCPTTT // |||||| |||||+++- T: Fine Y offset, the row number within a tile // |||||| ||||+---- P: Bit plane (0: "lower"; 1: "upper") // |||||| ++++----- C: Tile column // ||++++---------- R: Tile row // |+-------------- H: Half of sprite table (0: "left"; 1: "right") // +--------------- 0: Pattern table is at $0000-$1FFF for half in 0..=1 { for row in 0..16 { for y in 0..8 { let point_y = (row * 8 + y) as i32; for col in 0..16 { let tile_x = (half * 128 + col * 8) as i32; let lower_addr: u16 = half << 12 | row << 8 | col << 4 | y; let upper_addr = lower_addr | 0x08; let lower_byte = mapper.chr_read_byte(lower_addr); let upper_byte = mapper.chr_read_byte(upper_addr); for bit in 0..8 { let palette_index = (((lower_byte & (1 << bit)) >> bit) | ((upper_byte & (1 << bit)) >> (bit - 1))) as usize; canvas.set_draw_color(Color::from_u32( &pixel_format, palette[self.debug_palette_selector * 4 + palette_index], )); canvas .draw_point((tile_x + (7 - bit) as i32, point_y)) .unwrap(); } } } } } // Draw palettes for (i, &color) in palette.iter().enumerate() { canvas.set_draw_color(Color::from_u32(&pixel_format, color)); canvas .fill_rect(Rect::new( i as i32 % 16 * 16, 144 + ((i as i32 / 16) * 16), 16, 16, )) .unwrap(); } // Draw rectangle around selected palette canvas.set_draw_color(Color::WHITE); canvas .draw_rect(Rect::new( self.debug_palette_selector as i32 % 4 * 16 * 4, 144 + ((self.debug_palette_selector as i32 / 4) * 16), 16 * 4, 16, )) .unwrap(); }) .unwrap(); let (canvas_width, canvas_height) = debug_canvas.window().drawable_size(); let dest_rect = scale_to_canvas(DEBUG_WIDTH, DEBUG_HEIGHT, canvas_width, canvas_height); debug_canvas.set_draw_color(Color::BLACK); debug_canvas.clear(); debug_canvas.copy(&texture, None, Some(dest_rect)).unwrap(); debug_canvas.present(); } fn cycle_debug_palette_selector(&mut self) { self.debug_palette_selector = (self.debug_palette_selector + 1) % 8; } fn cleanup(&mut self, canvas: &mut Canvas<Window>) { self.set_fullscreen(canvas, false); self.state_manager.write_state_to_files(); } } fn scale_to_canvas(src_width: u32, src_height: u32, canvas_width: u32, canvas_height: u32) -> Rect { let src_ratio = src_width as f32 / src_height as f32; let dst_ratio = canvas_width as f32 / canvas_height as f32; if src_ratio <= dst_ratio { let width = (src_width as f32 * canvas_height as f32 / src_height as f32) as u32; Rect::new((canvas_width - width) as i32 / 2, 0, width, canvas_height) } else { let height = (src_height as f32 * canvas_width as f32 / src_width as f32) as u32; Rect::new(0, (canvas_height - height) as i32 / 2, canvas_width, height) } } pub struct CanvasVideoSink<'a> { canvas: &'a mut Canvas<Window>, frame_written: bool, } impl<'a> CanvasVideoSink<'a> { pub fn new(canvas: &'a mut Canvas<Window>) -> Self { CanvasVideoSink { canvas, frame_written: false, } } } impl<'a> VideoSink for CanvasVideoSink<'a> { fn write_frame(&mut self, frame_buffer: &[u8]) { let pixel_format = PixelFormatEnum::RGB888.try_into().unwrap(); for (i, palette_index) in frame_buffer.iter().enumerate() { self.canvas.set_draw_color(Color::from_u32( &pixel_format, XRGB8888_PALETTE[*palette_index as usize], )); self.canvas .draw_point(((i % SCREEN_WIDTH) as i32, (i / SCREEN_WIDTH) as i32)) .unwrap(); } self.frame_written = true; } fn frame_written(&self) -> bool { self.frame_written } fn pixel_size(&self) -> usize { mem::size_of::<u32>() } } impl<A, V, T> DebugEmulator<A, V> for Emulator<A, T> where A: AudioSink, V: VideoSink, T: TimeSource, { fn nes(&mut self) -> &mut Nes { &mut self.nes } fn emulated_cycles(&self) -> u64 { self.emulated_cycles } fn emulated_instructions(&self) -> u64 { self.emulated_instructions } fn audio_frame_sink(&mut self) -> &mut A { &mut self.audio_frame_sink } fn mode(&self) -> EmulationMode { self.mode } fn set_mode(&mut self, mode: EmulationMode) { self.mode = mode; } fn reset_start_time(&mut self) { self.start_time_ns = self.time_source.time_ns() - (self.emulated_cycles * CPU_CYCLE_TIME_NS); } fn step(&mut self, video_frame_sink: &mut V) -> (u32, bool) { Emulator::step(self, video_frame_sink) } }
35.228571
101
0.489457
09e9a1035947e29f0d7e8e40699e2a0bad7d116c
380
asm
Assembly
programs/oeis/094/A094259.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/094/A094259.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/094/A094259.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A094259: G.f.: (1-5*x)/((1-6*x)*(1-x)^2). ; 1,3,11,55,315,1871,11203,67191,403115,2418655,14511891,87071303,522427771,3134566575,18807399395,112844396311,677066377803,4062398266751,24374389600435,146246337602535,877478025615131,5264868153690703,31589208922144131,189535253532864695 mov $2,$0 lpb $0 sub $0,1 mul $1,6 add $3,1 add $1,$3 lpe add $1,1 add $1,$2 mov $0,$1
27.142857
239
0.734211
f04fe627efe0144e2458f0c9cbc3a0a35eb65c7d
1,974
js
JavaScript
src/blocks/main.js
peilingjiang/b5.js
ce5a1f89970273f0925d143aa250b0e9bd01c0df
[ "MIT" ]
3
2021-08-30T01:50:12.000Z
2022-01-20T03:10:35.000Z
src/blocks/main.js
peilingjiang/b5.js
ce5a1f89970273f0925d143aa250b0e9bd01c0df
[ "MIT" ]
12
2021-02-28T05:17:10.000Z
2021-12-24T03:26:46.000Z
src/blocks/main.js
peilingjiang/b5.js
ce5a1f89970273f0925d143aa250b0e9bd01c0df
[ "MIT" ]
null
null
null
class _b5Blocks { constructor() { this.custom = {} this.library = this.__proto__.library this.original = this.__proto__ // ? Is it dangerous? } } _b5Blocks.prototype.library = {} /* --------------------------------- Custom --------------------------------- */ _b5Blocks.prototype.createCustom = function ( name, type, kind, inputNodesDetails, outputNodesDetails, run ) { if (this.custom[name]) delete this.custom[name] this.custom[name] = { text: name, type: type, kind: kind, source: 'custom', description: 'Customized block from ' + type + '.', inputNodes: inputNodesDetails, outputNodes: outputNodesDetails, run: function (...args) { return run(...args) }, } } _b5Blocks.prototype.deleteCustom = function (name) { if (this.custom[name]) delete this.custom[name] } _b5Blocks.prototype.cleanCustom = function () { // Delete all custom blocks for (let c in this.custom) delete this.custom[c] } /* --------------------------------- Source --------------------------------- */ _b5Blocks.prototype.getSource = function (name) { for (let i in this) { if (this[i].hasOwnProperty(name)) { return i } } return null } _b5Blocks.prototype.getBlock = function (name) { const s = this.getSource(name) if (!s) return null return this[s][name] } /* -------------------------------- Get Names ------------------------------- */ _b5Blocks.prototype.getOriginalNames = function () { const o = this.original return Object.keys(this.original).reduce((result, key) => { if (typeof o[key] === 'object' && key !== 'library') { result.push(key) } return result }, []) } _b5Blocks.prototype.getLibraryNames = function () { return Object.keys(this.library) } _b5Blocks.prototype.getAllBlockNames = function () { return [ ...this.getLibraryNames(), ...this.getOriginalNames(), ...Object.keys(this.custom), ] } export default _b5Blocks
22.431818
80
0.582067
bb0aee7db31b93a664858d88f23f372d100ec8a5
2,870
rb
Ruby
lib/magpie-gem/property.rb
Redstapler/magpie-gem
276dac488e6685c63e28d5f7dae8a354bdaaf1d4
[ "MIT" ]
null
null
null
lib/magpie-gem/property.rb
Redstapler/magpie-gem
276dac488e6685c63e28d5f7dae8a354bdaaf1d4
[ "MIT" ]
null
null
null
lib/magpie-gem/property.rb
Redstapler/magpie-gem
276dac488e6685c63e28d5f7dae8a354bdaaf1d4
[ "MIT" ]
null
null
null
require 'magpie-gem/property_land.rb' require 'magpie-gem/property_built.rb' require 'magpie-gem/property_space.rb' require 'magpie-gem/property_sale.rb' require 'magpie-gem/property_floor_load_ratio.rb' require 'magpie-gem/media.rb' require 'magpie-gem/contact.rb' require 'magpie-gem/property_amenities.rb' module Magpie class Property < Magpie::Entity DEDUP_ATTRIBUTES = [:address, :city, :state] attr_accessor :name, :description, :zoning, :tax_id_number, :location, :land, :built, :sale, :space, :media, :amenities, :floor_load_ratio, :contacts has_one :location, :class => Magpie::Location has_one :land, :class => Magpie::PropertyLand has_one :built, :class => Magpie::PropertyBuilt has_one :space, :class => Magpie::PropertySpace, :context => 'property' has_one :sale, :class => Magpie::PropertySale has_one :floor_load_ratio, :class => Magpie::PropertyFloorLoadRatio has_many :media, :class => Magpie::Media has_many :contacts, :class => Magpie::Contact has_one :amenities, :class => Magpie::PropertyAmenities, :context => 'property' def initialize self.location = Magpie::Location.new self.land = Magpie::PropertyLand.new self.built = Magpie::PropertyBuilt.new self.sale = Magpie::PropertySale.new self.space = Magpie::PropertySpace.new self.media = [] self.floor_load_ratio = Magpie::PropertyFloorLoadRatio.new self.amenities = Magpie::PropertyAmenities.new self.contacts = [] end def load_from_model(building) super(building) self.name = building.name self.description = building.comment # updated_at: building.updated_at, # active: building.active, # owner_company_id: building.owner_company_id, # management_company_id: building.management_company_id, self.zoning = building.zoning self.tax_id_number = building.parcel self.location.load_from_model(building) self.land.load_from_model(building) self.built.load_from_model(building) self.sale.load_from_model(building) self.space.load_from_model(building) self.media = Magpie::Media.load_medias_from_model(building) self.floor_load_ratio.load_from_model(building) self.amenities.load_from_model(building) self.contacts = Magpie::Contact.load_contacts_from_model(building) self end def model_attributes_base super.merge({ name: @name, comment: @description, zoning: @zoning, parcel: @tax_id_number }) end def sanitize_model_attributes(attrs) attrs[:address] = attrs.delete(:address1) attrs.delete(:address2) attrs end def validate_model_attributes attribs = model_attributes validate_model_attributes_presence [:address, :city, :state, :postal_code], attribs end end end
35.875
153
0.705575
d86224c913a897b7e3bdb7345eae73851b372e1f
135
sql
SQL
services/service-core-db/migrations/2018-05-23-175302_add_index_to_subscription_id_and_status_on_catalog_payments/up.sql
jermiy/services-core
d1dace6a978d901da9566763d568623242ca6d8a
[ "MIT" ]
56
2018-09-27T01:40:09.000Z
2022-03-24T13:08:15.000Z
services/service-core-db/migrations/2018-05-23-175302_add_index_to_subscription_id_and_status_on_catalog_payments/up.sql
jermiy/services-core
d1dace6a978d901da9566763d568623242ca6d8a
[ "MIT" ]
344
2018-08-29T10:15:13.000Z
2022-03-30T14:24:21.000Z
services/service-core-db/migrations/2018-05-23-175302_add_index_to_subscription_id_and_status_on_catalog_payments/up.sql
jermiy/services-core
d1dace6a978d901da9566763d568623242ca6d8a
[ "MIT" ]
41
2018-08-24T15:30:58.000Z
2022-03-11T19:14:43.000Z
-- Your SQL goes here create index idx_payment_subscription_id_and_status on payment_service.catalog_payments(subscription_id, status);
67.5
113
0.874074
d006bc09caa28699fba6c19839c5a2450ed3f2db
400
rb
Ruby
login.rb
sakhtar1/automation_wm
d5bcf236dc9b167f223ec4a636ef7d5a70f89b8b
[ "MIT" ]
null
null
null
login.rb
sakhtar1/automation_wm
d5bcf236dc9b167f223ec4a636ef7d5a70f89b8b
[ "MIT" ]
null
null
null
login.rb
sakhtar1/automation_wm
d5bcf236dc9b167f223ec4a636ef7d5a70f89b8b
[ "MIT" ]
null
null
null
require 'page-object' class LoginPage include PageObject text_field(:email, :id => 'login-email') text_field(:password, :id => 'login-password') button(:send, :id => 'login_page_button') page_url 'https://dev.workmarket.com/login' def login_method( email, password) self.email = email self.password = password send puts "User logged in" end end
20
51
0.6475
20adcf7259a099b84e9fc8540fa21c49692fe28c
622
kt
Kotlin
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LabeledExpressionSpec.kt
Mygod/detekt
691f1d5cde9d6afed6987024eaf473388a31ce7f
[ "Apache-2.0" ]
null
null
null
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LabeledExpressionSpec.kt
Mygod/detekt
691f1d5cde9d6afed6987024eaf473388a31ce7f
[ "Apache-2.0" ]
null
null
null
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LabeledExpressionSpec.kt
Mygod/detekt
691f1d5cde9d6afed6987024eaf473388a31ce7f
[ "Apache-2.0" ]
null
null
null
package io.gitlab.arturbosch.detekt.rules.complexity import io.gitlab.arturbosch.detekt.rules.Case import io.gitlab.arturbosch.detekt.test.lint import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.jetbrains.spek.subject.SubjectSpek /** * @author Ivan Balaksha */ class LabeledExpressionSpec : SubjectSpek<LabeledExpression>({ subject { LabeledExpression() } given("several labeled expressions") { it("reports these labels") { subject.lint(Case.LabeledExpression.path()) assertThat(subject.findings).hasSize(7) } } })
24.88
62
0.778135
cf90ee9e144322267a067aab1220cd58b1777740
5,120
css
CSS
frontend/web/css/custom.css
jccarrizo/deyaju
40c017cfb1e373c9015b2ca03498a19e260bb2e7
[ "BSD-3-Clause" ]
null
null
null
frontend/web/css/custom.css
jccarrizo/deyaju
40c017cfb1e373c9015b2ca03498a19e260bb2e7
[ "BSD-3-Clause" ]
null
null
null
frontend/web/css/custom.css
jccarrizo/deyaju
40c017cfb1e373c9015b2ca03498a19e260bb2e7
[ "BSD-3-Clause" ]
null
null
null
/* Estilos del home */ .glyphicon { font-family: "Font Awesome 5 Free"; font-weight: 900; } .glyphicon-pencil::before { content: "\f044"; } .glyphicon-trash::before { content: "\f2ed"; } .glyphicon-eye-open::before { content: "\f06e"; } .box-img img { width: 100%; height: 150px; object-fit: cover; object-position: center center; } .img-model { display: flex; align-items: center; justify-content: flex-end; height: 30px; color: #fff; width: 98%; background-image: linear-gradient(to bottom, #fff0, #000000a3); position: absolute; bottom: 2px; padding: 0px 10px 0px 10px; } .icon_online, .icon_offline { position: absolute; width: 30px; height: 30px; padding: 5px; } .col-size { width: 15%; float: left; position: relative; padding: 2px 2px 2px 2px; } .container { width: 100% !important; } .site-index .col-sm-12 { padding: 0 !important; } .wrap > .container { padding: 54px 2px 20px !important; } /*****Admin lte3 mod*******/ .control-sidebar { bottom: calc(3.5rem + 1px); position: absolute; top: calc(4.5rem + 1px) !important; z-index: 1031; } .site-index { display: flex; } .search-form-box { display: flex; } .search-form-box form { margin-left: 0px !important; } .search-form-box form, .search-form-box form input { background: #5d6166; border-radius: 5px; border: none; } .search-form-box form input { color: #bec0c2 !important; } .search-form-box form input:focus { background: #5d6166; color: #bec0c2; } .search-form-box i.fas.fa-search { color: #bec0c2; } .content-wrapper > .content { padding: 0px !important; } .modal-content { background-color: #fffffff2 !important; border-radius: 2.3rem !important; } .modal-header { border-bottom: 0px solid #e9ecef !important; } .help-block { color: #cc0000; } .fondo-login, .fondo-registro { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 36px; } .info_login { color: #999; margin: 1em 0; } /*****Fin Admin lte3 mod*******/ /* Transmision */ /*.model_subscriber { color: #fff; display: flex; justify-content: center; align-items: center; background-color: #000000; width: 65%; height: 600px; z-index: -1; } .card.direct-chat.direct-chat-primary{ width: 50%; float: right; height: 500px; } .card.direct-chat.direct-chat-primary .direct-chat-messages{ height: 100%; } #videos{ display: contents; } #subscriber { display: inline-block; width: 50%; height: 500px; }*/ .card.direct-chat.direct-chat-primary { width: 100%; float: right; height: 600px; } .card.direct-chat.direct-chat-primary .direct-chat-messages { height: 100%; /*min-height: 550px;*/ } #videos { display: contents; } #subscriber { /*display: inline-block;*/ min-width: 290px; width: 100%; height: 600px; color: #fff; background-color: #000000; position: relative; } #subscriber .position-h1 { position: absolute; text-align: center; width: calc(100% - 10px); left: 50%; top: 50%; transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); } #subscriberMeter { width: 100%; height: 50px; } .button-scroll-box { display: none; } .popupscroll { position: absolute; right: 10px; bottom: 20px; background: white; height: 40px; width: 40px; border-radius: 50px; display: table; -webkit-box-shadow: 0px 0px 5px 0px #000000; box-shadow: 0px 0px 5px 0px #000000; } .popupscroll .popupscroll-box { display: table-cell; vertical-align: middle; cursor: pointer; } .popupscroll .popupscroll-box div { text-align: center; font-size: 25px; color: gray; margin-top: 3px; } .direct-chat-messages { scroll-behavior: smooth; } /* Registro */ @media (min-width: 576px) { .modal-sm { max-width: 350px !important; } } @media (max-width: 1980px) { .col-size { width: 16.6666666667%; } } @media (max-width: 1800px) { .col-size { width: 20%; } } @media (max-width: 1680px) { .col-size { width: 20%; } } @media (max-width: 1480px) { .col-size { width: 25%; } } @media (max-width: 1280px) { } @media (max-width: 1200px) { .col-size { width: 25%; } } @media (max-width: 997px) { .col-size { width: 33.3%; } #subscriber { width: 100%; height: 280px; } .card.direct-chat.direct-chat-primary { width: 100% !important; float: left !important; } .card.direct-chat.direct-chat-primary .direct-chat-messages { min-height: 100%; } } @media (max-width: 768px) { .col-size { width: 50%; } .site-index { display: initial; } } /*emoji custom*/ .chat-box-content .emojionearea { width: calc(100% - 68px); } .chat-box-content .emojionearea .emojionearea-button { top: 7px; /*margin-right: 0px !important;*/ } .chat-box-content .emojionearea .emojionearea-editor { margin-right: 30px; /*display: flex;*/ overflow: hidden; min-height: 40px; max-height: 50px; } /*emoji custom*/ /* Color TABS */ .card-primary:not(.card-outline) > .card-header { background-color: #343a40 !important; }
16.100629
65
0.633789
53b354af5aa0cf9ed47c629a528c9b9a9a5459ed
858
java
Java
src/com/nazkolcu/examples/chapter04/example02/Characters.java
nazkolcu/OOPJ
26f086f70c04eae64fc4dd6096d93fbacde09a5f
[ "MIT" ]
null
null
null
src/com/nazkolcu/examples/chapter04/example02/Characters.java
nazkolcu/OOPJ
26f086f70c04eae64fc4dd6096d93fbacde09a5f
[ "MIT" ]
null
null
null
src/com/nazkolcu/examples/chapter04/example02/Characters.java
nazkolcu/OOPJ
26f086f70c04eae64fc4dd6096d93fbacde09a5f
[ "MIT" ]
null
null
null
package com.nazkolcu.examples.chapter04.example02; public class Characters { public static void main(String[] args) { char ch = 'a'; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch='A'; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch='9'; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch=' '; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch= '₺'; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch=(char) -5; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); ch=(char) -65535; System.out.println("Character: " + ch + " its numeric value: " + (int) ch); } }
35.75
83
0.534965
208ab53f9574b05d5add70cdac95c670b91c79a0
2,558
lua
Lua
weapon.lua
Zariel/bollo2
df7f0973d0f6436512cc3d5c486b3eb5ac60a662
[ "BSD-3-Clause" ]
1
2016-05-08T11:32:50.000Z
2016-05-08T11:32:50.000Z
weapon.lua
Zariel/bollo2
df7f0973d0f6436512cc3d5c486b3eb5ac60a662
[ "BSD-3-Clause" ]
null
null
null
weapon.lua
Zariel/bollo2
df7f0973d0f6436512cc3d5c486b3eb5ac60a662
[ "BSD-3-Clause" ]
null
null
null
local Bollo = LibStub("AceAddon-3.0"):GetAddon("Bollo2") local w = Bollo:NewModule("Weapons", "AceConsole-3.0", "AceEvent-3.0") local GetWeaponEnchantInfo = GetWeaponEnchantInfo local GetInventoryItemTexture = GetInventoryItemTexture function w:OnEnable() local defaults = { profile = { max = 2, perRow = 2, size = 32, spacing = 20, rowSpacing = 25, growthX = "LEFT", growthY = "DOWN", scale = 1, x = 0, y = 0, color = { r = 1, g = 0, b = 1, a = 0 } } } TemporaryEnchantFrame:SetScript("OnUpdate", nil) TemporaryEnchantFrame:Hide() local weapon = Bollo:NewDisplay("Weapon", "TEMP", defaults) Bollo.RegisterCallback(weapon, "OnUpdate", "Update") weapon:Update() local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges local NewIcon do local GetTimeleft = function(self) --hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo() local id = self.id if id == 16 then return hasMainHandEnchant and mainHandExpiration / 1000 or 0 else return hasOffHandEnchant and offHandExpiration / 1000 or 0 end end local OnEnter = function(self) if self:IsShown() then GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT") GameTooltip:SetInventoryItem("player", self.id) end end local OnMouseUp = function(self, button) if button == "RightButton" then CancelItemTempEnchantment(self.id - 15) end end NewIcon = function() local icon = Bollo:NewIcon() icon:Hide() icon.modules = {} icon.base = "TEMP" icon:SetScript("OnEnter", OnEnter) icon:SetScript("OnMouseUp", OnMouseUp) icon.GetTimeleft = GetTimeleft return icon end end -- Fucking OnUpdate gief events and UnitTempBuff function weapon:Update() if self.config then return end hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo() for i = 1, 2 do local index = i + 15 if i == 1 and hasMainHandEnchant or i == 2 and hasOffHandEnchant then local icon = self.icons[i] or NewIcon() icon.id = index icon:SetNormalTexture(GetInventoryItemTexture("player", icon.id)) icon.base = "TEMP" icon:Setup(self.db.profile) icon:Show() self.icons[i] = icon elseif self.icons[i] and self.icons[i]:IsShown() then Bollo:DelIcon(self.icons[i]) self.icons[i] = nil end end self:UpdatePosition() end end
25.078431
139
0.699375
c7d6efaa05098d250adf1ecd1e85f82f14933551
16,325
py
Python
tests/test_cursor.py
QuiNovas/lambda-pyathena
d91347604df6026d3cc0631a8fd0b149189c1a49
[ "MIT" ]
null
null
null
tests/test_cursor.py
QuiNovas/lambda-pyathena
d91347604df6026d3cc0631a8fd0b149189c1a49
[ "MIT" ]
null
null
null
tests/test_cursor.py
QuiNovas/lambda-pyathena
d91347604df6026d3cc0631a8fd0b149189c1a49
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import contextlib import re import time import unittest from concurrent import futures from concurrent.futures.thread import ThreadPoolExecutor from datetime import date, datetime from decimal import Decimal from random import randint from past.builtins.misc import xrange from pyathena import BINARY, BOOLEAN, DATE, DATETIME, JSON, NUMBER, STRING, TIME, connect from pyathena.cursor import Cursor from pyathena.error import DatabaseError, NotSupportedError, ProgrammingError from pyathena.model import AthenaQueryExecution from tests import WithConnect, SCHEMA, ENV, S3_PREFIX, WORK_GROUP from tests.util import with_cursor class TestCursor(unittest.TestCase, WithConnect): """Reference test case is following: https://github.com/dropbox/PyHive/blob/master/pyhive/tests/dbapi_test_case.py https://github.com/dropbox/PyHive/blob/master/pyhive/tests/test_hive.py https://github.com/dropbox/PyHive/blob/master/pyhive/tests/test_presto.py """ @with_cursor() def test_fetchone(self, cursor): cursor.execute('SELECT * FROM one_row') self.assertEqual(cursor.rownumber, 0) self.assertEqual(cursor.fetchone(), (1,)) self.assertEqual(cursor.rownumber, 1) self.assertIsNone(cursor.fetchone()) self.assertEqual(cursor.database, SCHEMA) self.assertIsNotNone(cursor.query_id) self.assertIsNotNone(cursor.query) self.assertEqual(cursor.statement_type, AthenaQueryExecution.STATEMENT_TYPE_DML) self.assertEqual(cursor.state, AthenaQueryExecution.STATE_SUCCEEDED) self.assertIsNone(cursor.state_change_reason) self.assertIsNotNone(cursor.completion_date_time) self.assertIsInstance(cursor.completion_date_time, datetime) self.assertIsNotNone(cursor.submission_date_time) self.assertIsInstance(cursor.submission_date_time, datetime) self.assertIsNotNone(cursor.data_scanned_in_bytes) self.assertIsNotNone(cursor.execution_time_in_millis) self.assertIsNotNone(cursor.output_location) self.assertIsNone(cursor.encryption_option) self.assertIsNone(cursor.kms_key) self.assertEqual(cursor.work_group, 'primary') @with_cursor() def test_fetchmany(self, cursor): cursor.execute('SELECT * FROM many_rows LIMIT 15') self.assertEqual(len(cursor.fetchmany(10)), 10) self.assertEqual(len(cursor.fetchmany(10)), 5) @with_cursor() def test_fetchall(self, cursor): cursor.execute('SELECT * FROM one_row') self.assertEqual(cursor.fetchall(), [(1,)]) cursor.execute('SELECT a FROM many_rows ORDER BY a') self.assertEqual(cursor.fetchall(), [(i,) for i in xrange(10000)]) @with_cursor() def test_iterator(self, cursor): cursor.execute('SELECT * FROM one_row') self.assertEqual(list(cursor), [(1,)]) self.assertRaises(StopIteration, cursor.__next__) @with_cursor() def test_cache_size(self, cursor): # To test caching, we need to make sure the query is unique, otherwise # we might accidentally pick up the cache results from another CI run. query = 'SELECT * FROM one_row -- {0}'.format(str(datetime.utcnow())) cursor.execute(query) cursor.fetchall() first_query_id = cursor.query_id cursor.execute(query) cursor.fetchall() second_query_id = cursor.query_id # Make sure default behavior is no caching, i.e. same query has # run twice results in different query IDs self.assertNotEqual(first_query_id, second_query_id) cursor.execute(query, cache_size=100) cursor.fetchall() third_query_id = cursor.query_id # When using caching, the same query ID should be returned. self.assertIn(third_query_id, [first_query_id, second_query_id]) @with_cursor() def test_arraysize(self, cursor): cursor.arraysize = 5 cursor.execute('SELECT * FROM many_rows LIMIT 20') self.assertEqual(len(cursor.fetchmany()), 5) @with_cursor() def test_arraysize_default(self, cursor): self.assertEqual(cursor.arraysize, Cursor.DEFAULT_FETCH_SIZE) @with_cursor() def test_invalid_arraysize(self, cursor): with self.assertRaises(ProgrammingError): cursor.arraysize = 10000 with self.assertRaises(ProgrammingError): cursor.arraysize = -1 @with_cursor() def test_description(self, cursor): cursor.execute('SELECT 1 AS foobar FROM one_row') self.assertEqual(cursor.description, [('foobar', 'integer', None, None, 10, 0, 'UNKNOWN')]) @with_cursor() def test_description_initial(self, cursor): self.assertIsNone(cursor.description) @with_cursor() def test_description_failed(self, cursor): try: cursor.execute('blah_blah') except DatabaseError: pass self.assertIsNone(cursor.description) @with_cursor() def test_bad_query(self, cursor): def run(): cursor.execute('SELECT does_not_exist FROM this_really_does_not_exist') cursor.fetchone() self.assertRaises(DatabaseError, run) @with_cursor() def test_fetch_no_data(self, cursor): self.assertRaises(ProgrammingError, cursor.fetchone) self.assertRaises(ProgrammingError, cursor.fetchmany) self.assertRaises(ProgrammingError, cursor.fetchall) @with_cursor() def test_null_param(self, cursor): cursor.execute('SELECT %(param)s FROM one_row', {'param': None}) self.assertEqual(cursor.fetchall(), [(None,)]) @with_cursor() def test_no_params(self, cursor): self.assertRaises(DatabaseError, lambda: cursor.execute( 'SELECT %(param)s FROM one_row')) self.assertRaises(KeyError, lambda: cursor.execute( 'SELECT %(param)s FROM one_row', {'a': 1})) @with_cursor() def test_contain_special_character_query(self, cursor): cursor.execute(""" SELECT col_string FROM one_row_complex WHERE col_string LIKE '%str%' """) self.assertEqual(cursor.fetchall(), [('a string', )]) cursor.execute(""" SELECT col_string FROM one_row_complex WHERE col_string LIKE '%%str%%' """) self.assertEqual(cursor.fetchall(), [('a string', )]) cursor.execute(""" SELECT col_string, '%' FROM one_row_complex WHERE col_string LIKE '%str%' """) self.assertEqual(cursor.fetchall(), [('a string', '%')]) cursor.execute(""" SELECT col_string, '%%' FROM one_row_complex WHERE col_string LIKE '%%str%%' """) self.assertEqual(cursor.fetchall(), [('a string', '%%')]) @with_cursor() def test_contain_special_character_query_with_parameter(self, cursor): self.assertRaises(TypeError, lambda: cursor.execute( """ SELECT col_string, %(param)s FROM one_row_complex WHERE col_string LIKE '%str%' """, {'param': 'a string'})) cursor.execute( """ SELECT col_string, %(param)s FROM one_row_complex WHERE col_string LIKE '%%str%%' """, {'param': 'a string'}) self.assertEqual(cursor.fetchall(), [('a string', 'a string')]) self.assertRaises(ValueError, lambda: cursor.execute( """ SELECT col_string, '%' FROM one_row_complex WHERE col_string LIKE %(param)s """, {'param': '%str%'})) cursor.execute( """ SELECT col_string, '%%' FROM one_row_complex WHERE col_string LIKE %(param)s """, {'param': '%str%'}) self.assertEqual(cursor.fetchall(), [('a string', '%')]) def test_escape(self): bad_str = """`~!@#$%^&*()_+-={}[]|\\;:'",./<>?\n\r\t """ self.run_escape_case(bad_str) @with_cursor() def run_escape_case(self, cursor, bad_str): cursor.execute('SELECT %(a)d, %(b)s FROM one_row', {'a': 1, 'b': bad_str}) self.assertEqual(cursor.fetchall(), [(1, bad_str,)]) @with_cursor() def test_none_empty_query(self, cursor): self.assertRaises(ProgrammingError, lambda: cursor.execute(None)) self.assertRaises(ProgrammingError, lambda: cursor.execute('')) @with_cursor() def test_invalid_params(self, cursor): self.assertRaises(TypeError, lambda: cursor.execute( 'SELECT * FROM one_row', {'foo': {'bar': 1}})) def test_open_close(self): with contextlib.closing(self.connect()): pass with contextlib.closing(self.connect()) as conn: with conn.cursor(): pass @with_cursor() def test_unicode(self, cursor): unicode_str = '王兢' cursor.execute('SELECT %(param)s FROM one_row', {'param': unicode_str}) self.assertEqual(cursor.fetchall(), [(unicode_str,)]) @with_cursor() def test_null(self, cursor): cursor.execute('SELECT null FROM many_rows') self.assertEqual(cursor.fetchall(), [(None,)] * 10000) cursor.execute('SELECT IF(a % 11 = 0, null, a) FROM many_rows') self.assertEqual(cursor.fetchall(), [(None if a % 11 == 0 else a,) for a in xrange(10000)]) @with_cursor() def test_query_id(self, cursor): self.assertIsNone(cursor.query_id) cursor.execute('SELECT * from one_row') # query_id is UUID v4 expected_pattern = \ r'^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$' self.assertTrue(re.match(expected_pattern, cursor.query_id)) @with_cursor() def test_output_location(self, cursor): self.assertIsNone(cursor.output_location) cursor.execute('SELECT * from one_row') self.assertEqual(cursor.output_location, '{0}{1}.csv'.format(ENV.s3_staging_dir, cursor.query_id)) @with_cursor() def test_query_execution_initial(self, cursor): self.assertFalse(cursor.has_result_set) self.assertIsNone(cursor.rownumber) self.assertIsNone(cursor.query_id) self.assertIsNone(cursor.query) self.assertIsNone(cursor.state) self.assertIsNone(cursor.state_change_reason) self.assertIsNone(cursor.completion_date_time) self.assertIsNone(cursor.submission_date_time) self.assertIsNone(cursor.data_scanned_in_bytes) self.assertIsNone(cursor.execution_time_in_millis) self.assertIsNone(cursor.output_location) @with_cursor() def test_complex(self, cursor): cursor.execute(""" SELECT col_boolean ,col_tinyint ,col_smallint ,col_int ,col_bigint ,col_float ,col_double ,col_string ,col_timestamp ,CAST(col_timestamp AS time) AS col_time ,col_date ,col_binary ,col_array ,CAST(col_array AS json) AS col_array_json ,col_map ,CAST(col_map AS json) AS col_map_json ,col_struct ,col_decimal FROM one_row_complex """) self.assertEqual(cursor.description, [ ('col_boolean', 'boolean', None, None, 0, 0, 'UNKNOWN'), ('col_tinyint', 'tinyint', None, None, 3, 0, 'UNKNOWN'), ('col_smallint', 'smallint', None, None, 5, 0, 'UNKNOWN'), ('col_int', 'integer', None, None, 10, 0, 'UNKNOWN'), ('col_bigint', 'bigint', None, None, 19, 0, 'UNKNOWN'), ('col_float', 'float', None, None, 17, 0, 'UNKNOWN'), ('col_double', 'double', None, None, 17, 0, 'UNKNOWN'), ('col_string', 'varchar', None, None, 2147483647, 0, 'UNKNOWN'), ('col_timestamp', 'timestamp', None, None, 3, 0, 'UNKNOWN'), ('col_time', 'time', None, None, 3, 0, 'UNKNOWN'), ('col_date', 'date', None, None, 0, 0, 'UNKNOWN'), ('col_binary', 'varbinary', None, None, 1073741824, 0, 'UNKNOWN'), ('col_array', 'array', None, None, 0, 0, 'UNKNOWN'), ('col_array_json', 'json', None, None, 0, 0, 'UNKNOWN'), ('col_map', 'map', None, None, 0, 0, 'UNKNOWN'), ('col_map_json', 'json', None, None, 0, 0, 'UNKNOWN'), ('col_struct', 'row', None, None, 0, 0, 'UNKNOWN'), ('col_decimal', 'decimal', None, None, 10, 1, 'UNKNOWN'), ]) rows = cursor.fetchall() expected = [( True, 127, 32767, 2147483647, 9223372036854775807, 0.5, 0.25, 'a string', datetime(2017, 1, 1, 0, 0, 0), datetime(2017, 1, 1, 0, 0, 0).time(), date(2017, 1, 2), b'123', '[1, 2]', [1, 2], '{1=2, 3=4}', {'1': 2, '3': 4}, '{a=1, b=2}', Decimal('0.1'), )] self.assertEqual(rows, expected) # catch unicode/str self.assertEqual(list(map(type, rows[0])), list(map(type, expected[0]))) # compare dbapi type object self.assertEqual([d[1] for d in cursor.description], [ BOOLEAN, NUMBER, NUMBER, NUMBER, NUMBER, NUMBER, NUMBER, STRING, DATETIME, TIME, DATE, BINARY, STRING, JSON, STRING, JSON, STRING, NUMBER, ]) @with_cursor() def test_cancel(self, cursor): def cancel(c): time.sleep(randint(1, 5)) c.cancel() with ThreadPoolExecutor(max_workers=1) as executor: executor.submit(cancel, cursor) self.assertRaises(DatabaseError, lambda: cursor.execute(""" SELECT a.a * rand(), b.a * rand() FROM many_rows a CROSS JOIN many_rows b """)) @with_cursor() def test_cancel_initial(self, cursor): self.assertRaises(ProgrammingError, cursor.cancel) def test_multiple_connection(self): def execute_other_thread(): with contextlib.closing(connect(schema_name=SCHEMA)) as conn: with conn.cursor() as cursor: cursor.execute('SELECT * FROM one_row') return cursor.fetchall() with ThreadPoolExecutor(max_workers=2) as executor: fs = [executor.submit(execute_other_thread) for _ in range(2)] for f in futures.as_completed(fs): self.assertEqual(f.result(), [(1,)]) def test_no_ops(self): conn = self.connect() cursor = conn.cursor() self.assertEqual(cursor.rowcount, -1) cursor.setinputsizes([]) cursor.setoutputsize(1, 'blah') self.assertRaises(NotSupportedError, lambda: cursor.executemany( 'SELECT * FROM one_row', [])) conn.commit() self.assertRaises(NotSupportedError, lambda: conn.rollback()) cursor.close() conn.close() @with_cursor() def test_show_partition(self, cursor): location = '{0}{1}/{2}/'.format( ENV.s3_staging_dir, S3_PREFIX, 'partition_table') for i in xrange(10): cursor.execute(""" ALTER TABLE partition_table ADD PARTITION (b=%(b)d) LOCATION %(location)s """, {'b': i, 'location': location}) cursor.execute('SHOW PARTITIONS partition_table') self.assertEqual(sorted(cursor.fetchall()), [('b={0}'.format(i),) for i in xrange(10)]) @with_cursor(work_group=WORK_GROUP) def test_workgroup(self, cursor): cursor.execute('SELECT * FROM one_row') self.assertEqual(cursor.work_group, WORK_GROUP)
38.142523
89
0.597672
6e198b3b78b2db7756f398ebe179bab94d0314ef
272
html
HTML
query/landscapes/index-tags.html
postman-open-technologies/explore
57406d83ed1a03a99de259b105d69ae987aeff4a
[ "Apache-2.0" ]
null
null
null
query/landscapes/index-tags.html
postman-open-technologies/explore
57406d83ed1a03a99de259b105d69ae987aeff4a
[ "Apache-2.0" ]
null
null
null
query/landscapes/index-tags.html
postman-open-technologies/explore
57406d83ed1a03a99de259b105d69ae987aeff4a
[ "Apache-2.0" ]
null
null
null
--- layout: none --- {% assign landscapes = site.data.landscape %} {% for landscape in landscapes %} {% for tag in landscape.tags %} INSERT INTO landscapes_tags(tag,landscape_name) VALUES('{{ tag }}','{{ landscape.name }}');<br> {% endfor %} {% endfor %}
24.727273
98
0.610294
18df98e7270a6eb75de76f25256b9d1509a71c5a
176
rb
Ruby
config/routes.rb
Assist-DevQ/back-end-api
516e65d4d9a48cdf931d9bcf01518d5a081008d9
[ "MIT" ]
1
2019-10-31T07:59:48.000Z
2019-10-31T07:59:48.000Z
config/routes.rb
Assist-DevQ/back-end-api
516e65d4d9a48cdf931d9bcf01518d5a081008d9
[ "MIT" ]
2
2022-02-12T23:38:53.000Z
2022-02-26T19:31:21.000Z
config/routes.rb
Assist-DevQ/back-end-api
516e65d4d9a48cdf931d9bcf01518d5a081008d9
[ "MIT" ]
null
null
null
Rails.application.routes.draw do mount Admin::RootApi => '/admin/api/v1' mount Extension::RootApi => '/extension/api/v1' mount Common::WebHooksApi => '/api/v1/hooks' end
29.333333
49
0.710227
263d16f93d3f134805914aef5777b1781d7d7b73
185
java
Java
src/main/java/dev/cheun/exceptions/InvalidCreateException.java
dcheun/bankAPI
795166d3bcd1ba4ebd51bea1822edf24a9c0c029
[ "MIT" ]
null
null
null
src/main/java/dev/cheun/exceptions/InvalidCreateException.java
dcheun/bankAPI
795166d3bcd1ba4ebd51bea1822edf24a9c0c029
[ "MIT" ]
null
null
null
src/main/java/dev/cheun/exceptions/InvalidCreateException.java
dcheun/bankAPI
795166d3bcd1ba4ebd51bea1822edf24a9c0c029
[ "MIT" ]
null
null
null
package dev.cheun.exceptions; public class InvalidCreateException extends RuntimeException { public InvalidCreateException(String message) { super(message); } }
23.125
63
0.724324
f1126f9df8ec1ab312b3f72b4662a7c633c2e28d
53
sql
SQL
schema/create_schema.sql
octonion/boxing
37180f311bd96c317a76549e63be0d80a7e6d2ab
[ "MIT" ]
9
2015-05-04T19:48:35.000Z
2021-05-03T00:34:08.000Z
schema/create_schema.sql
octonion/boxing
37180f311bd96c317a76549e63be0d80a7e6d2ab
[ "MIT" ]
1
2017-06-14T19:30:17.000Z
2017-06-14T19:30:17.000Z
schema/create_schema.sql
octonion/boxing
37180f311bd96c317a76549e63be0d80a7e6d2ab
[ "MIT" ]
2
2018-05-25T22:09:08.000Z
2019-09-09T19:25:55.000Z
begin; create schema if not exists boxrec; commit;
8.833333
35
0.754717
0a27437b62a83852e71b08baa16c8b6457492e62
688
h
C
Engine/src/Renderer/Techniques/Transparent.h
venCjin/GameEngineProject
d8bdc8fc7236d74f6ecb5e8a8a5211699cc84d22
[ "Apache-2.0" ]
1
2020-03-04T20:46:40.000Z
2020-03-04T20:46:40.000Z
Engine/src/Renderer/Techniques/Transparent.h
venCjin/GameEngineProject
d8bdc8fc7236d74f6ecb5e8a8a5211699cc84d22
[ "Apache-2.0" ]
null
null
null
Engine/src/Renderer/Techniques/Transparent.h
venCjin/GameEngineProject
d8bdc8fc7236d74f6ecb5e8a8a5211699cc84d22
[ "Apache-2.0" ]
null
null
null
#pragma once #include "Technique.h" #include "Renderer/Techniques/AnimationPBR.h" namespace sixengine{ class TransparentTechnique : public Technique { private: UniformBuffer m_Models; UniformBuffer m_Layers; StorageBuffer m_Bones; std::vector<std::vector<glm::mat4>> m_Transforms; public: TransparentTechnique(Shader* shader); void Start(TextureArray* textureArray) override; void StartFrame(std::vector<RendererCommand*>& commandList, std::vector<DrawElementsCommand> drawCommands, std::vector<glm::mat4>& models, std::vector<glm::vec4> layers) override; void Render(std::vector<RendererCommand*>& commandList) override; void FinishFrame() override; }; }
25.481481
108
0.763081
3d09ea408a72e4744f471c00f976db4472db4346
265
go
Go
cmd_example.go
etcdhosts/dnsctl
8de5ae41edc4ccd28194ec0a7d9897bbc44b2751
[ "Apache-2.0" ]
null
null
null
cmd_example.go
etcdhosts/dnsctl
8de5ae41edc4ccd28194ec0a7d9897bbc44b2751
[ "Apache-2.0" ]
null
null
null
cmd_example.go
etcdhosts/dnsctl
8de5ae41edc4ccd28194ec0a7d9897bbc44b2751
[ "Apache-2.0" ]
null
null
null
package main import ( "fmt" "github.com/urfave/cli/v2" ) func exampleCmd() *cli.Command { return &cli.Command{ Name: "example", Usage: "Print example config", Action: func(c *cli.Context) error { fmt.Println(ExampleConfig()) return nil }, } }
13.947368
38
0.649057
e659633b81ce56d12ea48eec2c19bddf5de43f30
1,332
go
Go
old/run.go
client9/gsh
20c0a63f5f73eeb1fad3445bd25a0bf2a69d7001
[ "MIT" ]
2
2016-05-03T14:22:52.000Z
2017-02-08T15:11:37.000Z
old/run.go
client9/gsh
20c0a63f5f73eeb1fad3445bd25a0bf2a69d7001
[ "MIT" ]
null
null
null
old/run.go
client9/gsh
20c0a63f5f73eeb1fad3445bd25a0bf2a69d7001
[ "MIT" ]
null
null
null
package gsh import ( "github.com/google/shlex" "gopkg.in/pipe.v2" ) var CmdMap = map[string]func(argv ...string) pipe.Pipe{ "wget": Wget, "which": Which, "base64": Base64, "cat": Cat, "head": Head, "gitLastModified": GitLastModified, "fileLastModified": FileLastModified, "strptime": ParseTime, } // Run runs a full shell style command "ls -l /foo" func Run(argv ...string) pipe.Pipe { if len(argv) == 0 { return nil } args, err := shlex.Split(argv[0]) if err != nil { return nil } // now group based on "|" command pipes := make([]pipe.Pipe, 0) cmdarg := make([]string, 0) for _, a := range args { if a == "|" { p := RunArgs(cmdarg[0], cmdarg[1:]...) if p == nil { return nil } pipes = append(pipes, p) cmdarg = make([]string, 0) } else { cmdarg = append(cmdarg, a) } } if len(cmdarg) > 0 { p := RunArgs(cmdarg[0], cmdarg[1:]...) if p == nil { return nil } pipes = append(pipes, p) } // minor optimization if only 1 if len(pipes) == 1 { return pipes[0] } return pipe.Line(pipes...) } // RunArgs runs a single command with explicit arguments func RunArgs(cmd string, args ...string) pipe.Pipe { fn, ok := CmdMap[cmd] if !ok { return pipe.Exec(cmd, args...) } return fn(args...) }
19.304348
56
0.573574
48f11a96f1a6eac048f9159a9af81a7eaff3c99b
2,080
sql
SQL
backend/manager/dbscripts/upgrade/03_02_0240_add_gluster_action_version_map.sql
SunOfShine/ovirt-engine
7684597e2d38ff854e629e5cbcbb9f21888cb498
[ "Apache-2.0" ]
1
2021-02-02T05:38:35.000Z
2021-02-02T05:38:35.000Z
backend/manager/dbscripts/upgrade/03_02_0240_add_gluster_action_version_map.sql
SunOfShine/ovirt-engine
7684597e2d38ff854e629e5cbcbb9f21888cb498
[ "Apache-2.0" ]
null
null
null
backend/manager/dbscripts/upgrade/03_02_0240_add_gluster_action_version_map.sql
SunOfShine/ovirt-engine
7684597e2d38ff854e629e5cbcbb9f21888cb498
[ "Apache-2.0" ]
null
null
null
-- Create gluster volume insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1400, '3.1', '*'); -- Set gluster volume option insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1401, '3.1', '*'); -- Start gluster volume insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1402, '3.1', '*'); -- Stop gluster volume insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1403, '3.1', '*'); -- Reset gluster volume options insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1404, '3.1', '*'); -- Delete gluster volume insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1405, '3.1', '*'); -- Gluster volume remove bricks insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1406, '3.1', '*'); -- Start gluster volume rebalance insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1407, '3.1', '*'); -- Replace gluster volume bricks insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1408, '3.1', '*'); -- Add bricks to Gluster volume insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1409, '3.1', '*'); -- Start Gluster volume profile insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1410, '3.2', '*'); -- Stop gluster volume profile insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1411, '3.2', '*'); -- Remove gluster server insert into action_version_map (action_type, cluster_minimal_version, storage_pool_minimal_version) values(1412, '3.2', '*');
39.245283
99
0.776923
5db3a8dd5c724bf65fcf9c8cb3b2da6c6f8dd338
12,503
go
Go
apis/certificates/v1alpha1/management_certificate_types.go
kubeform/provider-oci-api
37ea984e430635260b660a9aaa04df13e6eade6c
[ "Apache-2.0" ]
1
2021-08-02T20:15:06.000Z
2021-08-02T20:15:06.000Z
apis/certificates/v1alpha1/management_certificate_types.go
kubeform/provider-oci-api
37ea984e430635260b660a9aaa04df13e6eade6c
[ "Apache-2.0" ]
2
2021-08-01T11:05:08.000Z
2021-08-02T15:47:10.000Z
apis/certificates/v1alpha1/management_certificate_types.go
kubeform/provider-oci-api
37ea984e430635260b660a9aaa04df13e6eade6c
[ "Apache-2.0" ]
null
null
null
/* Copyright AppsCode Inc. and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by Kubeform. DO NOT EDIT. package v1alpha1 import ( base "kubeform.dev/apimachinery/api/v1alpha1" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" "sigs.k8s.io/cli-utils/pkg/kstatus/status" ) // +genclient // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` type ManagementCertificate struct { metav1.TypeMeta `json:",inline,omitempty"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ManagementCertificateSpec `json:"spec,omitempty"` Status ManagementCertificateStatus `json:"status,omitempty"` } type ManagementCertificateSpecCertificateConfigSubject struct { CommonName *string `json:"commonName" tf:"common_name"` // +optional Country *string `json:"country,omitempty" tf:"country"` // +optional DistinguishedNameQualifier *string `json:"distinguishedNameQualifier,omitempty" tf:"distinguished_name_qualifier"` // +optional DomainComponent *string `json:"domainComponent,omitempty" tf:"domain_component"` // +optional GenerationQualifier *string `json:"generationQualifier,omitempty" tf:"generation_qualifier"` // +optional GivenName *string `json:"givenName,omitempty" tf:"given_name"` // +optional Initials *string `json:"initials,omitempty" tf:"initials"` // +optional LocalityName *string `json:"localityName,omitempty" tf:"locality_name"` // +optional Organization *string `json:"organization,omitempty" tf:"organization"` // +optional OrganizationalUnit *string `json:"organizationalUnit,omitempty" tf:"organizational_unit"` // +optional Pseudonym *string `json:"pseudonym,omitempty" tf:"pseudonym"` // +optional SerialNumber *string `json:"serialNumber,omitempty" tf:"serial_number"` // +optional StateOrProvinceName *string `json:"stateOrProvinceName,omitempty" tf:"state_or_province_name"` // +optional Street *string `json:"street,omitempty" tf:"street"` // +optional Surname *string `json:"surname,omitempty" tf:"surname"` // +optional Title *string `json:"title,omitempty" tf:"title"` // +optional UserID *string `json:"userID,omitempty" tf:"user_id"` } type ManagementCertificateSpecCertificateConfigSubjectAlternativeNames struct { Type *string `json:"type" tf:"type"` Value *string `json:"value" tf:"value"` } type ManagementCertificateSpecCertificateConfigValidity struct { TimeOfValidityNotAfter *string `json:"timeOfValidityNotAfter" tf:"time_of_validity_not_after"` // +optional TimeOfValidityNotBefore *string `json:"timeOfValidityNotBefore,omitempty" tf:"time_of_validity_not_before"` } type ManagementCertificateSpecCertificateConfig struct { // +optional CertificateProfileType *string `json:"certificateProfileType,omitempty" tf:"certificate_profile_type"` ConfigType *string `json:"configType" tf:"config_type"` // +optional CsrPem *string `json:"csrPem,omitempty" tf:"csr_pem"` // +optional IssuerCertificateAuthorityID *string `json:"issuerCertificateAuthorityID,omitempty" tf:"issuer_certificate_authority_id"` // +optional KeyAlgorithm *string `json:"keyAlgorithm,omitempty" tf:"key_algorithm"` // +optional SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty" tf:"signature_algorithm"` // +optional Subject *ManagementCertificateSpecCertificateConfigSubject `json:"subject,omitempty" tf:"subject"` // +optional SubjectAlternativeNames []ManagementCertificateSpecCertificateConfigSubjectAlternativeNames `json:"subjectAlternativeNames,omitempty" tf:"subject_alternative_names"` // +optional Validity *ManagementCertificateSpecCertificateConfigValidity `json:"validity,omitempty" tf:"validity"` // +optional VersionName *string `json:"versionName,omitempty" tf:"version_name"` } type ManagementCertificateSpecCertificateRevocationListDetailsObjectStorageConfig struct { // +optional ObjectStorageBucketName *string `json:"objectStorageBucketName,omitempty" tf:"object_storage_bucket_name"` // +optional ObjectStorageNamespace *string `json:"objectStorageNamespace,omitempty" tf:"object_storage_namespace"` // +optional ObjectStorageObjectNameFormat *string `json:"objectStorageObjectNameFormat,omitempty" tf:"object_storage_object_name_format"` } type ManagementCertificateSpecCertificateRevocationListDetails struct { // +optional CustomFormattedUrls []string `json:"customFormattedUrls,omitempty" tf:"custom_formatted_urls"` // +optional ObjectStorageConfig *ManagementCertificateSpecCertificateRevocationListDetailsObjectStorageConfig `json:"objectStorageConfig,omitempty" tf:"object_storage_config"` } type ManagementCertificateSpecCertificateRules struct { AdvanceRenewalPeriod *string `json:"advanceRenewalPeriod" tf:"advance_renewal_period"` RenewalInterval *string `json:"renewalInterval" tf:"renewal_interval"` RuleType *string `json:"ruleType" tf:"rule_type"` } type ManagementCertificateSpecCurrentVersionRevocationStatus struct { // +optional RevocationReason *string `json:"revocationReason,omitempty" tf:"revocation_reason"` // +optional TimeOfRevocation *string `json:"timeOfRevocation,omitempty" tf:"time_of_revocation"` } type ManagementCertificateSpecCurrentVersionSubjectAlternativeNames struct { // +optional Type *string `json:"type,omitempty" tf:"type"` // +optional Value *string `json:"value,omitempty" tf:"value"` } type ManagementCertificateSpecCurrentVersionValidity struct { // +optional TimeOfValidityNotAfter *string `json:"timeOfValidityNotAfter,omitempty" tf:"time_of_validity_not_after"` // +optional TimeOfValidityNotBefore *string `json:"timeOfValidityNotBefore,omitempty" tf:"time_of_validity_not_before"` } type ManagementCertificateSpecCurrentVersion struct { // +optional CertificateID *string `json:"certificateID,omitempty" tf:"certificate_id"` // +optional IssuerCaVersionNumber *string `json:"issuerCaVersionNumber,omitempty" tf:"issuer_ca_version_number"` // +optional RevocationStatus *ManagementCertificateSpecCurrentVersionRevocationStatus `json:"revocationStatus,omitempty" tf:"revocation_status"` // +optional SerialNumber *string `json:"serialNumber,omitempty" tf:"serial_number"` // +optional Stages []string `json:"stages,omitempty" tf:"stages"` // +optional SubjectAlternativeNames []ManagementCertificateSpecCurrentVersionSubjectAlternativeNames `json:"subjectAlternativeNames,omitempty" tf:"subject_alternative_names"` // +optional TimeCreated *string `json:"timeCreated,omitempty" tf:"time_created"` // +optional TimeOfDeletion *string `json:"timeOfDeletion,omitempty" tf:"time_of_deletion"` // +optional Validity *ManagementCertificateSpecCurrentVersionValidity `json:"validity,omitempty" tf:"validity"` // +optional VersionName *string `json:"versionName,omitempty" tf:"version_name"` // +optional VersionNumber *string `json:"versionNumber,omitempty" tf:"version_number"` } type ManagementCertificateSpecSubject struct { // +optional CommonName *string `json:"commonName,omitempty" tf:"common_name"` // +optional Country *string `json:"country,omitempty" tf:"country"` // +optional DistinguishedNameQualifier *string `json:"distinguishedNameQualifier,omitempty" tf:"distinguished_name_qualifier"` // +optional DomainComponent *string `json:"domainComponent,omitempty" tf:"domain_component"` // +optional GenerationQualifier *string `json:"generationQualifier,omitempty" tf:"generation_qualifier"` // +optional GivenName *string `json:"givenName,omitempty" tf:"given_name"` // +optional Initials *string `json:"initials,omitempty" tf:"initials"` // +optional LocalityName *string `json:"localityName,omitempty" tf:"locality_name"` // +optional Organization *string `json:"organization,omitempty" tf:"organization"` // +optional OrganizationalUnit *string `json:"organizationalUnit,omitempty" tf:"organizational_unit"` // +optional Pseudonym *string `json:"pseudonym,omitempty" tf:"pseudonym"` // +optional SerialNumber *string `json:"serialNumber,omitempty" tf:"serial_number"` // +optional StateOrProvinceName *string `json:"stateOrProvinceName,omitempty" tf:"state_or_province_name"` // +optional Street *string `json:"street,omitempty" tf:"street"` // +optional Surname *string `json:"surname,omitempty" tf:"surname"` // +optional Title *string `json:"title,omitempty" tf:"title"` // +optional UserID *string `json:"userID,omitempty" tf:"user_id"` } type ManagementCertificateSpec struct { State *ManagementCertificateSpecResource `json:"state,omitempty" tf:"-"` Resource ManagementCertificateSpecResource `json:"resource" tf:"resource"` UpdatePolicy base.UpdatePolicy `json:"updatePolicy,omitempty" tf:"-"` TerminationPolicy base.TerminationPolicy `json:"terminationPolicy,omitempty" tf:"-"` ProviderRef core.LocalObjectReference `json:"providerRef" tf:"-"` BackendRef *core.LocalObjectReference `json:"backendRef,omitempty" tf:"-"` } type ManagementCertificateSpecResource struct { Timeouts *base.ResourceTimeout `json:"timeouts,omitempty" tf:"timeouts"` ID string `json:"id,omitempty" tf:"id,omitempty"` CertificateConfig *ManagementCertificateSpecCertificateConfig `json:"certificateConfig" tf:"certificate_config"` // +optional CertificateProfileType *string `json:"certificateProfileType,omitempty" tf:"certificate_profile_type"` // +optional CertificateRevocationListDetails *ManagementCertificateSpecCertificateRevocationListDetails `json:"certificateRevocationListDetails,omitempty" tf:"certificate_revocation_list_details"` // +optional CertificateRules []ManagementCertificateSpecCertificateRules `json:"certificateRules,omitempty" tf:"certificate_rules"` CompartmentID *string `json:"compartmentID" tf:"compartment_id"` // +optional ConfigType *string `json:"configType,omitempty" tf:"config_type"` // +optional CurrentVersion *ManagementCertificateSpecCurrentVersion `json:"currentVersion,omitempty" tf:"current_version"` // +optional DefinedTags map[string]string `json:"definedTags,omitempty" tf:"defined_tags"` // +optional Description *string `json:"description,omitempty" tf:"description"` // +optional FreeformTags map[string]string `json:"freeformTags,omitempty" tf:"freeform_tags"` // +optional IssuerCertificateAuthorityID *string `json:"issuerCertificateAuthorityID,omitempty" tf:"issuer_certificate_authority_id"` // +optional KeyAlgorithm *string `json:"keyAlgorithm,omitempty" tf:"key_algorithm"` // +optional LifecycleDetails *string `json:"lifecycleDetails,omitempty" tf:"lifecycle_details"` Name *string `json:"name" tf:"name"` // +optional SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty" tf:"signature_algorithm"` // +optional State *string `json:"state,omitempty" tf:"state"` // +optional Subject *ManagementCertificateSpecSubject `json:"subject,omitempty" tf:"subject"` // +optional TimeCreated *string `json:"timeCreated,omitempty" tf:"time_created"` // +optional TimeOfDeletion *string `json:"timeOfDeletion,omitempty" tf:"time_of_deletion"` } type ManagementCertificateStatus struct { // Resource generation, which is updated on mutation by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // +optional Phase status.Status `json:"phase,omitempty"` // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // ManagementCertificateList is a list of ManagementCertificates type ManagementCertificateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is a list of ManagementCertificate CRD objects Items []ManagementCertificate `json:"items,omitempty"` }
42.527211
185
0.785731
bb1ff350b1b794862272317d84cdc2830817581a
455
rb
Ruby
facts/linux/service_running_fact.rb
sergueik/puppetmaster_vagrant
4ce82f9618a040206a695038bfe8f8fc21cdfcb6
[ "MIT" ]
3
2016-02-04T22:24:59.000Z
2020-04-13T17:09:30.000Z
facts/linux/service_running_fact.rb
sergueik/puppetmaster_vagrant
4ce82f9618a040206a695038bfe8f8fc21cdfcb6
[ "MIT" ]
6
2021-12-11T14:40:53.000Z
2022-01-04T16:54:19.000Z
facts/linux/service_running_fact.rb
sergueik/puppetmaster_vagrant
4ce82f9618a040206a695038bfe8f8fc21cdfcb6
[ "MIT" ]
1
2016-07-19T13:36:24.000Z
2016-07-19T13:36:24.000Z
 #!/usr/bin/env ruby require 'facter' fact_name = 'mongod_service_is_running' if Facter.value(:kernel) == 'Linux' service_name = 'mongod.service' command = "/bin/systemctl status ${service_name}" command_output = Facter::Util::Resolution.exec(command) if ! command_output.nil? result = command_output.split(/\r?\n/).grep(Regexp.escape('active (running)')) end end if result != [] Facter.add(fact_name) do setcode { true } end end
23.947368
82
0.696703
65440894451005519cdcf997118253f4d0596091
4,329
rs
Rust
day_17/src/main.rs
jackmott/advent2019
530fad8b2f93aec1249f7d52b790aad7c988cc44
[ "MIT" ]
2
2019-12-25T21:06:22.000Z
2019-12-26T01:11:07.000Z
day_17/src/main.rs
jackmott/advent2019
530fad8b2f93aec1249f7d52b790aad7c988cc44
[ "MIT" ]
null
null
null
day_17/src/main.rs
jackmott/advent2019
530fad8b2f93aec1249f7d52b790aad7c988cc44
[ "MIT" ]
null
null
null
use intcomputer::*; use std::fs; use std::sync::mpsc::channel; use std::sync::mpsc::{Receiver, SendError, Sender}; use std::thread; use Robot::*; #[derive(Copy, Debug, Clone, PartialEq)] enum Robot { Up, Down, Left, Right, } use Tile::*; #[derive(Copy, Debug, Clone, PartialEq)] enum Tile { Space, Scaffold(Option<Robot>), } impl Tile { fn from_int(i: i64) -> Tile { let c = i as u8 as char; match c { '#' => Scaffold(None), '.' => Space, '^' => Scaffold(Some(Up)), '>' => Scaffold(Some(Right)), 'v' => Scaffold(Some(Down)), '<' => Scaffold(Some(Left)), _ => panic!("unknown input {}", c), } } fn to_string(&self) -> &str { match self { Scaffold(None) => "#", Space => ".", Scaffold(Some(Up)) => "^", Scaffold(Some(Right)) => ">", Scaffold(Some(Left)) => "<", Scaffold(Some(Down)) => "v", } } } fn is_intersection(x: usize, y: usize, map: &Vec<Vec<Tile>>) -> bool { let mut count = 0; match map[y][x] { Space => { return false; } _ => (), } if x != 0 { match map[y][x - 1] { Scaffold(_) => count += 1, _ => (), } } if x != map[0].len() - 1 { match map[y][x + 1] { Scaffold(_) => count += 1, _ => (), } } if y != 0 { match map[y - 1][x] { Scaffold(_) => count += 1, _ => (), } } if y != map.len() - 1 { match map[y + 1][x] { Scaffold(_) => count += 1, _ => (), } } count == 4 } fn part1() { let digits: Vec<i64> = fs::read_to_string("input.txt") .unwrap() .trim() .split(',') .map(|s| s.parse::<i64>().unwrap()) .collect(); let (_, computer_input) = channel(); let (computer_output, camera_input) = channel(); thread::spawn(move || { // Create a computer and run it let mut computer = SuperComputer::new("Robut".to_string(), digits, computer_output, computer_input); computer.run(); }); let mut map = Vec::new(); map.push(Vec::new()); loop { match camera_input.recv() { Ok(input) => { if input == 10 { map.push(Vec::new()); } else { let len = map.len(); map[len - 1].push(Tile::from_int(input)); } } Err(_) => break, } } // There are two bogus rows at the end so drop them map.pop(); map.pop(); let mut sum = 0; let mut count = 0; for y in 0..map.len() { for x in 0..map[y].len() { if is_intersection(x, y, &map) { print!("O"); count += 1; sum += x * y; } else { print!("{}", map[y][x].to_string()); } } println!(""); } println!("alignment parameter sum:{} count:{}", sum, count); } fn part2() { let mut digits: Vec<i64> = fs::read_to_string("input.txt") .unwrap() .trim() .split(',') .map(|s| s.parse::<i64>().unwrap()) .collect(); digits[0] = 2; let (robot_output, computer_input) = channel(); let (computer_output, robot_input) = channel(); let term = Term::new(robot_output, robot_input); thread::spawn(move || { // Create a computer and run it let mut computer = SuperComputer::new("Robut".to_string(), digits, computer_output, computer_input); computer.run(); }); // This program arrived at using a neural network made of meat term.send_string("A,A,B,C,B,A,C,B,C,A\n"); term.send_string("L,6,R,12,L,6,L,8,L,8\n"); term.send_string("L,6,R,12,R,8,L,8\n"); term.send_string("L,4,L,4,L,6\n"); term.send_string("n\n"); // It seems like the computer outputs the map or something // before the number so keep receiver till the end let data = term.recv_till_disconnect(); println!("dust:{}", data.last().unwrap()); } fn main() { part1(); part2(); }
23.785714
93
0.458073
f1140cd2f7cf3dd4270fb236ebbdbc74e4b906a5
397
rb
Ruby
lib/flutie/page_title_helper.rb
kholodov-aleksandr/Test
2e34bd33846ec4be87bdc56c5319b6fcc6a84a99
[ "MIT" ]
null
null
null
lib/flutie/page_title_helper.rb
kholodov-aleksandr/Test
2e34bd33846ec4be87bdc56c5319b6fcc6a84a99
[ "MIT" ]
null
null
null
lib/flutie/page_title_helper.rb
kholodov-aleksandr/Test
2e34bd33846ec4be87bdc56c5319b6fcc6a84a99
[ "MIT" ]
null
null
null
module PageTitleHelper def page_title(options = {}) app_name = options[:app_name] || Rails.application.class.to_s.split('::').first page_title_symbol = options[:page_title_symbol] || :page_title separator = options[:separator] || ' : ' if content_for?(page_title_symbol) [app_name, content_for(page_title_symbol)].join(separator) else app_name end end end
28.357143
83
0.692695
3950097598c1170e02724260f6d266005a227b0c
8,197
html
HTML
docs/index.html
Fibula-MMO/fibula-mmo.github.io
d9f9677dcf85bd6748e0d390df58bbddd2144788
[ "MIT" ]
26
2020-01-16T12:59:20.000Z
2021-09-09T07:33:25.000Z
docs/index.html
Fibula-MMO/fibula-mmo.github.io
d9f9677dcf85bd6748e0d390df58bbddd2144788
[ "MIT" ]
30
2020-01-12T05:32:03.000Z
2020-08-16T22:55:32.000Z
docs/index.html
Fibula-MMO/fibula-mmo.github.io
d9f9677dcf85bd6748e0d390df58bbddd2144788
[ "MIT" ]
17
2020-01-12T07:24:59.000Z
2021-03-29T02:36:13.000Z
<!DOCTYPE html> <!--[if IE]><![endif]--> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Let's go through that README again... What the heck is this? | Fibula MMO </title> <meta name="viewport" content="width=device-width"> <meta name="title" content="Let's go through that README again... What the heck is this? | Fibula MMO "> <meta name="generator" content="docfx 2.56.1.0"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="styles/docfx.vendor.css"> <link rel="stylesheet" href="styles/docfx.css"> <link rel="stylesheet" href="styles/main.css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> <meta property="docfx:navrel" content="toc.html"> <meta property="docfx:tocrel" content="toc.html"> <meta property="docfx:rel" content=""> </head> <body data-spy="scroll" data-target="#affix" data-offset="120"> <div id="wrapper"> <header> <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html"> <img id="logo" class="svg" src="images/logo.png" alt=""> </a> </div> <div class="collapse navbar-collapse" id="navbar"> <form class="navbar-form navbar-right" role="search" id="search"> <div class="form-group"> <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> </div> </form> </div> </div> </nav> <div class="subnav navbar navbar-default"> <div class="container hide-when-search" id="breadcrumb"> <ul class="breadcrumb"> <li></li> </ul> </div> </div> </header> <div class="container body-content"> <div id="search-results"> <div class="search-list"></div> <div class="sr-items"> <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> </div> <ul id="pagination"></ul> </div> </div> <div role="main" class="container body-content hide-when-search"> <div class="article row grid"> <div class="col-md-10"> <article class="content wrap" id="_content" data-uid=""> <h1 id="lets-go-through-that-readme-again-what-the-heck-is-this">Let's go through that README again... What the heck is this?</h1> <p>A C# NetCore open source server for that other leg-bone game which must not be named, apparently, because it may upset people.</p> <p>Here's a nice pic (from early dev), because pics are good:</p> <p><img src="images/fibulaDev.png" alt="Image of developing Fibula"></p> <h1 id="tldr-what-are-you-looking-for">TL;DR What are you looking for?</h1> <p>Run this thing? see <a href="articles/setup.html">how to setup and run it</a>.</p> <p>Knobs and switches? <a href="articles/configuration.html">configuration</a> section.</p> <p>Just... <a href="articles/motivation.html">WHY?</a>.</p> <p>Status and overview of things implemented? Err... <a href="articles/roadmap.html">overview / roadmap</a>... sure.</p> <h6 id="more-docs-to-probably-come-soon">More docs to (probably) come soon!</h6> <h1 id="how-is-this-better-than-the-existing-c-engines">How is this better than the existing C++ engines?</h1> <p>Well, it's too soon to say, but it sure looks sexy. The main development features right now are:</p> <h2 id="top-of-industry-standards--clean-code--happy-devs">Top-of-industry standards + clean code = happy devs.</h2> <p>It really grinds my gears how badly TFS is documented overall, and how steep the learning curve for newbies is. Ergo, I strived to make this is a well-documented and clean code project that can actually be maintained.</p> <p><img src="images/hashtagnowarnings.png" alt="Image of no warnings."></p> <p>Check the <a href="code/index.html">code reference here</a>, which pulls the XML documentation from the actual code to generate these pages. It doesn't get better than that.</p> <h2 id="we-got-them-tests">We got them tests.</h2> <p>Slowly growing in the repo, the Fibula project also features testing made super easy by the dotnet core framework.</p> <p><img src="images/testProjects.png" alt="Image of some test projects."></p> <p><img src="images/someTestRun.png" alt="Image of some test run."></p> <h2 id="dependency-injection">Dependency Injection:</h2> <p>Dependency injection gives the power to the dev, to quickly switch out the flavor of specific component that they want to run, e.g. the way the map loads:</p> <p><img src="images/dependencyInjection.png" alt="Image of more dependency injection."></p> <blockquote> <p>Notice the OTBM flavor in the image above.</p> </blockquote> <p>And the same can be done for other assets loading.</p> <h2 id="minimal-changes-between-backend-version">Minimal changes between backend version.</h2> <p>By leveraging DI we can support different back-end versions with minimal code changes to make when switching between them.</p> <p>Take 7.72 for example:</p> <p><img src="images/multiVersion.png" alt="Image of 7.72 project."></p> <p>This project (and thus, DLL) contains all the intrinsics of packet parsing and writing, connection and other components specific to that version:</p> <p><img src="images/perVersionPacketEx.png" alt="Image of a packet reader."></p> <p>And it is injected with 2 lines at the composition root of the project <code>(bottom 2 lines)</code>:</p> <p><img src="images/compositionRoot.png" alt="Image of the composition root."></p> <p>Once we want to support another version, say <code>7.4</code>, we shall add a single DLL targetting that version, implementing the components needed to be injected, possibly point to the <code>7.4</code> map/assets in the config, and re-compile.</p> <blockquote> <p>For the above example: <code>7.4</code> did not have XTEA or RSA encryption for connections, so that would be stripped.</p> <p>Moreover, for <code>7.1</code> for example, the structure would change to <em>not include <code>skulls</code> or <code>shields</code></em> in the player status packet.</p> </blockquote> </article> </div> <div class="hidden-sm col-md-2" role="complementary"> <div class="sideaffix"> <div class="contribution"> <ul class="nav"> <li> <a href="https://github.com/jlnunez89/fibula-mmo/blob/master/docfx_project/index.md/#L1" class="contribution-link">Improve this Doc</a> </li> </ul> </div> <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> </nav> </div> </div> </div> </div> <footer> <div class="grad-bottom"></div> <div class="footer"> <div class="container"> <span class="pull-right"> <a href="#top">Back to top</a> </span> <span>Copyright © 2018-2020 | The Fibula Project<br>Generated using <strong>DocFX</strong> | <a href="https://linkedin.com/in/nunezdecaceres">Jose L. Nuñez de Caceres</a> et al.</span> </div> </div> </footer> </div> <script type="text/javascript" src="styles/docfx.vendor.js"></script> <script type="text/javascript" src="styles/docfx.js"></script> <script type="text/javascript" src="styles/main.js"></script> </body> </html>
53.227273
252
0.627791
28b6d1912554e0b0be1bc33c417576682194a19f
14,771
rb
Ruby
lib/xml_builder.rb
open-contracting/european-union-support
2e140835d0e0de5d8c07562c9f451ce6b38db2cc
[ "MIT" ]
3
2018-08-09T07:38:57.000Z
2022-02-02T10:41:22.000Z
lib/xml_builder.rb
open-contracting/european-union-support
2e140835d0e0de5d8c07562c9f451ce6b38db2cc
[ "MIT" ]
65
2018-08-07T20:25:37.000Z
2022-01-31T15:42:21.000Z
lib/xml_builder.rb
open-contracting/european-union-support
2e140835d0e0de5d8c07562c9f451ce6b38db2cc
[ "MIT" ]
2
2018-10-16T14:38:56.000Z
2019-07-12T15:21:37.000Z
class XMLBuilder < XmlBase @xml = {} # @return [String] the file's basename without extension attr_reader :basename # @param [String] path the path to the XSD file def initialize(path, release: nil) @basename = File.basename(path, '.xsd') @schemas = import(path).values @schema = @schemas[0] @release = release @schemas.each do |schema| schema.xpath('.//xs:annotation').remove schema.xpath('.//xs:unique').remove end reset end # Reset the builder. def reset @root = BuildNode.new(nil) @types = {} end # Builds the sample XML document for the schema. def build reset visit(root, @root) end # Returns the schema's root node. # # @return [Nokogiri::XML::Node] the schema's root node def root case @release when 'R2.0.9', nil @schema.xpath("./xs:element[@name='#{@basename}']")[0] when 'R2.0.8' @schema.xpath('./xs:element[last()]')[0] else raise "unexpected release: #{@release}" end end # Builds the XML document. # # @return [String] the built XML def to_xml prune!(@root) Nokogiri::XML::Builder.new do |xml| to_xml_recursive(@root.children, xml) end.to_xml end def prune!(node) node.children.reject! do |n| prune!(n) # If the element is not published, remove it. n.children.any?{ |c| c.attribute? && c.name == 'PUBLICATION' && c.content == 'NO' } || # If the element is XML Schema and has no children, remove it. %w(choice group sequence).include?(n.name) && n.children.empty? end # If the children are all "optional" comments (due to above changes), remove the children. if node.children.all?{ |c| c.name == 'comment' && c.content == 'optional' } node.children.replace([]) end end # Recursively adds nodes to the XML document. def to_xml_recursive(nodes, xml) nodes.each do |node| if node.name == 'comment' xml.comment " #{node.content} " else attributes = {} comments = [] attribute_nodes, element_nodes = node.children.partition do |child| child.attribute? end attribute_nodes.each do |attribute_node| attributes[attribute_node.name] = attribute_node.content if attribute_node.comments.any? comments << attribute_node.comment end end if comments.any? xml.comment comments.join('|') end xml.send(node.name, attributes) do content = node.content if content xml.text content end if node.comments.any? xml.comment node.comment end to_xml_recursive(element_nodes, xml) end end end end # Builds a node for the tree. # # @param [Nokogiri::XML::Node, String] name a tag name, or a node from the parser # @param [BuildNode] parent the built node's parent # @param [String] content the content for the built node # @param [Boolean] attribute whether the built node is an attribute # @return [BuildNode] a built node for the tree def add_node(name, parent, content: nil, attribute: false) unless String === name name = name.attributes['name'].value end node = BuildNode.new(name, parent: parent, attribute: attribute) if content node.contents << content end parent.children << node node end # Finds a node matching the tag names and name attribute. # # @param [String] name a name attribute value # @param [Array<String>] tags tag names # @return [Nokogiri::XML::Node] the matching node def lookup(name, *tags) xpath(tags.map{ |tag| "./xs:#{tag}[@name='#{name}']" }.join('|'))[0] end # Parses a minOccurs or maxOccurs value. # # @param [String, Integer] the parsed value def parse_occurs(value) if value == 'unbounded' value else Integer(value || 1) end end # Adds a comment for the parsed node's attributes. # # Call `attribute_comment` before `add_node` to add the comment before its corresponding node. # # @param [Nokogiri::XML::Node] n a node from the parser # @param [BuildNode] pointer the current node in the tree def attribute_comment(n, pointer) comments = [] # mixed is "true" on p and text_ft_multi_lines_or_string only minOccurs = parse_occurs(n['minOccurs']) maxOccurs = parse_occurs(n['maxOccurs']) if minOccurs == 0 && maxOccurs == 1 comments << 'optional' elsif minOccurs != 1 || maxOccurs != 1 comments << "[#{minOccurs}, #{maxOccurs}]" end if comments.any? add_node('comment', pointer, content: comments.join(' ')) end end # Follows the references or visits the children of a parsed node. # # @param [Nokogiri::XML::Node] n a node from the parser # @param [BuildNode] pointer the current node in the tree def follow(n, pointer) # We already checked that nodes have at most one of these in the XmlParser. if n.key?('ref') reference = n['ref'] if reference[':'] namespace, reference = reference.split(':', 2) end node = lookup(reference, n.name) visit(node, pointer) elsif n.key?('type') reference = n['type'] if default_value_r208(pointer, reference) return end node = lookup(reference, 'complexType', 'simpleType') if node.name == 'complexType' case reference when 'cpv_set' # Always expand, as mapping differs. when 'empty' # Do nothing with empty elements. when 'val', 'val_range', 'country', 'nuts', 'no_works', 'supplies', 'non_published' # Do nothing with simple elements. when 'text_ft_single_line', 'text_ft_multi_lines', 'btx' # Hardcode common types to make sample smaller. paragraph = BuildNode.new('P') paragraph.contents << SecureRandom.hex(8) pointer.children << paragraph return else # This edge case avoids extra XPaths in F08. if basename == 'F08_2014' && reference == 'contact_contracting_body' reference = 'contact_buyer' end # Reference repeated types to make sample smaller. (Sample will be invalid.) if @types.key?(reference) add_node('comment', pointer, content: "see #{@types[reference]}") return end @types[reference] = n.attributes.fetch('name') end end visit(node, pointer) elsif n.key?('base') if n.name == 'extension' reference = n['base'] if default_value_r208(pointer, reference) return end node = lookup(reference, 'complexType', 'simpleType') if node.name == 'complexType' && ['text_ft_multi_lines', 'btx'].include?(reference) # Hardcode common types to make sample smaller. Drops attributes. Only for CRITERIA_EVALUATION on F13. paragraph = BuildNode.new('P') paragraph.contents << SecureRandom.hex(8) pointer.children << paragraph return end visit(node, pointer) # Based on the analysis in `visit`, we can skip visiting `base` if within a `complexType`, but not if within a `simpleType`. elsif n.parent.name == 'simpleType' reference = n['base'] if reference[':'] namespace, reference = reference.split(':', 2) end if namespace != 'xs' node = lookup(reference, 'simpleType') visit(node, pointer) end end end n.element_children.each do |c| visit(c, pointer) end end # Visits a parsed node. # # @param [Nokogiri::XML::Node] n a node from the parser # @param [BuildNode] pointer the current node in the tree def visit(n, pointer) # `choice`, `sequence` and `group` nodes are added for the sample to reflect all possibilities in the schema. # However, this means the sample will be invalid. case n.name when 'choice' attribute_comment(n, pointer) pointer = add_node('choice', pointer) when 'sequence' attribute_comment(n, pointer) if pointer.name == 'choice' || n.attributes.any? # choice or optional pointer = add_node('sequence', pointer) end when 'group' attribute_comment(n, pointer) if pointer.name == 'choice' || n.attributes.except('name', 'ref').any? # choice or optional pointer = add_node('group', pointer) end when 'element' attribute_comment(n, pointer) if n.key?('name') pointer = add_node(n, pointer) end when 'attribute' pointer = add_node(n, pointer, attribute: true) # use is "required" on all xs:attribute except <xs:attribute name="PUBLICATION" type="publication"/> if n.key?('fixed') pointer.contents << n['fixed'] else pointer.comments['use'] = n['use'] end when 'enumeration' pointer.comments['enumeration'] ||= [] pointer.comments['enumeration'] << n.attributes['value'].value when 'fractionDigits' pointer.comments['fractionDigits'] = Integer(n.attributes['value'].value) when 'maxLength' pointer.comments['maxLength'] = Integer(n.attributes['value'].value) when 'maxInclusive' pointer.comments['maxInclusive'] = Integer(n.attributes['value'].value) when 'minInclusive' pointer.comments['minInclusive'] = Integer(n.attributes['value'].value) when 'minExclusive' pointer.comments['minExclusive'] = Integer(n.attributes['value'].value) when 'pattern' pointer.comments['pattern'] = n.attributes['value'].value when 'totalDigits' pointer.comments['totalDigits'] = Integer(n.attributes['value'].value) when 'extension' # Every `complexType` node with a `complexContent` child with an `extension` child uses a base of: # # * contact_contractor restricts contact # * agree_to_publication_man defines attribute # * agree_to_publication_opt defines attribute # * non_published defines attribute # * lot_numbers defines sequence # * text_ft_multi_lines defines sequence # * val_range defines sequence # # See <xs:complexType( name="[^"]+")?>\s*<xs:complexContent>\s*<xs:extension base="(?!(agree_to_publication_man|agree_to_publication_opt|non_published|contact_contractor|lot_numbers|text_ft_multi_lines|val_range)") # Every `complexType` node with a `simpleContent` child with an `extension` child uses a base of: # # * val cost attribute # * string_200 string_not_empty maxLength # * duration_value_2d _2car minExclusive # * duration_value_3d _3car minExclusive # * duration_value_4d _4car minExclusive # * nb _3car minExclusive # * date_full xs:date pattern # * cost xs:decimal minExclusive pattern # * customer_login xs:string pattern # * esender_login xs:string pattern # * no_doc_ext xs:string pattern # * string_not_empty xs:string pattern # * string_not_empty_nuts xs:string pattern # # See: <xs:complexType( name="[^"]+")?>\s*<xs:simpleContent>\s*<xs:extension base="(?!(cost|customer_login|date_full|duration_value_2d|duration_value_3d|duration_value_4d|esender_login|nb|no_doc_ext|string_200|string_not_empty|string_not_empty_nuts|val)") when 'restriction' # Every `complexType` node with a `restriction` grandchild uses a `base` of: # # * complement_info defines sequence # * contact defines sequence # * contact_contracting_body restricts contact # * lefti defines sequence # * lot_numbers defines sequence # # These bases have no attributes, therefore we don't need to visit them. https://www.w3.org/TR/xmlschema-0/#DerivByRestrict # # See: <xs:complexContent.+\s*<xs:restriction base="(?!(complement_info|contact|contact_contracting_body|lefti|lot_numbers)") # Every `simpleType` node with a `restriction` child uses a base of: # # * legal_basis lb:t_legal-basis_tedschema # * string_100 string_not_empty maxLength # * string_200 string_not_empty maxLength # * prct xs:integer maxInclusive, minExclusive # * _2car xs:nonNegativeInteger totalDigits # * _3car xs:nonNegativeInteger totalDigits # * _4car xs:nonNegativeInteger totalDigits # * _5car xs:nonNegativeInteger totalDigits # * cur:t_currency_tedschema xs:string enumeration # * lb:t_legal-basis_tedschema xs:string enumeration # * alphanum xs:string pattern # * string_not_empty xs:string pattern # * string_with_letter xs:string pattern # * xs:date # * xs:decimal # * xs:integer # * xs:nonNegativeInteger # * xs:string # # See: <xs:simpleType.+\s*(<xs:annotation>\s*<xs:documentation([^<]+|(\s*\S[^/x\n]+)+)\s*</xs:documentation>\s*</xs:annotation>\s*)?<xs:restriction base=" # See: <xs:restriction base="(?!(_2car|_3car|_4car|_5car|alphanum|cur:t_currency_tedschema|lb:t_legal-basis_tedschema|legal_basis|prct|string_100|string_200|string_not_empty|string_with_letter|xs:decimal|xs:date|xs:integer|xs:nonNegativeInteger|xs:string|complement_info|contact|contact_contracting_body|lefti|lot_numbers)") when 'complexContent', 'simpleContent', 'complexType', 'simpleType' # Pass through. else raise "unexpected #{n.name}: #{n}" end follow(n, pointer) end def default_value_r208(pointer, reference) if reference[':'] namespace, reference = reference.split(':', 2) end if namespace == 'xs' case reference when 'anySimpleType' pointer.contents << 'anything' when 'string' pointer.contents << 'string' when 'integer' pointer.contents << 123 else raise reference end true end end end
33.87844
330
0.602397
414874cd0e92e0315d7f5be2e10037d79e9a9838
6,912
c
C
sdk/project/bootloader/upgrade.c
doyaGu/C0501Q_HWJL01
07a71328bd9038453cbb1cf9c276a3dd1e416d63
[ "MIT" ]
1
2021-10-09T08:05:50.000Z
2021-10-09T08:05:50.000Z
sdk/project/bootloader/upgrade.c
doyaGu/C0501Q_HWJL01
07a71328bd9038453cbb1cf9c276a3dd1e416d63
[ "MIT" ]
null
null
null
sdk/project/bootloader/upgrade.c
doyaGu/C0501Q_HWJL01
07a71328bd9038453cbb1cf9c276a3dd1e416d63
[ "MIT" ]
null
null
null
#include <sys/ioctl.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <assert.h> #include "bootloader.h" #include "config.h" static char pkgFilePath[PATH_MAX]; static ITCFileStream fileStream; #define MAX_ADDRESSBOOK 24 static uint32_t DcpsGetSize( uint8_t *Src, uint32_t SrcLen ) { uint32_t DcpsSize=0; uint32_t i=0; uint32_t out_len=0; uint32_t in_len=0; while(i<SrcLen) { out_len = ((Src[i+3]) | (Src[i+2]<<8) | (Src[i+1]<<16) | (Src[i]<<24)); i=i+4; in_len = ((Src[i+3]) | (Src[i+2]<<8) | (Src[i+1]<<16) | (Src[i]<<24)); i=i+4; if (out_len == 0) break; if( in_len < out_len) DcpsSize += out_len; else DcpsSize += in_len; i += in_len; } return DcpsSize; } static int CountAddressbook(void) { struct stat sb; char *filepath[PATH_MAX]; int i=0; for(i= 1; i <= MAX_ADDRESSBOOK; i++) { sprintf(filepath, "A:/addressbook%d.ucl", i); if(stat(filepath, &sb) != 0) { break; } } return i-1; } static int CopyUclFileMore(char *ucl_filename) { int ret = 0; FILE *f = NULL; uint8_t* filebuf = NULL; uint8_t* xmlbuf = NULL; char xml_filename[PATH_MAX]; char buf[PATH_MAX]; char filepath[PATH_MAX]; struct stat sb; int readsize, compressedSize, xmlsize; int index = 0; sprintf(filepath, "A:/%s", ucl_filename); f = fopen(filepath, "rb"); if (!f) { printf("file open %s fail\n", filepath); goto error; } if (fstat(fileno(f), &sb) == -1) { printf("get file size fail\n"); goto error; } filebuf = malloc(sb.st_size); if (!filebuf) goto error; readsize = fread(filebuf, 1, sb.st_size, f); assert(readsize == sb.st_size); fclose(f); f = NULL; compressedSize = sb.st_size - 18; xmlsize = DcpsGetSize(filebuf + 18, compressedSize); xmlbuf = malloc(xmlsize + xmlsize / 8 + 256); if (!xmlbuf) goto error; #ifdef CFG_DCPS_ENABLE // hardware decompress ioctl(ITP_DEVICE_DECOMPRESS, ITP_IOCTL_INIT, NULL); ret = write(ITP_DEVICE_DECOMPRESS, filebuf + 18, compressedSize); assert(ret == compressedSize); ret = read(ITP_DEVICE_DECOMPRESS, xmlbuf, xmlsize); assert(ret == xmlsize); ioctl(ITP_DEVICE_DECOMPRESS, ITP_IOCTL_EXIT, NULL); #else // software decompress ret = SoftwareDecompress(xmlbuf, filebuf); assert(ret == 0); #endif // CFG_DCPS_ENABLE free(filebuf); filebuf = NULL; sscanf(ucl_filename, "addressbook%d.ucl", &index); sprintf(xml_filename, "addressbook%d.xml", index); strcpy(buf, "D:/"); strcat(buf, xml_filename); f = fopen(buf, "wb"); if (!f) { printf("file open %s fail\n", buf); goto error; } ret = fwrite(xmlbuf, 1, xmlsize, f); assert(ret == xmlsize); free(xmlbuf); fclose(f); f = NULL; printf("save to %s\n", buf); return 0; error: if (xmlbuf) free(xmlbuf); if (filebuf) free(filebuf); if (f) fclose(f); return -1; } /*Notice: copy addressbook only for outdoor*/ int CopyUclFile(void) { int ret = 0; FILE *f = NULL; uint8_t* filebuf = NULL; uint8_t* xmlbuf = NULL; int k = 0; struct stat sb; int readsize, compressedSize, xmlsize, addressbook_count = 0; char ucl_filename[32]; f = fopen("A:/addressbook.ucl", "rb"); if (!f) { printf("file open addressbook.ucl fail\n"); goto error; } if (fstat(fileno(f), &sb) == -1) { printf("get file size fail\n"); goto error; } filebuf = malloc(sb.st_size); if (!filebuf) goto error; readsize = fread(filebuf, 1, sb.st_size, f); assert(readsize == sb.st_size); fclose(f); f = NULL; compressedSize = sb.st_size - 18; xmlsize = DcpsGetSize(filebuf + 18, compressedSize); xmlbuf = malloc(xmlsize + xmlsize / 8 + 256); if (!xmlbuf) goto error; #ifdef CFG_DCPS_ENABLE // hardware decompress ioctl(ITP_DEVICE_DECOMPRESS, ITP_IOCTL_INIT, NULL); ret = write(ITP_DEVICE_DECOMPRESS, filebuf + 18, compressedSize); assert(ret == compressedSize); ret = read(ITP_DEVICE_DECOMPRESS, xmlbuf, xmlsize); assert(ret == xmlsize); ioctl(ITP_DEVICE_DECOMPRESS, ITP_IOCTL_EXIT, NULL); #else // software decompress ret = SoftwareDecompress(xmlbuf, filebuf); assert(ret == 0); #endif // CFG_DCPS_ENABLE free(filebuf); filebuf = NULL; f = fopen("D:/addressbook.xml", "wb"); if (!f) { printf("file open addressbook.xml fail\n"); goto error; } ret = fwrite(xmlbuf, 1, xmlsize, f); assert(ret == xmlsize); free(xmlbuf); fclose(f); f = NULL; printf("save to D:/addressbook.xml\n"); addressbook_count = CountAddressbook(); for(k = 1;k <= addressbook_count; k++) { sprintf(ucl_filename, "addressbook%d.ucl", k); CopyUclFileMore(ucl_filename); } return 0; error: if (xmlbuf) free(xmlbuf); if (filebuf) free(filebuf); if (f) fclose(f); return -1; } ITCStream* OpenUpgradePackage(void) { ITPDriveStatus* driveStatusTable; ITPDriveStatus* driveStatus = NULL; int i; // try to find the package drive ioctl(ITP_DEVICE_DRIVE, ITP_IOCTL_GET_TABLE, &driveStatusTable); for (i = ITP_MAX_DRIVE - 1; i >= 0; i--) { driveStatus = &driveStatusTable[i]; if (driveStatus->avail && driveStatus->removable) { char buf[PATH_MAX], *ptr; LOG_DBG "drive[%d]:disk=%d\n", i, driveStatus->disk LOG_END // get file path from list strcpy(buf, CFG_UPGRADE_FILENAME_LIST); ptr = strtok(buf, " "); do { strcpy(pkgFilePath, driveStatus->name); strcat(pkgFilePath, ptr); if (itcFileStreamOpen(&fileStream, pkgFilePath, false) == 0) { LOG_INFO "Found package file %s\n", pkgFilePath LOG_END return &fileStream.stream; } else { LOG_DBG "try to fopen(%s) fail:0x%X\n", pkgFilePath, errno LOG_END } } while ((ptr = strtok(NULL, " ")) != NULL); } } LOG_DBG "cannot find package file.\n" LOG_END return NULL; } void DeleteUpgradePackage(void) { if (remove(pkgFilePath)) LOG_ERR "Delete %s fail: %d\n", pkgFilePath, errno LOG_END }
22.811881
86
0.552951
fe425b07ff351ca535804bf147ae206d3976b24d
1,115
asm
Assembly
programs/oeis/100/A100152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/100/A100152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/100/A100152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A100152: Structured truncated cubic numbers. ; 1,24,100,260,535,956,1554,2360,3405,4720,6336,8284,10595,13300,16430,20016,24089,28680,33820,39540,45871,52844,60490,68840,77925,87776,98424,109900,122235,135460,149606,164704,180785,197880,216020,235236,255559,277020,299650,323480,348541,374864,402480,431420,461715,493396,526494,561040,597065,634600,673676,714324,756575,800460,846010,893256,942229,992960,1045480,1099820,1156011,1214084,1274070,1336000,1399905,1465816,1533764,1603780,1675895,1750140,1826546,1905144,1985965,2069040,2154400,2242076,2332099,2424500,2519310,2616560,2716281,2818504,2923260,3030580,3140495,3253036,3368234,3486120,3606725,3730080,3856216,3985164,4116955,4251620,4389190,4529696,4673169,4819640,4969140,5121700 mov $1,1 mov $2,$0 mov $7,$0 add $0,2 lpb $2 add $1,3 lpb $0 add $3,$0 sub $0,1 lpe add $3,2 sub $3,$2 add $1,$3 sub $2,1 lpe mov $5,$7 mov $8,$7 lpb $5 sub $5,1 add $6,$8 lpe mov $4,8 mov $8,$6 lpb $4 add $1,$8 sub $4,1 lpe mov $5,$7 mov $6,0 lpb $5 sub $5,1 add $6,$8 lpe mov $4,5 mov $8,$6 lpb $4 add $1,$8 sub $4,1 lpe mov $0,$1
25.340909
695
0.730045
7fe2ee2aa8f870180b5a20b34bff16a14bda5d1b
62,632
rs
Rust
boards/feather_m4/examples/pukcc_test.rs
blueacro/atsamd
1844437dc2727daecd200132d49b72798a0fcac7
[ "Apache-2.0", "MIT" ]
null
null
null
boards/feather_m4/examples/pukcc_test.rs
blueacro/atsamd
1844437dc2727daecd200132d49b72798a0fcac7
[ "Apache-2.0", "MIT" ]
1
2021-06-30T21:50:35.000Z
2021-06-30T21:50:35.000Z
boards/feather_m4/examples/pukcc_test.rs
blueacro/atsamd
1844437dc2727daecd200132d49b72798a0fcac7
[ "Apache-2.0", "MIT" ]
1
2022-01-10T15:08:09.000Z
2022-01-10T15:08:09.000Z
#![no_std] #![no_main] use bsp::ehal; use bsp::hal; use feather_m4 as bsp; #[cfg(not(feature = "use_semihosting"))] use panic_halt as _; #[cfg(feature = "use_semihosting")] use panic_semihosting as _; use bsp::entry; use ehal::digital::v2::ToggleableOutputPin; use hal::clock::GenericClockController; use hal::pac::{interrupt, CorePeripherals, Peripherals}; use hal::{pukcc::*, usb::UsbBus}; use usb_device::bus::UsbBusAllocator; use usb_device::prelude::*; use usbd_serial::{SerialPort, USB_CLASS_CDC}; use cortex_m::asm::delay as cycle_delay; use cortex_m::peripheral::NVIC; #[entry] fn main() -> ! { let mut peripherals = Peripherals::take().unwrap(); let mut core = CorePeripherals::take().unwrap(); let mut clocks = GenericClockController::with_external_32kosc( peripherals.GCLK, &mut peripherals.MCLK, &mut peripherals.OSC32KCTRL, &mut peripherals.OSCCTRL, &mut peripherals.NVMCTRL, ); let pins = bsp::Pins::new(peripherals.PORT); let mut red_led = pins.d13.into_push_pull_output(); let bus_allocator = unsafe { USB_ALLOCATOR = Some(bsp::usb_allocator( pins.usb_dm, pins.usb_dp, peripherals.USB, &mut clocks, &mut peripherals.MCLK, )); USB_ALLOCATOR.as_ref().unwrap() }; unsafe { USB_SERIAL = Some(SerialPort::new(&bus_allocator)); USB_BUS = Some( UsbDeviceBuilder::new(&bus_allocator, UsbVidPid(0x16c0, 0x27dd)) .manufacturer("Fake company") .product("Serial port") .serial_number("TEST") .device_class(USB_CLASS_CDC) .build(), ); } unsafe { core.NVIC.set_priority(interrupt::USB_OTHER, 1); core.NVIC.set_priority(interrupt::USB_TRCPT0, 1); core.NVIC.set_priority(interrupt::USB_TRCPT1, 1); NVIC::unmask(interrupt::USB_OTHER); NVIC::unmask(interrupt::USB_TRCPT0); NVIC::unmask(interrupt::USB_TRCPT1); } let pukcc = Pukcc::enable(&mut peripherals.MCLK).unwrap(); loop { serial_writeln!("ECDSA Test"); serial_writeln!("Column 1: Is generated signature identical to a reference signature?"); serial_writeln!("Column 2: Is a signature valid according to PUKCC"); serial_writeln!("Column 3: Is a broken signature invalid according to PUKCC"); serial_writeln!("Test vector: {} samples", ecdsa::K_SIGNATURE_PAIRS.len()); for (i, (k, reference_signature)) in ecdsa::K_SIGNATURE_PAIRS.iter().enumerate() { let i = i + 1; let mut generated_signature = [0_u8; 64]; let are_signatures_same = match unsafe { pukcc.zp_ecdsa_sign_with_raw_k::<curves::Nist256p>( &mut generated_signature, &HASH, &ecdsa::PRIVATE_KEY, k, ) } { Ok(_) => generated_signature .iter() .zip(reference_signature.iter()) .map(|(&left, &right)| left == right) .all(|r| r == true), Err(e) => { serial_writeln!("Error during signature generation: {:?}", e); false } }; let is_signature_valid = match pukcc.zp_ecdsa_verify_signature::<curves::Nist256p>( &generated_signature, &HASH, &ecdsa::PUBLIC_KEY, ) { Ok(_) => true, Err(_) => false, }; // Break signature generated_signature[14] = generated_signature[14].wrapping_sub(1); let is_broken_signature_invalid = match pukcc .zp_ecdsa_verify_signature::<curves::Nist256p>( &generated_signature, &HASH, &ecdsa::PUBLIC_KEY, ) { Err(_) => true, Ok(_) => false, }; serial_writeln!( "{:>2}: {:<5} | {:<5} | {:<5}", i, are_signatures_same, is_signature_valid, is_broken_signature_invalid, ); } serial_writeln!("ExpMod Test (RSA)"); serial_writeln!("Column 1: Is generated signature identical to a reference signature?"); serial_writeln!("Column 2: Is a signature valid"); serial_writeln!("Column 3: Is a broken signature invalid"); serial_writeln!("Test vector: {} samples", exp_mod::RSA_VECTOR.len()); for (i, (modulus, private_exponent, reference_signature)) in exp_mod::RSA_VECTOR.iter().enumerate() { let mut buffer = [0_u8; 512 + 5]; let are_signatures_same = match pukcc.modular_exponentiation( &HASH, private_exponent, modulus, ExpModMode::Regular, ExpModWindowSize::One, &mut buffer, ) { Ok(generated_signature) => generated_signature .iter() .cloned() .rev() .zip(reference_signature.iter().cloned().rev()) .map(|(left, right)| left == right) .all(|r| r == true), Err(e) => { serial_writeln!("Error during signture generation: {:?}", e); false } }; let is_signature_valid = match pukcc.modular_exponentiation( reference_signature, &exp_mod::PUBLIC_EXPONENT, modulus, ExpModMode::Regular, ExpModWindowSize::One, &mut buffer, ) { Ok(retrieved_hash) => retrieved_hash .iter() .cloned() .rev() .zip(HASH.iter().cloned().rev()) .map(|(left, right)| left == right) .all(|r| r == true), Err(e) => { serial_writeln!("Error during signture generation: {:?}", e); false } }; let mut broken_reference_signature = [0_u8; 512]; broken_reference_signature .iter_mut() .rev() .zip(reference_signature.iter().rev()) .for_each(|(target_iter, source_iter)| *target_iter = *source_iter); broken_reference_signature[broken_reference_signature.len() - 1] = broken_reference_signature[broken_reference_signature.len() - 1].wrapping_sub(1); let is_broken_signature_invalid = match pukcc.modular_exponentiation( &broken_reference_signature[broken_reference_signature.len() - modulus.len()..], &exp_mod::PUBLIC_EXPONENT, modulus, ExpModMode::Regular, ExpModWindowSize::One, &mut buffer, ) { Ok(retrieved_hash) => !retrieved_hash .iter() .cloned() .rev() .zip(HASH.iter().cloned().rev()) .map(|(left, right)| left == right) .all(|r| r == true), Err(e) => { serial_writeln!("Error during signture generation: {:?}", e); false } }; serial_writeln!( "{:>2}: {:<5} | {:<5} | {:<5} (RSA{})", i, are_signatures_same, is_signature_valid, is_broken_signature_invalid, modulus.len() * 8, ); } cycle_delay(5 * 1024 * 1024); red_led.toggle().ok(); } } static mut USB_ALLOCATOR: Option<UsbBusAllocator<UsbBus>> = None; static mut USB_BUS: Option<UsbDevice<UsbBus>> = None; static mut USB_SERIAL: Option<SerialPort<UsbBus>> = None; /// Borrows the global singleton `UsbSerial` for a brief period with interrupts /// disabled /// /// # Arguments /// `borrower`: The closure that gets run borrowing the global `UsbSerial` /// /// # Safety /// the global singleton `UsbSerial` can be safely borrowed because we disable /// interrupts while it is being borrowed, guaranteeing that interrupt handlers /// like `USB` cannot mutate `UsbSerial` while we are as well. /// /// # Panic /// If `init` has not been called and we haven't initialized our global /// singleton `UsbSerial`, we will panic. fn usbserial_get<T, R>(borrower: T) -> R where T: Fn(&mut SerialPort<UsbBus>) -> R, { usb_free(|_| unsafe { let mut usb_serial = USB_SERIAL.as_mut().expect("UsbSerial not initialized"); borrower(&mut usb_serial) }) } /// Execute closure `f` in an interrupt-free context. /// /// This as also known as a "critical section". #[inline] fn usb_free<F, R>(f: F) -> R where F: FnOnce(&cortex_m::interrupt::CriticalSection) -> R, { NVIC::mask(interrupt::USB_OTHER); NVIC::mask(interrupt::USB_TRCPT0); NVIC::mask(interrupt::USB_TRCPT1); let r = f(unsafe { &cortex_m::interrupt::CriticalSection::new() }); unsafe { NVIC::unmask(interrupt::USB_OTHER); NVIC::unmask(interrupt::USB_TRCPT0); NVIC::unmask(interrupt::USB_TRCPT1); }; r } /// Writes the given message out over USB serial. /// /// # Arguments /// * println args: variable arguments passed along to `core::write!` /// /// # Warning /// as this function deals with a static mut, and it is also accessed in the /// USB interrupt handler, we both have unsafe code for unwrapping a static mut /// as well as disabling of interrupts while we do so. /// /// # Safety /// the only time the static mut is used, we have interrupts disabled so we know /// we have sole access #[macro_export] macro_rules! serial_writeln { ($($tt:tt)+) => {{ use core::fmt::Write; let mut s: heapless::String<256> = heapless::String::new(); core::write!(&mut s, $($tt)*).unwrap(); usbserial_get(|usbserial| { usbserial.write(s.as_bytes()).ok(); usbserial.write("\r\n".as_bytes()).ok(); }); }}; } fn poll_usb() { unsafe { USB_BUS.as_mut().map(|usb_dev| { USB_SERIAL.as_mut().map(|serial| { usb_dev.poll(&mut [serial]); let mut buf = [0u8; 64]; if let Ok(count) = serial.read(&mut buf) { for (i, c) in buf.iter().enumerate() { if i >= count { break; } serial.write(&[c.clone()]).unwrap(); } }; }); }); }; } #[interrupt] fn USB_OTHER() { poll_usb(); } #[interrupt] fn USB_TRCPT0() { poll_usb(); } #[interrupt] fn USB_TRCPT1() { poll_usb(); } pub const HASH: [u8; 32] = [ 0xc7, 0x9a, 0x27, 0x4d, 0x91, 0xbb, 0x92, 0x9f, 0x29, 0x16, 0xf8, 0x9c, 0xb2, 0xa6, 0xec, 0x66, 0xa0, 0xcd, 0xb4, 0x4a, 0x14, 0x97, 0x63, 0x65, 0x3f, 0x28, 0x08, 0x52, 0xbb, 0xa5, 0x3b, 0x0e, ]; mod exp_mod { pub const PUBLIC_EXPONENT: &[u8] = &[0x01, 0x00, 0x01]; /// Vector of tuples of (modulus, private_exponent, expected_signature) pub const RSA_VECTOR: [(&'static [u8], &'static [u8], &'static [u8]); 8] = [ // RSA512 ( &[ 0xb4, 0x91, 0x91, 0x01, 0x0e, 0x56, 0x37, 0x0b, 0x63, 0x74, 0xd2, 0xf6, 0x5f, 0xee, 0x2b, 0x06, 0x29, 0x4d, 0x34, 0x05, 0x97, 0xc0, 0xdd, 0xc5, 0xd4, 0xba, 0x16, 0xbe, 0x74, 0x7c, 0xf2, 0x5f, 0xbd, 0xdb, 0xbb, 0x64, 0x29, 0x33, 0x32, 0x09, 0x18, 0x45, 0xde, 0xd6, 0x1c, 0x5b, 0xc3, 0xbc, 0x5c, 0x32, 0xd7, 0xf7, 0xd9, 0xd2, 0xa5, 0x7e, 0xf3, 0x4e, 0x1b, 0x7b, 0xd6, 0x87, 0x7d, 0xf9, ], &[ 0xb1, 0x3f, 0xa3, 0x23, 0x72, 0x3b, 0x57, 0x55, 0x2a, 0x8f, 0xe6, 0xf6, 0x4a, 0x3c, 0xb4, 0xa7, 0x1b, 0xab, 0xd9, 0x41, 0x14, 0x32, 0x12, 0x80, 0xbb, 0xcc, 0xdf, 0xbe, 0x9d, 0x02, 0x79, 0xb7, 0xb3, 0xbb, 0xbd, 0x39, 0xa1, 0x53, 0x4c, 0x9a, 0xdd, 0xfb, 0x4b, 0x4b, 0x47, 0x78, 0xfe, 0x76, 0x90, 0xa7, 0x29, 0xdf, 0x25, 0x67, 0x4d, 0x2f, 0x82, 0x92, 0x8a, 0x45, 0xb6, 0xec, 0x74, 0xb1, ], &[ 0x09, 0x8d, 0x27, 0x93, 0xd9, 0xcd, 0x67, 0xcb, 0xb4, 0x85, 0xbd, 0x43, 0xec, 0x43, 0x12, 0x89, 0xf6, 0x3a, 0x40, 0xd8, 0x5c, 0x07, 0xa9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0x74, 0x23, 0x43, 0xa3, 0x6e, 0xcc, 0x0b, 0x92, 0xf6, 0x09, 0x07, 0x6e, 0x40, 0xa1, 0x2b, 0x97, 0xe6, 0x49, 0x94, 0x43, ], &[ 0xa8, 0x51, 0x60, 0x00, 0x75, 0x69, 0xf3, 0xb1, 0x9e, 0x82, 0x20, 0x06, 0x4b, 0xc3, 0x37, 0x66, 0x32, 0x8f, 0x5f, 0x87, 0xed, 0x0f, 0xdd, 0xf7, 0x79, 0x56, 0x0f, 0x5c, 0xf3, 0x78, 0xb4, 0x47, 0x8a, 0x18, 0x26, 0x4a, 0x70, 0x35, 0xcf, 0xc2, 0x81, 0xf9, 0x07, 0x21, 0xf6, 0xb5, 0xf2, 0xb2, 0xf3, 0xed, 0xb9, 0x4b, 0x03, 0xfe, 0x30, 0x84, 0xba, 0xbd, 0xed, 0x42, 0x07, 0x4b, 0x13, 0xed, 0x74, 0xd1, 0x0d, 0x42, 0x70, 0x9a, 0xf8, 0xff, 0x39, 0x1c, 0xab, 0x6c, 0xe7, 0xbc, 0x26, 0x55, 0x64, 0x69, 0x5c, 0x48, 0x72, 0x43, 0x2d, 0x04, 0x99, 0x50, 0x35, 0x03, 0x3b, 0x3e, 0xfd, 0xb3, 0x86, 0xfd, 0x57, 0x2b, 0x03, 0xc3, 0x40, 0x9f, 0xe7, 0x9d, 0x39, 0xf2, 0x68, 0x48, 0x6f, 0xda, 0x88, 0x56, 0x82, 0x74, 0x55, 0xea, 0x0b, 0xa7, 0x50, 0x4b, 0xff, 0x14, 0xf5, 0xee, 0xce, 0xb9, ], &[ 0x67, 0x51, 0xc4, 0x41, 0x89, 0x48, 0x06, 0x33, 0xd7, 0x86, 0x1b, 0x1c, 0x35, 0x12, 0x6c, 0x10, 0x37, 0xad, 0x78, 0xc6, 0x47, 0xbe, 0x86, 0xea, 0x3e, 0x09, 0x17, 0x04, 0xe0, 0x13, 0x9b, 0xac, 0x02, 0xcb, 0x6d, 0x4c, 0x56, 0xc2, 0xcc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 0x40, 0x7d, 0x90, 0x98, 0x92, 0xce, 0x3b, 0x77, 0x4e, 0x8c, 0x41, 0xe7, 0xa1, 0xcd, 0xb1, 0xc4, 0x0a, 0xc0, 0x73, 0xfa, 0x87, 0x5f, 0xa5, 0xae, 0xcf, 0x27, 0x14, 0x06, 0x38, 0x9f, 0x4c, 0x7f, 0xaa, 0xf9, 0x76, 0x6e, 0x49, 0x03, 0x0c, 0xc8, 0x33, 0x26, 0x03, ], ), ( [ 0x99, 0xde, 0xf2, 0x6b, 0xa6, 0xfe, 0x92, 0x0f, 0xd6, 0x33, 0x3a, 0x1b, 0x21, 0x2c, 0xcb, 0xd2, 0x50, 0x81, 0x57, 0xad, 0x26, 0x31, 0xea, 0x56, 0x23, 0x94, 0x69, 0x3b, 0xc3, 0xe7, 0x96, 0xd7, ], [ 0x47, 0x1a, 0x16, 0x6b, 0xde, 0x2e, 0x34, 0xb3, 0xc6, 0x80, 0xa2, 0x18, 0xed, 0xa7, 0xfa, 0xc6, 0x7f, 0xfc, 0x77, 0xae, 0x80, 0xce, 0x18, 0x90, 0x51, 0x1f, 0x4d, 0x23, 0x8a, 0x96, 0x62, 0x25, 0xa7, 0x5a, 0xc7, 0x47, 0x68, 0xa2, 0xf0, 0x76, 0x5e, 0x01, 0x6b, 0x29, 0xb2, 0x9d, 0xba, 0x3b, 0x71, 0x8a, 0x7c, 0xfd, 0xaa, 0x49, 0x53, 0xe0, 0x90, 0x62, 0xce, 0x06, 0x95, 0x55, 0xd4, 0xc4, ], ), ( [ 0x91, 0xda, 0x2c, 0xea, 0x22, 0xc3, 0x08, 0x44, 0x5c, 0x01, 0x0e, 0x2b, 0x00, 0x74, 0x44, 0x05, 0x14, 0x50, 0x25, 0x92, 0xb3, 0xde, 0xe9, 0xcd, 0xb0, 0x67, 0x25, 0x10, 0x26, 0x8a, 0x66, 0xb6, ], [ 0x89, 0xaa, 0x32, 0x68, 0x08, 0xbf, 0x3f, 0xd8, 0xbb, 0x13, 0xc5, 0x51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 0xf7, 0x33, 0x4f, 0xcc, 0x39, 0x9c, 0xf4, 0x82, 0xe7, 0xde, 0x42, 0x37, 0x8d, 0xb9, 0x97, 0xa6, 0x5e, 0x4b, 0x0e, 0xc8, 0xaa, 0x09, 0xbc, 0xee, 0xac, ], [ 0x69, 0xc1, 0x7c, 0x3f, 0xaa, 0x06, 0x0a, 0x00, 0x0d, 0xdf, 0x08, 0x1d, 0x38, 0xe3, 0xa8, 0xc5, 0xe7, 0xa5, 0x80, 0xbd, 0x48, 0x27, 0xdf, 0x20, 0x12, 0x36, 0x9f, 0x4b, 0xfd, 0x59, 0x2a, 0x92, 0x95, 0x71, 0xa3, 0x0c, 0x58, 0x7d, 0x6a, 0x6d, 0x7b, 0x1f, 0xc1, 0x43, 0x5a, 0x6d, 0x55, 0x8e, 0xe0, 0xc5, 0x76, 0xc6, 0xf0, 0xdc, 0x92, 0x77, 0x23, 0x14, 0x49, 0xb6, 0xa6, 0xe5, 0x1d, 0x1c, ], ), ]; }
62.632
99
0.535988
9650da726ac0f12b8cc0bd1e6b033133b52bfc85
335
php
PHP
Phost/Views/System/install_finished.php
evan1024/Phost
442a36b10eb4585c7fae9b9879584401227b9638
[ "MIT" ]
null
null
null
Phost/Views/System/install_finished.php
evan1024/Phost
442a36b10eb4585c7fae9b9879584401227b9638
[ "MIT" ]
null
null
null
Phost/Views/System/install_finished.php
evan1024/Phost
442a36b10eb4585c7fae9b9879584401227b9638
[ "MIT" ]
null
null
null
<h1 class="h4">Phost is installed!</h1> <p>You did it! Phost has now been installed successfully and is ready for you to start writing. Once you've logged in, you may want to configure things further but you don't need to. Everything is ready and waiting for you.</p> <a href="/auth/login/" class="button button--primary">Login</a>
47.857143
227
0.737313
475227fd97c454d8f1edd570f0700c66a65bd0a3
187
html
HTML
dev/modules/Breadcrumbs/index.html
anandharshan/Web-components-DD
c6e22217c9f52cd67ce0a1e6ec791368d7dff8cd
[ "MIT" ]
null
null
null
dev/modules/Breadcrumbs/index.html
anandharshan/Web-components-DD
c6e22217c9f52cd67ce0a1e6ec791368d7dff8cd
[ "MIT" ]
1
2020-07-15T19:45:07.000Z
2020-07-15T19:45:07.000Z
dev/modules/Breadcrumbs/index.html
anandharshan/Web-components-DD
c6e22217c9f52cd67ce0a1e6ec791368d7dff8cd
[ "MIT" ]
null
null
null
<!--div> Breadcrumbs </div--> <div ng-controller="breadCrumbCtrl"> <div class="vmf-breadcrumb-container"> <div vmf-bread-crumb options="breadcrumbPath"> </div> </div> </div>
23.375
51
0.652406
e94ce372795f1d680b615d6801051756d031c93f
343
rs
Rust
src/periph/hsi16.rs
centosa/stm32-NUCLEO-L496ZG
5a4c7fb97790b55c089cdd560424ce370fc62c20
[ "Apache-2.0", "MIT" ]
2
2021-01-05T02:49:49.000Z
2021-02-27T11:02:01.000Z
src/periph/hsi16.rs
centosa/stm32-NUCLEO-L496ZG
5a4c7fb97790b55c089cdd560424ce370fc62c20
[ "Apache-2.0", "MIT" ]
null
null
null
src/periph/hsi16.rs
centosa/stm32-NUCLEO-L496ZG
5a4c7fb97790b55c089cdd560424ce370fc62c20
[ "Apache-2.0", "MIT" ]
null
null
null
//! 16MHz Internal RC oscillator clock. use drone_core::periph; periph::singular! { /// Extracts HSI16 register tokens. pub macro periph_hsi16; /// HSI16 peripheral. pub struct Hsi16Periph; drone_stm32_map::reg; crate::periph::hsi16; RCC { CR { HSION; HSIRDY; } } }
15.590909
39
0.568513
ddb95cde403d9a8c6c6556ef6a39b401b8eda380
1,533
php
PHP
resources/views/Portfolio/editPortfolio.blade.php
zakariaLj/ProjetBinomeZak
838222e7a9c59fdab96bb70cf0fff4eae2a5a5ff
[ "MIT" ]
null
null
null
resources/views/Portfolio/editPortfolio.blade.php
zakariaLj/ProjetBinomeZak
838222e7a9c59fdab96bb70cf0fff4eae2a5a5ff
[ "MIT" ]
5
2021-02-02T17:52:51.000Z
2022-02-27T03:07:57.000Z
resources/views/Portfolio/editPortfolio.blade.php
zakariaLj/ProjetBinomeZak
838222e7a9c59fdab96bb70cf0fff4eae2a5a5ff
[ "MIT" ]
null
null
null
@extends('adminlte::page') @section('content') <div class="container mt-5 pt-5"> <h1 class='text-center mt-3 pt-3'>Modifier le portfolio</h1> <form action="{{route('Portfolio.update',$portfolio->id)}}" method='post' enctype="multipart/form-data" > @csrf @method('put') <div class="form-group"> <label for="nom">Nom du portfolio</label> <input type="text" id="nom" name='nom' class="form-control" value='{{$portfolio->Name}}'> </div> <div class="form-group"> <label for="img">Image</label> <img src="{{asset('storage/'.$portfolio->ImgPortfolio_path)}}" alt="" srcset=""> @if ($portfolio !== null) <input type="file" id="img" name='img' class="form-control" value="{{$portfolio->ImgPortfolio_path}}"> @else <input type="file" id="img" name='img' class="form-control" value=""> @endif </div> <div class="form-group"> <label for="description">Description</label> <textarea name="description" id="description" cols="30" rows="10" class='form-control' > {{$portfolio->DescriptionPortfolio}} </textarea> <button type="submit" class="d-block mx-auto btn btn-primary">Modifier</button> </div> </form> </div> @endsection
45.088235
123
0.499674
fe41fcdc6a6396b276cd069aae4a4c7251987dff
2,890
h
C
src/arch/arm32/mach-h3/include/h3-gpio.h
HareGun/xboot
4cc7db09c622d45c42774d5cbedcfef683c9b735
[ "MIT" ]
590
2015-08-05T03:00:17.000Z
2022-03-27T14:37:10.000Z
src/arch/arm32/mach-h3/include/h3-gpio.h
xiaoxiaohuixxh/xboot
19197a4e68e656b4aeb4be49f254b491d4027cdf
[ "MIT" ]
22
2017-07-22T08:33:18.000Z
2022-03-30T06:38:42.000Z
src/arch/arm32/mach-h3/include/h3-gpio.h
xiaoxiaohuixxh/xboot
19197a4e68e656b4aeb4be49f254b491d4027cdf
[ "MIT" ]
247
2015-07-06T10:13:48.000Z
2022-03-20T13:08:21.000Z
#ifndef __H3_GPIO_H__ #define __H3_GPIO_H__ #ifdef __cplusplus extern "C" { #endif #define H3_GPIOA0 (0) #define H3_GPIOA1 (1) #define H3_GPIOA2 (2) #define H3_GPIOA3 (3) #define H3_GPIOA4 (4) #define H3_GPIOA5 (5) #define H3_GPIOA6 (6) #define H3_GPIOA7 (7) #define H3_GPIOA8 (8) #define H3_GPIOA9 (9) #define H3_GPIOA10 (10) #define H3_GPIOA11 (11) #define H3_GPIOA12 (12) #define H3_GPIOA13 (13) #define H3_GPIOA14 (14) #define H3_GPIOA15 (15) #define H3_GPIOA16 (16) #define H3_GPIOA17 (17) #define H3_GPIOA18 (18) #define H3_GPIOA19 (19) #define H3_GPIOA20 (20) #define H3_GPIOA21 (21) #define H3_GPIOC0 (64) #define H3_GPIOC1 (65) #define H3_GPIOC2 (66) #define H3_GPIOC3 (67) #define H3_GPIOC4 (68) #define H3_GPIOC5 (69) #define H3_GPIOC6 (70) #define H3_GPIOC7 (71) #define H3_GPIOC8 (72) #define H3_GPIOC9 (73) #define H3_GPIOC10 (74) #define H3_GPIOC11 (75) #define H3_GPIOC12 (76) #define H3_GPIOC13 (77) #define H3_GPIOC14 (78) #define H3_GPIOC15 (79) #define H3_GPIOC16 (80) #define H3_GPIOD0 (96) #define H3_GPIOD1 (97) #define H3_GPIOD2 (98) #define H3_GPIOD3 (99) #define H3_GPIOD4 (100) #define H3_GPIOD5 (101) #define H3_GPIOD6 (102) #define H3_GPIOD7 (103) #define H3_GPIOD8 (104) #define H3_GPIOD9 (105) #define H3_GPIOD10 (106) #define H3_GPIOD11 (107) #define H3_GPIOD12 (108) #define H3_GPIOD13 (109) #define H3_GPIOD14 (110) #define H3_GPIOD15 (111) #define H3_GPIOD16 (112) #define H3_GPIOD17 (113) #define H3_GPIOE0 (128) #define H3_GPIOE1 (129) #define H3_GPIOE2 (130) #define H3_GPIOE3 (131) #define H3_GPIOE4 (132) #define H3_GPIOE5 (133) #define H3_GPIOE6 (134) #define H3_GPIOE7 (135) #define H3_GPIOE8 (136) #define H3_GPIOE9 (137) #define H3_GPIOE10 (138) #define H3_GPIOE11 (139) #define H3_GPIOE12 (140) #define H3_GPIOE13 (141) #define H3_GPIOE14 (142) #define H3_GPIOE15 (143) #define H3_GPIOF0 (160) #define H3_GPIOF1 (161) #define H3_GPIOF2 (162) #define H3_GPIOF3 (163) #define H3_GPIOF4 (164) #define H3_GPIOF5 (165) #define H3_GPIOF6 (166) #define H3_GPIOG0 (192) #define H3_GPIOG1 (193) #define H3_GPIOG2 (194) #define H3_GPIOG3 (195) #define H3_GPIOG4 (196) #define H3_GPIOG5 (197) #define H3_GPIOG6 (198) #define H3_GPIOG7 (199) #define H3_GPIOG8 (200) #define H3_GPIOG9 (201) #define H3_GPIOG10 (202) #define H3_GPIOG11 (203) #define H3_GPIOG12 (204) #define H3_GPIOG13 (205) #define H3_GPIOL0 (224) #define H3_GPIOL1 (225) #define H3_GPIOL2 (226) #define H3_GPIOL3 (227) #define H3_GPIOL4 (228) #define H3_GPIOL5 (229) #define H3_GPIOL6 (230) #define H3_GPIOL7 (231) #define H3_GPIOL8 (232) #define H3_GPIOL9 (233) #define H3_GPIOL10 (234) #define H3_GPIOL11 (235) #ifdef __cplusplus } #endif #endif /* __H3_GPIO_H__ */
22.936508
26
0.691696
403576f96a191d1c0cb3ea9e538ebb2e4564e392
1,300
py
Python
diplomova_praca_lib/test.py
MDobransky/thesis-grizzly
b038b477596879465636eae34444d70742a86e8f
[ "MIT" ]
null
null
null
diplomova_praca_lib/test.py
MDobransky/thesis-grizzly
b038b477596879465636eae34444d70742a86e8f
[ "MIT" ]
1
2020-09-21T21:38:46.000Z
2020-09-21T21:38:46.000Z
diplomova_praca_lib/test.py
MDobransky/thesis-grizzly
b038b477596879465636eae34444d70742a86e8f
[ "MIT" ]
null
null
null
import numpy as np import mxnet as mx from collections import namedtuple def get_network_fc(network_path, network_epoch, normalize_inputs): batch_def = namedtuple('Batch', ['data']) sym, arg_params, aux_params = mx.model.load_checkpoint(network_path, network_epoch) network = mx.mod.Module(symbol=sym.get_internals()['flatten0_output'], label_names=None, context=mx.gpu()) network.bind(for_training=False, data_shapes=[("data", (6, 3, 224, 224))]) network.set_params(arg_params, aux_params) def fc(image): image = image.astype(np.float32) if normalize_inputs: # true for resnext101 image = image - np.array([[[[123.68, 116.779, 103.939]]]], dtype=np.float32) image = np.transpose(image, [0, 3, 1, 2]) inputs = batch_def([mx.nd.array(image)]) network.forward(inputs) return network.get_outputs()[0].asnumpy() return fc resnext = get_network_fc("//diplomova_praca_lib/resnet/resnext-101-1", 40, True) resnet = get_network_fc("//diplomova_praca_lib/resnet/resnet-152", 0, False) image = np.zeros([6, 224, 224, 3], dtype=np.uint8) features_for_image = np.concatenate([resnext(image), resnet(image)], 1) print(features_for_image.shape)
38.235294
88
0.659231
409bd9a9728c6da1e893ca01592b08caaca9ebeb
1,095
py
Python
migrations/sqlite_versions/2021-12-03_fddfa70f811b_extend_length_of_contact_track_number_.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2021-05-14T08:22:47.000Z
2022-02-04T19:48:25.000Z
migrations/sqlite_versions/2021-12-03_fddfa70f811b_extend_length_of_contact_track_number_.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
1,083
2019-11-06T17:01:07.000Z
2022-03-25T10:26:51.000Z
migrations/sqlite_versions/2021-12-03_fddfa70f811b_extend_length_of_contact_track_number_.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2019-11-06T12:00:45.000Z
2021-06-09T04:18:28.000Z
"""Extend length of Contact.track_number field Revision ID: fddfa70f811b Revises: eb8a93498c02 Create Date: 2021-12-03 16:49:33.809704+00:00 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "fddfa70f811b" down_revision = "eb8a93498c02" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table("Contacts", schema=None) as batch_op: batch_op.alter_column( "track_number", existing_type=sa.VARCHAR(length=20), type_=sa.String(length=40), existing_nullable=True, ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table("Contacts", schema=None) as batch_op: batch_op.alter_column( "track_number", existing_type=sa.String(length=40), type_=sa.VARCHAR(length=20), existing_nullable=True, ) # ### end Alembic commands ###
26.707317
67
0.650228
3255592e6cb278fe8f45a18c2571ea0c9206fb82
77
sql
SQL
src/test/resources/sql/select/0da404ca.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
66
2018-06-15T11:34:03.000Z
2022-03-16T09:24:49.000Z
src/test/resources/sql/select/0da404ca.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
13
2019-03-19T11:56:28.000Z
2020-08-05T04:20:50.000Z
src/test/resources/sql/select/0da404ca.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
28
2019-01-05T19:59:02.000Z
2022-03-24T11:55:50.000Z
-- file:regproc.sql ln:76 expect:true SELECT regrole('regress_regrole_test')
25.666667
38
0.792208
e0363ba37d8f2f60c6d90d3e3d3e35750d6dba25
1,678
lua
Lua
source/entity/states/swordman/attack.lua
SerDing/Gear-of-Fate
e908fe74d9e8f2c062ba0d06277f0730445ce01c
[ "MIT" ]
null
null
null
source/entity/states/swordman/attack.lua
SerDing/Gear-of-Fate
e908fe74d9e8f2c062ba0d06277f0730445ce01c
[ "MIT" ]
null
null
null
source/entity/states/swordman/attack.lua
SerDing/Gear-of-Fate
e908fe74d9e8f2c062ba0d06277f0730445ce01c
[ "MIT" ]
null
null
null
--[[ Desc: Normal attack state Author: SerDing Since: 2017-07-28 Alter: 2020-03-29 ]] local _Base = require("entity.states.base") ---@class Entity.State.Swordman.Attack : Entity.State.Base local _Attack = require("core.class")(_Base) function _Attack:Ctor(data, ...) _Base.Ctor(self, data, ...) self._phase = 0 self._keyFrames = data.keyFrames self._ticks = data.ticks self._combo = #self._keyFrames + 1 self._switchPhase = false end function _Attack:Enter() if self._STATE.preState ~= self then _Base.Enter(self) self._phase = 1 self:_OnSetPhase(self._phase) else self._switchPhase = true end self._combat:SetSoundGroup(self._soundDataSet.hitting.hsword) end function _Attack:Update(dt) _Base.EaseMove(self, self._phase) if self._phase < self._combo and self._switchPhase and self._body:GetFrame() > self._ticks[self._phase] then self:SetPhase(self._phase + 1) end _Base.AutoTransitionAtEnd(self) end function _Attack:SetPhase(nextPhase) self._phase = nextPhase self._switchPhase = false self._avatar:Play(self._animNameSet[self._phase]) self:_OnSetPhase(nextPhase) end function _Attack:_OnSetPhase(process) self._combat:StartAttack(self._attackDataSet[process]) local subtype = self._entity.equipment:GetSubtype("weapon") _Base.RandomPlaySound(self._soundDataSet.swing[subtype]) _Base.RandomPlaySound(self._soundDataSet.voice) -- _Base.NewEntity(self._entityDataSet[self._process], {master = self._entity}) end function _Attack:Exit() _Base.Exit(self) --self._switchPhase = false --self._phase = 0 end return _Attack
26.634921
112
0.711561
9ced5f374229548d34cb3ec76984e8c9f66bf3a4
238
kt
Kotlin
Chapter07/src/main/kotlin/com/packt/chapter2/this.kt
victormwenda/Programming-Kotlin
753c5b6aa0bf5cc6a1cc5537c21e49c63fed0f56
[ "MIT" ]
79
2017-01-21T03:44:57.000Z
2021-11-12T16:35:40.000Z
Chapter07/src/main/kotlin/com/packt/chapter2/this.kt
victormwenda/Programming-Kotlin
753c5b6aa0bf5cc6a1cc5537c21e49c63fed0f56
[ "MIT" ]
1
2018-07-05T08:21:55.000Z
2018-07-05T08:21:55.000Z
Chapter07/src/main/kotlin/com/packt/chapter2/this.kt
victormwenda/Programming-Kotlin
753c5b6aa0bf5cc6a1cc5537c21e49c63fed0f56
[ "MIT" ]
43
2017-01-21T03:45:01.000Z
2022-03-22T21:09:42.000Z
package com.packt.chapter2 class Person(name: String) { fun printMe() = println(this) } class Building(val address: String) { inner class Reception(telephone: String) { fun printMyAddress() = println(this@Building.address) } }
21.636364
57
0.718487
507d5bb9bd28d422a5a7831bd028788c3ca607d2
123
sql
SQL
SQL/q1.sql
moelsh-thoughtworks/twu-biblioteca-moelsherif
3170629573d5ce66b476626e860a040343b0bd34
[ "Apache-2.0" ]
null
null
null
SQL/q1.sql
moelsh-thoughtworks/twu-biblioteca-moelsherif
3170629573d5ce66b476626e860a040343b0bd34
[ "Apache-2.0" ]
null
null
null
SQL/q1.sql
moelsh-thoughtworks/twu-biblioteca-moelsherif
3170629573d5ce66b476626e860a040343b0bd34
[ "Apache-2.0" ]
null
null
null
SELECT m.name FROM member m, checkout_item c,book b WHERE b.title="The Hobbit" AND b.id=c.book_id AND c.member_id = m.id
30.75
52
0.739837
04a901b8ebdc5da83cf0cf1f492e0f413d24467f
804
html
HTML
src/views/contact/index.html
master-the-toefl/client
d3a61a9662fa0e3f26ef8f9c8c8c378b3f769f74
[ "MIT" ]
null
null
null
src/views/contact/index.html
master-the-toefl/client
d3a61a9662fa0e3f26ef8f9c8c8c378b3f769f74
[ "MIT" ]
null
null
null
src/views/contact/index.html
master-the-toefl/client
d3a61a9662fa0e3f26ef8f9c8c8c378b3f769f74
[ "MIT" ]
null
null
null
<template> <div class="container"> <div class="row"> <h4 class="center-align">Contact</h4> <h5 class="center-align">Found any bug? Have any suggestions?</h5> <div class="row col s12"> <div class="input-field col s12"> <i class="material-icons prefix">mode_edit</i> <textarea id="icon_prefix2" class="materialize-textarea" value.bind="contactText"></textarea> <label for="icon_prefix2">Found any bug? Have any suggestions?</label> <button class="right-align" md-button click.delegate="sendContact()" id="sendContact" style="float: right; margin-top: 10px;">Enviar</button> <p if.bind="sent" style="color: red; font-size: 1.3em;" class="center-align">Sent!</p> </div> </div> </div> </div> </template>
38.285714
151
0.620647
dde8b74b06ea35e634ba8b78c16724dd9560348b
825
php
PHP
resources/views/laporan/req.blade.php
TitamSeptian/GooooooLiterasi
544bc76df33ed899323973f8c5e05d3f3acd438f
[ "MIT" ]
null
null
null
resources/views/laporan/req.blade.php
TitamSeptian/GooooooLiterasi
544bc76df33ed899323973f8c5e05d3f3acd438f
[ "MIT" ]
null
null
null
resources/views/laporan/req.blade.php
TitamSeptian/GooooooLiterasi
544bc76df33ed899323973f8c5e05d3f3acd438f
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}"> </head> <body> <table class="table table-sm"> <caption>Semua Request</caption> <thead> <tr> <th scope="col">No</th> <th>Jenis</th> <th>Kategori</th> <th>Tebal Minimal</th> <th>Tebal Maximal</th> <th>Harga Minimal</th> <th>Harga Maximal</th> <th>Tahun Awal</th> <th>Tahun Akhir</th> <th>Request</th> </tr> </thead> <tbody> {{-- @php $i = 1 @endphp @foreach($req as $q) <tr> <th scope="row">{{ $i++ }}</th> <th>{{ $q['jenis'] }}</th> </tr> @endforeach --}} </tbody> </table> </body> </html>
23.571429
101
0.486061
76df117e4a3fe41e604ce27105376cae605a3f8e
729
h
C
src/state.h
romz-pl/kohn-sham-atom
f8d87850469097ed39ba855b50df46787b1c3114
[ "MIT" ]
1
2022-02-24T03:48:19.000Z
2022-02-24T03:48:19.000Z
src/state.h
romz-pl/kohn-sham-atom
f8d87850469097ed39ba855b50df46787b1c3114
[ "MIT" ]
null
null
null
src/state.h
romz-pl/kohn-sham-atom
f8d87850469097ed39ba855b50df46787b1c3114
[ "MIT" ]
null
null
null
#ifndef RATOM_STATE_H #define RATOM_STATE_H // // Electron state of the atom. // // Zbigniew Romanowski [ROMZ@wp.pl] // #include <cstddef> #include <string> class State { public: explicit State( const std::string& name ); ~State( ) = default; std::string Name() const { return m_name; } size_t Occ() const { return m_occ; } size_t N() const { return m_n; } size_t L() const { return m_ell; } private: size_t ChangeToNumber( char charEll ) const; private: // Main quantum number size_t m_n; // Angular quantum number size_t m_ell; // Occupation factor. Number of electrons on the state. size_t m_occ; // Name of the state const std::string m_name; }; #endif
16.568182
59
0.646091
74e796b4b5b7c2b2c317d706d3b0c6bfc45a5fe0
529
sql
SQL
migrations/20211015105820_base_tables.down.sql
JoshiDhima/Bathbot
7a8dd8a768caede285df4f8ea5aead27bdbbf660
[ "ISC" ]
null
null
null
migrations/20211015105820_base_tables.down.sql
JoshiDhima/Bathbot
7a8dd8a768caede285df4f8ea5aead27bdbbf660
[ "ISC" ]
null
null
null
migrations/20211015105820_base_tables.down.sql
JoshiDhima/Bathbot
7a8dd8a768caede285df4f8ea5aead27bdbbf660
[ "ISC" ]
null
null
null
DROP TABLE maps; DROP TABLE mapsets; DROP TABLE role_assigns; DROP TABLE stream_tracks; DROP TABLE bggame_scores; DROP TABLE map_tags; DROP TABLE guild_configs; DROP TABLE osu_trackings; DROP TABLE snipe_countries; DROP TABLE user_configs; DROP TABLE osekai_medals; DROP TRIGGER update_osu_user_stats_last_update ON osu_user_stats; DROP TRIGGER update_osu_user_stats_mode_last_update ON osu_user_stats_mode; DROP FUNCTION set_last_update(); DROP TABLE osu_user_names; DROP TABLE osu_user_stats; DROP TABLE osu_user_stats_mode;
26.45
75
0.856333
eba12e913976ed7b40c0017fdccf9805db44e4c3
1,207
pkb
SQL
5.2.3/Database/Packages/AFW_01_ELEMN_CONFG_EN_PKG.pkb
lgcarrier/AFW
a58ef2a26cb78bb0ff9b4db725df5bd4118e4945
[ "MIT" ]
1
2017-07-06T14:53:28.000Z
2017-07-06T14:53:28.000Z
5.2.3/Database/Packages/AFW_01_ELEMN_CONFG_EN_PKG.pkb
lgcarrier/AFW
a58ef2a26cb78bb0ff9b4db725df5bd4118e4945
[ "MIT" ]
null
null
null
5.2.3/Database/Packages/AFW_01_ELEMN_CONFG_EN_PKG.pkb
lgcarrier/AFW
a58ef2a26cb78bb0ff9b4db725df5bd4118e4945
[ "MIT" ]
null
null
null
SET DEFINE OFF; create or replace package body afw_01_elemn_confg_en_pkg is procedure inser_elemn_confg_en (pnu_confg_evenm_notfb in vd_i_afw_01_elemn_confg_en.ref_confg_evenm_notfb%type ,pva_code in vd_i_afw_01_elemn_confg_en.code%type ,pva_ident_acces in vd_i_afw_01_elemn_confg_en.ident_acces%type ,pva_ident_acces_formt in vd_i_afw_01_elemn_confg_en.ident_acces_formt%type) is begin insert into vd_i_afw_01_elemn_confg_en (ref_confg_evenm_notfb ,code ,ident_acces ,ident_acces_formt) values (pnu_confg_evenm_notfb ,pva_code ,pva_ident_acces ,pva_ident_acces_formt); end inser_elemn_confg_en; function formt_elemn_subst_mesg (pva_code in vd_i_afw_01_elemn_confg_en.code%type) return varchar2 is begin return kva_prefx_elemn_subst_mesg || pva_code || kva_sufx_elemn_subst_mesg; end formt_elemn_subst_mesg; end afw_01_elemn_confg_en_pkg; /
40.233333
114
0.615576
2d7ddda66641a28b162ff11832f53544c11761ba
85
html
HTML
ms/gui/ice-admin-portal-ui/webapp/src/app/about/about-page.html
OElabed/ice-microservices
75eef1ca4d25ca2c7cd121ac8e61a76b1b9cd9db
[ "MIT" ]
null
null
null
ms/gui/ice-admin-portal-ui/webapp/src/app/about/about-page.html
OElabed/ice-microservices
75eef1ca4d25ca2c7cd121ac8e61a76b1b9cd9db
[ "MIT" ]
null
null
null
ms/gui/ice-admin-portal-ui/webapp/src/app/about/about-page.html
OElabed/ice-microservices
75eef1ca4d25ca2c7cd121ac8e61a76b1b9cd9db
[ "MIT" ]
null
null
null
<section class="row-fluid clearfix"> <h2>Hello world! (About)....</h2> </section>
28.333333
37
0.635294
dcd6b3ad088ed2141204d3a3dc8bbe29a23aa81a
126,153
sql
SQL
thinkcmf.sql
jetdky/cms-based-on-thinkcmf
164f3acfbaa9f40b19d8db68a37eef6a671f02f8
[ "MIT" ]
null
null
null
thinkcmf.sql
jetdky/cms-based-on-thinkcmf
164f3acfbaa9f40b19d8db68a37eef6a671f02f8
[ "MIT" ]
null
null
null
thinkcmf.sql
jetdky/cms-based-on-thinkcmf
164f3acfbaa9f40b19d8db68a37eef6a671f02f8
[ "MIT" ]
null
null
null
/* Navicat Premium Data Transfer Source Server : localWin Source Server Type : MySQL Source Server Version : 50726 Source Host : localhost:3306 Source Schema : thinkcmf Target Server Type : MySQL Target Server Version : 50726 File Encoding : 65001 Date: 05/11/2020 11:22:02 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for cmf_admin_menu -- ---------------------------- DROP TABLE IF EXISTS `cmf_admin_menu`; CREATE TABLE `cmf_admin_menu` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `parent_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父菜单id', `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '菜单类型;1:有界面可访问菜单,2:无界面可访问菜单,0:只作为菜单', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态;1:显示,0:不显示', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `app` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '应用名', `controller` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '控制器名', `action` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作名称', `param` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '额外参数', `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单名称', `icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '菜单图标', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`) USING BTREE, INDEX `status`(`status`) USING BTREE, INDEX `parent_id`(`parent_id`) USING BTREE, INDEX `controller`(`controller`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 145 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台菜单表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_admin_menu -- ---------------------------- INSERT INTO `cmf_admin_menu` VALUES (1, 0, 1, 0, 20, 'admin', 'Plugin', 'default', '', '插件中心', 'cloud', '插件中心'); INSERT INTO `cmf_admin_menu` VALUES (2, 1, 1, 1, 10000, 'admin', 'Hook', 'index', '', '钩子管理', '', '钩子管理'); INSERT INTO `cmf_admin_menu` VALUES (3, 2, 1, 0, 10000, 'admin', 'Hook', 'plugins', '', '钩子插件管理', '', '钩子插件管理'); INSERT INTO `cmf_admin_menu` VALUES (4, 2, 2, 0, 10000, 'admin', 'Hook', 'pluginListOrder', '', '钩子插件排序', '', '钩子插件排序'); INSERT INTO `cmf_admin_menu` VALUES (5, 2, 1, 0, 10000, 'admin', 'Hook', 'sync', '', '同步钩子', '', '同步钩子'); INSERT INTO `cmf_admin_menu` VALUES (6, 0, 0, 1, 0, 'admin', 'Setting', 'default', '', '设置', 'cogs', '系统设置入口'); INSERT INTO `cmf_admin_menu` VALUES (7, 6, 1, 0, 50, 'admin', 'Link', 'index', '', '友情链接', '', '友情链接管理'); INSERT INTO `cmf_admin_menu` VALUES (8, 7, 1, 0, 10000, 'admin', 'Link', 'add', '', '添加友情链接', '', '添加友情链接'); INSERT INTO `cmf_admin_menu` VALUES (9, 7, 2, 0, 10000, 'admin', 'Link', 'addPost', '', '添加友情链接提交保存', '', '添加友情链接提交保存'); INSERT INTO `cmf_admin_menu` VALUES (10, 7, 1, 0, 10000, 'admin', 'Link', 'edit', '', '编辑友情链接', '', '编辑友情链接'); INSERT INTO `cmf_admin_menu` VALUES (11, 7, 2, 0, 10000, 'admin', 'Link', 'editPost', '', '编辑友情链接提交保存', '', '编辑友情链接提交保存'); INSERT INTO `cmf_admin_menu` VALUES (12, 7, 2, 0, 10000, 'admin', 'Link', 'delete', '', '删除友情链接', '', '删除友情链接'); INSERT INTO `cmf_admin_menu` VALUES (13, 7, 2, 0, 10000, 'admin', 'Link', 'listOrder', '', '友情链接排序', '', '友情链接排序'); INSERT INTO `cmf_admin_menu` VALUES (14, 7, 2, 0, 10000, 'admin', 'Link', 'toggle', '', '友情链接显示隐藏', '', '友情链接显示隐藏'); INSERT INTO `cmf_admin_menu` VALUES (15, 6, 2, 0, 10, 'admin', 'Mailer', 'index', '', '邮箱配置', '', '邮箱配置'); INSERT INTO `cmf_admin_menu` VALUES (16, 15, 2, 0, 10000, 'admin', 'Mailer', 'indexPost', '', '邮箱配置提交保存', '', '邮箱配置提交保存'); INSERT INTO `cmf_admin_menu` VALUES (17, 15, 1, 0, 10000, 'admin', 'Mailer', 'template', '', '邮件模板', '', '邮件模板'); INSERT INTO `cmf_admin_menu` VALUES (18, 15, 2, 0, 10000, 'admin', 'Mailer', 'templatePost', '', '邮件模板提交', '', '邮件模板提交'); INSERT INTO `cmf_admin_menu` VALUES (19, 15, 1, 0, 10000, 'admin', 'Mailer', 'test', '', '邮件发送测试', '', '邮件发送测试'); INSERT INTO `cmf_admin_menu` VALUES (20, 6, 1, 0, 10000, 'admin', 'Menu', 'index', '', '后台菜单', '', '后台菜单管理'); INSERT INTO `cmf_admin_menu` VALUES (21, 20, 1, 0, 10000, 'admin', 'Menu', 'lists', '', '所有菜单', '', '后台所有菜单列表'); INSERT INTO `cmf_admin_menu` VALUES (22, 20, 1, 0, 10000, 'admin', 'Menu', 'add', '', '后台菜单添加', '', '后台菜单添加'); INSERT INTO `cmf_admin_menu` VALUES (23, 20, 2, 0, 10000, 'admin', 'Menu', 'addPost', '', '后台菜单添加提交保存', '', '后台菜单添加提交保存'); INSERT INTO `cmf_admin_menu` VALUES (24, 20, 1, 0, 10000, 'admin', 'Menu', 'edit', '', '后台菜单编辑', '', '后台菜单编辑'); INSERT INTO `cmf_admin_menu` VALUES (25, 20, 2, 0, 10000, 'admin', 'Menu', 'editPost', '', '后台菜单编辑提交保存', '', '后台菜单编辑提交保存'); INSERT INTO `cmf_admin_menu` VALUES (26, 20, 2, 0, 10000, 'admin', 'Menu', 'delete', '', '后台菜单删除', '', '后台菜单删除'); INSERT INTO `cmf_admin_menu` VALUES (27, 20, 2, 0, 10000, 'admin', 'Menu', 'listOrder', '', '后台菜单排序', '', '后台菜单排序'); INSERT INTO `cmf_admin_menu` VALUES (28, 20, 1, 0, 10000, 'admin', 'Menu', 'getActions', '', '导入新后台菜单', '', '导入新后台菜单'); INSERT INTO `cmf_admin_menu` VALUES (29, 6, 1, 1, 30, 'admin', 'Nav', 'index', '', '导航管理', '', '导航管理'); INSERT INTO `cmf_admin_menu` VALUES (30, 29, 1, 0, 10000, 'admin', 'Nav', 'add', '', '添加导航', '', '添加导航'); INSERT INTO `cmf_admin_menu` VALUES (31, 29, 2, 0, 10000, 'admin', 'Nav', 'addPost', '', '添加导航提交保存', '', '添加导航提交保存'); INSERT INTO `cmf_admin_menu` VALUES (32, 29, 1, 0, 10000, 'admin', 'Nav', 'edit', '', '编辑导航', '', '编辑导航'); INSERT INTO `cmf_admin_menu` VALUES (33, 29, 2, 0, 10000, 'admin', 'Nav', 'editPost', '', '编辑导航提交保存', '', '编辑导航提交保存'); INSERT INTO `cmf_admin_menu` VALUES (34, 29, 2, 0, 10000, 'admin', 'Nav', 'delete', '', '删除导航', '', '删除导航'); INSERT INTO `cmf_admin_menu` VALUES (35, 29, 1, 0, 10000, 'admin', 'NavMenu', 'index', '', '导航菜单', '', '导航菜单'); INSERT INTO `cmf_admin_menu` VALUES (36, 35, 1, 0, 10000, 'admin', 'NavMenu', 'add', '', '添加导航菜单', '', '添加导航菜单'); INSERT INTO `cmf_admin_menu` VALUES (37, 35, 2, 0, 10000, 'admin', 'NavMenu', 'addPost', '', '添加导航菜单提交保存', '', '添加导航菜单提交保存'); INSERT INTO `cmf_admin_menu` VALUES (38, 35, 1, 0, 10000, 'admin', 'NavMenu', 'edit', '', '编辑导航菜单', '', '编辑导航菜单'); INSERT INTO `cmf_admin_menu` VALUES (39, 35, 2, 0, 10000, 'admin', 'NavMenu', 'editPost', '', '编辑导航菜单提交保存', '', '编辑导航菜单提交保存'); INSERT INTO `cmf_admin_menu` VALUES (40, 35, 2, 0, 10000, 'admin', 'NavMenu', 'delete', '', '删除导航菜单', '', '删除导航菜单'); INSERT INTO `cmf_admin_menu` VALUES (41, 35, 2, 0, 10000, 'admin', 'NavMenu', 'listOrder', '', '导航菜单排序', '', '导航菜单排序'); INSERT INTO `cmf_admin_menu` VALUES (42, 1, 1, 1, 10000, 'admin', 'Plugin', 'index', '', '插件列表', '', '插件列表'); INSERT INTO `cmf_admin_menu` VALUES (43, 42, 2, 0, 10000, 'admin', 'Plugin', 'toggle', '', '插件启用禁用', '', '插件启用禁用'); INSERT INTO `cmf_admin_menu` VALUES (44, 42, 1, 0, 10000, 'admin', 'Plugin', 'setting', '', '插件设置', '', '插件设置'); INSERT INTO `cmf_admin_menu` VALUES (45, 42, 2, 0, 10000, 'admin', 'Plugin', 'settingPost', '', '插件设置提交', '', '插件设置提交'); INSERT INTO `cmf_admin_menu` VALUES (46, 42, 2, 0, 10000, 'admin', 'Plugin', 'install', '', '插件安装', '', '插件安装'); INSERT INTO `cmf_admin_menu` VALUES (47, 42, 2, 0, 10000, 'admin', 'Plugin', 'update', '', '插件更新', '', '插件更新'); INSERT INTO `cmf_admin_menu` VALUES (48, 42, 2, 0, 10000, 'admin', 'Plugin', 'uninstall', '', '卸载插件', '', '卸载插件'); INSERT INTO `cmf_admin_menu` VALUES (49, 110, 0, 1, 10000, 'admin', 'User', 'default', '', '管理组', '', '管理组'); INSERT INTO `cmf_admin_menu` VALUES (50, 49, 1, 1, 10000, 'admin', 'Rbac', 'index', '', '角色管理', '', '角色管理'); INSERT INTO `cmf_admin_menu` VALUES (51, 50, 1, 0, 10000, 'admin', 'Rbac', 'roleAdd', '', '添加角色', '', '添加角色'); INSERT INTO `cmf_admin_menu` VALUES (52, 50, 2, 0, 10000, 'admin', 'Rbac', 'roleAddPost', '', '添加角色提交', '', '添加角色提交'); INSERT INTO `cmf_admin_menu` VALUES (53, 50, 1, 0, 10000, 'admin', 'Rbac', 'roleEdit', '', '编辑角色', '', '编辑角色'); INSERT INTO `cmf_admin_menu` VALUES (54, 50, 2, 0, 10000, 'admin', 'Rbac', 'roleEditPost', '', '编辑角色提交', '', '编辑角色提交'); INSERT INTO `cmf_admin_menu` VALUES (55, 50, 2, 0, 10000, 'admin', 'Rbac', 'roleDelete', '', '删除角色', '', '删除角色'); INSERT INTO `cmf_admin_menu` VALUES (56, 50, 1, 0, 10000, 'admin', 'Rbac', 'authorize', '', '设置角色权限', '', '设置角色权限'); INSERT INTO `cmf_admin_menu` VALUES (57, 50, 2, 0, 10000, 'admin', 'Rbac', 'authorizePost', '', '角色授权提交', '', '角色授权提交'); INSERT INTO `cmf_admin_menu` VALUES (58, 0, 1, 0, 10000, 'admin', 'RecycleBin', 'index', '', '回收站', '', '回收站'); INSERT INTO `cmf_admin_menu` VALUES (59, 58, 2, 0, 10000, 'admin', 'RecycleBin', 'restore', '', '回收站还原', '', '回收站还原'); INSERT INTO `cmf_admin_menu` VALUES (60, 58, 2, 0, 10000, 'admin', 'RecycleBin', 'delete', '', '回收站彻底删除', '', '回收站彻底删除'); INSERT INTO `cmf_admin_menu` VALUES (61, 6, 1, 1, 10000, 'admin', 'Route', 'index', '', 'URL美化', '', 'URL规则管理'); INSERT INTO `cmf_admin_menu` VALUES (62, 61, 1, 1, 10000, 'admin', 'Route', 'add', '', '添加路由规则', '', '添加路由规则'); INSERT INTO `cmf_admin_menu` VALUES (71, 6, 1, 1, 0, 'admin', 'Setting', 'site', '', '网站信息', '', '网站信息'); INSERT INTO `cmf_admin_menu` VALUES (72, 71, 2, 0, 10000, 'admin', 'Setting', 'sitePost', '', '网站信息设置提交', '', '网站信息设置提交'); INSERT INTO `cmf_admin_menu` VALUES (73, 6, 1, 0, 10000, 'admin', 'Setting', 'password', '', '密码修改', '', '密码修改'); INSERT INTO `cmf_admin_menu` VALUES (74, 73, 2, 0, 10000, 'admin', 'Setting', 'passwordPost', '', '密码修改提交', '', '密码修改提交'); INSERT INTO `cmf_admin_menu` VALUES (75, 6, 1, 1, 10000, 'admin', 'Setting', 'upload', '', '上传设置', '', '上传设置'); INSERT INTO `cmf_admin_menu` VALUES (76, 75, 2, 0, 10000, 'admin', 'Setting', 'uploadPost', '', '上传设置提交', '', '上传设置提交'); INSERT INTO `cmf_admin_menu` VALUES (77, 6, 1, 0, 10000, 'admin', 'Setting', 'clearCache', '', '清除缓存', '', '清除缓存'); INSERT INTO `cmf_admin_menu` VALUES (78, 6, 1, 1, 40, 'admin', 'Slide', 'index', '', '标签管理', '', '幻灯片管理'); INSERT INTO `cmf_admin_menu` VALUES (79, 78, 1, 0, 10000, 'admin', 'Slide', 'add', '', '添加幻灯片', '', '添加幻灯片'); INSERT INTO `cmf_admin_menu` VALUES (80, 78, 2, 0, 10000, 'admin', 'Slide', 'addPost', '', '添加幻灯片提交', '', '添加幻灯片提交'); INSERT INTO `cmf_admin_menu` VALUES (81, 78, 1, 0, 10000, 'admin', 'Slide', 'edit', '', '编辑幻灯片', '', '编辑幻灯片'); INSERT INTO `cmf_admin_menu` VALUES (82, 78, 2, 0, 10000, 'admin', 'Slide', 'editPost', '', '编辑幻灯片提交', '', '编辑幻灯片提交'); INSERT INTO `cmf_admin_menu` VALUES (83, 78, 2, 0, 10000, 'admin', 'Slide', 'delete', '', '删除幻灯片', '', '删除幻灯片'); INSERT INTO `cmf_admin_menu` VALUES (84, 78, 1, 0, 10000, 'admin', 'SlideItem', 'index', '', '幻灯片页面列表', '', '幻灯片页面列表'); INSERT INTO `cmf_admin_menu` VALUES (85, 84, 1, 0, 10000, 'admin', 'SlideItem', 'add', '', '幻灯片页面添加', '', '幻灯片页面添加'); INSERT INTO `cmf_admin_menu` VALUES (86, 84, 2, 0, 10000, 'admin', 'SlideItem', 'addPost', '', '幻灯片页面添加提交', '', '幻灯片页面添加提交'); INSERT INTO `cmf_admin_menu` VALUES (87, 84, 1, 0, 10000, 'admin', 'SlideItem', 'edit', '', '幻灯片页面编辑', '', '幻灯片页面编辑'); INSERT INTO `cmf_admin_menu` VALUES (88, 84, 2, 0, 10000, 'admin', 'SlideItem', 'editPost', '', '幻灯片页面编辑提交', '', '幻灯片页面编辑提交'); INSERT INTO `cmf_admin_menu` VALUES (89, 84, 2, 0, 10000, 'admin', 'SlideItem', 'delete', '', '幻灯片页面删除', '', '幻灯片页面删除'); INSERT INTO `cmf_admin_menu` VALUES (90, 84, 2, 0, 10000, 'admin', 'SlideItem', 'ban', '', '幻灯片页面隐藏', '', '幻灯片页面隐藏'); INSERT INTO `cmf_admin_menu` VALUES (91, 84, 2, 0, 10000, 'admin', 'SlideItem', 'cancelBan', '', '幻灯片页面显示', '', '幻灯片页面显示'); INSERT INTO `cmf_admin_menu` VALUES (92, 84, 2, 0, 10000, 'admin', 'SlideItem', 'listOrder', '', '幻灯片页面排序', '', '幻灯片页面排序'); INSERT INTO `cmf_admin_menu` VALUES (93, 6, 1, 0, 10000, 'admin', 'Storage', 'index', '', '文件存储', '', '文件存储'); INSERT INTO `cmf_admin_menu` VALUES (94, 93, 2, 0, 10000, 'admin', 'Storage', 'settingPost', '', '文件存储设置提交', '', '文件存储设置提交'); INSERT INTO `cmf_admin_menu` VALUES (95, 6, 1, 0, 20, 'admin', 'Theme', 'index', '', '模板管理', '', '模板管理'); INSERT INTO `cmf_admin_menu` VALUES (96, 95, 1, 0, 10000, 'admin', 'Theme', 'install', '', '安装模板', '', '安装模板'); INSERT INTO `cmf_admin_menu` VALUES (97, 95, 2, 0, 10000, 'admin', 'Theme', 'uninstall', '', '卸载模板', '', '卸载模板'); INSERT INTO `cmf_admin_menu` VALUES (98, 95, 2, 0, 10000, 'admin', 'Theme', 'installTheme', '', '模板安装', '', '模板安装'); INSERT INTO `cmf_admin_menu` VALUES (99, 95, 2, 0, 10000, 'admin', 'Theme', 'update', '', '模板更新', '', '模板更新'); INSERT INTO `cmf_admin_menu` VALUES (100, 95, 2, 0, 10000, 'admin', 'Theme', 'active', '', '启用模板', '', '启用模板'); INSERT INTO `cmf_admin_menu` VALUES (101, 95, 1, 0, 10000, 'admin', 'Theme', 'files', '', '模板文件列表', '', '启用模板'); INSERT INTO `cmf_admin_menu` VALUES (102, 95, 1, 0, 10000, 'admin', 'Theme', 'fileSetting', '', '模板文件设置', '', '模板文件设置'); INSERT INTO `cmf_admin_menu` VALUES (103, 95, 1, 0, 10000, 'admin', 'Theme', 'fileArrayData', '', '模板文件数组数据列表', '', '模板文件数组数据列表'); INSERT INTO `cmf_admin_menu` VALUES (104, 95, 2, 0, 10000, 'admin', 'Theme', 'fileArrayDataEdit', '', '模板文件数组数据添加编辑', '', '模板文件数组数据添加编辑'); INSERT INTO `cmf_admin_menu` VALUES (105, 95, 2, 0, 10000, 'admin', 'Theme', 'fileArrayDataEditPost', '', '模板文件数组数据添加编辑提交保存', '', '模板文件数组数据添加编辑提交保存'); INSERT INTO `cmf_admin_menu` VALUES (106, 95, 2, 0, 10000, 'admin', 'Theme', 'fileArrayDataDelete', '', '模板文件数组数据删除', '', '模板文件数组数据删除'); INSERT INTO `cmf_admin_menu` VALUES (107, 95, 2, 0, 10000, 'admin', 'Theme', 'settingPost', '', '模板文件编辑提交保存', '', '模板文件编辑提交保存'); INSERT INTO `cmf_admin_menu` VALUES (108, 95, 1, 0, 10000, 'admin', 'Theme', 'dataSource', '', '模板文件设置数据源', '', '模板文件设置数据源'); INSERT INTO `cmf_admin_menu` VALUES (109, 95, 1, 0, 10000, 'admin', 'Theme', 'design', '', '模板设计', '', '模板设计'); INSERT INTO `cmf_admin_menu` VALUES (110, 0, 0, 1, 10, 'user', 'AdminIndex', 'default', '', '用户管理', 'group', '用户管理'); INSERT INTO `cmf_admin_menu` VALUES (111, 49, 1, 1, 10000, 'admin', 'User', 'index', '', '管理员', '', '管理员管理'); INSERT INTO `cmf_admin_menu` VALUES (112, 111, 1, 0, 10000, 'admin', 'User', 'add', '', '管理员添加', '', '管理员添加'); INSERT INTO `cmf_admin_menu` VALUES (113, 111, 2, 0, 10000, 'admin', 'User', 'addPost', '', '管理员添加提交', '', '管理员添加提交'); INSERT INTO `cmf_admin_menu` VALUES (114, 111, 1, 0, 10000, 'admin', 'User', 'edit', '', '管理员编辑', '', '管理员编辑'); INSERT INTO `cmf_admin_menu` VALUES (115, 111, 2, 0, 10000, 'admin', 'User', 'editPost', '', '管理员编辑提交', '', '管理员编辑提交'); INSERT INTO `cmf_admin_menu` VALUES (116, 111, 1, 0, 10000, 'admin', 'User', 'userInfo', '', '个人信息', '', '管理员个人信息修改'); INSERT INTO `cmf_admin_menu` VALUES (117, 111, 2, 0, 10000, 'admin', 'User', 'userInfoPost', '', '管理员个人信息修改提交', '', '管理员个人信息修改提交'); INSERT INTO `cmf_admin_menu` VALUES (118, 111, 2, 0, 10000, 'admin', 'User', 'delete', '', '管理员删除', '', '管理员删除'); INSERT INTO `cmf_admin_menu` VALUES (119, 111, 2, 0, 10000, 'admin', 'User', 'ban', '', '停用管理员', '', '停用管理员'); INSERT INTO `cmf_admin_menu` VALUES (120, 111, 2, 0, 10000, 'admin', 'User', 'cancelBan', '', '启用管理员', '', '启用管理员'); INSERT INTO `cmf_admin_menu` VALUES (121, 71, 1, 0, 10000, 'user', 'AdminAsset', 'index', '', '资源管理', 'file', '资源管理列表'); INSERT INTO `cmf_admin_menu` VALUES (122, 121, 2, 0, 10000, 'user', 'AdminAsset', 'delete', '', '删除文件', '', '删除文件'); INSERT INTO `cmf_admin_menu` VALUES (123, 110, 0, 1, 10000, 'user', 'AdminIndex', 'default1', '', '用户组', '', '用户组'); INSERT INTO `cmf_admin_menu` VALUES (124, 123, 1, 1, 10000, 'user', 'AdminIndex', 'index', '', '本站用户', '', '本站用户'); INSERT INTO `cmf_admin_menu` VALUES (125, 124, 2, 0, 10000, 'user', 'AdminIndex', 'ban', '', '本站用户拉黑', '', '本站用户拉黑'); INSERT INTO `cmf_admin_menu` VALUES (126, 124, 2, 0, 10000, 'user', 'AdminIndex', 'cancelBan', '', '本站用户启用', '', '本站用户启用'); INSERT INTO `cmf_admin_menu` VALUES (127, 123, 1, 1, 10000, 'user', 'AdminOauth', 'index', '', '第三方用户', '', '第三方用户'); INSERT INTO `cmf_admin_menu` VALUES (128, 127, 2, 0, 10000, 'user', 'AdminOauth', 'delete', '', '删除第三方用户绑定', '', '删除第三方用户绑定'); INSERT INTO `cmf_admin_menu` VALUES (129, 6, 1, 0, 10000, 'user', 'AdminUserAction', 'index', '', '用户操作管理', '', '用户操作管理'); INSERT INTO `cmf_admin_menu` VALUES (130, 129, 1, 0, 10000, 'user', 'AdminUserAction', 'edit', '', '编辑用户操作', '', '编辑用户操作'); INSERT INTO `cmf_admin_menu` VALUES (131, 129, 2, 0, 10000, 'user', 'AdminUserAction', 'editPost', '', '编辑用户操作提交', '', '编辑用户操作提交'); INSERT INTO `cmf_admin_menu` VALUES (132, 129, 1, 0, 10000, 'user', 'AdminUserAction', 'sync', '', '同步用户操作', '', '同步用户操作'); INSERT INTO `cmf_admin_menu` VALUES (133, 0, 1, 1, 10000, 'admin', 'Pacontent', 'index', 'type=5', '单页管理', 'pencil-square-o', '内容管理'); INSERT INTO `cmf_admin_menu` VALUES (134, 0, 1, 1, 999, 'admin', 'Class', 'index', '', '分类管理', 'window-restore', ''); INSERT INTO `cmf_admin_menu` VALUES (135, 134, 1, 1, 1000, 'admin', 'Class', 'indexPacontent', 'type=1', '单页分类', '', ''); INSERT INTO `cmf_admin_menu` VALUES (136, 134, 1, 1, 100, 'admin', 'Class', 'indexNews', 'type=2', '新闻分类', '', ''); INSERT INTO `cmf_admin_menu` VALUES (137, 134, 1, 1, 10, 'admin', 'Class', 'indexProduct', 'type=3', '产品分类', '', ''); INSERT INTO `cmf_admin_menu` VALUES (138, 0, 1, 1, 10000, 'admin', 'News', 'index', 'type=6', '文章中心', 'file-text-o', ''); INSERT INTO `cmf_admin_menu` VALUES (139, 0, 1, 1, 10000, 'admin', 'Product', 'index', 'type=7', '产品中心', 'shopping-bag', ''); INSERT INTO `cmf_admin_menu` VALUES (141, 134, 1, 1, 1, 'admin', 'Class', 'indexVideo', 'type=4', '文件分类', '', ''); INSERT INTO `cmf_admin_menu` VALUES (142, 0, 1, 1, 10000, 'admin', 'Message', 'index', 'type=8', '留言板', 'comment', ''); INSERT INTO `cmf_admin_menu` VALUES (143, 0, 1, 1, 10000, 'admin', 'Video', 'index', 'type=9', '文件管理', 'file-video-o', ''); INSERT INTO `cmf_admin_menu` VALUES (144, 0, 1, 1, 10000, 'admin', 'Recruit', 'index', '', '招聘管理', 'user', ''); -- ---------------------------- -- Table structure for cmf_asset -- ---------------------------- DROP TABLE IF EXISTS `cmf_asset`; CREATE TABLE `cmf_asset` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id', `file_size` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小,单位B', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上传时间', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态;1:可用,0:不可用', `download_times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '下载次数', `file_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件惟一码', `filename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '文件名', `file_path` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件路径,相对于upload目录,可以为url', `file_md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件md5值', `file_sha1` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', `suffix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '文件后缀名,不包括点', `more` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '其它详细信息,JSON格式', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_asset -- ---------------------------- INSERT INTO `cmf_asset` VALUES (1, 1, 70214, 1604337406, 1, 0, 'e3594edca0b9dca69898b6b14a8a3ab5236d23cab5f317670a7ee3407cdf144f', 'a02_nghj.jpg', 'admin/20201103/0d50796f79342c8ddbe8cfbe9a05dc49.jpg', 'e3594edca0b9dca69898b6b14a8a3ab5', 'afa51908fa7342bc344c498fdeffadfe57950629', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (2, 1, 80094, 1604337407, 1, 0, '17baa2a4f31920cac1b97caf3ae3478e21fac2d0a352af16bde353dfce874427', 'a04.jpg', 'admin/20201103/a79a9f626670d03e706c876a48ebeef7.jpg', '17baa2a4f31920cac1b97caf3ae3478e', 'd513ade110f776dcfa3415a232c034e2209db5c3', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (3, 1, 158720, 1604337901, 1, 0, '2aed1060da0b4035bfe9452f9e37df06059995a00955f51a259d86158407ba44', 'wq.jpg', 'admin/20201103/cf5d60e4808cd149adb4ebbdc976b32f.jpg', '2aed1060da0b4035bfe9452f9e37df06', 'df76771d49ece83aff875febf441aea3d18c2805', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (4, 1, 8198, 1604338117, 1, 0, 'dc8d4272b9e8455fa6443292770f2d96c62524a3e9759d0960b1dcbccee5e2f9', 'lo.png', 'admin/20201103/b63c32f9095a43f4b082309136fb08e1.png', 'dc8d4272b9e8455fa6443292770f2d96', 'd02f916113c2210bc485e95ee414470cd007e334', 'png', NULL); INSERT INTO `cmf_asset` VALUES (5, 1, 1564, 1604338129, 1, 0, 'eb5dd6d6c569f75218641ff9874fed4835175cd3944cacd2d4dbf13c4da9ada9', 'qr_layerCBD93C6D49384C00EB150DDE618AB073.png', 'admin/20201103/6c57c59fabdb5e7fc645292ef71118d6.png', 'eb5dd6d6c569f75218641ff9874fed48', 'acee3e822c690cc9b076b8028c888a9d6a036dfd', 'png', NULL); INSERT INTO `cmf_asset` VALUES (6, 1, 285977, 1604450484, 1, 0, '81de37d87ef3780e1c8aac340e2a691cf8be39685a9ad03d57d23bd14076de13', 'ju.jpg', 'admin/20201104/2f6ba659460ca806e7aaec90214d14cc.jpg', '81de37d87ef3780e1c8aac340e2a691c', '91772fd88c7457de6888d492282807da4ea297d7', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (7, 1, 76512, 1604451711, 1, 0, 'aefb036f033ffce41881105347443684a75b8f7db4e3323b2bd56a7093520fea', '2_bhia.jpg', 'admin/20201104/6265f7095a88bccc21e86256ad302eff.jpg', 'aefb036f033ffce41881105347443684', '83c09afee2348ea454dcb0a84f20c4a902de5805', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (8, 1, 196326, 1604452420, 1, 0, 'cac2bacf48b092ffc6468d3c97fe4e9091e4113b637d43be2037440165bc5f09', 'pics.jpg', 'admin/20201104/662ebf48b92bf3d9a38927e1ceb4a4e1.jpg', 'cac2bacf48b092ffc6468d3c97fe4e90', '21da51694f25da984f4fca35334e336e5183d248', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (9, 1, 213829, 1604454565, 1, 0, '175324a2335d14aed4c59bd8946cae4749bbf30ce0c603eff48a6f41b9e2f25c', '123.jpg', 'admin/20201104/d72925a1b71a74747e4e4584b61f57e6.jpg', '175324a2335d14aed4c59bd8946cae47', '28a6610ffcbd95337ceb36c1e340b7b27b983e8f', 'jpg', NULL); INSERT INTO `cmf_asset` VALUES (10, 1, 307188, 1604499805, 1, 0, '50652b8dd8dfcaadc2dd2656527a1b139d288f9ca93b5f99f0349e73c85ace64', '3214.jpg', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', '50652b8dd8dfcaadc2dd2656527a1b13', '56b78278053f7305e1296931996fd6180b319744', 'jpg', NULL); -- ---------------------------- -- Table structure for cmf_auth_access -- ---------------------------- DROP TABLE IF EXISTS `cmf_auth_access`; CREATE TABLE `cmf_auth_access` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `role_id` int(10) UNSIGNED NOT NULL COMMENT '角色', `rule_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则唯一英文标识,全小写', `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '权限规则分类,请加应用前缀,如admin_', PRIMARY KEY (`id`) USING BTREE, INDEX `role_id`(`role_id`) USING BTREE, INDEX `rule_name`(`rule_name`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 99 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限授权表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_auth_access -- ---------------------------- INSERT INTO `cmf_auth_access` VALUES (1, 2, 'admin/setting/default', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (2, 2, 'admin/setting/site', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (3, 2, 'admin/setting/sitepost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (4, 2, 'user/adminasset/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (5, 2, 'user/adminasset/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (6, 2, 'admin/mailer/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (7, 2, 'admin/mailer/indexpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (8, 2, 'admin/mailer/template', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (9, 2, 'admin/mailer/templatepost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (10, 2, 'admin/mailer/test', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (11, 2, 'admin/theme/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (12, 2, 'admin/theme/install', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (13, 2, 'admin/theme/uninstall', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (14, 2, 'admin/theme/installtheme', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (15, 2, 'admin/theme/update', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (16, 2, 'admin/theme/active', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (17, 2, 'admin/theme/files', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (18, 2, 'admin/theme/filesetting', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (19, 2, 'admin/theme/filearraydata', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (20, 2, 'admin/theme/filearraydataedit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (21, 2, 'admin/theme/filearraydataeditpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (22, 2, 'admin/theme/filearraydatadelete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (23, 2, 'admin/theme/settingpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (24, 2, 'admin/theme/datasource', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (25, 2, 'admin/theme/design', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (26, 2, 'admin/nav/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (27, 2, 'admin/nav/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (28, 2, 'admin/nav/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (29, 2, 'admin/nav/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (30, 2, 'admin/nav/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (31, 2, 'admin/nav/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (32, 2, 'admin/navmenu/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (33, 2, 'admin/navmenu/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (34, 2, 'admin/navmenu/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (35, 2, 'admin/navmenu/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (36, 2, 'admin/navmenu/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (37, 2, 'admin/navmenu/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (38, 2, 'admin/navmenu/listorder', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (39, 2, 'admin/slide/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (40, 2, 'admin/slide/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (41, 2, 'admin/slide/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (42, 2, 'admin/slide/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (43, 2, 'admin/slide/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (44, 2, 'admin/slide/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (45, 2, 'admin/slideitem/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (46, 2, 'admin/slideitem/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (47, 2, 'admin/slideitem/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (48, 2, 'admin/slideitem/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (49, 2, 'admin/slideitem/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (50, 2, 'admin/slideitem/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (51, 2, 'admin/slideitem/ban', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (52, 2, 'admin/slideitem/cancelban', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (53, 2, 'admin/slideitem/listorder', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (54, 2, 'admin/link/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (55, 2, 'admin/link/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (56, 2, 'admin/link/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (57, 2, 'admin/link/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (58, 2, 'admin/link/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (59, 2, 'admin/link/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (60, 2, 'admin/link/listorder', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (61, 2, 'admin/link/toggle', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (62, 2, 'admin/menu/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (63, 2, 'admin/menu/lists', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (64, 2, 'admin/menu/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (65, 2, 'admin/menu/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (66, 2, 'admin/menu/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (67, 2, 'admin/menu/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (68, 2, 'admin/menu/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (69, 2, 'admin/menu/listorder', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (70, 2, 'admin/menu/getactions', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (71, 2, 'admin/route/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (72, 2, 'admin/route/add', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (73, 2, 'admin/route/addpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (74, 2, 'admin/route/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (75, 2, 'admin/route/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (76, 2, 'admin/route/delete', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (77, 2, 'admin/route/ban', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (78, 2, 'admin/route/open', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (79, 2, 'admin/route/listorder', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (80, 2, 'admin/route/select', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (81, 2, 'admin/setting/password', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (82, 2, 'admin/setting/passwordpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (83, 2, 'admin/setting/upload', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (84, 2, 'admin/setting/uploadpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (85, 2, 'admin/setting/clearcache', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (86, 2, 'admin/storage/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (87, 2, 'admin/storage/settingpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (88, 2, 'user/adminuseraction/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (89, 2, 'user/adminuseraction/edit', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (90, 2, 'user/adminuseraction/editpost', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (91, 2, 'user/adminuseraction/sync', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (92, 2, 'admin/class/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (93, 2, 'admin/class/indexpacontent', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (94, 2, 'admin/class/indexnews', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (95, 2, 'admin/class/indexproduct', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (96, 2, 'admin/class/indexvideo', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (97, 2, 'admin/news/index', 'admin_url'); INSERT INTO `cmf_auth_access` VALUES (98, 2, 'admin/product/index', 'admin_url'); -- ---------------------------- -- Table structure for cmf_auth_rule -- ---------------------------- DROP TABLE IF EXISTS `cmf_auth_rule`; CREATE TABLE `cmf_auth_rule` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '规则id,自增主键', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否有效(0:无效,1:有效)', `app` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规则所属app', `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '权限规则分类,请加应用前缀,如admin_', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规则唯一英文标识,全小写', `param` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '额外url参数', `title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '规则描述', `condition` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '规则附加条件', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `name`(`name`) USING BTREE, INDEX `module`(`app`, `status`, `type`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 145 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限规则表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_auth_rule -- ---------------------------- INSERT INTO `cmf_auth_rule` VALUES (1, 1, 'admin', 'admin_url', 'admin/Hook/index', '', '钩子管理', ''); INSERT INTO `cmf_auth_rule` VALUES (2, 1, 'admin', 'admin_url', 'admin/Hook/plugins', '', '钩子插件管理', ''); INSERT INTO `cmf_auth_rule` VALUES (3, 1, 'admin', 'admin_url', 'admin/Hook/pluginListOrder', '', '钩子插件排序', ''); INSERT INTO `cmf_auth_rule` VALUES (4, 1, 'admin', 'admin_url', 'admin/Hook/sync', '', '同步钩子', ''); INSERT INTO `cmf_auth_rule` VALUES (5, 1, 'admin', 'admin_url', 'admin/Link/index', '', '友情链接', ''); INSERT INTO `cmf_auth_rule` VALUES (6, 1, 'admin', 'admin_url', 'admin/Link/add', '', '添加友情链接', ''); INSERT INTO `cmf_auth_rule` VALUES (7, 1, 'admin', 'admin_url', 'admin/Link/addPost', '', '添加友情链接提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (8, 1, 'admin', 'admin_url', 'admin/Link/edit', '', '编辑友情链接', ''); INSERT INTO `cmf_auth_rule` VALUES (9, 1, 'admin', 'admin_url', 'admin/Link/editPost', '', '编辑友情链接提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (10, 1, 'admin', 'admin_url', 'admin/Link/delete', '', '删除友情链接', ''); INSERT INTO `cmf_auth_rule` VALUES (11, 1, 'admin', 'admin_url', 'admin/Link/listOrder', '', '友情链接排序', ''); INSERT INTO `cmf_auth_rule` VALUES (12, 1, 'admin', 'admin_url', 'admin/Link/toggle', '', '友情链接显示隐藏', ''); INSERT INTO `cmf_auth_rule` VALUES (13, 1, 'admin', 'admin_url', 'admin/Mailer/index', '', '邮箱配置', ''); INSERT INTO `cmf_auth_rule` VALUES (14, 1, 'admin', 'admin_url', 'admin/Mailer/indexPost', '', '邮箱配置提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (15, 1, 'admin', 'admin_url', 'admin/Mailer/template', '', '邮件模板', ''); INSERT INTO `cmf_auth_rule` VALUES (16, 1, 'admin', 'admin_url', 'admin/Mailer/templatePost', '', '邮件模板提交', ''); INSERT INTO `cmf_auth_rule` VALUES (17, 1, 'admin', 'admin_url', 'admin/Mailer/test', '', '邮件发送测试', ''); INSERT INTO `cmf_auth_rule` VALUES (18, 1, 'admin', 'admin_url', 'admin/Menu/index', '', '后台菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (19, 1, 'admin', 'admin_url', 'admin/Menu/lists', '', '所有菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (20, 1, 'admin', 'admin_url', 'admin/Menu/add', '', '后台菜单添加', ''); INSERT INTO `cmf_auth_rule` VALUES (21, 1, 'admin', 'admin_url', 'admin/Menu/addPost', '', '后台菜单添加提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (22, 1, 'admin', 'admin_url', 'admin/Menu/edit', '', '后台菜单编辑', ''); INSERT INTO `cmf_auth_rule` VALUES (23, 1, 'admin', 'admin_url', 'admin/Menu/editPost', '', '后台菜单编辑提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (24, 1, 'admin', 'admin_url', 'admin/Menu/delete', '', '后台菜单删除', ''); INSERT INTO `cmf_auth_rule` VALUES (25, 1, 'admin', 'admin_url', 'admin/Menu/listOrder', '', '后台菜单排序', ''); INSERT INTO `cmf_auth_rule` VALUES (26, 1, 'admin', 'admin_url', 'admin/Menu/getActions', '', '导入新后台菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (27, 1, 'admin', 'admin_url', 'admin/Nav/index', '', '导航管理', ''); INSERT INTO `cmf_auth_rule` VALUES (28, 1, 'admin', 'admin_url', 'admin/Nav/add', '', '添加导航', ''); INSERT INTO `cmf_auth_rule` VALUES (29, 1, 'admin', 'admin_url', 'admin/Nav/addPost', '', '添加导航提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (30, 1, 'admin', 'admin_url', 'admin/Nav/edit', '', '编辑导航', ''); INSERT INTO `cmf_auth_rule` VALUES (31, 1, 'admin', 'admin_url', 'admin/Nav/editPost', '', '编辑导航提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (32, 1, 'admin', 'admin_url', 'admin/Nav/delete', '', '删除导航', ''); INSERT INTO `cmf_auth_rule` VALUES (33, 1, 'admin', 'admin_url', 'admin/NavMenu/index', '', '导航菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (34, 1, 'admin', 'admin_url', 'admin/NavMenu/add', '', '添加导航菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (35, 1, 'admin', 'admin_url', 'admin/NavMenu/addPost', '', '添加导航菜单提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (36, 1, 'admin', 'admin_url', 'admin/NavMenu/edit', '', '编辑导航菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (37, 1, 'admin', 'admin_url', 'admin/NavMenu/editPost', '', '编辑导航菜单提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (38, 1, 'admin', 'admin_url', 'admin/NavMenu/delete', '', '删除导航菜单', ''); INSERT INTO `cmf_auth_rule` VALUES (39, 1, 'admin', 'admin_url', 'admin/NavMenu/listOrder', '', '导航菜单排序', ''); INSERT INTO `cmf_auth_rule` VALUES (40, 1, 'admin', 'admin_url', 'admin/Plugin/default', '', '插件中心', ''); INSERT INTO `cmf_auth_rule` VALUES (41, 1, 'admin', 'admin_url', 'admin/Plugin/index', '', '插件列表', ''); INSERT INTO `cmf_auth_rule` VALUES (42, 1, 'admin', 'admin_url', 'admin/Plugin/toggle', '', '插件启用禁用', ''); INSERT INTO `cmf_auth_rule` VALUES (43, 1, 'admin', 'admin_url', 'admin/Plugin/setting', '', '插件设置', ''); INSERT INTO `cmf_auth_rule` VALUES (44, 1, 'admin', 'admin_url', 'admin/Plugin/settingPost', '', '插件设置提交', ''); INSERT INTO `cmf_auth_rule` VALUES (45, 1, 'admin', 'admin_url', 'admin/Plugin/install', '', '插件安装', ''); INSERT INTO `cmf_auth_rule` VALUES (46, 1, 'admin', 'admin_url', 'admin/Plugin/update', '', '插件更新', ''); INSERT INTO `cmf_auth_rule` VALUES (47, 1, 'admin', 'admin_url', 'admin/Plugin/uninstall', '', '卸载插件', ''); INSERT INTO `cmf_auth_rule` VALUES (48, 1, 'admin', 'admin_url', 'admin/Rbac/index', '', '角色管理', ''); INSERT INTO `cmf_auth_rule` VALUES (49, 1, 'admin', 'admin_url', 'admin/Rbac/roleAdd', '', '添加角色', ''); INSERT INTO `cmf_auth_rule` VALUES (50, 1, 'admin', 'admin_url', 'admin/Rbac/roleAddPost', '', '添加角色提交', ''); INSERT INTO `cmf_auth_rule` VALUES (51, 1, 'admin', 'admin_url', 'admin/Rbac/roleEdit', '', '编辑角色', ''); INSERT INTO `cmf_auth_rule` VALUES (52, 1, 'admin', 'admin_url', 'admin/Rbac/roleEditPost', '', '编辑角色提交', ''); INSERT INTO `cmf_auth_rule` VALUES (53, 1, 'admin', 'admin_url', 'admin/Rbac/roleDelete', '', '删除角色', ''); INSERT INTO `cmf_auth_rule` VALUES (54, 1, 'admin', 'admin_url', 'admin/Rbac/authorize', '', '设置角色权限', ''); INSERT INTO `cmf_auth_rule` VALUES (55, 1, 'admin', 'admin_url', 'admin/Rbac/authorizePost', '', '角色授权提交', ''); INSERT INTO `cmf_auth_rule` VALUES (56, 1, 'admin', 'admin_url', 'admin/RecycleBin/index', '', '回收站', ''); INSERT INTO `cmf_auth_rule` VALUES (57, 1, 'admin', 'admin_url', 'admin/RecycleBin/restore', '', '回收站还原', ''); INSERT INTO `cmf_auth_rule` VALUES (58, 1, 'admin', 'admin_url', 'admin/RecycleBin/delete', '', '回收站彻底删除', ''); INSERT INTO `cmf_auth_rule` VALUES (59, 1, 'admin', 'admin_url', 'admin/Route/index', '', 'URL美化', ''); INSERT INTO `cmf_auth_rule` VALUES (60, 1, 'admin', 'admin_url', 'admin/Route/add', '', '添加路由规则', ''); INSERT INTO `cmf_auth_rule` VALUES (61, 1, 'admin', 'admin_url', 'admin/Route/addPost', '', '添加路由规则提交', ''); INSERT INTO `cmf_auth_rule` VALUES (62, 1, 'admin', 'admin_url', 'admin/Route/edit', '', '路由规则编辑', ''); INSERT INTO `cmf_auth_rule` VALUES (63, 1, 'admin', 'admin_url', 'admin/Route/editPost', '', '路由规则编辑提交', ''); INSERT INTO `cmf_auth_rule` VALUES (64, 1, 'admin', 'admin_url', 'admin/Route/delete', '', '路由规则删除', ''); INSERT INTO `cmf_auth_rule` VALUES (65, 1, 'admin', 'admin_url', 'admin/Route/ban', '', '路由规则禁用', ''); INSERT INTO `cmf_auth_rule` VALUES (66, 1, 'admin', 'admin_url', 'admin/Route/open', '', '路由规则启用', ''); INSERT INTO `cmf_auth_rule` VALUES (67, 1, 'admin', 'admin_url', 'admin/Route/listOrder', '', '路由规则排序', ''); INSERT INTO `cmf_auth_rule` VALUES (68, 1, 'admin', 'admin_url', 'admin/Route/select', '', '选择URL', ''); INSERT INTO `cmf_auth_rule` VALUES (69, 1, 'admin', 'admin_url', 'admin/Setting/default', '', '设置', ''); INSERT INTO `cmf_auth_rule` VALUES (70, 1, 'admin', 'admin_url', 'admin/Setting/site', '', '网站信息', ''); INSERT INTO `cmf_auth_rule` VALUES (71, 1, 'admin', 'admin_url', 'admin/Setting/sitePost', '', '网站信息设置提交', ''); INSERT INTO `cmf_auth_rule` VALUES (72, 1, 'admin', 'admin_url', 'admin/Setting/password', '', '密码修改', ''); INSERT INTO `cmf_auth_rule` VALUES (73, 1, 'admin', 'admin_url', 'admin/Setting/passwordPost', '', '密码修改提交', ''); INSERT INTO `cmf_auth_rule` VALUES (74, 1, 'admin', 'admin_url', 'admin/Setting/upload', '', '上传设置', ''); INSERT INTO `cmf_auth_rule` VALUES (75, 1, 'admin', 'admin_url', 'admin/Setting/uploadPost', '', '上传设置提交', ''); INSERT INTO `cmf_auth_rule` VALUES (76, 1, 'admin', 'admin_url', 'admin/Setting/clearCache', '', '清除缓存', ''); INSERT INTO `cmf_auth_rule` VALUES (77, 1, 'admin', 'admin_url', 'admin/Slide/index', '', '标签管理', ''); INSERT INTO `cmf_auth_rule` VALUES (78, 1, 'admin', 'admin_url', 'admin/Slide/add', '', '添加幻灯片', ''); INSERT INTO `cmf_auth_rule` VALUES (79, 1, 'admin', 'admin_url', 'admin/Slide/addPost', '', '添加幻灯片提交', ''); INSERT INTO `cmf_auth_rule` VALUES (80, 1, 'admin', 'admin_url', 'admin/Slide/edit', '', '编辑幻灯片', ''); INSERT INTO `cmf_auth_rule` VALUES (81, 1, 'admin', 'admin_url', 'admin/Slide/editPost', '', '编辑幻灯片提交', ''); INSERT INTO `cmf_auth_rule` VALUES (82, 1, 'admin', 'admin_url', 'admin/Slide/delete', '', '删除幻灯片', ''); INSERT INTO `cmf_auth_rule` VALUES (83, 1, 'admin', 'admin_url', 'admin/SlideItem/index', '', '幻灯片页面列表', ''); INSERT INTO `cmf_auth_rule` VALUES (84, 1, 'admin', 'admin_url', 'admin/SlideItem/add', '', '幻灯片页面添加', ''); INSERT INTO `cmf_auth_rule` VALUES (85, 1, 'admin', 'admin_url', 'admin/SlideItem/addPost', '', '幻灯片页面添加提交', ''); INSERT INTO `cmf_auth_rule` VALUES (86, 1, 'admin', 'admin_url', 'admin/SlideItem/edit', '', '幻灯片页面编辑', ''); INSERT INTO `cmf_auth_rule` VALUES (87, 1, 'admin', 'admin_url', 'admin/SlideItem/editPost', '', '幻灯片页面编辑提交', ''); INSERT INTO `cmf_auth_rule` VALUES (88, 1, 'admin', 'admin_url', 'admin/SlideItem/delete', '', '幻灯片页面删除', ''); INSERT INTO `cmf_auth_rule` VALUES (89, 1, 'admin', 'admin_url', 'admin/SlideItem/ban', '', '幻灯片页面隐藏', ''); INSERT INTO `cmf_auth_rule` VALUES (90, 1, 'admin', 'admin_url', 'admin/SlideItem/cancelBan', '', '幻灯片页面显示', ''); INSERT INTO `cmf_auth_rule` VALUES (91, 1, 'admin', 'admin_url', 'admin/SlideItem/listOrder', '', '幻灯片页面排序', ''); INSERT INTO `cmf_auth_rule` VALUES (92, 1, 'admin', 'admin_url', 'admin/Storage/index', '', '文件存储', ''); INSERT INTO `cmf_auth_rule` VALUES (93, 1, 'admin', 'admin_url', 'admin/Storage/settingPost', '', '文件存储设置提交', ''); INSERT INTO `cmf_auth_rule` VALUES (94, 1, 'admin', 'admin_url', 'admin/Theme/index', '', '模板管理', ''); INSERT INTO `cmf_auth_rule` VALUES (95, 1, 'admin', 'admin_url', 'admin/Theme/install', '', '安装模板', ''); INSERT INTO `cmf_auth_rule` VALUES (96, 1, 'admin', 'admin_url', 'admin/Theme/uninstall', '', '卸载模板', ''); INSERT INTO `cmf_auth_rule` VALUES (97, 1, 'admin', 'admin_url', 'admin/Theme/installTheme', '', '模板安装', ''); INSERT INTO `cmf_auth_rule` VALUES (98, 1, 'admin', 'admin_url', 'admin/Theme/update', '', '模板更新', ''); INSERT INTO `cmf_auth_rule` VALUES (99, 1, 'admin', 'admin_url', 'admin/Theme/active', '', '启用模板', ''); INSERT INTO `cmf_auth_rule` VALUES (100, 1, 'admin', 'admin_url', 'admin/Theme/files', '', '模板文件列表', ''); INSERT INTO `cmf_auth_rule` VALUES (101, 1, 'admin', 'admin_url', 'admin/Theme/fileSetting', '', '模板文件设置', ''); INSERT INTO `cmf_auth_rule` VALUES (102, 1, 'admin', 'admin_url', 'admin/Theme/fileArrayData', '', '模板文件数组数据列表', ''); INSERT INTO `cmf_auth_rule` VALUES (103, 1, 'admin', 'admin_url', 'admin/Theme/fileArrayDataEdit', '', '模板文件数组数据添加编辑', ''); INSERT INTO `cmf_auth_rule` VALUES (104, 1, 'admin', 'admin_url', 'admin/Theme/fileArrayDataEditPost', '', '模板文件数组数据添加编辑提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (105, 1, 'admin', 'admin_url', 'admin/Theme/fileArrayDataDelete', '', '模板文件数组数据删除', ''); INSERT INTO `cmf_auth_rule` VALUES (106, 1, 'admin', 'admin_url', 'admin/Theme/settingPost', '', '模板文件编辑提交保存', ''); INSERT INTO `cmf_auth_rule` VALUES (107, 1, 'admin', 'admin_url', 'admin/Theme/dataSource', '', '模板文件设置数据源', ''); INSERT INTO `cmf_auth_rule` VALUES (108, 1, 'admin', 'admin_url', 'admin/Theme/design', '', '模板设计', ''); INSERT INTO `cmf_auth_rule` VALUES (109, 1, 'admin', 'admin_url', 'admin/User/default', '', '管理组', ''); INSERT INTO `cmf_auth_rule` VALUES (110, 1, 'admin', 'admin_url', 'admin/User/index', '', '管理员', ''); INSERT INTO `cmf_auth_rule` VALUES (111, 1, 'admin', 'admin_url', 'admin/User/add', '', '管理员添加', ''); INSERT INTO `cmf_auth_rule` VALUES (112, 1, 'admin', 'admin_url', 'admin/User/addPost', '', '管理员添加提交', ''); INSERT INTO `cmf_auth_rule` VALUES (113, 1, 'admin', 'admin_url', 'admin/User/edit', '', '管理员编辑', ''); INSERT INTO `cmf_auth_rule` VALUES (114, 1, 'admin', 'admin_url', 'admin/User/editPost', '', '管理员编辑提交', ''); INSERT INTO `cmf_auth_rule` VALUES (115, 1, 'admin', 'admin_url', 'admin/User/userInfo', '', '个人信息', ''); INSERT INTO `cmf_auth_rule` VALUES (116, 1, 'admin', 'admin_url', 'admin/User/userInfoPost', '', '管理员个人信息修改提交', ''); INSERT INTO `cmf_auth_rule` VALUES (117, 1, 'admin', 'admin_url', 'admin/User/delete', '', '管理员删除', ''); INSERT INTO `cmf_auth_rule` VALUES (118, 1, 'admin', 'admin_url', 'admin/User/ban', '', '停用管理员', ''); INSERT INTO `cmf_auth_rule` VALUES (119, 1, 'admin', 'admin_url', 'admin/User/cancelBan', '', '启用管理员', ''); INSERT INTO `cmf_auth_rule` VALUES (120, 1, 'user', 'admin_url', 'user/AdminAsset/index', '', '资源管理', ''); INSERT INTO `cmf_auth_rule` VALUES (121, 1, 'user', 'admin_url', 'user/AdminAsset/delete', '', '删除文件', ''); INSERT INTO `cmf_auth_rule` VALUES (122, 1, 'user', 'admin_url', 'user/AdminIndex/default', '', '用户管理', ''); INSERT INTO `cmf_auth_rule` VALUES (123, 1, 'user', 'admin_url', 'user/AdminIndex/default1', '', '用户组', ''); INSERT INTO `cmf_auth_rule` VALUES (124, 1, 'user', 'admin_url', 'user/AdminIndex/index', '', '本站用户', ''); INSERT INTO `cmf_auth_rule` VALUES (125, 1, 'user', 'admin_url', 'user/AdminIndex/ban', '', '本站用户拉黑', ''); INSERT INTO `cmf_auth_rule` VALUES (126, 1, 'user', 'admin_url', 'user/AdminIndex/cancelBan', '', '本站用户启用', ''); INSERT INTO `cmf_auth_rule` VALUES (127, 1, 'user', 'admin_url', 'user/AdminOauth/index', '', '第三方用户', ''); INSERT INTO `cmf_auth_rule` VALUES (128, 1, 'user', 'admin_url', 'user/AdminOauth/delete', '', '删除第三方用户绑定', ''); INSERT INTO `cmf_auth_rule` VALUES (129, 1, 'user', 'admin_url', 'user/AdminUserAction/index', '', '用户操作管理', ''); INSERT INTO `cmf_auth_rule` VALUES (130, 1, 'user', 'admin_url', 'user/AdminUserAction/edit', '', '编辑用户操作', ''); INSERT INTO `cmf_auth_rule` VALUES (131, 1, 'user', 'admin_url', 'user/AdminUserAction/editPost', '', '编辑用户操作提交', ''); INSERT INTO `cmf_auth_rule` VALUES (132, 1, 'user', 'admin_url', 'user/AdminUserAction/sync', '', '同步用户操作', ''); INSERT INTO `cmf_auth_rule` VALUES (133, 1, 'admin', 'admin_url', 'admin/Pacontent/index', 'type=5', '单页管理', ''); INSERT INTO `cmf_auth_rule` VALUES (134, 1, 'admin', 'admin_url', 'admin/Class/index', '', '分类管理', ''); INSERT INTO `cmf_auth_rule` VALUES (135, 1, 'admin', 'admin_url', 'admin/Class/indexPacontent', 'type=1', '单页分类', ''); INSERT INTO `cmf_auth_rule` VALUES (136, 1, 'admin', 'admin_url', 'admin/Class/indexNews', 'type=2', '新闻分类', ''); INSERT INTO `cmf_auth_rule` VALUES (137, 1, 'admin', 'admin_url', 'admin/Class/indexProduct', 'type=3', '产品分类', ''); INSERT INTO `cmf_auth_rule` VALUES (138, 1, 'admin', 'admin_url', 'admin/News/index', 'type=6', '文章中心', ''); INSERT INTO `cmf_auth_rule` VALUES (139, 1, 'admin', 'admin_url', 'admin/Product/index', 'type=7', '产品中心', ''); INSERT INTO `cmf_auth_rule` VALUES (140, 1, 'admin', 'admin_url', 'admin/Test/index', '', '测试', ''); INSERT INTO `cmf_auth_rule` VALUES (141, 1, 'admin', 'admin_url', 'admin/Class/indexVideo', 'type=4', '文件分类', ''); INSERT INTO `cmf_auth_rule` VALUES (142, 1, 'admin', 'admin_url', 'admin/Message/index', 'type=8', '留言板', ''); INSERT INTO `cmf_auth_rule` VALUES (143, 1, 'admin', 'admin_url', 'admin/Video/index', 'type=9', '文件管理', ''); INSERT INTO `cmf_auth_rule` VALUES (144, 1, 'admin', 'admin_url', 'admin/Recruit/index', '', '招聘管理', ''); -- ---------------------------- -- Table structure for cmf_class -- ---------------------------- DROP TABLE IF EXISTS `cmf_class`; CREATE TABLE `cmf_class` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `type` int(11) NULL DEFAULT NULL, `parent_id` int(11) NULL DEFAULT NULL, `lang` tinyint(2) NULL DEFAULT 1, `order_num` int(11) NULL DEFAULT NULL, `status` int(1) NULL DEFAULT NULL, `is_recom` tinyint(1) NULL DEFAULT NULL COMMENT '是否推荐', `is_suto_seo` tinyint(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, `update_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `create_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `show_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_class -- ---------------------------- INSERT INTO `cmf_class` VALUES (1, 1, 0, 1, 1, 1, 0, NULL, '首页', '', '', '1604454660', '1604337056', '1604337016'); INSERT INTO `cmf_class` VALUES (2, 1, 0, 1, 2, 1, 0, NULL, '关于我们', '', '', '1604337068', '1604337068', '1604337058'); INSERT INTO `cmf_class` VALUES (3, 1, 0, 1, 3, 1, 0, NULL, '产品展示', '', '', '1604337075', '1604337075', '1604337070'); INSERT INTO `cmf_class` VALUES (4, 1, 0, 1, 4, 1, 0, NULL, '新闻动态', '', '', '1604337083', '1604337083', '1604337077'); INSERT INTO `cmf_class` VALUES (5, 1, 0, 1, 5, 1, 0, NULL, '营销网络', '', '', '1604337089', '1604337089', '1604337085'); INSERT INTO `cmf_class` VALUES (6, 1, 0, 1, 6, 1, 0, NULL, '联系方式', '', '', '1604337094', '1604337094', '1604337091'); INSERT INTO `cmf_class` VALUES (7, 1, 0, 1, 7, 1, 0, NULL, '留言反馈', '', '', '1604337100', '1604337100', '1604337096'); INSERT INTO `cmf_class` VALUES (8, 1, 1, 1, 8, 1, 0, NULL, 'banner', '', '', '1604337116', '1604337116', '1604337109'); INSERT INTO `cmf_class` VALUES (9, 1, 1, 1, 9, 1, 0, NULL, '热门关键词', '', '', '1604337130', '1604337130', '1604337118'); INSERT INTO `cmf_class` VALUES (10, 1, 1, 1, 10, 1, 0, NULL, '公司简介', '', '', '1604337139', '1604337139', '1604337132'); INSERT INTO `cmf_class` VALUES (35, 1, 5, 1, 27, 1, 0, NULL, '营销网络图', '', '', '1604515373', '1604515345', '1604515328'); INSERT INTO `cmf_class` VALUES (12, 3, 0, 1, 1, 1, 0, NULL, '工程机械', '', '', '1604508473', '1604337305', '1604337299'); INSERT INTO `cmf_class` VALUES (13, 3, 0, 1, 2, 1, 0, NULL, '印刷机械', '', '', '1604508480', '1604337349', '1604337307'); INSERT INTO `cmf_class` VALUES (14, 2, 0, 1, 1, 1, 0, NULL, '公司新闻', '', '', '1604337503', '1604337503', '1604337495'); INSERT INTO `cmf_class` VALUES (15, 2, 0, 1, 2, 1, 0, NULL, '行业动态', '', '', '1604337510', '1604337510', '1604337505'); INSERT INTO `cmf_class` VALUES (30, 1, 1, 1, 23, 1, 0, NULL, '联系方式', '', '', '1604450680', '1604450680', '1604450653'); INSERT INTO `cmf_class` VALUES (18, 1, 0, 1, 13, 1, 0, NULL, '顶部底部侧边', '', '', '1604338285', '1604338181', '1604338176'); INSERT INTO `cmf_class` VALUES (19, 1, 18, 1, 14, 1, 0, NULL, '友情链接', '', '', '1604338208', '1604338208', '1604338195'); INSERT INTO `cmf_class` VALUES (20, 1, 18, 1, 15, 1, 0, NULL, '侧边售后热线', '', '', '1604338320', '1604338320', '1604338302'); INSERT INTO `cmf_class` VALUES (32, 1, 18, 1, 24, 1, 0, NULL, '授权信息', '', '', '1604464623', '1604464623', '1604464602'); INSERT INTO `cmf_class` VALUES (22, 1, 2, 1, 16, 1, 0, NULL, 'banner', '', '', '1604371814', '1604371814', '1604371809'); INSERT INTO `cmf_class` VALUES (23, 1, 3, 1, 17, 1, 0, NULL, 'banner', '', '', '1604371821', '1604371821', '1604371816'); INSERT INTO `cmf_class` VALUES (24, 1, 4, 1, 18, 1, 0, NULL, 'banner', '', '', '1604371828', '1604371828', '1604371823'); INSERT INTO `cmf_class` VALUES (25, 1, 5, 1, 19, 1, 0, NULL, 'banner', '', '', '1604371835', '1604371835', '1604371830'); INSERT INTO `cmf_class` VALUES (26, 1, 6, 1, 20, 1, 0, NULL, 'banner', '', '', '1604371841', '1604371841', '1604371837'); INSERT INTO `cmf_class` VALUES (27, 1, 7, 1, 21, 1, 0, NULL, 'banner', '', '', '1604371848', '1604371848', '1604371843'); INSERT INTO `cmf_class` VALUES (36, 1, 6, 1, 28, 1, 0, NULL, '联系方式文字', '', '', '1604515920', '1604515920', '1604515911'); INSERT INTO `cmf_class` VALUES (33, 1, 18, 1, 25, 1, 0, NULL, '联系方式', '', '', '1604480257', '1604480257', '1604480252'); INSERT INTO `cmf_class` VALUES (34, 1, 2, 1, 26, 1, 0, NULL, '关于我们简介', '', '', '1604499846', '1604499846', '1604499837'); -- ---------------------------- -- Table structure for cmf_comment -- ---------------------------- DROP TABLE IF EXISTS `cmf_comment`; CREATE TABLE `cmf_comment` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `parent_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '被回复的评论id', `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发表评论的用户id', `to_user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '被评论的用户id', `object_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评论内容 id', `like_count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '点赞数', `dislike_count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '不喜欢数', `floor` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '楼层数', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评论时间', `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态,1:已审核,0:未审核', `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '评论类型;1实名评论', `table_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '评论内容所在表,不带表前缀', `full_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '评论者昵称', `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '评论者邮箱', `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '层级关系', `url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '原文地址', `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评论内容', `more` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '扩展属性', PRIMARY KEY (`id`) USING BTREE, INDEX `table_id_status`(`table_name`, `object_id`, `status`) USING BTREE, INDEX `object_id`(`object_id`) USING BTREE, INDEX `status`(`status`) USING BTREE, INDEX `parent_id`(`parent_id`) USING BTREE, INDEX `create_time`(`create_time`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评论表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_comment -- ---------------------------- -- ---------------------------- -- Table structure for cmf_content -- ---------------------------- DROP TABLE IF EXISTS `cmf_content`; CREATE TABLE `cmf_content` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Fixed; -- ---------------------------- -- Records of cmf_content -- ---------------------------- -- ---------------------------- -- Table structure for cmf_hook -- ---------------------------- DROP TABLE IF EXISTS `cmf_hook`; CREATE TABLE `cmf_hook` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '钩子类型(1:系统钩子;2:应用钩子;3:模板钩子;4:后台模板钩子)', `once` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否只允许一个插件运行(0:多个;1:一个)', `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子名称', `hook` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子', `app` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '应用名(只有应用钩子才用)', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '描述', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统钩子表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_hook -- ---------------------------- INSERT INTO `cmf_hook` VALUES (2, 1, 0, '应用开始', 'app_begin', 'cmf', '应用开始'); INSERT INTO `cmf_hook` VALUES (3, 1, 0, '模块初始化', 'module_init', 'cmf', '模块初始化'); INSERT INTO `cmf_hook` VALUES (4, 1, 0, '控制器开始', 'action_begin', 'cmf', '控制器开始'); INSERT INTO `cmf_hook` VALUES (5, 1, 0, '视图输出过滤', 'view_filter', 'cmf', '视图输出过滤'); INSERT INTO `cmf_hook` VALUES (6, 1, 0, '应用结束', 'app_end', 'cmf', '应用结束'); INSERT INTO `cmf_hook` VALUES (7, 1, 0, '日志write方法', 'log_write', 'cmf', '日志write方法'); INSERT INTO `cmf_hook` VALUES (8, 1, 0, '输出结束', 'response_end', 'cmf', '输出结束'); INSERT INTO `cmf_hook` VALUES (9, 1, 0, '后台控制器初始化', 'admin_init', 'cmf', '后台控制器初始化'); INSERT INTO `cmf_hook` VALUES (10, 1, 0, '前台控制器初始化', 'home_init', 'cmf', '前台控制器初始化'); INSERT INTO `cmf_hook` VALUES (11, 1, 1, '发送手机验证码', 'send_mobile_verification_code', 'cmf', '发送手机验证码'); INSERT INTO `cmf_hook` VALUES (12, 3, 0, '模板 body标签开始', 'body_start', '', '模板 body标签开始'); INSERT INTO `cmf_hook` VALUES (13, 3, 0, '模板 head标签结束前', 'before_head_end', '', '模板 head标签结束前'); INSERT INTO `cmf_hook` VALUES (14, 3, 0, '模板底部开始', 'footer_start', '', '模板底部开始'); INSERT INTO `cmf_hook` VALUES (15, 3, 0, '模板底部开始之前', 'before_footer', '', '模板底部开始之前'); INSERT INTO `cmf_hook` VALUES (16, 3, 0, '模板底部结束之前', 'before_footer_end', '', '模板底部结束之前'); INSERT INTO `cmf_hook` VALUES (17, 3, 0, '模板 body 标签结束之前', 'before_body_end', '', '模板 body 标签结束之前'); INSERT INTO `cmf_hook` VALUES (18, 3, 0, '模板左边栏开始', 'left_sidebar_start', '', '模板左边栏开始'); INSERT INTO `cmf_hook` VALUES (19, 3, 0, '模板左边栏结束之前', 'before_left_sidebar_end', '', '模板左边栏结束之前'); INSERT INTO `cmf_hook` VALUES (20, 3, 0, '模板右边栏开始', 'right_sidebar_start', '', '模板右边栏开始'); INSERT INTO `cmf_hook` VALUES (21, 3, 0, '模板右边栏结束之前', 'before_right_sidebar_end', '', '模板右边栏结束之前'); INSERT INTO `cmf_hook` VALUES (22, 3, 1, '评论区', 'comment', '', '评论区'); INSERT INTO `cmf_hook` VALUES (23, 3, 1, '留言区', 'guestbook', '', '留言区'); INSERT INTO `cmf_hook` VALUES (24, 2, 0, '后台首页仪表盘', 'admin_dashboard', 'admin', '后台首页仪表盘'); INSERT INTO `cmf_hook` VALUES (25, 4, 0, '后台模板 head标签结束前', 'admin_before_head_end', '', '后台模板 head标签结束前'); INSERT INTO `cmf_hook` VALUES (26, 4, 0, '后台模板 body 标签结束之前', 'admin_before_body_end', '', '后台模板 body 标签结束之前'); INSERT INTO `cmf_hook` VALUES (27, 2, 0, '后台登录页面', 'admin_login', 'admin', '后台登录页面'); INSERT INTO `cmf_hook` VALUES (28, 1, 1, '前台模板切换', 'switch_theme', 'cmf', '前台模板切换'); INSERT INTO `cmf_hook` VALUES (29, 3, 0, '主要内容之后', 'after_content', '', '主要内容之后'); INSERT INTO `cmf_hook` VALUES (32, 2, 1, '获取上传界面', 'fetch_upload_view', 'user', '获取上传界面'); INSERT INTO `cmf_hook` VALUES (33, 3, 0, '主要内容之前', 'before_content', 'cmf', '主要内容之前'); INSERT INTO `cmf_hook` VALUES (34, 1, 0, '日志写入完成', 'log_write_done', 'cmf', '日志写入完成'); INSERT INTO `cmf_hook` VALUES (35, 1, 1, '后台模板切换', 'switch_admin_theme', 'cmf', '后台模板切换'); INSERT INTO `cmf_hook` VALUES (36, 1, 1, '验证码图片', 'captcha_image', 'cmf', '验证码图片'); INSERT INTO `cmf_hook` VALUES (37, 2, 1, '后台模板设计界面', 'admin_theme_design_view', 'admin', '后台模板设计界面'); INSERT INTO `cmf_hook` VALUES (38, 2, 1, '后台设置网站信息界面', 'admin_setting_site_view', 'admin', '后台设置网站信息界面'); INSERT INTO `cmf_hook` VALUES (39, 2, 1, '后台清除缓存界面', 'admin_setting_clear_cache_view', 'admin', '后台清除缓存界面'); INSERT INTO `cmf_hook` VALUES (40, 2, 1, '后台导航管理界面', 'admin_nav_index_view', 'admin', '后台导航管理界面'); INSERT INTO `cmf_hook` VALUES (41, 2, 1, '后台友情链接管理界面', 'admin_link_index_view', 'admin', '后台友情链接管理界面'); INSERT INTO `cmf_hook` VALUES (42, 2, 1, '后台幻灯片管理界面', 'admin_slide_index_view', 'admin', '后台幻灯片管理界面'); INSERT INTO `cmf_hook` VALUES (43, 2, 1, '后台管理员列表界面', 'admin_user_index_view', 'admin', '后台管理员列表界面'); INSERT INTO `cmf_hook` VALUES (44, 2, 1, '后台角色管理界面', 'admin_rbac_index_view', 'admin', '后台角色管理界面'); INSERT INTO `cmf_hook` VALUES (49, 2, 1, '用户管理本站用户列表界面', 'user_admin_index_view', 'user', '用户管理本站用户列表界面'); INSERT INTO `cmf_hook` VALUES (50, 2, 1, '资源管理列表界面', 'user_admin_asset_index_view', 'user', '资源管理列表界面'); INSERT INTO `cmf_hook` VALUES (51, 2, 1, '用户管理第三方用户列表界面', 'user_admin_oauth_index_view', 'user', '用户管理第三方用户列表界面'); INSERT INTO `cmf_hook` VALUES (52, 2, 1, '后台首页界面', 'admin_index_index_view', 'admin', '后台首页界面'); INSERT INTO `cmf_hook` VALUES (53, 2, 1, '后台回收站界面', 'admin_recycle_bin_index_view', 'admin', '后台回收站界面'); INSERT INTO `cmf_hook` VALUES (54, 2, 1, '后台菜单管理界面', 'admin_menu_index_view', 'admin', '后台菜单管理界面'); INSERT INTO `cmf_hook` VALUES (55, 2, 1, '后台自定义登录是否开启钩子', 'admin_custom_login_open', 'admin', '后台自定义登录是否开启钩子'); INSERT INTO `cmf_hook` VALUES (64, 2, 1, '后台幻灯片页面列表界面', 'admin_slide_item_index_view', 'admin', '后台幻灯片页面列表界面'); INSERT INTO `cmf_hook` VALUES (65, 2, 1, '后台幻灯片页面添加界面', 'admin_slide_item_add_view', 'admin', '后台幻灯片页面添加界面'); INSERT INTO `cmf_hook` VALUES (66, 2, 1, '后台幻灯片页面编辑界面', 'admin_slide_item_edit_view', 'admin', '后台幻灯片页面编辑界面'); INSERT INTO `cmf_hook` VALUES (67, 2, 1, '后台管理员添加界面', 'admin_user_add_view', 'admin', '后台管理员添加界面'); INSERT INTO `cmf_hook` VALUES (68, 2, 1, '后台管理员编辑界面', 'admin_user_edit_view', 'admin', '后台管理员编辑界面'); INSERT INTO `cmf_hook` VALUES (69, 2, 1, '后台角色添加界面', 'admin_rbac_role_add_view', 'admin', '后台角色添加界面'); INSERT INTO `cmf_hook` VALUES (70, 2, 1, '后台角色编辑界面', 'admin_rbac_role_edit_view', 'admin', '后台角色编辑界面'); INSERT INTO `cmf_hook` VALUES (71, 2, 1, '后台角色授权界面', 'admin_rbac_authorize_view', 'admin', '后台角色授权界面'); INSERT INTO `cmf_hook` VALUES (72, 2, 1, '后台内容管理界面', 'admin_pacontent_default_view', 'admin', '后台内容管理界面'); INSERT INTO `cmf_hook` VALUES (73, 1, 0, '应用调度', 'app_dispatch', 'cmf', '应用调度'); -- ---------------------------- -- Table structure for cmf_hook_plugin -- ---------------------------- DROP TABLE IF EXISTS `cmf_hook_plugin`; CREATE TABLE `cmf_hook_plugin` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用)', `hook` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子名', `plugin` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '插件', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统钩子插件表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_hook_plugin -- ---------------------------- -- ---------------------------- -- Table structure for cmf_img -- ---------------------------- DROP TABLE IF EXISTS `cmf_img`; CREATE TABLE `cmf_img` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `order_num` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '排序数', `is_cover` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否是封面图片。0为不是,1为是。默认为0,不是', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '未命名图片' COMMENT '图片名(前台显示图片名)', `origi_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原图', `thumb_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缩略图,改变质量但不改变大小', `note` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注', `show_time` int(10) UNSIGNED NOT NULL COMMENT '发布时间', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', `create_time` int(10) UNSIGNED NOT NULL COMMENT '添加时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图片表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_img -- ---------------------------- INSERT INTO `cmf_img` VALUES (6, NULL, 0, '未命名图片', 'admin/20201103/cf5d60e4808cd149adb4ebbdc976b32f.jpg', 'admin/20201103/t_cf5d60e4808cd149adb4ebbdc976b32f.jpg', NULL, 1604337903, 1604337903, 1604337903); INSERT INTO `cmf_img` VALUES (9, NULL, 0, '未命名图片', 'admin/20201104/2f6ba659460ca806e7aaec90214d14cc.jpg', 'admin/20201104/t_2f6ba659460ca806e7aaec90214d14cc.jpg', NULL, 1604450523, 1604450523, 1604450523); INSERT INTO `cmf_img` VALUES (10, NULL, 0, '未命名图片', 'admin/20201104/6265f7095a88bccc21e86256ad302eff.jpg', 'admin/20201104/t_6265f7095a88bccc21e86256ad302eff.jpg', NULL, 1604452373, 1604452373, 1604452373); INSERT INTO `cmf_img` VALUES (11, NULL, 0, '未命名图片', 'admin/20201104/662ebf48b92bf3d9a38927e1ceb4a4e1.jpg', 'admin/20201104/t_662ebf48b92bf3d9a38927e1ceb4a4e1.jpg', NULL, 1604452422, 1604452422, 1604452422); INSERT INTO `cmf_img` VALUES (12, NULL, 0, '未命名图片', 'admin/20201104/2f6ba659460ca806e7aaec90214d14cc.jpg', 'admin/20201104/t_2f6ba659460ca806e7aaec90214d14cc.jpg', NULL, 1604454567, 1604454567, 1604454567); INSERT INTO `cmf_img` VALUES (13, NULL, 0, '未命名图片', 'admin/20201104/d72925a1b71a74747e4e4584b61f57e6.jpg', 'admin/20201104/t_d72925a1b71a74747e4e4584b61f57e6.jpg', NULL, 1604454567, 1604454567, 1604454567); INSERT INTO `cmf_img` VALUES (14, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604499807, 1604499807, 1604499807); INSERT INTO `cmf_img` VALUES (15, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604504162, 1604504162, 1604504162); INSERT INTO `cmf_img` VALUES (19, NULL, 0, '未命名图片', 'admin/20201103/0d50796f79342c8ddbe8cfbe9a05dc49.jpg', 'admin/20201103/t_0d50796f79342c8ddbe8cfbe9a05dc49.jpg', NULL, 1604509016, 1604509016, 1604509016); INSERT INTO `cmf_img` VALUES (20, NULL, 0, '未命名图片', 'admin/20201103/a79a9f626670d03e706c876a48ebeef7.jpg', 'admin/20201103/t_a79a9f626670d03e706c876a48ebeef7.jpg', NULL, 1604509016, 1604509016, 1604509016); INSERT INTO `cmf_img` VALUES (22, NULL, 0, '未命名图片', 'admin/20201104/662ebf48b92bf3d9a38927e1ceb4a4e1.jpg', 'admin/20201104/t_662ebf48b92bf3d9a38927e1ceb4a4e1.jpg', NULL, 1604509042, 1604509042, 1604509042); INSERT INTO `cmf_img` VALUES (23, NULL, 0, '未命名图片', 'admin/20201103/0d50796f79342c8ddbe8cfbe9a05dc49.jpg', 'admin/20201103/t_0d50796f79342c8ddbe8cfbe9a05dc49.jpg', NULL, 1604511457, 1604511457, 1604511457); INSERT INTO `cmf_img` VALUES (24, NULL, 0, '未命名图片', 'admin/20201103/a79a9f626670d03e706c876a48ebeef7.jpg', 'admin/20201103/t_a79a9f626670d03e706c876a48ebeef7.jpg', NULL, 1604511457, 1604511457, 1604511457); INSERT INTO `cmf_img` VALUES (25, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604513106, 1604513106, 1604513106); INSERT INTO `cmf_img` VALUES (26, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604515011, 1604515011, 1604515011); INSERT INTO `cmf_img` VALUES (27, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604515023, 1604515023, 1604515023); INSERT INTO `cmf_img` VALUES (28, NULL, 0, '未命名图片', 'admin/20201104/47aaa03ed80e1281932147598c97f39d.jpg', 'admin/20201104/t_47aaa03ed80e1281932147598c97f39d.jpg', NULL, 1604515044, 1604515044, 1604515044); INSERT INTO `cmf_img` VALUES (29, NULL, 0, '未命名图片', 'admin/20201103/cf5d60e4808cd149adb4ebbdc976b32f.jpg', 'admin/20201103/t_cf5d60e4808cd149adb4ebbdc976b32f.jpg', NULL, 1604515345, 1604515345, 1604515345); INSERT INTO `cmf_img` VALUES (30, NULL, 0, '未命名图片', 'admin/20201103/a79a9f626670d03e706c876a48ebeef7.jpg', 'admin/20201103/t_a79a9f626670d03e706c876a48ebeef7.jpg', NULL, 1604538714, 1604538714, 1604538714); -- ---------------------------- -- Table structure for cmf_img_content -- ---------------------------- DROP TABLE IF EXISTS `cmf_img_content`; CREATE TABLE `cmf_img_content` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `img_id` int(10) UNSIGNED NOT NULL COMMENT '外键,标签id', `type` int(10) UNSIGNED NOT NULL COMMENT '外键,类型id', `content_id` int(10) UNSIGNED NOT NULL COMMENT '外键,具体内容id。如具体某一新闻,产品的id(或者某一分类的id)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图片/内容关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_img_content -- ---------------------------- INSERT INTO `cmf_img_content` VALUES (6, 6, 5, 13); INSERT INTO `cmf_img_content` VALUES (10, 10, 5, 20); INSERT INTO `cmf_img_content` VALUES (11, 11, 6, 1); INSERT INTO `cmf_img_content` VALUES (12, 12, 5, 17); INSERT INTO `cmf_img_content` VALUES (13, 13, 5, 17); INSERT INTO `cmf_img_content` VALUES (14, 14, 5, 25); INSERT INTO `cmf_img_content` VALUES (15, 15, 5, 27); INSERT INTO `cmf_img_content` VALUES (19, 19, 7, 2); INSERT INTO `cmf_img_content` VALUES (20, 20, 7, 2); INSERT INTO `cmf_img_content` VALUES (22, 22, 6, 3); INSERT INTO `cmf_img_content` VALUES (23, 23, 7, 1); INSERT INTO `cmf_img_content` VALUES (24, 24, 7, 1); INSERT INTO `cmf_img_content` VALUES (25, 25, 5, 28); INSERT INTO `cmf_img_content` VALUES (26, 26, 5, 29); INSERT INTO `cmf_img_content` VALUES (27, 27, 5, 30); INSERT INTO `cmf_img_content` VALUES (28, 28, 5, 31); INSERT INTO `cmf_img_content` VALUES (29, 30, 7, 3); -- ---------------------------- -- Table structure for cmf_link -- ---------------------------- DROP TABLE IF EXISTS `cmf_link`; CREATE TABLE `cmf_link` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态;1:显示;0:不显示', `rating` int(11) NOT NULL DEFAULT 0 COMMENT '友情链接评级', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '友情链接描述', `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '友情链接地址', `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '友情链接名称', `image` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '友情链接图标', `target` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '友情链接打开方式', `rel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '链接与网站的关系', PRIMARY KEY (`id`) USING BTREE, INDEX `status`(`status`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '友情链接表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_link -- ---------------------------- -- ---------------------------- -- Table structure for cmf_message -- ---------------------------- DROP TABLE IF EXISTS `cmf_message`; CREATE TABLE `cmf_message` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名', `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '电话', `create_time` int(12) NULL DEFAULT NULL COMMENT '添加时间', `order_num` int(10) NULL DEFAULT NULL COMMENT '排序', `status` int(1) NULL DEFAULT 0 COMMENT '状态', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_message -- ---------------------------- -- ---------------------------- -- Table structure for cmf_nav -- ---------------------------- DROP TABLE IF EXISTS `cmf_nav`; CREATE TABLE `cmf_nav` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `is_main` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否为主导航;1:是;0:不是', `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '导航位置名称', `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '前台导航位置表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_nav -- ---------------------------- -- ---------------------------- -- Table structure for cmf_nav_menu -- ---------------------------- DROP TABLE IF EXISTS `cmf_nav_menu`; CREATE TABLE `cmf_nav_menu` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nav_id` int(11) NOT NULL COMMENT '导航 id', `parent_id` int(11) NOT NULL COMMENT '父 id', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态;1:显示;0:隐藏', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单名称', `target` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '打开方式', `href` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '链接', `icon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图标', `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '层级关系', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '前台导航菜单表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_nav_menu -- ---------------------------- INSERT INTO `cmf_nav_menu` VALUES (1, 1, 0, 1, 0, '首页', '', 'home', '', '0-1'); -- ---------------------------- -- Table structure for cmf_news -- ---------------------------- DROP TABLE IF EXISTS `cmf_news`; CREATE TABLE `cmf_news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(3) NULL DEFAULT NULL COMMENT '分类id', `lang` int(1) NULL DEFAULT 1 COMMENT '语言', `hits` int(11) NULL DEFAULT 0 COMMENT '点击次数', `order_num` int(5) NULL DEFAULT NULL COMMENT '排序', `status` int(1) UNSIGNED ZEROFILL NULL DEFAULT 1 COMMENT '状态', `is_auto_seo` tinyint(4) NULL DEFAULT 1, `is_recom` tinyint(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '简介', `other_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他信息', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `show_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布时间,可修改', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_news -- ---------------------------- INSERT INTO `cmf_news` VALUES (1, 14, 1, NULL, 1, 1, 1, 1, '01公司', '&lt;p&gt;XX月XX日至XX日,中国国际高新技术成果交易会在深圳会展中心隆重举行。XX集团作为装备制造产业中创新业绩突出、对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了&lt;/p&gt;', '', '', '1604337665', '1604452422', '1604337632'); INSERT INTO `cmf_news` VALUES (2, 14, 1, NULL, 1, 1, 1, 0, '02公司', '&lt;p&gt;XX月XX日至XX日,中国国际高新技术成果交易会在深圳会展中心隆重举行。XX集团作为装备制造产业中创新业绩突出、对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了&lt;/p&gt;', '', '', '1604337665', '1604536865', '1604337632'); INSERT INTO `cmf_news` VALUES (3, 15, 1, NULL, 1, 1, 1, 0, '03公司', '&lt;p&gt;XX月XX日至XX日,中国国际高新技术成果交易会在深圳会展中心隆重举行。XX集团作为装备制造产业中创新业绩突出、对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了&lt;/p&gt;', '', '', '1604337665', '1604509042', '1604337632'); INSERT INTO `cmf_news` VALUES (4, 15, 1, NULL, 1, 1, 1, 1, '04公司', '&lt;p&gt;XX月XX日至XX日,中国国际高新技术成果交易会在深圳会展中心隆重举行。XX集团作为装备制造产业中创新业绩突出、对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了对产业技术进步具有重要作用的代表性企业,应国家发改委等主办方邀参加了&lt;/p&gt;', '', '', '1604337665', '1604337707', '1604337632'); -- ---------------------------- -- Table structure for cmf_option -- ---------------------------- DROP TABLE IF EXISTS `cmf_option`; CREATE TABLE `cmf_option` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `autoload` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否自动加载;1:自动加载;0:不自动加载', `option_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '配置名', `option_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '配置值', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `option_name`(`option_name`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '全站配置表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of cmf_option -- ---------------------------- INSERT INTO `cmf_option` VALUES (1, 1, 'site_info', '{\"site_name\":\"\\u5b81\\u6ce2\\u5a01\\u5eb7\\u65b0\\u6750\\u6599\\u6709\\u9650\\u516c\\u53f8\",\"site_seo_title\":\"ThinkCMF\\u5185\\u5bb9\\u7ba1\\u7406\\u6846\\u67b6\",\"site_seo_keywords\":\"ThinkCMF,php,\\u5185\\u5bb9\\u7ba1\\u7406\\u6846\\u67b6,cmf,cms,\\u7b80\\u7ea6\\u98ce, simplewind,framework\",\"site_seo_description\":\"ThinkCMF\\u662f\\u7b80\\u7ea6\\u98ce\\u7f51\\u7edc\\u79d1\\u6280\\u53d1\\u5e03\\u7684\\u4e00\\u6b3e\\u7528\\u4e8e\\u5feb\\u901f\\u5f00\\u53d1\\u7684\\u5185\\u5bb9\\u7ba1\\u7406\\u6846\\u67b6\",\"site_icp\":\"00001\",\"site_gwa\":\"\\u7248\\u6743\\u6240\\u6709\\u5b81\\u6ce2\\u5a01\\u5eb7\\u65b0\\u6750\\u6599\\u6709\\u9650\\u516c\\u53f8\\u3000\\u6d59ICP\\u5907110\\u53f7\",\"site_admin_email\":\"\",\"contact\":\"&lt;p&gt;\\u7248\\u6743\\u6240\\u6709 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\\u5b81\\u6ce2\\u5a01\\u5eb7\\u65b0\\u6750\\u6599\\u6709\\u9650\\u516c\\u53f8 \\u6caaICP\\u59078888XXXX\\u53f7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\\u516c\\u53f8\\u5730\\u5740\\uff1a\\u5b81\\u6ce2\\u5e02\\u9ad8\\u65b0\\u533a\\u901a\\u9014\\u8def2577\\u53f7\\uff08\\u76db\\u6885\\u8def\\u53e3\\uff09&lt;\\/p&gt;&lt;p&gt;\\u7535\\u8bdd\\uff1a0574-88487082 \\/88352228 &amp;nbsp; QQ 772535115 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\\u90ae\\u7bb1\\uff1ajklfqy@126.com&lt;\\/p&gt;\",\"logo\":\"admin\\/20200827\\/913c49121a329e1774dc62075683b3ff.png\",\"phone\":\"110\",\"fax\":\"110\",\"mobile\":\"18888888888\",\"email\":\"1@qq.com\",\"qr\":\"admin\\/20201103\\/6c57c59fabdb5e7fc645292ef71118d6.png\",\"address_cn\":\"\\u6d59\\u6c5f\\u5b81\\u6ce2\",\"address_en\":\"zhejiang ningbo\",\"lng\":\"121.558977\",\"lat\":\"29.882388\",\"logo_en\":\"admin\\/20201103\\/b63c32f9095a43f4b082309136fb08e1.png\",\"site_name_en\":\"Weikang New Materials Co.,Ldt.\",\"logo_cn\":\"admin\\/20201103\\/b63c32f9095a43f4b082309136fb08e1.png\"}'); INSERT INTO `cmf_option` VALUES (2, 1, 'admin_dashboard_widgets', '[{\"name\":\"CmfHub\",\"is_system\":1},{\"name\":\"Contributors\",\"is_system\":1},{\"name\":\"CmfDocuments\",\"is_system\":1},{\"name\":\"MainContributors\",\"is_system\":1},{\"name\":\"Custom1\",\"is_system\":1},{\"name\":\"Custom2\",\"is_system\":1},{\"name\":\"Custom3\",\"is_system\":1},{\"name\":\"Custom4\",\"is_system\":1},{\"name\":\"Custom5\",\"is_system\":1}]'); INSERT INTO `cmf_option` VALUES (3, 1, 'upload_setting', '{\"0\":\"{\\\"max_files\\\":\\\"20\\\",\\\"chunk_size\\\":\\\"512\\\",\\\"file_types\\\":{\\\"image\\\":{\\\"upload_max_filesize\\\":\\\"10240\\\",\\\"extensions\\\":\\\"jpg,jpeg,png,gif,bmp4\\\"},\\\"video\\\":{\\\"upload_max_filesize\\\":\\\"102400\\\",\\\"extensions\\\":\\\"mp4,avi,wmv,rm,rmvb,mkv\\\"},\\\"audio\\\":{\\\"upload_max_filesize\\\":\\\"10240\\\",\\\"extensions\\\":\\\"mp3,wma,wav\\\"},\\\"file\\\":{\\\"upload_max_filesize\\\":\\\"10240\\\",\\\"extensions\\\":\\\"txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar\\\"}}}\",\"max_files\":\"20\",\"chunk_size\":\"512\",\"file_types\":{\"image\":{\"upload_max_filesize\":\"102400\",\"extensions\":\"jpg,jpeg,png,gif,bmp4\"},\"video\":{\"upload_max_filesize\":\"102400\",\"extensions\":\"mp4,avi,wmv,rm,rmvb,mkv\"},\"audio\":{\"upload_max_filesize\":\"10240\",\"extensions\":\"mp3,wma,wav\"},\"file\":{\"upload_max_filesize\":\"102400\",\"extensions\":\"txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar\"}}}'); INSERT INTO `cmf_option` VALUES (4, 1, 'admin_settings', '{\"admin_password\":\"\",\"admin_theme\":\"admin_simpleboot3\",\"admin_style\":\"simpleadmin\"}'); INSERT INTO `cmf_option` VALUES (5, 1, 'cmf_settings', '{\"0\":\"{\\\"banned_usernames\\\":\\\"\\\"}\",\"banned_usernames\":\"\"}'); -- ---------------------------- -- Table structure for cmf_pacontent -- ---------------------------- DROP TABLE IF EXISTS `cmf_pacontent`; CREATE TABLE `cmf_pacontent` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(3) NULL DEFAULT NULL COMMENT '分类id', `lang` int(1) NULL DEFAULT 1 COMMENT '语言', `order_num` int(5) NULL DEFAULT NULL COMMENT '排序', `status` int(1) UNSIGNED ZEROFILL NULL DEFAULT 1 COMMENT '状态', `is_auto_seo` tinyint(4) NULL DEFAULT 1 COMMENT '是否自动seo', `is_recom` tinyint(1) NULL DEFAULT NULL COMMENT '是否推荐', `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '简介', `other_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他信息', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `show_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布时间,可修改', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_pacontent -- ---------------------------- INSERT INTO `cmf_pacontent` VALUES (1, 36, 1, 1, 1, 1, 0, '地址', '', '', '地址:宁波市高新区通途路2577号(盛梅路口)', '1604337749', '1604337749', '1604337731'); INSERT INTO `cmf_pacontent` VALUES (2, 36, 1, 2, 1, 1, 0, '电话', '', '', '0574-88487082 /88352228 QQ 772535115', '1604337767', '1604337767', '1604337751'); INSERT INTO `cmf_pacontent` VALUES (3, 36, 1, 3, 1, 1, 0, '传真', '', '', '0574-88487076 /88369223 local job listings', '1604337784', '1604337784', '1604337769'); INSERT INTO `cmf_pacontent` VALUES (4, 36, 1, 4, 1, 1, 0, '邮箱', '', '', '1@com', '1604337809', '1604337809', '1604337786'); INSERT INTO `cmf_pacontent` VALUES (5, 36, 1, 5, 1, 1, 0, '联系人', '', '', '总经理', '1604337821', '1604337821', '1604337811'); INSERT INTO `cmf_pacontent` VALUES (6, 36, 1, 6, 1, 1, 0, '手机', '', '', '13122334455', '1604337831', '1604337831', '1604337823'); INSERT INTO `cmf_pacontent` VALUES (7, 7, 1, 1, 1, 1, 0, '地址', '', '', '地址:宁波市高新区通途路2577号(盛梅路口)', '1604337749', '1604337749', '1604337731'); INSERT INTO `cmf_pacontent` VALUES (8, 7, 1, 2, 1, 1, 0, '电话', '', '', '0574-88487082 /88352228 QQ 772535115', '1604337767', '1604337767', '1604337751'); INSERT INTO `cmf_pacontent` VALUES (9, 7, 1, 3, 1, 1, 0, '传真', '', '', '0574-88487076 /88369223 local job listings', '1604337784', '1604337784', '1604337769'); INSERT INTO `cmf_pacontent` VALUES (10, 7, 1, 4, 1, 1, 0, '邮箱', '', '', '1@com', '1604337809', '1604337809', '1604337786'); INSERT INTO `cmf_pacontent` VALUES (11, 7, 1, 5, 1, 1, 0, '联系人', '', '', '总经理', '1604337821', '1604337821', '1604337811'); INSERT INTO `cmf_pacontent` VALUES (12, 7, 1, 6, 1, 1, 0, '手机', '', '', '13122334455', '1604337831', '1604337831', '1604337823'); INSERT INTO `cmf_pacontent` VALUES (14, 19, 1, 8, 1, 1, 0, '友情链接1', '', '', 'https://www.baidu.com', '1604338234', '1604338234', '1604338214'); INSERT INTO `cmf_pacontent` VALUES (15, 19, 1, 9, 1, 1, 0, '友情链接2', '', '', 'https://www.souhu.com', '1604338265', '1604338265', '1604338236'); INSERT INTO `cmf_pacontent` VALUES (16, 20, 1, 10, 1, 1, 0, '售后热线', '', '', '400-000-00000', '1604338348', '1604338348', '1604338324'); INSERT INTO `cmf_pacontent` VALUES (17, 8, 1, 11, 1, 1, 0, '首页banner', '', '', '', '1604450491', '1604454567', '1604450405'); INSERT INTO `cmf_pacontent` VALUES (18, 9, 1, 12, 1, 1, 0, '混凝土泵车', '', '', '网址', '1604450568', '1604454851', '1604450544'); INSERT INTO `cmf_pacontent` VALUES (19, 9, 1, 13, 1, 1, 0, '装载机', '', '', '网址', '1604450575', '1604454863', '1604450570'); INSERT INTO `cmf_pacontent` VALUES (20, 10, 1, 14, 1, 1, 0, '公司简介', '&lt;p&gt;主要产品有:工程起重机械、筑路机械、路面及养护机械、压实机械、铲土运输机械、挖掘机械、砼泵机械、铁路施工机械、高空消防设备、特种专用车辆、专用底盘、载重汽车等主机和工程机械基础零部件产品。其中汽车起重机、压路机、摊铺机、高空消防车、平地机。&lt;/p&gt;', '', '', '1604450637', '1604452373', '1604450588'); INSERT INTO `cmf_pacontent` VALUES (21, 30, 1, 15, 1, 1, 0, '首页联系方式', '&lt;p&gt;地址:宁波市高新区通途路2577号(盛梅路口) &amp;nbsp;&amp;nbsp;&amp;nbsp;电话:0574-88487082 /88352228&lt;/p&gt;&lt;p&gt;邮箱:jklfqy@126.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;QQ客服:772535115&lt;/p&gt;', '', '', '1604450956', '1604450956', '1604450946'); INSERT INTO `cmf_pacontent` VALUES (22, 32, 1, 16, 1, 1, 0, '授权信息', '', '', '宁波威康新材料有限公司 沪ICP备8888XXXX号 ', '1604464743', '1604464743', '1604464710'); INSERT INTO `cmf_pacontent` VALUES (23, 18, 1, 17, 1, 1, 0, '联系方式', '', '', '', '1604480225', '1604480225', '1604480216'); INSERT INTO `cmf_pacontent` VALUES (24, 33, 1, 18, 1, 1, 0, '联系方式', '&lt;p&gt;版权所有 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;宁波威康新材料有限公司 沪ICP备8888XXXX号 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;公司地址:宁波市高新区通途路2577号(盛梅路口)&lt;/p&gt;&lt;p&gt;电话:0574-88487082 /88352228 &amp;nbsp; QQ 772535115 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;邮箱:jklfqy@126.com&lt;/p&gt;', '', '', '1604480279', '1604480279', '1604480265'); INSERT INTO `cmf_pacontent` VALUES (25, 22, 1, 19, 1, 1, 0, 'banner', '', '', '', '1604499807', '1604499807', '1604499775'); INSERT INTO `cmf_pacontent` VALUES (26, 34, 1, 20, 1, 1, 0, '图文简介', '&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;&lt;p&gt;上海某某机械有限公司座落于制造业名城广东东莞,专业生产冷室压铸机、热室压铸机及其周边设备,广泛应用于汽车、摩托车、电子、通讯、礼品、玩具等领域。&lt;/p&gt;&lt;p&gt;经过数年的发展客户遍布广东、湖南、湖北、河南、浙江、福建、江苏、重庆、四川等地,现有总部工厂及南海、石狮、宁波、温州、苏州、常州、武汉、重庆等办事处。&lt;/p&gt;&lt;p&gt;压铸机采用欧洲和行业设计标准进行自主研发、制造,同时采用国外先进加工中心进行精密加工,确保产品设计的先进性,工艺的**性及制造的精密性。机械已形成一套完善的产品研究、开发、生产制造、品质保证及服务体系,并通过了ISO9001--2000质量体系认证。&lt;/p&gt;', '', '', '1604499877', '1604500244', '1604499849'); INSERT INTO `cmf_pacontent` VALUES (27, 23, 1, 21, 1, 1, 0, 'banner', '', '', '', '1604504162', '1604504162', '1604504145'); INSERT INTO `cmf_pacontent` VALUES (28, 24, 1, 22, 1, 1, 0, 'banner', '', '', '', '1604513106', '1604513106', '1604513092'); INSERT INTO `cmf_pacontent` VALUES (29, 25, 1, 23, 1, 1, 0, 'banner', '', '', '', '1604515011', '1604515011', '1604514999'); INSERT INTO `cmf_pacontent` VALUES (30, 26, 1, 24, 1, 1, 0, 'banner', '', '', '', '1604515023', '1604515023', '1604515013'); INSERT INTO `cmf_pacontent` VALUES (31, 27, 1, 25, 1, 1, 0, 'banner', '', '', '', '1604515044', '1604515044', '1604515025'); INSERT INTO `cmf_pacontent` VALUES (32, 35, 1, 26, 1, 1, 0, '营销网络内容', '&lt;p&gt;&lt;img src=&quot;/upload/admin/20201103/cf5d60e4808cd149adb4ebbdc976b32f.jpg&quot; title=&quot;营销网络&quot; alt=&quot;营销网络&quot;/&gt;&lt;/p&gt;', '', '', '1604515395', '1604540869', '1604515376'); -- ---------------------------- -- Table structure for cmf_plugin -- ---------------------------- DROP TABLE IF EXISTS `cmf_plugin`; CREATE TABLE `cmf_plugin` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id', `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '插件类型;1:网站;8:微信', `has_admin` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有后台管理,0:没有;1:有', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态;1:开启;0:禁用', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '插件安装时间', `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '插件标识名,英文字母(惟一)', `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '插件名称', `demo_url` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '演示地址,带协议', `hooks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '实现的钩子;以“,”分隔', `author` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '插件作者', `author_url` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '作者网站链接', `version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '插件版本号', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '插件描述', `config` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '插件配置', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '插件表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_plugin -- ---------------------------- -- ---------------------------- -- Table structure for cmf_product -- ---------------------------- DROP TABLE IF EXISTS `cmf_product`; CREATE TABLE `cmf_product` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(3) NULL DEFAULT NULL COMMENT '分类id', `lang` int(1) NULL DEFAULT 1 COMMENT '语言', `status` tinyint(1) UNSIGNED ZEROFILL NULL DEFAULT 1 COMMENT '状态', `order_num` int(5) NULL DEFAULT NULL COMMENT '排序', `is_auto_seo` tinyint(4) NULL DEFAULT 1, `is_recom` tinyint(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '简介', `other_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他信息', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `show_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_product -- ---------------------------- INSERT INTO `cmf_product` VALUES (1, 12, 1, 1, 1, 1, 0, '切割1', '&lt;p&gt;LW221装载机是徐工集团新近向市场推出的一款高效、美观,安全、可靠的新一代机型。 ·整机设计更为合理,采用液力机械传动、四轮驱动,具备较大的驱动力和拨出起力;转弯半径小,轻便灵活,尤其适合狭窄场地作业。&lt;/p&gt;', '', '', '1604337433', '1604511457', '1604337360'); INSERT INTO `cmf_product` VALUES (2, 12, 1, 1, 2, 1, 0, '切割2', '&lt;p&gt;LW221装载机是徐工集团新近向市场推出的一款高效、美观,安全、可靠的新一代机型。 ·整机设计更为合理,采用液力机械传动、四轮驱动,具备较大的驱动力和拨出起力;转弯半径小,轻便灵活,尤其适合狭窄场地作业。&lt;/p&gt;', '', 'LW221装载机是徐工集团新近向市场推出的一款高效、美观,安全、可靠的新一代机型。 ·整机设计更为合理,采用液力机械传动、四轮驱动,具备较大的驱动力和拨出起力;转弯半径小,轻便灵活,尤其适合狭窄场地作业。', '1604337469', '1604509016', '1604337441'); INSERT INTO `cmf_product` VALUES (3, 13, 1, 1, 3, 1, 0, '切割2', '&lt;p&gt;2&lt;/p&gt;', '', '1', '1604337489', '1604538714', '1604337472'); -- ---------------------------- -- Table structure for cmf_recruit -- ---------------------------- DROP TABLE IF EXISTS `cmf_recruit`; CREATE TABLE `cmf_recruit` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(3) NULL DEFAULT NULL COMMENT '分类id', `lang` int(1) NULL DEFAULT 1 COMMENT '语言', `order_num` int(5) NULL DEFAULT NULL COMMENT '排序', `status` int(1) UNSIGNED ZEROFILL NULL DEFAULT 1 COMMENT '状态', `is_auto_seo` tinyint(4) NULL DEFAULT 1, `is_recom` tinyint(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '简介', `other_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他信息', `create_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `show_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布时间,可修改', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_recruit -- ---------------------------- -- ---------------------------- -- Table structure for cmf_recycle_bin -- ---------------------------- DROP TABLE IF EXISTS `cmf_recycle_bin`; CREATE TABLE `cmf_recycle_bin` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `object_id` int(11) NULL DEFAULT 0 COMMENT '删除内容 id', `create_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '创建时间', `table_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '删除内容所在表名', `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '删除内容名称', `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = ' 回收站' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_recycle_bin -- ---------------------------- INSERT INTO `cmf_recycle_bin` VALUES (1, 1, 1602552388, 'slide', 'yesia', 0); INSERT INTO `cmf_recycle_bin` VALUES (2, 6, 1603355825, 'slide', '行吧', 0); INSERT INTO `cmf_recycle_bin` VALUES (3, 1, 1603681804, 'slide', '新闻', 0); -- ---------------------------- -- Table structure for cmf_role -- ---------------------------- DROP TABLE IF EXISTS `cmf_role`; CREATE TABLE `cmf_role` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `parent_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父角色ID', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态;0:禁用;1:正常', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', `order_num` float NOT NULL DEFAULT 0 COMMENT '排序', `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色名称', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`) USING BTREE, INDEX `parent_id`(`parent_id`) USING BTREE, INDEX `status`(`status`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_role -- ---------------------------- INSERT INTO `cmf_role` VALUES (1, 0, 1, 1329633709, 1329633709, 0, '超级管理员', '拥有网站最高管理员权限!'); INSERT INTO `cmf_role` VALUES (2, 0, 1, 1329633709, 1329633709, 0, '普通管理员', '权限由最高管理员分配!'); -- ---------------------------- -- Table structure for cmf_role_user -- ---------------------------- DROP TABLE IF EXISTS `cmf_role_user`; CREATE TABLE `cmf_role_user` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `role_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色 id', `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id', PRIMARY KEY (`id`) USING BTREE, INDEX `role_id`(`role_id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户角色对应表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_role_user -- ---------------------------- INSERT INTO `cmf_role_user` VALUES (3, 2, 2); -- ---------------------------- -- Table structure for cmf_route -- ---------------------------- DROP TABLE IF EXISTS `cmf_route`; CREATE TABLE `cmf_route` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '路由id', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `status` tinyint(2) NOT NULL DEFAULT 1 COMMENT '状态;1:启用,0:不启用', `type` tinyint(4) NOT NULL DEFAULT 1 COMMENT 'URL规则类型;1:用户自定义;2:别名添加', `full_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '完整url', `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '实际显示的url', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'url路由表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_route -- ---------------------------- -- ---------------------------- -- Table structure for cmf_seo -- ---------------------------- DROP TABLE IF EXISTS `cmf_seo`; CREATE TABLE `cmf_seo` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `title` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '页面标题,用于seo。', `keywords` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '页面关键词,用于seo。', `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '页面描述,用于seo。', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', `create_time` int(10) UNSIGNED NOT NULL COMMENT '添加时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'seo表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_seo -- ---------------------------- INSERT INTO `cmf_seo` VALUES (1, '宁波威康新材料有限公司', '到后台分类管理-单页分类-首页中编辑 ', '不手动则会自动生成', 1604454660, 1604454660); -- ---------------------------- -- Table structure for cmf_seo_content -- ---------------------------- DROP TABLE IF EXISTS `cmf_seo_content`; CREATE TABLE `cmf_seo_content` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `seo_id` int(11) NULL DEFAULT NULL, `type` int(10) UNSIGNED NOT NULL COMMENT '外键,类型id', `content_id` int(10) UNSIGNED NOT NULL COMMENT '外键,具体内容id。如具体某一新闻,产品的id(或者某一分类的id)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'seo表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_seo_content -- ---------------------------- INSERT INTO `cmf_seo_content` VALUES (1, 1, 1, 1); -- ---------------------------- -- Table structure for cmf_slide -- ---------------------------- DROP TABLE IF EXISTS `cmf_slide`; CREATE TABLE `cmf_slide` ( `id` int(11) NOT NULL AUTO_INCREMENT, `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态,1:显示,0不显示', `delete_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除时间', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '幻灯片分类', `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分类备注', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '幻灯片表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_slide -- ---------------------------- -- ---------------------------- -- Table structure for cmf_slide_item -- ---------------------------- DROP TABLE IF EXISTS `cmf_slide_item`; CREATE TABLE `cmf_slide_item` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `slide_id` int(11) NOT NULL DEFAULT 0 COMMENT '幻灯片id', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态,1:显示;0:隐藏', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '幻灯片名称', `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '幻灯片图片', `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '幻灯片链接', `target` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '友情链接打开方式', `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '幻灯片描述', `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '幻灯片内容', `more` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '扩展信息', PRIMARY KEY (`id`) USING BTREE, INDEX `slide_id`(`slide_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '幻灯片子项表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_slide_item -- ---------------------------- -- ---------------------------- -- Table structure for cmf_tag -- ---------------------------- DROP TABLE IF EXISTS `cmf_tag`; CREATE TABLE `cmf_tag` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标签名', `update_time` int(11) NULL DEFAULT NULL, `create_time` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标签表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_tag -- ---------------------------- INSERT INTO `cmf_tag` VALUES (1, '标签1', 1603954903, 1603681781); INSERT INTO `cmf_tag` VALUES (2, '标签2', 1603954910, 1603954910); INSERT INTO `cmf_tag` VALUES (3, '标签3', 1603954919, 1603954919); -- ---------------------------- -- Table structure for cmf_tag_content -- ---------------------------- DROP TABLE IF EXISTS `cmf_tag_content`; CREATE TABLE `cmf_tag_content` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id', `tag_id` int(10) UNSIGNED NOT NULL COMMENT '外键,标签id', `type` int(10) UNSIGNED NOT NULL COMMENT '外键,类型id', `content_id` int(10) UNSIGNED NOT NULL COMMENT '外键,具体内容id。如具体某一新闻,产品的id(或者某一分类的id)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标签/内容关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_tag_content -- ---------------------------- INSERT INTO `cmf_tag_content` VALUES (5, 1, 6, 1); INSERT INTO `cmf_tag_content` VALUES (7, 2, 7, 2); INSERT INTO `cmf_tag_content` VALUES (9, 1, 6, 3); INSERT INTO `cmf_tag_content` VALUES (10, 1, 7, 1); INSERT INTO `cmf_tag_content` VALUES (11, 1, 6, 2); INSERT INTO `cmf_tag_content` VALUES (12, 1, 7, 3); -- ---------------------------- -- Table structure for cmf_theme -- ---------------------------- DROP TABLE IF EXISTS `cmf_theme`; CREATE TABLE `cmf_theme` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '安装时间', `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后升级时间', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '模板状态,1:正在使用;0:未使用', `is_compiled` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为已编译模板', `theme` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题目录名,用于主题的维一标识', `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题名称', `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题版本号', `demo_url` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '演示地址,带协议', `thumbnail` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '缩略图', `author` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题作者', `author_url` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '作者网站链接', `lang` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支持语言', `keywords` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题关键字', `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主题描述', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_theme -- ---------------------------- INSERT INTO `cmf_theme` VALUES (1, 0, 1603790164, 0, 0, 'default', 'default', '1.0.0', 'soupai', '', 'soupai', 'soupai', 'zh-cn', 'soupai', 'soupai'); -- ---------------------------- -- Table structure for cmf_theme_file -- ---------------------------- DROP TABLE IF EXISTS `cmf_theme_file`; CREATE TABLE `cmf_theme_file` ( `id` int(11) NOT NULL AUTO_INCREMENT, `is_public` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否公共的模板文件', `order_num` float NOT NULL DEFAULT 10000 COMMENT '排序', `theme` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板名称', `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板文件名', `action` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作', `file` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板文件,相对于模板根目录,如Portal/index.html', `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板文件描述', `more` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '模板更多配置,用户自己后台设置的', `config_more` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '模板更多配置,来源模板的配置文件', `draft_more` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '模板更多配置,用户临时保存的配置', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_theme_file -- ---------------------------- -- ---------------------------- -- Table structure for cmf_third_party_user -- ---------------------------- DROP TABLE IF EXISTS `cmf_third_party_user`; CREATE TABLE `cmf_third_party_user` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '本站用户id', `last_login_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后登录时间', `expire_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'access_token过期时间', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '绑定时间', `login_times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数', `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态;1:正常;0:禁用', `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称', `third_party` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方唯一码', `app_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方应用 id', `last_login_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最后登录ip', `access_token` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方授权码', `openid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方用户id', `union_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方用户多个产品中的惟一 id,(如:微信平台)', `more` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '扩展信息', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '第三方用户表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_third_party_user -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user -- ---------------------------- DROP TABLE IF EXISTS `cmf_user`; CREATE TABLE `cmf_user` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '用户类型;1:admin;2:会员', `sex` tinyint(2) NOT NULL DEFAULT 0 COMMENT '性别;0:保密,1:男,2:女', `birthday` int(11) NOT NULL DEFAULT 0 COMMENT '生日', `last_login_time` int(11) NOT NULL DEFAULT 0 COMMENT '最后登录时间', `score` int(11) NOT NULL DEFAULT 0 COMMENT '用户积分', `coin` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '金币', `balance` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '余额', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '注册时间', `user_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '用户状态;0:禁用,1:正常,2:未验证', `user_login` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名', `user_pass` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录密码;cmf_password加密', `user_nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户昵称', `user_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户登录邮箱', `user_url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户个人网址', `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像', `signature` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '个性签名', `last_login_ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最后登录ip', `user_activation_key` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '激活码', `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '中国手机不带国家代码,国际手机号格式为:国家代码-手机号', `more` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '扩展属性', PRIMARY KEY (`id`) USING BTREE, INDEX `user_login`(`user_login`) USING BTREE, INDEX `user_nickname`(`user_nickname`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user -- ---------------------------- INSERT INTO `cmf_user` VALUES (1, 1, 0, 0, 1604546179, 0, 0, 0.00, 1594082678, 1, 'admin', '###7069a9ab4b48b41bdb74c8db727782b9', 'admin', '516552667@qq.com', '', '', '', '127.0.0.1', '', '', NULL); INSERT INTO `cmf_user` VALUES (2, 1, 0, 0, 1603436834, 0, 0, 0.00, 0, 1, 'spadmin', '###d29ae50ede24743872e5b4d717580e78', '', '111@qq.com', '', '', '', '::1', '', '', NULL); -- ---------------------------- -- Table structure for cmf_user_action -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_action`; CREATE TABLE `cmf_user_action` ( `id` int(11) NOT NULL AUTO_INCREMENT, `score` int(11) NOT NULL DEFAULT 0 COMMENT '更改积分,可以为负', `coin` int(11) NOT NULL DEFAULT 0 COMMENT '更改金币,可以为负', `reward_number` int(11) NOT NULL DEFAULT 0 COMMENT '奖励次数', `cycle_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '周期类型;0:不限;1:按天;2:按小时;3:永久', `cycle_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '周期时间值', `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户操作名称', `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户操作名称', `app` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作所在应用名或插件名等', `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行操作的url', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户操作表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_action -- ---------------------------- INSERT INTO `cmf_user_action` VALUES (1, 1, 1, 1, 2, 1, '用户登录', 'login', 'user', ''); -- ---------------------------- -- Table structure for cmf_user_action_log -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_action_log`; CREATE TABLE `cmf_user_action_log` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户id', `count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问次数', `last_visit_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后访问时间', `object` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '访问对象的id,格式:不带前缀的表名+id;如posts1表示xx_posts表里id为1的记录', `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作名称;格式:应用名+控制器+操作名,也可自己定义格式只要不发生冲突且惟一;', `ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户ip', PRIMARY KEY (`id`) USING BTREE, INDEX `user_object_action`(`user_id`, `object`, `action`) USING BTREE, INDEX `user_object_action_ip`(`user_id`, `object`, `action`, `ip`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '访问记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_action_log -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_balance_log -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_balance_log`; CREATE TABLE `cmf_user_balance_log` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户 id', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', `change` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '更改余额', `balance` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '更改后余额', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '描述', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户余额变更日志表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_balance_log -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_favorite -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_favorite`; CREATE TABLE `cmf_user_favorite` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户 id', `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收藏内容的标题', `thumbnail` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '缩略图', `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收藏内容的原文地址,JSON格式', `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '收藏内容的描述', `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收藏实体以前所在表,不带前缀', `object_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '收藏内容原来的主键id', `create_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '收藏时间', PRIMARY KEY (`id`) USING BTREE, INDEX `uid`(`user_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户收藏表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_favorite -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_like -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_like`; CREATE TABLE `cmf_user_like` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户 id', `object_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '内容原来的主键id', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容以前所在表,不带前缀', `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容的原文地址,不带域名', `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容的标题', `thumbnail` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '缩略图', `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容的描述', PRIMARY KEY (`id`) USING BTREE, INDEX `uid`(`user_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户点赞表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_like -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_login_attempt -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_login_attempt`; CREATE TABLE `cmf_user_login_attempt` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `login_attempts` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '尝试次数', `attempt_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '尝试登录时间', `locked_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '锁定时间', `ip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户 ip', `account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户账号,手机号,邮箱或用户名', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户登录尝试表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of cmf_user_login_attempt -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_nav -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_nav`; CREATE TABLE `cmf_user_nav` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NULL DEFAULT NULL, `status` int(1) NULL DEFAULT NULL, `order_num` int(11) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `english_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_nav -- ---------------------------- INSERT INTO `cmf_user_nav` VALUES (1, 0, NULL, 1, '首页', '', 'index/index/index'); INSERT INTO `cmf_user_nav` VALUES (2, 0, NULL, 2, '关于我们', '', 'index/about/index'); INSERT INTO `cmf_user_nav` VALUES (3, 0, NULL, 3, '产品展示', '', '/product.html'); INSERT INTO `cmf_user_nav` VALUES (4, 0, NULL, 4, '新闻动态', '', '/news.html'); INSERT INTO `cmf_user_nav` VALUES (5, 0, NULL, 5, '营销网络', '', '/net.html'); INSERT INTO `cmf_user_nav` VALUES (6, 0, NULL, 6, '联系方式', '', '/contact.html'); INSERT INTO `cmf_user_nav` VALUES (7, 0, NULL, 7, '留言反馈', '', '/message.html'); INSERT INTO `cmf_user_nav` VALUES (9, 3, NULL, 1, '工程机械', '', '/pro_category/12.html'); INSERT INTO `cmf_user_nav` VALUES (10, 3, NULL, 2, '印刷机械', '', '/pro_category/13.html'); INSERT INTO `cmf_user_nav` VALUES (11, 4, NULL, 0, '公司新闻', '', ''); INSERT INTO `cmf_user_nav` VALUES (12, 4, NULL, 0, '行业动态', '', ''); -- ---------------------------- -- Table structure for cmf_user_score_log -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_score_log`; CREATE TABLE `cmf_user_score_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户 id', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户操作名称', `score` int(11) NOT NULL DEFAULT 0 COMMENT '更改积分,可以为负', `coin` int(11) NOT NULL DEFAULT 0 COMMENT '更改金币,可以为负', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户操作积分等奖励日志表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_score_log -- ---------------------------- -- ---------------------------- -- Table structure for cmf_user_token -- ---------------------------- DROP TABLE IF EXISTS `cmf_user_token`; CREATE TABLE `cmf_user_token` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id', `expire_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT ' 过期时间', `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'token', `device_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备类型;mobile,android,iphone,ipad,web,pc,mac,wxapp', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户客户端登录 token 表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_user_token -- ---------------------------- INSERT INTO `cmf_user_token` VALUES (1, 1, 1609634723, 1594082723, 'cb06f29f0f2aa185ec10078aac65a28843fdfafecf41bee0d3beda3e128bdb0a', 'web'); INSERT INTO `cmf_user_token` VALUES (2, 2, 1618987101, 1603435101, '133f97f70d8f78a4fde557ffba5c7402f652db89e7066bc705ce21d5aae972cb', 'web'); -- ---------------------------- -- Table structure for cmf_verification_code -- ---------------------------- DROP TABLE IF EXISTS `cmf_verification_code`; CREATE TABLE `cmf_verification_code` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '表id', `count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '当天已经发送成功的次数', `send_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后发送成功时间', `expire_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '验证码过期时间', `code` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '最后发送成功的验证码', `account` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号或者邮箱', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '手机邮箱数字验证码表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_verification_code -- ---------------------------- -- ---------------------------- -- Table structure for cmf_video -- ---------------------------- DROP TABLE IF EXISTS `cmf_video`; CREATE TABLE `cmf_video` ( `id` int(12) NOT NULL AUTO_INCREMENT, `cid` int(12) NULL DEFAULT NULL, `lang` int(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `order_num` int(12) NULL DEFAULT NULL, `status` int(1) NULL DEFAULT NULL, `create_time` int(12) NULL DEFAULT NULL, `show_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布时间,可修改', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of cmf_video -- ---------------------------- SET FOREIGN_KEY_CHECKS = 1;
79.341509
2,754
0.673301
74583b3ad2c9a38e365bc6f6a64de102f2f24939
646
c
C
src/commands.c
ikb4l/dix
f56ad5573e181bb1897f6e70302827c1330240b4
[ "MIT" ]
1
2021-07-12T07:12:40.000Z
2021-07-12T07:12:40.000Z
src/commands.c
ikb4l/dix
f56ad5573e181bb1897f6e70302827c1330240b4
[ "MIT" ]
null
null
null
src/commands.c
ikb4l/dix
f56ad5573e181bb1897f6e70302827c1330240b4
[ "MIT" ]
null
null
null
#include <dirent.h> #include <stdio.h> #include <string.h> #include <commands.h> int dir_cont(char* d) { return strcmp(d, ".") == 0 || strcmp(d, "..") == 0; } void list_dir(struct args_t p) { DIR* d = opendir(p.dir); struct dirent* dir; if(d) { while ((dir = readdir(d)) != NULL) { if(!dir_cont(dir->d_name)) { if(dir->d_type == DT_DIR) { print_dir(dir); } else { print_file(dir); } } } closedir(d); } printf("\n"); } void print_dir(struct dirent* dir) { printf("%s/ ", dir->d_name); } void print_file(struct dirent *dir) { printf("%s ", dir->d_name); }
17.459459
53
0.53096
f035d65dd23cce88533c77e43cfdaf49e3f5a500
1,665
py
Python
reobject/models/model.py
agusmakmun/reobject
a7689bbb37f021c6c8ea72d6984513adec0d8a17
[ "Apache-2.0" ]
92
2017-02-08T21:51:03.000Z
2021-05-27T22:58:07.000Z
reobject/models/model.py
agusmakmun/reobject
a7689bbb37f021c6c8ea72d6984513adec0d8a17
[ "Apache-2.0" ]
15
2017-01-27T22:54:42.000Z
2021-05-27T01:31:58.000Z
reobject/models/model.py
agusmakmun/reobject
a7689bbb37f021c6c8ea72d6984513adec0d8a17
[ "Apache-2.0" ]
7
2017-02-08T22:00:41.000Z
2021-05-26T00:26:44.000Z
import attr from reobject.models.manager import ManagerDescriptor, RelatedManagerDescriptor from reobject.models.store import Store, ModelStoreMapping class ModelBase(type): """ Metaclass for all models, used to attach the objects class attribute to the model instance at runtime. """ def __new__(cls, name, bases, attrs): attrs['objects'] = ManagerDescriptor() mod = attr.s( super(ModelBase, cls).__new__(cls, name, bases, attrs) ) if 'Model' in [base.__name__ for base in bases]: ModelStoreMapping[mod.__name__] = Store() return mod class Model(object, metaclass=ModelBase): def __attrs_post_init__(self): pass def __new__(cls, *args, **kwargs): instance = super(Model, cls).__new__(cls) for field in attr.fields(cls): if field.metadata.get('related'): target = field.metadata['related']['target'] setattr( target, cls.__name__.lower() + '_set', RelatedManagerDescriptor(model=cls) ) return cls.objects.add(instance) @property def id(self) -> int: """ Returns a unique integer identifier for the object. """ return id(self) @property def pk(self) -> int: """ Returns a unique integer identifier for the object. Alias of the id property. """ return self.id def delete(self) -> None: type(self).objects._delete(self) @property def _attrs(self): return set(self.__dict__.keys()) | {'id'}
24.850746
79
0.581381
c49aed80b098042203e0b8439f8ff0b132cc1ae0
1,418
h
C
vp/src/platform/hifive/prci.h
agra-uni-bremen/fdl21-stackuse-vp
9c8be7a3534cdd8ed8b8fbce7be740fc16807876
[ "MIT" ]
72
2018-06-19T14:22:30.000Z
2022-03-23T06:38:52.000Z
vp/src/platform/hifive/prci.h
agra-uni-bremen/fdl21-stackuse-vp
9c8be7a3534cdd8ed8b8fbce7be740fc16807876
[ "MIT" ]
16
2020-06-19T12:00:13.000Z
2022-03-24T16:27:15.000Z
vp/src/platform/hifive/prci.h
agra-uni-bremen/fdl21-stackuse-vp
9c8be7a3534cdd8ed8b8fbce7be740fc16807876
[ "MIT" ]
36
2018-08-14T12:18:36.000Z
2022-03-26T17:27:00.000Z
#ifndef RISCV_VP_PRCI_H #define RISCV_VP_PRCI_H #include <systemc> #include <tlm_utils/simple_target_socket.h> #include "core/common/irq_if.h" #include "util/tlm_map.h" struct PRCI : public sc_core::sc_module { tlm_utils::simple_target_socket<PRCI> tsock; // memory mapped configuration registers uint32_t hfrosccfg = 0; uint32_t hfxosccfg = 0; uint32_t pllcfg = 0; uint32_t plloutdiv = 0; enum { HFROSCCFG_REG_ADDR = 0x0, HFXOSCCFG_REG_ADDR = 0x4, PLLCFG_REG_ADDR = 0x8, PLLOUTDIV_REG_ADDR = 0xC, }; vp::map::LocalRouter router = {"PRCI"}; PRCI(sc_core::sc_module_name) { tsock.register_b_transport(this, &PRCI::transport); router .add_register_bank({ {HFROSCCFG_REG_ADDR, &hfrosccfg}, {HFXOSCCFG_REG_ADDR, &hfxosccfg}, {PLLCFG_REG_ADDR, &pllcfg}, {PLLOUTDIV_REG_ADDR, &plloutdiv}, }) .register_handler(this, &PRCI::register_access_callback); } void register_access_callback(const vp::map::register_access_t &r) { /* Pretend that the crystal oscillator output is always ready. */ if (r.read && r.vptr == &hfxosccfg) hfxosccfg = 1 << 31; r.fn(); if ((r.vptr == &hfrosccfg) && r.nv) hfrosccfg |= 1 << 31; if ((r.vptr == &pllcfg) && r.nv) pllcfg |= 1 << 31; } void transport(tlm::tlm_generic_payload &trans, sc_core::sc_time &delay) { router.transport(trans, delay); } }; #endif // RISCV_VP_PRCI_H
22.870968
75
0.67842
eb793176c1fa00b24ea91f9b670e9bb2664f80cc
921
sql
SQL
db/seeds.sql
LiliCecilia23/inBloom
958984e1fdeaaaf310332e43ccec481b945245ec
[ "MIT" ]
1
2020-12-09T01:53:43.000Z
2020-12-09T01:53:43.000Z
db/seeds.sql
LiliCecilia23/inBloom
958984e1fdeaaaf310332e43ccec481b945245ec
[ "MIT" ]
4
2020-12-15T22:34:53.000Z
2021-01-13T02:31:26.000Z
db/seeds.sql
LiliCecilia23/inBloom
958984e1fdeaaaf310332e43ccec481b945245ec
[ "MIT" ]
2
2021-01-15T01:33:39.000Z
2021-01-19T19:13:38.000Z
INSERT INTO Users (id, googleid, email, firstName, lastName) VALUES ('1', 'seed1', 'joshua.wilson6289@gmail.com', 'Josh', 'Wilson'); INSERT INTO Users (id, googleid, email, firstName, lastName) VALUES ('2', 'seed2', 'ashlinhanson@gmail.com', 'Ashli', 'Hanson'); INSERT INTO Users (id, googleid, email, firstName, lastName) VALUES ('3', 'seed3', 'nathanwilkins01@gmail.com', 'Nay', 'Wilkins'); INSERT INTO Users (id, googleid, email, firstName, lastName) VALUES ('4', 'seed4', 'liliclift@gmail.com', 'Lili', 'Clift'); INSERT INTO Plants (id, common_name, image_url, UserId) VALUES ('1','Agave', 'agave.com', '1'); INSERT INTO Plants (id, common_name, image_url, UserId) VALUES ('2','Brazil Pothos', 'brazilpothos.com', '2'); INSERT INTO Plants (id, common_name, image_url, UserId) VALUES ('3','Pothos', 'pothos.com', '3'); INSERT INTO Plants (id, common_name, image_url, UserId) VALUES ('4','Basil', 'basil.com', '4');
46.05
71
0.690554
f04907145e0f5329d91ce6e7245421c294f51891
16,781
py
Python
src/genie/libs/parser/linux/route.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/linux/route.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/linux/route.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
"""route.py Linux parsers for the following commands: * route """ # python import re # metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Schema, Any, Optional from netaddr import IPAddress, IPNetwork # ======================================================= # Schema for 'route' # ======================================================= class RouteSchema(MetaParser): """Schema for route""" # Destination Gateway Genmask Flags Metric Ref Use Iface # 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlo1 schema = { 'routes': { Any(): { # 'destination' 'mask': { Any(): { 'nexthop': { Any(): { # index: 1, 2, 3, etc 'interface': str, Optional('flags'): str, Optional('gateway'): str, Optional('metric'): int, Optional('ref'): int, Optional('use'): int, Optional('scope'): str, Optional('proto'): str, Optional('src'): str, Optional('broadcast'): bool, Optional('table'): str, Optional('local'): bool } } } } } } } # ======================================================= # Parser for 'route' # ======================================================= class Route(RouteSchema): """Parser for * route * route -4 -n * route -4n * route -n4 * route -n -4 """ cli_command = ['route', 'route {flag}'] def cli(self, flag=None, output=None): if output is None: cmd = self.cli_command[0] if flag in ['-4 -n', '-4n', '-n4']: command = self.cli_command[1].replace('{flag}', flag) out = self.device.execute(cmd) else: out = output # Destination Gateway Genmask Flags Metric Ref Use Iface # 192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1 p1 = re.compile(r'(?P<destination>[a-z0-9\.\:]+)' ' +(?P<gateway>[a-z0-9\.\:_]+)' ' +(?P<mask>[a-z0-9\.\:]+)' ' +(?P<flags>[a-zA-Z]+)' ' +(?P<metric>(\d+))' ' +(?P<ref>(\d+))' ' +(?P<use>(\d+))' ' +(?P<interface>\S+)' ) # Initializes the Python dictionary variable parsed_dict = {} # Defines the "for" loop, to pattern match each line of output for line in out.splitlines(): line = line.strip() # 192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlo1 m = p1.match(line) if m: if 'routes' not in parsed_dict: parsed_dict.setdefault('routes', {}) group = m.groupdict() destination = group['destination'] mask = group['mask'] index_dict = {} for str_k in ['interface', 'flags', 'gateway']: index_dict[str_k] = group[str_k] for int_k in ['metric', 'ref', 'use']: index_dict[int_k] = int(group[int_k]) if destination in parsed_dict['routes']: if mask in parsed_dict['routes'][destination]['mask']: parsed_dict['routes'][destination]['mask'][mask].\ setdefault('nexthop', {index+1: index_dict}) else: index = 1 parsed_dict['routes'][destination]['mask'].\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) else: index = 1 parsed_dict['routes'].setdefault(destination, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) continue return parsed_dict # ======================================================= # Parser for 'netstat -rn' # ======================================================= class ShowNetworkStatusRoute(Route, RouteSchema): """Parser for * netstat -rn """ cli_command = ['netstat -rn'] def cli(self, output=None): if output is None: cmd = self.cli_command[0] out = self.device.execute(cmd) else: out = output return super().cli(output=out) # ===================================================== # Parser for ip route show table all # ===================================================== class IpRouteShowTableAll(RouteSchema): """ Parser for * ip route show table all """ cli_command = ['ip route show table all'] def cli(self, output=None): if output is None: cmd = self.cli_command[0] out = self.device.execute(cmd) else: out = output # default via 192.168.1.1 dev enp7s0 proto dhcp metric 100 p1 = re.compile(r'default via (?P<gateway>[a-z0-9\.\:]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' proto (?P<proto>[a-z]+)' ' metric (?P<metric>[\d]+)' ) # 169.254.0.0/16 dev enp7s0 scope link metric 1000 p2 = re.compile(r'(?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' scope (?P<scope>\w+)' ' metric (?P<metric>[\d]+)' ) # 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 p3 = re.compile(r'(?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' proto (?P<proto>\w+)' ' scope (?P<scope>\w+)' ' src (?P<src>[a-z0-9\.\:\/]+)' ) # 172.18.0.0/16 dev br-d19b23fac393 proto kernel scope link src 172.18.0.1 linkdown p4 = re.compile(r'(?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' proto (?P<proto>\w+)' ' scope (?P<scope>\w+)' ' src (?P<src>[a-z0-9\.\:\/]+)' ' linkdown ' ) # 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.212 metric 100 p5 = re.compile(r'(?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' proto (?P<proto>\w+)' ' scope (?P<scope>\w+)' ' src (?P<src>[a-z0-9\.\:\/]+)' ' metric (?P<metric>[\d]+)' ) # broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 p6 = re.compile(r'broadcast (?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' table (?P<table>\w+)' ' proto (?P<proto>\w+)' ' scope (?P<scope>\w+)' ' src (?P<src>[a-z0-9\.\:\/]+)' ) # local 10.233.44.70 dev kube-ipvs0 table local proto kernel scope host src 10.233.44.70 p7 = re.compile(r'local (?P<destination>[a-z0-9\.\:\/]+)' ' dev (?P<device>[a-z0-9\.\-]+)' ' table (?P<table>\w+)' ' proto (?P<proto>\w+)' ' scope (?P<scope>\w+)' ' src (?P<src>[a-z0-9\.\:\/]+)' ) # Initializes the Python dictionary variable parsed_dict = {} # Defines the "for" loop, to pattern match each line of output for line in out.splitlines(): line = line.strip() # default via 192.168.1.1 dev enp7s0 proto dhcp metric 100 m = p1.match(line) if m: if 'routes' not in parsed_dict: parsed_dict.setdefault('routes', {}) group = m.groupdict() gateway = group['gateway'] interface = group['device'] metric = int(group['metric']) if gateway: parsed_dict['routes'] = { '0.0.0.0': { 'mask': { '0.0.0.0': { 'nexthop': { 1:{ 'gateway': gateway, 'interface': interface, 'metric': metric } } } } } } # 169.254.0.0/16 dev enp7s0 scope link metric 1000 m = p2.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] metric = int(group['metric']) scope = group['scope'] index_dict = {'interface' : interface, 'scope' : scope, 'metric': metric } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) # 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 m = p3.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] scope = group['scope'] proto = group['proto'] src = group['src'] index_dict = {'interface' : interface, 'scope' : scope, 'proto' : proto , 'src' : src } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) # 172.18.0.0/16 dev br-d19b23fac393 proto kernel scope link src 172.18.0.1 linkdown m = p4.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] scope = group['scope'] proto = group['proto'] src = group['src'] index_dict = {'interface' : interface, 'scope' : scope, 'proto' : proto , 'src' : src } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) # 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.212 metric 100 m = p5.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] scope = group['scope'] proto = group['proto'] metric = group['metric'] src = group['src'] index_dict = {'interface' : interface, 'scope' : scope, 'proto' : proto , 'src' : src, 'metric': metric } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) # broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 m = p6.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] scope = group['scope'] proto = group['proto'] src = group['src'] table = group['table'] index_dict = {'interface' : interface, 'scope' : scope, 'proto' : proto , 'src' : src, 'broadcast': True, 'table': table } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) # local 10.233.44.70 dev kube-ipvs0 table local proto kernel scope host src 10.233.44.70 m = p7.match(line) if m: group = m.groupdict() destination = IPNetwork(group['destination']) mask = str(destination.netmask) destination_addr = str(destination.ip) interface = group['device'] scope = group['scope'] proto = group['proto'] src = group['src'] table = group['table'] index_dict = {'interface' : interface, 'scope' : scope, 'proto' : proto , 'src' : src, 'local': True, 'table': table } index = 1 parsed_dict['routes'].setdefault(destination_addr, {}).\ setdefault('mask', {}).\ setdefault(mask, {}).\ setdefault('nexthop', {index: index_dict}) return parsed_dict
38.052154
100
0.362255
11ff31b0dc79ca8f599ed1c6b75ff99acff96aae
5,237
rs
Rust
backend/services/historical/src/service.rs
hiroaki-yamamoto/midas
7fa9c1d6605bead7e283b339639a89bb09ed6b1c
[ "MIT" ]
1
2022-01-04T00:32:37.000Z
2022-01-04T00:32:37.000Z
backend/services/historical/src/service.rs
hiroaki-yamamoto/midas
7fa9c1d6605bead7e283b339639a89bb09ed6b1c
[ "MIT" ]
17
2020-05-30T01:40:15.000Z
2021-12-24T06:46:04.000Z
backend/services/historical/src/service.rs
hiroaki-yamamoto/midas
7fa9c1d6605bead7e283b339639a89bb09ed6b1c
[ "MIT" ]
null
null
null
use ::std::fmt::Debug; use ::futures::{SinkExt, StreamExt}; use ::http::StatusCode; use ::nats::Connection as NatsCon; use ::serde_json::{from_slice as parse_json, to_string as jsonify}; use ::subscribe::PubSub; use ::tokio::select; use ::warp::filters::BoxedFilter; use ::warp::reject::custom as reject_custom; use ::warp::ws::{Message, WebSocket, Ws}; use ::warp::{Filter, Reply}; use ::entities::HistoryFetchRequest as HistFetchReq; use ::history::kvs::{redis, CurrentSyncProgressStore, NumObjectsToFetchStore}; use ::history::pubsub::{FetchStatusEventPubSub, RawHistChartPubSub}; use ::history::traits::Store; use ::rpc::entities::Status; use ::rpc::historical::{ HistoryFetchRequest as RPCHistFetchReq, Progress, StatusCheckRequest, }; use ::types::GenericResult; #[derive(Debug, Clone)] pub struct Service { redis_cli: redis::Client, status: FetchStatusEventPubSub, splitter: RawHistChartPubSub, } impl Service { pub async fn new( nats: &NatsCon, redis_cli: &redis::Client, ) -> GenericResult<Self> { let ret = Self { status: FetchStatusEventPubSub::new(nats.clone()), splitter: RawHistChartPubSub::new(nats.clone()), redis_cli: redis_cli.clone(), }; return Ok(ret); } pub fn route(&self) -> BoxedFilter<(impl Reply,)> { return self.websocket(); } fn websocket(&self) -> BoxedFilter<(impl Reply,)> { let me = self.clone(); return ::warp::path("subscribe") .map(move || { return me.clone(); }) .and_then(|me: Self| async move { let size = me.redis_cli.clone() .get_connection() .map(|con| NumObjectsToFetchStore::new(con)) .map_err(|err| { Status::new(StatusCode::SERVICE_UNAVAILABLE, format!("(Size) {}", err)) }); let size = match size { Err(e) => return Err(reject_custom(e)), Ok(v) => v }; let cur = me.redis_cli .get_connection() .map(|con| CurrentSyncProgressStore::new(con)) .map_err(|err| { Status::new(StatusCode::SERVICE_UNAVAILABLE, format!("(Current) {}", err)) }); let cur = match cur { Err(e) => return Err(reject_custom(e)), Ok(v) => v }; return Ok((me, size, cur)) }) .untuple_one() .and(::warp::ws()) .map(move | me: Self, mut size: NumObjectsToFetchStore<redis::Connection>, mut cur: CurrentSyncProgressStore<redis::Connection>, ws: Ws | { return ws.on_upgrade(|mut sock: WebSocket| async move { let subsc = me.status.subscribe(); match subsc { Err(e) => { let msg = format!( "Got an error while trying to subscribe the channel: {}", e ); let _ = sock.send(Message::close_with(1011 as u16, msg)).await; let _ = sock.flush().await; } Ok(mut resp) => loop { select! { Some((item, _)) = resp.next() => { let size = size.get( item.exchange.as_string(), &item.symbol ).unwrap_or(0); let cur = cur.get( item.exchange.as_string(), &item.symbol ).unwrap_or(0); let prog = Progress { exchange: item.exchange as i32, symbol: item.symbol.clone(), size, cur }; let payload = jsonify(&prog).unwrap_or(String::from( "Failed to serialize the progress data.", )); let payload = Message::text(payload); let _ = sock.send(payload).await; let _ = sock.flush().await; }, Some(Ok(msg)) = sock.next() => { if msg.is_close() { break; } if let Ok(req) = parse_json::<RPCHistFetchReq>(msg.as_bytes()) { let req: HistFetchReq = req.into(); let _ = me.splitter.publish(&req); } if let Ok(req) = parse_json::<StatusCheckRequest>(msg.as_bytes()) { let exchange = req.exchange().as_string(); let size = size.get(&exchange, &req.symbol).unwrap_or(0); let cur = cur.get(&exchange, &req.symbol).unwrap_or(0); let prog = Progress { exchange: req.exchange, symbol: req.symbol, size, cur }; let payload = jsonify(&prog).unwrap_or(String::from( "Failed to serialize the progress data.", )); let payload = Message::text(payload); let _ = sock.send(payload).await; let _ = sock.flush().await; } }, } }, }; let _ = sock.close().await; }); }) .boxed(); } }
34.006494
86
0.497995
400606bf572e88a51c157c98f383f8babe884708
491
py
Python
add/add.py
lcrilly/unit-calculator
a24e503a94a9329be8637948389df24b2d18f45f
[ "Apache-2.0" ]
1
2022-02-10T14:00:17.000Z
2022-02-10T14:00:17.000Z
add/add.py
lcrilly/unit-calculator
a24e503a94a9329be8637948389df24b2d18f45f
[ "Apache-2.0" ]
null
null
null
add/add.py
lcrilly/unit-calculator
a24e503a94a9329be8637948389df24b2d18f45f
[ "Apache-2.0" ]
null
null
null
import json def application(environ, start_response): try: request_body_size = int(environ.get('CONTENT_LENGTH', 0)) except (ValueError): request_body_size = 0 request_body = environ['wsgi.input'].read(request_body_size) reqj = json.loads(request_body) res = { "result": 0 } for value in reqj['operands']: res['result'] += value start_response('200 OK', [('Content-Type', 'application/json')]) yield str.encode(json.dumps(res))
28.882353
68
0.647658
17b822fb4883b0682f58002130f1b311472f740c
68
sql
SQL
src/test/resources/sql/select/203c0f1b.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
66
2018-06-15T11:34:03.000Z
2022-03-16T09:24:49.000Z
src/test/resources/sql/select/203c0f1b.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
13
2019-03-19T11:56:28.000Z
2020-08-05T04:20:50.000Z
src/test/resources/sql/select/203c0f1b.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
28
2019-01-05T19:59:02.000Z
2022-03-24T11:55:50.000Z
-- file:money.sql ln:118 expect:true SELECT 1234567890::int4::money
22.666667
36
0.764706
1e18cb0cd51f7d78198c627e124922a0197f2dd2
404
css
CSS
css/funnels.css
PostHog/posthog.github.io
1903bad9da478263e6ce56b3278ce5c7d0a859a6
[ "MIT" ]
null
null
null
css/funnels.css
PostHog/posthog.github.io
1903bad9da478263e6ce56b3278ce5c7d0a859a6
[ "MIT" ]
1
2021-04-17T18:52:26.000Z
2021-04-17T18:52:27.000Z
css/funnels.css
AlexRogalskiy/posthog-wiki
b4fc6e8d8e92bf1b33ff535b35e9929c5060308b
[ "MIT" ]
1
2022-03-19T18:43:09.000Z
2022-03-19T18:43:09.000Z
.input-box { max-width: 300px !important; display: inline-block; } #begin-btn { margin-left: 10px !important; } .price-header { color: rgb(60, 228, 19); } .dashboard-iframe { border: none; width:100%; height: 500px; clip: rect(110px,110px,100px,250px); } .iframe-container { background-color: #5a49bb; } .centered { display: block; text-align: center; }
13.931034
40
0.613861
589b3904046fba7afa114b115b4ebecc52a20727
6,013
swift
Swift
Source/JsonWebToken/JWT.swift
VirgilSecurity/VirgilKeysiOS
fccbe8de3af24e01ef03fc8616049a1995277f59
[ "BSD-3-Clause" ]
21
2016-08-07T18:49:57.000Z
2021-03-10T19:25:30.000Z
Source/JsonWebToken/JWT.swift
VirgilSecurity/VirgilKeysiOS
fccbe8de3af24e01ef03fc8616049a1995277f59
[ "BSD-3-Clause" ]
11
2016-12-05T11:16:28.000Z
2022-03-31T07:03:15.000Z
Source/JsonWebToken/JWT.swift
VirgilSecurity/VirgilKeysiOS
fccbe8de3af24e01ef03fc8616049a1995277f59
[ "BSD-3-Clause" ]
7
2017-06-08T00:11:17.000Z
2022-01-24T15:55:25.000Z
// // Copyright (C) 2015-2021 Virgil Security Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // (1) Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // (2) Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in // the documentation and/or other materials provided with the // distribution. // // (3) Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> // import Foundation /// Declares error types and codes /// /// - incorrectNumberOfJwtComponents: Number of JWT components doesn't equal 3 /// - utf8StrIsInvalid: Invalid UTF8 string to sign @objc(VSSJwtError) public enum JwtError: Int, LocalizedError { case incorrectNumberOfJwtComponents = 1 case utf8StrIsInvalid = 2 /// Human-readable localized description public var errorDescription: String? { switch self { case .incorrectNumberOfJwtComponents: return "Number of JWT components doesn't equal 3" case .utf8StrIsInvalid: return "Invalid UTF8 string to sign" } } } /// Class implementing `AccessToken` in terms of Virgil JWT @objc(VSSJwt) public final class Jwt: NSObject, AccessToken { /// Represents JWT Header content @objc public let headerContent: JwtHeaderContent /// Represents JWT Body content @objc public let bodyContent: JwtBodyContent /// Represents JWT Signature content @objc public let signatureContent: JwtSignatureContent /// Initializes `Jwt` with provided header, body and signature content /// /// - Parameters: /// - headerContent: header of `Jwt` /// - bodyContent: body of `Jwt` /// - signatureContent: signature of `Jwt` @objc public init(headerContent: JwtHeaderContent, bodyContent: JwtBodyContent, signatureContent: JwtSignatureContent) throws { self.headerContent = headerContent self.bodyContent = bodyContent self.signatureContent = signatureContent super.init() } /// Initializes `Jwt` from its string representation /// /// - Parameter stringRepresentation: must be equal to /// base64UrlEncode(JWT Header) + "." + base64UrlEncode(JWT Body) /// + "." + base64UrlEncode(Jwt Signature) @objc public init(stringRepresentation: String) throws { let array = stringRepresentation.components(separatedBy: ".") guard array.count == 3 else { throw JwtError.incorrectNumberOfJwtComponents } let headerBase64Url = array[0] let bodyBase64Url = array[1] let signatureBase64Url = array[2] self.headerContent = try JwtHeaderContent(base64UrlEncoded: headerBase64Url) self.bodyContent = try JwtBodyContent(base64UrlEncoded: bodyBase64Url) self.signatureContent = try JwtSignatureContent(base64UrlEncoded: signatureBase64Url) super.init() } /// Returns JWT data that should be signed /// /// - Returns: JWT data that should be signed /// - Throws: JwtError.utf8StrIsInvalid if utf8 string is invalid @objc public func dataToSign() throws -> Data { return try Jwt.dataToSign(headerContent: self.headerContent, bodyContent: self.bodyContent) } /// Returns JWT data that should be signed /// /// - Parameters: /// - headerContent: JWT header /// - bodyContent: JWT body /// - Returns: JWT data that should be signed /// - Throws: JwtError.utf8StrIsInvalid if utf8 string is invalid @objc public static func dataToSign(headerContent: JwtHeaderContent, bodyContent: JwtBodyContent) throws -> Data { let dataStr = "\(headerContent.stringRepresentation).\(bodyContent.stringRepresentation)" guard let data = dataStr.data(using: .utf8) else { throw JwtError.utf8StrIsInvalid } return data } /// Provides string representation of token /// /// - Returns: string representation of token @objc public func stringRepresentation() -> String { let headerStr = self.headerContent.stringRepresentation let bodyStr = self.bodyContent.stringRepresentation let signatureStr = self.signatureContent.stringRepresentation return "\(headerStr).\(bodyStr).\(signatureStr)" } /// Extracts identity /// /// - Returns: identity @objc public func identity() -> String { return self.bodyContent.identity } /// Returns whether or not token is expired /// /// - Parameter date: current date /// - Returns: true if token is expired, false otherwise @objc public func isExpired(date: Date = Date()) -> Bool { return date >= self.bodyContent.expiresAt } }
38.793548
118
0.683685
f58e560905750088c5b3b4f1d7a5486d59565b73
4,113
rs
Rust
src/error.rs
PythonCreator27/use-github-api-rs
a9b97d3879675ad7be683b76b03ff5bc908e30ad
[ "MIT" ]
1
2021-06-03T17:28:58.000Z
2021-06-03T17:28:58.000Z
src/error.rs
PythonCreator27/use-github-api-rs
a9b97d3879675ad7be683b76b03ff5bc908e30ad
[ "MIT" ]
1
2021-05-17T21:27:08.000Z
2021-05-17T21:27:08.000Z
src/error.rs
PythonCreator27/use-github-api-rs
a9b97d3879675ad7be683b76b03ff5bc908e30ad
[ "MIT" ]
1
2021-05-17T15:52:30.000Z
2021-05-17T15:52:30.000Z
#[cfg(any(feature = "auth"))] pub mod creation { use std::{error::Error as StdError, fmt}; #[derive(Debug)] pub(crate) enum CreationErrorKind { #[cfg(feature = "enterprise")] BaseUrlWithoutProtocol, #[cfg(feature = "enterprise")] BaseUrlWithoutApiPath, #[cfg(feature = "auth")] AuthTokenNotProvided, #[cfg(feature = "enterprise")] BaseUrlNotProvided, } #[derive(Debug)] pub struct CreationError { pub(crate) kind: CreationErrorKind, } impl CreationError { fn new(kind: CreationErrorKind) -> Self { Self { kind } } #[cfg(feature = "enterprise")] pub(crate) fn base_url_without_protocol() -> Self { Self::new(CreationErrorKind::BaseUrlWithoutProtocol) } #[cfg(feature = "enterprise")] pub(crate) fn base_url_without_api_path() -> Self { Self::new(CreationErrorKind::BaseUrlWithoutApiPath) } #[cfg(feature = "auth")] pub(crate) fn auth_token_not_provided() -> Self { Self::new(CreationErrorKind::AuthTokenNotProvided) } #[cfg(feature = "enterprise")] pub(crate) fn base_url_not_provided() -> Self { Self::new(CreationErrorKind::BaseUrlNotProvided) } } impl StdError for CreationError {} impl fmt::Display for CreationError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match &self.kind { #[cfg(feature = "enterprise")] CreationErrorKind::BaseUrlWithoutProtocol => { write!(f, "Base URL is without the protocol.") } #[cfg(feature = "enterprise")] CreationErrorKind::BaseUrlWithoutApiPath => { write!(f, "Base URL is without the `/api/v3` path at the end.") } #[cfg(feature = "auth")] CreationErrorKind::AuthTokenNotProvided => { write!(f, "Auth token not provided") } #[cfg(feature = "enterprise")] CreationErrorKind::BaseUrlNotProvided => { write!(f, "Base URL is not provided.") } } } } #[cfg(test)] mod tests { use crate::CreationError; fn assert_sync<T: Sync>() {} fn assert_send<T: Send>() {} #[test] fn test_send_and_sync() { assert_sync::<CreationError>(); assert_send::<CreationError>(); } } } pub mod runtime { use std::{error::Error as StdError, fmt}; #[derive(Debug)] pub(crate) enum RuntimeErrorKind { #[cfg(feature = "auth")] BadCredentials, NotFound, } #[derive(Debug)] pub struct RuntimeError { pub(crate) kind: RuntimeErrorKind, } impl RuntimeError { fn new(kind: RuntimeErrorKind) -> Self { Self { kind } } #[cfg(feature = "auth")] pub(crate) fn bad_credentials() -> Self { Self::new(RuntimeErrorKind::BadCredentials) } pub(crate) fn not_found() -> Self { Self::new(RuntimeErrorKind::NotFound) } } impl StdError for RuntimeError {} impl fmt::Display for RuntimeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match &self.kind { #[cfg(feature = "auth")] RuntimeErrorKind::BadCredentials => { write!(f, "Bad credentials") } RuntimeErrorKind::NotFound => { write!(f, "Either the resource does not exist, or it is protected") } } } } #[cfg(test)] mod tests { use crate::RuntimeError; fn assert_sync<T: Sync>() {} fn assert_send<T: Send>() {} #[test] fn test_send_and_sync() { assert_sync::<RuntimeError>(); assert_send::<RuntimeError>(); } } }
27.979592
87
0.515439
2a8415c34350d61938b3749a7323afa9110e48a5
3,430
java
Java
portal-BE/src/main/java/org/onap/portal/service/EcompUserAppRolesService.java
sundayayandele/portal
547810b7da6bb938f1e666357d88f7d03f455229
[ "Apache-2.0", "CC-BY-4.0" ]
2
2018-11-19T11:02:46.000Z
2021-02-07T21:10:35.000Z
portal-BE/src/main/java/org/onap/portal/service/EcompUserAppRolesService.java
sundayayandele/portal
547810b7da6bb938f1e666357d88f7d03f455229
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
portal-BE/src/main/java/org/onap/portal/service/EcompUserAppRolesService.java
sundayayandele/portal
547810b7da6bb938f1e666357d88f7d03f455229
[ "Apache-2.0", "CC-BY-4.0" ]
4
2018-09-22T09:51:18.000Z
2021-07-13T20:33:04.000Z
/* * ============LICENSE_START========================================== * ONAP Portal * =================================================================== * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * =================================================================== * Modifications Copyright (c) 2019 Samsung * =================================================================== * * Unless otherwise specified, all software contained herein is licensed * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * * https://creativecommons.org/licenses/by/4.0/ * * Unless required by applicable law or agreed to in writing, documentation * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ============LICENSE_END============================================ * * */ package org.onap.portal.service; import java.util.List; import java.util.stream.Collectors; import javax.persistence.EntityManager; import javax.persistence.Tuple; import org.onap.portal.domain.dto.transport.EcompUserAppRoles; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class EcompUserAppRolesService { private final static String QUERY = "select\n" + " fr.role_name as roleName,\n" + " fu.app_id as appId,\n" + " fu.user_id as userId,\n" + " fu.priority as priority,\n" + " fu.role_id as roleId\n" + " from\n" + " fn_user_role fu\n" + " left outer join fn_role fr on fu.role_id = fr.role_id\n" + " where\n" + " fu.user_id = :userId\n" + " and fu.app_id = :appId"; private final EntityManager entityManager; @Autowired public EcompUserAppRolesService(EntityManager entityManager) { this.entityManager = entityManager; } public List<EcompUserAppRoles> getUserAppExistingRoles(final Long appId, final Long userId){ List<Tuple> tuples = entityManager.createQuery(QUERY, Tuple.class) .setParameter("appId", appId) .setParameter("userId", userId) .getResultList(); return tuples.stream().map(this::tupleToEcompUserAppRoles).collect(Collectors.toList()); } private EcompUserAppRoles tupleToEcompUserAppRoles(Tuple tuple){ return new EcompUserAppRoles((String)tuple.get("appId"), (Long) tuple.get("userId"), (Integer) tuple.get("priority"), (Long) tuple.get("roleId"), (String) tuple.get("roleName")); } }
39.425287
182
0.653644
e5307ac89d2c54f0175be7c31f43b9e7239f7fa0
667
tsx
TypeScript
apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsf/form/adresser/partials/midlertidigAdresse/Stedsadresse.tsx
navikt/testnorge
8400ad28d37ec5dee87a4fe76e233632d2cfdbd1
[ "MIT" ]
3
2020-06-30T18:14:44.000Z
2022-03-07T10:10:48.000Z
apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsf/form/adresser/partials/midlertidigAdresse/Stedsadresse.tsx
navikt/testnorge
8400ad28d37ec5dee87a4fe76e233632d2cfdbd1
[ "MIT" ]
1,546
2020-05-25T14:39:45.000Z
2022-03-31T13:41:00.000Z
apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsf/form/adresser/partials/midlertidigAdresse/Stedsadresse.tsx
navikt/testnorge
8400ad28d37ec5dee87a4fe76e233632d2cfdbd1
[ "MIT" ]
1
2021-11-03T16:02:17.000Z
2021-11-03T16:02:17.000Z
import React from 'react' import { FormikSelect } from '~/components/ui/form/inputs/select/Select' import { AdresseKodeverk } from '~/config/kodeverk' import { FormikTextInput } from '~/components/ui/form/inputs/textInput/TextInput' export const Stedsadresse = () => { const norskAdresse = 'tpsf.midlertidigAdresse.norskAdresse' return ( <div className="flexbox--flex-wrap"> <FormikTextInput name={`${norskAdresse}.eiendomsnavn`} label="Eiendomsnavn" size="large" /> <FormikSelect name={`${norskAdresse}.postnr`} label="Postnummer" kodeverk={AdresseKodeverk.PostnummerUtenPostboks} size="large" isClearable={false} /> </div> ) }
30.318182
94
0.716642
a6870054173415b95e39bbbf6627cea81c49fb03
1,157
sql
SQL
jeecg-p3-biz-qywx/src/main/java/com/jeecg/qywx/base/sql/QywxGzentityDao_insert.sql
zishuimuyu/jeewx
031208a50fd8840ea9b5cdda26973e0df747df99
[ "Apache-2.0" ]
405
2016-08-24T03:54:32.000Z
2022-03-23T17:36:20.000Z
jeecg-p3-biz-qywx/src/main/java/com/jeecg/qywx/base/sql/QywxGzentityDao_insert.sql
zishuimuyu/jeewx
031208a50fd8840ea9b5cdda26973e0df747df99
[ "Apache-2.0" ]
27
2018-05-25T05:14:19.000Z
2022-02-15T03:31:38.000Z
jeecg-p3-biz-qywx/src/main/java/com/jeecg/qywx/base/sql/QywxGzentityDao_insert.sql
zishuimuyu/jeewx
031208a50fd8840ea9b5cdda26973e0df747df99
[ "Apache-2.0" ]
219
2016-04-12T07:04:13.000Z
2022-03-23T17:36:21.000Z
INSERT INTO qywx_gzentity ( id ,template_name ,template_id ,template_type ,is_work ,accountid ,create_name ,create_by ,create_date ,update_name ,update_by ,update_date ) values ( :qywxGzentity.id ,:qywxGzentity.templateName ,:qywxGzentity.templateId ,:qywxGzentity.templateType ,:qywxGzentity.isWork ,:qywxGzentity.accountid ,:qywxGzentity.createName ,:qywxGzentity.createBy ,:qywxGzentity.createDate ,:qywxGzentity.updateName ,:qywxGzentity.updateBy ,:qywxGzentity.updateDate )
37.322581
51
0.343129
b08fc5b648f3692c3c30e19bead93441bca5f480
1,322
swift
Swift
fmh/Common/PListParser.swift
fmh-charity/fmh-ios
21c472c19554dda310c10b56edb5c523fa73a9d9
[ "Apache-2.0" ]
null
null
null
fmh/Common/PListParser.swift
fmh-charity/fmh-ios
21c472c19554dda310c10b56edb5c523fa73a9d9
[ "Apache-2.0" ]
null
null
null
fmh/Common/PListParser.swift
fmh-charity/fmh-ios
21c472c19554dda310c10b56edb5c523fa73a9d9
[ "Apache-2.0" ]
null
null
null
// // PListParser.swift // fmh // // Created: 30.04.2022 // import Foundation struct PListParser { typealias DictionaryType = [String: Any] typealias ArrayType = [Any] static func getValueDictionary(forResource: String, forKey key: String) -> Any? { if let infoPlistPath = Bundle.main.url(forResource: forResource, withExtension: "plist") { do { let infoPlistData = try Data(contentsOf: infoPlistPath) if let dict = try PropertyListSerialization.propertyList(from: infoPlistData, options: [], format: nil) as? DictionaryType { return dict[key] } } catch { return nil } } return nil } static func getValueArray(forResource: String, forId id: Int) -> Any? { if let infoPlistPath = Bundle.main.url(forResource: forResource, withExtension: "plist") { do { let infoPlistData = try Data(contentsOf: infoPlistPath) if let array = try PropertyListSerialization.propertyList(from: infoPlistData, options: [], format: nil) as? ArrayType { return array[id] } } catch { return nil } } return nil } }
29.377778
140
0.558245
692e56c8601c07f46024a99cb9f43a552172fa94
1,335
sql
SQL
api/migrations/20171012164510_military.sql
bpdesigns/e-QIP-prototype
ca614c478e856c523c389d88a919d1357508dddd
[ "CC0-1.0" ]
19
2016-11-14T13:43:10.000Z
2019-07-29T17:09:53.000Z
api/migrations/20171012164510_military.sql
bpdesigns/e-QIP-prototype
ca614c478e856c523c389d88a919d1357508dddd
[ "CC0-1.0" ]
1,469
2016-11-15T19:45:47.000Z
2019-08-16T22:57:00.000Z
api/migrations/20171012164510_military.sql
bpdesigns/e-QIP-prototype
ca614c478e856c523c389d88a919d1357508dddd
[ "CC0-1.0" ]
10
2019-09-05T18:02:03.000Z
2022-02-19T18:30:14.000Z
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied -- +goose StatementBegin CREATE TABLE military_disciplinaries ( id bigint REFERENCES accounts(id) NOT NULL PRIMARY KEY, has_disciplinary_id bigint REFERENCES branches(id), list_id bigint REFERENCES collections(id) ); CREATE TABLE military_foreigns ( id bigint REFERENCES accounts(id) NOT NULL PRIMARY KEY, list_id bigint REFERENCES collections(id) ); CREATE TABLE military_histories ( id bigint REFERENCES accounts(id) NOT NULL PRIMARY KEY, has_served_id bigint REFERENCES branches(id), list_id bigint REFERENCES collections(id) ); CREATE TABLE military_selectives ( id bigint REFERENCES accounts(id) NOT NULL PRIMARY KEY, was_born_after_id bigint REFERENCES branches(id), has_registered_id bigint REFERENCES branches(id), registration_number_id bigint REFERENCES texts(id), explanation_id bigint REFERENCES textareas(id) ); -- +goose StatementEnd -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back -- +goose StatementBegin DROP TABLE military_disciplinaries; DROP TABLE military_foreigns; DROP TABLE military_histories; DROP TABLE military_selectives; -- +goose StatementEnd
33.375
79
0.725843
7440ea8b86393b6e35ebb73a72ddb91036b89723
690
c
C
assignment6/alarm.c
jinsub1999/LinuxSystemProgramming
95f5cbe1d6357de1f9ad1bf91f1dc70a23c3206b
[ "MIT" ]
null
null
null
assignment6/alarm.c
jinsub1999/LinuxSystemProgramming
95f5cbe1d6357de1f9ad1bf91f1dc70a23c3206b
[ "MIT" ]
null
null
null
assignment6/alarm.c
jinsub1999/LinuxSystemProgramming
95f5cbe1d6357de1f9ad1bf91f1dc70a23c3206b
[ "MIT" ]
null
null
null
#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> static unsigned int AlarmSecs; // 주기. void SigAlarmHandler(int signo) { if (signal(SIGALRM, SigAlarmHandler) == SIG_ERR) { perror("signal"); exit(1); } // nsecs마다 핸들러 설정. alarm(AlarmSecs); printf("."); fflush(stdout); // '\n'까지 안기다리고 출력하게 됨. return; } int SetPeriodicAlarm(unsigned int nsecs) { if (signal(SIGALRM, SigAlarmHandler) == SIG_ERR) { return -1; } AlarmSecs = nsecs; // 주기 설정. alarm(nsecs); // nsecs후 SIGALRM signal. return 0; } int main() { printf("Doing something every one seconds\n"); SetPeriodicAlarm(1); // 1초마다 점 출력. for (;;) pause(); }
17.692308
52
0.630435
4bad08104c2e2108a2d2d5d4190a513267d811d0
130
swift
Swift
Demo/Shared/AppDependencies/Material.swift
turlodales/Accio
77ad0dfb28d248da90779eadaa40af43fde2f9c6
[ "MIT" ]
691
2019-03-04T13:02:20.000Z
2022-03-30T09:44:33.000Z
Demo/Shared/AppDependencies/Material.swift
devxoul/Accio
ed2aa91928531ea4dc5d80919f71daef7dad0d09
[ "MIT" ]
85
2019-03-26T13:51:54.000Z
2020-12-20T18:56:53.000Z
Demo/Shared/AppDependencies/Material.swift
devxoul/Accio
ed2aa91928531ea4dc5d80919f71daef7dad0d09
[ "MIT" ]
37
2019-04-08T14:01:41.000Z
2021-11-21T19:22:51.000Z
import Material // Ensure that framework was correctly integrated by using public API: let materialViewType = Material.View.self
26
70
0.815385
16afd2a51c410d2003f7a3542cfacf8ee76d0f24
649
tsx
TypeScript
src/wallet/ConnectWalletModal.tsx
ourzora/simple-wallet-provider
34c34630160a3ad8101f6442c52d8b314e7e28c9
[ "MIT" ]
12
2021-11-05T21:27:36.000Z
2022-03-15T05:09:00.000Z
src/wallet/ConnectWalletModal.tsx
ourzora/simple-wallet-provider
34c34630160a3ad8101f6442c52d8b314e7e28c9
[ "MIT" ]
3
2021-12-15T19:59:26.000Z
2022-02-12T20:50:24.000Z
src/wallet/ConnectWalletModal.tsx
ourzora/simple-wallet-provider
34c34630160a3ad8101f6442c52d8b314e7e28c9
[ "MIT" ]
4
2021-11-05T04:37:57.000Z
2022-02-10T00:44:57.000Z
import { useThemeConfig } from "../hooks/useThemeConfig"; import { WalletOptions } from "./WalletOptions"; import { ModalActionLayout } from "../modal/ModalActionLayout"; import { WALLET_MODAL_NAME } from "../context/WalletModalOpenContext"; export const ConnectWalletModal = () => { const { getString, getStyles } = useThemeConfig(); return ( <ModalActionLayout modalName={WALLET_MODAL_NAME} modalTitle={getString("CONNECT_WALLET")} modalDescription={getString("CONNECT_WALLET_ARIA_LABEL")} > <div {...getStyles("walletOptionsWrapper")}> <WalletOptions /> </div> </ModalActionLayout> ); };
30.904762
70
0.688752
6660f30e62bec685b0165aaaee29f50bd68a32e2
36
sql
SQL
src/test/tinc/tincrepo/mpp/models/regress/sql_related/regress_sql_tc_substitutions/sql_template/template/teardown.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
src/test/tinc/tincrepo/mpp/models/regress/sql_related/regress_sql_tc_substitutions/sql_template/template/teardown.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
src/test/tinc/tincrepo/mpp/models/regress/sql_related/regress_sql_tc_substitutions/sql_template/template/teardown.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
select '%dbname%'; select '%tags%';
12
18
0.611111
5285101d64d7f4b592feeb7eeb984d80efdbb6c7
103
kt
Kotlin
app/src/test/java/com/arturdziombek/coffeecounter/ui/signup/SignupViewModelTest.kt
Artur512/CoffeeCounter
a424f6ba39765367001bfcf791f7ca1fd43b9f3a
[ "Apache-2.0" ]
null
null
null
app/src/test/java/com/arturdziombek/coffeecounter/ui/signup/SignupViewModelTest.kt
Artur512/CoffeeCounter
a424f6ba39765367001bfcf791f7ca1fd43b9f3a
[ "Apache-2.0" ]
null
null
null
app/src/test/java/com/arturdziombek/coffeecounter/ui/signup/SignupViewModelTest.kt
Artur512/CoffeeCounter
a424f6ba39765367001bfcf791f7ca1fd43b9f3a
[ "Apache-2.0" ]
null
null
null
package com.arturdziombek.coffeecounter.ui.signup import org.junit.Assert.* class SignupViewModelTest
20.6
49
0.854369
c94e2293a481bc46bf66c6d832ea9534143c871f
58,026
sql
SQL
db/sales.sql
ghifarel/dealer
35da8ee20c7804bbd9324e326c521e28b0ba401a
[ "MIT" ]
null
null
null
db/sales.sql
ghifarel/dealer
35da8ee20c7804bbd9324e326c521e28b0ba401a
[ "MIT" ]
null
null
null
db/sales.sql
ghifarel/dealer
35da8ee20c7804bbd9324e326c521e28b0ba401a
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Jan 2021 pada 12.34 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `sales` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `berita` -- CREATE TABLE `berita` ( `id_berita` int(11) NOT NULL, `id_user` int(11) NOT NULL, `id_kategori` int(11) NOT NULL, `slug_berita` varchar(255) NOT NULL, `judul_berita` varchar(255) NOT NULL, `isi_berita` text NOT NULL, `gambar` varchar(255) NOT NULL, `status_berita` enum('Publish','Draft','','') NOT NULL, `jenis_berita` varchar(20) NOT NULL, `keywords` varchar(500) NOT NULL, `tanggal_post` datetime NOT NULL, `tanggal` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `berita` -- INSERT INTO `berita` (`id_berita`, `id_user`, `id_kategori`, `slug_berita`, `judul_berita`, `isi_berita`, `gambar`, `status_berita`, `jenis_berita`, `keywords`, `tanggal_post`, `tanggal`) VALUES (12, 3, 9, 'apple-tawarkan-kursus-coding-gratis-untuk-guru', 'Apple Tawarkan Kursus Coding Gratis Untuk Guru', '<p>Dalam membantu memajukan pendidikan ilmu komputer di Amerika Serikat,&nbsp;<strong><a href=\"https://www.detik.com/tag/apple\">Apple</a></strong>&nbsp;meluncurkan kursus coding tanpa biaya alias gratis yang ditujukan untuk para guru.</p>\r\n<p>Kursus ini ditawarkan melalui Develop in Swift, sebuah program coding pendidikan Apple yang ditujukan untuk siswa sekolah menengah dan universitas.</p>\r\n<p>\"Kursus ini dirancang untuk melengkapi kebutuhan pendidik ilmu komputer di AS, dan membantu instruktur dari semua tingkat keterampilan membangun pengetahuan dasar untuk mengajarkan pengembangan aplikasi dengan Swift,\" tulis Apple yang dikutip&nbsp;<strong>detikINET</strong>&nbsp;dari&nbsp;<em>Engadget</em>.</p>\r\n<table class=\"pic_artikel_sisip_table\" style=\"height: 427px;\" width=\"690\" align=\"center\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 1078.89px;\">\r\n<div class=\"pic_artikel_sisip\" align=\"center\">\r\n<div class=\"pic\" style=\"text-align: left;\"><img class=\"p_img_zoomin img-zoomin\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"apple coding\" src=\"https://akcdn.detik.net.id/community/media/visual/2020/07/10/apple-coding.jpeg?w=640\" alt=\"apple coding\" width=\"507\" height=\"316\" /></div>\r\n</div>\r\n<div id=\"vibeInjectorDiv\" style=\"text-align: center;\">apple coding</div>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Kedua program sekarang termasuk buku-buku baru yang tersedia secara gratis di Apple Books. Pelajaran akan mengajarkan siswa dengan konsep pemrograman penting yang digunakan dalam pengembangan aplikasi.<strong><a href=\"https://www.detik.com/tag/apple\">Apple</a></strong>&nbsp;juga telah memperbarui kurikulum Develop in Swift dan Everyone can Code dan menambahkan sumber daya baru untuk tenaga pengajar dan orangtua.</p>\r\n<p>Orang tua dapat menemukan panduan baru \"Quick Start to Code\", yang mencakup 10 tantangan coding yang dirancang untuk siswa berusia 10 tahun ke atas. Itu di samping situs web Apple Learning from Home diluncurkan musim semi ini, dan&nbsp;<a href=\"https://www.detik.com/tag/apple/\"><strong>Apple</strong></a>&nbsp;Education Learning Series-nya.</p>', 'wda.jpeg', 'Publish', 'Berita', 'apple, coding, guru', '2020-11-12 10:08:34', '2020-12-03 11:17:59'), (13, 3, 7, 'kode-pemrograman-asli-windows-xp-bocor-dan-bisa-diakses-publik', 'Kode Pemrograman Asli Windows XP Bocor dan Bisa Diakses Publik', '<p>Meski sudah berumur lebih dari 20 tahun dan dukungannya sudah disetop, sistem operasi (OS) ikonik besutan Microsoft, Windows XP masih jadi sasaran peretas dan pihak yang tak bertanggung jawab. Pasalnya, baru-baru ini seorang pengguna di forum 4chan menyebarkan unggahan berformat torrent yang berisikan satu set kode pemrograman lengkap, alias source code, dari Windows XP untuk pertama kalinya secara publik. Tak hanya Windows XP, di dalam file berukuran sekitar 43 GB ini, pengguna juga konon bisa menemukan source code dari beberapa OS Windows versi lawas, di antaranya seperti Windows 2000, Windows CE 5, Windows NT 4, dan masih banyak lagi.</p>\r\n<p>Unggahan itu juga mencantumkan sebuah folder yang diduga berisikan sederet video konspirasi tentang Bill Gates. Meski baru dibocorkan ke publik belakangan ini, sang pengunggah mengaku bahwa beragam source code OS yang ia susun sekitar 2 bulan tersebut sebenarnya sudah dibagikan selama bertahun-tahun secara diam-diam (private) kepada para peretas.</p>\r\n<p>Ilustrasi isi dari file torrent yang bisa diakses dan diunduh oleh khalayak tersebut bisa disimak di gambar berikut.</p>\r\n<p style=\"text-align: center;\"><img style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https://asset.kompas.com/crops/3A3KncuR7nJKX5GgU-qDhJ3fjyg=/58x141:1541x882/780x390/data/photo/2020/09/28/5f712d5b7997b.jpg\" alt=\"Isi dari file torrent yang konon berisi source code Windows XP dan OS Microsoft lainnya.\" width=\"664\" height=\"332\" data-width=\"780px\" data-aligment=\"\" />Isi dari file torrent yang konon berisi source code Windows XP dan OS Microsoft lainnya.</p>\r\n<p>Konon, source code Windows XP di atas, berikut beberapa versi OS Windows lawas lainnya yang tercantum di unggahan torrent tersebut, \"bukan kaleng-kaleng\" alias asli. Pihak Microsoft sendiri mengatakan bahwa mereka tengah \"menginvestigasi\" masalah source code Windows Xp yang bocor ke publik tadi.</p>\r\n<p><strong>Bisa dipakai untuk eksploitasi bug </strong></p>\r\n<p>Lantas, mengapa source code OS Windows XP yang bocor ini bisa menjadi masalah bagi pengguna OS masa kini? Sebagaimana dirangkum KompasTekno dari BleepingComputer, Selasa (29/9/2020), source code Windows XP yang bocor ini bisa menjadi masalah keamanan tersendiri. Apalagi, jika Windows 10 memakai beberapa elemen source code yang mirip dengan OS yang dirilis sekitar 2001 tersebut. Contohnya, peretas bisa saja menemukan beberapa celah keamanan (bug) dari source code Windows XP yang ternyata dipakai di Windows 10.</p>\r\n<p>Lalu, pihak yang tidak bertanggung jawab ini, meski kemungkinannya rendah, bisa mengeksploitasi bug tersebut dan lantas melancarkan niat buruknya, bisa jadi melalui beragam program atau software komputer dan lain sebagainya.</p>', '5d666699268011.jpg', 'Publish', 'Berita', 'Kode Pemrograman Asli Windows XP Bocor dan Bisa Diakses Publik, bug', '2020-11-12 10:29:31', '2020-11-12 09:30:33'), (15, 3, 7, 'nissan-terra', 'Nissan Terra', '<h2 class=\"featurette-heading\">Design.&nbsp;</h2>\r\n<p><strong>TAMPILAN YANG SIAP BAWA ANDA KE MANA SAJA</strong>. Desain eksteriornya yang menarik, termasuk bentuk flared fender, garis body yang khas, dan tingginya, Nissan Terra akan menarik perhatian saat mewati jalanan kota atau menembus medan yang sulit.</p>\r\n<h2 class=\"featurette-heading\">Style.</h2>\r\n<p><strong>TIGA BARIS, BAGIAN DALAM YANG LUAS UNTUK SEMUA ORANG</strong>. Mau duduk di bangku mana pun, Nissan Terra berikan ruang kabin yang luas. Setiap penumpang dapat melihat pemandangan yang luas berkat bangku baris kedua dan ketiga yang didesain meningkat.</p>\r\n<p><strong>BAGIAN DALAM YANG FLEKSIBEL</strong>. Bangku baris kedua gampang dilipat, sehingga memudahkan penumpang untuk masuk duduk di bangku paling belakang. Dengan susunan sliding 60/40 di baris kedua dan 50/50 di bangku belakang, Nissan Terra memberikan keleluasaan bagi Anda untuk memuat barang. Kursi baris kedua dan ketiga mudah digeser, sehingga setiap penumpang dapat meraskan kenyamanan ekstra.</p>\r\n<h2 class=\"featurette-heading\">Safety.&nbsp;</h2>\r\n<p><strong>MENJAGA ANDA DAN KELUARGA</strong>. Dalam menciptakan mobil Nissan, kami selalu mengambil pendekatan komprehensif soal keamanannya. Agar kita bisa mengawasi setiap sistem yang bekerja di mobil demi mengatasi maupun menghindari berbagai situasi tak terduga.</p>\r\n<h2 class=\"featurette-heading\">Engine Performance.</h2>\r\n<p><strong>2.5-L ENGINE</strong>. Mesin diesel turbo common rail pada Nissan Terra dapat menghasilkan torsi rendah untuk melewati jalanan saat macet atau medan yang sulit.</p>\r\n<p><strong>7-SPEED AUTOMATIC TRANSMISSION</strong>. Perpindahan yang halus pada mobil bertransmisi otomatis 7-kecepatan ini memberikan Anda akses yang instant untuk merasakan tenaga maksimal Nissan Terra sekaligus hasilkan efisiensi bahan bakar saat dibawa di jalan tol. Tersedia juga pilihan transmisi manual 6-kecepatan untuk Anda yang mencari tantangan lebih.</p>\r\n<h2 class=\"featurette-heading\">Handling.</h2>\r\n<p><strong>PENYANGGAH DENGAN 4 SISI</strong>. Dinding empat sisi tentu lebih kuat daripada dinding tiga sisi, begitu juga dengan Nissan Terra yang dilengkapi Fully Boxeed Ladder frame (empat sisi). Tidak seperti mobil lainnya yang cuma dilengkapi sasis tiga sisi open C-shaped.</p>\r\n<p><strong>5-LINK SUSPENSION</strong>. Dirancang untuk menjadi mobil yang kuat dan tangguh, Nissan Terra memiliki suspensi yang dapat membantu rodanya mencengkram tanah semaksimal mungkin.</p>\r\n<p><strong>GROUND CLEARANCE</strong>. Postur tinggi Nisan Terra menghasilkan ground clearance yang mumpuni, membuat mobil ini memiliki sudut maksimal di bagian depan dan belakang untuk menaklukkan medan yang sulit tanpa takut terjadi benturan di bagian bawah mobil.</p>\r\n<h2 class=\"featurette-heading\">Comfort.</h2>\r\n<p><strong>SENSASI AMAN DAN NYAMAN BAGI SETIAP PETUALANG SEPERTI ANDA</strong>. Tidak mudah untuk beri kenyamanan bagi semua orang, tapi sepertinya hal itu bisa terpenuhi jika berada di dalam Nissan Terra. Desain interior-nya siap berikan keseruan tersendiri, mulai dari kemudahan mengatur suhu udara sampai menikmati banyak pilihan hiburan, sehingga semua orang di dalamnya dapat menikmati kesenangan yang sama.</p>\r\n<table style=\"width: 786.396px; margin-left: auto; margin-right: auto;\" border=\"3\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 275px;\">Dimension</td>\r\n<td style=\"width: 113px; text-align: center;\">2.5 (4x2) MT</td>\r\n<td style=\"width: 135px; text-align: center;\">2.5 (4x2) E AT</td>\r\n<td style=\"width: 135px; text-align: center;\">2.5 (4x2) VL AT</td>\r\n<td style=\"width: 126.396px; text-align: center;\">2.5 (4x4) VL AT</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Width:</td>\r\n<td style=\"width: 113px; text-align: center;\">1865 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">1865 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">1865 mm</td>\r\n<td style=\"width: 126.396px; text-align: center;\">1865 mm</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Height:</td>\r\n<td style=\"width: 113px; text-align: center;\">1835 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">1835 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">1835 mm</td>\r\n<td style=\"width: 126.396px; text-align: center;\">1835 mm</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Wheelbase:</td>\r\n<td style=\"width: 113px; text-align: center;\">2850 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">2850 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">2850 mm</td>\r\n<td style=\"width: 126.396px; text-align: center;\">2850 mm</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Curb Weight:</td>\r\n<td style=\"width: 113px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 126.396px; text-align: center;\">-</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Turning Radius:</td>\r\n<td style=\"width: 113px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 126.396px; text-align: center;\">-</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Tread:</td>\r\n<td style=\"width: 113px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 126.396px; text-align: center;\">-</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Ground Clearence:</td>\r\n<td style=\"width: 113px; text-align: center;\">225 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">225 mm</td>\r\n<td style=\"width: 135px; text-align: center;\">225 mm</td>\r\n<td style=\"width: 126.396px; text-align: center;\">225 mm</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Fuel Tank Capacity:</td>\r\n<td style=\"width: 113px; text-align: center;\">52.4 litre</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 135px; text-align: center;\">-</td>\r\n<td style=\"width: 126.396px; text-align: center;\">-</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 275px;\">Engine</td>\r\n<td style=\"width: 113px; text-align: center;\">2.5 (4x2) MT</td>\r\n<td style=\"width: 135px; text-align: center;\">2.5 (4x2) AT</td>\r\n<td style=\"width: 135px; text-align: center;\">2.5 (4x2) AT</td>\r\n<td style=\"width: 126.396px; text-align: center;\">2.5 (4x2) AT</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<table style=\"width: 787.455px; margin-left: auto; margin-right: auto;\" border=\"3\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 274px;\">Fuel Type:</td>\r\n<td style=\"width: 113px;\">Diesel</td>\r\n<td style=\"width: 134px;\">Diesel</td>\r\n<td style=\"width: 136px;\">Diesel</td>\r\n<td style=\"width: 125.455px;\">Diesel</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">Engine Type:</td>\r\n<td style=\"width: 113px;\">-</td>\r\n<td style=\"width: 134px;\">2488 cc Turbo Common Rail</td>\r\n<td style=\"width: 136px;\">2488 cc Turbo Common Rail</td>\r\n<td style=\"width: 125.455px;\">2488 cc Turbo Common Rail</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 274px;\">&nbsp;</td>\r\n<td style=\"width: 113px;\">&nbsp;</td>\r\n<td style=\"width: 134px;\">&nbsp;</td>\r\n<td style=\"width: 136px;\">&nbsp;</td>\r\n<td style=\"width: 125.455px;\">&nbsp;</td>\r\n</tr>\r\n</tbody>\r\n</table>', 'Terra.png', 'Publish', 'Berita', 'Nissan Terra', '2020-12-27 05:16:48', '2021-01-17 10:08:45'), (16, 3, 7, 'all-new-nissan-serena', 'All New Nissan Serena', '<h1 id=\"features\" class=\"subtitle txt-blue3\" style=\"text-align: center;\">Features</h1>\r\n<h2 class=\"featurette-heading\">Nissan Intelligent Mobility</h2>\r\n<p><strong>SMARTPHONE CONNECTIVITY IN 7\" HEAD UNIT</strong>.</p>\r\n<p><strong>INTELLIGENT AROUND VIEW MONITOR (I-AVM)</strong>.Dapatkan pandangan jelas 360 derajat di sekitar Anda. Dibekali kamera di empat sisinya, memudahkan Anda untuk parkir dan melihat keadaan sekeliling mobil secara menyeluruh. Dilengkapi juga dengan Moving Object Detection (MOD) yang memberi tahu saat ada sesuatu yang bergerak di belakang mobil.</p>\r\n<p><strong>DIGITAL SPEEDOMETER</strong>.</p>\r\n<h2 class=\"featurette-heading\">Dual Back Door</h2>\r\n<p><strong>DUAL BACK DOOR</strong>. Pintu belakang yang terbagi menjadi 2 bagian, memudahkan Anda memasukan barang saat parkir di tempat sempit.</p>\r\n<h2 class=\"featurette-heading\">Touchless Sliding Door</h2>\r\n<p><strong>TOUCHLESS SLIDING DOOR</strong>. Pintu baris kedua yang dilengkapi dengan foot sensor membantu Anda untuk membuka pintu hanya dengan satu ayunan kaki.</p>\r\n<h2 class=\"featurette-heading\">Ultimate Versatility</h2>\r\n<p><strong>2ND ROW SEAR SLIDE+LONG SLIDE</strong>. Kursi baris kedua dapat digeser dan dirapatkan dengan kursi sebelahnya serta dimundurkan sampai baris ketiga untuk mendapatkan ruang kaki yang lega.</p>\r\n<p><strong>11\" ROOF MONITOR</strong>. Sistem hiburan untuk perjalanan keluarga semakin seru dengan layar besar 11\" yang ada di plafon baris kedua</p>\r\n<p><strong>7 USB PORTS</strong>. Dilengkapi tujuh USB charging port yang tersebar di tiap baris kursi, membuat Anda tetap terkoneksi.</p>\r\n<h2>Harga.</h2>\r\n<p><strong>X&nbsp; &nbsp; &nbsp; &nbsp;: Rp.465.150.000</strong></p>\r\n<p><strong>HWS : Rp.493.250.000</strong></p>', 'serena.png', 'Publish', 'Berita', 'All New Nissan Serena', '2021-01-09 12:57:19', '2021-01-17 09:13:00'), (17, 3, 7, 'all-new-nissan-kicks-e-power', 'All New Nissan Kicks e-POWER', '<h2 style=\"text-align: center;\">&nbsp;</h2>\r\n<table style=\"width: 940px;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 434px;\"><img class=\"feature-image\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"desain All New Nissan Kicks e-POWER\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kicksfeatures/feature1.jpg\" alt=\"desain All New Nissan Kicks e-POWER\" width=\"329\" height=\"231\" /></td>\r\n<td style=\"width: 504px;\">\r\n<p>&nbsp;</p>\r\n<h3 style=\"text-align: left;\">Design. <strong>All New Nissan Kicks e-POWER</strong></h3>\r\n<p style=\"text-align: justify;\"><strong>TENAGA LISTRIK 100% TANPA PERLU CHARGING</strong>. APA ITU TEKNOLOGI NISSAN E-POWER? Teknologi Nissan e-POWER terdiri dari mesin 3-silinder kecil berukuran 1.2 liter, generator, inverter, dan motor elektrik. Mesin ICE (Internal Combustion Engine) dan generator akan menghasilkan listrik yang tersimpan di baterai lithium-ion, lalu menyalurkannya ke motor elektrik untuk memberi daya tanpa perlu recharging listrik dari luar. Memberikan pengalaman berkendara baru dengan motor yang 100% digerakkan oleh tenaga listrik.</p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 938px;\" colspan=\"2\">\r\n<p><strong>APA ITU TEKNOLOGI NISSAN E-POWER</strong>. Teknologi Nissan e-POWER pada All New Nissan Kicks terdiri dari mesin 3-silinder kecil berukuran 1.2 liter, generator, inverter, dan motor elektrik. Mesin ICE (Internal Combustion Engine) dan generator akan menghasilkan listrik yang tersimpan di baterai lithium-ion, lalu menyalurkannya ke motor elektrik untuk memberi daya tanpa perlu recharging listrik dari luar. Memberikan pengalaman berkendara baru dengan motor yang 100% digerakkan oleh tenaga listrik. Pada tahun 2019 All New Nissan Kicks dinobatkan sebagai \'Technology of the Year\' oleh Automotive Researchers\' and Journalists\' Conference of Japan, teknologi powertrain e-POWER Nissan langsung populer setelah diluncurkan di Jepang.</p>\r\n<p>&nbsp;</p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<table style=\"width: 940px;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 544px;\">\r\n<h3 style=\"text-align: justify;\">Style. <strong>All New Nissan Kicks e-POWER</strong></h3>\r\n<p style=\"text-align: justify;\"><strong>MELINTAS CEPAT PENUH SENSASI</strong>. All New Nissan Kicks e-POWER hadir dengan empat pilihan warna yang memukau dengan desain grill V-motion yang premium. Tidak hanya itu, desain interior All New Nissan Kicks e-POWER juga terlihat menawan dengan balutan lapisan kulit berwarna hitam. Temukan kelebihan desain All New Nissan Kicks e-POWER dengan melakukan test drive di dealer Indomobil Nissan di kota Anda dan rasakan sensasi mengendarai mobil dengan 100% yang ditenagai listrik.</p>\r\n</td>\r\n<td style=\"width: 394px;\">\r\n<p>&nbsp;</p>\r\n<p>&nbsp;<img class=\"feature-image\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"style All New Nissan Kicks e-POWER\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kicksfeatures/feature2.jpg\" alt=\"style All New Nissan Kicks e-POWER\" width=\"331\" height=\"232\" /></p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<h2 style=\"background: white; margin: 15.0pt 0cm 7.5pt 0cm;\"><span style=\"font-size: 22.5pt; font-family: \'Arial\',\'sans-serif\'; color: #333333; font-weight: normal;\">Safety. <strong>All New Nissan Kicks e-POWER</strong></span></h2>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">ALL NEW NISSAN KICKS BERKENDARA LEBIH MUDAH DAN AMAN DENGAN NISSAN INTELLIGENT MOBILITY</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Mari berkendara ke masa depan dengan teknologi terbaru dari Nissan. Kini berkendara terasa semakin mudah, aman, dan menyenangkan dengan Nissan Intelligent Mobility. Temukan seluruh kecanggihannya di All-New Nissan Kicks e-POWER! Melaju dengan percaya diri dengan All New Nissan Kicks yang dilengkapi berbagai fitur keselamatan untuk menjaga Anda selama berkendara.</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">Intelligent Cruise Control (ICC) Teknologi cerdas cruise control</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Teknologi Intelligent Cruise Control (ICC) akan mengatur kecepatan Nissan Kicks secara otomatis berdasarkan kecepatan mobil yang ada di depan Nissan Kicks Anda. Sistem akan menjaga jarak antar kendaraan dan ketika sudah aman, mengembalikan kecepatan yang sudah ditentukan pengemudi.</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">Intelligent Forward Collision Warning (IFCW)</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Teknologi cerdas pemberi peringatan tabrakan. Sistem akan mengeluarkan sinyal suara peringatan saat mendeteksi adanya resiko tabrakan dari depan.</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">Intelligent Emergency Braking (IEB)</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Teknologi cerdas pengereman darurat. Sistem ini terintegrasi dengan IFCW (Intelligent Forward Warning Technologi) yang membantu menganalisa jarak dan kecepatan kendaraan di depan Anda, dan mampu mengurangi kecepatan Nissan Kicks Anda hingga menghentikan laju jika berpotensi kecelakaan.</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">Blind Spot Warning (BSW)</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Teknologi peringatan blind spot. Sistem peringatan yang yang membuat berkendara Anda semakin nyaman dan aman. Meningkatkan kenyamanan dalam situasi dimana Anda ingin berpindah jalur. Sesaat setelah lampu sein menyala, system akan membunyikan sinyal dengan lampu untuk memperingatkan Anda apabila ada kendaraan lain di jalur yang tidak bisa dilihat pengemudi.</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\"><strong style=\"box-sizing: border-box;\"><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">Rear Cross Traffic Alert (RCTA)</span></strong><span style=\"font-size: 10.0pt; font-family: \'Helvetica\',\'sans-serif\'; color: #333333;\">&nbsp;Teknologi yang mendeteksi obyek dibelakang mobil ketika mundur. Saat Nissan Kicks Anda mundur system akan memberikan peringatan. Saat ada kendaraan menghampiri dalam radius 20 meter dari arah kana ataupun kiri, system akan memberikan sinyal dengan lampu dari arah mana kendaraan tersebut datang</span></p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\">&nbsp;</p>\r\n<p style=\"background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: justify; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 0cm 0cm 7.5pt;\">&nbsp;</p>\r\n<table style=\"width: 940px;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 523px;\">&nbsp;<img class=\"feature-image\" title=\"engine performance All New Nissan Kicks e-POWER\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kicksfeatures/feature4.jpg\" alt=\"engine performance All New Nissan Kicks e-POWER\" /></td>\r\n<td style=\"width: 415px;\">\r\n<h3>Engine Performance. <strong>All New Nissan Kicks e-POWER</strong></h3>\r\n<p><strong>Type mesin HR12 dengan 3 Cylinder inline, Engine size 1198 dengan maksimum power 129/4000-8992, maksimum torque 260/500-3008</strong>&nbsp;Mesin yang handal dan efisien membuat All New Nissan Kicks terasa menyenangkan saat dikendarai dalam kemacetan atau berjalan cepat di dalam tol, Selain itu, sistem e-Power beroperasi dengan sangat senyap, seperti kendaraan listrik 100%. E-Power juga menawarkan efisien bahan bakar yang baik, karena mesin bensin hanya mengisi baterai untuk motor listrik utama.</p>\r\n<p><strong>Transmission.</strong>&nbsp;Adapun transmisi yang di sematkan di All New Nissan Kicks yaitu e-Transmision dengan roda penggerak depan.</p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<table style=\"width: 940px;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"text-align: justify; width: 533px;\">&nbsp;\r\n<h3>Handling.&nbsp;<strong>All New Nissan Kicks e-POWER</strong></h3>\r\n<p>Anda dan keluarga dapat berkendara nyaman dan aman dengan All New Nissan Kicks karena sudah di lengkapi dengan system pengereman yang mumpuni un</p>\r\n<p><span style=\"font-family: inherit; font-size: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;\">tuk menunjang safety saat berkendara.</span></p>\r\n<p><strong>ABS.</strong>&nbsp;Dalam situasi pengereman mendadak, dengan memompa rem lebih cepat untuk menghentikan laju, membantu mencegah roda terkunci, dan memungkinkan Anda untuk mengarahkan kemudi menghindari hambatan yang muncul tiba-tiba.</p>\r\n<p><strong>EBD.</strong>&nbsp;Menyeimbangkan dan menyesuaikan pengeremen pada kekuatan rem belakang pada saat beban ekstra di bagian belakang dari penumpang atau kargo.</p>\r\n<p><strong>Brake Assist.</strong>&nbsp;Dalam situasi pengereman keras atau panik. Tekanan pedal ekstra memberikan kekuatan tambahan untuk berhenti dengan mengaktifkan ABS dan EBD lebih cepat di bawah situasi pengereman darurat. Mengendarai Nissan Kicks jadi aman dan semakin fun tanpa perlu khawatir untuk kenyamanan dan keamanan saat berkendara.</p>\r\n</td>\r\n<td style=\"text-align: justify; width: 405px;\">\r\n<p><img class=\"feature-image\" style=\"font-family: inherit; font-size: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit; display: block; margin-left: auto; margin-right: auto;\" title=\"handling All New Nissan Kicks e-POWER\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kicksfeatures/feature5.jpg\" alt=\"handling All New Nissan Kicks e-POWER\" width=\"354\" height=\"248\" /></p>\r\n<p>&nbsp;</p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<h3>Comfort.&nbsp;<strong>All New Nissan Kicks e-POWER</strong></h3>\r\n<p><strong>SATU PEDAL PINTAR YANG MEMUDAHKAN</strong>&nbsp;Melaju cepat atau memperlambat kecepatan akan semakin mudah dan aman dengan teknologi One-Pedal Operation. Akselerasi dan pengereman dapat dilakukan sekaligus dari satu pedal dengan mudah.</p>\r\n<p><strong>Hill Start Assist (HAS)</strong>&nbsp;Teknologi yang membantu perjalanan saat tanjakan. Ketika berhenti di tanjakan curam, system akan membantu mencegah All New Nissan Kicks untuk mundur. Saat Anda melepas pedal rem, system akan tetap mengerem, sehingga pengemudi bisa menginjak pedal gas dan mulai berjalan lagi dengan lancar.</p>\r\n<p>&nbsp;</p>\r\n<div class=\"carcolordesc\">\r\n<h3><strong>Colors</strong></h3>\r\n<p><strong><img class=\"imgLoaded\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kickscolor/monarchorange.jpg?1610880154459\" width=\"471\" height=\"267\" data-alignment=\"\" data-portrait=\"\" /></strong></p>\r\n<div class=\"carcolordesc\">\r\n<h5><strong>Monarch Orange With Black Roof</strong></h5>\r\n</div>\r\n<div class=\"bs-docs-container\">\r\n<div class=\"row\">\r\n<div id=\"camera_wrap_3\" class=\"camera_wrap carcolor\">\r\n<div class=\"camera_fakehover\">\r\n<div class=\"camera_target\">\r\n<div class=\"cameraCont\">\r\n<div class=\"cameraSlide cameraSlide_1 cameracurrent\"><img class=\"imgLoaded\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kickscolor/stormwhite.jpg?1610880154732\" width=\"472\" height=\"267\" data-alignment=\"\" data-portrait=\"\" />\r\n<div class=\"camerarelative\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n<h5 class=\"camera_overlayer\"><strong>&nbsp;Storm White with Black Roof</strong></h5>\r\n<div class=\"camera_target_content\">\r\n<div class=\"cameraContents\">\r\n<div class=\"cameraContent cameracurrent\">\r\n<div class=\"camera_caption fadeFromLeft\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<p><img class=\"imgLoaded\" style=\"color: #626262; background-color: #ffffff;\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kickscolor/blackstar.jpg?1610881166509\" width=\"471\" height=\"267\" data-alignment=\"\" data-portrait=\"\" /></p>\r\n</div>\r\n<div class=\"bs-docs-container\">\r\n<div class=\"row\">\r\n<div id=\"camera_wrap_3\" class=\"camera_wrap carcolor\">\r\n<div class=\"camera_fakehover\">\r\n<h5 class=\"camera_overlayer\"><strong>&nbsp;Black Star</strong></h5>\r\n<div class=\"camera_target_content\">\r\n<div class=\"cameraContents\">\r\n<div class=\"cameraContent cameracurrent\">\r\n<h5 class=\"camera_caption fadeFromLeft\"><img class=\"imgLoaded\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/kicks/kickscolor/gunmetal.jpg?1610881168248\" width=\"470\" height=\"266\" data-alignment=\"\" data-portrait=\"\" /></h5>\r\n<h5><strong>Gun metalic</strong></h5>\r\n<div class=\"bs-docs-container\">\r\n<div class=\"row\">\r\n<div id=\"camera_wrap_3\" class=\"camera_wrap carcolor\">\r\n<div class=\"camera_fakehover\">\r\n<div class=\"camera_target\">\r\n<div class=\"cameraCont\">\r\n<div class=\"cameraSlide cameraSlide_3 cameracurrent\">\r\n<div class=\"camerarelative\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n<div class=\"camera_overlayer\">&nbsp;</div>\r\n<div class=\"camera_target_content\">\r\n<div class=\"cameraContents\">\r\n<div class=\"cameraContent cameracurrent\">\r\n<div class=\"camera_caption fadeFromLeft\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<div class=\"bs-docs-container\">\r\n<div class=\"row\">\r\n<div id=\"camera_wrap_3\" class=\"camera_wrap carcolor\">\r\n<div class=\"camera_fakehover\">\r\n<div class=\"camera_target\">\r\n<div class=\"cameraCont\">\r\n<div class=\"cameraSlide cameraSlide_0 cameracurrent\">\r\n<h3 id=\"spec\" class=\"subtitle txt-blue3\"><strong>Spec, Type &amp; Price</strong></h3>\r\n<div class=\"camerarelative\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n<div class=\"camera_overlayer\">&nbsp;\r\n<table style=\"width: 319px; margin-left: auto; margin-right: auto;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Dimension</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Length:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>4305 mm</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Width:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>1760 mm</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Height:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>1615 mm</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Wheelbase:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>2620 mm</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Curb Weight:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Turning Radius:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>5.1</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Tread:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Ground Clearence:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>175 mm</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Fuel Tank Capacity:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>41 litres</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Engine</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Fuel Type:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Petrol</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Engine Type:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>HR12</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Engine Code:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Fuel System:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Displacement:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>1198</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Configuration:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Bore x Stroke:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Max Output:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>129/4000-8992 (PS/RPM)</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Max Torque:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>260/500-3008 (Nm/rpm)</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Transmission</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Transmission type:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Transmision</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Drive System:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Front Wheel Drive</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Brakes</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Front:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Ventilated Disc</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Rear:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Disc</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>ABS + EBD + BA:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Suspension</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Front:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>MacPherson Strut, Coil Springs</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Rear:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Torsion Beam, Coil Springs</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Body Construction:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>-</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Steering</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Steering type:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Electric Power Steering</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Wheel &amp; Tyres</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Wheel type:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Alloy 17\"</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Tyre Size:</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>205/55R17</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Price</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>e-Power</strong></p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 195px;\">\r\n<p>Rupiah</p>\r\n</td>\r\n<td style=\"width: 122px;\">\r\n<p><strong>Rp 449.000.000</strong></p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</div>\r\n<div class=\"camera_target_content\">\r\n<div class=\"cameraContents\">\r\n<div class=\"cameraContent cameracurrent\">\r\n<div class=\"camera_caption fadeFromLeft\">&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>', 'kicks.png', 'Publish', 'Berita', 'All New Nissan Kicks e-POWER', '2021-01-09 13:00:59', '2021-01-17 11:19:03'), (18, 3, 7, 'all-new-nissan-livina', 'All New Nissan Livina', '<h1 id=\"features\" class=\"subtitle txt-blue3\" style=\"text-align: center;\">Features</h1>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><img class=\"feature-image\" title=\"desain All New Nissan Livina 2020\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/livina/livinafeatures/livina-feature1.jpg\" alt=\"desain All New Nissan Livina 2020\" width=\"370\" height=\"259\" /></td>\r\n<td>\r\n<h2 class=\"featurette-heading\"><span style=\"background-color: #ffffff;\">Design.</span></h2>\r\n<p>Nissan Livina mobil keluarga yang sudah hadir menemani keluarga Indonesia sejak April 2007 dengan nama Nissan Grand Livina dan Nissan Livina untuk versi hatchback dengan konfigurasi 5 seater. Pada 2013 Nissan Grand Livina mengalami major facelift.Nissan Grand Livina berkode L11 ini mendapatkan lampu depan-belakang, gril, dan bumper baru. Interior kembali didominasi warna beige seperti ketika pertama datang ke Indonesia. Pada eranya, Nissan Grand Livina merupakan mobil MPV favorit di Indonesia, Nissan Grand Livina banyak dianugerahi beberapa kali predikat Car of The Year.</p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h4>Safety.</h4>\r\n<p>Kini Nissan Grand Livina sudah digantikan dengan versi terbaru yaitu Nissan All New Livina, hadir pertama kali pada Februsari 2019, dengan model eksterior yang lebih sporty dan elegant, Nissan All New Livina hadir kembali untuk mejadi andalan keluarga Indonesia kemanapun akan bepergian, All New Livina memiliki kabin yang luas, system hiburan yang akan memanjakan selama perjalanan dan kini Nissan All New Livina dilengkapi dengan fitur &ndash; fitur yang lebih canggih, seperti :</p>\r\n<p><strong>VEHICLE DYNAMIC CONTROL.</strong>&nbsp;VDC Sistem yang membantu All New Livina tetap stabil dikendarai atau bermanuver sehingga tidak mudah tergelincir.</p>\r\n<p><strong>TRACTION CONTROL SYSTEM.</strong>&nbsp;Tetap nyaman dan aman saat berakselerasi di tikungan, karena fitur ini mencegah ban mengalami slip dan sulit dikendalikan.</p>\r\n<p><strong>HILL START ASSIST.</strong>&nbsp;Saat berada di tanjakan, fitur di All New Livina ini membantu mobil berhenti sejenak agar tidak mundur ke belakang sebelum memacu kembali All New Livina Anda kembali.</p>\r\n<p><strong>PUSH START/STOP BUTTON.</strong>&nbsp;Selama ada i-key di kantung Anda, kini cukup sekali tekan tombol untuk menghidupkan atau mematikan mesin All New Livina Anda.</p>\r\n<p><strong>I-KEY.</strong>&nbsp;Intelligent key System, memudahkan Anda tanpa harus repot mengeluarkan atau memasukan kunci ke All New Livina Anda.</p>\r\n<p>&nbsp;</p>\r\n<table style=\"width: 940px;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 336px;\"><img class=\"feature-image\" title=\"style All New Nissan Livina 2020\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/livina/livinafeatures/livina-feature2.jpg\" alt=\"style All New Nissan Livina 2020\" width=\"370\" height=\"259\" /></td>\r\n<td style=\"width: 602px;\">\r\n<h4 class=\"featurette-heading\" style=\"text-align: left;\"><strong>Engine Performance.</strong></h4>\r\n<p>&nbsp;<strong>4 Cylinder inline, 16 valve, DOHC and twin VTC (Variable-valve Timing Control)</strong>&nbsp;Dilengkapi dengan mesin baru All New Nissan Livina memberikan pengalaman berkendara yang fun dengan konsumesi bahan bakar yang efisien, mesin All New Nissan Livina menggunakan mesin 1.499 cc dengan tenaga 104 ps pada 6000 rpm dan torsi maksimum 141 Nm pada 4000 rpm</p>\r\n<p style=\"text-align: left;\"><strong>Transmission.</strong>&nbsp;Adapun transmisi menggunakan manual 5 kecepatan dan otomatis 4 kecepatan. Dengan menggunakan teknologi yang terbaru pergantian gigi semakin halus dan semakin bertenaga.</p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>\r\n<h2 class=\"featurette-heading\">Handling.</h2>\r\n<p>Anda dan keluarga dapat berkendara nyaman dan aman dengan All New Nissan Livina karena sudah di lengkapi dengan system pengereman yang mumpuni untuk menunjang safety saat berkendara.</p>\r\n<p><strong>ABS.</strong>&nbsp;Dalam situasi pengereman mendadak, dengan memompa rem lebih cepat untuk menghentikan laju, membantu mencegah roda terkunci, dan memungkinkan Anda untuk mengarahkan kemudi menghindari hambatan yang muncul tiba-tiba.</p>\r\n<p><strong>EBD.</strong>&nbsp;Menyeimbangkan dan menyesuaikan pengeremen pada kekuatan rem belakang pada saat beban ekstra di bagian belakang dari penumpang atau kargo.</p>\r\n<p><strong>Brake Assist.</strong>&nbsp;Dalam situasi pengereman keras atau panik. Tekanan pedal ekstra memberikan kekuatan tambahan untuk berhenti dengan mengaktifkan ABS dan EBD lebih cepat di bawah situasi pengereman darurat</p>\r\n</td>\r\n<td><img class=\"feature-image\" title=\"handling All New Nissan Livina 2020\" src=\"https://www.indomobilnissan.com/application/themes/default/storage/img/vehicles/livina/livinafeatures/livina-feature5.jpg\" alt=\"handling All New Nissan Livina 2020\" width=\"370\" height=\"259\" /></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h2 class=\"featurette-heading\">Harga.&nbsp;</h2>\r\n<p><strong>VE AT Rp. 263.400.000</strong></p>\r\n<p><strong>VL AT Rp.276.050.000</strong></p>\r\n<p><strong>PROMO Khusus VE Nik 2020</strong></p>', 'cover.png', 'Publish', 'Berita', 'All New Nissan Livina', '2021-01-09 13:05:08', '2021-01-17 11:34:04'); -- -------------------------------------------------------- -- -- Struktur dari tabel `galeri` -- CREATE TABLE `galeri` ( `id_galeri` int(11) NOT NULL, `id_user` int(11) NOT NULL, `judul_galeri` varchar(255) NOT NULL, `isi_galeri` text NOT NULL, `website` varchar(255) NOT NULL, `gambar` varchar(255) NOT NULL, `posisi_galeri` varchar(20) NOT NULL, `tanggal_post` datetime NOT NULL, `tanggal` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `galeri` -- INSERT INTO `galeri` (`id_galeri`, `id_user`, `judul_galeri`, `isi_galeri`, `website`, `gambar`, `posisi_galeri`, `tanggal_post`, `tanggal`) VALUES (2, 3, 'Selamat datang di CAMP404', '<p><em>Kami siap melayani anda yang ingin menjadi web developer handal dengan fitur yang kami sediakan</em></p>', 'http://camp404.com', 'website-development-and-design.png', 'Homepage', '2020-11-07 08:43:27', '2020-11-12 10:16:21'), (3, 3, 'Hanya sebulan anda dapat mahir pemograman web', '<p>Dengan fitur kuis, pemberian tugas dan modul yang lengkap</p>', 'http://camp404.com', '3.jpg', 'Homepage', '2020-11-10 04:16:19', '2020-11-12 10:08:32'), (4, 3, 'Pengalaman yang berbeda', '<p>Kami memberikan pengalaman yang berbeda pada Anda dengan layanan yang sudah kami siapkan untuk Anda</p>', 'http://camp404.com', '4.png', 'Homepage', '2020-11-12 11:20:18', '2020-11-12 10:20:18'); -- -------------------------------------------------------- -- -- Struktur dari tabel `kategori` -- CREATE TABLE `kategori` ( `id_kategori` int(11) NOT NULL, `slug_kategori` varchar(255) NOT NULL, `nama_kategori` varchar(255) NOT NULL, `urutan` int(11) DEFAULT NULL, `tanggal` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `kategori` -- INSERT INTO `kategori` (`id_kategori`, `slug_kategori`, `nama_kategori`, `urutan`, `tanggal`) VALUES (7, 'news-release', 'News Release', 1, '2020-12-03 11:02:04'), (9, 'latest-release', 'Latest Release', 2, '2020-12-03 10:55:32'); -- -------------------------------------------------------- -- -- Struktur dari tabel `konfigurasi` -- CREATE TABLE `konfigurasi` ( `id_konfigurasi` int(11) NOT NULL, `id_user` int(11) NOT NULL, `namaweb` varchar(50) NOT NULL, `tagline` varchar(100) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `telepon` varchar(24) DEFAULT NULL, `alamat` varchar(300) DEFAULT NULL, `website` varchar(255) DEFAULT NULL, `deskripsi` varchar(300) DEFAULT NULL, `keywords` varchar(300) DEFAULT NULL, `metatext` text DEFAULT NULL, `map` text DEFAULT NULL, `logo` varchar(255) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, `facebook` varchar(255) DEFAULT NULL, `instagram` varchar(255) DEFAULT NULL, `tanggal` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `konfigurasi` -- INSERT INTO `konfigurasi` (`id_konfigurasi`, `id_user`, `namaweb`, `tagline`, `email`, `telepon`, `alamat`, `website`, `deskripsi`, `keywords`, `metatext`, `map`, `logo`, `icon`, `facebook`, `instagram`, `tanggal`) VALUES (1, 3, 'NISSAN', 'BASSREENNGGGG', 'contact@camp404.com', '08525654684', 'Jl. Jendral Sudirman no.54, Jakarta Pusat, DKI Jakarta\r\n(Tower Indofood lt.7)', 'http://nissan.com', '', '', '', '<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3966.4229016863164!2d106.82023634920962!3d-6.207817295484002!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2e69f40347d39561%3A0xf8ccdaa410244656!2sIndofood%20Tower%2C%20Jl.%20Jend.%20Sudirman%2C%20RT.3%2FRW.3%2C%20Kuningan%2C%20Setia%20Budi%2C%20Kecamatan%20Setiabudi%2C%20Kota%20Jakarta%20Selatan%2C%20Daerah%20Khusus%20Ibukota%20Jakarta%2012910!5e0!3m2!1sid!2sid!4v1605164952332!5m2!1sid!2sid\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0;\" allowfullscreen=\"\" aria-hidden=\"false\" tabindex=\"0\"></iframe>', 'Penguins.jpg', 'icon2.png', 'http://camp414', '', '2021-01-17 08:20:58'); -- -------------------------------------------------------- -- -- Struktur dari tabel `layanan` -- CREATE TABLE `layanan` ( `id_layanan` int(11) NOT NULL, `id_user` int(11) NOT NULL, `slug_layanan` varchar(255) NOT NULL, `judul_layanan` varchar(255) NOT NULL, `isi_layanan` text NOT NULL, `harga` int(11) NOT NULL, `gambar` varchar(255) NOT NULL, `status_layanan` varchar(20) NOT NULL, `keywords` varchar(500) DEFAULT NULL, `tanggal_post` datetime NOT NULL, `tanggal` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `layanan` -- INSERT INTO `layanan` (`id_layanan`, `id_user`, `slug_layanan`, `judul_layanan`, `isi_layanan`, `harga`, `gambar`, `status_layanan`, `keywords`, `tanggal_post`, `tanggal`) VALUES (2, 3, 'web-design', 'Web Design', '<p>Pada kursus web design ini Anda akan belajar membuat dan menggunakan CCS Inline, Internal dan Eksternal.</p>\r\n<p>Anda juga akan diajarkan cara menggunakan Bootstrap dan cara mengintegrasikannya ke website yang sedang anda bangun.</p>\r\n<p>Untuk info lebih lanjut, silahkan kunjungi website resmi kami<br /><br /><a href=\"http://www.camp404.com\" target=\"_blank\" rel=\"noopener\">camp404.com</a></p>', 100000, 'webdesain1.jpg', 'Publish', 'Pada kursus web design ini Anda akan belajar membuat dan menggunakan Bootstrap, CCS Inline, Internal dan Eksternal.', '2020-11-07 03:07:59', '2020-11-12 09:14:25'), (3, 3, 'web-development', 'Web Development', '<p>Pada kursus web development ini Anda akan belajar menggunakan HTML, PHP, CSS, dan Javascript.</p>\r\n<p>Peserta diharapkan dapat aktif bertanya&nbsp; dan mengerjakan studi kasus mandiri yang diberikan dalam setiap sesi. Kursus ini disusun atas 4 sesi/modul dan diharapkan dapat diselesaikan dalam waktu 2-3 minggu.</p>\r\n<p>Tidak diperlukan pengalaman atau pemahaman pemrograman sebelumnya. Anda akan dibimbing mulai dari awal dengan cara yang mudah dipahami.</p>\r\n<p>Untuk info lebih lanjut, silahkan kunjungi website resmi kami di</p>\r\n<p><a href=\"http://www.camp404.com\">camp404.com</a></p>\r\n<p>&nbsp;</p>', 100000, 'png-transparent-web-development-web-design-design-tool-web-design-logo-internet-web-developer.png', 'Publish', 'Pada kursus web development ini Anda akan belajar menggunakan HTML, PHP, CSS, dan Javascript', '2020-11-10 04:34:10', '2020-11-12 08:06:27'), (4, 3, 'framework', 'Framework', '<p>Pada kursus Framework ini Anda akan belajar cara menggunakan Framework Codeigniter dan Laravel</p>\r\n<p><strong>Apa itu Framework?</strong></p>\r\n<p>Framework atau dalam bahasa indonesia dapat diartikan sebagai &ldquo;kerangka kerja&rdquo; merupakan kumpulan dari fungsi-fungsi/prosedur-prosedur dan class-class untuk tujuan tertentu yang sudah siap digunakan sehingga bisa lebih mempermudah dan mempercepat pekerjaan seorang programer, tanpa harus membuat fungsi atau class dari awal.</p>\r\n<p><strong>Alasan mengapa menggunakan Framework</strong></p>\r\n<ul>\r\n<li>Mempercepat dan mempermudah pembangunan sebuah aplikasi web.</li>\r\n<li>Relatif memudahkan dalam proses maintenance karena sudah ada pola tertentu dalam sebuah framework (dengan syarat programmermengikuti pola standar yang ada)</li>\r\n<li>Umumnya framework menyediakan fasilitas-fasilitas yang umum dipakai sehingga kita tidak perlu membangun dari awal (misalnya validasi, ORM, pagination, multiple database, scaffolding, pengaturan session, error handling, dll</li>\r\n<li>Lebih bebas dalam pengembangan jika dibandingkan CMS</li>\r\n</ul>\r\n<p>Untuk info lebih lanjut, silahkan kunjungi website resmi kami<br /><br /><a href=\"http://www.camp404.com\" target=\"_blank\" rel=\"noopener\">camp404.com</a></p>', 100000, 'codeigniter4logo.png', 'Publish', 'Pada kursus Framework ini Anda akan belajar cara menggunakan Framework Codeigniter dan Laravel', '2020-11-10 04:38:01', '2021-01-09 12:11:40'); -- -------------------------------------------------------- -- -- Struktur dari tabel `user` -- CREATE TABLE `user` ( `id_user` int(11) NOT NULL, `nama` varchar(50) NOT NULL, `email` varchar(255) NOT NULL, `username` varchar(32) NOT NULL, `password` varchar(64) NOT NULL, `akses_level` varchar(20) NOT NULL, `tanggal` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `user` -- INSERT INTO `user` (`id_user`, `nama`, `email`, `username`, `password`, `akses_level`, `tanggal`) VALUES (2, 'Budi Budiman', 'budi@gmail.com', 'budi123', '30a96cdbc1205b1ed4ae399350fe8f6d839f32cc', 'User', '2020-11-05 05:27:26'), (3, 'Muhamad Wahyu Alif', 'wahyualief1@gmail.com', 'wahyualif', '19d83bd82585f8e43ebc7c1365ca4d80bdadd7bd', 'Admin', '2020-11-05 07:27:45'); -- -- Indexes for dumped tables -- -- -- Indeks untuk tabel `berita` -- ALTER TABLE `berita` ADD PRIMARY KEY (`id_berita`); -- -- Indeks untuk tabel `galeri` -- ALTER TABLE `galeri` ADD PRIMARY KEY (`id_galeri`); -- -- Indeks untuk tabel `kategori` -- ALTER TABLE `kategori` ADD PRIMARY KEY (`id_kategori`); -- -- Indeks untuk tabel `konfigurasi` -- ALTER TABLE `konfigurasi` ADD PRIMARY KEY (`id_konfigurasi`); -- -- Indeks untuk tabel `layanan` -- ALTER TABLE `layanan` ADD PRIMARY KEY (`id_layanan`); -- -- Indeks untuk tabel `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id_user`), ADD UNIQUE KEY `username` (`username`); -- -- AUTO_INCREMENT untuk tabel yang dibuang -- -- -- AUTO_INCREMENT untuk tabel `berita` -- ALTER TABLE `berita` MODIFY `id_berita` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; -- -- AUTO_INCREMENT untuk tabel `galeri` -- ALTER TABLE `galeri` MODIFY `id_galeri` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `kategori` -- ALTER TABLE `kategori` MODIFY `id_kategori` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT untuk tabel `konfigurasi` -- ALTER TABLE `konfigurasi` MODIFY `id_konfigurasi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT untuk tabel `layanan` -- ALTER TABLE `layanan` MODIFY `id_layanan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT untuk tabel `user` -- ALTER TABLE `user` MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
208.726619
23,747
0.712388
9349699eb35e53bb11248ea28282bdce589086d6
6,618
rs
Rust
src/parse.rs
str4d/minimal-lexical
f6399813f02b7a55a875672c284ef3f69c2a34d6
[ "Apache-2.0", "MIT" ]
10
2020-02-07T07:30:53.000Z
2022-03-31T20:39:21.000Z
src/parse.rs
str4d/minimal-lexical
f6399813f02b7a55a875672c284ef3f69c2a34d6
[ "Apache-2.0", "MIT" ]
12
2020-03-29T23:23:38.000Z
2022-02-07T00:29:30.000Z
src/parse.rs
str4d/minimal-lexical
f6399813f02b7a55a875672c284ef3f69c2a34d6
[ "Apache-2.0", "MIT" ]
3
2021-09-03T22:08:55.000Z
2021-12-12T11:06:25.000Z
//! Parse byte iterators to float. #![doc(hidden)] #[cfg(feature = "compact")] use crate::bellerophon::bellerophon; use crate::extended_float::{extended_to_float, ExtendedFloat}; #[cfg(not(feature = "compact"))] use crate::lemire::lemire; use crate::num::Float; use crate::number::Number; use crate::slow::slow; /// Try to parse the significant digits quickly. /// /// This attempts a very quick parse, to deal with common cases. /// /// * `integer` - Slice containing the integer digits. /// * `fraction` - Slice containing the fraction digits. #[inline] fn parse_number_fast<'a, Iter1, Iter2>( integer: Iter1, fraction: Iter2, exponent: i32, ) -> Option<Number> where Iter1: Iterator<Item = &'a u8>, Iter2: Iterator<Item = &'a u8>, { let mut num = Number::default(); let mut integer_count: usize = 0; let mut fraction_count: usize = 0; for &c in integer { integer_count += 1; let digit = c - b'0'; num.mantissa = num.mantissa.wrapping_mul(10).wrapping_add(digit as u64); } for &c in fraction { fraction_count += 1; let digit = c - b'0'; num.mantissa = num.mantissa.wrapping_mul(10).wrapping_add(digit as u64); } if integer_count + fraction_count <= 19 { // Can't overflow, since must be <= 19. num.exponent = exponent.saturating_sub(fraction_count as i32); Some(num) } else { None } } /// Parse the significant digits of the float and adjust the exponent. /// /// * `integer` - Slice containing the integer digits. /// * `fraction` - Slice containing the fraction digits. #[inline] fn parse_number<'a, Iter1, Iter2>(mut integer: Iter1, mut fraction: Iter2, exponent: i32) -> Number where Iter1: Iterator<Item = &'a u8> + Clone, Iter2: Iterator<Item = &'a u8> + Clone, { // NOTE: for performance, we do this in 2 passes: if let Some(num) = parse_number_fast(integer.clone(), fraction.clone(), exponent) { return num; } // Can only add 19 digits. let mut num = Number::default(); let mut count = 0; while let Some(&c) = integer.next() { count += 1; if count == 20 { // Only the integer digits affect the exponent. num.many_digits = true; num.exponent = exponent.saturating_add(into_i32(1 + integer.count())); return num; } else { let digit = c - b'0'; num.mantissa = num.mantissa * 10 + digit as u64; } } // Skip leading fraction zeros. // This is required otherwise we might have a 0 mantissa and many digits. let mut fraction_count: usize = 0; if count == 0 { for &c in &mut fraction { fraction_count += 1; if c != b'0' { count += 1; let digit = c - b'0'; num.mantissa = num.mantissa * 10 + digit as u64; break; } } } for c in fraction { fraction_count += 1; count += 1; if count == 20 { num.many_digits = true; // This can't wrap, since we have at most 20 digits. // We've adjusted the exponent too high by `fraction_count - 1`. // Note: -1 is due to incrementing this loop iteration, which we // didn't use. num.exponent = exponent.saturating_sub(fraction_count as i32 - 1); return num; } else { let digit = c - b'0'; num.mantissa = num.mantissa * 10 + digit as u64; } } // No truncated digits: easy. // Cannot overflow: <= 20 digits. num.exponent = exponent.saturating_sub(fraction_count as i32); num } /// Parse float from extracted float components. /// /// * `integer` - Cloneable, forward iterator over integer digits. /// * `fraction` - Cloneable, forward iterator over integer digits. /// * `exponent` - Parsed, 32-bit exponent. /// /// # Preconditions /// 1. The integer should not have leading zeros. /// 2. The fraction should not have trailing zeros. /// 3. All bytes in `integer` and `fraction` should be valid digits, /// in the range [`b'0', b'9']. /// /// # Panics /// /// Although passing garbage input will not cause memory safety issues, /// it is very likely to cause a panic with a large number of digits, or /// in debug mode. The big-integer arithmetic without the `alloc` feature /// assumes a maximum, fixed-width input, which assumes at maximum a /// value of `10^(769 + 342)`, or ~4000 bits of storage. Passing in /// nonsensical digits may require up to ~6000 bits of storage, which will /// panic when attempting to add it to the big integer. It is therefore /// up to the caller to validate this input. /// /// We cannot efficiently remove trailing zeros while only accepting a /// forward iterator. pub fn parse_float<'a, F, Iter1, Iter2>(integer: Iter1, fraction: Iter2, exponent: i32) -> F where F: Float, Iter1: Iterator<Item = &'a u8> + Clone, Iter2: Iterator<Item = &'a u8> + Clone, { // Parse the mantissa and attempt the fast and moderate-path algorithms. let num = parse_number(integer.clone(), fraction.clone(), exponent); // Try the fast-path algorithm. if let Some(value) = num.try_fast_path() { return value; } // Now try the moderate path algorithm. let mut fp = moderate_path::<F>(&num); if fp.exp < 0 { // Undo the invalid extended float biasing. fp.exp -= F::INVALID_FP; fp = slow::<F, _, _>(num, fp, integer, fraction); } // Unable to correctly round the float using the fast or moderate algorithms. // Fallback to a slower, but always correct algorithm. If we have // lossy, we can't be here. extended_to_float::<F>(fp) } /// Wrapper for different moderate-path algorithms. /// A return exponent of `-1` indicates an invalid value. #[inline] pub fn moderate_path<F: Float>(num: &Number) -> ExtendedFloat { #[cfg(not(feature = "compact"))] return lemire::<F>(num); #[cfg(feature = "compact")] return bellerophon::<F>(num); } /// Convert usize into i32 without overflow. /// /// This is needed to ensure when adjusting the exponent relative to /// the mantissa we do not overflow for comically-long exponents. #[inline] fn into_i32(value: usize) -> i32 { if value > i32::max_value() as usize { i32::max_value() } else { value as i32 } } // Add digit to mantissa. #[inline] pub fn add_digit(value: u64, digit: u8) -> Option<u64> { value.checked_mul(10)?.checked_add(digit as u64) }
32.762376
99
0.614838
27e4504b0e932b4a2631f1ade6a230646ae408be
3,392
css
CSS
public/css/app.css
kennethaa/Vanvik-IL-Live-and-Stats
8f8309f1bac7487087e99abb83205d87067df3f3
[ "MIT" ]
null
null
null
public/css/app.css
kennethaa/Vanvik-IL-Live-and-Stats
8f8309f1bac7487087e99abb83205d87067df3f3
[ "MIT" ]
null
null
null
public/css/app.css
kennethaa/Vanvik-IL-Live-and-Stats
8f8309f1bac7487087e99abb83205d87067df3f3
[ "MIT" ]
null
null
null
.navbar-static-top { margin-bottom: 20px; } .navbar-inverse { background-color: transparent; } .navbar-static-top { border-width: 0 0 0; } .navbar-inverse .navbar-nav>.active>a, .navbar-inverse .navbar-nav>.active>a:hover, .navbar-inverse .navbar-nav>.active>a:focus { background-color: transparent; } .container-fluid { background: rgba(0, 0, 0, 0.75); min-height: 100%; } .panel { color: #fff; border: none; } .score-panel { background-color: rgba(0, 0, 0, 0.5); } .panel > .panel-heading { color: #fff; background-color: rgba(0, 0, 0, 0.5); font-weight: bold; } .panel > .score { border-bottom: none; } .panel > .score h3 { margin-top: 5px; margin-bottom: 5px; } #hometeam { margin-right: 20px; } #awayteam { margin-left: 20px; } html, body { height:100%; } body { padding-top: 0px; /* body padding for the top */ background: url("../img/bg.jpg"); background-size: cover; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; } /****************************************************** STATS **/ span.assists { width: 28px; } span.matches { background-image: url(../img/icon_matches.png) !important; } span.goals { background-image: url(../img/icon_goals.png) !important; } span.assists { background-image: url(../img/icon_assists.png) !important; } span.points { background-image: url(../img/icon_points.png) !important; } span.stars { background-image: url(../img/icon_stars.png) !important; } .table > thead > tr > th.vertical-middle, .table > tbody > tr > td.vertical-middle { vertical-align: middle; } .match-info-description { width: 25%; } .player-number { width: 10%; } .squad-name { width: 20%; } .stats-name { width: 90%; } .stats-top { width: 10%; } /******************************************************************END OF STATS **/ /****************************************************** LIVE FEED **/ .live-feed-minute, .live-feed-happening { width: 50px; } .live-feed-description { } .live-feed-happening-span { width: 20px; height: 20px; margin-top: 5px; display: inline-block; background-repeat: no-repeat; background-position: center center; } td.live-feed-minute { border-left: 5px solid transparent; } td.live-feed-goal { border-left: 5px solid #77b300 } td.live-feed-yellowcard { border-left: 5px solid #f3eb1b; } td.live-feed-yellowredcard, td.live-feed-redcard { border-left: 5px solid #cc0000; } span.live-feed-comment, span.live-feed-chance, span.live-feed-whistle, span.live-feed-change, span.live-feed-yellowcard, span.live-feed-yellowredcard, span.live-feed-redcard, span.live-feed-goal, span.yellow, span.yellowred, span.red { background-image: url(../img/matchcommentary-sprite.png) !important; } span.live-feed-comment { background-position: left -721px; } span.live-feed-chance { background-position: left -401px; } span.live-feed-whistle { background-position: left -541px; } span.live-feed-change { background-position: left -581px; } span.live-feed-yellowcard, span.yellow { background-position: left -261px; } span.live-feed-yellowredcard, span.yellowred { background-position: left -281px; } span.live-feed-redcard, span.red { background-position: left -301px; } span.live-feed-goal { background-position: left -81px; } /******************************************************************END OF LIVE FEED **/
17.045226
87
0.642689
783a4e545c022491781527bf3aefeb1b8f8a59e0
2,089
swift
Swift
Clouds/Constants/WeatherColorScheme.swift
lfroms/clouds
98bdfb466d9ee74475527b7d9216fc49de1efc6c
[ "MIT" ]
23
2020-06-30T03:46:10.000Z
2022-03-15T12:49:09.000Z
Clouds/Constants/WeatherColorScheme.swift
lfroms/clouds
98bdfb466d9ee74475527b7d9216fc49de1efc6c
[ "MIT" ]
10
2020-06-19T18:09:24.000Z
2022-02-13T21:34:36.000Z
Clouds/Constants/WeatherColorScheme.swift
lfroms/clouds
98bdfb466d9ee74475527b7d9216fc49de1efc6c
[ "MIT" ]
1
2021-04-27T05:42:45.000Z
2021-04-27T05:42:45.000Z
// // WeatherColorScheme.swift // Clouds // // Created by Lukas Romsicki on 2020-04-25. // Copyright © 2020 Lukas Romsicki. All rights reserved. // import CloudsAPI import struct SwiftUI.Color enum WeatherColorScheme: String { typealias Source = CloudsAPI.ColorScheme case clearSkyBlue = "blue_sky" case clearSkyLightBlue = "blue_sky_light" case dryCloudGray = "gray_cloud_dry" case dryCloudLightGray = "gray_cloud_dry_light" case wetCloudGray = "gray_cloud_wet" case wetCloudLightGray = "gray_cloud_wet_light" case stormGray = "gray_storm" case stormLightGray = "gray_storm_light" case nightSkyIndigo = "indigo_sky_night" case nightSkyDeepIndigo = "indigo_sky_deep_night" case particulateBeige = "beige_particulate" case particulateLightBeige = "beige_particulate_light" case liquidBlueGray = "gray_blue_liquid" case liquidLightBlueGray = "gray_blue_liquid_light" case emptyGray = "gray_empty" case emptyLightGray = "gray_empty_light" var color: Color { Color(self.rawValue) } internal typealias ColorSet = (upper: Color, lower: Color) internal static let empty = (upper: emptyLightGray.color, lower: emptyGray.color) private static let schemes: [Source: ColorSet] = [ .clearSky: (upper: clearSkyLightBlue.color, lower: clearSkyBlue.color), .dryCloud: (upper: dryCloudLightGray.color, lower: dryCloudGray.color), .wetCloud: (upper: wetCloudLightGray.color, lower: wetCloudGray.color), .storm: (upper: stormLightGray.color, lower: stormGray.color), .night: (upper: nightSkyIndigo.color, lower: nightSkyDeepIndigo.color), .particulate: (upper: particulateLightBeige.color, lower: particulateBeige.color), .liquid: (upper: liquidLightBlueGray.color, lower: liquidBlueGray.color), .empty: empty ] } extension WeatherColorScheme { static subscript(_ key: Source?) -> ColorSet { guard let key = key else { return empty } return Self.schemes[key, default: empty] } }
30.720588
90
0.705122
5c76444e2f7606cc1388637be315717fbba21740
499
h
C
Proyecto1/Alumno.h
judaaaron/Proyecto1_Juda_EEDD1
971aae90bbd35316ac40e509547a0914649cdf54
[ "MIT" ]
1
2020-08-11T04:34:26.000Z
2020-08-11T04:34:26.000Z
Proyecto1/Alumno.h
judaaaron/Proyecto1_Juda_EEDD1
971aae90bbd35316ac40e509547a0914649cdf54
[ "MIT" ]
null
null
null
Proyecto1/Alumno.h
judaaaron/Proyecto1_Juda_EEDD1
971aae90bbd35316ac40e509547a0914649cdf54
[ "MIT" ]
null
null
null
#ifndef ALUMNO_H #define ALUMNO_H #include "Object.h" #include <iostream> #include<string> #include <sstream> using namespace std; class Alumno: public Object { public: Alumno(); Alumno(string,string); Alumno(string); string getNombre(); string getCuenta(); void setNombre(string); void setCuenta(string); virtual string toString(); virtual bool equals(Object*); virtual ~Alumno(); protected: string nombre,cuenta; }; #endif /* ALUMNO_H */
14.257143
33
0.663327
c11e4204997d187ede2c38b5f5b6a740b2aa6db7
3,645
rs
Rust
substrate/client/db/src/children.rs
ndkazu/guessNumber-vs-Bot
6e756977ce849137c62edb0716df6926583da9b2
[ "Apache-2.0" ]
null
null
null
substrate/client/db/src/children.rs
ndkazu/guessNumber-vs-Bot
6e756977ce849137c62edb0716df6926583da9b2
[ "Apache-2.0" ]
null
null
null
substrate/client/db/src/children.rs
ndkazu/guessNumber-vs-Bot
6e756977ce849137c62edb0716df6926583da9b2
[ "Apache-2.0" ]
null
null
null
// This file is part of Substrate. // Copyright (C) 2019-2021 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. //! Functionality for reading and storing children hashes from db. use crate::DbHash; use codec::{Decode, Encode}; use sp_blockchain; use sp_database::{Database, Transaction}; use std::hash::Hash; /// Returns the hashes of the children blocks of the block with `parent_hash`. pub fn read_children< K: Eq + Hash + Clone + Encode + Decode, V: Eq + Hash + Clone + Encode + Decode, >( db: &dyn Database<DbHash>, column: u32, prefix: &[u8], parent_hash: K, ) -> sp_blockchain::Result<Vec<V>> { let mut buf = prefix.to_vec(); parent_hash.using_encoded(|s| buf.extend(s)); let raw_val_opt = db.get(column, &buf[..]); let raw_val = match raw_val_opt { Some(val) => val, None => return Ok(Vec::new()), }; let children: Vec<V> = match Decode::decode(&mut &raw_val[..]) { Ok(children) => children, Err(_) => return Err(sp_blockchain::Error::Backend("Error decoding children".into())), }; Ok(children) } /// Insert the key-value pair (`parent_hash`, `children_hashes`) in the transaction. /// Any existing value is overwritten upon write. pub fn write_children< K: Eq + Hash + Clone + Encode + Decode, V: Eq + Hash + Clone + Encode + Decode, >( tx: &mut Transaction<DbHash>, column: u32, prefix: &[u8], parent_hash: K, children_hashes: V, ) { let mut key = prefix.to_vec(); parent_hash.using_encoded(|s| key.extend(s)); tx.set_from_vec(column, &key[..], children_hashes.encode()); } /// Prepare transaction to remove the children of `parent_hash`. pub fn remove_children<K: Eq + Hash + Clone + Encode + Decode>( tx: &mut Transaction<DbHash>, column: u32, prefix: &[u8], parent_hash: K, ) { let mut key = prefix.to_vec(); parent_hash.using_encoded(|s| key.extend(s)); tx.remove(column, &key); } #[cfg(test)] mod tests { use super::*; use std::sync::Arc; #[test] fn children_write_read_remove() { const PREFIX: &[u8] = b"children"; let db = Arc::new(sp_database::MemDb::default()); let mut tx = Transaction::new(); let mut children1 = Vec::new(); children1.push(1_3); children1.push(1_5); write_children(&mut tx, 0, PREFIX, 1_1, children1); let mut children2 = Vec::new(); children2.push(1_4); children2.push(1_6); write_children(&mut tx, 0, PREFIX, 1_2, children2); db.commit(tx.clone()).unwrap(); let r1: Vec<u32> = read_children(&*db, 0, PREFIX, 1_1).expect("(1) Getting r1 failed"); let r2: Vec<u32> = read_children(&*db, 0, PREFIX, 1_2).expect("(1) Getting r2 failed"); assert_eq!(r1, vec![1_3, 1_5]); assert_eq!(r2, vec![1_4, 1_6]); remove_children(&mut tx, 0, PREFIX, 1_2); db.commit(tx).unwrap(); let r1: Vec<u32> = read_children(&*db, 0, PREFIX, 1_1).expect("(2) Getting r1 failed"); let r2: Vec<u32> = read_children(&*db, 0, PREFIX, 1_2).expect("(2) Getting r2 failed"); assert_eq!(r1, vec![1_3, 1_5]); assert_eq!(r2.len(), 0); } }
29.395161
89
0.681207
13e6838fb87bf7ebd8fa8bbbc23d298c9d080a15
1,437
swift
Swift
Tests/quelboTests/Processing/Factories/ZilProperty/GlobalsTests.swift
samadhiBot/Quelbo
5cc95ccc86a82c9141451b25255758dacb003e8d
[ "MIT" ]
null
null
null
Tests/quelboTests/Processing/Factories/ZilProperty/GlobalsTests.swift
samadhiBot/Quelbo
5cc95ccc86a82c9141451b25255758dacb003e8d
[ "MIT" ]
null
null
null
Tests/quelboTests/Processing/Factories/ZilProperty/GlobalsTests.swift
samadhiBot/Quelbo
5cc95ccc86a82c9141451b25255758dacb003e8d
[ "MIT" ]
null
null
null
// // GlobalsTests.swift // Quelbo // // Created by Chris Sessions on 4/16/22. // import CustomDump import XCTest @testable import quelbo final class GlobalsTests: QuelboTests { let factory = Factories.Globals.self func testFindFactory() throws { AssertSameFactory(factory, try Game.zilPropertyFactories.find("GLOBAL")) } func testGlobals() throws { let symbol = try factory.init([ .atom("WELL-HOUSE"), .atom("STREAM"), .atom("ROAD"), .atom("FOREST") ]).process() XCTAssertNoDifference(symbol, Symbol( id: "globals", code: """ globals: [ wellHouse, stream, road, forest ] """, type: .array(.object), children: [ Symbol("wellHouse", type: .object), Symbol("stream", type: .object), Symbol("road", type: .object), Symbol("forest", type: .object), ] )) } func testEmptyThrows() throws { XCTAssertThrowsError( try factory.init([ ]).process() ) } func testInvalidTypeThrows() throws { XCTAssertThrowsError( try factory.init([ .string("42"), ]).process() ) } }
23.177419
80
0.47112
1410385944be37a6f95a08f35a52c92fbfc6716d
459
css
CSS
www/assets/styles/reset.css
FridayIcecream/Shaffliette
73aafd709d5eda898fea73444b123070c9e07a44
[ "BSD-2-Clause" ]
1
2018-02-28T09:46:50.000Z
2018-02-28T09:46:50.000Z
www/assets/styles/reset.css
FridayIcecream/Shaffliette
73aafd709d5eda898fea73444b123070c9e07a44
[ "BSD-2-Clause" ]
6
2018-05-25T16:26:12.000Z
2018-05-29T14:04:04.000Z
www/assets/styles/reset.css
moemoesoft/Shaffliette
73aafd709d5eda898fea73444b123070c9e07a44
[ "BSD-2-Clause" ]
1
2018-05-13T18:03:03.000Z
2018-05-13T18:03:03.000Z
#shaffl-image-view * { transform: translate3d(0, 0, 0); /* stupid css hack because hardware acceleration is shit */ } body { -webkit-tap-highlight-color: transparent; user-select: none; margin: 0; font-family: Segoe UI Light; background: #efefef; height: 100vh; width: 100vw; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow: hidden; } p { margin: 0; color: #efefef; } footer { z-index: 999; }
19.125
93
0.697168
c299bbbf7ad2133777602f74ffc69089e458f1fd
1,891
sql
SQL
api/db/migrations/00005_create_settings_table.up.sql
elkrammer/kegger
13f1c15565463890219dc1f6722e506cba57d951
[ "MIT" ]
1
2022-03-01T06:32:13.000Z
2022-03-01T06:32:13.000Z
api/db/migrations/00005_create_settings_table.up.sql
elkrammer/kegger
13f1c15565463890219dc1f6722e506cba57d951
[ "MIT" ]
3
2020-07-19T17:22:00.000Z
2021-09-04T12:42:13.000Z
api/db/migrations/00005_create_settings_table.up.sql
elkrammer/kegger
13f1c15565463890219dc1f6722e506cba57d951
[ "MIT" ]
null
null
null
CREATE TABLE IF NOT EXISTS settings ( name VARCHAR (255) NULL, value VARCHAR (255) NULL, description VARCHAR (255) NULL, CONSTRAINT settings_pkey PRIMARY KEY (name) ); INSERT INTO public.settings ("name", value, description) VALUES('event_name', 'Kegger''s Bash', 'Event Name'); INSERT INTO public.settings ("name", value, description) VALUES('event_location', '1180 6th Ave, New York, NY 10036, United States', 'Event Location'); INSERT INTO public.settings ("name", value, description) VALUES('event_date', '2020-11-19 14:00:00.000', 'Event Date'); INSERT INTO public.settings ("name", value, description) VALUES('dress_code', 'Casual', 'Dress Code'); INSERT INTO public.settings ("name", value, description) VALUES('groom_name', 'Fat Mike', 'Groom''s Name'); INSERT INTO public.settings ("name", value, description) VALUES('bride_name', 'Beer', 'Bride''s Name'); -- Invite Settings INSERT INTO public.settings ("name", value, description) VALUES('invite_image_en', '/uploads/invite_en.jpg', 'English Invitation Image Path'); INSERT INTO public.settings ("name", value, description) VALUES('invite_image_es', '/uploads/invite_es.jpg', 'Spanish Invitation Image Path'); INSERT INTO public.settings ("name", value, description) VALUES('signature_image', '/uploads/signature.png', 'Signature Image Path'); -- App Settings INSERT INTO public.settings ("name", value, description) VALUES('wedding_website_url', 'http://127.0.0.1:8081', 'Wedding Website URL'); INSERT INTO public.settings ("name", value, description) VALUES('kegger_frontend_url', 'http://127.0.0.1:8080', 'Kegger Frontend URL'); INSERT INTO public.settings ("name", value, description) VALUES('kegger_api_url', 'http://127.0.0.1:4040', 'Kegger API URL'); INSERT INTO public.settings ("name", value, description) VALUES('time_zone', 'America/Toronto', 'Time zone where the event will take place');
30.5
94
0.728715
127e265841c7879bb891017e309a7e39e7272415
767
h
C
common.h
homma/krc
0fdefc15bb97ed4692544a03e7d7b22c9122f662
[ "BSD-2-Clause" ]
1
2019-12-27T13:29:02.000Z
2019-12-27T13:29:02.000Z
common.h
homma/krc
0fdefc15bb97ed4692544a03e7d7b22c9122f662
[ "BSD-2-Clause" ]
null
null
null
common.h
homma/krc
0fdefc15bb97ed4692544a03e7d7b22c9122f662
[ "BSD-2-Clause" ]
1
2019-12-27T13:29:04.000Z
2019-12-27T13:29:04.000Z
// common.h: common definitions #ifndef COMMON_H #include <stdint.h> // for int64_t #include <inttypes.h> // for PRId64 #include <limits.h> // for __WORDSIZE #include <stdbool.h> // for bool, true, false #if __WORDSIZE == 64 // type for machine words, used for all integer variables. // 64-bit value. typedef int64_t word; // printf/scanf format to use with words #define W PRId64 #else // 32-bit value. typedef int word; #define W "d" #endif // trap broken compiler versions here, as it is included by everything // definitely doesn't work with gcc-4.9.[012] #if __GNUC__ == 4 && __GNUC_MINOR__ == 9 // && __GNUC_PATCHLEVEL__ < 3 # error "KRC is broken when compiled with GCC 4.9. Earlier GCCs, clang and TinyC work.". #endif #define COMMON_H #endif
21.305556
88
0.704042