Posts

Showing posts from March, 2013

Catchable Fatal Error in form event subscriber using Symfony 2.3 -

after updating symfony 2.3 2.1, there strange message when trying create form : catchable fatal error: argument 1 passed msgr\profilebundle\form\eventlistener\addnamefieldsubscriber::presetdata() must instance of symfony\component\form\event\dataevent, instance of symfony\component\form\formevent given in /xxxxxx/aaas/src/msgr/profilebundle/form/eventlistener/addnamefieldsubscriber.php line 29 these usual suspects : profiletype.php <?php namespace aaas\profilebundle\form; use doctrine\orm\entityrepository; use symfony\component\form\formfactoryinterface; use symfony\component\form\abstracttype; use symfony\component\form\formbuilderinterface; use symfony\component\optionsresolver\optionsresolverinterface; use aaas\profilebundle\form\eventlistener\addnamefieldsubscriber; class profiletype extends abstracttype { public function buildform(formbuilderinterface $builder, array $options) { $subscriber = new addnamefieldsubscriber($builder->getformfa

Routing issues in Rails when a Blog component was added -

the app working fine until added blog. then, started having routing issues. every link on navbar still works fine, including blog link, opens index of of posts. when click on 1 of links go specific post, page displays, should. but, in order user make comment, he/she needs login or signup. so, put 2 links on page. problem when click on 1 of these links, or other link on navbar, error message, typical message follows: couldn't find post id=login at point, not @ root anymore. in instance, address bar reads: http://localhost:3000/posts/login the way root clicking ‘back’ link on page , takes user blog index page. this routes file looks like: septactus::application.routes.draw devise_for :admins devise_for :users, :path => "auth", :path_names => { :sign_in => 'login', :sign_out => 'logout',

ios - UIRequiredDeviceCapabilities & XCode -

so, i'm submitting app should run on iphone 4, 4s, 5 & ipod touch 5g, decided add "uirequireddevicecapabilities" plist "camera-flash" value accomplish that. however, i'm still able download , run build restriction testflight - requireddevicecapabilities enforced @ app store level? or doing wrong here?

box api - Embeding shared links -

i using shared links on site show boxnet folder, example: https://www.box.com/embed_widget/000000000000/s/xxxxxxxxxxxxxxx i trying customize order , theme color of folder being shown using: https://www.box.com/embed_widget/000000000000/s/xxxxxxxxxxxxxxx?sort=date&direction=desc&theme=gray the problem not seeing changes on it. does know doing wrong? may not using correct parameters. thanks in advance, kind regards, marcelo marcel, here documentation on how set styling parameters. if testing in browser, you'll need reset session see styling changes using additional parameter session_expired=yes. http://developers.box.com/0cc175b9c0f1b6a831c399e269772661/ we may make slight changes this, how work. direction=asc or desc should work too. rory

php - Mime and Office365 -

we receiving corrupted emails pdf attachments our php/zend application. migrated ms office365. ms telling mime format not supported office365. the emails corrupted when have attachments. zend form emails in mime format default. our options? how can send emails pdf attachments, php/zend application through office365? edit 1 php code sends email: $mail = new zend_mail(); $mail->setfrom(zend_registry::get('config')->app->contact->email); $mail->addto($this->getuscemail(), $this->getfirstname().' '.$this->getlastname()); $mail->addcc(zend_registry::get('config')->app->contact->email, 'sowk fws'); $mail->setsubject('workstudy documentation - '.$this->getfirstname().' '.$this->getlastname()); $mail->setbodytext('hi '.$this->getfirstname().",\r\n".'congratulations on completing fws orientation!'); $file = zend_registry::get('config')->app->pdf

amazon web services - ruby: no such file to load -- ubygems (LoadError) when running cap rubber:create_staging -

i trying launch amazon ec2 instance following instructions of railscast #347 rubber , amazon ec2 . the rails project configured follows. .ruby-version file: ruby-1.9.3 here gemfile : source 'http://rubygems.org' ruby '1.9.3' gem 'rails', '~> 3.2.13' gem 'rb-readline', '~> 0.5.0' gem 'counter_culture', '~> 0.1.12' gem 'jquery-rails', '~> 3.0.2' gem 'therubyracer', '~> 0.11.4', require: 'v8' gem 'attribute_normalizer', '~> 1.1.0' group :assets gem 'sass-rails', '~> 3.2.5' gem 'coffee-rails', '~> 3.2.2' gem 'uglifier', '~> 2.1.1' end group :development gem 'debugger', '~> 1.6.0' end group :development, :test gem 'sqlite3', '~> 1.3.7' end group :production gem 'pg', '~> 0.15.1' end gem 'rubber', '~&g

graphics - Jr Java-er Wants to Pass Params to Paint -

i'm able draw rectangles, elipses, , lines in java means of adding component extends jcomponent in modify paintcomponent method: public class mycomponent extends jcomponent { public void paintcomponent(graphics g) { /* simple draw stuff */ } } i know how have class extend either japplet or jpanel , draw in paint method: public class myclass extends jpanel { public void paint(graphics g) { /* simple draw stuff */ } } but, both of these methods suffer not allowing me pass them parameters. in case of multiframe animated sprite, conceivably have external variable reads determine frame number , internally draws appropriate "sprite" contents based on frame number, i'd prefer able pass frame number directly. unfortunately, not not know called from, don't know the graphics g requires input. there may better way accomplish want, directly communicate draw routine tell draw want, whenever desire, don't know how accomplish this.

php extract sub array with specific key -

if have following array: array( 'var1' => 123, 'var2' => 234, 'var3' => 345 ); i extract specific parts of build new array i.e. var1 , var3. the result looking is: array( 'var1' => 123, 'var3' => 345 ); the example posted stripped down, in reality array has larger number of keys , looking extract larger number of key , keys may or may not present. is there built in php function this? edit: the keys extracted hardcoded array in class i..e $this->keystoextract $result = array_intersect_key($yourarray,array_flip(array('var1','var3'))); so, edit: $result = array_intersect_key($yourarray,array_flip($this->keystoextract));

Load node.js module from string in memory -

how require() file if had file's contents string in memory, without writing out disk? here's example: // load file string var strfilecontents = fs.readfilesync( "./myunalteredmodule.js", 'utf8' ); // stuff files contents strfilecontents[532] = '6'; // load node module (how this?) var loadedmodule = require( domagic(strfilecontents) ); function requirefromstring(src, filename) { var module = module.constructor; var m = new module(); m._compile(src, filename); return m.exports; } console.log(requirefromstring('module.exports = { test: 1}')); look @ _compile, _extensions , _load in module.js

FB Groups And Website Integration -

i want integrate website facebook group. what best approach adding link in group access website? can tabs added fb groups? where can find additional information on specific topic? what best approach adding link in group access website? the best approach add link backlink website in every post make. fb automatically add website title, meta description , photo homepage post. can tabs added fb groups? no tabs cannot added fb group, if want add website on fb, use fb pages, not fb groups. fb pages dedicated businesses. where can find additional information on specific topic? you can find more info integrating website fb here

c - Function's return value is unexpected -

long long encrypt(int message,int n,int e) { long long s=pow(message,e); return s%n; } when try this: printf("%lli",encrypt(65,3233,17)); it prints out this: -2631 does have idea how fix this...to honest small values now..i think i'll use larger values in future perhaps do: int encrypt(int message,int n,int e) { int s = 1; while (e--) { s = ( s * message ) % n; } return s; }

MySQL sort by a column by default in phpMyAdmin -

i added new index in table , phpmyadmin sorting rows column default. how make phpmyadmin sort rows id column instead of url column default? create table if not exists `links` ( `id` int(11) unsigned not null auto_increment, `url` varchar(255) not null default '', primary key (`id`), unique key `url` (`url`) ) engine=myisam default charset=utf8 auto_increment=343959 ; you can resolve issue adding default order tableusing alter table query. query: alter table links order id; if not specify order clause in clause, rows sort default "id" column.

gnu make - Makefile putting child on chain -

i'm working makefile , i'm running in debug mode. noticed "putting child 0x5435etc pid 2344 on chain" makefiles way of remembering files generated? i ask because i'm using tool generates bunch of different file types of of target below. %.v: $.rdl (generates .html, .v, .vh, .xml, .spirit.xml, etc current directory) the tool generates files expected , desired. then makefile runs target vpath %.spirit.xml ${list_of_directories} %.ralf: %.spirit.xml (generates .ralf , .spirit.ralf) the first time run "$ make " in clean directory generates list of .v files on first target, fails on first .ralf. if run "$ make " again correctly builds of .ralf files. possible easy answers? noticed when puts children chain %.v target ever puts .v files! thinking might not know others exist! yeah, need tell make that command produces multiple outputs. this should work: %.html %.v %.vh %.xml %.spirit.xml: %.r

Google Maps API V3 determine which button is pressed in maps mousedown event listener -

i have event listener mousedown. event fires same result on left , right button press. how determine mouse button has been pressed ? google.maps.event.addlistener(map, 'mousedown', function (e) { console.log(e); } the event (e) returns dm class object , has properties: z, latlng, pixel. returns prototype function stop(). after of head banging, think have workaround solution. better ideas , suggestions appreciated. i trying mimic google earth's creating path feature in google maps. here experimental code: function polylinemarker(bounds, image, map) { // initialize properties. this.bounds_ = bounds; this.image_ = image; this.map_ = map; // define property hold image's // div. we'll create div // upon receipt of add() method we'll // leave null now. this.div_ = null; // explicitly call setmap() on overlay this.setmap(map); } polylinemarker.prototype = new google.maps.overlayview(); polylinemarker.prototype.onad

mongodb - Grails URL id field not getting mapped to params -

here urlmappings.groovy class urlmappings { static mappings = { "/$controller/$action?/$id?(.${format})?" { constraints { // apply constraints here } } "/ewhet/$id"(controller : "ewhet", action : "show") "/"(view: "/index") "500"(view: '/error') } } here ewhetcontroller 's show action: class ewhetcontroller { def index(){ } def show(){ def ctx = startasync() ctx.start { render params //render "this invoked!!" ctx.complete() } } } now when enter url as: http://localhost:8080/g24/ewhet/abc abc not mapped params.id , when render params , empty map [:] . in case if url entered http://localhost:8080/g24/ewhet/show?id=abc id field gets mapped params.id , get: ['id':'abc'] so want last part of url mapped

Powershell scripts not found on psdrive despite $env:path entry -

update: added factoid @ bottom. i going nuts trying understand why simple / obvious / necessary functionality doesn't work (for me). haven't been able find same problem, not i've changed system default (bad habit) , screwed myself , find myself on receiving end of "just desserts", still ... problem statement: given working powershell scripts found , executable ... why aren't these scripts found when they're moved psdrive and implicitly invoked via $env:path (which includes script folder referenced psdrive)? (this para edited clarity) test case: 1) create local disk psdrive running: new-psdrive -name home -psprovider filesystem -root $home 2) copy (working) posh script (call "script.ps1") $home 3) $env:path += ";home:" 4) change directory place $home. 5) open posh command window run: "script" or "script.ps1" i submit script should found reference "home:/" component in $env:path.

javascript - Why is my view in backbone not rendering? -

i trying render template backbone views not working? know doing wrong here thanks! include jade file views , main.js file backbone js script. jade file extends layout block content div.centercontent script(type="text/javascript", src="/js/main.js") h4 user goes here equal before no space div#user p #{firstname} #{lastname} p #{email} p #{phone} p #{birthday} button.edit edit script(id="usertemplate", type ="text/template") p #{firstname} #{lastname} p #{email} p #{phone} p #{birthday} button.edit edit script(id="useredittemplate", type ="text/template") div form(action="#") input(type="text", class="firstname", value=#{firstname})

java - Putting OnRatingBarChangeListener in Universal-Image-Loader in GridView Implementation -

the main purpose of question know put onratingbarchangelistener in uil. below each image added ratingbars(which working), next thing should listen users action towards ratingbar's selection. great appreciated. public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.ac_image_grid); bundle bundle = getintent().getextras(); imageurls = bundle.getstringarray(extra.images); options = new displayimageoptions.builder() .showstubimage(r.drawable.ic_stub) .showimageforemptyuri(r.drawable.ic_empty) .showimageonfail(r.drawable.ic_error) .cacheinmemory(true) .cacheondisc(true) .bitmapconfig(bitmap.config.rgb_565) .build(); listview = (gridview) findviewbyid(r.id.gridview); rbar = (ratingbar)findviewbyid(r.id.ratingbar1); ((gridview) listview).setadapter(new imageadapter()); li

api - building a ruby conditional to check for nested params -

i'm curious in controller action, how can simple validation of nested params? def create # validate incoming post request errors = array.new person = params[:person] event = params[:event] errors << "person email should not empty" if person[:email].blank? errors << "person name should not empty" if person[:name].blank? errors << "event name should not empty" if event[:name].blank? this type of check barfing. i'm trying scan nested json params, example making post request on "person": { "email":"foo@gmail.com", "name":"foo" }, this validate fine because nested name there. although if request without nested value, barf. how write conditional check nested value, , stuff in error value if it's empty. otherwise, if there no nested value continue normal. you use has_key? method availab

bluetooth - Using Bluettoth not able to connect more than 4 slaves simultaneously to master- android -

i following android sample available bluetooth multi chat application. first not able make single connection using code after wrote serversocket.close(); after accepting in acceptthread running fine. i want support 7 slaves master-slave connection not supporting more 4 slaves. appears continuously listening slaves placed slaves in parking not making connection, , once previous connection breaks connect connect 1 parking. do 1 have idea, please suggest me at? for 1 else looking same: now able connect upto 7 device master. reversed approach every 1 taken. slave devices listening connection instead of master. master issuing connection thread individual slaves , slave devices have own accept thread. way master not listening 7 slaves hit connection.

Bulk insert to SQL Server with linq -

i read xml file linq , create list of objects. stringreader stream=new stringreader(xml); xmltextreader reader=new xmltextreader(stream); xelement req = xelement.load(reader); var users= (req.descendants("report") .select(e => new { fname= e.descendants("firstname").firstordefault().value, lname = e.descendants("lastname").firstordefault().value, personalid = e.descendants("id").firstordefault().value, })).tolist(); the users value include 100,000 objects. i want bulk insert these objects database table. public static void savedata<t>(ref list<t> list, string destinationtablename, int batchsize) { using (entitydatareader<t> reader = new entitydatareader<t>(list)) using (system.data.sqlclient.sqlbulkcopy sbc = new system.data.sqlclient.sqlbulkcopy("your connection string")) { (int = 0; < reader.fieldcount; i

query optimization - Mysql key_buffer_size already 16GB but some fulltext searches are still slow -

i have query w/ full text search takes 5 - 10 secs. key_buffer_size 16gb. table has 15 million records , has compound fulltext index on fields: categories , company. table size: data length - 0.9gb index length - 1.1gb select c.id basetable c match(c.categories, c.company) against('+keyword1 +keyword2 +keyword3' in boolean mode) limit 100 query results : only 88 rows query status : key_read_requests - 4414336 key_reads - 1029 key_write_requests - 12 key_writes - 2 handler_read_next - 89 mysql global variables : key_buffer_size - 16gb key_cache_age_threshold - 300 key_cache_block_size - 1024 key_cache_division_limit - 100 max_heap_table_size - 6gb tmp_table_size - 6gb server: dual xeons cpus 32gb ram hd 15krpm. note not queries slow. less second; depends on keywords used on full text search. do have thoughts on how improve this?

MongoDB High Avg. Flush Time - Write Heavy -

i'm using mongodb approximately 4 million documents , around 5-6gb database size. machine has 10gb of ram, , free reports around 3.7gb in use. database used video game related ladder (rankings) website, separated region. it's write heavy operation, still gets significant number of reads well. use updater queries outside source every hour or two. updater processes records , updates documents on database. updater processes 1 region @ time (see previous paragraph), approximately 33% of database updated. when updater runs, , duration runs, average flush time spikes around 35-40 seconds, , experience general slowdowns other queries. updater ran on separate machine , queries mongodb @ end, when data has been retrieved , processed third party. some people have suggested slowing down number of updates, or updating players have changed, problem comes down rankings. since support ties between players, need pre-calculate ranks - if few users have changed ranks, still need update

php - Where to Define Constants with Zend Framework -

i have few genuine constants use in zend framework. know can set them in index.php not executed when running phpunit tests. (not in case, anyhow). how else can set these within framework? problem constants need declared outside class. (i don't want class constants). if else fails, can set them in unit testing bootstrap, i'd avoid duplication if possible. i define them in bootstrap file. use zend_registry instead of constants. zend_registry::set('property1', 'value1'); //everywhere in code $value = zend_registry::get('property1');

Jquery slider load every tab -

i have problem jquery tabs , slider.. problem when ı click slider item example 4's element of slider.. load every tabs 4 element.i want make when click 1 element of slider. can load active tab. fiddle html <title>jquery ui slider - slider scrollbar</title> <body> <div class="scroll-pane ui-widget ui-widget-header ui-corner-all"> <div class="scroll-content"> <div class="scroll-content-item ui-widget-header"></div> <div class="scroll-content-item ui-widget-header"> <div class="arabadiv" onclick="yukle()" style="width:100px; height:100px; background-color: darkviolet "></div> </div> <div class="scroll-content-item ui-widget-header"> <div style="width:100px; height:100px; background-color:red"></div> &

PHP MySQl : Alphabetical Ordered list with Heading and anchored link with aplabets -

i trying on alphabetical ordered list alphabets heading linked list of alphabets @ top of table. instance: - c - d - f - g ............ a alabama alaska california colorado connecticut d delaware f florida etc. as see letters "b" , "e" missing not exist in table. any appreciated , others too. thanks lot. select substring(statename, 1, 1) state_init, group_concat(statename, ",") usstates group state_init; might give starting point

java - How does Abstract Factory uses delegation -

the difference between abstract factory , factory design pattern abstractfactory pattern uses composition delegate responsibility of creating object class while factory design pattern uses inheritance , relies on derived class or sub class create object. below typical example of abstract factory( http://www.oodesign.com/abstract-factory-pattern.html ) 1 please explain me abstract factory using object composition? abstract class abstractproducta{ public abstract void operationa1(); public abstract void operationa2(); } class producta1 extends abstractproducta{ producta1(string arg){ system.out.println("hello "+arg); } // implement code here public void operationa1() { }; public void operationa2() { }; } class producta2 extends abstractproducta{ producta2(string arg){ system.out.println("hello "+arg); } // implement code here public void operationa1() { }; public void operationa2() { }; } abstract class abstra

visual studio 2010 - Coverity issue for deleting void pointer -

coverity has pointed out bug deleting void pointer. code below: void *pbits=(void *)new char[((bmp.bmwidth*bitspixel+31)/32)*bmp.bmheight*4]; result=getdibits(pdc->getsafehdc(),hbitmap(*pbitmap),0,bmp.bmheight,pbits,bitmapinfo,dib_rgb_colors); char curdir[100]; if(!getcurrentdirectory(100,curdir)) { delete [] pbits; return; } can please me on incorrect , how can solve it? many thanks best regards chintan just use char* type of pbits.

highcharts - Highstock Change date format dynamically on clicking range selector button -

i have set jsfiddle example http://jsfiddle.net/fqjuy/1/ i'm formatting 1d tab using following code snippet var df='%a, %b %e %i:%m %p'; tooltip : { formatter : function(){ var s=highcharts.dateformat(df, this.x); s+="<br/>"; $.each(this.points, function(i, series){ s += '<span style="color:' + this.series.color + '">' + this.series.name + '</span> : <b>'+ this.y.tofixed(2) +'</b><br/>'; }); return s; } } i want dynamically change date format 1h , tabs separately when click on tab. in advance. you can selected button via: var selected = this.points[0].series.chart.rangeselector.selected; then if define df way: var df=['%i:%m %p','%a, %b %e %i:%m %p','%a, %b %e']; you can required tooltip format: var s=highc

Let Node.js and PHP use the same database(mysql)? -

i built application using php, , want make application have real-time service. so, use socket.io node.js. but, how let node.js , php use same database(mysql)? install mysql module nodejs. npm install mysql using module can use mysql database var mysql = require('mysql'); var conn = mysql.createconnection( { host : 'localhost', user : '.....', password : '......', database : '.......' } ); conn.connect(); var querystring = 'select * .............'; conn.query(querystring, function(err, rows, fields) { if (err) { console.log(err); } else { console.log(rows); } });

entity framework - EF: What is the SQL output when using Contains in LINQ query? -

in nhibernate when execute query 1 below sql generated contains parameters each element in collection. if query executed against mssql server , there 2k or more elements in collection error because max parameters allowed sql engine 2k. var bankaccounts = b in this.unitofwork.bankaccounts command.ids.contains(b.id) // command.ids array id's select b; sorry being lazy test myself entityframework see other developers writing such code: ef cannot delete child object because of associationset the question sql generated ef kind of queries? i've watched sql profiler you. happens in entity framework (i quess wat nhibernate product, i'm not sure..): select [extent1].[id] [id], [extent1].[accountno] [accountno], [extent1].[name] [name], [extent1].[description] [description], [extent1].[iban] [iban], [extent1].[isactive] [isactive], [extent1].[customer_id] [customer_id] [dbo].[bankaccounts] [extent1] [extent1].[id] i

Grails - Convert String data to Date -

lets say, have "book" class field "availableon"(as shown below). class book { string availableon; } the fields holds values "all days" or string representation of date. example "13/06/2012" how can books available within next 2 days? below code throw exception ("java.util.date cannot cast java.lang.string") def books = c.list(){ between('availableon', new date(), new date() + 2) } ps : working on legacy db, , not suppose change schema :( i think there 2 problems between statement have: availableon cannot converted date comparison when value all days even when availableon has date value in it, not converted date comparison i'd try along lines of this: def = new date() def books = book.findallbyavailablenotequal("all days").findall { book -> date.parse('dd/mm/yyyy', book.availableon) > && date.parse('dd/mm/yyyy', book.availableon) <

How can i use comma in URL? -

when add comma in url. shows %2c% . in site url has comma. i need advise. %2c directly equivalent comma. shouldn't see difference in behaviour between two. (do you?)

jquery - Button fixed position -

i fix position of button, cause when click function showcontacts loads , display contacts list on screen , button go footer page; <button class = "btn" type="button" id='button1' style="visibility: hidden" onclick = "showcontacts()">show contacts</button> first things first, question tagged incorrect. has nothing jquery. to fix button, add example following css: .btn{ position: fixed; left: 0; top: 0: } which fix upper left corner of page. i recommend learn css first further reading: mdn css position edit: you could, however, accomplish using jquery: $('.btn').css({ 'position':'fixed', // more rules );

c# - Cannot scroll content horizontal in windows store app -

in application, have stackpanel orientation set 'horizontal'. in stackpanel there 4 images. when try scroll content horizontally, scrolls few pixels , cannot see whole content. when change orientation of stackpanel vertical, can scroll whole content vertical. why isn't possible scroll hotizontally? ideas how can solve problem? <grid> <scrollviewer> <stackpanel orientation="horizontal" > <canvas margin="120,0,0,0" width="310" height="390"> <image width="310" height="390" source="ms-appx:///assets/image/background_teaser.png"/> </canvas> <canvas margin="120,0,0,0" width="310" height="390">

Auto fill not working correctly in google chrome -

good morning, have form in page contains following fields: name surname account id (type password) password (type password) when user visits page surname , accountid being filled automatically (which wrong). surname field being filled old saved username , accountid being filled old saved password. autocomplete set off not working. not want situation user visits page, 2 fields mentioned above filled automatically. appreciated if ($.browser.webkit) { $('input[type="text"]').attr('autocomplete', 'off'); }

javascript - to check duplicate values for text box with same id onkeyup event -

please validate duplicate values text box having same id in loop onkeyup or onblur event, need validate before submitting form, n number of textbox generated in loop, in each text box need enter rank, thereby need validate duplicate rank should not entered after value entered text box, enter code here <%iterator iterator_t = tem.keyset().iterator(); int =0; while (iter.hasnext()) { string key_t = (string) iter.next(); modulebean modulebean = (modulebean) tem.get(key_t); %> <input type="text" name="rank1" id="rank1" size="2" "/> <%}%> you can not use same id it, instead add class it. demo <input type="text" name="rank1" id="rank1" size="2" class="rank" value="1"/> <input type="text" name="rank2" id="rank2" size="2" class="rank" valu

error handling - javascript override undefined -

after searching many hours dont find solution problem: function pseudoclass(value){ this.value = value; } aplayground = new array(); aplayground[0] = new pseudoclass(0); var actual = 0; var width = 1; var bbool = new boolean(actual%width); //left becomes 0%1 ----> false if (bbool && (aplayground[actual-1].value < 9)) {} if let browser execute codeblock error message via mozilla firebug: "typeerror: aplayground[(actual - 1)] undefined" bbool error handler make sure second condition in line 11 doesn't checked still works if change last line to: if (false && (aplayground[actual-1].value < 9)) {} im working on ugly workaround increases amount of elements bypass error there must way more elegant way make browser ignoring undefined-error unfortunately im beginner in js please keep simple thx don't use new boolean , cast result boolean using this: var bbool = !!(actual%width);

javascript - MVC - Kendo Template Giving Error When Using with special language characters -

on mvc project there language resource(.resx) files.trying pass strings values kendo template.if value has special characters 'ç' , 'ş' etc... gives error: html- razor: @(html.kendo().listview<ais.ui.webservice.proxy.dsrvallservice.caselistitemmodel>() .name("listview") .tagname("div") .htmlattributes(new { style = "padding-left:15px" }) .clienttemplateid("template") .datasource(datasource => datasource .model(model => model.id("caseid")) .pagesize(5) .events(events => events.error("onerror")) .read(read => read.action("getlistcases", "case")) ) .pageable() .editable() ) <script type="text/x-kendo-tmpl" id="template" > <span>@caselist.elapsed</span> error:

slideDown, slideUp not working in jQuery -

hi friends slidedown , slideup function not working code. appears hidden row without slidedown effect please guys can chekc code below or see fiddle here html <table> <tr> <td colspan="2"><p>logistics</p> <select name=" " > <option>one</option> <option>two</option> <option>three</option> <option>four</option> <option>others</option> </select> </td> </tr> <tr> <td width="80%" colspan="2"><textarea name=" 5" rows="2" id=" 5" onblur="if (this.value=='') this.value = this.defaultvalue" onfocus="if (this.value==this.defaultvalue) this.value = ''">others details</textarea> </td> </tr> </table> script $('tr').has('textarea').hide();

objective c - How to zip folders in Ipad -

in application,i taking screenshots of image view , saving screen shots in document folder of application.now want email images same folder structure in.zipping folders containing images? -(void)zipfile2{ nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *docdirectory = [paths objectatindex:0]; bool isdir=no; nsarray *subpaths; nsstring *exportpath = docdirectory; nsfilemanager *filemanager = [nsfilemanager defaultmanager]; if ([filemanager fileexistsatpath:exportpath isdirectory:&isdir] && isdir){ subpaths = [filemanager subpathsatpath:exportpath]; } nsstring *archivepath = [docdirectory stringbyappendingstring:@"uploads.zip"]; ziparchive *archiver = [[ziparchive alloc] init]; [archiver createzipfile2:archivepath]; for(nsstring *path in subpaths) { nsstring *longpath = [exportpath stringbyappendingpathcomponent:path]; if([filemanager fileexistsatpath:longpath isdirectory:&isdir] &a