variables

PHP Variable - Multiply pages

ε祈祈猫儿з 提交于 2020-01-06 07:26:40
问题 I have a functions.php page, I have included in ALL my other php pages. What I want is a function in my functions.php page, I can use in all the other pages. I have tried this: function getSetting() { $r=mysql_query("SELECT * FROM settings"); if(mysql_num_rows($r) == 0) return false; else $sdata=mysql_fetch_assoc($r); return $sdata; } The thing I want to, I want to get the data from the row next to the name in the following picture: http://awesomescreenshot.com/0bci8x472 Example: If I write

How to add an interator number to a variable name?

南笙酒味 提交于 2020-01-06 06:58:16
问题 In my program i'm currently working on programmatically adding a variety of form objects in C#. For example i'm trying to create a certain group of panels, which contain the data I wish to show. When loading the form I have a file which contains all of the data I wish to load in, the loading itself works fine but when loading I need to create a variety of form labels, panels and images to display all of the necessary data and as such I need to make these panels and labels all with a seperate

How to add an interator number to a variable name?

北城以北 提交于 2020-01-06 06:58:03
问题 In my program i'm currently working on programmatically adding a variety of form objects in C#. For example i'm trying to create a certain group of panels, which contain the data I wish to show. When loading the form I have a file which contains all of the data I wish to load in, the loading itself works fine but when loading I need to create a variety of form labels, panels and images to display all of the necessary data and as such I need to make these panels and labels all with a seperate

Displaying the “libraried” instances of prediefined strings within a file in CMD

半城伤御伤魂 提交于 2020-01-06 06:37:08
问题 All commands must be performed in Windows Command Prompt I have a file data.txt which has several strings in it: gargonxx**stringX**moregargon gargonargongargongargon gargon**stringZ**xxgargonxxxx and for this data file, I want to create a "library" file: stringX = informationx stringY = informationy stringZ = informationz then create variables in CMD out of the "information" shown in the "library" file, ONLY of the instances in the data.txt file that match with the library file. varx =

Link or button sets a variable, then calls the script

谁说胖子不能爱 提交于 2020-01-06 06:24:27
问题 I have a script that plays a video in a Modal when a thumbnail gets clicked. This only works with the first video mentioned in the html, so I'm trying to use js to grab the particular video whos thumbnail is clicked on. I have set up a variable in the js called vidcode, and gave it a value of the first video's address (rLdpnu2dDUY) or whatever it's called. I then set up a value 'start' for the link part before, and 'end' for the link part after. Now I have "showVideo = start + vidcode + end"

How to use user input in prolog to search

有些话、适合烂在心里 提交于 2020-01-06 05:50:29
问题 hello i want to be able to get the user input then store it and use in in my code. body(mercury, 36, small, none, none). body(venus, 67, small, atmosphere, none). body(earth, 93, small, atmosphere, none). body(moon, 93, small, none, none). body(mars, 141, small, atmosphere, none). body(jupiter, 489, large, atmosphere, rings). miles(Body,Miles):-write('Enter the Goal State:'),nl, read(X),nl, body(Body, Miles, _, _, _); Miles > X. 回答1: i switched to GNU prolog firstly which helped. miles(Body

How to refer to a javascript variable in a value field?

家住魔仙堡 提交于 2020-01-06 05:49:11
问题 I'd like to refer to a variable ("special") in field later in the same script. I've gotten the variable to display with alert boxes and document.write, but don't now how to make to apply its value to the value field in var special=(10000-health); var health=(100); <input style="background:#FF7777;" readonly="readonly" type="text" value="special" id="special" /> this just writes "special" to the box, when I would like the value instead. 回答1: You have to set the value explicitly: document

access class variable in ruby

╄→尐↘猪︶ㄣ 提交于 2020-01-06 05:41:30
问题 Why class variable in ruby does not behave like static variable, how can I access it simply by doing Mytest.value, instead of MyTest.new.value? class MyTest @@value=0 def value @@value end end puts MyTest.new.value 回答1: You want something like class MyTest @@value = 0 def self.value @@value end end The self makes it a class method, which the class calls directly. 回答2: [EDIT] Read comments to know why not doing this. class MyTest @value=0 class << self attr_accessor :value end end Instead, if

Variable assignment in JavaScript

≯℡__Kan透↙ 提交于 2020-01-06 05:33:36
问题 I have a js function I want to assign a variable to a variable my variable is in a forloop I have two variables ie; var spcd_1= "http://www.colbridge.com"; var spcd_2 = "http://www.google.com"; below is my js function function openNewWindow(spcd) { //alert("hello"); var tt = spcd; alert(tt); var i=0; var spcd_1= "http://www.colbridge.com"; var spcd_2 = "http://www.google.com"; for(i=1;i<3;i++) { var theurl="'spcd_'+i"; popupWin = window.open(theurl, '_blank', 'menubar, toolbar, location,

RobotFramework - Run Tests on different environments

怎甘沉沦 提交于 2020-01-06 05:27:27
问题 I need to run specific tests for specific environments QA, Dev, Test etc., I have put a Tag on different tests i want to run on different, I am using AppiumLibrary as I am working on a mobile device, I was thinking to use a text file with all variables i need to execute for specific enviroments something like this. --variable Env:http://example.test.com:1111 --variable remoteUrl:http://127.0.0.1:123/web/hub --variable platformVersion:8.0 --variable platformName:Android --variable deviceName