Vote count: 0 I have bought a script with a boostrap base. The folder looks like this inside: http://i.epvpimg.com/tdadb.png Should I just put it in the Public_HTML folder and declare it on a webpage? I want to run it on one specific webpage, it is basicly a form where you can select different options. Thank you very much! I am a begier so a detailed answer that works will instantly get upvoted and declared as answer. Thanks =) asked 2 mins agoOliver Beck This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I am trying to use the if condition in shell script to check whether some files (starting with similar names) exist or not in the working directory. My problem is I have more than one file viz. "A1.txt", "A2.txt", "A3.txt" etc in my working directory. Now my question is, is there a way to check for files with the part of the string of the file name. So if the script finds at least one file with name starting with "A" then it prints that file found of there is no file with file name starting with "A" it does not print so. My attempt is the following : if [ -f "A*.txt" ]; then echo "Files exist." else echo "Files do not exist" fi But it does not work and retus "too many arguments...
ادامه مطلبVote count: 0 This is the script on which I'd like to add some CSS : // Download URLs if ( $show_download_links && $_product->exists() && $_product->is_downloadable() ) { $download_files = $order->get_item_downloads( $item ); $i = 0; foreach ( $download_files as $download_id => $file ) { $i++; if ( count( $download_files ) > 1 ) { $prefix = sprintf( __( 'Download %d', 'woocommerce' ), $i ); } elseif ( $i == 1 ) { $prefix = __( 'Download', 'woocommerce' ); } echo "n" . $prefix . '(' . esc_html( $file['name'] ) . '): ' . esc_url( $file['download_url'] ); } } // allow other plugins to add additional product information here do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order )...
ادامه مطلبVote count: 0 I am using the following Python script: import numpy as np import matplotlib.pyplot as plt import nibabel import os def collapse_probtrack_results(waytotal_file, matrix_file): with open(waytotal_file) as f: waytotal = int(f.read()) data = nibabel.load(matrix_file).get_data() collapsed = data.sum(axis=0) / waytotal * 100. retu collapsed matrix_template = 'results/{roi}.nii.gz.probtrackx2/matrix_seeds_to_all_targets.nii.gz' processed_seed_list = [s.replace('.nii.gz','').replace('label/', '') for s in open('/home/salvatore/tirocinio/aal_rois_diff_space/aal.txt').read().split('n') if s] N = len(processed_seed_list) co = np.zeros((N, N)) rois=[] idx = 0 for roi in processed_seed_lis...
ادامه مطلبVote count: 0 I want to have a "facebook share" link or button on a web page. The idea is to to share a link and a brief description, identical to twiter. No image or title of page is needed In the past, the following link worked:- "http://www.facebook.com/sharer.php?u=" + complete_url + message Now, facebook ignores the message and it discards the complete url link. Instead it only displays the title of the homepage. I found this answer on stack overflow:- Make my own custom Facebook share button. Having tried it (the script below) - I get the error: 'FB' is undefined I'd be grateful if you could tell me:- 1. what am I doing wrong? 2. do we have to download the sdk.js from facebook server e...
ادامه مطلبVote count: 0 I was trying to figure out the video player size & whether the content was auto-played or not and log this information. I need to choose between using a userscript via greasemonkey that does this or creating a firefox extension. Can someone tell me the differences as well as limitations of the two? asked 2 mins agoDubby This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 There are three parts to this. The objective is to pass an input file to a C-Programm, have it run through the input, create an output and compare that to the correct_output.data. Here is the Shell I was given: #!/bin/sh input_file="input.data" output_file="output.data" correct_output_file="output_correct.data" while read line do echo $line | ./Prak1A3 done < $input_file > output.tmp sed -i 's/Geben Sie einen Satz ein: Eingegeben: //g' output.tmp cat output.tmp > $output_file rm output.tmp diff -u -s $output_file $correct_output_file Here is the C-Programm #include #include int main(void) { //char * input="this is a test sentence"; //int index; int charCount; int wordCount; cha...
ادامه مطلبVote count: 0 Trying to run jsHint via script. package.json { "name": "projectName", "version": "0.1.0", "devDependencies": { "jshint": "^2.9.1" }, "scripts": { "lint": "jshint src" } } And get the following error: npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lint" npm ERR! node v4.2.4 npm ERR! npm v2.14.12 npm ERR! code ELIFECYCLE npm ERR! projectName@0.1.0 lint: `jshint src` npm ERR! Exit status 2 asked 2 mins agoDan Klos 1 Answer Vote count: 0 I resolved this adding "|| true" to the lint line of the script. See below: { "name": "projectName", "version": "0.1.0", "devDependencies": { "jshint": "^2.9.1" }, "scripts": { "lint": "jshint src || true" }...
ادامه مطلبVote count: 0 I am trying to have the google forms on our website auto-notify us when a user completes the form and then retu the data that they entered in a concise email. I do not like the way google notifies you it simply links to you the form to view the response. I searched online and found this code: function sendFormByEmailPrayer(e) { // Remember to replace XYZ with your own email address var email = "admin@communionchapelefca.org"; // Optional but change the following variable // to have a custom subject for Google Docs emails var subject = "Prayer Form Form Submitted"; // The variable e holds all the form values in an array. // Loop through the array and append values to the body. v...
ادامه مطلبVote count: 0 Hello i m trying to pick a value from jQuery Chosed Dropdown using codeception scripting, following is dev code United States Please select country United States Canada United Kingdom Ireland South Africa Turkey Although i am able to select it using xpath via following;(United Stated in this case) $I->click(['css' => 'div#Merchantserviceproviders_country_chosen']); $I->click(['xpath' => '//div[@id="Merchantserviceproviders_country_chosen"]/div/ul/li[2]']); But the issue is that the selection is through position of the value in the list, so as if any new value(country is added) i will not be able to select it until i know its placement. I want to know how would i be able to sele...
ادامه مطلبVote count: 0 hello i want to load script if there is google chrome as browser if(!!window.chrome && !!window.chrome.webstore){ window.location = '#'; } i have that script it redirects if there is chrome . i want something like that i want to load script or html if there is chrome or load different css if there isnot chrome i want to load another script example i want to load popup if there is chrome and if there is not chrome i want to load popup #2 pls help thanks asked 2 mins agoDavid Tsilosani This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I'm new in python but I want to compare 2 folders with the same file structure for different file content.Example:Dir1 content: a.a b.b c.cDir2 content: a.a b.b c.ca.a content in Dir1: 123asdfghjkla.a content in Dir2: 213asdfghjkl So I want to compare in those 2 Dirs the files with the same name 1 by 1 by skipping the first 3 character and display the differing files. I have checked the filecmp.dircmp() function but could you help me to extend the below script to skip the checking of first 3 byte during file comparation? #!/usr/bin/env python import filecmp import os directory1 = os.path.join("./","Dir1") directory2 = os.path.join("./","Dir2") cmp = filecmp.dircmp(directory1,di...
ادامه مطلبVote count: 0 I would like to import all csv files in a directory into MySQL using a batch script. The data within the csv files is enclosed by quotes, which I attempt to wa MySQL about during the data load (see script below). My data load command is failing due to a " character. I need help understanding how to escape the " character so that this script successfully completes: @ECHO off setlocal enabledelayedexpansion FOR %%f IN ("*.csv") DO ( set myfile=!C:\Users\xxx\%%f! mysql -e "load data local infile '"!myfile!"' into table db.test fields terminated by ',' enclosed by '"' lines terminated by '' IGNORE 1 LINES (@vtime,@vtag,@vvalue) SET eventID=null,time=STR_TO_DATE(@vtime, '%c/%e/%Y %l...
ادامه مطلبVote count: -1 Is it possible to emulate Java's method overloading in JavaScript? For example, I would like to have two constructor() method in my myclass() JS class. The first one creates a window with width & height and the second, with width, height, positionX & positionY properties. If possible write the code as pure-js. asked 2 mins agogabriel garcia This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I am trying to create a clickable donut chart with raphael.js. By clicking on a shape the window should scroll to an anchor. I worked it out to open a new window but I not able to run it fully as required. Example asked 4 mins agoAndre Boeck This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 Can I create a pdf file using javascript? If yes, how can I do it? I need help and guide. I really appreciate for any help. asked 1 min agoD. Clara T This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I have created a new Rails 4 project and I am trying to load an exteal JavaScript file in my HTML file. I have placed the JavaScript file in the /assets/javascripts directory and included the file in my HTML file. My HTML file: My JavaScript file: document.write("test"); I do not see any errors in my web browser console when loading the website. I am pretty sure I put the JavaScript file in to correct directory but the file will not run. Does Rails require something for exteal JavaScript files to work properly? I have also tried defining a method in the JavaScript file and calling it within a tag but I get a "Uncaught ReferenceError: methodname is not defined". asked 2 mins ago...
ادامه مطلبVote count: 0 I am developing context menu add-on for Firefox. I am trying to get the selectedText and validate if it is a number. If it is a number i am using that number value to process further. But, i got stuck at a point where i am trying to replace [(,)] using regex in javascript replace method. Following is the code which fails to map any number starting/ending with ( or ): var menuItemLRG = contextMenu.Item({ label: "LRG", data: "http://myurl/&val=:", contentScript: 'self.on("click", function (node, data) {' + ' var selectedText = window.getSelection().toString();' + ' var formattedText1 = selectedText.trim();' + ' var formattedText2 = formattedText1.replace(/^[,[]()]*/g,"");' + ' va...
ادامه مطلبVote count: 0 I want to make Generator class as a parent, and a number of child. So i define default constructor and parent function like this: function Generator (){ this._startIndex=0; this._endIndex=61; alert("Generator Ready " + this._startIndex + " " + this._endIndex); } Generator.prototype.make=function() { alert (this._startIndex); } var worker= new Generator(); document.getElementById("but0").addEventListener("click", worker.make); but in this case "this" is a Button, and this._startIndex is undefined. In case, i call function like: document.getElementById("but0").addEventListener("click", worker.make(warker._startIndex)); The function called not on click, but onload. I shure, this i...
ادامه مطلبVote count: 0 I'm a javascript newbie trying to hack on a rails website that somebody else created. What I want to do is open the javascript console and access variables that have been defined/created in the window.onload function. They must be hanging around in some fashion because I can interact with them via mouse clicks? To make this concrete, I want to be able to go this site http://project-pavement.herokuapp.com/map/nyc in a web browser, pop open the javascript console, and do things like add a marker to the underlying Leaflet map a la http://leafletjs.com/examples/quick-start.html. asked 2 mins agowzlwardance This entry passed through the Full-Text RSS service - if this is your conten...
ادامه مطلب