Posts

Showing posts from June, 2015

Different Css3 border style -

Image
i want add border style in content heading can make using css3? if 1 know how please me. this "hard-coded" solution got work. you have set maindiv hiding left , right borders same body color on webpage. body { background-color: #fff; } .maindiv { width: 500px; height: 50px; border: 1px solid #ccac00; position: relative; text-align: center; line-height: 3em; } .maindiv:after { content: ''; display: block; position: absolute; width: 0; height: 35px; top: 5px; left: -1px; border: 1px solid #fff; } .maindiv:before { content: ''; display: block; position: absolute; width: 0; height: 35px; top: 5px; left: 31.2em; border: 1px solid #fff; } <div class="maindiv">lorem ipsum dolor sit amet</div> jsfiddle if want edit liking.

highcharts - Is it possible to use R Plotly library in R Script Visual of Power BI? -

has tried using plotly or highchart in r script visual of power bi, when try in r script editor , run: library(ggplot2) library(plotly) x <- 1:5 y <- c(1, 3, 2, 3, 1) plot_ly(x = dataset$period, y = dataset$mean, name = "spline", line = list(shape = "spline")) error message: no image created. r code did not result in creation of visuals. make sure r script results in plot r default device. but runs on r desktop. thought? the reason right power bi supports render charts created r visualization component png. try following: p <- plot_ly(x = dataset$period, y = dataset$mean, name = "spline", line = list(shape = "spline")) plotly_image(p, format = "png", out_file = "out.png")

plone - No space left on device when adding at.File content to site -

i have content type inherits of at.file scheme. when try upload file of 2.5 gb gives me error: no space left on device for reason temp folder filled 100% while object being created. tmp folder have 10 gb. any ideas? i don't know why tmp storage full. other services , tools using default tmp storage. i got problem on customer machines, if tmp area in own partition , small sized (only few hundert mbs). usually can solve point other directory, example directly in buildout. python tempfile implementation respects tmpdir environment variable, can point directory. this can done extend buildout configuration with: [instance] ... environment-vars += tmpdir ${buildout:directory}/tmp .... make sure have tmp directory in buildout folder.

php - Materialize dropdown issue -

Image
i'm trying make dynamic dropdown menu. have database table dropdown menus. table layout position means position in menu. dropdown (0 - no dropdown, 1 - dropdown "header" arrow, 2 - dropdown item). dropdown-parent means id of dropdown header. problem can't figure out how implement it. $query = $db->query("select * `menu` `dropdown` = 0 or `dropdown` = 1 order `position` asc"); foreach($query $row) { if($row['dropdown'] == 0) { echo '<li><a href="'.$row['url'].'">'.$row['name'].'</a></li>'; } elseif($row['dropdown'] == 1) { echo '<li><a class="dropdown-button" href="#" data-activates="dropdown'.$row['position'].'" data-beloworigin="true" data-hover="true">'.$row['name'].'<i class="material-icons

c# - Error to Run .net Exe on win 8 - 32 bit PC -

Image
we have 3 different pc having visual studio, application working fine on systems while when trying same application on pc not have visual studio, when try run , nothing happened, no error message. we using dll concept , native dll using in clr project , clr dll using in c# project. application log [ application error + .net runtime error] event viewer below:- log name: application source: application error date: 07-09-2016 15:01:07 event id: 1000 task category: (100) level: error keywords: classic user: n/a computer: qc4.bankgrp.com description: faulting application name: f.exe, version: 0.0.0.0, time stamp: 0x57ce924d faulting module name: kernelbase.dll, version: 6.3.9600.17031, time stamp: 0x530888f8 exception code: 0xe0434352 fault offset: 0x0000f097 faulting process id: 0xeb4 faulting application start time: 0x01d208ea8fd94e6b faulting application path: c:\dzqcd\f.exe faulting module path: c:\windows\system32\kernelbas

wordpress - Woocommerce - shipping multiple addresses -

has had issues woocommerce - shipping multiple addresses plugin? ( https://woocommerce.com/products/shipping-multiple-addresses/ ) have few bugs need resolving complete project , wondered if had same issues have? list of bugs: when first go checkout page shipping methods hidden. if don't want ship address , have set address in billing , shipping fields can place order without shipping methods. default shipping methods should hidden when multiple addresses selected in cases customers want ship products same address. when click set address change mind , don't change addresses, click save addresses , continue button ajax on address blocks loads on , on again on checkout page , gets stuck. when set address change them being same address shipping methods on checkout page inside address block cannot changed , gets stuck on same shipping option. when go add address form - checkout/shipping-addresses/?address-form=1 seems cannot delete address. when click delete hides , whe

Google Cloud Storage File Upload - Requested page not found. [404] -

i trying upload file google cloud storage using json api. posting request below url file attachment. https://www.googleapis.com/upload/storage/v1/b/mybucket/o?uploadtype=media&name=solarsystemlrg.png but getting requested page not found. [404] error. when use below url, able list images stored in bucket (just sure there no access issues , bucket name correct). https://www.googleapis.com/storage/v1/b/mybucket/o i have set headers. 'authorization' :'bearer ' + accesstoken, 'content-type' : contenttype, 'content-length' : inputfile.size please find code snippet below. $.ajax({ url: targeturl, headers: reqheaders, type: 'post', data: reqformwithdatafile, async: false, cache: false, datatype: 'jsonp', usedefaultxhrheader: false, processdata: false, success: function (response) { alert('file upload successful');

c# - Filling a gridview with data from database -

i have report screen 6 textboxes. check checkboxes , data in database sql query. when click on button generate report, doesn't show data in gridview. pasted gridview toolbox screen , want fill c# code , sql command. missing something? protected void button1_click(object sender, eventargs e) { connect = new sqlconnection(@"data source=lp12;initial catalog=smmsdata;integrated security=true"); connect.open(); sqlcommand cmd = new sqlcommand(); cmd.connection = connect; cmd.commandtext = "select druksensor, flowsensor, tempsensor, kwaliteitsensor, toerental, olieverbruik" + " systeemsensorinfo" + " druksensor=@druksensor" + " , flowsensor=@flowsensor" + " , tempsensor=@tempsensor" + " , kwaliteitsensor=@kwaliteitsensor" + " , toerental=@toerental" + " , olieverbruik=@olieverbruik" ; cmd.parameters.a

python & pandas - How to calculate frequency under conditions in columns in DataFrame? -

Image
i have series of data in dataframe called frames : nousager sens idvehiculeutilise noconducteur noadresse fait nodemande periods 0 000001 + 287véh 000087 000079 1 42196000013 matin 1 000001 - 287véh 000087 000079 1 42196000013 matin 2 000314 + 263véh 000077 006470 1 42196000002 matin 3 002372 + 287véh 000087 002932 1 42196000016 matin 4 000466 + 287véh 000087 002932 1 42196000015 matin 5 000314 - 263véh 000077 000456 1 42196000002 matin 6 000466 - 287véh 000087 004900 1 42196000015 matin 7 002372 - 287véh 000087 007072 1 42196000016 matin 8 002641 + 263véh 000077 007225 1 42196000004 soir 9 002641 - 263véh 000077 000889 1 42196000004 soir 10 000382 + 263véh 00007

mysql - May a database be completely overwritten for n times without danger to truncate data? -

a simple , maybe amateur question, but: ok table on database consistently (for example, every day) overwritten? i data whole year beginning until every new day/week/month. , append new months, fear there new data past months in file. want overwrite table every time new file. ok table? mean can somehow corrupt it? edit : context of question overwrite data in rapidminer tool, , don't know method uses this. should speak rapidminer support it. replacing historical data reasonable approach. before loading new data, presumably doing 1 of these things: truncating existing table deleting rows dropping table only second of these runs risk fragmenting table. isn't big deal when data being loaded in bulk. the bigger issue when historical data changes. then, results january may different because data changes . can difficult track, when have deleted older data. the purpose of answer not offer solution problem (which not part of question). point out there ot

r - Zooreg frequency warning -

suppose have following set of data: date <- structure(c(1986, 1986.08333333333, 1986.16666666667), class = "yearmon") return <- structure(c(0.000827577426231287, 0.00386371801344005, 0.00382634819565989 ), .dim = 3l, .dimnames = list(c("1986-01", "1986-02", "1986-03" ))) i used following transform return array zoo/zooreg object: zooreg(return, order.by = date) it provides correct output warning: jan 1986 feb 1986 mar 1986 0.0008275774 0.0038637180 0.0038263482 warning message: in zoo(data, order.by, frequency) : “order.by” , “frequency” not match: “frequency” ignored the series strictly regular , order.by , frequency should match still couldn't figure out why there warning. according documentation ( ?yearmon ): the "yearmon" class used represent monthly data. internally holds data year plus 0 january, 1/12 february, 2/12 march , on in order internal representation same

java - Servlet exception when trying to open it -

i programmed servlet should print out 'hello world', not working correctly. i start tomcat running startup.sh in /usr/share/tomcat8/bin/startup.sh , program in folder /usr/share/tomcat8/webapps/hello/web-inf/classes/helloworld.class . this web.xml: <servlet> <servlet-name>helloworld</servlet-name> <servlet-class>helloworld</servlet-class> </servlet> <servlet-mapping> <servlet-name>helloworld</servlet-name> <url-pattern>/helloworld</url-pattern> </servlet-mapping> this source code: import java.io.*; import javax.servlet.http.*; import javax.servlet.servletexception; public class helloworld extends httpservlet { static final long serialversionuid = 42l; public void doget(httpservletrequest request, httpservletresponse response) throws ioexception, servletexception { response.setcontenttype("text/html");

python - Updating a Tkinter canvas with a list created inside a function -

Image
i'm developing gui tkinter , have been successful until now. want update canvas list created in function (inside class). have following: class gc_data_tk(tkinter.tk): def __init__(self,parent): tkinter.tk.__init__(self,parent) self.parent = parent self.initialize() self.grid() def initialize(self): self.canvas = tkinter.canvas(self, width = 600, height = 400, bg = 'white').grid(column = 5, row = 1) i want use self.result list created in following: def result(self): self.result = [] filepath = self.folder filepath1 = self.folder +"\*.csv" print filepath comps = float(self.no_comps.get()) no_comps = comps +2 files = glob.glob(filepath1) dataframes = [pd.dataframe.from_csv(f, index_col=none, header=none) f in files] new_dfb = pd.dataframe() i, df in enumerate(dataframes): colname = 'run {}'.format(i+1)

MYSQL select only users who made more than 1 record, without grouping -

i have userlogs table , query logs monitoring select from_unixtime(logdate/1000) logdate, userid, useraction userlogs logdate > subdate(now(), interval 1 day ) i want improve showing in result users have more 1 record, without grouping. example: user a made 1 record day, user b made 5 records , user c made 3 records same day. sql result show 8 columns - 5 records user b , 3 records user c . <table border='1'> <tr> <td>userid</td> <td>time</td> <td>action</td> </tr> <tr> <td>b</td> <td>11.56</td> <td>post</td> </tr> <tr> <td>b</td> <td>11.57</td> <td>delete</td> </tr> <tr> <td>b</td> <td>11.58</td> <td>comment</td> </tr> <tr> <td>b</td> <td>11.59</td> <td>delete</

php - Unable to install phalcon 2.x on VPS from 1and1 hosting -

i ran troublesome issue. i'm using 1 , 1 virtual private server redhat linux. server's default php version php 5.3. i have installed php 5.5 on server. switch php 5.5 using alias php='path php' . i run command php -v see if version has changed, indeed has - php version 5.5. however still unable install phalcon, when run command ./install -i error message: php 5.3 not supported. any ideas how resolve problem? alias not work in case because changes php path terminal, not globally. i'm not redhat user can't give exact steps kinda dirty solution find php binary (on debian in /usr/bin/ , /bin/ or /usr/local/bin ), rename example php5.3 , in place make symbolic link new php. remember php webserver (apache, nginx or whatever use) should have updated php! more, compile phalcon you'll need updated phpize , other dependencies. i'm not linux expert cannot tell parts of php5-dev did changed between php 5.3 , 5.5 , did not. alte

Problems performing backup operation using RMAN and Oracle 11g XE -

i need transfer oracle 11g databases new machine. both machines using windows 7. already found lot of descriptions how hard if not oracle expert because there information missing. what tried this: http://www.orafaq.com/forum/t/82720/ but stuck @ point start database again in "mounted" mode. after trying "startup mount" "ora-12514". so, not possible me, database in state can run backup operation in rman. also searched problem found answers not how do that. thank in advance help. you have add database listener.ora in oracle_home\network\admin sid_list_listener = (sid_list = .... (sid_desc = (sid_name = yourdatabase) (oracle_home = oracle_home) (global_dbname = yourdatabase) ) ) after have done restart listener.

datetime - extract hour from timestamp with python -

i have dataframe df_energy2 df_energy2.info() <class 'pandas.core.frame.dataframe'> rangeindex: 29974 entries, 0 29973 data columns (total 4 columns): timestamp 29974 non-null datetime64[ns] p_act_kw 29974 non-null int64 periode_tarif 29974 non-null object p_souscr 29974 non-null int64 dtypes: datetime64[ns](1), int64(2), object(1) memory usage: 936.8+ kb with structure : df_energy2.head() timestamp p_act_kw periode_tarif p_souscr 2016-01-01 00:00:00 116 hc 250 2016-01-01 00:10:00 121 hc 250 is there python fucntion can extract hour timestamp ? kind regards i think need dt.hour : print (df.timestamp.dt.hour) 0 0 1 0 name: timestamp, dtype: int64 df['hours'] = df.timestamp.dt.hour print (df) timestamp p_act_kw periode_tarif p_souscr hours 0 2016-01-01 00:00:00 116 hc 250 0 1 2016-01-01 00:10:00 121 hc 250 0

iOS Swift keyCommands Reading Numbers Only -

please consider following code: override var keycommands: [uikeycommand]? { var commands:[uikeycommand] = [] let numbers = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] number in numbers { let txt = number string commands.append(uikeycommand(input: txt, modifierflags: [], action: #selector(keypressed(_:)))) } commands.append(uikeycommand(input: "\r", modifierflags: [], action: #selector(enterpressed))) return commands } for reason numbers getting read. bluetooth barcode scann

Php trim string from array values -

i have function in class holds several arrays looks this: protected function gettextitems() { if($this->haschapters() && !$this->hasimages() && !$this->hasextras()) { return [[ 'title' => 'test1', 'position0' => ['x0' => '165', 'x1' => '400', 'y0' => '265', 'y1' => '400'], 'position1' => ['x0' => '165', 'x1' => '405', 'y0' => '265', 'y1' => '405'], ], [ 'title' => 'test2', 'position0' => ['x0' => '295', 'x1' => '400', 'y0' => '395', 'y1' => '400'], 'position1' => ['x0' => '295', 'x1' => '405', 'y0' =>

tinymce code inserting, can't get it to work -

Image
i enabled codesample plugin https://www.tinymce.com/docs/plugins/codesample/ , test entered head tag and displays in editor when save database gets saved this: <pre class="language-markup"><code>&lt;head&gt;</code></pre> when reload page in editor <pre>&nbsp;</pre> database still looks <pre class="language-markup"><code>&lt;head&gt;</code></pre> but there no head tag visible in editor. ideas why? when placing raw html <textarea> need escape html code placing in <textarea> . not doing browser (and proxy tinymce) "cleaning up" invalid markup best can. you can either: properly escape html use setcontent() api load html tinymce (as opposed injecting html <textarea> ) i suggest second option above eliminates vagaries of injecting html <textarea> . if want try first solution listed above might if using php <

excel vba - how to split certain rows from the column dynamiclly in VBA -

Image
i have column data has description , id code (bold char) it: bba-34.009876 the harmful impact of typical american diet. the number of americans recycle on regular basis. the amount of time students use on social media. the average college debt of undergraduate , graduate students. how many public schools have cut arts programs. how high school athletes succeed in college programs. how healthy average public school lunch. the number of low socioeconomic students fail state standardized testing. ccv-09.89765 a beautiful summer morning in woods. a character movie, cartoon, or book. the frightening place on planet. a personality resemble. the best place winter vacation. a holiday celebration in country. the interesting piece of art in nearest museum. describe favorite season. ffg-890.786543 your first day of school. your favorite cuisine. the experience of parachute jumping. the memory of people met when child. your ideal

python - How to install psycopg2 for use in HDInsight PySpark Jupyter notebook -

i need "import psycopg2" part of pyspark script. per documentation : !pip install psycopg2 but results in syntax error (as ! command does). i able install in ssh session /usr/bin/anaconda/bin/python, appears jupyter may using different different environment? i tried forcing os.environ["pythonpath"] in notebook no luck, mean cell in notebook: import psycopg2 results in error module can't found help("modules") not show psycopg2 help("modules psycopg2") results in following error: here list of matching modules. enter module name more help. failed write user configuration file. please submit bug report. sqlalchemy.dialects.postgresql.psycopg2 - .. dialect:: postgresql+psycopg2 sqlalchemy.dialects.postgresql.psycopg2cffi - .. dialect:: postgresql+psycopg2cffi did make typo? text 'pyscopg2' not 'psycopg2' !pip install psycopg2 for python 3.5 , python 2.7 installed on azure noteboo

ggplot2 - R xgboost importance plot with many features -

Image
i trying out kaggle housing prices challenge : https://www.kaggle.com/c/house-prices-advanced-regression-techniques here script wrote train <- read.csv("train.csv") train$id <- null previous_na_action = options('na.action') options(na.action = 'na.pass') sparse_matrix <- sparse.model.matrix(saleprice~.-1,data = train) options(na.action = previous_na_action) model <- xgboost(data = sparse_matrix, label = train$saleprice, missing = na, max.depth = 6, eta = 0.3, nthread = 4, nrounds = 16, verbose = 2, objective = "reg:linear") importance <- xgb.importance(feature_names = sparse_matrix@dimnames[[2]], model = model) print(xgb.plot.importance(importance_matrix = importance)) the data has on 70 features, used xgboost max.depth = 6 , nrounds = 16. the importance plot getting messed up, how view top 5 features or something. check out top_n argument xgb.plot.importance . want. # plot top 5 important variables. pri

javascript - Angular 2: How do you access component variables within an event (scope issue) -

i have click event on component, needs access private variables component itself. seem running scoping issue: keyword this no longer refers component's scope rather scope of event. help! onclick(event){ for(var = 0; < this.arr.length; i++) { ... } } in above example, this.arr undefined because not belong event scope. how access component scope here? add .bind(this) fix this element.addeventlistener("click", this.onclick.bind(this), false);

ocaml - How to use nix-shell properly and avoid "dumping very large path"? -

based on readings (notably the wiki , this blog post ), have come following default.nix load nix-shell : with import <nixpkgs> {}; let emacs = emacswithpackages (p : [ p.tuareg ]); in stdenv.mkderivation rec { name = "env"; src = ./.; # customizable development requirements buildinputs = [ pkgconfig ocaml ocamlpackages.merlin ocamlpackages.findlib ocamlpackages.lablgtk ocamlpackages.camlp5_transitional ncurses emacs ]; # customizable development shell setup shellhook = '' export path=`pwd`/bin:$path ''; } but prints warning: warning: dumping large path (> 256 mib); may run out of memory and takes quite long load (about 45 seconds first time call nix-shell after start-up, 2 seconds on subsequent calls). what meaning of message? when on google, find few github issues not expressed in way easy understand layman. can speed load

c# - Hololens - Access Camera Frames -

how can access frames in video stream hololens camera, when in 3d mode? i'm using c#. the unity videocapture class doesn't seem provide this: http://docs.unity3d.com/550/documentation/scriptreference/vr.wsa.webcam.videocapture.html and microsoft mediacapture class method mediacapture.startpreviewtocustomsinkasync not documented. https://msdn.microsoft.com/en-us/library/windows/desktop/ms701626(v=vs.85).aspx you can try using mediacapture framereader api documentation: https://msdn.microsoft.com/en-gb/windows/uwp/audio-video-camera/process-media-frames-with-mediaframereader#create-a-frame-reader-for-the-frame-source sample code: https://github.com/microsoft/windows-universal-samples/tree/master/samples/cameraframes

Understanding and creating Xcode storyboard XML -

i understand generated xml-file xcode storyboards. can create file myself. unfortunately can't find reference apple of how it. , after that, there way automatically create storyboard xml-file? answer question: i'm working on project have create xml-file outside xcode , load xml-file via api in app creates new view thanks in advance!

html5 - Best framework for hybrid app for instant messenger -

i wonna start develop hybrid app application has instant messages core, besides other realtime feature. having cordova , ionic. these technology right election? there module or instant messages project can use instead write new one? have @ `` firebase google have working chat application source code working demo demo con:- app tied google firebase infrastructure

regex - how to extract titles from a text file and use those titles to open other files and search for patterns -

i trying figure out perl program reads text file containing file names, opens each of files , searches them regular expression (eg ggggg). i reasoning first need read file , save array. then foreach element of array, open corresponding file , search within it. can please help? this code works (gratia chankey pathak) lines containing 1 title not needing processing: $filename = 'names.txt'; open (my $fh, "<", $filename) or die $!; while ( <$fh> ) { chomp $_; $file_contents; { open (my $fh, '<', $_) or die $!; $file_contents = ''; while (<$fh>) { $file_contents .= $_; print "matched!" if $file_contents =~ /gggggg/i; } } } but if name file full of names (few/line) separated \t? my approach below solve problem. my $filename = 'names.txt'; open (my $fh, "<", $filename) or die $!; # assu

Worklight 6.1 : jQuery autocomplete -

i need add autocomplete feature input without changing pre-bundled jquery in ibm worklight. so, tried add jquery ui, "$(...).autocomplete not function" error message displayed. any suggestion please ? make sure including jquery-ui javascript file , calling function in javascript.

python - How can I print the entire converted sentence on a single line? -

i trying expand on codeacademy's pig latin converter practice basic programming concepts. i believe have logic right (i'm sure it's not concise be!) , trying output converted pig latin sentence entered user on single line. if print inside loop prints on new lines each time. if print outside prints first word not iterating through words. could please advise going wrong? many, many help. pyg = 'ay' print ("welcome matt's pig latin converter!") def convert(original): while true: if len(original) > 0 , (original.isalpha() or " " in original): print "you entered \"%s\"." % original split_list = original.split() word in split_list: first = word[0] new_sentence = word[1:] + first + pyg final_sentence = "".join(new_sentence) print final_sentence break else:

asp.net web api - Angular2 filter observable with switchMap -

i'm doing term search using angular2 , webapi using method described in numerous angular2 tutorials. in service: search(term: string): observable<userlist[]> { return this.http.get(this.usersearchurl + term) .map((response: response) => response.json()) .catch(this.handleerror); } in component: ngoninit(): void { this.users = this.searchtermstream .debouncetime(300) .distinctuntilchanged() .switchmap((term: string) => term ? this.userservice.search(term) : observable.of<userlist[]>([])) .catch(error => { console.log(error); return observable.of<userlist[]>([]); }); } what on service side keep track of last search. if initial search "b" , search "bo" should not have make call webapi since have results need need filter down further. assume doing observables out of question/difficult since subscribe stream don't know obs

java - How to verify if an OWLDataRange object contains a specified value? -

i have ontology created in protege 4.3.0 , stored in owl file. data properties of ontology have ranges defined in following expression: ({"absent"} or {"value1" , "value2" , "value3"}) i search data properties have specified value in ranges, wrote following code sample, not know how query owldatarange object see if contains specified value (for example string "value1" ). final owlontologymanager manager = owlmanager.createowlontologymanager(); final owlontology ontology = manager.loadontologyfromontologydocument(file); final owlreasonerfactory rf = new structuralreasonerfactory(); final owlreasoner reasoner = rf.createreasoner(ontology); // ... // iterate on data properties (owldataproperty topdataproperty : reasoner.gettopdatapropertynode()) { for(owldataproperty property: reasoner.getsubdataproperties(topdataproperty, false).getflattened()) { // iterate on data ranges current data property (owldataran

unity3d - Get List of Youtube channels subscribe by current user in android? -

hello want list of channels subscribe current user in android. steps follow: 1) https://developers.google.com/youtube/v3/docs/subscriptions/list by read description, created api key android , oauth key in google developer console , tired implement following request get https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&mine=true&key={your_api_key} . can see have set part = snippet , mine = true . for authentication followed https://developer.android.com/training/id-auth/authenticate.html here code accountmanager = accountmanager.get(this); bundle options = new bundle(); am.getauthtoken( myaccount_, // account retrieved using getaccountsbytype() "manage tasks", // auth scope options, // authenticator-specific options this, // activity new ontokenacquired(), // callback called when token acquired new handler(new onerror()))

html - CSS set baseline of inline-block element manually and have it take the expected height -

i'm designing sea-sky component. i'd have it's baseline @ sea-level. here's attempt that's rendering correctly. .out { display:inline-block; background-color:yellow; padding-bottom:30px; } .outer { display:inline-block; background-color:cyan; width:100px; height:100px; position:relative; bottom:-30px ; } .inner { position:absolute; height:30px; background-color:blue; bottom:0px; width:100%; } <div class="out">hello<div class="outer"><div class="inner"> </div></div>foobar</div> the trick here set negative bottom , use padding have .out bottom @ expected position. here's happens without padding. .out { display:inline-block; background-color:yellow; } .outer { display:inline-block; background-color:cyan; width:100px; height:100px; position:relative; bottom:-30px ; } .inner

html - PHP mail function doesn't complete sending of e-mail -

<?php $name = $_post['name']; $email = $_post['email']; $message = $_post['message']; $from = 'from: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'customer inquiry'; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($_post['submit']) { if (mail ($to, $subject, $body, $from)) { echo '<p>your message has been sent!</p>'; } else { echo '<p>something went wrong, go , try again!</p>'; } } ?> i've tried creating simple mail form. form on index.html page, submits separate "thank submission" page, thankyou.php , above php code embedded. code submits perfectly, never sends email. please help. although there portions of answer apply usage of the mail() function itself, many of these troubleshooting steps can applied php mailing system. th