Posts

Showing posts from June, 2010

ios - Function to return colour based on value passed -

i create function return colour based on value inserted it. ideally i'm looking have 3 different colours (e.g. red, green, blue) , range (e.g. 1 100), if example pass 80 function, return colour between green , blue (closer blue obviously). normally attempt write code before asking help, i'm not sure start one. anyone got suggestions? thanks. do mean 0 = red, 50 = green , 100 = blue ? if number = 40, it's mean has lot of red, of green, , none of blue? correct? i write in notepad, please recheck func getcolorfromnumber(number: int) -> uicolor { // case of color between red , green if number <= 50 { // color 1, base on 50 - number let rcolor1 = 0 let gcolor1 = cgfloat( double(50 - number) * 157 / 50 ) let bcolor1 = cgfloat( double(50 - number) * 29 / 50 ) // color 2, base on number let rcolor2 = cgfloat( double( number ) * 255 / 50 ) let gcolor2 = cgfloat( double( number ) * 148 / ...

sungridengine - Using gpu-loadsensor with Grid Engine -

how use gpu-loadsensor grid engine? set nvidia gpus resource on cluster. compile it. run --help give list of complex variables add complex configuration. add list of load_sensors in sge_conf. users can request defined resources in order route jobs right nodes. it's load sensor not complete integration though.

ios - UITextView and cell dynamically update height based on content of textview? -

i have been having issue regarding uitextview inside custom cell. textview works besides issue. have uitextviewdelegate methods setup when happens textview, have methods connected. i know how can have custom cell dynamically increase it's height user types. once user hits end of line of textview, have textview add line automatically. have been searching online while, , of examples issue in objective c. not swift code. appreciate help. i have cell hooked in tableview file such.. func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell: cellcustom = the_tableview.dequeuereusablecellwithidentifier("cell") as! cellcustom return cell } in custom cell file, have delegates set up... func textviewdidchange(textview: uitextview) { } func textview(textview: uitextview, shouldchangetextinrange range: nsrange, replacementtext text: string) -> bool { return true ...

xcode - Automating iOS/WatchKit App Store submission - Code signing issue -

i have rather typical ios 8 ios/objc/xcode 6.4 application, includes watchkit extension. have no trouble manually submitting app store using xcode using archive menu option. we use build server (bamboo shouldn't matter). build server automates builds , distributions through hockeyapp, manually build , upload itunes connect using xcode. automate builds itunes connect, we're same codebase used both hockeyapp , itunes connect (both testflight , app store). i'm having heck of time getting script working itunes connect, due (i believe) 3 targets need signing (ios app, watchkit extension, , watch app). i found answer related question, has been helpful: https://stackoverflow.com/a/29605731 . suggests putting variables provisioning profile settings 3 targets. works building. question doesn't involve uploading itunes connect, i'm seeing trouble. so script looks this: app_profile="[the hex string]" watchkitext_profile="[another hex string]...

php - htaccess subdomain with subfolders access -

i trying rewrite subdomain request subfolder in server using .htaccess . want mail.domain.com mail folder located in root. able achieve below code rewriteengine on rewritecond %{http_host} mail.domain.com$ rewritecond %{request_uri} !^/mail rewriterule ^(.*)$ /mail/$1 [l] this works correctly. when browse mail.domain.com getting contents of domain.com/mail/index.php . however doesn't work subfolders inside subdomain. ie when browse mail.domain.com/installer doesn't give contents domain.com/mail/installer/index.php . instead shows 404 error. tried code htaccess subdomain pointing . somehow unable output. method gives same problem. doing wrong? note: i not want redirect conditions. want achieve via rewrite rules. i using openshift server. created domain.com & mail.domain.com aliases. root folder contains wordpress no below .htaccess rules. edit <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecon...

Parsing an XML with Powershell -

i need read through xml file , count how many representation elements there in first adaptationset, because everytime xml generated can have varying amounts 1 10. i'm new powershell , using xdoc read xml file. <?xml version="1.0" encoding="utf-8"?> <mpd xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" id="111091661:1853125475:ntsc" profiles="urn:mpeg:dash:profile:isoff-live:2011 urn:com:dashif:dash264" type="dynamic" availabilitystarttime="2015-07-09t18:47:42.8780481" publishtime="2015-07-09t18:47:41.7236461" minimumupdateperiod="pt3600s" minbuffertime="pt15s" timeshiftbufferdepth="pt60s" suggestedpresentationdelay="pt30s" maxsegmentduration="pt1.000s" xsi:schemalocation="urn:mpeg:dash:schema:mpd:2011 dash-mpd.xsd" xmlns="urn:mpeg:dash:schema:mpd:2011"> ...

igraph: given a list of vertices, find the smallest connected subgraph -

i have following problem: have relatively large graph , extract connected subgraph given set of vertices, might not directly connected. example: library(igraph) test <- graph(c("a", "b", "a", "c", "a", "d", "b", "e", "b", "f", "c", "g", "c", "h", "d", "i")) plot(test, layout=layout_as_tree) now extract (smallest) subgraph contains e.g. vertices "e" , "c" , "g" . there easy way in igraph package? suggestions! cheers, jo got it! it's easy igraph: subnodes <- c("e", "c", "g") neednodes <- character() ## loop through nodes , calculate path each other node for(i in 1:(length(subnodes)-1)){ paths <- shortest_paths(test, from=subnodes[i], to=subnodes[(i+1):length(subnodes)], ...

java - Algorithm for superdivide -

a int superdivide if every digit in number divides number. example 128 divides since 128 divisible 1, 2, , 8 superdivide number not divisible 0 . sample input #1 superdivide(184) sample output #1 true sample input #2 superdivide(39) sample output #2 false sample input #3 superdivide(120) sample output #3 false enter code here public class superdivide { public static void main(string[] args) { superdivide obj = new superdivide(); boolean result = obj.checksuper(1001); system.out.println(result); } public boolean checksuper(int num){ //write code here int n1; int n2=num; if(num%10==0) return false; while(num>0){ n1=num%10; if(n2%n1==0){ num=num/10; return true; } } return false; } above code runs fine upto digit number not 3digit,any suggestion? maybe method should : public ...

javascript - Typescript, self returning generic -

i'm working on class implements generic interface like: interface world<t> { get(): t; } class hello implements world< hello > { get(){ return } } but thinking if class hello implement world interface, intead of having use world< anotherclass > thinking world< world > can permanent wherever implement world interface, looks typescript don't accept syntax, there better way so?, maybe there way around it? i'm sorry it's not clear mean "so can permanent wherever implement world interface". maybe want non-generic interface? interface world { get(): world; } class hello implements world { get() { return this; } hello() { console.log("hello"); } } class anotherclass implements world { get() { return this; } anotherclass() { console.log("another class"); } } var h = new hello(); var ac = new anotherclass(); var testh = h.get(); //testh implicitly typed hello var...

ios - How do I xcodebuild a static library with Bitcode enabled? -

xcode 7 introduces bitcode , sort of llvm intermediate binary means apple's servers can recompile app different architectures without involvement. at lookback, distribute static archive framework our library. seems when build "build & archive", bitcode not emitted library, , links library in app , tries build & archive bitcode enabled 1 of 2 warnings: ld: 'lookback(lookback.o)' not contain bitcode. must rebuild bitcode enabled (xcode setting enable_bitcode), obtain updated library vendor, or disable bitcode target. (if lib built xcode 6) ld: warning: full bitcode bundle not generated because 'lookback(lookback.o)' built bitcode marker. library must generated xcode archive build bitcode enabled (xcode setting enable_bitcode) (if lib built xcode 7 normal xcodebuild) i have build script builds device+simulator universal binary, can't use build & archive, rather, run xcodebuild commandline script. how can make xcodebuild genera...

matlab - Quantifying pixels from a list of coordinates -

i have list of coordinates, generated program, , have image. i'd load coordinates (making circular regions of interest (rois) diameter of 3 pixels) onto image, , extract intensity of pixels. i can load/impose coordinates on image using; imshow(file); hold on scatter(xcoords, ycoords, 'g') but can not extract intensity. can guys point me in right direction? i not sure mean circle 3 pixels diameter since in square grid (as mentioned ander biguri ). use fspecial create disk filter , normalize. this: r = 1.5; % diameter = 3 h = fspecial('disk', r); h = h/h(ceil(r),ceil(r)); you can use mask intensities @ given region of image. im = imread(file); roi = im(xcoord-1:xcoord+1; ycoord-1:ycoord+1); = roi.*h;

c# - How to remove dotted focus rectangle from tab control? -

Image
i'm trying remove dotted focus rectangle custom tab control . i've tried , not remove rectangle. as can see in picture, focus rectangle disturbing in application design. please help! to remove focus cue, have set userpaint true, , paint entire tab control yourself, including borders, text, backgrounds, highlighting, hot-tracking, etc. the following code paints tab text , background: public class tc2 : tabcontrol { public tc2() { this.setstyle(controlstyles.allpaintinginwmpaint | controlstyles.optimizeddoublebuffer | controlstyles.resizeredraw | controlstyles.userpaint, true); } protected override void onpaint(painteventargs e) { base.onpaint(e); var g = e.graphics; tabpage currenttab = this.selectedtab; (int = 0; < tabpages.count; i++) { tabpage tp = tabpages[i]; rectangle r = gettabrect(i); brush b = (tp == currenttab ? brushes.lightsteelblue : brushes.lightgray...

javascript - Could not add click event on dynamically created anchor tag -

i trying register click event on anchor tag created dynamically not working. following code var location = 's'; $('#phone').on('click', 'a', function(event) { console.info('anchor clicked!'); event.preventdefault(); return false; }); for(var = 0; < 5; i++) { $("div#phone").append('<ul><a href="#" id = "' + location + '"> rajeev </a></ul>'); } have @ fiddle edit updated fiddle link your code works well, check browser's console or change console alert: $('#phone').on('click', 'a', function(event) { alert('anchor clicked!'); event.preventdefault(); return false; });

html - The div size did not count in the float right element -

i have content this news event title 11.11.2015 ----------------------------------------------- news event title 2345 news event title 2345 11.11.2015 ----------------------------------------------- news event title news event title news event ti tle 11.11.2015 but turn out this news event title 11.11.2015 ----------------------------------------------- news event title 2345 news event title 2345 ----------------------------------------------- 11.11.2015 news event title news event title news event ti tle 11.11.2015 notice second title in actual result. because date float: right , not count div size. how fix that? helping the code like <div style="border-bottom:1px dotted #000000;"> <p>news event title<span style="float:right;">11.11.2015</span>...

Batch scripting not assigning variable as expected -

i'm working on batch script assign variable string , trim it. i'm facing 2 issues: the variables not assigning properly. taking last value from variable file. the variables not assigning first time run script. need run script second time see if variables have been assigned. on third run, can see trim working. my script looks this: @echo off /f "tokens=*" %%a in ('findstr "w3svcwinsrvrhosts" "c:\data\siebeladmin\commands\file.txt"') ( /f "tokens=2 delims==" %%b in ("%%a") ( %%c in (%%b) ( echo in loop set str=%%c echo %%c echo.%str% set str=%str:~-6% echo.%str% ))) the output looks on third run: > c:\users\parthod\desktop>b.bat in loop xsj-uvapoms72 7.2.27 7.2.27 in loop xsj-uvapoms82 7.2.27 7.2.27 in loop 172.17.2.26 7.2.27 7.2.27 in loop 172.17.2.27 7.2.27 7.2.27 you fell delayed expansion trap -- try this: @echo off setlocal enabledelayedexpansion /f "tokens=*" %%a in (...

How do I suppress row names when using DT::renderDataTable in R shiny? -

Image
as per explanation in section 2.3 here , can remove rownames datatable setting rownames = false how suppress row names when using dt::renderdatatable in r shiny? following doesn't work because if @ datatables options reference there no rownames option output$subsettingtable <- dt::renderdatatable( subsettable(), filter = 'top', server = false, options = list(pagelength = 5, autowidth = true, rownames= false )) my question similar 1 here . answers there rendertable , i've tried making answers there work dt::renderdatatable 0 success. please careful read pages of functions know argument belongs function. in case, rownames argument belongs datatable() function, put inside options argument, , wrong. dt::renderdatatable() accepts either data object or table widget first argument (again, please read page), either of following expressions should work: dt::renderdatatable(datatable( subsettable(), filter = 'top', serv...

c# - Entity framework incorrect data returned from linq select -

i'm new using entity framework, maybe i'm doing wrong, following code isn't working way i'd expect to: productentities dbcustomerrefresh = new productentities(); int16 delay = 5000; while(true) { var pendingfaults = (from f in dbcustomerrefresh.faults f.lrefreshstatus == 1 select f); foreach(fault f in pendingfaults) { log.debugformat("initial refresh status fault {0} {1}", f.lfaultid.tostring(), f.lrefreshstatus.tostring()); f.lrefreshstatus = 2; log.debugformat("changed refresh status fault: {0} {1}", f.lfaultid.tostring(),f.lrefreshstatus.tostring()); } log.debugformat("saved {0} rows losch database",dbcustomerrefresh.savechanges().tostring()); thread.sleep(delay); } this works expected first time round loop, i.e. picks every row in db has lrefreshstatus set 1, changes 2 , prints debug. i go database , manually change lrefreshstatus 1 given row. on next loop round, program picks ...

hadoop - secondary name node functionality -

can explain words in bold mean taken text book? "state of secondary namenode lags of primary " mean? secondary name node keeps copy of merged namespace image, can used in event of namenode failing. **however, state of secondary namenode lags of primary, in event of total failure of primary, data loss certain.**the usual course of action in case copy namenode’s metadata files on nfs secondary , run new primary. thanks in advance hadoop 1.x: when start ha hadoop cluster creates file system image keeps metadata information of entire hadopp cluster. when new entry comes hadoop cluster goes edits log. secondary namenode periodically reads , query edits , retrieve information , merge information fsimage. in case namenode fails, hadoop administrator can start hadoop cluster of fsimage , edits.(during start namenode reads edits , fsimage there wont data loss) fsimage , edits log keeps updated information file system in form of metadata in case of total failure of...

ruby - How do I permit only one particular user to login to active admin? -

i have application have lot of users , among them 1 super user. want use super user account use active admin , other users use custom admin dashboard. you can have boolean "admin" attribute on users , check attribute using custom authorizationadapter. check part of documentation further information: http://activeadmin.info/docs/13-authorization-adapter.html

jQuery - Different actions for when clicking on TR and TR > span -

i have put data html table. when clicking on tr , adds 'checked' attribute checkbox particular row. however, have several rows containing same parent id inside span - when click parent id, should add 'checked' attribute rows id. approach have 2 different actions - 1 when click table row $('tr').on('click', function() { ... stuff ... }); and action when click tr inside span $('tr > span').on('click', function() { ... else }); problem is, when click on span runs first event aswell. tried playing around :not selector , .not() function, couldn't seem work. here's code (only took relevant parts): $('tr').on('click', function() { // checkbox action here }); $('tr > span').on('click', function() { // multiple checkbox actions here }); use .stoppropagation() stop bubbling : $('tr > span').on('click', function(e) { e.stoppropagation(); ...

c# - I want create a Connect forwarding to SSH server with library on website www.bitvise.com -

Image
i created connect ssh server forwarding library "flowsshnet64_framework40.dll" (my operating system 64 bit) in c# while i'm running error after import library application , follow instructions: https://www.bitvise.com/fsd-client bitvise.flowsshnet.client t = new client(); t.setproxyhost("66.172.203.200"); t.setproxyoptions(true); t.setproxyusername("admin"); t.setproxypassword("admin"); t.setproxyport(22); t.setproxytype(proxytype.socks5); forwardingrule setup = new forwardingrule(); setup.clienttoserver = true; setup.listinterface = "127.0.0.1"; setup.listport = 1080; forwardinghandler setup1 = new forwardinghandler(); if (setup1.isdisposed) { t.addforwarding(setup, setup1); label1.text = "connected"; } picture of error: you can use flowsshnet32_framework40.dll on os 64 bit to run must copy file same directory such bin\debug. , doesn't have error binaries\ciprov32.dll binaries\cryptopp5...

html - CSS: Avoid disappearence of a component when screen is too narrow -

i'm complete newbie @ css. i'm using twenty template , when make screen quite narrow, grey box in center disappears. know it's meant way because it's responsive, how can alter behavior? i'd adjust width @ disappearance happens. suspect it's somewhere in part of css code: #banner .inner { -moz-animation: reveal-banner 1s 0.25s ease-in-out; -webkit-animation: reveal-banner 1s 0.25s ease-in-out; -o-animation: reveal-banner 1s 0.25s ease-in-out; -ms-animation: reveal-banner 1s 0.25s ease-in-out; animation: reveal-banner 1s 0.25s ease-in-out; -moz-animation-fill-mode: forwards; -webkit-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; animation-fill-mode: forwards; background: rgba(20, 20, 20, 0.90); /*color y opacidad de la caja oscura en home */ color: white; display: inline-block; opacity: 0; padding: 3em; text-align: center; } it doesn't disappear. adds ( withi...

android - Is it relevant to keep a mBound flag when binding a service? -

as explained in documentation regarding bound services , mbound boolean used know whether service bound in activity. here excerpt of code example given in documentation: public class bindingactivity extends activity { localservice mservice; boolean mbound = false; private serviceconnection mconnection = new serviceconnection() { public void onserviceconnected(componentname classname, ibinder service) { localbinder binder = (localbinder) service; mservice = binder.getservice(); mbound = true; } } why use additional member rather setting mservice null if not bound? seems redundant me, , potentially error-prone . there no need keep additional flag in activity. additional flag adds risk on data consistency , atomicity, such as: data consistency: else modify code may confused on should mbound or mservice != null used, you're. may worry , add assert(mbound == mservice != null); check. atomicity: in strict thread safe conditi...

javascript - Angular Checkbox Filter with Paginator -

i'm using angularjs paginator, https://github.com/michaelbromley/angularutils/tree/master/src/directives/pagination . , i'm using example in this video add checkbox filters ng-repeat. want filter based on whether specie property of every animal object (animal.specie) cat or dog . start setting both true ng-repeat doesn't populate when that. , when check box true or false nothing happens. the thing in controller $scope.species = {dogs: true, cats: true}; what wrong implementation? appreciated. thanks :) <div class="row adopt-title-wrap"> <div class="medium-6 large-6 column"> <h3>find next best friend</h3> </div> <div class="medium-2 large-2 end column"> <input type="checkbox" ng-model="species.cats"> <label>cats only</label> </div> <div class="medium-2 large-2 end column"> <i...

inline style changes by javascript don't work on mobile browsers (chrome/dolphin/android): why? -

jfiddle link expected behavior (as performed on pc/windows browser) : h1 header "gif" disappears , video plays mobile behavior : gif not disappear- video does play (so js firing) why doesn't display toggle work on mobile (android) chrome way in windows chrome? relivant code: this.play(); this.removeattribute("controls"); //works //h1.style.display="none"; //does not work this.previoussibling.style.display="none"; //does not work onclick not valid event in touch devices. try ontouchstart mobile version. touch event object doesn't contain offsety . instead, can use pagey on both mobile , desktop browsers. here working demo .

angularjs - How to disable column / table sorting (initially enabled) in ui-grid? -

what api that? use case why need it: while performing external sorting i'd disable sorting on table (because refresh content many times many times clicked column header) or on specific column , enable on success or error. set enablesorting: false in grid option change same property dynamically should work.

Django project not working with Apache and mod-wsgi -

i created droplet(cloud server) on digitalocean , no-ip.com gave hostname - project.ddns.net.by ssh(ing) droplet installed pip , virtualenv. inside /var/www/ created virtualenv , cloned repository github of project.the directory struture - project_revamped (root of project) ->requirements ->base.txt ->dev.txt ->project (django project) ->static ->media ->apps (folder contains apps) ->manage.py ->project ->urls.py ->settings ->base.py ->dev.py i installed apache2 , mod_wsgi using - sudo apt-get install apache2 sudo apt-get install libapache2-mod-wsgi i installed mysql,created database , installed requirements pip install -r base.txt i created virtualhost project.conf on path - /etc/apache2/sites-available/project.conf the content of file - <virtualhost *:80> serveradmin example@gmail.com servername project.ddns.net servername www.project.ddns.net wsgiscriptalias / /va...

how to fix the error in 'git submodule update' -

i have super project named root , submodule named subb on have no write permission. want git new branch in machine . when run "git submodule update", error : "fatal: reference not tree: b4ec396a0e1da795a5187f7acf90f686c23c6940 unable checkout 'b4ec396a0e1da795a5187f7acf90f686c23c6940' in submodule path 'subb'". tried kinds of ways resolve issue failed. can answer following questions me , thanks: does ref 'b4ec396a0e1da795a5187f7acf90f686c23c6940' means local commit in submodule subb? see info 'git log b4ec396a0e1da795a5187f7acf90f686c23c6940' in submodule directory 'subb', in super project see nothing same command. the ref means commit in local sumodule repo? because have no write permission remote repo. sure on local. buy why error occurs when update in machine. remote repo should have no idea local commit! how resolve issue? it means commit b4ec396 done in subb , not pushed in origin/subb (the upstre...

php - Getting a database output to show up in an input field -

i'm looking able outputted data database appear input box, have ability update data later on. trying echo output input field, displays under input field. how this? <?php $con = mysqli_connect("localhost", "root", "", "db"); if (mysqli_connect_errno()) { printf("connect failed: %s\n", mysqli_connect_error()); exit(); } $stmt = mysqli_query($con,"select * user_players"); while($row = mysqli_fetch_array($stmt)) { $player1 = $row['player1']; $player2 = $row['player2']; $player3 = $row['player3']; $player4 = $row['player4']; $player5 = $row['player5']; $player6 = $row['player6']; ?> <div class="draftresultswrap"> <div class="inline"> <?php echo "<div>" . $row['firstname'] . " " . $row['lastname'] . "</div>"; ?> <...

Using master-master mysql db replication in Yii -

i have 2 servers have setup mysql master-master db replication balance db load. 'db'=>array( 'connectionstring' => 'mysql:host=localhost;dbname=mydb', 'emulateprepare' => true, 'username' => 'root', 'password' => 'rootpass', 'charset' => 'utf8', ), the question have is, mysql determine when use master db ? if not, have connect both of master dbs (how use in application)? can point me in right direction ? thanks.

How to write codes in a file using php -

i want write php codes in file using php try $cache = "<?php include_once 'a.php';" . $var .ob_get_contents(); file_put_contents('page.php', $cache); error syntax error, unexpected '' (t_encapsed_and_whitespace), expecting identifier (t_string) or variable (t_variable) or number (t_num_string) thank you your syntax wrong, have try instead started: <?php $cache = file_get_contents('a.php'); file_put_contents('page.php', $cache); the documentation of file_put_contents() states requires two arguments (or more). first path file write to, second content write file. provided single argument, since concatenated 2 things using . operator. however in case: wouldn't easier copy file instead? your comment below suggests indeed want concatenate variables value write output file. concatenate then: <?php $cache = file_get_contents('a.php'); $cache .= $var; $cache .= ob_get_contents(); file_put_...

javascript - Parse.com Form not sending information, submit error? -

just wondering if knows why form won't store data in parse database? i think might submit button... html 5 form, supposed integrate parse.com, sorry javascript isn't strongest language. <div class="register span5 offset3"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <h2>create account <!--<span class="red"><strong>iapp</strong></span>--></h2> <input type="text" id="firstname" name="firstname" placeholder="first name"> <input type="text" id="lastname" name="lastname" placeholder="last name"> <input type="text" id="username" name="username" placeholder="username"> <input type="text" id=...

security - Why does Chrome hate self-signed certificates so much? -

i'm running small web app on ec2 instance , want friends able use it. want make use https, basic security purposes (prevent packet snooping whenever possible). of course using self-signed certificate, because budget project $0. chrome throws warning page upon trying visit it: your connection not private attackers might trying steal information [...] (for example, passwords, messages, or credit cards). net::err_cert_authority_invalid this server not prove [...]; security certificate not trusted computer's operating system. may caused misconfiguration or attacker intercepting connection. is not true "any encryption better no encryption"? on unenecrypted http, trying steal information well, , don't have prove server identity, , communication can read in plaintext packet sniffing, chrome doesn't throw warning flags there... what gives? why chrome hate self-signed certificates much? why doesn't put little red box on padlock icon, i...

Linking HTML to CSS file -

i have problem linking html file "index.html" css file "stylesheet.css". i've pasted same code in codeacademy , w3schools in, none of them work. i'm using notepad++ - problem software? i've attached first section of code. both saved in same folder. <head> <link type="text/css" rel="stylesheet" href="stylesheet.css"> <title>fred's present</title> </head> thanks! <head> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <title>fred's present</title> </head> your code absolutely fine...you must have kept css file in other folder. try keep both files in same folder linking can work properly.

php - How To Show "Shop By" left sidebar attribute list in "Dropdown" like as "Sort By" Toolbar? -

how show "shop by" left sidebar attribute list in "dropdown" "sort by" toolbar? i want show attribute list same "sort by" toolbar dropdown list. my toolbar.phtml code is <?php /** * magento * * notice of license * * source file subject academic free license (afl 3.0) * bundled package in file license_afl.txt. * available through world-wide-web @ url: * http://opensource.org/licenses/afl-3.0.php * if did not receive copy of license , unable * obtain through world-wide-web, please send email * license@magentocommerce.com can send copy immediately. * * disclaimer * * not edit or add file if wish upgrade magento newer * versions in future. if wish customize magento * needs please refer http://www.magentocommerce.com more information. * * @category design * @package base_default * @copyright copyright (c) 2012 magento inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl...

ios - Handle populating a tableview with asynchronous API calls -

i have 2 objects. note , user . public class note { var userid: int var createdatdate: nsdate var content: string? init(userid: int, createdatdate: nsdate) { self.userid = userid self.createdatdate = createdatdate } } public class user { var id: int var firstname: string var lastname: string var email: string var avatar: uiimage? init(id: int, firstname: string, lastname: string, email: string) { self.id = id self.firstname = firstname self.lastname = lastname self.email = email } } and there 2 api methods. 1 list out notes. json response get. { "status": "success", "data": [ { "user_id": 2, "note": "this test\r\n\r\nthis test.\r\n\r\nbeep boop", "created_at": "2015-07-29 04:39:25" } ] } note user's id in response. user details (first name ,last name etc), there...

validation - Force Stop Error at RunTime MySQL and form validator Android -

i have project that gets user details sends user details mysql server now want make edittexts not empty . or characters more 3. my code works when user sends invalid or empty details. but when edittexts filled correctly application show forcestop error. public class register extends activity { public edittext name, lastname, phonenumber, email, username, password, namee, lastnamee, phonenumberr, usernamee, passwordd; private fbutton reg_btn_login; private progressdialog pdialog; jsonparser jsonparser = new jsonparser(); private static final string login_url = "http://mojtabaapp.esy.es/register.php"; private static final string tag_success = "success"; private static final string tag_message = "message"; // baresi edit text ha public boolean ayavorodysahihbood() { namee = (edittext) findviewbyid(r.id.et_name); lastnamee = (edittext) findviewbyid(r.id.et_famili); phonenumberr = (...