Posts

Showing posts from March, 2014

Animate on an X C# NOT XAML Margin Animation Windows 8 -

can explain me doing wrong here? beginner @ c# , not want leave xaml when comes animating image on screen. _sb = new storyboard(); doubleanimation movexanim = new doubleanimation(); movexanim.duration = timespan.frommilliseconds(5000); movexanim.from = 0; movexanim.to = 300; _sb.children.add(movexanim); storyboard.settarget(movexanim, person); storyboard.settargetproperty(movexanim, "(canvas.left)"); _sb.begin(); all examples find xaml. what makes think not work? assume person uielement. is person element contained inside canvas? example below should work code> <canvas> <textblock text="hi" x:name="person" /> </canvas>

Facebook share button breaking CSS animations in IE11 -

this issue started occurring in past couple of weeks, may related ie11 update or change fb's widget. i have fb share button on site. <script> (function (d, s, id) { var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) return; js = d.createelement(s); js.id = id; js.src = "//connect.facebook.net/en_us/all.js#xfbml=1"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> is in document head, <div id="fb-root"></div> , <div class="fb-share-button" data-href="http://myurl.com" data-width="60" data-type="button"></div> in body. it works fine in chrome, firefox, safari , ie10 (as ie11 w/ ie10 emulation turned on). in ie11 css animations stop working. animations set default in stylesheet work, animations fired via :hover inline css added jquery won't pl

android - Where should location be captured -

as many of may know, (default?) way request location updates calling code: locationlistener locationlistener = new mylocationlistener(); locationmanager.requestlocationupdates( locationmanager.gps_provider, 5000, 10, locationlistener); now, assume must receive location updates or long periods of time (even if app in background). implies that: one cannot 'tie' locationlistener activity because activity destroyed, locations no longer captured. the location manager cannot tied intentservice, because execute , finish right away. my question: best place capture location updates long periods of time, when app in background? service location updates continuously when app closed public class gpsservice extends service{ private locationmanager locationmanager; mylocationlistener locationlistenerp; public gpsservice() { } @override public ibinder onbind(intent intent) { // todo auto-generated method stub return nu

data structures - What is the best way to implement Tree : LinkedList - Array -

i preparing exam, 1 of questions came across : best way implement tree, linkedlist or array. most likely: - array uses 1 address - linkedlist use 2 addresses. using linkedlist, can insert value need (we manage memory), likey use o(n) access element, while in array o(1). how should answer question ? or should subjective. for binary search tree , answer array ( @ least extendable array, vector<> aren't limited fixed size). i'll analysis of common operations, assuming tree balanced . query in bst, nodes need have pointers left , right children , common have parent pointers. in array implementation, "pointers" can integer indexes array ( mean array store node objects). looking parent , children of node constant since indexing array constant. o(1) . linked list implementation need store reference position ancestors/children are, requiring o(n) pass through list desired references. search starting @ root , array[0] , searching o(log

.net - I always get a '255' value as keycode of these characters. How to retrieve the right keycode? -

i don't understand next issue. i'm using function vkkeyscanex retrieve virtual-keycode of character, low-order byte of value returns function retrieve keycode. all works expected these characters same keycode 255 áéíóú ÁÉÍÓÚ àèìòù ÀÈÌÒÙ äëïÖÜ ÄËÏÖÜ both low-order byte , high-order byte returns me vkkeyscanex function 255 chars. i don't know 255 , 'cause print character this: msgbox(convert.tochar(255)) i don't know if error or proper value, anyways i've tried specify keyboard layout (which 10 ) using getkeyboardlayout function still same 255 value. someone explain me if value right , means 255 keycode?, if not, how transform chars in right keycode? this code i'm testing: imports system.runtime.interopservices public class form1 private sub test() handles mybase.shown dim sb new system.text.stringbuilder dim characters char() = "abcdefghijklmnopqrstuvwxyz ñÑçÇ áéíóú ÁÉÍÓÚ àèìòù ÀÈÌÒ

c++ - Why can templates only be implemented in the header file? -

quote the c++ standard library: tutorial , handbook : the portable way of using templates @ moment implement them in header files using inline functions. why this? (clarification: header files not only portable solution. convenient portable solution.) it not necessary put implementation in header file, see alternative solution @ end of answer. anyway, reason code failing that, when instantiating template, compiler creates new class given template argument. example: template<typename t> struct foo { t bar; void dosomething(t param) {/* stuff using t */} }; // somewhere in .cpp foo<int> f; when reading line, compiler create new class (let's call fooint ), equivalent following: struct fooint { int bar; void dosomething(int param) {/* stuff using int */} } consequently, compiler needs have access implementation of methods, instantiate them template argument (in case int ). if these implementations not in header, wouldn

posix - How to get file name which is last created and starts with word "backup"? -

how file name last created , starts word "backup" ? have listed directory dir *dir; struct dirent *ent; if ((dir = opendir (directory.c_str())) != null) { while ((ent = readdir (dir)) != null) { string name(ent->d_name); } closedir (dir); } else { /* not open directory */ perror (""); return "exit_failure"; } but how metadata when created ? you can use stat lots of information file. output of stat struct stat . struct stat contains following member data: struct timespec st_atim; /* time of last access */ struct timespec st_mtim; /* time of last modification */ struct timespec st_ctim; /* time of last status change */ is enough needs? more information on stat can found in its man page .

c++ - Weird Result with Depth Test -

Image
i'm having problem when enable gl_depth_test when rendering objects, here's happens: gl_cull_face disable on one. it happens perspective view! have , idea of what's happening? i'm using qt 4.8 this. of course, if disable depth test, looks fine, objects overlays in wrong way, expected. update i create projection matrix this: projectionmatrix.settoidentity(); projectionmatrix.perspective(45, float(width) / float(height), 0, 20.0); where width , height related viewport size. here's code draw scene: void glwidget::paintgl() { glclearcolor(0.4765625, 0.54296875, 0.6171875, 1.0); glclear(gl_color_buffer_bit | gl_depth_buffer_bit); editor->setuniformvalue("projectmatrix", controller->getprojectionmatrix()); editor->setuniformvalue("viewmatrix", controller->getviewmatrix()); /** dibujemos los grids **/ gldisable(gl_depth_test); gldisable(gl_cull_face); (int i=0; i<3; i++) {

kryo - Java: How to force upcast? -

i'm using kryo library serialization in java. have problem have no way force upcast. here example situation: class {} class b extends {} public save() { kryo kryo = new kryo(); kryo.setregistrationrequired(true); //force registration kryo.register(a.class); //register kryo output output = new output( ... ); b bar = new b(); kryo.writeobject(output, (a) bar); //try cast } this causes class not registered error, because bar still instance of b . is there way force bar cast instance of a , or need new a(bar) ? upcasting doesn't change object itself, type of reference points it. have register b.class.

Parameter Enums in C# -

i'm used programming in java project i'm supposed using c#, i'm trying convert packet system on java project, i'm running issues using c# compiler. here's code. abstract class packet { public static enum packettypes { invalid(-1), login(00); private int packetid; private packettypes(int packetid) { this.packetid = packetid; } public int getid() { return packetid; } } } this how it's done in java code, , have individual packets extend packet class. i'm trying figure out how make come in c#. perhaps having separate class each packet isn't way should done here? unlike java enum s classes, in c# enum s plain values. cannot have member functions or fields. one approach define extension method enum , this: public static class packettypesextensions { static readonly idictionary<packettypes,int> idfortype = new dictionary<packettypes,int> { {

php - Pjax and Laravel routes -

currently integrating jquery pjax, best explain. have working inside first view when accessing url address directly address bar view without @extends('layout.main') . here setup: routes, 1 route retailers.index view , other parameter , retailers.stores view. route::get('retailers', array( 'as' => 'retailers', 'uses' => 'sitecontroller@retailers')); route::get('retailers/{city}', array( 'as' => 'find-retailers', 'uses' => 'sitecontroller@getretailers')); controllers: public function retailers() { $listings = db::table('retailers_listings') ->orderby('counter', 'desc') ->groupby('country') ->get(); return view::make('retailers.index') ->with('retailers_listings', $listings) } public function getretailers($city) { $locations = db::table('retailers_listings') ->orderby('countr

java - Eclipse - Cannot load 32-bit SWT libraries on 64-bit JVM -

i'm trying run java project called to-do-o (source - http://www.ohloh.net/p/to-do-o/enlistments ) after loaded projects eclipse , run main.java, returns following error: exception in thread "main" java.lang.unsatisfiedlinkerror: cannot load 32-bit swt libraries on 64-bit jvm i tried adding -d32 many of solution suggests [see iamge] , returns message error: java instance not support 32-bti jvm. please install desired version. does have fix?? referring http://eclipse.1072660.n5.nabble.com/swt-libraries-on-64-bit-jvm-td91066.html should either download swt 64 bit, or run jvm -d32 option. if on mac, java 7 or 8, might error message: "this java instance not support 32-bit jvm". of course nothing restricts using old java version: /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java -d32 ...

php - Searching data with combobox codeigniter -

i'm giovanni, got problem on code, seems code work why result unmatch values on combobox.. can tell me what's wrong? here's code (on controller. function pencarian_indeks) function pencarian_indeks() { //muat library form validation $this->load->library('form_validation'); if(isset($_post['submit'])) { //set aturan validasi untuk setiap field isian $this->form_validation->set_rules('tanggal', 'tanggal', 'required'); $this->form_validation->set_rules('kategori', 'kategori', 'required'); $this->form_validation->set_rules('tahun', 'tahun', 'required'); $this->form_validation->set_rules('bulan', 'bulan', 'required'); //cek apakah form validasi berhasil if ($this->form_validation->run() == false)//jika validasi gagal { $this->session->set_flashdata('

jogl java.lang.UnsatisfiedLinkError: with gluegen-rt.dll -

i have been introduced java , jogl university course. trying set development environment running several difficulties. whenever try run jogl application following error: exception in thread "main" java.lang.unsatisfiedlinkerror: c:\users\user>\appdata\local\temp\jogamp_0000\file_cache\jln8888451586118307843\jln8967240096003338483\gluegen-rt.dll: access denied i every project create, every demo project try run , demo applications try run have @ do. i can see permission problem. don't understand this: why gluegen-rt.dll being extracted here? why there permissions create file not read it? at moment projects using native jars, if can link me tutorial on how use native libraries instead appreciated. i running on windows 8 x64 jre7 , using jogl 2.0 . this caused virus scanner (f-secure, microsoft security essentials, ...). this false positive or real virus infected machine , modified several dlls used gluegen , jogl . gluegen extra

javascript - Calling different setInterval() for polling multiple functions (How to handle multiple setInterval calls) -

Image
i developing application in have continously poll 5 different functions using setinterval() the problem of times function call gets aborted , there issue sequence of execution. meant. interval=setinterval("function1()",1997);//997 interval=setinterval("function2()",2697); //1947, 1497 interval=setinterval("function3()",2837); //1977 interval=setinterval("function4()",2851); //2177 interval=setinterval("function5()",2873); //3051 most of times of function call getting aborted , affects mode of execution. tried changing time interval there still no use. there solution this??? please help... thanks in advance this screenshot of console... mite understand situation better you should use different variables different intervals like, interval1 = setinterval("function1()",1997);//997 interval2 = setinterval("function2()",2697); //1947, 1497 interval3 =

android - Does Flash pro automatically adjust my game's resolution for all devices? -

i created game using flash pro , have been testing smartphone , it's size 480x800. set document size in fla file 480x800. but i'm wondering if app automatically adjust resolution fit other sizes such 1280x720 , 960x640. if not, how can make automatically adjusts resolution fit size of smartphone as possible without losing 480x800 ratio. expect little bit of empty spaces on side of other smartphones. or guess make background picture little bit "extra" bigger 480x800? oh , smartphone lg android no, should yourself. should design game ok on various screens. //startup of game, initial settings stage, //and getting screen size public function main() { addeventlistener(event.added_to_stage, onadded); } private function onadded(e:event):void { removeeventlistener(event.added_to_stage, onadded); stage.align = stagealign.top_left; stage.scalemode = stagescalemode.no_scale; //width , height trace(stage.stagewidth, stage.stageheig

Microsoft Visual Studio JavaScript Intellisense object array -

i want ask about: i've created namespace named "app" , , object named "project" . when hit app.project fine. made params , explanations. bun hit wall when try write object array . i need write "items" objects of array. bu couldn't find how do. at end; when hit app.project.item[0]. i want continue variable "name" . if use app.project.item. i can see name, in firt condition intellisense stops working. thank you.

ios - Black Frame Around iPad Build -

Image
i made iphone app under universal applications. deleted ipad storyboard @ start , added in using answer: converting storyboard iphone ipad @ later stage. now when run ipad build, there seems black border around it. i've made sure .plist using main_ipad main storyboard file base name (ipad) . found bug: because under deployment info in general tab, selected iphone devices. changing universal fixed it.

ios - How to tell when CLLocationManager has a lock on the users location -

if cllocationmanager semi working in app. start locationmanager, set delegate, , accuracy. once location manager starts map shows me in ocean? is there way know when cllocationmanager has lock? i have following method setup, doesn't called unless walk few steps. -(void)locationmanager:(cllocationmanager *)manager didupdatelocations:(nsarray *)locations i have verified running on main thread. look @ horizontalaccuracy property of cllocation objects receive in didupdatelocations . on device, when first start location services, you'll notice series of locations coming in decreasing horizontalaccuracy values (i.e. more , more accurate location values). it's not question of when "locks in", rather when receive location horizontalaccuracy sufficiently small app's purposes. in terms of method not getting called until move, function of desiredaccuracy , distancefilter values use.

mysql - Fetching a random record -

i developing ruby on rails question bank application.i want know how retrive random records database out duplication.and using mysql database.also random records show in view. solution: 1 user.limit(10).order("rand()") solution: 2 ids = user.pluck(:id).shuffle[0..9] user.where(id: ids)

angularjs - Beautiful vertical timeline -

i want create vertical timeline/calendar in angularjs app. which plugin can used create vertical timeline/calendar? there quite few plugins creating timelines. how feed data define calendar part. nikolay dyankov has plugin built in calendar wordpress isn't vertical http://nikolaydyankovdesign.com/?portfolio=timeliner-for-wordpress . and here nice ones: http://melonhtml5.com/demo/timeline/ http://bootsnipp.com/snippets/featured/timeline-responsive bootstrap. sorry realized looking angular approach. found best stick straight forward css timeline. this 1 looks promising: http://codepen.io/nilswe/pen/femfk then when adding data dynamically through controller use automatically shift left right center. (function(){ 'use strict'; var controllerid = 'data'; angular.module('app').controller(controllerid, ['$scope']); function data($scope) { $scope.connections = []; function addconnectio

How to copy paste from notepad to vim? -

i new in vim , want copy text gedit , paste in vim. in vim know copy paste command mode , visual mode gedit vim have no idea. is possible? copy whatever like, in vim, press shift+insert paste content in clipboard file. make sure in insert mode . works in ubuntu 12.10 long tried. edit before paste, recommended enter paste mode (by :set paste ) of vim in case meet un-wanted feature incorrect auto-indent. (thanks @dmitryfrank)

How to insert Html data in lotus notes document (email,task,etc.) body using C++ api? -

i using lotus notes 8.5 c++ api create new notes document email,calendars, tasks,etc. not able put html data in notes document body.when insert html data, shows html code. can put plain text using following api. lndocument mydocument; lnstring strval= "xyz"; lntext txt; txt.setvalue(strval); mydocument.createitem("body", txt, lnitemflags_summary, lnitemoption_delete_append); how can put html data in body field? this tutorial has instructions on how create html email it aimed @ lotusscript shouldn't hard convert c++ api. gist you'll have create notesmimeentity , set text html you've generated.

wpf - powershell datatemplate binding syntax -

i'm having problems figuring out syntax itemscontrol databinding in powershell. have simple wpf script below 2 examples of itemscontrol data template. first 1 (list01) has multiple elements , not show properly, 2nd itemscontrol (list02) has 1 binding element , works fine. i'm looking correct syntax bind objects first itemscontrol (list01). complete powershell script (: [xml]$xaml = @' <window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:name="mainwindow" title="itemscontroldatabindingsample" height="350" width="300"> <grid margin="10"> <grid.rowdefinitions> <rowdefinition minheight="20"/> <rowdefinition minheight="50"/> <rowdefinition minheight="50"/> </grid.rowdefinitions> <grid.columndefi

jquery - how is this.checked working in this code? -

how this.checked in code being calculated here? code working way should be, i'm not getting logic. <p>select : <input type="checkbox" id="selectall"> </p> <p> item 1: <input type="checkbox" class="children" value="item1">item 2: <input type="checkbox" class="children" value="item2">item 3: <input type="checkbox" class="children" value="item3"> </p> $(document).ready(function () { $('#selectall').click(function () { $('.children').prop('checked', this.checked); }); }); jsfiddle the this.checked gives true or false used set checked property of elements class children. if select selected this.checked give true , false otherwise. to understand consider condition put on this.checked , set checked property true when checked , false when not

Entity Framework Database-First with Oracle Database -

i'm developing asp.net webforms application entity framework database-first connected sql server, , want connect same entity data model oracle database. my concerns are: how install oracle database engine on dev machine test? how connect data model oracle instead of sql server? how generate same schema oracle? are there drivers, tools, or apps need install? i doing same i.e. converting asp.net mvc application on sql server oracle. since application running, can do, generate create scripts sql server database, create same tables in oracle. install odp.net here . allow connect oracle .net application. now create new edmx file tables in oracle , if properly, application should running. note: odp.net provider visible if have vs license. not visible on free version.

python regex for current time -

i having trouble regex seems in creating regex matches time in format "hh/mm/ss". making alarm clock in python. here's have: import time, re time_pattern = re.compile(r'([0-2][0-4])/([0-5][0-9])/([0-5][0-9])') alarm_set = input("set alarm time (hh/mm/ss): ") while not time_pattern.match(alarm_set): print('invalid input. must expressed in "hh/mm/ss"') alarm_set = input("set alarm time (hh/mm/ss): ") but reason when try match '18/00/00', doesn't match. have no idea why isn't working. because matches '24/59/59' , '00/00/00' fine. weird because me, regex seems fine. any appreciated =) it doesn't match 18/00/00 because match hour using: [0-2][0-4] you fix using [0-1][0-9]|2[0-4] instead. a better approach might use strptime instead of using regex.

java - Efficient packet decoding -

i working on netty application snmp protocol. protocol has 3 different versions 1,2,3 , corresponding message format go versions. wondering efficient way decode these based on variations between packet formats. snmpv1 message format: http://www.tcpipguide.com/free/t_snmpversion1snmpv1messageformat.htm snmpv2 message format: http://www.tcpipguide.com/free/t_snmpversion2snmpv2messageformats-2.htm as can see messages differ in format. post v3 differs lot can't post more 2 links. my initial idea make reflection based decocder it's proving rather troublesome. something along lines of (taken source on github): public <t> t decode(w buf, class<t> clazz) throws asn1exception { if (typeencoders.containskey(clazz)) { return clazz.cast(typeencoders.get(clazz).decode(buf)); } t obj; @suppresswarnings("unchecked") map<string, object> sequence = (map<string, object>)annotatedtypeencoders.get(universaltype.seq

c# - AmChart customization for Windows Phone 8 -

Image
i have working on windows phone 8 app , trying implement charting library. i have used charting example given here : http://mobile.dzone.com/articles/mango-sample-chart-data its good, not able customize it. 3 issues : 1) onclick of slice need value. 2) how add double tap ? 3) legends should @ bottom aligned horizontally. here screen shot. edit this xaml file: <grid x:name="contentpanel" grid.row="1" margin="12,0,0,0"> <charts:piechart width="400" name="piechart" height="400" doubletap="piechart_doubletap" tap="piechart_tap" valuememberpath="value" titlememberpath="title " background="black"> <charts:piechart.br

Using Mechanize (Python) to fill form -

i want fill form on page using python mechanize , record response. how should it? when search forms on page using following code, shows form search. how should locate form name of other form fields such name, gender etc? http://aapmaharashtra.org/join-us code: import mechanize br=mechanize.browser() br.open("http://aapmaharashtra.org/join-us") form in br.forms(): print "form name:", form.name print form the form need (with id="form1" ) loaded dynamically on fly - why don't see in select_forms() results. by using browser developer tools may find out form loaded http://internal.aamaadmiparty.org/directory/format.aspx?master=blank link. here's should start then: import mechanize br = mechanize.browser() br.open("http://internal.aamaadmiparty.org/directory/format.aspx?master=blank") br.select_form(nr=0) br.form['ctl00$maincontent$txtname'] = 'test name' # fill out other fields req = br.s

java - What is the best way to parse sms -

i developing app parsing sms strings want store in sqlite db. here sample of how sms look. sample airtime payment. airtime payment made ugx5,000 kkl(0909xxxx). balance ugx10,000. thank using kkl mobilemoney. sample mobile money deposit you have received ugx100,000 09006700. reason:j. balance ugx170,000. sample mobile money sending you have sent ugx10,000 08970000. reason:j. balance ugx120,000. thank using kkl mobilemoney. what interested in is: -the amount send/received /paid. -the number received from/sent to/payment made to. - reason -the balance . so far have tried using split function . it not consistent though.i using array index of string token on strings index out bound exception yet on strings works. here code have far...but works not consistently! if (str.startswith(received)) { // mm deposit log.e("msg", str); string delimeter="[ .]+"; string[] tokens= s

oracle - PL/SQL DBMS_XMLQUERY max size -

my oracle version 11g release 2 our system using dbms_xmlquery transform sql result xml, data becoming large , error: ora-06502: pl/sql: numeric or value error the reason seems dbms_xmlquery cannot handle many records, oracle's official document doesn't show limitation. maybe have done wrong. can reproduce problem in following steps: step1: create table xmldata ( data_id int primary key, data_str varchar2(100) ); step2: insert xmldata values(1, 'test0123456789'); insert xmldata values(2, 'test0123456789'); insert xmldata values(3, 'test0123456789'); .... insert xmldata values(500, 'test0123456789'); step3: create or replace function test(total in int) return clob int; vn_ctx dbms_xmlquery.ctxhandle; begin vn_ctx := dbms_xmlquery.newcontext('select data_id, data_str xmldata rownum <= ' || total); dbms_xmlquery.propagateoriginalexception(vn_ctx,true); dbms_xmlquery.usenullattribu

performance - Impossibly high user and system times shown by time command in Linux -

i running following command in directory ~7000 files: time find . | xargs -p8 -n1 grep -f 'xxx' the results are: real 0m1.638s user 1m1.090s sys 0m5.080s i understand (user+cpu) can < or > cputime , following bound should hold: (user + sys) < real * ncpu where ncpu number of logical cores on system. @ instant there should @ ncpu processes running, , being assigned either user or sys time. yet have 12 logical cores (6 real cores x 2 hyperthreads), 1.638 * 12 = ~20 seconds , whereas somehow process managed consume more minute of cpu time. subjectively 1.6s real time right (and tried on larger directories). messing -p value varies reported real , sys times, plateaus around value somewhere around 8-12 . note none of files contain xxx, results same if use string gets hits. most common mechanism of "user" , "system" time accounting based in linux on periodic timer. method inaccurate, short processes: http://w

C preprocessor: macro function to call printf() -

i want conditionally use either printf() or statement: #define use_printf #ifdef use_printf #define macrofn(str) printf(str) #else #define macrofn(str) some_statement #ifndef use_printf but i'm getting following error: incompatible implicit declaration of built-in function 'printf' what doing wrong? thanks you don't have include <stdio.h> before macro definition. need #endif #if have started. example, following programme work fine: #define use #ifdef use #define asd printf("asd") #else #define asd puts("kek") #endif #include<stdio.h> int main( ) { asd; getchar( ); return 0; } so... yeah.

java - GlassFish server fails to start even after changing listener ports -

i use netbeans ide 7.4 , glassfish version-4.0 . irritated error, "glassfish server failed start http , https listener ports occupied." changed domain.xml file credentials this network-listener name="http-listener-1" port="8686" protocol="http-listener-1" thread-pool="http-thread-pool" transport="tcp"/> network-listener name="http-listener-2" port="8787" protocol="http-listener-2" thread-pool="http-thread-pool" transport="tcp"/> network-listener name="admin-listener" port="8888" protocol="admin-listener" thread-pool="admin-thread-pool" transport="tcp"/> still problem persists. how solve issue?

html - Hide and show not working in jQuery -

i have 2 list in html in single page .. want when page loaded 1 list display, , other hidden,, but when page loaded , both list there ,, after delay ,, other hidden here html code <div id="menu" class="menu-v" data-role="content"> <ul class="listul"> <c:foreach items="${model.vaults}" var="vault" varstatus="count"> <li class="outer" id="${vault.vaultid}" name="${vault.vaultname}"> <div class="listviewitem"> <div class="squaredthree"> <input type="checkbox" value="none" id="${vault.vaultid}" name="check" /> <label for="${vault.vaultid}"></label> </div> <span>${vault.vaultname}</span>

Binding a dropdown using Backbone.js -

i have started poc on backbone.js , facing basic problem.i populating dropdown list using collection. dropdwon not getting populated static values defined in collection. can please me out on this. $(function () { var country = backbone.model.extend(); var countries = backbone.collection.extend({ model: country }); var countryview = backbone.view.extend({ tagname: "option", initialize: function () { _.bindall(this, 'render'); }, render: function () { $(this.el).attr('value', this.model.get('id')).html(this.model.get('name')); return this; } }); var countriesview = backbone.view.extend({ initialize: function () { _.bindall(this, 'addone', 'addall'); this.collection.bind('reset', this.addall); }, addone: funct

modify the text of conditions of use in liferay -

i work liferay 5.2 i want change text appears after first login this text contains conditions of use but didin't find text in liferay please check \portal-web\docroot\html\portal\terms_of_use.jsp . there 2 ways terms of use appear in liferay. you can set below portal properties in portal-ext.properties make web content visible term of use content. specify group id , article id of journal article displayed terms of use. default text used if no journal article specified. terms.of.use.journal.article.group.id= terms.of.use.journal.article.id= if want modify of part of term of use content liferay provides can override "terms_of_use.jsp" in hook , provide changes in content.

winforms - Scrollbar in UserControl in C# -

Image
i have create usercontrol added in tabpage. tabpage.autoscroll = true; after launching application ,there vertical scrollbar. when resize application horizontally ther no scroll bar. tabcontrol-> tabpage -> usercontrol // tabpage // this.tab_resume_new.controls.add(this.usercontrolresume); this.tab_resume_new.location = new system.drawing.point(4, 29); this.tab_resume_new.name = "tabpage"; this.tab_resume_new.size = new system.drawing.size(1270, 635); in usercontrol // usercontrol // this.autoscaledimensions = new system.drawing.sizef(6f, 13f); this.autoscalemode = system.windows.forms.autoscalemode.font; this.autoscroll = true; this.controls.add(this.tablelayoutpanel8); this.name = "usercontrolresume"; this.size = new system.drawing.size(1260, 625) there few things can go wrong in situation

Bootstrap css use only glyphicons -

we have project in late development stage. has own css files, many, many classes , not in it. original developer of css not available more. we kept adding our classes , styles single file. there need nice icon set, , bootstrap has need. tried including bootstrap our project already, mess when that. clashing suppose. is there way include minimalist bootstrap includes glyphicons classes? simply go bootstrap's customization page @ http://getbootstrap.com/customize , untick apart glyphicons. give zip folder need glyphicons , nothing more.

c++ - Compiling PHP on Windows with /MT -

i need link php statically project on working. in order this, believe need compile php /mt, appears being done in /md. the real documentation have been able find on compiling php @ https://wiki.php.net/internals/windows/stepbystepbuild , not cover requirement. can done, or incorrect in assumptions? not sure why want this, can come pretty close building php static binary , using binary later c++ application. should portable , should meet requirements without linking application. to this, need include --enable-static when configuring. example: ./configure --enable-static=yes \ --enable-fastcgi \ --enable-force-cgi-redirect \ --enable-discard-path \ --prefix=/server/php \ --exec-prefix=/server/php \ --with-config-file-path=/server/php \ --disable-all \ --enable-shared=no \ --enable-session \ --with-gd \ --with-zlib-dir \ --with-freetype-dir \ --enable-sockets --with-freetype-dir=/usr/local you should add -al

Android 3d animation like Google Now Launcher Menu Animation -

i need make animation between activities or fragments this. use android api >=14. http://www.youtube.com/watch?v=cnmqiv5ocnk - it's nexus5 launcher i`ve tried animation android objectanimator, wasn't similar video animation. thanks in advance. i`ve tried code (gla_on.xml): <objectanimator android:duration="0" android:propertyname="alpha" android:valuefrom="1.0" android:valueto="0.0" /> <objectanimator android:duration="1000" android:interpolator="@android:interpolator/accelerate_decelerate" android:propertyname="scaley" android:valuefrom="1" android:valueto="12" /> <objectanimator android:duration="1000" android:interpolator="@android:interpolator/accelerate_decelerate" android:propertyname="scalex" android:valuefrom="1" android:valueto="12" />

php - find out the error in this code -

this question has answer here: reference - error mean in php? 29 answers <form action="" method="post"> username <input type="text" name="user"><br> password <input type="password" name="pwd"><br> <input type="submit" name="login" value="login"> <?php login(); ?> </form> this code give error that fatal error: call undefined function login() in /var/www/trainees/bhupender/cms/admin.php on line 10. this function.php files coding function login() { if(!isset($_post['username'])) return; global $link; $query = "select * `b_user` username = '{$_post['username']}' , password = '{$_post['password']}'"; $result = mysqli_query($link, $query); $no_of_re

c - Loading files to RAM (static) for improving the read time -

i writing c program small application need read huge data file buffer , need mathematical operations on data in buffer. problem that, lets assume have file of size around 7mb, reading values buffer taking time thereby degrading performance of application. possible write file data ram better performance reducing read operation buffer? going little different direction i'm going suggest profile application , see time spent. enough experience can sometimes guess correctly slow areas non-intuitive. guessing incorrectly means spend time optimizing things have little no affect on overall speed of program. my guess loading time of 7 mb file not primary issue here on modern hardware file load times lower you'd expect. example, tested reading 14 mb file , load times around 6 ms. assuming loading file once wouldn't expect issue. depending on version of vs2010 can use built-in profiling abilities. if not can create own simple profiling ability using windows queryperfo