Posts

javascript - Bootstrap accordian style table - show/hide all -

i have table set accordion when row clicked displays div underneath row. clicked again hides it. i create button allows user expand or hide all. var showing = true; $('#expandlist').click(function () { if(showing) { $(".collapse").collapse("hide"); showing = false; } else { $(".collapse").collapse("show"); showing = true; } }); the hide portion works, show not. how detect if collapsed keep showing variable updated.

Does ColdFusion support REST API URIs with a dynamic token in the middle of the URI? -

i've been playing coldfusion 11's rest api support , wondering if it's possible have support uri dynamic token in middle of uri instead of @ end. is, supports uris like: /rest/users/12345 where 12345 dynamic (in case, user's userid ). haven't been able find way (without tremendous amount of uri hacking) support uris like: /rest/users/12345/emailaddresses so, possible in coldfusion (11 or 2016)? if not, supported in taffy (i didn't see wrong)? tia it's been while , wanted provide answer in case else has same question... coldfusion, when defining cfc rest endpoint, allows specify wildcards/variable names in restpath attribute both <cfcomponent> , <cffunction> tags. define <cfargument> tags each 1 of these variables can access them within function. example: <cfcomponent rest="true" restpath="/users/{userid}/pets" ... > <cffunction name="getpets" access="remot...

Java Swing DefaultListModel containing storing more information -

Image
i created class store 2 properties public class mailentry { private string mail; private mailformat format; // enum public mailentry(string mail, mailformat format) { this.mail = mail; this.format = format; } public string getmail() { return mail; } public mailformat getformat() { return format; } } the jlist created me netbeans gui declared by private javax.swing.jlist<string> jlist1; and initialized defaultlistmodel private defaultlistmodel<mailentry> listmodel = new defaultlistmodel<>(); and set model jlist1.setmodel(listmodel); but error: incompatible types: defaultlistmodel<mailentry> cannot converted listmodel<string> jlist1.setmodel(listmodel); it seems jlist expects model of strings. i'd store more item-specific information, accessible through gui. how can work around? the problem you've decleared jlist1 as... private javax.swin...

python - Getting error 403 (CSRF token missing or incorrect) -

i'm need email form , i'm trying this: views.py def send_email(request): if request.method != 'post': form = emailform() return render_to_response('mail_form.html', {'email_form': form}) form = emailform(request.post, request.files) if form.is_valid(): subject = form.cleaned_data['subject'] message = form.cleaned_data['message'] email = form.cleaned_data['email'] attach = request.files['attach'] try: mail = emailmessage(subject, message, settings.email_host_user, [email]) mail.attach(attach.name, attach.read(), attach.content_type) mail.send() return render(request, 'mail_form.html', {'message': 'sent email %s'%email}) except: return render(request, 'mail_form.html', {'message': 'either attachment big or corrupt'}) return...

c# - Add Columns to Custom DGV User Control through Designer -

i creating custom user control holds datagridview. datagridview has custom functionality of events used in 3-4 different forms. ideally i'd able drop customdgv in form using designer , add columns through designer via right click -> edit columns regular dgv. however, option not available using customdgv. can add columns programmatically, keeping things visual possible. my guess @ reason dgv private inside of customdgv hence reason edit columns option not show. there way make protected/public without going .designer.cs file? hunch , may way off. you have expose these properties designer in custom user control using design time attributes.

Updating to android studio 2.0 -

my current android studio version in 1.3.2. want update 2.0 stable build. there way automatically? when go help->check updates, says new version of android studio available. the options gives me @ bottom download, release notes, ignore update, , remind me later. hitting download not download it, rather takes me canary channel of android studio , says beta there. want update 2.0 stable. why android studio not updating me?

c++ - Storing and Searching Large Data Set -

i'm relatively new programming in c++ , i'm trying create data set has 2 values: id number , string. there 100,000 pairs of these. i'm not sure data structure best suit needs. the data set has following requirements: -the id number corresponding string 6 digits (so 000000 999999) -not id values between 000000 , 999999 used -the user not have permission modify data set -i wish search id or words in string , return user id , string -speed of searching important so i'm wondering should using (vector, list, array, sql database, etc) construct data set , search it? the id number corresponding string 6 digits (so 000000 999999) good, use int , or more precisely int32_t id -not id values between 000000 , 999999 used not problem... -the user not have permission modify data set encapsulate data within class , go -i wish search id or words in string , return user id , string good, use boost.bimap -speed of searching...