Posts

Showing posts from September, 2012

twitter bootstrap 3 - How to vertically align radio buttons -

i have following markup: <div class="container-fluid"> <h2>transfer options:</h2> <div class="row well-sm"> <div class="col-xs-6"> <div id="sendtyperadio" class="btn-group-vertical" > <span class="input-group-addon"> <input id="radioemail" type="radio" name="sendtype" value="email" disabled>email </span> <span class="input-group-addon"> <input id="radioattachments" type="radio" name="sendtype" value="attachments" disabled>attachments </span> <span class="input-group-addon"> <input id="radioboth" type="radio" name="sendtype" value="both" disabled>email , attachments </span>

internationalization - Maximum number of saved embedded form in Symfony 1.4 -

i can't save more 67 widgets on one-to-many form symfony 1.4 embedded element table embeds i18n translation table. saves correctly cannot save more 67 records. the structure is: main > element > i18n 1 main got several elements translated. if there's limit on number of updates/insert? thank you the problem in max_input_vars parameter in php.ini configuration file. 1000 post sending more 1000 variables.

sass - Rails Assets precompile is too slow ~12hrs -

i local precompile assets like this rails_env=production bundle exec rake assets:precompile , it's slows 12hrs. don't know happen! , don't know how start something. when make changes in stylesheet files, these delay around 10s please can me, thanks! this applications.css.scss @import "_font-awesome"; @import "jquery.ui.core"; @import "jquery.ui.theme"; @import "datatables/src/demo_table_jui"; @import "token-input-facebook"; @import "fullcalendar"; @import "fullcalendar.print"; @import "bootstrap"; @import "bootstrap-multiselect"; @import "bootstrap-datetimepicker"; @import "header"; @import "sub_header"; @import "students"; @import "people"; @import "institutions"; my gemfile: gem 'sass-rails', '>= 3.2' gem 'bootstrap-sass', '~> 3.0.3.0' its versions: bootstrap-sa

ios - dismissViewControllerAnimated didn't work if monitor is connected -

i have main view controller , use these following code show next view , dismiss view.they working if there no external monitor attached. if attached, can't dismiss view controller although can present view controller. how shall do? [[[[uiapplication sharedapplication] keywindow] rootviewcontroller] presentmodalviewcontroller:navcontroller animated:yes]; [[[[uiapplication sharedapplication] keywindow] rootviewcontroller] dismissviewcontrolleranimated:yes completion:null]; this external monitor view. externaldisplayhandler = [[externaldisplayhandler alloc] init]; externaldisplayhandler.delegate = self; if(externaldisplayhandler.monitorexists) { //other code nslog(@"externaldisplayhandler.monitorexists"); [externaldisplayhandler.contentview addsubview:viewonmonitor]; nslog(@"tv attached"); } i remember there other ways too. change combination. [self presentviewcontroller:lmvc animated:yes completion:nil]; [self.presenti

How to pick the latest file to archive in a folder in batch file -

i have multiple files in folder date-wise like: accnt20140127,accnt20140128,accnt20140129,accnt20140130,accnt20140131 etc i want pick latest file ie. accnt20140131 , copy seperate folder. can please me on this. for /f "tokens=*" %%f in ( ' dir /o-n /b /a-d "c:\folder\accnt*"' ) ( set "filename=%%f" & goto done ) :done echo "%filename%" ordering filename, descending, first file latest. take name , exit for

android - What is difference between FragmentActivity and Activity? -

i have used in basic code replace activity fragment activity,but have not got kind of error.application has working. as seen in documentation: fragmentactivity base class activities want use support-based fragment , loader apis. activity an activity single, focused thing user can do. activities interact user, activity class takes care of creating window in can place ui setcontentview(view). while activities presented user full-screen windows, can used in other ways: floating windows (via theme windowisfloating set) or embedded inside of activity (using activitygroup) can see more @ : http://developer.android.com/reference/android/support/v4/app/fragmentactivity.html

java - passing data from sqlite to a texview -

i trying pass data sqlite table username textview in home fragment class, having difficulties displaying data in textview. here databasehelper class table created: public class databasehandler extends sqliteopenhelper { // static variables // database version private static final int database_version = 1; // database name private static final string database_name = "u168512214_barzd"; // login table name private static final string table_login = "login"; // login table columns names private static final string key_id = "id"; private static final string key_name = "name"; private static final string key_email = "email"; private static final string key_uid = "uid"; private static final string key_created_at = "created_at"; public databasehandler(context context) { super(context, database_name, null, database_version); } // creating tables @override public void oncreate(sqlitedatabase db) { stri

javascript - jQuery Tables, Clickable Dropdown - multiple hidden rows? -

good day programmers, being amateur, hunted around , found created nice jquery drop-down table. found terrific one... $("#report tr:odd").addclass("odd"); $("#report tr:not(.odd)").hide(); $("#report tr:first-child").show(); $("#report tr.odd").click(function(){ $(this).next("tr").toggle(); $(this).find(".arrow").toggleclass("up"); }); and css... #report { border-collapse:collapse;} #report h4 { margin:0px; padding:0px;} #report img { float:left;} #report ul { margin:10px 0 10px 40px; padding:0px;} #report th { background:#222222 url(header_bkg.png) repeat-x scroll center left; color:#fff; padding:3px 8px; text-align:center;} #report td { background:#111111 none repeat-x scroll top left; color:#000; padding:3px 8px; text-align:center;} #report tr.odd td { background:#000000 url(row_bkg.png) repeat-x scroll center left; cursor:pointer;} #report div.arrow { background:transparent url(arro

imageview - Why does the Image Picker in my Android app rotate automatically portrait images into landscape? -

i'm using code in android app launch camera/gallery image, , display imageview. when user picks image landscape orientation everythings works fine, when user picks portrait image, image displayed rotated 90 degrees. can't understand why..i'm testing app on galaxy s3 android 4.3 i've noticed problems occours when picture taken phone..maybe problem s3? this code: private void openimageintent() { // camera. system.gc(); final list<intent> cameraintents = new arraylist<intent>(); final intent captureintent = new intent(android.provider.mediastore.action_image_capture); final packagemanager packagemanager = getpackagemanager(); final list<resolveinfo> listcam = packagemanager.queryintentactivities(captureintent, 0); for(resolveinfo res : listcam) { final string packagename = res.activityinfo.packagename; final intent intent = new intent(captureintent);

java - no error raised by compiler but not getting the correct answer in character occurrence program -

string s1=t1.gettext(); char ch=t2.gettext().charat(0); int a=0; int i=0; for(i=0;i<s1.length();i++) { if(s1.charat(i)==ch) a++; }t3.settext(""+a); this code t1,t2,t2 textfields. compiler doesn't raises error repeatedly getting 1 result no matter whatever character @ whatever place use. please help!!! string s1="hello world"; char ch= 'o'; int a=0; for(int i=0;i<s1.length();i++){ if(s1.charat(i)==ch){ a++; } } system.out.println(""+a); works perfectly. however, if not provide character exists in s1 you not result.

get stock of selected simple in magento -

i wondering if possible stock of selected item ( i.e. in dropdown) in configurable product. if example have shirt, multiple simples represent sizes. when select small, want stock of small shirts. if change selection medium, stock of medium shirts. notice there no page refreshing. i've done similar, extended mage_catalog_block_product_view_type_configurable, getjsonconfig() method, provides data dropdowns on configurable product. something this: class graphicalliance_stockvalues_block_catalog_product_view_type_configurable extends mage_catalog_block_product_view_type_configurable { public function getjsonconfig() { $config = parent::getjsonconfig(); $config = mage::helper('core')->jsondecode($config); foreach ($config['attributes'] $attid=>$attinfo) { foreach ($attinfo['options'] $key=>$attoption) { // stock value per product $stocks = array(); foreach

mod security - mod_security2 rules for WordPress -

are there standard (?!) mod_security2 rules servers wordpress websites? want make clear i not want disable mod_security2 (it exists reason). want make life little bit easier when working wordpress installations. i have read http://wpsecure.net/2012/01/using-mod_security-2-with-wordpress/ great hear more opinions people using mod_security2 & wordpress . because no expert on this, there documentation read on following... <locationmatch "/wp-admin/post.php"> secruleremovebyid 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006 secruleremovebyid phpids-17 secruleremovebyid phpids-20 secruleremovebyid phpids-21 secruleremovebyid phpids-30 secruleremovebyid phpids-61 </locationmatch> <locationmatch "/wp-admin/admin-ajax.php"> secruleremovebyid 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006 secruleremovebyid phpids-17 secruleremovebyid phpids-20 secruleremovebyid phpids-21 se

Call gnuplot.exe without command prompt popping up & stealing focus of top window -

ok guys, please me. how call "gnuplot.exe" within program without a) showing cmd window half second, , b) not window in focus on top, 1 below. so not screw shit through showing cmd.exe, messes around top window. i tired call through start /min gnuplot.exe cmdfile start gnuplot.exe cmdfile cmd.exe /c "start /min gnuplot.exe cmdfile" cmd.exe /c "gnuplot.exe cmdfile" all system() , createprocessa sw_hide; startf_useshowwindow && create_no_window when use 1. approach within command promt there no additional cmd. if use 2. createprocess @ least not steal top window's focus. btw: tried gnuplot.exe, pgnuplot.exe & wgnuplot.exe thanks in advance without knowing exact details of trying do, need here gnuplot's -persist option. keep gnuplot running after command executed. gnuplot.exe -persist cmdfile

stored procedures - Database gets updated before SaveChanges is called in Entity Framework -

i trying use ef insert stored procedure as have no direct access table . understanding database should not updated until savechanges() called in code database updated insert happens. in case, 4 database calls made. how make have 1 database call , update multiple records? this may classed database-first ef? stored procedure imported function edmx in normal way. code sample: public actionresult index() { list<product> products = new list<product> { new product() { title = "coca cola", description = "good"}, new product() { title = "apple", description = "fruit"}, new product() { title = "orange", description = "fruit"}, new product() { title = "banana", description = "my favourite"} }; efwithsptest context = new efwithsptest(); foreach(var p in products) { context.insert(p.title, p.de

c++ - Calling function via pointer -

here simple code #include<iostream.h> #include<stdlib.h> #include<conio.h> void (*func[2])(int); void main(int n=1) { int i; cout<<endl<<n; func[0]=&exit; func[1]=&main; i=++n<=10; (func[i])(n); } here satisfied output (i.e. 1 10 in different lines). thing confused me why global pointer of type void (*ptr[2])(int). if possible, please explain in simple words why pointer taken specifically it's not pointer, it's array of 2 pointers. this function: void func(int); this pointer function: void (*func)(int); and array of 2 pointers functions: void (*func[2])(int); so func[i] points exit if i 0 (i.e. if n greater 10), , points main otherwise, i 1. note you're not allowed call main recursively this, nor give main signature other int main() or int main(int, char**) . (at least, that's case in modern c++; these rules presumably don't apply prehistoric dialect compiler

ios - MCSession takes a long time to dealloc -

i'm using multipeer-connectivity. when session ends, app comes main menu , network stuff released deallocated. but dealloc method called in main thread , mcsession object takes long time release itself, don't know why, , consequently main menu screen freezes. if know why mcsession long, i'm interested. if comes mcsession itself, solution this? -(void) dealloc { //... other release dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_default, 0), ^{ [_session release]; _session = nil; }); [super dealloc]; } edit: nope, it's not solution, because makes app crashing. anyway, other ideas? when call [_session release] since _session ivar, compiler replace line [self->_session release] , block retain self instead of ivar _session . here have 2 problems: trying retain object(self) deallocating. when queue executed, it'll call self deallocated. the following solution create local variable p

Git submodule update: reference is not a tree... but commit IS there -

first of all: yes, i've checked this thread inside out - situation different. we have 3 modules here: an application a its base library b (a submodule of a ) a component c (a submodule of b ) when trying git clone --recursive https://url_of_a/ , error when git attempts fetch c : cloning 'path/of/c'... [...] checking connectivity... done fatal: reference not tree: 92405dd9027a2d55d9dd6f5b26494eee0009e297 unable checkout '92405dd9027a2d55d9dd6f5b26494eee0009e297' in submodule path 'path/to/c' but guess what, there's no error when git clone --recursive https://url_of_b/ - though the revision check out same : cloning 'path/of/c'... checking connectivity... done submodule path 'path/to/c': checked out '92405dd9027a2d55d9dd6f5b26494eee0009e297' ... though remote pathes c same! what's more puzzling: behavior observed @ windows 7/8 machines (so far, @ least). windows vista/xp machines somehow deep clon

jsf regex any letter character, multiple letters -

i want validate 'name' field in jsf. need write regex allow character (unicode), no numbers or special symbols. found \p{l} matches single code point in category "letter". but doesn't work. plus, how did rewrite match array of chars? cheers. add + modifier after: \p{l}+ that means 1 or more letters.

c# - call status in at command -

i able dial gsm modem @ command "atd". failed detect status (i.e. whether dialed number ringing or else). here code- code dialing- modemport.writeline("atd" + number + ";\r\n"); code getting status- private void modemport_datareceived(object sender, serialdatareceivedeventargs e) { string rcvddata = modemport.readline(); } the variable rcvddata contains following string- ^orig:1,0 ^conf:1 i using huawei e1550 modem. any help?

Puting attributes to the <html> root-element with xslt 2.0 -

is possible put xml:lang or lang attribute html root-element <html> using xslt 2.0? the problem is, allowed attributes xsl:stylesheet are: id , exclude-result-prefixes , extension-element-prefixes , version , of course xmlns . other attributes being ignored xslt-processor. there must way extend element <html> hope? thanks lot. code (xhtml in case): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="2.0" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tst="http://www.ma-buwi-fh.de" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <xsl:output method="xhtml" encoding="utf-8" indent="yes" doctype-public='-//w3c//dtd xhtml 1.1//en' doctype-system='http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd' /> the result looks this:

Rails 4: get data from many to many join table -

i did research. rails 3 use :select inject sql it, deprecated in rail 4. how can archive easily? for example in following models. want boss.employees[0].salary models class boss < activerecord::base has_many :employments has_many :employees, :through => :employments end class employee < activerecord::base has_many :employments has_many :bosses, :through => :employments end employments migration: class createemployments < activerecord::migration def change create_table :employments |t| t.integer :boss_id t.integer :employee_id t.decimal :salary t.timestamps end end end ok. found something. class boss < activerecord::base has_many :employments has_many :employees, -> { select('employees.*, employment.salary salary') } :through => :employments end

java - How to use cache with queries on different fields/keys? -

i implementing spring mvc based web application have added caching, face problem in terms of how operate on cache when changes applied underlying database. i have been studying documentation available @ ehcache ( http://ehcache.org/documentation ), failed find examples solve problem. let's have dao class have chosen apply cache on 2 methods return list of objects (non-compileable pseudocode): @repository public class myentitydao { @autowired datasource ds; @autowired ehcachecachemanager cachemanager; @autowired cachekeygenerator keygenerator; @cacheable("myentitycache") public list<myentity> findbyfieldalpha(string fieldalpha) { return ds.query("select * myentity fieldalpha = #fieldalpha").execute(); } @cacheable("myentitycache") public list<myentity> findbyfieldbeta(string fieldbeta) { return ds.query("select * myentity fieldbeta = #fieldbeta").execute(); } publ

dialog - How to save window position in Intellij Idea -

when open file structure dialog (that can opened @ ctrl + f12 shortcut) in start position on monitor have problem. i try drag , drop window comfort position. after close him ( think helps, it's not)- the dialog showing in start position , not in position related on decision . how can save dialog position? because it's irritation. the following worked me on android studio 2.2.3, should intellij idea: on menu bar: window > store current layout default + update ( 2017 - sep - 24 ) when using windowed mode above failed. had following. first, choose tool window setting up. example 1: project . left -click item show it right -click item , select windowed mode choose window position like left -click again, close it. to make sure, left -click again, open it. finally, select on menu bar window > store current layout default restart ide check, should work. this tested on androidstudio 2.3.3 , intellij idea 2017.2.4 2 monitor screens (di

javascript - Jquery Mobile Autocomplete with Ajax and Knockout JS is not Updating Layout -

Image
i trying update radio buttons knockout js. retrieve data ajax call similar example . works far. data retrieved , passed model. , list generated. the problem jquery not "skining" radio list. (upper part on image) working parsed json-string works fine. (lower part on image) any ideas? thanks code: html <fieldset id="mylist" data-role="controlgroup" data-bind="foreach: myvals"> <label data-bind="text:$data, attr: { for:'vals'+$data}"></label> <input type="radio" data-bind="checked:$root.selectedvals, value:$data ,attr: {name: 'list', id:'vals'+$data}" > </fieldset>... javascript // knockout function viewmodel() { self = this; self.myvals = ko.observablearray(); self.selectedvals = ko.observable(); } var vm = new vie

android - Can not center the action bar title when the icon is shown -

the problem center action bar title , keep button @ same time. however, found title not center if icon shown. try align parent right , works, when try center in parent fail, still @ right of icon not @ center of action bar fragment on create view: actionbar ab = getactivity().getactionbar(); ab.setdisplayshowcustomenabled(true); ab.setdisplayshowtitleenabled(false); ab.seticon(r.drawable.share_btn_home); layoutinflater inflator = (layoutinflater) getactivity().getsystemservice(context.layout_inflater_service); view v = inflator.inflate(r.layout.action_bar, null); textview title = (textview) v.findviewbyid(r.id.action_bar_title); title.settext(r.string.how_to_header); ab.setcustomview(v); ab.setdisplayhomeasupenabled(true); ab.setdisplayshowhomeenabled(true); ab.show(); xml <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://sche

c# - LinkedIn windows phone oauth2 without uri -

i want windows phone 8 app uses linkedin in order search companies , contacts. need access token and, that, need authorization code. as far have read, linkedin api uses oauth2 , url authorization code following: https://www.linkedin.com/uas/oauth2/authorization?response_type=code &client_id=your_api_key &scope=scope &state=state &redirect_uri=your_redirect_uri the problem redirect uri parameter. don't want that, because want authorization code, , token code. do know if there way avoid redirecting? or using kind of redirect doesn't bring other webpage? i decided use custom host, problem solved.

java - Android Launcher3 - Google Now Page -

Image
i downloaded launcher3 (google's kitkat launcher) 4.4 sources. i imported eclipse . got rid of errors.and launcher works pretty good. but missing. "google now" page when scroll left. i can't activate google now.anyway don't need that. want put own fragment or layout first page , other pages work same normal launcher. google's experience launcher(kitkat launcher of google)'s google page .. like : i added layout : here original codes workspace.java public long insertnewworkspacescreen(long screenid, int insertindex) { if (mworkspacescreens.containskey(screenid)) { throw new runtimeexception("screen id " + screenid + " exists!"); } celllayout newscreen = (celllayout) mlauncher.getlayoutinflater().inflate(r.layout.workspace_screen, null); newscreen.setonlongclicklistener(mlongclicklistener); newscreen.setonclicklistener(mlauncher); newscreen.setsoundeffectsenabled(false);

c# - Using the indexer of HttpResponse.Cookies will add a cookie to the response and to the request. What is the idea behind this? -

i realized this, when website returned empty cookies, after had replaced legacy code usage of httpcontext.response.cookies via indexer. example: httpcookie objcookie = httpcontext.response.cookies["trackingid"]; line add cookie named "trackingid" response , request, if not exists yet. to me sort of surprising have never expected such drastic behavior simple get-call on indexer; especially, when collection has dedicated "add"-method. also, indexer has setter. the documentation says: after add cookie using httpresponse.cookies collection, cookie available in httprequest.cookies collection, if response has not been sent client. i found way avoid problem. question is: why make class behave way?

angularjs - How to start a new project with MEAN and sails.js -

i have created web app node.js, express, , angular.js in past. starting new project , want use mongodb. mean stack. using mean, start project this: http://mean.io/ . now, have written rest api's in past , have heard sails.js sounds compelling. can automatically create rest api's you. so question is, what steps follow start new project mean stack , sails.js ? options: would clone mean.io stack, run npm install , npm install sails.js? or, seems sails.js has it's own idea of directory structure. install sails.js per instructions http://sailsjs.org/#!getstarted , npm install angular , mongo? (i think not need mongoose since sails.js has own orm, waterline). i going try option 2 today, glad know steps have worked others. thank much! you on right path npm install -g sails , sails new myproj . since want use mongo, need install waterline adapter mongo (in project dir) npm install sails-mongo --save , configure sails use mongo. add mongo conf

node.js - Does Sequelize support Insert on duplicate key update? -

is there model or instance method perform insert or update, depending on whether or not record exists? preferably making use of mysql's "insert on duplicate key update" syntax? they have added feature upsert or insertorupdate /** * insert or update single row. update executed if row * matches supplied values on either primary key or unique * key found. note unique index must defined in sequelize * model , not in table. otherwise may experience unique * constraint violation, because sequelize fails identify row * should updated. */ model.upsert({uniquekey: 1234, name: 'joe'}).then(function () { // cheer joy });

IOS api call continuously -

if have app in user can set remainders when there new article in blog. , can find out if there new article in blog sending api request. how should make app continuously send requests api. there other way or should keep sending requests api continuously. , if in how time interval should send it. thanks in case delegating check updates sort of server side ideal. server side logic send push notifications clients.

razor - Is _AppStart.cshtml an official part of ASP.Net MVC? -

_appstart.cshtml not mentioned often, , when is, seems mentioned part of webmatrix / asp.net web pages opposed mvc proper. furthermore, this high-scoring stackoverflow answer claims _appstart.cshtml "is not used in mvc." seems either misleading or not true, because if create new empty mvc4 application in visual studio , put in _appstart.cshtml: @{ throw new exception("uh oh!"); } your website doesn't work. so what's "official" recommendation on using _appstart.cshtml? oversight works? or deprecated in mvc5? (i'm hoping it's not deprecated or frowned-upon because seems convenient way allow site-wide configuration changes without re-deploying /bin , without dealing global.asax or web.config.) it's official part of web pages framework razor view engine based on. it's part of web pages 3 (which mvc 5 uses) previous versions of web pages. there no reason why cannot use _appstart.cshtml in mvc.

javascript - Calculate possible lines from points -

Image
i trying check points positions , detect whether in line, output object containing possible lines. questions: is best way it? efficient having 4 loops? i getting duplicates matching points within double loop, what's best way remove those? if wanted detect shapes e.g. square (90 degrees angles), equilateral triangle (60 degrees angles) etc, how extend it? if wanted advanced detection of patterns in point data e.g. 1 point @ 90 degrees 1km, 1 point @ 100 degrees 1.5km, 1 point @ 110km 2km etc. match be: every 5 degrees distance increases +50km. how enable that? here js fiddle of got to: http://jsfiddle.net/kmturley/raqxf/1/ we know long , lat co-ordinates of points 1 - 5. , want calculate red lines between them. starting point data: var points = [ { name: 'point 1', lat: 51.509440, long: -0.126985 }, { name: 'point 2', lat: 51.509453, long: -0.126180 }, { name: 'poin

python - PyQt5 without QtGui and QtWidgets -

i trying build pyqt5 virtualenv there no qtwidgets package or module or whatever should be. , can't import qtgui. how try build it: python configure.py --qmake=/opt/qt/5.2.0/gcc_64/bin/qmake make make install pyqt5 install using python3-sip standard package i faced same problem yesterday. solved on ubunutu 13.10 removing python3-sip package pyqt5 installation seemed refer to. sudo apt-get remove python3-sip and cleanup : sudo apt-get autoremove then install again sip 4.15.5 & pyqt5 in fresh environments (make clean) or restore source directories. note : pyqt5 libraries (graphic based) lake me after installation. had install libgl1-mesa-dev package before re-installing. hope you.

ios - iPhone tel link not working - Sencha Framework -

i adding call button mobile site <div class = "button page1" <div class = "phone-button"> <a href = "tel:8885555555"> <span class = "button"> <span class = "phone-img"></span> <span class = "button-text">call</span> </span> </a> </div> </div> other minor css differences, call button div's same throughout site. button works fine on 1 page, other instances, when call button clicked number pops second , disappears bringing html in 'cancel/call' pop-up instead of phone number. button works on other phones, know why it's not working in mobile safari? update: site uses sencha touch framework, , found old forum posts bug there ( http://www.sencha.com/forum/showthread.php?153341-tel-link-does-not-work-on-ios-with-st-2.x !), can't find recent. solutio

python - how to open a child window? -

please fix script. import tkinter def winmake(parent): win = tkinter.frame(parent) win.config(relief = 'sunken', width = 340, height = 170, bg = 'red') win.pack(expand = 'yes', fill = 'both') msg = tkinter.button(win, text='press me', command = addformopen) msg.pack() def addformopen(): addform = tkinter.toplevel(root) label(addform, text = 'ertert').pack() print('fff') root = tkinter.tk() winmake(root) root.mainloop() after clicking on button "press me" should open child window. console displays error message: exception in tkinter callback traceback (most recent call last): file "c:\python33\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) file "c:\python33\projects\dvd_lis\p3_dvd_list_shelve_3d_class_edit_menubar\q.py", line 13, in addformopen label(addform, text = 'ertert').pack() nameerror: global name 

facebook - AddThis on SharePoint Page Layout -

i have integrated addthis share buttons on sharepoint2013 page layout. problem when page doesn't consist image, facebook shares on facebook page "spcommon.png" 15 hive. /_layouts/15/images/spcommon.png there way prevent happening, when page doesn't have image, no image gets posted on facebook page. samples: posts spcommon.png http://www.uhn.ca/corporate/news/pages/uhn_accreditation_2011_success.aspx posts page image: http://www.uhn.ca/corporate/news/pages/ask_expert_h1n1.aspx thanks in advance help. i have facing same problem. figure out how pass our custom image try below url http://www.facebook.com/sharer/sharer.php?u=http://enjoymicrosoftsharepoint.blogspot.in/2016/06/how-to-set-item-level-permissions-using.html&picture=http://sharepointsite/publishingimage/akshay.jpg please change property above url u = sharepoint page url picture= image url sharepoint site

Android Blur with RenderScript -

i try make gaussian blur on android bitmap error: rsassert failed: !mtypes.size() , rsassert failed: !melements.size() here code : public bitmap blurbitmap(bitmap src) { bitmap outbitmap = src.copy(src.getconfig(), true); final renderscript rs = renderscript.create(this); final allocation input = allocation.createfrombitmap(rs, src); final allocation output = allocation.createfrombitmap(rs, outbitmap); final scriptintrinsicblur script = scriptintrinsicblur.create(rs, element.u8_4(rs)); script.setradius(25f); script.setinput(input); script.foreach(output); output.copyto(outbitmap); rs.destroy(); return outbitmap; } note used android.support.v8.renderscript ensure compatibility android lower versions. someone have idea fix it? thanks. martin the element arguments of scriptintrinsicblur should same of allocation's element, should use allocation.getelement() , rather direct element.u8_4(rs) . fin

javascript - jQuery: How to join sets of selected elements? -

i must missing because i've looked around , can't find simple answer this. i have many jquery objects i'm constructing programmatically: var jq1 = $('#stuff'); var jq2 = $('p.error'); var jq3 = $('<span>hey!</span>'); /* , on */ question : how create jquery object concatenation of these objects? i know can use .add() method add single jquery selection, in loop , add these elements 1 one, creating new object each iteration. doesn't jquery have way join of these without creating bunch of new objects? update : tried keep generic, give more context, want generate unknown number of elements in third line. generated elements of unknown type. inject them in dom, of know nothing about, , still need have jquery object containing elements manipulate them later. you can construct jquery object using array: var jq1 = $('#stuff'); var jq2 = $('p.error'); var jq3 = $('<span>hey!</span>

jquery - Keep tooltip inside of parent container -

Image
i using jquery ui tooltip in web app. default position of tooltip bottom-left of 'tool-tipped element'. however, when tooltip not fit in browser window, switches bottom right. this behavior great, rather determining whether position tooltip bottom right or bottom left based on width of browser window, determine based on width of parent container, tooltips not display outside of area determine. please note aware of how control position manually api, looking away control logic of positioning globally. $(function() { $( '#bodyinner' ).tooltip(); }); this far have done. you can achieve related positioning of tooltip using position option in jquery ui tooltip. jquery ui position option contain many further options such my , at etc. once such option within . can used limit position of element within another. here, tooltips position can contained within parent element initializing tooltip follows. $( '#bodyinner' ).tooltip({ posit

Lua, find string.match , take second variable and do a hex and then match it -

i string message /whisper the string contains password:name:nameinhex i want find first variable in string , compare password trigger , if trigger == first variable in string continue nr4 in list. i want find second variable in string, name , convert hex. i want compare name nameinhex , if true, continue invite person using chat command /invite split string when reach each colon, , store them respective variables. have logic process each once have them stored in variable http://lua-users.org/wiki/splitjoin

Format table to repeat header row in ms word html -

i'm looking mso style code tells table repeat header row across pages. my web app creates html page basic table. using cfcontent , cfheader, when page opened in ms word. after open file, can modify table properties header row repeated. can save file html, re-open , header row repeat. examining html, don't see difference between table header row repeating , table isn't. here, difference expressed putting repeating rows inside <thead> element - i.e. not using style name @ all.

html - CSS one column layout of relative width -

i'd need website layout behave this: if content div wider 50em, apply rules width: 75%; max-width: 75em . otherwise, max-width: 50em; min-width: 25em apply. primary reason setup wide screen panels vs. laptops , mobiles. content horizontally centered. if div 75% wide, kill layout on phones, , make long, unreadable lines on wide screens. use @media queries. made things this. @media screen , (min-width: 50em) { #div { width: 75%; max-width: 75em; } } more info http://css-tricks.com/css-media-queries/

java - Randomly generating numbers at the click of a JButton when a new JPanel is called -

i learning java , have chosen project both fun, yet semi challenging. project based upon old 70s - 80s game once played kid, called dopewars. this second attempt @ building game, first attempt made putting code within 1 .java file, successful point of having stop result getting lost within mountains of code. my second attempt, tried break code logical sections, shared between many, small sized .java files. thought method alot easier handle have found has created many more problems else. what should happen: when navigating through running application, user prompted select his/her player. default starting country, user can purchase/sell of fine products on offer. user can press 'travel' jbutton (xx), choose destination pressing lets england jbutton(teng), , shipped off chosen destination reap rewards of investment. user lucky enough find deal on product on offer @ new destination aswell. my problem: ever try cannot travel new destination. when click country want go