Posts

Showing posts from March, 2014

C#: Passing null to overloaded method - which method is called? -

say have 2 overloaded versions of c# method: void method( typea ) { } void method( typeb b ) { } i call method with: method( null ); which overload of method called? can ensure particular overload called? it depends on typea , typeb . if 1 of them applicable (e.g. there no conversion null typeb because it's value type typea reference type) call made applicable one. otherwise depends on relationship between typea , typeb . if there implicit conversion typea typeb no implicit conversion typeb typea overload using typea used. if there implicit conversion typeb typea no implicit conversion typea typeb overload using typeb used. otherwise, call ambiguous , fail compile. see section 7.4.3.4 of c# 3.0 spec detailed rules. here's example of not being ambiguous. here typeb derives typea , means there's implicit conversion typeb typea , not vice versa. overload using typeb used: using system; class typea {} class typeb : typea {...

powershell - Create azure website programatically in C# -

i want create/update websites/cloud services in azure in c#. objective deploy website/cloud service in azure without user intervention. can please me resolve below queries? can manage azure websites/cloud services using c# code? if yes how (any library/api/nuget package)? if not possible in c#, other options achieve this? read webdeploy(msdeploy), powershell can work not sure 1 best in scenario , how use them. this depends on scenario. if have got system run powershell script from, might option ( https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/ ) use cross platform command line tools script deployment / web app creation. there different other options, continous deployment web app. can example connect github repo existing web app , deploy repository. the c# library looking should one: https://github.com/azure/azure-sdk-for-net/tree/master/src/resourcemanagement/website

xml - Button not shown in Android layout -

i trying create layout edittext , textview , 2 buttons . here xml layout: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="25sp" > <edittext android:id="@+id/etcommands" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="type command.." android:inputtype="textpassword" /> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightsum="20" > <button android:id="@+id/bresults" ...

json downloaddata model building C# -

i try implementation of final i want every data var jsresult = (jobject)jsonconvert.deserializeobject(response); (int = 0; <= 19; i++) { string mediaid = (string)jsresult["data"][i]["id"]; string commenturl = "https://api.instagram.com/v1/media/" + mediaid + "/comments?access_token=" + accesstoken + ""; var commentjson = webclient.downloaddata(commenturl); var commentresponse = system.text.encoding.default.getstring(commentjson); session.add("commentresponse", commentresponse); } var commentdata = jsonconvert.deserializeobject<comment.rootobject>(session["commentresponse"].tostring());

javascript - Angular Intellisense not working in Visual Studio 2015 Community -

i've done thought possible make angular js intellisense works in vs 2015 community, no success. including http://madskristensen.net/post/the-story-behind-_referencesjs _reference.js, visual studio references (web implicit)... tried them both! am missing or it's impossible have angular intellisense in vs 2015 community? thanks our help... screenshot

Excel - calculating the percentage of individuals that return over consecutive months -

Image
i have spreadsheet of patients collecting medication on several months. patients grouped according month when first collected medication. for each patient group, want calculate percentage of patients return during each of following months collect medication again. have inserted example of in spreadsheet, highlighted in yellow. how can automate calculation in excel? so if "cell s3 calculated c3/c2; cell s4 c4/c2 , on." the formula need =c3/c$2 put in s3 , copy , paste cells below s3. explanation by default addresses in excel relative c3 means"this row, column -16" if copy down relative address stay same. fix address can use dollar symbols (highlight address & press f4 on keyboard) fix actual cell c2 not relative address. more info

vba - How to show print dialog box and have preview display on same screen -

i trying emulate ctrl-p in excel 2013 print dialog box shown on left print preview on right. (although preview displays, have click "show print preview" first - can't seem find way force preview show every time). i have tried following: application.dialogs(xldialogprint).show this shows old style dialog box need click "preview" button activesheet.printpreview this shows preview doesn't allow printer changed same screen something this? option explicit sub example() application.commandbars.executemso ("printpreviewandprint") end sub commandbars.executemso method (link) is useful method in cases there no object model particular command.

c - error: variable-sized object may not be initialized. Unsure why? -

i attempting fill deck of cards using c (i new c) keep getting error, error: variable-sized object may not initialized line char **deck[r] = values[v], suits[d], colour[s]; this full code. attempting fill deck of cards , store deck in array deck[52] using colour, suit , value arrays each card in deck. if logic wrong how can put suit , face , colour deck in order fill deck of cards? #include<stdio.h> #include<stdlib.h> #include<time.h> typedef unsigned char card; static char *suits[] = { "hearts", "diamonds", "clubs", "spades" }; static char *values[] = { "ace", "two", "three", "four", "five", "six", \ "seven", "eight", "nine", "ten", "jack", \ "queen", "king" }; static char *colour[] = { "black", "red" }; void filldeck(card deck[52]); int main() { fi...

Python Array with string AND integer indices -

i'm trying create array uses strings , integers indices. ademo[int]["string"] = "test" is possible , if yes how declared? a data structure can indexed keys (like strings, or else) called associative array . built-in python implementation of called dict (dictionary) . can create dict using curly braces syntax: ademo = [] = { "apple": "red", "banana": "yellow", "cucumber": "green" } ademo.append(a) print ademo[0]["apple"] # "red" a dict has plenty of other methods , ways modified , created, check official documentation.

Creating risk plot in R -

i'd create risk communication plot in r using 10 10 grid of 100 "people". there's nice example here: http://static.www.bmj.com/content/bmj/351/bmj.h5496/f3.large.jpg . some simple data be: to.plot = data.frame(id=1:100, dead=rbinom(100, 1, 0.5))

formula vs well-formed formula in propositional logic -

can please explain difference between formula in general , well-formed formula ? possible determine truth value of ill-formed formula? the validity of formula, or truth value (or more evaluation), can assessed if formula formed respect given set of syntax rules. so formula in general , , in context of math or logic, means well-formed formula. strictly speaking, can if symbols include '+' | '(' | ')' | 'a'-'z' , formula, in strict sense, string formed these symbols. example, a((++z formula. but 1 must @ rules of construction of formula. , if rules are, example f,e ::= f + e | (f) | 'a'-'z' then formula not formed.

cpanel php class not creating object -

we used "cpanel api2" library create park domain in our server , working fine until last cpanel up-gradation. we created file mytest.live.php on server create object of "cpanel class" troubleshooting issue, unfortunately returns error below. <?php require_once "/usr/local/cpanel/php/cpanel.php"; $cpanel = new cpanel(); ?> and output returns: fatal error: uncaught exception 'runtimeexception' message 'there problem fetching env variablecontaining path socket' in /usr/local/cpanel/php/cpanel.php:146 stack trace: #0 /home/cityusa/public_html/mytest.live.php(4): cpanel->__construct() #1 {main} thrown in /usr/local/cpanel/php/cpanel.php on line 146 so please resolve issue. you should try naming file " .live.php" or " .livephp". worked me.

mysql - Need a SQL command for these tables -

i have following 2 tables (student , attendance): mysql> describe student; +----------------------+--------------+------+-----+---------+----------------+ | field | type | null | key | default | | +----------------------+--------------+------+-----+---------+----------------+ | student_id | int(11) | no | pri | null | auto_increment | | student_email | varchar(255) | yes | | null | | | student_phone_number | varchar(255) | yes | | null | | | parent_first_name | varchar(255) | no | | null | | | parent_last_name | varchar(255) | no | | null | | | parent_email | varchar(255) | no | | null | | | parent_phone_number | varchar(255) | no | | null | | | first_name | varchar(255) | no | | null | | | last_name | varchar(255) | no...

postgresql - Selecting only the values that are in the 75th percent tile and are above a constraint -

i'm trying query work properly... select salary agent salary > 75000 order salary asc limit (select round(count(salary) * .75) twentyfifthtile agent) some addition information rows: 166 rows – 25% 331 rows – 50% 497 rows – 75% 662 rows – 100% these rows have salary 75,000 plus: 235 / 662 = ~.35 .35 * 662 = ~235 rows. i'm trying above query return rows have salary greater 75,000 still in first 497 rows. when run above query returns rows starting @ 75,000 , limited 497 row return constraint. i'm not sure how can return salaries of greater 75,000 in first 497 rows of limit constraint. you can divide total number of rows current row number this: select salary ( select salary, count(*) on () total_count, row_number() on (order salary) rn agent salary > 75000 ) t (rn / total_count::numeric) <= 0.75 order salary asc

javascript - JS+REST+NodeJS: How to parse a JSON list from a JSON object -

in python have json object, inside fields there 1 ( field3 ) contains list of json objects. this object passed python script rest service based in js express framework: urllib.request.urlopen( urllib.request.request( url="http://"+self.__host+_":"+self.__port+"/api"+restmethod, data=urllib.parse.urlencode(objdata).encode('utf8'), headers=self.__headertoken,method=httpmethod) ) but when server receives json automatically recognizes field33 string instead of json list. { field1: '', field2: '', field3: '[{\'field31\': \'\', \'field32\': \'\', \'field33\':\'\',\'field34\': \'\', \'field34\': \'0.00\'}]', field4: '' } so when try obj.field3[0] returns string rather json list. i tried json.parse(string) , json.stringify(object) still cannot access json list , elements obj.field3.field31 how can recov...

BCP Error [Microsoft][ODBC SQL Server Driver 13]Unable to resolve column level collations -

sqlstate = s1000, nativeerror = 0 error = [microsoft][odbc sql server driver 13]unable resolve column level collations i have researched in google , have not seen solution. bcp works , says copying . creates text file. above error , text file left empty. i had sql server 2014 , sql server 2012 express installed on machine , server bcp importing sql server 2008 . this first question on stack overflow. long time reader though. collations come effect, whenever try sort, filter or join textual data (e.g. varchar ). this can due to a specified collation in script differing collations in table columns querying differing collations in databases (if query against more 1 database) and last not least! differing collation of server itself. means, created temp tables (either create table #tbl ... or select * #tbl ... ) use "wrong" collation default.

How does Vala support the C language's __function__ __file__ __line__ macros? -

i need add log informations souce file name, function name, line number etc... i have check official docs, not found... so, how ? this done via glib logging . for example try vala application: int main (string[] args) { // info () not shown default, set g_messages_debug=all in shell see them info ("hello world"); warning ("hello world"); //assert_true (false); // error () terminates program error ("hello world"); return 0; } the output is: $ g_messages_debug=all src/glib_logging_test ** info: glib_logging_test.vala:4: hello world ** (process:10129): warning **: glib_logging_test.vala:5: hello world ** (process:10129): error **: glib_logging_test.vala:9: hello world trace/breakpoint ausgelöst you can set g_debug in addition g_messages_debug , see running glib applications . you can install a custom handler log.set_handler () well. there log.file , log.line , log.method raw information equiv...

html - How do i move my text? -

here's simple html code, <html> <head> </head> <body> <h1> hotel-in sign up!</h1> <p>first name</p> <form> <input type="text" name="name" size="20"> </form> </body> </html> when see webpage, text first name onto of form, want on left of form, how do this? thanks! here's how demo <h1> hotel-in sign up!</h1> <form> first name: <input type="text" name="name" size="20"> </form>

javascript - Routes priority in express -

i want implement following routes' priority in express (in order): custom urls, static files, error pages. current did this: let router = express.router(); // custom urls (defined me) router.get("/foo", ...); app.use(router); // static files app.use("/", express.static("path/to/public")); // error pages (404, 500): router.use((req, res, next) => { res.send("custom 404 page."); }); router.use((err, req, res, next) => { res.send("custom 500 page."); }); the problem have i'm getting custom 404 page static files. if remove error page routes, static files work fine, don't custom 404 error pages , 500 error pages. how can handle 400 , 500 custom error pages while keeping priority too? considering static files in public folder relative index.js , works expected: folder structure: - index.js - public - index.html your index.js : "use strict"; let express = require('expres...

Python cmd2 module send commands -

i have implemented custom command line python cmd2 module. from cmd2 import cmd class cliapp(cmd): ..... now need send commands custom command line other python project. tried: send = cliapp().send print send('hello') which gives error: attributeerror: cmd instance has no attribute 'send' i have tried original example from: cmd2 - the-send-method - gives same error. the python cmd2 module developed catherine devlin around 2008 , has project page on github under python-cmd2/cmd2 appears separate entity cmd2 module developed around same time frame michele simionato . you can read documentation cmd2 module can install pypi @ cmd2.rtfd.io , note not have send method. to accomplish want, suggest looking @ cmd2 source code onecmd_plus_hooks method , @ cmd2 unit tests call method via run_cmd helper in conftest.py.

php - .X3D file exported from blender has a black background I cant change -

i integrating 3d model website having issue .x3d file has solid black background , cant seem change it. have set background white strength of 0 in attempt transparent background did not work. changed strength 1 in order white background did not work. setting background in css did not work. latest version of blender , x3dom. you can change global background color of blender project , export again (world -> horizon color).

javascript - Button not reachable using the id from "Inspect Element" -

i trying click on button in page able see id when select inspect option on chrome browser. id of button troop_confirm_go can see below. <input id="troop_confirm_go" style="margin-bottom: 5px" class="troop_confirm_go btn btn-attack" name="submit" type="submit" onload="this.disabled=false;" value="send attack"> however, when choose view page source on same page, not able see button id in text. therefore, assume reason not able reach button code in order click on it. here c# code, using .net framework 4.5: webbrowser _wb; private void pageloaded(object sender, webbrowserdocumentcompletedeventargs e) { if(!iamsurethisisthecorrectpage()) return; var attack = _wb.document.getelementbyid("troop_confirm_go"); // attack null attack.invokemember("click"); // null reference error } if can see button id inspecting it, shall able click on right ? how can achieve ? ...

winforms - CodedUI : PropertyNames.ControlName doesn't work -

i'm searching customcontrol in generic way, can re-use function find other customcontrols match one. screenshot of properties it has name , controlname. name property not filled in correctly, controlname be! when customcontrol in code below, locate , perform requested actions. wingroup group = new wingroup(this.window); group.searchproperties.add(wingroup.propertynames.name, strgroupname, propertyexpressionoperator.contains); group.searchconfigurations.add(searchconfiguration.nextsibling); when change propertynames controlname, not locate control! surprises me, because unique. what can cause of this? missing or doing wrong? just safe, can propertynames.controlname used find objects? regards, leslie

javascript - How to keep current month on top of list, when using ng-repeat in angularjs -

i have list of holidays , using ng-repeat show on html. working fine need current month's holidays(or upcoming) on top of list how that.... me my list is $scope.holidaylist = [ { "lineid":0, "holidaymasterid":0, "holidayname":"newyear", "startdate":"2016-01-01t00:00:00", "enddate":"2016-01-01t00:00:00", "startday":"friday" }, { "lineid":0, "holidaymasterid":0, "holidayname":"sankranthi", "startdate":"2016-01-15t00:00:00", "enddate":"2016-01-15t00:00:00", "startday":"friday" }, { "lineid":0, "holidaymasterid":0, "holidayname":"ugadi", "startdate":"2016-04-04t00:00:00", "enddate":"2016-04-04t00:00:00", "startday":"monday" }, { ...

css - Bootstrap Nav making named links scroll under navigation bar -

this question has answer here: offsetting html anchor adjust fixed header [duplicate] 28 answers i cannot figure out why bootstrap named links scroll under (behind) nav container. how can position "container" uses bottom of nav-bar top of page? effects can seen here: https://jsfiddle.net/9azlc6sz/ <div class="navbar navbar-default navbar-fixed-top" > <div class="container" > <div class="navbar-header" > <a href="index.html" class="navbar-brand" >scroll test</a> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main" > <span class="icon-bar" ></span> <span class="icon-b...

c++ - Is there an stl container for this hierarchical model data? -

for platform-independent model layer, have hierarchical data (strings, actually) this: item subitem a subitem b subitem c subsubitem a subsubitem b subitem d item b item c now, within each "level" (item, subitem, subsubitem, etc.) items need sorted alphabetically. seems simple solution create simple class sorted std::vector or std::multimap track children, , pointer parent. (and 1 root item). need iterate through each item's children in forward direction. after construction/sorting, not need add or delete items. small numbers of items (hundreds). this model organization of backing data of outline-style control. rolling simple class easy, such common pattern — isn't there ready-made stl container behavior? nothing in stl itself, might find useful: tree.hh: stl-like c++ tree class its api follows stl containers exactly, , should you're looking for. i believe their example asking (a tree strings), in fact.

PHP FILTER_VALIDATE_URL Maximum Length? -

i have code validate whether url inputted valid... if(filter_var($param1, filter_validate_url) === false){ echo "invalidurl"; exit(); } but when testing long-yet-valid url says it's invalid... http://www.thisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislong.com anyone have ideas why? can't find in filter_validate_url says should consider url of length invalid, deleting characters deemed valid. thoughts! sorry all, found after little more research... "according rfc 1034 , each part of domain name label cannot exceed 63 characters." (source: http://grokbase.com/t/php/php-git-pulls/149gqytbpr/pr-php-src-826-master-filter-validate-url-check-max-length-of-domain-name-label ). so wasn't valid url after - done php!

sql server - Azure SQL frequent connection timeouts -

we're running web app (2 instances) on azure, backed sql azure database. @ given time there 50-150 users using website. database runs @ s2 performance level. dtu around 20% on average. however, few times every day hundreds of errors in logs timeouts, this: an error occurred while executing command definition. see inner exception details. the wait operation timed out. timeout expired. timeout period elapsed prior completion of operation or server not responding. failure occurred while attempting connect routing destination. duration spent while attempting connect original server - [pre-login] initialization=1; handshake=21; [login] initialization=0; authentication=0; [post-login] complete=1; we're using ef6 queries default command timeout. i've configured execution strategy: setexecutionstrategy("system.data.sqlclient", () => new sqlazureexecutionstrategy(10, timespan.fromseconds(15))); the database (about 15gb total) h...

jQuery validation issue for allowed characters -

i use jquery validation in php page. specific input field set following criteria: accept: "[a-zÀ-ú0-9.,'& -]+" i want allow alphanumeric characters (both lowercase , uppercase), point, comma, single quote, ampersand, blank space , hyphen. it seems work fine, noticed characters \ (backslash) , ^ (caret) still accepted. is jquery bug? if not, please me find out what's wrong code? thank in advance

c++ - qt dialog2 connect dialog1 to updateQtableWidget -

i tried many things , read day no real progress. typed question, went through stack overflow suggestions. goal? have dialog2 send out signal dialog1 call function in dialog1, load/update qwidgettable. in dialog2(no buttons), keypressevent(f4), opens file, saves text in lineedit, file. after stream out done, stream flushed, file closed , lineedit fields reset can input more stuff if needed. works perfect, in part forum. but, being dialog2 nothing more size of messagebox, can still see dialog1 behind it, , tablewidget doesn't update stuff saved file. looks weird user. i'm at... connect(this->ui->lineedit,signal(textchanged(qstring)),dialog1,slot(loadtable())); (this) dialog2. doesn't compile. know i'm missing here. signals , slots relatively easy if widgets inside own "form"/"window". any appreciated. dialog1::dialog1(qwidget *parent) : qdialog(parent), ui(new ui::dialog1) { setwindowflags(qt::widget | qt::framelesswin...

getjson - How to make an API call to get the reviews in bazaarvoice extension?reviews.phtml code is mentioned below -

<?php if ($this->getisenabled()):?> <?php $doshowcontentjs = mage::getstoreconfig('bazaarvoice/rr/do_show_content_js'); $seocontent = $this->getseocontent(); ?> <div id="bvrrcontainer"> <?php echo $seocontent ?> </div> <script type="text/javascript"> $bv.ui( 'rr', 'show_reviews', { doshowcontent : function () { <?php echo $doshowcontentjs ?> } }); </script> <?php endif; ?> this answer here provides example of how retrieve reviews, i'll provide snippet: $(document).ready(function(){ $.ajax({ url: "https://stg.api.bazaarvoice.com/data/reviews.json?apiversion=5.4&passkey=***enter passkey here***&filter=productid:***productid***", data: "json", success: function(data){ console.log(data); (i in data['results']){ var info = data['re...

android - How to display date/time according to device settings -

i want display date/time according device locale and settings 12h/24h mode. having take @ several posts here on so, tried use this: long millis = this.startdate.gettime(); if (dateformat.is24hourformat(context)) { // why have check ?!? strdate = dateutils.formatdatetime(context, millis, dateutils.format_show_date | dateutils.format_show_year | dateutils.format_show_time | dateutils.format_24hour); } else { strdate = dateutils.formatdatetime(context, millis, dateutils.format_show_date | dateutils.format_show_year | dateutils.format_show_time); } unfortunately, dateutils.format_24hour deprecated so, wonder how display date taking care of device local , settings? so simpledateformat not expected answer don't want specify format myself. try android.text.format.dateformat, notably getdateformatorder() user's preferred date format.

angularjs - Is it possible to delete an item by taking one of the item in array using javascript? -

i have used angular material modal window confirm delete item ng-repeat created items, don't want delete item index , need delete of id . $scope.users = [{ _id:'1', firstname: 'obi-wan', lastname: 'kenobi' }, { _id:'2', firstname: 'boba', lastname: 'fett' }, { _id:'3', firstname: 'han', lastname: 'solo' }]; i have used _id here, of id, need delete particular item. plunker of deleting item of index. need of _id. can please me. plunker here so have user object in yout delete function shown in code can delete object using splice method , send delete request can use $http service below. $scope.delete= function(user){ $http.delete('/users/' + user._id, {params: {userid: user._id}}) .then(function (response) { if(response.status == 200){ var index = $scope.users.indexof(user); ...

c - Arduino StackArray not global -

i'm coding project read byte of serial data, convert binary , print out serial. currently, i'm using stack store binary. however, when push binary numbers stack, appear pushed in method call push() in, cannot pop ints array outside of method because there no elements pop. why, , there ways resolve problem. thought stacks reference variables. void converttobinary(byte number, stackarray<int> binarylist){ while(number > 0){ int rem = number % 2; binarylist.push(rem); number /= 2; } } it pushes seemingly fine. when try pop in method in pass stack popped, no elements there popped. void printtoled(stackarray<int> list){ //digitalwrite(ledpin, high); while(!list.isempty()){ int ledstate = list.pop(); //serial.println(ledstate); if(ledstate == 1){ digitalwrite(ledpin, high); } else{ digitalwrite(ledpin, low); } delay(1000); transitionflash(); } } since in setup specified serial st...

Recursive open files in Perl -

i have perl script count how many times expression appered in file, in particular case counts found between '<' , '>' because wanted parse .xml files. script: #usr/bin/perl sub by_count { $count{$b} <=> $count{$a}; } open(input, "<[content_types].xml"); open(output, ">output"); $bucket = qw/./; while(<input>){ @words = split(/\</); foreach $word (@words){ if($word=~/($bucket*>)/io){ #print output "$word"; #print output "\n\n"; $count{$1}++;} } } foreach $word (sort by_count keys %count) { print output "<$word occurs $count{$word} times\n\n"; } close input; close output; output <default extension="xlsx" contenttype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/> occurs 1 times <default extension="png" contenttype="image/png"/> occurs 1 times ...

Python adds extra to result -

this question has answer here: is floating point math broken? 20 answers i using python add simple numbers together, , got strange result >>> 16+4.8+6.4+0.48+1.92+.48 30.080000000000002 that not right answer, why python add bit? how reliable python more complicated computations? the culprit floating point math. floating point math: your language isn't broken, it's doing floating point math. computers can natively store integers, need way of representing decimal numbers. representation comes degree of inaccuracy. that's why, more not, .1 + .2 != .3. why happen? it's pretty simple. when have base 10 system (like ours), can express fractions use prime factor of base. prime factors of 10 2 , 5. 1/2, 1/4, 1/5, 1/8, , 1/10 can expressed cleanly because denominators use prime factors of 10. in contrast, 1/3, 1/6, , 1/...

javascript - Play sound files one by one according to current number -

i understand question similar have been asked before, none of answer problem. i working on queue system customer ticket kiosk , wait counter call number, example 1023. have sound files of each number in .mp3 format. btw, project developed using php. the 2 requirements sound files must play according number example if current number 1023, need play 1.mp3, 0.mp3, etc. another problem these files need played 1 after previous ends. managed 1st part sounds play together. please me, below of code 1st part. soundmanager.inc public function getsound($in_value) { $value = $in_value; switch ($value){ case "0": $path = "sounds/0.mp3"; echo "<audio autoplay>"; echo "<source src=".$path." >"; echo "</audio>"; break; case "1": $path = "sounds/1.mp3"; echo "<audio autoplay>"; echo "<sour...

winforms - How to display a particular tab from another form in vb.net -

i working on vb.net project in vs 2010 has multiple forms. have, lets say, form1 button , form2 tabcontrol. how display particular tab(eg.tab2 or tab3) when user clicks on button form1. to change selected tab of tabcontrol can use selecttab method or selectedindex property of tab control. controls of form not accessible outside of form default. can let access control of form setting modifiers property of control public , generatemember property true . so go designer of form2 , select tab control, in properties window, set generatemember true , set modifier public . can access tab control form1 : dim f new form2() f.tabcontrol1.selectedindex = 1 'it selects second tab f.showdialog() note in general design guideline it's better not expose forms controls. in such case it's better create property or method in form2 , use get/set selected tab of form2 form1 . example can see munawar's answer .

javascript - How do I make the images in the footer responsive? -

we're using bootstrap, , javascript page, we're not sure how footer images responsive. other elements on page responsive footer images. i've included entire html , css code. /* css document */ @font-face { font-family: futura; src: url("../fonts/futura-book.ttf"); } @font-face { font-family: futura italic; src: url("../fonts/futura_icg_book_oblique.ttf"); font-style: italic, oblique; } table { border-collapse: collapse; } .line { border-bottom: 3px solid #6e6e9a; } #white { color: white; } /*--------------------------------all pages----------------------------------------*/ /*body style*/ * { font-family: futura, verdana; box-sizing: border-box; } h1 { font-family: futura, verdana; text-align: center; font-size: 24px; } p { font-size: 14px; } th { font-size: 16px; } td { font-size: 14px; } body { margin: auto; min-width: 600px; } /*navigation style*/ nav...

Using javascript in sharepoint 2013 -

i have created list in sharepoint 2013 , list form has been created.i have field called formid , when form generated, textbox automatically created field. need used javascript in order modify textbox. below code generated textbox <sharepoint:formfield runat="server" id="ff1{$pos}" controlmode="new" fieldname="title" __designer:bind="{ddwrt:databind('i',concat('ff1',$pos),'value','valuechanged','id',ddwrt:escapedelims(string(@id)),'@title')}"/> here html. html has been created sharepoint <webpartpages:dataformwebpart runat="server" enableoriginalvalue="false" displayname="commonpage" viewflag="8" viewcontenttypeid="" default="false" listurl="" listdisplayname="" listname="{fa03b5da-da12-404a-a3d7-531af64c0f93}" listid="fa03b5da-da12-404a-a3d7-531af64c0f93" pagetype=...