Posts

Showing posts from September, 2012

apple mail - Applescript Moving Email to Trash, But Not Deleting from the Server -

Image
i wrote applescript moves selected emails trash. script works fine in regard. problem emails remain on server. there additional code need add that? here's code: using terms application "mail" on perform mail action messages these_messages rule this_rule tell application "mail" set message_count count of these_messages repeat message_count 1 -1 set this_message item of these_messages set this_content (every character of content of this_message) unicode text if "bowles" not in this_content , "patton" not in this_content set theaccount account of mailbox of this_message set mailbox of this_message mailbox "trash" of theaccount end if end repeat end tell end perform mail action messages end using terms it hard troubleshoot without seeing entire script , other rules may causing problem. try adding stop evaluating

html5 - Decibel Sound Meter for Android -

i new android , looking write app measuring decibel sound level . idea when sound reaches level user gets alert. that's it. can me out this. can using html5/javascript ? appreciated. taken android media player decibel reading for native android/java based decibel calculation mediarecorder: mrecorder = new mediarecorder(); mrecorder.setaudiosource(mediarecorder.audiosource.mic); mrecorder.setoutputformat(mediarecorder.outputformat.three_gpp); mrecorder.setaudioencoder(mediarecorder.audioencoder.amr_nb); mrecorder.setoutputfile("/dev/null"); mrecorder.prepare(); mrecorder.start(); public double getamplitude() { if (mrecorder != null) return (mrecorder.getmaxamplitude()); else return 0; } to calculate db value : powerdb = 20 * log10(getamplitude() / referenceamp); reference: http://en.wikipedia.org/wiki/decibel#field_quantities not sure if in html5 on android

avoiding ScriptRegistrar with Telerik components -

i have mvc site uses telerik grid control. when use scriptregistrar include desired .js files, works fine , files includes are: telerik.common.min.js telerik.textbox.min.js telerik.calendar.min.js telerik.datepicker.min.js telerik.grid.min.js telerik.grid.filtering.min.js however, if include these same files using <script type="text/javascript" src="/scripts/telerik.common.min.js"></script> ....*all others*.... and totally take out scriptregistrar (i want because want use mvc4 bundling support instead) grid not load correctly. the reason of problem scriptregisterar add jquery scripts page startup action. think have 2 work-arounds : 1st: you can add "telerik.common.min.js" file through scriptregisterar , add other telerik script files through mvc 4 bundling component. if so, telerik tries load related script files @ run time. example if have combobox in page, telerik add scripts load script after page load. ignores loa

windows phone 7 - WP7 Usercontrol cannot be referred in MainPage.xaml -

this how mainpage looks like: <phone:phoneapplicationpage x:class="energyradio.mainpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" xmlns:shell="clr-namespace:microsoft.phone.shell;assembly=microsoft.phone" xmlns:local="clr-namespace:energyradio" xmlns:controls="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d" d:designwidth="480" d:designheight="800" d:datacontext="{d:designdata sampledata/mainviewmodelsampledata.xaml}" fontfamily="{staticresource phonefontfamilynormal}" fontsize="{staticresource phonefontsi

Jquery chkbox show hidden content? -

i want create multiplay chkbox, when select show hidden div, work one, how count automatically, if have more chkbox? $(document).ready(function(){ //hide div w/id $("#extra").css("display","none"); // add onclick handler checkbox w/id checkme $("#checkme").click(function(){ // if checked if ($("#checkme").is(":checked")) { //show hidden div $("#extra").show("fast"); } else { //otherwise, hide $("#extra").hide("fast"); } }); }); <form action="" method="get"> <input name="" type="checkbox" value="" id="checkme"> <span> $1 + </span> </form> <div id="extra" style="width:10px; height:10px; background-color:#000;"> 123 </div> try defining <div id="container">

LibGDX - OpenGL Exception on android caused by Texture -

i experiencing strange problem libgdx, when want run android apptication. running on samsung galaxy sii. here main part package com.android.app; import com.badlogic.gdx.game; import com.badlogic.gdx.gdx; import com.badlogic.gdx.graphics.g2d.textureatlas; public class app extends game{ private static textureatlas atlas; @override public void create() { new texture(gdx.files.internal("assets/textures1.png")); } } here android part package com.android.app; import com.badlogic.gdx.backends.android.androidapplication; public class androidapp extends androidapplication { public void oncreate (android.os.bundle savedinstancestate) { super.oncreate(savedinstancestate); initialize(new app(), true); //it crasher if opengl-es 2.0 not used } } i'll error opengl 2.0 not used thread [<12> glthread] (suspended (exception gdxruntimeexception)) glsurfaceviewcupcake$glthread

osx - Why some picture was rotated is iOS device? -

it's strange same picture display different on pc/mac/ios device. this url of picture: http://imgtest.meiliworks.com/pic/d/b3/0d/1a6157b2828bbcbfadb0d4d114b0_600_2400.jpg it's 77x310 in safari on mac osx 10.7, it's 310x77 in safari on ipad! if download picture , open directly, it's become 310x77. what's wrong picture? your image contains exif orientation tag value of 6 (rotated 90 degrees left). not image viewers handle tag properly. don't respect it, they'll display image rotated 90 degrees right.

android - Loading image bitmap from content providers using asynctask -

i have been trying query images on sd card through mediastore content provider , display thumbnail on gridview. however, if load image thumbnail on main thread, scrolling gets incredibly slow... so tried load bitmap through asynctasks: scrolling performance got better, grid items keep reloading thumbnail until gets correct bitmap... here asynctask, loads bitmaps: package x.y; import java.lang.ref.weakreference; import android.content.contentresolver; import android.graphics.bitmap; import android.graphics.bitmapfactory.options; import android.os.asynctask; import android.provider.mediastore; import android.widget.imageview; public class imagethumbnailloader extends asynctask<long, void, bitmap> { private final options moptions; private weakreference<imageview> mimageviewweakreference; private contentresolver mcontentresolver; public imagethumbnailloader(imageview imageview, contentresolver cr) { mcontentresolver

class - How to load php code dynamically and check if classes implement interface -

i'm loading class dynamically in php. file , class name gotten out of database. file must contain class , method. tried solve interface, don't how beautiful way. what suggestions? use class_exists() determine if class has been defined, method_exists() determine if class has method , instanceof determine if class implements interface.

ruby on rails - OAuth2 and role-based access control -

i have rails app acting oauth 2.0 provider (using oauth2-provider gem). stores information related users (accounts, personal information, , roles). there 2 client apps both authenticate through app. client apps can use client_credentials grant type find users email , other things don't require authorization code. users can log in client apps using password grant type. now issue we're facing users' roles defined globally on resource host. if user given admin role on resource host, user admin on both clients. question is: should have more fine-grained access control? i.e. user can editor app1 not app2 . i guess easy way change role names so: app1-admin , app2-admin , app1-editor , app2-editor , etc. bigger question is: implementing whole system correctly; is, should storing info on resource host, or should denormalize data onto client apps? a denormalized architecture this: user data on resource host, localized user data on each client host. user@example.com

python - Simple number generator -

how write function returns incrementing numbers on each call? print counter() # 0 print counter() # 1 print counter() # 2 print counter() # 3 etc for clarity, i'm not looking generator (although answer use it). function should return integer, not iterable object. i'm not looking solution involving global or otherwise shared variables (classes, function attribute etc). see here http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html useful insights matter. in short, from itertools import count counter = lambda c=count(): next(c)

php - How can I exclude first <tr> -

with php dom, getting trs , tds inside. <?php foreach($table->getelementsbytagname('tr') $tr){ echo $tr->getelementsbytagname('td')->item(0)->nodevalue); } ?> can exclude first tr , tds. i think node list numerically indexed (though cannot test it), using key in foreach may work: foreach($table->getelementsbytagname('tr') $key => $tr){ // don't act on first element if ($key > 0) { echo $tr->getelementsbytagname('td')->item(0)->nodevalue); } }

c# - Save non-transparent image from a PictureBox with transparent images -

i have picturebox lots of transparent png's drawn into... now i'd save content of picturebox file, without transparency. how can this? i have tried remove transparency image this, didn't work, still got transparent image after save. ... removetransparency(picturebox.image).save(savefiledialog.filename); private bitmap removetransparency(image transparentimage) { bitmap src = new bitmap(transparentimage); bitmap newimage = new bitmap(src.size.width, src.size.height); graphics g = graphics.fromimage(newimage); g.drawrectangle(new pen(new solidbrush(color.white)), 0, 0, newimage.width, newimage.height); g.drawimage(src, 0, 0); return newimage; } you may cycle through pixel (please not using getpixel/setpixel) change color or may create bitmap same size, create graphics context image, clear image favorite background color , draw image on (so transparent pixels replaced background color). example did this? public static bitma

sparql - semantic web + linked data integration -

i'm new semantic web. i'm trying sample application can query data different data sources in 1 query. have created small rdf file contains references dbpedia resources defining localities. question : how can data contained in file , other information in description of distant resource (for example : name of person local file, , total poulation in city dbpedia-owl:populationtotal distant rdf file). don't understand sparql query language, tried use jena arq api service keyword doesn't solve problem. please? i guess looking semantic web client library , tries leverage ggg. albeit, standard exploration algorithm of framework follows rdfs:seealso links. nevertheless, general approach seems looking for, i.e., create local graph consists of seed graph , traverse relations level, e.g., 3 steps, resolves uris , load content local triple. utilising advanced technologies sparql federation might later ;)

HipHop vs APC vs Other or php optcode caching -

i've been using apc while optcode cache , memcached object caching. i'm thinking of switching apc hophop. however, seems hiphop hasn't had development lately. recommend using hophop on apc or stick apc? thanks! personally, i'd stick apc. hiphop kind of optimization and, i've ready, pain in ass code working with. doesn't seamlessly take have , convert it. it's understanding there's php can't used it.

c# - sql query, selecting data through 3 tables -

i have db below: (sorry couldn't upload diagram) group table: grp_id smallint grp_name char(50) type table: tp_id smallint tp_name char(50) item table: it_id int grp_id smallint tp_id smallint item table linked group table grp_id, , linked type table via tp_id. the user enter grp_name or grp_id , , should realize item have group , add type names of them, type table checklistbox . select it_id, tp_name item inner join type on type.tp_id = item.tp_id inner join [group] on [group].grp_id = item.grp_id [group].grp_id = @groupid or [group].grp_name = @groupname

asp.net - MVC + POCO + Entity Framework, Passing Object between layers -

Image
i trying hands on mvc 2, ado.net ef , poco. have generated entity classes in separate library using poco generator.these poco entities used viewpages (not sure if that's right way design or need separate viewmodels classes ?) now, if take case of simple scenario need add employee object( related department master), should recommended way transfer these objects between layers. layered structure of application : i have thought of various alternatives: i have method in employee controller named addemployee() accepts formcollection parameter. within form collection posted data such employee name, age , salary etc , id of selected department . 1.) 1 way can create dto employeedepartment dto used map values formcollection is. can break them @ manager layer , use them create entity objects i.e employee object , refer department query similar this: e.department = department.where(i => i.deptid == empdepdto.dept_id).first() i not big fan of , feel every time there

aptana - Removing (sftp) from tab labels to clear up room -

Image
is there way can rid of "sftp" labels tabs? it's taking tons of horizontal space , serves me no purpose. use project , link ftp :)

is the relational database and ADO.net scalable enough to work on huge application that have millions of users -

from experience in industry found many companies avoid using relational databases , ado.net interact database. instead use flat databases , write sql statement directly against database ,, since believe having many tables linked using foreign keys , using ado.net interact db have serious performance drawbacks on large application have millions of transaction per day.,, these points valid? no, these point not valid (in scenarios). relational databases faster in large datasets because of relations. (unless of course have huge list of non-relational data , frankly, datasets not relational in huge application these days?) stackoverflow.net example gets 7 million page views day , built on relational database. also, please see answer more. similar discussion: database vs. flat files edit: huge mean millions of transactions per day.... :) edit: removed ef reference.

actionscript 3 - How to use a relative path for a swc library in Flash Builder 4.6 -

Image
i'm using flash builder 4.6 , in 1 of actionscript projects, have referenced .swc library file. the way added project > properties > flex library build path > library path tab > add swc... here popup occurs , must select .swc file browsing through machine , selecting one. once that, it'll display added library this: somelibrary.swc - /full/path/to/the/swc/here/lib/somelibrary.swc what want able use relative path instead, like: somelibrary.swc - ../../lib/somelibrary.swc does know way or workaround able use relative paths swc libraries in flash builder? thanks! i suggest dump mxmlc compilator's settings xml file (where can add required swcs , paths hands using favorite text editor). add compilator option -dump-config=build.xml find xml config, modify needs replace -dump-config=build.xml -load-config=build.xml

jQuery: .click() and execute function -

since few hours tried make script show div when window.location.hash set up. when page ready script works when try call jquery event .click() doesnt work. the code: var bodyheight = $('body').height(); $(asd); function asd() { locationhash = window.location.hash.replace(/^#!/, ''); if(locationhash != "") { $('div#bglayer').css({ 'height': bodyheight, 'display': 'block' }); $('div#feedback').css('display', 'block'); $('div#bglayer, div#feedbackright').click(function() { var clientname = ""; var clientemail = ""; var clientwebsite = ""; var clientimage = ""; var clientfeedback = ""; $('div#bglayer').css('display', 'none'); $('div#feedback').css('display', 'none'); $('div#feedbacks').css('d

php - Wordpress Custom Post Loop - How to not print information from an Array that I don't need? -

been using plugin custom content type manager create custom post displays location information. hold weekly games each location - i'm trying accomplish in custom post have set of checkboxes check if venue played on monday, tuesday or wed...etc in theme i'm going have 7 day calendar. , if location checked day want title/links location printed there. i'm giving background because dont think i'm going correct way. i'm doing in loop, , i'm pulling checkbox options in array, , if option equal monday specific day, prints locations title name etc. want setup non-technical person (kinda me lol) can add new location , pick "friday" example , code rest. got working. 2 problems though i'm running 7 loops accomplish - 1 each day. know stupid , there better solution. it's printing correct information - reading/printing each of other locations except not putting info them - know cause creating empty divs them. note: i'm having issues post

xcode4.2 - Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard? -

i still have snow leopard. have xcode 4.2 ios development. morning upgraded iphone , ipad ios 5.1. but xcode 4.2 not detecting device testing. not find ios 5.1 sdk image on apple's developer site, xcode 4.2. i don't want upgrade lion xcode 4.3 @ time. will able use xcode 4.2 (on snow leopard) ios development now? to xcode 4.2 on snow leopard run code on device running ios 5.1 can this: if have mac running lion , xcode 4.3.1 can copy files from: /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/5.1 (9b176) place copied files in equivalent place on snow leopard mac: probably /developer/platforms/iphoneos.platform/devicesupport similarly copy ios 5.1 sdk files found in directory: /developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk also copy 'version.plist' lion machine in iphoneos.platform folder snow leopard machine. re-start xcode on snow leopard machine , re-connect device

c++ - Using boost for (pseudo-)random number generator of long double -

i'm trying use boost random number generation of long double (on 64bits machine). at point use rng = boost::mt19937(); however, compiler argues on line 88 of boost/random/mersenne_twister.hpp, x[i] = (1812433253ul * (x[i-1] ^ (x[i-1] >> (w-2))) + i) & mask; there implicit conversion shortens 64-bit 32-bit value... i didn't specified if want long double or double... why arguing on that? because i'm using 64bits os? is there simple solution problem? need long double generator... xd thanks the mt19937 32bit. defined in boost like typedef mersenne_twister_engine<uint32_t,32,624,397,31,0x9908b0df, 11,0xffffffff,7,0x9d2c5680,15,0xefc60000,18,1812433253> mt19937; for 64bit necessary use mt19937_64 .

mysql - Synchronization error occurs while running my program -

i using jsf2.0/primefaces , mysql, glassfish3.1 . i have 3 tables: person, file, domainecompetence person(name,......,iddomainecompetence) file(idfile,namefile,......,idperson) domainecompetence(iddomainecompetence.....) when person added database in same time row added file table. but error occurs after submitting. have 2 errors. dont know why 1 of them (not both in same time) appear after execute program. the index.xhtml: <h:form> <p:panel header="add user" style="width: 500px; font-size: 14px"> <h:panelgrid width="width: 300px;" columns="2"> <h:outputlabel style="font-size: 13px" value="nom" /> <h:inputtext value="#{addperson.nom}" /> <h:outputlabel value="prenom"/> <h:inputtext value="#{addperson.prenom}" /> <h:outputlabel value="etat civil"/> <h:selecton

dependency injection - Are these values dependencies? -

i've got object encapsulates remote calls. needs credentials make calls. think credentials should passed constructor that, once object created, user doesn't have keep passing them in every time make call object. seems sensible factoring. if though i've got added complexity of clients use object needing passed factory instead of object because credentials won't known until run time. given work, wondering if credentials (being string values , no code) count dependency or not? does question make sense? see i've gotten head after using ioc being passed constructor counts dependency , should instance of implementation of interface. i wouldn't see strings dependencies. instead, create iusercontext or iusercredentials abstraction can inject.

objective c - GMMGeoTileImageData error with MapKit -

in viewcontroller use maps , load list of pins. when move map or zoom in or out it, app crashes , displays error: [gmmgeotileimagedata isequaltostring:]: unrecognized selector sent instance 0x862d3b0 this code of view controller: - (void)viewdidload { statoann = [[nsmutablestring alloc] initwithformat:@"false"]; //bottone annulla per tornare indietro uibarbuttonitem *annullabutton = [[[uibarbuttonitem alloc] initwithtitle:@"annulla" style:uibarbuttonitemstyleplain target:self action:@selector(backview)] autorelease]; self.navigationitem.leftbarbuttonitem = annullabutton; //inizializzo la mappa mapview = [[mkmapview alloc] initwithframe:cgrectmake(0, 0, 320, 416)]; mapview.delegate = self; mapview.maptype = mkmaptypestandard; [self.view addsubview:mapview]; [self setgmaps:arrdata]; [super viewdidload]; } /** inizializzo l'annotation del poi mappa

jboss5.x - JBOSS 5 LOG4J ExceptionInInitializerError -

am migrating application jboss5 jboss4 i below exception while doing so i did make work, replaced new log4j, tried without log4j, changed common-logging jar. but still facing exception. appreciate on this. also, in project maintaing jars in 3 folders purpose 1.) webapp/lib 2.) common/lib 3.) services/lib am pasting here list of jars in each folder here 1.) webapp/lib folder 03/08/2012 06:54 pm <dir> . 03/08/2012 06:54 pm <dir> .. 03/01/2012 02:24 pm 458,647 admin.jar 03/01/2012 02:24 pm 49,170 bootstrap.jar 03/01/2012 02:24 pm 5,956 channel.jfap.jar 03/01/2012 02:24 pm 246,395 channel.tcp.jar 03/01/2012 02:24 pm 303,805 channelfw.jar 03/01/2012 02:25 pm 188,671 commons-beanutils-1.7.0.jar 03/01/2012 02:24 pm 31,909 commons-fileupload-1.1.1.jar 03/01/2012 02:23 pm 65,621 commons-io-1.2.jar 03/01/2012 02:24 pm 245,274 commons-lang

Redirect to App Store from iOS Application when name contains spaces? -

i having problems redireting ios app app store. using url: itms-apps://itunes.com/apps/app_name but no success. app name has spaces in cannot used in above example. there way around this. not possible use bundle identifier redirect app store? you can build link that: http://www.itunes.com/app/appname upper-/lowercase doesn't matter remove spaces , punctuation example: doodle jump - warned: insanely addictive! will be: http://www.itunes.com/app/doodlejumpbewarnedinsanelyaddictive

sql - Filtering based on COUNT -

i have query works well. trying add filter if users_in_this_country > 1. know add users_in_this_country > 1 where. if add inside parenthesis says invalid column , same if add outside of parenthesis. dumb , easy, on looking? thanks! select u.contactname ,cu.[user id] ,c.name ,c.id ,cu.[foreign table] ,count(*) on (partition c.id) user_in_this_country dbo.country c inner join dbo.countryuser cu on c.id = cu.[foreign id] inner join dbo.usercolder u on cu.[user id] = u.id exists ( select * countryuser cu2 cu2.[foreign id] = cu.[foreign id] , cu2.[user id] <> cu.[user id] , cu.[foreign table] = 'country') with aggregate functions (like count) used in conjuction on clause have use cte or subquery, this cte ( select u.contactname ,cu.[user id] ,c.name ,c.id ,cu.[foreign table] ,count(*) on (partition c.id) user_in_this_country

javascript - jQuery Mobile Show/Hide Form input based on select field -

i have following form fields on jquery mobile page. want hide element, , have .show() if user selects option value="other" here's html: <div data-role="fieldcontain" class="no-field-separator"> <select name="plan_height" id="plan_height" data-native-menu="false"> <option>plan height</option> <option value="standard 6foot 2inch">standard 6'2"</option> <option value="other">specify in notes</option> </select> </div> <div id="specify_plan_height_box" style="display:none;"> <div data-role="fieldcontain" class="ui-hide-label no-field-separator"> <label for="specify_plan_height">specify plan height</label> <input type="text" id="specify_plan_height" nam

drop down menu - How to use item templates for dropdown lists in asp.net -

i need customize dropdownlist in asp.net , add checkboxes make multi selection list. can using item templates. if so, how? wanted know if can have tri state checkboxes? appreciated! drop down lists rendered "select" type inputs in html. so, can't format them contain checkboxes. however, can make use of checkboxlist control, placing in div present desired control. this site seems have solution: http://www.dotnet247.com/247reference/msgs/42/211693.aspx or can try looking jquery ui control this.

android - WebView Cant get onClick event -

i have app webview. in webview app shows user internet page have link launch app, in activity. in html page doing like <a href="my.special.scheme://other/parameters/here"></a> and goes fine, need same thing javascript. doing this: <html> <head> <script> function redirect(n){ window.location = n; } </script> </head> <body> <button id="target" onclick="redirect('my.special.scheme://other/parameters/here')" >name</button> </body> </html> but nothing happens. using android 1.6 any suggestion? did enable javascript view? disabled default ( docs ).

c++ - How do TCP state transitions occur? -

this link explains tcp state machine . lists state transitions based on send/receive events. feel describes obvious ones. i'd know happens when you're in listen state , receive data packet, or when you're in established state , receive syn. are there implementations of tcp in c/c++ available, winsock library or others? tcp rfc document nice , all, implementation more helpful, imo. this excellent resource want: 1995 - tcp/ip illustrated, volume 2: implementation (with gary r. wright) - isbn 0-201-63354-x

wpf - Binding issue on CustomControl -

i have written customcontrol on wpf contentcontrol contentpresenter , button. here control template (located in themes/generic.xaml) : <controltemplate targettype="{x:type local:testcontrol}"> <stackpanel background="{templatebinding background}"> <contentpresenter content="{templatebinding content}" /> <button content="next" isenabled="{templatebinding isnextbuttonenabled}" /> </stackpanel> </controltemplate> here control code (testcontrol.cs) : public class testcontrol : contentcontrol { /// <summary> /// identifies isnextbuttonenabled dependency property /// </summary> public readonly static dependencyproperty isnextbuttonenabledproperty = dependencyproperty.register( "isnextbuttonenabled", typeof(bool), typeof(testcontrol), new propertymetadata(true) ); static testcontrol() { defaultstyle

tcp - Dynamic DNS port forwarding -

i need use computer server isp blocks port 80, 21, 23 etc. can use other ports , dynamic dns service don't want: (http) users have type http://mydynamicdnsaddress:#port# (http) users redirected http://mydynamicdnsaddress http://mydynamicdnsaddress:#port# (http) kind of service gets http response , change before resending users. no-ip , godaddy that. change parts of html - eg: title. users have type ftp://mydinamicdnsaddress:#port# i believe need kind of dynamic dns service points router forwards tcp packets address changing ports. know online service that? many "dynamic dns companies use http redirection send browser port 80 different port. when ask dynamic dns company point domain port other 80, point domain own web-server ip address (in dns), , on web-server (running on port 80) have simple server side script redirects browser web-server on whatever port specified - optionally "cloaked" visitor won't notice." can specify tcp/ip port

javascript - Is viewInstance.undelegateEvents() the same as $(this.el).unbind()? -

is viewinstance.undelegateevents() same jquery's $(this.el).unbind() ? do function same way, in removing events view? from http://backbonejs.org/docs/backbone.html#section-131 undelegateevents: function() { this.$el.unbind('.delegateevents' + this.cid); }, so, identical. undelegateevents method scopes undelegation events backbone view had explicitly set delegateevents method, using declarative events configuration on view.

asp.net mvc 3 - visual studio 2010 debugging gives network error -

i have asp.net mvc3 app developed in vs 2010 running on windows 7 iis 7.5 consuming several wcf services part of vs solution file , on same localhost. when debug services start in wcf test utility nicely. when attempt debug asp.net app network error , points ip address not recognize @ all. if start app iis using browse *:80 (http) works perfectly. can enter data, stuff , wonderful. if attempt go there via http://localhost/appfilepath ie (not via iis manager) message ie cannot display webpage. does have idea need begin looking determine issue is? thank you! check properties of project under web tab there servers section controls debugger fires , starts.

jvm - i think it is enough that only one kind of classloader in java -

there multiple subclasses of classloader: bootstrapclassloader,extclassloader,appclassloader , on. however, think 1 bootstrapclassloader enough! can please tell me why there many different kinds of classloaders? notice: why there many kinds of classloaders, not why there many instances of classloader! each class loader designed load classes different locations. instance, can create class loader load class file networked server or download binary of class remote web server, etc. logic performs operation baked class loader , provides consistent interface clients can load classes regardless of how class loader performs loading. bootstrapclassloader capable of loading classes jvm_home/lib directory...but if need load them different location?? in short, because there infinite (well, not quite) number of ways load classes , there needs flexible system allow developers load them want.

asp.net mvc - MVC 3 - In a controller how do you check which items are selected in the view? -

i have 3 models albums has instances of track , playlist has instances of track . currently album view shows each track checkbox , dropdown @ bottom shows playlists user , add playlist button. users should able select tracks album , add them playlist have. i'm not sure controller handle this. view looks **album view** @{ viewbag.title = "details"; } <h2>album: @model.title</h2> @{ list<sem_app.models.playlist> abc = viewbag.playlists; ienumerable<selectlistitem> selectlist = c in abc select new selectlistitem { text = c.playlistname, value = c.playlistname, }; } @using (html.beginform()){ foreach (var track in model.tracks) { @html.checkbox(track.title) @track.title <br /> } @html.dropdownlist("abd", selectlist) <input type="submit" value="add selected songs playlist" /> } my controller method looks