src

Gulp 搭建前端非SPA 项目

≯℡__Kan透↙ 提交于 2019-12-16 09:37:12
起因:需要搭建一个自动打包处理 sass / js (es6),自动监听文件变化时浏览器自动刷新的开发环境 先放 gulpfile.js 文件,其他的详细配置稍后再介绍 const { src, dest, parallel,series, watch } = require('gulp'); const sass = require('gulp-sass'); const less = require('gulp-less'); const minifyCSS = require('gulp-csso'); const concat = require('gulp-concat'); const babel = require('gulp-babel'); const autoprefixer = require('gulp-autoprefixer') const browserSync = require('browser-sync').create() sass.compiler = require('node-sass'); // Static server async function serve() { await browserSync.init( { server: { baseDir: './build', } } ) } // html 复制 function

input src data from json

ぐ巨炮叔叔 提交于 2019-12-13 11:07:36
问题 I got a very similar question here: jQuery progressbar with ajax request to json Can you help me here with a solution? I try to get the path out of a *.json file and use it for an "input image field" with jquery. HTML <input id="pic_1" type="image" src="<!-- what to do here? -->" /> JS $(function() { $.ajax({ dataType:"json", url: test.json, success: <!-- what to do here? -->, }); }); test.json { "pic_1":"img/test.png" } would be glad for similar solution, due to jQuery progressbar with ajax

Refresh Javascript Src

99封情书 提交于 2019-12-13 09:35:34
问题 How to refresh your result when put you search any keywords. If I use innerHTML it can update the keywords that I find but when use script src i doesnt work, it only work once. This is my coding <html> <head> <title>Google Search API</title> </head> <body> <div id="box"> <textarea id="myTextarea"></textarea> <button type="button" id="mySubmit" onclick="myFunction()" >Search</button> <p id="demo"></p> <div id="content"> </div> <script id="searchme"></script> <script> function myFunction() {

I have an external executable jar file that I wish to edit the java files in it with Eclipse

混江龙づ霸主 提交于 2019-12-13 04:23:53
问题 But when I add the external jar file to a project it doesn't put the java files in the src. What do I do? 回答1: Jar files are usually a compiled form of your java classes. The source CAN be included with the jar, but it rarely is. So instead of the expected ".java" files, you'll see ".class" files, which are compiled forms of your code. If you want to edit the files, you have a couple of options Look for the source elsewhere This is your best bet really. If its an open source project, look for

Paths for images using Apache with Windows

北慕城南 提交于 2019-12-13 03:54:20
问题 I have a problem with links testing locally using Apache with Windows. The final links have the following format: file:///C:/Documents and Settings/USUARIO/My Documents/xampp/htdocs/my_website/images/january/my_image.jpg The images do not show. However, if I directly copy the src from the img tag and paste it into the browser (Firefox), the image shows up. I generate the links using the following code: I define the images directory using: define(IMAGE_DIR, dirname(__FILE__).'/images/'); Then

PHP get image src

别说谁变了你拦得住时间么 提交于 2019-12-13 03:33:40
问题 $variable = '<img src="http://www.gravatar.com/avatar/66ce1f26a725b2e063d128457c20eda1?s=32&d=identicon&r=PG" height="32" width="32" alt=""/>'; How to get src of this image? Like: $src = 'http://www.gravatar.com/avatar/66ce1f26a725b2e063d128457c20eda1?s=32&d=identicon&r=PG'; Thanks. 回答1: You can use an html parser for this. See this one: http://simplehtmldom.sourceforge.net/ (I hope this works for nodes, not just for entire pages). 回答2: use regex preg_match( '@src="([^"]+)"@' , $variable ,

Symlink node_modules for files outside src

拥有回忆 提交于 2019-12-12 19:30:58
问题 In my project I use a JSON file as a database (which is currently stored in local on my computer). It is modified by Node.js and some pieces of information are rendered with React in an import : import Data from 'myPath/appData.json'; I cannot have my database in the src folder because the build is static, and my databse must be dynamic. I get this error : Failed to compile. ./src/components/Ligne1.jsx Module not found: You attempted to import myPath/appData.json which falls outside of the

javascript dynamically change the location of image src - NO JQuery

空扰寡人 提交于 2019-12-12 17:22:55
问题 I have several pages set up in the same way. Each page has about 10 to 15 images and if you click them, the image changes and becomes unclickable. The code I have for this is: function ToggleOnclick(elID) { var el = document.getElementById(elID); var loc = document.getElementsByClassName("wrapper"); if (el.onclick) { // Disable the onclick el._onclick = el.onclick; el.onclick = null; el.src = loc.id + "/" + el.name + "Clicked.png"; } } The html for the images is: .... <div class="content">

Gradle + Android Annotations + Merged Manifest = “Could not find the AndroidManifest”

我怕爱的太早我们不能终老 提交于 2019-12-12 13:24:55
问题 I seem to be running into a problem with Android Annotations finding my Android Manifest when I'm using different manifests for different buildTypes. The error I get is: java: error: Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.IllegalStateException: Could not find the AndroidManifest.xml file, going up from path [/Users/jabdulius/Documents/Dropbox/workspace/<app-name>/aa-gen] found using dummy file [file:///Users/jabdulius/Documents

Change iframe src onchange of dropdown value

半腔热情 提交于 2019-12-12 08:55:04
问题 I am able to change the source of an iframe very easily with a "button" click. But no matter what I try, I can't make the same happen with the use of a dropdown. This works: <html> <body> <a href="google.com" target="iframe">google</a> <iframe name="iframe" src="yahoo.ca"></iframe> </body> </html> But this does not: <html> <body> <form name="change"> <select name="options" target="iframe"> <option><a href="google.com" target="iframe">google</a></option> </select> </form> <iframe name="iframe"