Posts

html - Center link in an unordered list element (flexbox) -

i've been playing around flex box , center "logo" test in upper left corner vertically in blue container. you can see here: http://codepen.io/timros/pen/mwkngw * { margin: 0; padding: 0; } .box { color: white; font-size: 80px; text-align: center; text-shadow: 4px 4px 3px black; } /* colors & style ===================================== */ .main-header { background: #e3e3e3; } .main-footer { background: #e3e3e3; } .main-content { background: #e3e3e3; } .main-wrapper { box-shadow: 2px 2px 10px #333; } .main-wrapper { width: 80%; margin: 0 auto; } /* head ===================================== */ .main-header { width: 100%; height: 100px; border-bottom: 1px solid black; } .main-nav { list-style: none; display: flex; flex-flow: row wrap; justify-content: flex-end; align-items: flex-end; height: 100%; } .main-nav li { margin-left: 8px; margin-right: 8px; ...

javascript exceptions, not caught by debugger after installing typescript 1.4 with VS 2013 -

javascript exceptions, syntax errors not caught debugger after installing typescript 1.4 vs 2013. an example of code ("whaever" doesn't exist - it's fake object , function): whatever.show("something"); debugging in .ts files works fine, code sits in .js file unrelated typescript. should caught vs debugger when trying execute it. instead, stops executing js code current file , skips after code above without throwing exceptions. i've tried uninstalling, repairing, reinstalling typescript - , uninstalled/reinstalled vs2013. anyone else encountered issue? you may need update version of typescript project using. set 1.0, should set 1.4 or whatever version of compiler have installed. might confusing tooling or failing build entirely. in project file: <typescripttoolsversion>1.0</typescripttoolsversion> another potential issue if map files not set output during compilation: <typescriptsourcemap>true</typesc...

Displaying list in Android fragment -

i got fragment should display list every time try display list previous activity displayed in background. so question is, how display list on empty page? can put instead of getactivity() in arrayadapter. my xml looks this: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <listview android:id="@+id/fundraiser" android:layout_width="match_parent" android:layout_height="wrap_content" > </listview> and code looks this import android.os.bundle; import android.support.v4.app.listfragment; import android.view.view; import android.widget.arrayadapter; import android.widget.listview; import android.widget.toast; public class fundraiserfragment extends listfragment{ string[] values = ...

Force C++ source file to implement header file in Visual Studio -

is there plugin or option force *.cpp file "implement" *.h file? way *.cpp file not compile unless declared methods implemented. compiles when implementation missing , if project static library builds successfully. i know have problems templates fine force implementation of non-template methods.

java - Palette (Android Support v22) doesn't generate Swatches -

first of all, never used palette, when wanted start it, see tutorials , blogs talk v21 , not v22. my problem have swatch (in position 0 of swatch's array [palette.getswatches().get(0)]) returns black (title , body), here example i'm using this, maybe it's wrong i'm copying https://developer.android.com/reference/android/support/v7/graphics/palette.html palette.from(bitmapfactory.decoderesource(getresources(),r.drawable.prueba2)).generate(new palette.paletteasynclistener() { @override public void ongenerated(palette palette) { text.settextcolor(palette.getvibrantswatch().getbodytextcolor()); text.setbackgroundcolor(palette.getvibrantswatch().gettitletextcolor()); } }); when start app (i have activity textview , imageview) closes saying this caused by: java.lang.nullpointerexception: attempt invoke virtual method 'int android.support.v7.graphics.palette$swatch.getbodytextcolor()' on null obj...

Android Change Font Menu Items -

Image
im trying change font of menu items custom font. in action bar dropdown menu couple of options. when pick 1 these options, title of item in actionbar changes optiontext , apply font. because applied te font in overrided 'onoptionitemselected(menuitem item)'. want font applied when menu gets created (it uses default font right now). attempted in 'oncreateoptionsmenu(menu menu)', keeps giving me error (null pointer exception). tried multiple overrided methods, nothing seems work. how can custom font applied menu item when it's been created? here code: @override public boolean oncreateoptionsmenu(menu menu){ log.d("graphactivity", "oncreateoptionsmenu"); menuinflater inflater = getmenuinflater(); inflater.inflate(r.menu.menu_graph, menu); optionmenu = menu; boolean daymatch = user.getinstance().getdownloadedday() == user.getinstance().getcurrentday(); boole...

php - CakePHP 2 Internal Server Error -

before moving on want mention have tried answers in web in vain. i tasked investigating why our cakephp-based website no longer working on our staging server. when loading site @ times loads completely, when logging user in takes forever authenticate such produces internal server error . step 1: have checked cache directory both persistent , models , clean. step 2: configure::write value debug set 2. nothing gets written on error.log file. could have session data? trying figure out what's going on , have tried looking lib folder cake see if can edit files in there see website outputs instead of internal server error message. file should edit in there? followed this link seems core different version. it turned out there issue sap server connection kept pages on loop until timeout resulting internal server error. evident of fact live website working fine. i think best solution tweak sap server connection component such doesn't timeout requests. as lack kn...