Posts

Featured post

css - Text drops down with smaller window -

i've adapted css use in website , can't quite figure out why 1 aspect of page acting way acting. basically, when shrink window below size horizontally, of text "drops down". becomes issue if user viewing website through ipad vertical orientation. can view issue here . i'm hoping make if window gets smaller, placement of text remains intact. the problem area not have enough space put both side navigation , content on 1 line. make automatically adjust page's width when exceeds decrements of width. this code example, , highly unlikely work. if see css more clearly, provide exact code. @media , (max-width:960px) { /* assuming #wrapper 960px across */ #content {width:560px;} /* opposed 720px */ } edit the content drops down @ 980px, have shrink width after there. @media , (max-width:980px) { #container {width:520px;} }

dns - Get domain name from IP address in Go -

i'm trying resolve host name ip address, apparently proving little more challenging thought it'd be. i've tried using couple of functions, including net.lookuphost method, of them seem returning ip address input. here's code using: package main import ( "fmt" "net" ) func main() { // obtained ping -c 1 stackoverflow.com, should print "stackoverflow.com" addr, err := net.lookuphost("198.252.206.16") fmt.println(addr, err) } for example, package main import ( "fmt" "net" ) func main() { // obtained ping -c 1 stackoverflow.com, should print "stackoverflow.com" addr, err := net.lookupaddr("198.252.206.16") fmt.println(addr, err) } output: [stackoverflow.com.] <nil>

Fallback condition in a mysql select statement -

i want put condition mysql statement. if possible? this current mysql select statement select * `validproduct` `visible` = 1 , `typeid` = 2 , `sizeid` = 3 group `productid` so @ moment, selecting products sizeid = 3. want select products size = 1, , if doesn't exist, select sizeid = 3. my validproducts table contains list of products 6 different sizes associated (which in turn have different pricing). want return of products, lowest sizeid (which have lowest price available product). not products have sizeid 1. so return data product (sizeid 1, $x); product b (sizeid 3, $y) etc here way it: select vp1.* validproduct vp1 inner join ( select productid, min(sizeid) minsize validproduct visible = true , typeid = 2 group productid ) vp2 on vp1.productid = vp2.productid , vp1.sizeid = vp2.minsize , vp1.visible = true , vp1.typeid = 2 group vp1.productid; exp

c# - Loading bar while cmd.exe is running -

what i'm trying do: pass command .cmd, show loading bar while command executes, exit cmd , display message box after progress bar full what's happening: when click button sends command, application hangs, command executed, cmd never exits after it's finished, application remains frozen (until manually close cmd.exe). have no idea how display loading bar while command executes. when loading bar full, that's when i'll display message box. my code: process p = new process(); p.startinfo.filename = "cmd.exe"; p.startinfo.workingdirectory = @"c:\" p.startinfo.windowstyle = processwindowstyle.normal; p.startinfo.useshellexecute = false; p.startinfo.redirectstandardoutput = true; p.startinfo.redirectstandardinput = true; p.startinfo.windowstyle = processwindowstyle.hidden; p.start(); p.standardinput.writeline(command_that's_called); ^ gets executed upon button_click event. things i've tried: p.waitforexit(); // still hangs

google maps - How to highlight only one state or a province using Fusion Table Search Query? -

i know how highlight whole country using google's fusion table api. wondering how highlight region within given country. this how works @ country level, looking @ region (state / province) level highlighting only. // javascript code var table_id = 655491; var query = "select 'kml_4326' "+table_id+" 'name_0' = '"+countryname+"';"; var option = { suppressinfowindows: true, query }; layer = new google.maps.fusiontableslayer(table_id, option); layer.setmap(map);

How to comparatively parse through objects inside a dictionary in C# -

so have person class contains info (firstname, lastname, mother, father, siblings, spouse) , want add people of class person dictionary. comparatively parse through dictionary determine relationship of objects (i.e. given person, find cousins, siblings, etc.). question 2 fold: 1) how should set dictionary<...> , 2) how access properties of each person in list? first tried: dictionary<string, object> dictionary = new dictionary<string, object>(); var human = person.addperson(); // person.addperson() returns new instance of person dictionary.add(human.name, human) // setting key full name, value person object. should try dictionary<string, string> <firstname, lastname> , once matches of people same name, start searching dictionary mother, father, etc.??? seems terribly slow , not right way go. edit: here person class , 1 of other classes (bear in mind i'm setting up, i'll handle user inputs, etc l

python - Selecting incorrect submenu item after hover action -

i'm developing test case in python webdriver click through menu items on http://www.ym.com , , particular 1 meant go through menu item , click on sub-menu item. when running test, looks tries access nested menu items, never clicks on final item. here code go through menu: food = driver.find_element_by_id("menu-item-1654") hov = actionchains(driver).move_to_element(food).move_to_element(driver.find_element_by_xpath("/html/body/div[4]/div/div/ul/li[2]/ul/li/a")).click() hov.perform() the problem here trying click "recipes" submenu "food" menu, happens submenu "france" being clicked under menu "travel" situated right next "recipes. i've tried using find_element_by_id, find_element_by_css_locator, find_element_by_link_text seems select france submenu under travel , not recipes submenu under food. any ideas? edit i using python code run test now: food = driver.find_element_by_xpath("//a[contain