Posts

Showing posts from May, 2014

jquery - Ajax.IsAjaxRequest() always returns false? -

in controller class code "if(request.isajaxrequest())" returns false... can me figure out? if use ajax.beginform in cshtml page , not use jquery file returns true. this cshtml file <form method="get" action="@url.action("index")" data-otf-ajax="true" data-otf-target="#listofdata"> <input type="search" name="searchterm"/> <input type="submit" value="search"/> this controller logic: public actionresult index( string searchterm) { var departments = db.departments.include(d => d.administrator); if(request.isajaxrequest()) { if (searchterm != null) { var departments2 = db.departments.where(x => x.name.contains(searchterm)); return partialview("_department", departments2.tolist()); } } return view(departments.tolist())

java - Javafx: Difference between javafx.concurent and Platform.runLater? -

i'm curious difference between javafx.concurent , platform.runlater multithreaded javafx programming. does mean javafx.concurrent, can have multiple actual drawing threads or end on 1 thread anyway? e.g 1 thing enjoyed using javafx , swing concurrently both used 2 different drawing threads. use swing heavy stuff (e.g. opening filechooser) , use javafx core visual stuff e.g playing seamless, looping video. however, mac makes impossible because of headless exception error fell on javafx , meant lot of pauses when doing things opening filechoosers. if rewrite app javafx.concurrent, mimic 2 draw thread experience once did swing + javafx? platform.runlater a worker complementary platform.runlater . use platform.runlater when executing off of javafx application thread , want run logic on javafx application thread. use worker when running on javafx application thread , want spawn logic or (especially) i/o on new thread don't block javafx application thread.

vaadin - Using font icons with declarative UIs -

while developing new application vaadin 7.4.6, found myself needing supply icons various buttons. i'd doing dashboardbutton.seticon(fontawesome.bar_chart_o); i'm trying declaratively. now, can achieve similar effect if include span inside button definition below... <v-button _id="dashboardbutton" primary-style-name="valo-menu-item" style-name="borderless"> <span class="v-icon fontawesome">&#xf080</span> dashboard </v-button> ... , know books mentions mapping objects attributes not supported (at least far), wondering if knows better alternative or if there's way of using font-icons enums instead of code points, eg: fontawesome.bar_chart_o instead of &#xf080 . the following works (at least in v7.5.0 , valo). <v-button icon="fonticon://fontawesome/f0c7">save</v-button> you still have use hex code it's little more elegant example. it's eclipse

android - App In Billing: Alpha Test - After bought item, is possible to check if item is purchased? In Aplha test mode -

my in app billing working normal tests. but using item sku , after success purchase on alpha test mode seems check if item purchased not working. someone knows if check if item purchased works on aplha tests? because seems me purchase fake on alpha test , not being registered. thanks! it works same way in alpha , beta versions. must problem somewhere in code. suggest check doc: testing in-app billing you can utilize static ids testing iap, i.e: android.test.purchased when make in-app billing request product id, google play responds though purchased item. response includes json string, contains fake purchase information (for example, fake order id). in cases, json string signed , response includes signature can test signature verification implementation using these responses.

Where is 'class' declared in Java? -

in package java.lang see, public final class class<t> extends object implements serializable, genericdeclaration, type, annotatedelement where 'class' (the word used after 'public final') defined used declare 'class' (the name of class in above declaration)? it's java keyword. simple that. it's not "defined" anywhere....it's part of language itself. keep in mind answer in response question below asking word class . based on subsequent comments question, you're not interested in java specification's bnf style language formalism, you're asking word: where 'class' (the word used after 'public final') defined used declare 'class' (the name of class in above declaration)?

Modal window aligning to bottom in Bootstrap 2.0 -

i have bootstrap modal window, displaying correctly on browser top 50% .modal.fade.in { top: 50%; } but on mobile screen modal window not displaying correctly aligning @ bottom. have checked in firbug , found top 50% attribute changing top auto .modal.fade.in { top: auto; } because mobile screen window small bootstrap responsive js changing attribute. as finding thinking of writting css class below in own css override bootstrap css code .modal.fade.in { top: 50% !important; } so modal window align @ top 50% top attribute let me know if ok or there other solution. i don't know if there other solutions, keep property (the last 1 !important) in 1 of css file, won't cause problem ;)

c++ - __thiscall already defined in .obj -

i getting linker errors cannot seem find root cause of, having checked including .cpp files , reading other forums. the errors are: 1>------ build started: project: penguin_rpg, configuration: debug win32 ------ 1> main.cpp 1>c:\users\adam\documents\visual studio 2013\projects\penguin_rpg\penguin_rpg\dialogue.hpp(53): warning c4018: '<=' : signed/unsigned mismatch 1>c:\users\adam\documents\visual studio 2013\projects\penguin_rpg\penguin_rpg\main.cpp(39): warning c4244: 'argument' : conversion 'time_t' 'unsigned int', possible loss of data 1>main.obj : error lnk2005: "public: __thiscall area::area(class dialogue,class inventory,class std::vector<class creature *,class std::allocator<class creature *> >)" (??0area@@qae@vdialogue@@vinventory@@v?$vector@pavcreature@@v?$allocator@pavcreature@@@std@@@std@@@z) defined in atlas.obj 1>main.obj : error lnk2005: "public: __thiscall creature::creature(class st

css - Print on roll paper -

Image
i want print on roll paper chrome. length of paper seems static, roll paper can not used effectively. e.g. if print "hello world" from: <html> <body>hello world</body> </html> it print 27cm length of paper (because paper format set a4). there css-trick have dynamic height in chrome? update i not looking one-time configuration specific length. searching dynamic page height. firefox , ie able print dynamically, chrome virtual print driver seems not be. update 2 just make more clear: this not want. length of paper should height content. content dynamic. assuming ms windows host environment browser, can tell chrome print using system print dialog, can select target printer, , set preferences. if hit advanced button, can select postscript custom page size , there, set size of the'page' has option continuous roll paper , allows 1 set page height of 5.08 meters. here:

r - How to add a country to country.map-country.region for a choropleth map using choroplethr- choroplethrMaps- -

Image
i have made map using choroplethr , choroplethrmaps packages . problem in order plot country , country must contained in country.regions , country.map data frames included in choroplethrmaps package. lets map install.packages("mapproj");library(mapproj) install.packages("choroplethr") install.packages("choroplethrmaps") library(choroplethr);library(choroplethrmaps);library(ggplot2) data(country.map) data(country.regions) a<-c(4.1,2.5,0.4,6.4,1.4,1.8,3.8,1.3,2.3,8.4,5.2,1.9,0.8,1.5,2.1,1.2,3.8,1.4,3.1,0.8,4.0,1.3,4.8,2.6,2.8,2.3,3.1,2.5,na,na,na,na,na,na,na,na,na,na,na,na) target<-c("austria","belgium","bulgaria","switzerland","cyprus","czech republic","denmark", "estonia","spain","finland","france","greece","croatia","hungary","ireland","italy", "lithuania"

machine learning - Maximize AUC of a classifier having a set of probabilities that the object belongs to class -

consider binary classification task 2 target classes -- {men, women}. each person you've got set of actions , each action you've got set of real-valued features. goal classify persons men/women highest possible auc. the easiest approach train classifier predicts whether particular action belongs man or woman (indeed, have features actions, can train classifier without additional work). the question how derive probability of being man or woman based on probabilities each of actions belong man or woman?

curl - CURLOPT_COOKIEJAR and cookie file -

i'm using curlopt_cookiejar (curl libraries ), , i’m saving cookies in file, "cookie.txt". can't find file. it? searched in project folder, nothing. here code: curl_easy_setopt(handle,curlopt_cookiesession,1); // clean session. curl_easy_setopt(handle,curlopt_cookiejar,"cookie.txt"); curl_easy_setopt(handle,curlopt_useragent,useragentmozilla); // set user agent curl_easy_setopt(handle,curlopt_url,lien.toutf8().constdata()); // set url curl_easy_setopt(handle,curlopt_postfieldsize,data.size()+4); // size of request. curl_easy_setopt(handle,curlopt_postfields,ba); // aray of post request res = curl_easy_perform(handle); of course have . you can try code : curlopt_cookiejar=>__dir__."/cookie.txt", or curlopt_cookiejar=>dirname(__file__)."/cookie.txt",

Accessing Methods of a class using function parameter in python -

i have class in python: class xyz: def abc(): #do def add(x,y): #add x , y def sub(x,y): #subtract y x def mul(x,y): #multiply x ynd y note: here "add", "sub" , "mul" nested methods. is allowed make class this? if allowed, want access methods "add", "sub" , "mul" function parameters. e.g.: from xyz import xyz def jkl(input): abc.(input) # doing raise syntax error. refernece. so, when call jkl(add(2,3)) should add numbers. when call jkl(sub(4,3)) should subtract numbers. can done? it's hard understand goal here. edit: i'll leave answer here since has received upvote, op clarified they're asking how overload operators. you can this: class abc(): //do @staticmethod def add(x,y): # add x , y @staticmethod def sub(x,y):

ios - IBAction in added xib subview does not work -

i have mapkit app. have replaced callout view view .xib file. when user taps on annotation subview appears following code: func mapview(mapview: mkmapview!, didselectannotationview annotation: mkannotationview!) { if let pin = annotation.annotation as? custompointannotation{ if var infoview = uiview.viewfromnibname("myannview") as? myannview { infoview.namelabel.text = pin.thetitle infoview.detailslabel.text = pin.thedetails annotation.addsubview(infoview) } else { println("not right type") } } } the .xib file has 2 labels , button. want when user presses button should "activate" segue, if click on button nothing. here code view: class markerinfoview: mkannotationview { @iboutlet weak var placephoto: uiimageview! @iboutlet weak var namelabel: uilabel! @iboutlet weak var detailslabel: uilabel! @iboutlet weak

javascript - Get the value from a single line XML response -

i have result of web service call returned application. need result of generated pdf name. can suggest method of doing in classic asp or javascript. i've tried various methods of trying value using xpath etc. <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://www.namespace goes here">635672928228907180.pdf</string> if want use classic asp, should work dim input input = "<?xml version=""1.0"" encoding=""utf-8""?>" & _ "<string xmlns=""http://www.namespace goes" & _ " here"">635672928228907180.pdf</string>" dim objxml set objxml = server.createobject("microsoft.xmldom") objxml.loadxml( input) dim node set node = objxml.selectsinglenode("string") response.write( node.text)

Receive delivery error for failed delivery with Mailgun SMTP -

currently, when send mail mailgun smtp, , not delivered, message silently dropped , trace appear in logs. possible receive delivery notes when delivery failed, in standard email accounts? (delivery notes like: this automatically generated delivery status notification. delivery following recipie... , on) you can failed mail mailgun api: restclient.get("https://api:your-api-key"\ "@api.mailgun.net/v3/your-domain/events", :params => { :'begin' => 'fri, 3 may 2013 09:00:00 -0000', :'ascending' => 'yes', :'limit' => 25, :'pretty' => 'yes', :'event' => 'failed' }){|response, request, result| response }

xml - How to convert a element node to document in xquery -

i have xml. let $a := <a> <b>asd</b> <c>bvn</c> </a> if give return $a/a/b not work element node. so need convert element node document node. in order make work. i cant change xpath . anyway result using same xpath '/a/b'? you can create document node if need to let $a := <a> <b>asd</b> <c>bvn</c> </a> let $a := document{$a} return $a/a/b or directly let $a := document { <a> <b>asd</b> <c>bvn</c> </a> } return $a/a/b

dictionary - python ordereddict: access certain depth within dict -

i have function takes dict , prints it's content in nice sexy way. i edit function control depth of dict i'm kind of lost. here function: def print_dict(_dict, indent=""): k, v in _dict.items(): if hasattr(v, 'items'): print "%s(%s::" % (indent, k) print_dict(v, indent + " ") print "%s)" % indent elif isinstance(v, list): print "%s(%s::" % (indent, k) in v: print_dict(dict(i), indent + " ") print "%s)" % indent else: print "%s(%s::%s)" % (indent, k, v) output: (axis:: (@name::kfcq1[{kfcq1_1}].kfcq1_grid) (@mdmname::kfcq1[{kfcq1_1}].kfcq1_grid) (@usemetadatadefinition::true) (@label::kfcq1_1. veuillez sélectionner votre réponse) (labels:: (label:: (@language::fra) (@text::kfcq1_1. veuillez sélectionner votre réponse?) )

python - Scrapy Error - HTTP status code is not handled or not allowed -

i trying run spider have log: 2015-05-15 12:44:43+0100 [scrapy] info: scrapy 0.24.5 started (bot: reviews) 2015-05-15 12:44:43+0100 [scrapy] info: optional features available: ssl, http11 2015-05-15 12:44:43+0100 [scrapy] info: overridden settings: {'newspider_module': 'reviews.spiders', 'spider_modules': ['reviews.spiders'], 'download_delay': 2, 'bot_name': 'reviews'} 2015-05-15 12:44:43+0100 [scrapy] info: enabled extensions: logstats, telnetconsole, closespider, webservice, corestats, spiderstate 2015-05-15 12:44:43+0100 [scrapy] info: enabled downloader middlewares: httpauthmiddleware, downloadtimeoutmiddleware, useragentmiddleware, retrymiddleware, defaultheadersmiddleware, metarefreshmiddleware, redirectmiddleware, cookiesmiddleware, chunkedtransfermiddleware, downloaderstats 2015-05-15 12:44:43+0100 [scrapy] info: enabled spider middlewares: httperrormiddleware, offsitemiddleware, referermiddleware, urllengthmiddlewar

java - Insert CLOB into Oracle database -

my question is: how around ora-01704: string literal long error when inserting (or doing in queries) clob s? i want have query this: insert mytable values ('clob1') mytable values ('clob2') --some of these clobs more 4000 characters... mytable values ('clob3') select * dual; when try actual values though ora-01704: string literal long back. pretty obvious, how insert clobs (or execute statement @ clob)? i've tried looking @ question , don't think has i'm looking for. clobs have in list<string> , iterate through them make statement. code follows: private void insertqueries(string temptablename) throws filenotfoundexception, dataexception, sqlexception, ioexception { string prequery = " " + temptablename + " values ('"; string postquery = "')" + stringhelper.newline; stringbuilder inserts = new stringbuilder("insert all" + stringhelper.newline); list<string> readque

java - 500 Internal error from HTTP POST request -

i using below code upload file using http post, getting 500 internal server error response server. can please have , let me know code part culprit/missing. there no error in https connection, think problem in header server not accepting request. // check server address url = new url("https://example.com"); string protocol = url.getprotocol(); string host = url.gethost(); string serviceroot = url.getpath(); // build post request httppost post = new httppost(new uri(protocol + "://" + host + serviceroot)); post.addheader("user-agent", "test"); post.addheader("content-type", "multipart/form-data"); post.addheader("accept", "image/jpg"); string authvalue = "basic " + base64 .encodebase64tostring(("username" + ":" + "password").getbytes()) + "

tomcat - primefaces push not working in Safari using AWS Tomcat7 -

Image
i using primefaces 5.1, jsf 2.1 , tomcat 7 , application in aws. atmosphere version 2.2.2. i not able use push functionality in safari 5.1.7. we have configured aws enable push based on primeface push aws , websocket tomcat 7 on aws elastic beanstalk , creation of .ebextensions folder in aws elastic beanstalk . push working in other browsers. i tried solution provided in primepush on tomcat 7 not working unsuccessful. safari console shows any appreciated.. update1: 1 option try non secure websockets when safari browser detected (from http://blog.marcon.me/post/24874118286/secure-websockets-safari ). if so, question how make primefaces's push select non secure web socket? update2: tried implementing ssl see if push not working in safari due our self signed certificate. didnot seem work either. safari 5.1.7 old ... here https://github.com/atmosphere/atmosphere/wiki/safari-and-websockets-issues documented there issues 5.1.5. don't think there fix .

how to interchanging data between online mysql database and offline mysql database via c# windows forms application? -

how interchanging data between online mysql database , offline mysql database via c# windows forms application? online database , offline database same tables , fields every 1 hour updating or interchanging data between online mysql database , offline mysql database. how can connect online mysql database via c# windows forms application? anybody me please.... 1 : it's library connect mysql database. interchange data select source db update destination db 2 : there class timer use schedule hourly run function want 3 : of library connect mysql support remote connection, ip of target mysql db. not relate programming now, it's setup provide ip , port making connection

php - FPDF align text LEFT, Center and Right -

Image
i've have 3 cells , i'am trying align text left, center , right. function footer() { $this->sety( -15 ); $this->setfont( 'arial', '', 10 ); $this->cell(0,10,'left text',0,0,'l'); $this->cell(0,10,'center text:',0,0,'c'); $this->cell( 0, 10, 'right text', 0, 0, 'r' ); } when ouput pdf file, center text automatically aligned right. how looks: can tell me i'm doing wrong here , how can fix issue? the new position after cell call set right of each cell if set ln-parameter of cell method 0. have reset x-coordinate before last 2 cell calls: function footer() { $this->sety( -15 ); $this->setfont( 'arial', '', 10 ); $this->cell(0,10,'left text',0,0,'l'); $this->setx($this->lmargin); $this->cell(0,10,'center text:',0,0,'c'); $this->setx($this->lmargin

VBA Transfer information from sheets in workbook 1, to sheets with same sheetname in another workbook -

i want transfer information target workbook source workbook when target sheet name source sheet name. i realtively new vba, have been working 2 weeks , have literally googled a$$ off. website has proven best hulp far. i have transpose information on standard basis different format, want fi want automate following code: sub transfer() dim wbt workbook, wbs workbook 'wbt = workbook target, wbs = workbooksource dim wst worksheet, wss worksheet 'wbt = worksheet target, wbs = worksheet source dim wkt integer, wks integer, wke integer 'wkt = number in target sheet name, wks = number in source sheet name, wke = number in sheet name after want stop transferring information dim vfile variant dim cct range, ccs range set wbt = activeworkbook vfile = application.getopenfilename("excel-files,*.xlsm", _ 1, "select 1 file open", , false) if typename(vfile) = "boolean" exit sub workbooks.open vfile set wbs = activeworkbook wkt = 1 wks

javascript - make nofollow behavior for a div link -

according html5 specs, rel="nofollow direction allowed in <a> , <area> elements. looking solution, affect ranking various search engines, putting external link in div-element. example below influence ranking of link's target? <div onclick="window.open('external link' ,'_blank')" > ... </div> no, because it's not link. it's javascript code, opens new window given url. a searchengine looking <a href="...">link text</a> , not div javascript window opener.

ruby on rails - Create input with maxlength based on database size -

how write text_field in view, automatically respects size of database field? my migration: t.string :name, limit: 100 my view: <%= f.text_field :name %> well, there way done. write code inside /helper directory, , put method inside : module applicationhelper def column_info model_name, field_name, option model_name.constantize.column_types[field_name].public_send option end end now, use helper method anywhere inside view.. <%= f.text_field :name, size: column_info('person', :name, :limit) || 100 %>

node.js - Assign subdomain for new heroku process -

i'm using node.js & sails. spawn heroku process, e.g. : 'node app2.js" , assign subdomain it, app2.myherokuname.herokuapp.com is possible? i'm looking best practices implement microservice architecture, use common libs, modules, etc. this not possible per-se. can't create sub-subdomain herokuapp.com subdomain. however, can create many apps need on account, , assign them custom domains. here new process new app assign custom domain x.y.example.com . alternatively, if don't want use custom domain, can name app2-myherokuappname.herokuapp.com .

php - Connect netbeans with vagrant -

i have project cloned github repository on vagrant machine. how can open netbeans on host machine, , make changes automatically deploys vagrant? i have been thinking sftp, don't have vagrant password, user, or other things - starts vagrant ssh . is there way this? you can use shared folder sources make visible on guest , host systems @ same time. or if want sync between these 2 can find default key used vagrant ssh communication. or customize according needs (see http://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html )

xml - How to increse number of sitemapindex -

i'm intereset if can have many sitemapindex this: <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://domain.com/sitemap/destinatietag.xml</loc> <lastmod>2015-02-01t05:00:34+02:00</lastmod> </sitemap> </sitemapindex> i mean 1 sitemapindex refer athor sitemapindex , or maxium limit sitemap? example if destinatietag.xml athor <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://domain.com/sitemap/myurlxml.xml</loc> <lastmod>2015-02-01t05:00:34+02:00</lastmod> </sitemap> </sitemapindex> and myurlxml.xml contain url xml example: <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.

c# to f# - f# handling exceptions for multiple exception types -

i trying catch exceptions based on exception type in c#, getting compiler error when following this type test or downcast always @ line | :? system.exception genericexception -> can not have multiple "catch" blocks in f#? try ...... | :? system.aggregateexception aggregateexception -> innerexception in aggregateexception.innerexceptions log message | :? system.exception genericexception -> log message it's because :? system.exception as redundant, , code can reduced following: try // ... | :? system.aggregateexception aggregateexception -> innerexception in aggregateexception.innerexceptions log message | genericexception -> log message see answer further examples: how catch exception (system.exception) without warning in f#?

jsf 2 - How to refresh current page and open another browser tab or window to view pdf file at same time using JSF and primefaces -

this question has answer here: refresh/navigate current page while opening/downloading file in new tab/window 2 answers i've got requirement 1 click of command button refresh current page , open tab, window, or browser view pdf file @ same time using jsf , primefaces. , i'm using jasper report generate pdf. with commandlink use attribute target="_blank" and action="#{mybean.showpdfinnewtab()}" and update="idofelementtoupdate" or update="@all" which have never tried. summary: <p:commandlink action="#{mybean.showpdfinnewtab()}" target="_blank" value="click me" update="@all" /> pdf handling: pdf handling balusc

activerecord - Rails - Where would a batch record updater go? -

this might noob-ish question, has been on mind few day now, , can't seem find "proper" solution this. so wrote batch updater client, , sitting in controller. put code if move out of controller? batch updater updating multiple models. thanks create class batchupdater or form , call controller

php - How to add city specific products in magento? -

i want add products can shipped specific cities. also want show list of cities on product detail page. apart want user enter city / pin(zip)code before presses add cart button. i looking same option in search facets. catalog -> manage product -> custom option dropdown add cities create module(if modify coming data drop down) cities , call custom option in view page.

regex - Excel VBA word boundaries (replacing prepositions) -

what need add plus + sign before every preposition in cell? reason, \b won't work me. in javascript, should work fine: (\bof\b|\bat\b) //change +$1 but vba script in excel same regex won't match anything. example: И отдохнуть от них было для него спасением от мук. the result should be: И отдохнуть +от них было +для него спасением +от мук. note "отдохнуть" word has "от" inside. code (taken somewhere here): sub replacewithre() dim re object 'regexp dim rng range, cl range dim sh worksheet dim wb workbook dim sreplace string dim areplace(0 1, 0 1) string dim long set wb = activeworkbook set re = createobject("vbscript.regexp") ' new regexp re.global = true re.ignorecase = false re.multiline = true ' load array of patterns , replacements areplace(0, 0) = "(\bот\b|\bдля\b)" areplace(0, 1) = "+$1" each sh in wb.worksheets on error resume next set rng = sh.usedrange.specialcells(xlcellty

Android Animation : View directly change to end position -

assignment create game candy crush saga , flow android platform. i've try tutorial event listener , animation, work got problem when animate imageview change position. want make change position between 2 imageview when swipe on of imageview (candy crush gameplay), changed position problem animation movement not working. when swipe 1 of imageview (right swipe example), imageview changed position imageview located beside don't see movement animation when play candy crush saga. use 2 objectanimator animate imageview , play when swipe event trigger on imageview. animation code. final string name = "x"; imageview target = (imageview) findviewbyid(id[x-1][y-1]); imageview next = (imageview) findviewbyid(id[x-1][y]); objectanimator atarget = objectanimator.offloat(target, name, target.getx(), (target.getx()+target.getwidth())); atarget.setduration(1000); atarget.setinterpolator(new linearinterpolator()); objectanimator anext = objectanimator.offloat(next, name,

image - Load pictures from folder using c# based on filename criterial? -

Image
recently i'm working application, problem faced is: how can load image folder data grid view based on file date created criteria, file tag. i appreciate really! the folder contains pictures is: the controls want load pictures is: at time date criteria show image based on date file created. the button clicked show images is: private void btn_show_click(object sender, eventargs e) { } thanks help! i bet solved question in case didn't here answer: public partial class form1 : form { imagelist list = new imagelist(); public form1() { initializecomponent(); getimages(); } private void getimages() { string path = @"c:\imgfolder"; string[] filter = { ".bmp", ".jpg", ".jpeg", ".png" }; directoryinfo directoryinfo = new directoryinfo(path); fileinfo[] fileinfo = directoryinfo.getfiles(); arraylist arraylist

yui compressor - Yii2: how to stop css compression -

i don't want compress css , js files. there way it.? have tried making css compressor false still cant it. p.s css , js files ain't compressed while site on local make on live on aws compresses them.

c# - ASP.NET MVC returns corrupted file with wrong size -

i have problem - asp.net mvc returns file wrong size, therefore corrupted , cant open it. files on server , can open them, problem in returning , downloading files, also, files corrupted when downloaded, , files good. , on rare occasions, files, downloads in wrong size, gets downloaded in correct size. file sizes 500kb. code wasnt changed long time, , started return files wrong sizes. code simple: public actionresult getfile(string filename) { var contenttype = "image/jpeg"; if (system.io.file.exists(path.combine("c:\myfilesdirectory", filename))) { return this.file(path.combine("c:\myfilesdirectory", filename), contenttype, filename); } } what wrong ?

How to move next (navigate button)from one string content to another string in edittext in android -

Image
i have multiple strings in java file. i want create next button navigate through string content on button click 1 one in single edittext . how do this? do want achieve following image . add android:imeoptions="actionnext" in edittext (in layout.xml )

redis bitcount example not working -

i playing redis , tried bitcount example: http://redis.io/commands/bitcount . 127.0.0.1:6379> set mykey "foobar" ok 127.0.0.1:6379> bitcount mykey (error) err unknown command 'bitcount' my redis version follows: mohit@mohit:~$ redis-server --version redis server v=3.0.1 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=ecf41ef76feca5d mohit@mohit:~$ redis-cli --version redis-cli 3.0.1 i verified website, 3.0.1 latest stable version. went wrong in arrangement?

ios - iTunes Connect: Can I upload a new build with an old version? -

Image
i have app hasn't been released yet. uploaded build incremented version 1.0.1. ( cfbundleshortversionstring ). reason why i've done because complained on submitting new build make short. can upload new build version 1.0.0? edit: longer version of story: got app approved apple, in pending developer release. found bugs , corrected them. therefore uploaded new build. application loader complained on cfbundleshortversionstring incremented that. then found out have reject app, i've done now. removed build versions tab. now want release v. 1.0.0 uploaded v. 1.0.1. the app never released. solution: option 1: you send v. 1.0.1 in review. not wanted. option 2: make sure rejected binary , removed build (from versions tab). increment build number (in case 1.0.3) , reset version 1.0.0. reupload binary , submit :-) ps: think possible if app never released. looks strange in pre-releases tab, because there newer version old build number. ya possi

jquery - After Deploying to Heroku data-toggle="popover" requires refresh of page to work? -

originally fixed issue on localhost using jquery-turbolinks gem after deploying heroku no longer works! still must refresh page in order use popover function. thoughts? i require gem in production section of gemfile no avail. turbolinking needs force ready function on page:load . javascript (+jquery) ready = function(){ $('[data-toggle="popover"]').popover(); }; $(document).ready(ready); $(document).on('page:load', ready);

sql - Simpify PL/pgSQL function with lots of if-else statements and JSONification -

i have pl/pgsql function performs quite similar queries (the thing have different column names) , converts output json object. create or replace function get_observations(kind varchar, site_id integer, var varchar) returns table (fc json) $func$ begin if kind = 'raw' if var = 'o2_abs' return query select array_to_json(array_agg(row_to_json(obs))) ( select observation_date date, o2_abs value oxygen new_id = site_id) obs; elsif var = 'o2_rel' return query select array_to_json(array_agg(row_to_json(obs))) ( select observation_date date, o2_rel value oxygen new_id = site_id) obs; elsif var = 'temp' return query select array_to_json(array_agg(row_to_json(obs))) ( select observation_date date, t value oxygen new_id = site_id) obs; end if; elsif kind = 'averaged' if var = 'o2_abs' return query sel

Setting up a dummy payment gateway for testing in rails -

i new rails world , in process of setting small rails app client. 1 of requirements want set payment system test purpose . for quick, use stripe. has minimal backend setup, gem, , (if tdd) easy create tests using given test card data. gem install stripe

sql server - Dump specific records from a table using SSMS -

i need select & dump specific records database table using ssms. have tried googling cant find solution scenario. according julio-césar in sql server management studio right-click database , select tasks / generate scripts. follow wizard , you'll script recreates data structure in correct order according foreign keys. on wizard step titled "set scripting options" choose "advanced" , modify "types of data script" option "schema , data" tip: in final step select "script new query window", it'll work faster way. enter link description here

android - ListView with image from server -

i doing app can view listview of item contain item name, item price , item image. images store in different folder. want listview auto populated server , load image server. of online resource hard-coded image link. want app able detect image load. you can try lazy loading of images. there many libraries task happen like : https://github.com/nostra13/android-universal-image-loader , https://github.com/square/picasso