Posts

Showing posts from April, 2010

javascript - Validating numeric value in text field does not give desired result -

validating text field value may positive whole number or number 1 decimal point , 1 decimal after point in javascript: 123 1 12345 233.2 1212.2 1.1 are valid numbers , 1.222 1.33 -89789 -3 are invalid numbers. ihave applied not desired result function checkonedecimal(txtbox) { if (txtbox.value.length > 0) { if (isnan(txtbox.value)) { txtbox.value = ""; alert("please enter number 1 decimal places"); txtbox.focus(); return; } else if (parsefloat(txtbox.value) > 0) { txtbox.value = ""; alert("please enter number 1 decimal places. eg. 8.1"); txtbox.focus(); return; } var oregexp = /^\s*\d+\.\d{1}\s*$/; if (oregexp.te...

audio - MP4 Atom Parsing - where to configure time...? -

Image
i've written mp4 parser can read atoms in mp4 fine, , stitch them - result technically valid mp4 file quicktime can open , such, can't play audio believe timing/sampling information off. should mention i'm interested in audio. what i'm doing trying take moov atoms/etc existing mp4, , take subset of mdat atom in file create new, smaller mp4. in doing i've altered duration in mvhd atom, duration in mdia header. there no tkhd atoms in file have edits, believe don't need alter durations there - missing? in creating new mp4 i'm sectioning mdat block wide box, , keeping 'mdat' header/size in right places - make sure update size new content. now it's entirely 110% possible i'm missing crucial format, if possible i'd love final piece. got input/ideas? code can found @ following link: https://gist.github.com/ryanmcgrath/958c602cff133bd7fa0b i'm going take stab in dark here , you're not updating stbl offsets pro...

java - Why is only 'else' part getting executed, even if 'if' is true? -

here main activity: package com.santosh.sampleapp; import android.app.activity; import android.content.intent; import android.os.bundle; import android.widget.button; import android.widget.edittext; import android.widget.textview; import android.widget.toast; import android.view.gravity; import android.view.view; import android.view.view.onclicklistener; public class main extends activity { edittext password_field; textview tv_err; button login; /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); password_field = (edittext) findviewbyid(r.id.password_field); tv_err = (textview)findviewbyid(r.id.tv_err); login = (button)findviewbyid(r.id.login); final string password = password_field.gettext().tostring(); login.setonclicklistener(new view.onclicklistener() { @over...

textarea - How to convert carriage returns into line breaks in php when I receive the email? -

i have website form. form submitted email address can read there. i've been testing sending myself emails, when receive message , expect example: name: guy number: 123456789 email: someguy@someweb.com message: croissant liquorice macaroon. jujubes cupcake cupcake cupcake cotton candy danish. muffin croissant apple pie. chupa chups jelly-o oat cake sugar plum croissant tootsie roll. candy canes topping lemon drops. gummies jelly gummies brownie halvah sesame snaps candy canes applicake. marshmallow caramels sugar plum jelly macaroon sesame snaps danish powder sesame snaps. bonbon liquorice muffin liquorice cotton candy dessert oat cake. cotton candy caramels dessert cake pie jelly beans tiramisu. cake applicake tiramisu muffin macaroon pie donut. i receive them this: croissant liquorice macaroon. jujubes cupcake cupcake cupcake cotton candy danish. muffin croissant apple pie. chupa chups jelly-o oat cake sugar plum croissant toots...

jpa - Junit4 throws an Exception when test run -

this question has answer here: junit @test expected annotation not working 7 answers im using struts2, spring3 , jpa application. when use junit works expected problem user defined exception test. the code calling action form test @runwith(springjunit4classrunner.class) @contextconfiguration(locations = {"classpath:applicationcontext.xml"}) public class helloworldtest extends strutsspringjunit4testcase { public helloworldtest() { } > @test > public void testgetstring2() throws exception { > helloworld helloworld = new helloworld(); > string result = executeaction("/helloworld.action"); > string s = helloworld.getstring("test"); > assertequals("test", this); > } my web.xml file. > <context-param> > <param-name>...

Why should main be present in a Java class? -

this question has answer here: why java main method static? 37 answers why should declare main method? know main method starting point of class. why should declare public static void main(string args[]) ? why can't declare public static void test(string args[]) ? main key word? how jvm know starting point? the jvm has know somehow starting point of program is. way designers chose mark call entry method main , because same name used purpose in c (which programmers familiar @ time) , makes sense. there's nothing particularly magical name, had choose something, , practical choice.

eclipse - updating gitignore file from egit in Mac -

i'm new git (and egit), , having problems it. problem i'm seeing every time i'm trying push or merge, dirty_tree errors, files .ds_store , .classpath suffixes. tryed adding suffixes gitignore file in both local , shared repository , doesn't seem - git still looks these files when trying anything. there special needs done in order change file? i'm using eclipse juno mac, let me know if need more details. thanks! if add files .gitignore , need remove them index. git rm --cached afile git commit -m " remove afile" see " eclipse git plugin - remove file repo without deleting local " see how in egit, without console (even though cli -- command-ilne interface) remains safest way it) team > untrack then , .gitignore in effect.

c++ - Location of class member changes when class method is accessed from different places -

i having problem of location of class member changes depending on when function run. when constructor running, location of member 0x008bc044. later member function called , location of same member still 0x008bc044. later on member function run again location of same member changes 0x008bc048. other members of class don't change there location. not casting class type. this causing problem because function reading random data , causing incorrect output. i using visual studio 2012, 11.0.60315.01 update 2. album of visual studio debugger you running 32 bit system, have a derived class , show pointer of base class , pointer of derived class. in addition have reinterpret or c-style cast.

javascript - get the details corresponding to particular tab on click of it -

html part: <div class="tab-content"> <div class="tab-pane active" id="tab2"> <div class="row-fluid"> <div class="span9 offset1"> <header id="second"> <strong>users</strong> </div> <div class="span2"> <div class="tabbable" align="center"> <ul class="nav nav-pills"> <li class="active"><a href="#mobile" data-toggle="tab"><strong>mobile</strong> </a> </li> <li><a href="#bo" data-toggle="tab"><strong>bo</strong> </a> </li> </ul> </div...

database - Changing Row Colour according to condition -

i using ms access database administration. have seeveral linked tables producing different reports. have found similar question on stackoverflow , did reaserach on issue. trying paint rows according conditions (duration <20 paint beige, 2060 red) i using vbasic. code. please let me know think. many help! sub changebacktype() me.date.backstyle = 1 me.cell.backstyle = 1 me.maintenance_category.backstyle = 1 me.duration.backstyle = 1 me.line_description.backstyle = 1 me.machine_description.backstyle = 1 me.station_number.backstyle = 1 me.fault_description.backstyle = 1 me.gm.backstyle = 1 me.remarks.backstyle = 1 me.intervention.backstyle = 1 me.technician_name.backstyle = 1 me.shop_floor.backstyle = 1 end sub sub paint_rows_red() 'same method other colours me.date.backcolor = rgb(255, 29, 29) me.cell.backcolor = rgb(255, 29, 29) me.maintenance_category.backcolor = rgb(255, 29, 29) me.duration.bac...

windows phone 7 - Microphone not working when a call occures -

i m trying record voice using microphone api in wp7/wp8. every thing working fine when use record normal voice, when use when call answered application running well. when playback recorded voice whole recording empty, there no sound @ all. what happened microphone in case? here code m using microphone.bufferduration = timespan.frommilliseconds(100); microphone.start(); void micro_bufferready(object sender, eventargs e) { audiobuffer = new byte[microphone.getsamplesizeinbytes(microphone.bufferduration)]; microphone.getdata(audiobuffer); currentrecordingstream.write(audiobuffer, 0, audiobuffer.length); } you can't record call microphone in app. when call activated, call app on phone take control of microphone , sound directed it, not application.

fullcalendar - I want to create events on full calender plugin using qtip2 -

i using http://arshaw.com/fullcalendar/ (full calender plugin) , qtip2 plugin. want create events using qtip2 popover. , dont have idea of how so? can please guide me on this? bind option select new function youfunction (callback). in new function should receive selected date parameters, can manipulate , save event wish. $('#calendar').fullcalendar({ // put options , callbacks here //... select: yourfunction, //... }); function yourfunction(startdate, enddate, allday) { //open popover, manipulate data , save event. }

c# - The MasterPage's behind code is not called -

i deployed site in local iis manager, reason when load page default.aspx c#/asp.net codes masterpage not loaded. though codes contentplaceholder show properly. for exemple @ place there label, when @ page's source code, there nothing. here portion of code: <%@ master language="c#" autoeventwireup="true" codefile="masterpage.master.cs" inherits="masterpage" %> <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="head1" runat="server"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <asp:contentplaceholder id="head" runat="server"> </asp:contentplaceholder> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="styles/normalize.css" rel="stylesheet" /> <link rel="styles...

python - Latent Semantic Analysis (LSA) Tutorial -

i trying work tutorial in lsa in link (edit: july 2017. remove dead link) here code of tutorial: titles = [doc1,doc2] stopwords = ['and','edition','for','in','little','of','the','to'] ignorechars = ''',:'!''' class lsa(object): def __init__(self, stopwords, ignorechars): self.stopwords = open('stop words.txt', 'r').read() self.ignorechars = ignorechars self.wdict = {} self.dcount = 0 def parse(self, doc): words = doc.split(); w in words: w = w.lower() if w in self.stopwords: continue elif w in self.wdict: self.wdict[w].append(self.dcount) else: self.wdict[w] = [self.dcount] self.dcount += 1 def build(self): self.keys = [k k in self.wdict.keys() if len(self.wdict[k]) > 1] self....

linux - Dummy questions about setting up git on amazon cloud ec2 -

first of all, apologize dummy questions might throw here. nice if point directions should go here. i'm totally new version control(as git) , cloud system. however, came point have develop php web based application on aws ec2 instance , make codes contributable future developers. i did create ec2 instance run php/mysql , map domain elastic ip. website publicly accessible via port 80. i installed git using $sudo yum install git , configed user.name , user.email i then, go root folder of website (e.g. public_html) , run ‘ git init ’ create fold “.git” , add file using “ git add . ” , commit “ git commit -m ‘initial upload’ ” is right way go? ok have project folder sitting on /public_html (where accessible anyone). if above ok, should go here? have git server running on ec2 allow developers connect local machines (e.g. eclipse) while being able keep backup , compare different between codes. what detail suppose give developers can connect git server , working on proje...

jquery - hide div until all background images have loaded -

is there way wait until background images have loaded before code executed? know works 1 image how can adapt various images? var firstbackgroundimage = new image(); firstbackgroundimage.onload = function () { $('#main-slider').animate({opacity:1}),600; }; firstbackgroundimage.src = "http://www.domain.com/img/iphone.png"; html <div id="main-slider"></div> css #main-slider{ opacity:0; } thanks! try: $(window).load(function() { // code gets executed when content of page (including images) loaded });

Using Git with Android -

i not new android, new version control. work in startup , whatever on here learn ourselves. want streamline , teams work not waste time in merging code files , messing them up. tried search on internet git whole thing pretty confusing. want reference or video tutorial in how master git , use in context of android. want beginners level tutorial. thanks! using git in android not different using git anywhere else. git language/framework agnostic. if looking gitignore file(the file tells git types of files shouldn't added repo) android, can check 1 i use . here great book learn git: pro git here interactive course: git immersion it helps in beginning have gui client if not keen on command line. here's one: sourcetree git can intimidating @ first , there lot of concepts master. there no shortcuts , many online "cheatsheets" leave more confused. patient , learn it. payoffs worth it. p.s: ide plugins such egit terrible, ugly , tend in way more develop...

c - I can't show time from DS1307 with PIC16f88 -

i write program long code alarm clock. use ccs compile use rom =80% ram=8%-51% . simulate program in proteus work. when use in real hardware show time = 00:00:80 , not run second. code read time ds1307. change battery 3v of ds1307 show same time. when push button not show too. think if code wrong should can't run in proteus. how fix ? please me. this code. #include <16f886.h> #fuses hs,nowdt,noprotect,nolvp #use delay(clock=20000000) #include "flex_lcd.c" #use i2c(master, sda=pin_c4, scl=pin_c3) #use rs232(baud=9600, xmit=pin_c6, rcv=pin_c7) #define addr_ds1307 0xd0 //address ds1307 int set_hr=24; int set_min=60; short int f_next = false; short int delay_chk=false; int cnt; typedef struct{ byte sec; // seconds byte min; // minute byte hr; // hour byte day; byte date; byte month; byte year; }ds1307_rtc; ds1307_rtc rtc; typedef struct{ int min; // minute int hr; // hour int sec_delay; }time_feed; tim...

Check Existance of a file located in some http link in node.js -

This summary is not available. Please click here to view the post.

coldfusion - How do I delete an xml node by attribute value? -

Image
i have xml object in coldfusion code looks this: i have ability delete node based on zip. example - delete node has zip of '22222'. i know can loop through each node, check zip, , once find execute <cfset arraydeleteat(xmldoc.terminals.xmlchildren, currentindex)> delete node. there more intuitive way this? built in coldfusion functions avoid explicit looping? i use jsoup this. it's html parser, can still used against xml. once you've parsed xml, selecting , removing attribute simple as... .select('[zip=22222]').remove() ...but here complete example, using jsoup 1.7.2 (earlier versions may have different api): <cfsavecontent variable="xmltext"> <terminals> <terminal location="some random location" terminal="25" zip="11111" /> <terminal location="some other location" terminal="26" zip="22222" /> <terminal l...

javascript - HTML-Fileupload using Firefox Android -

i'm webdeveloper germany , i've got problem firefox android (different versions, current version use 23.0). i developed web application has become huge , complex. it works fine there's 1 php site produces 1 or more bugs. this site contains 4 html standard file controls. here's html code: <input type="file" id="input_fileupload_01" name="input_fileupload_01" accept="image/*; capture=camera"> <input type="file" id="input_fileupload_02" name="input_fileupload_02" accept="image/*; capture=camera"> <input type="file" id="input_fileupload_03" name="input_fileupload_03" accept="image/*; capture=camera"> <input type="file" id="input_fileupload_04" name="input_fileupload_04" accept="image/*; capture=camera"> when click 1 control firefox opens dialog sele...

objective c - iOS URI Scheme doesn't accepts multilingual characters -

i'm new ios planet! i need set uri scheme app like: myappname:// open app email clients. but now, if app name has jpn characters or other language characters myappname日本語:// will work normal(url querystring reads multiligual characters) or need do? thanks suggestion in ios uri scheme , there requirment of convert multi language char via encoding of url.let take example in url contains other language char. nsstring *string = @"http://test.com/teståäötest"; nslog(@"url string! %@", [nsurl urlwithstring:string]); nslog(@"url escaped string! %@", [nsurl urlwithstring: [string stringbyaddingpercentescapesusingencoding:nsutf8stringencoding]]); hope helps !

extjs - Push Notification Sencha Touch 2 -

am developing ios application using sencha touch 2, have requirement of sending push notification . have set apple certificate file, provisional profile did server side coding achieve this. not sure there push notification service in sencha ? how can achieve this... should use phonegap? please direct me in right direction.. appreciated. in advance yes, make ios sencha-touch based application support notification, should use third party plugin such mentioned in documentation : -sencha packager -phonegap -simulator i used phonegap implementation , in app.js file put notifications related infos. when notification generated in backend send right user based on session's token stored on moment of authentification: ext.application({ ... //notifications configuration notifications : { storetokenurl : 'https://adress/whereto/store/token/', gcmsenderid : '0123456789012', appid : 'apple_app_id', title : 'notificat...

python - Hide an action without disabling it -

i need control gui shortcuts, created actions assign shortcuts. however, have put actions in menu (so visible) enable them. , of action basic, change tab, , don't deserve appear in menu. is there way hide them without disabling them ? self.changetabaction.setvisible(false) this line hides action, disables it. just add widget addaction . added widget wont visible. here example: import sys pyside import qtgui, qtcore class window(qtgui.qwidget): def __init__(self): super(window, self).__init__() action = qtgui.qaction(self) action.setshortcut('ctrl+t') action.triggered.connect(self.on_triggered) self.addaction(action) def on_triggered(self): print('triggered') app = qtgui.qapplication(sys.argv) w = window() w.show() sys.exit(app.exec_())

Google+ Sign-In done well -

i'm trying add google+ sign-in site. the docs , know how it. however, encountering problems: the button not present on page load, , appears shortly after. , once logged in, on every page load, button appears briefly , hidden. because button created (and hidden if user logged in) via google's javascript. rather distracting user. i've come across 1 solution, use custom sign in button feature , allow me serve styled button, rather have created after page load. problem want default button appearance. seems rather cumbersome have come markup , styling myself in order default. also, if change default, i'll left outdated button until notice , fix it. there better way have default button displayed, have not appear / hidden on page load? what if user doesn't have javascript enabled (e.g. old mobile phone)? there doesn't appear documentation non-js implementation. supported? if so, there documentation? app engine's users framework works generating link google ...

nosql - Keeping sorted values in a column family -

i need data sorted in column family. while discovering cassandra found clustering order option column family. while creating column families dynamically unable set option. via cqlsh when run create table con1(day timestamp,ts timestamp,value double, primary key(day,ts)) clustering order (ts desc); it stores ts values sorted. when create column family via hector dynamically, defaults compact storage. unable define clustering order using hector. any solution problem? is there other way keep values sorted in column family? use native cql java driver instead of hector: https://github.com/datastax/java-driver

PHP: How to redirect if any file path is accessed directly in .htaccess -

this path have secure details eg., http://localhost/application/secure_details secure_details folder confidential files uploaded. the third person knows above url can able particular details, this not should allowed. need redirect error_page if person directly accessing particular url. using mod_rewrite , add root .htaccess : rewriteengine on rewritebase / rewriterule ^application/secure_details/?.*?$ /error.html [l,r=301] additionally, add .htaccess file secure_details directory: deny

windows 7 - How to access shared folder without giving username and password -

i have shared 1 folder "everyone" on machine 1 , trying access folder machine 2. asking username , password of machine 1. accessing share folder run>//shared folder path. i using windows 7 machines. is there way can access shared folder without giving username , password. i found 1 way access shared folder without giving username , password. we need change share folder protect settings in machine folder has been shared. go control panel > network , sharing center > change advanced sharing settings > enable turn off password protect sharing option. by doing above settings can access shared folder without username/password.

emacs - Interactive function for getting number of packages ready to upgrade? -

goal: number of packages ready upgrade minibuffer or console. remarks: package.el hard grasp elisp beginner - many contexts, implicit state, etc... emacsclient -e "(list-packages)" gives: "x packages can upgraded: type "u" mark them upgrading", creates new explicit buffer. maybe possible adjust list-packages package.el in hidden buffer? refreshing packages archive handled package-refresh-contents , beyond issue. any appreciated. epl-find-upgrades gives list of upgradable packages. wrap own command around function, print name of each package returned.

javascript - How to make Grunt.js and Meteor.js work together? -

i want use simple copying , concatenation in meteor application. faced problem when meteor runs javascript files both on server , client whereas don't want them run anywhere. it's either config file gruntfile.js or partial js files want process somehow , put inside client folder. now, gruntfile.js file in root of application have error when trying launch meteor application: w20130826-14:44:39.921(3)? (stderr) /home/../../.meteor/local/build/programs/server/boot.js:184 w20130826-14:44:40.062(3)? (stderr) }).run(); w20130826-14:44:40.062(3)? (stderr) ^ w20130826-14:44:40.062(3)? (stderr) referenceerror: module not defined i know can meteor ignore file or folder adding period @ beginning of filename, , it's working .gruntfile.js filename, of course grunt not work in such case. how can make them work together? how can meteor ignore file or folder without renaming it? you can put meteor app in subdirectory, , keep node_modules , grunt file in top level:...

dart - Can non-trivial constructors call Future returning functions (how or alternatives) -

suppose have: class schema { schema.fromtext(string jsonstring) { ... } } in constructor, assume there url provided in jsonstring download data , only api read url 1 returns future. also, assume schema valid object when url data has been read , processed. possible implement ... ? what want not possible standard constructors. instead, try static method returns new instance wrapped in future. something like: class schema { schema._fromapi(string apiresults) { ... } static future<schema> build(string jsonstring) { return getcontentsofurl(jsonstring['url']) .then((contents) => new schema._fromapi(contents)); } }

ios - UIImageView added as a subview of a tab is allowing selection of controls under it -

at app starts, first tab selected, consists of uitableview displaying infos, before displaying uitableview , tab displaying uiimageview within viewdidload method: viewdidload: uiimage *image = [uiimage imagenamed:@"splash.png"]; splashimageview = [[uiimageview alloc] initwithimage:image]; splashimageview.frame = cgrectmake(0, 20, 320, 410); [((uitabbarcontroller*)self.parentviewcontroller.parentviewcontroller).view addsubview:splashimageview]; the problem when click on splashimageview , touch firing didselectrowatindexpath: delegate method of uitableview although under splashimageview , why behavior? set splashimageview.userinteractionenabled = yes; also, try setting splashimageview.opaque = yes;

android - GET_ACCOUNTS permission while using GCM - Why is this needed? -

i have app, push notifications implemented. i want understand reason why need "get_accounts"(android.permission.get_accounts), while implementing gcm? users raising concerns permission. have used permission in manifest given in official site here . how safe permission? , if remove this, manifest, push notifications work? it uses existing connection google services. pre-3.0 devices, requires users set google account on mobile devices. google account not requirement on devices running android 4.0.4 or higher. so reason requirement of permission <uses-permission android:name="android.permission.get_accounts" /> to read google account. read more gcm overview google account login no longer needed gcm work. no need android.permission.get_accounts permission. if using gcm api googlecloudmessaging.register ), no longer need configure google account on android version. if using deprecated library ( gcmregistrar.register ), sti...

osx - Out of sync Python source code from Enthought Canopy Editor? -

i using enthought canopy 1.0.3 python environment in mac osx, built-in text editor. i have detected strange behaviour when trying run script ipython console included in development framework. obtain error message refers line numbering not matching actual 1 shown in editor, previous version of source code. for example, obtain ipython console: %run /users/xavi/workspace/python/saliency/maps.py (...) /users/xavi/workspace/python/saliency/binarization.py in calculate_foreground_ratio(binarymask) 7 8 ----> 9 def calculate_foreground_ratio( binarymask ): 10 """ compute ratio of foreground pixels in provided binary mask """ 11 return binarymask.sum().astype(float) / np.size( binarymask ).astype(float) nameerror: global name 'np' not defined notice pointing @ error regarding np. definition, error should referred line 11, instead of line 9. i tried forcing recompilation python -m compileall . any ...

json - How to add properties to topojson file? -

given data.tsv file such : id code name 1 al alabama 2 ak alaska 4 az arizona 5 ar arkansas 6 ca california ... ... ... given topojson.json file such : (the structure correct, numeral values random) { "type":"topology", "transform": { "scale": [0.0015484881821515486,0.0010301030103010299], "translate":[-5.491666666666662,41.008333333333354] }, "objects": { "states": { "type":"geometrycollection", "geometries": [ {"type":"polygon","arcs":[[0]],"properties":{"code_2":"al"}}, {"type":"polygon","arcs":[[1]],"properties":{"code_2":"ak"}} ] } }, "arcs": [ [[2466,9916],[-25,-5],[3,-13]], [[2357,9852],[1,-2],...

c# - NHibernate stored procedure returns data from previous query -

i use 2 stored procedures return data same structure (list of records of same type). i call method execute(isession session) twice. first time first stored procedure (it returns correct list of 6 rows). second time - second stored procedure (it returns list of 11 rows, first 6 rows first request overwrite correct rows). i found impact on nhibernate caching searches results including calculated value mapped formula (e.g. rank) but can't use iquery any ideas or links how can fixed ? public dynamic execute(isession session) { var query = session.getnamedquery(queryname) .setcacheable(false) .setcachemode(cachemode.ignore) .setreadonly(true); var results = query.list<t>(); return results; } i'm going take stab @ answering this, because think have hunch of what's going on, , want set on right track. i've made lot of assumptions here, please don't harsh on me if wrong guesses. it feels you're trying u...

c# - Display External Data in Kentico -

i'm using kentico cms 7 , there way import external data database http://devnet.kentico.com/docs/devguide/index.html?displaying_data_from_external_database.htm displaying data external database kentico need included in visual studio can customize there missing in article of how include webproject.sln pages made in kentico based on virtual paths (home.aspx - conatct.aspx - about.aspx) ?? if mean import data, suggest use kentico import toolkit. if want display data external database, depends on development model in kentico cms is. portal engine mode - mentioning virtual paths pages home.aspx suggests use portal engine development. in case don't need write own code. use sql data source webpart combination of viewer webpart repeater. can develop own webpart want, see documentation of how create webpart . aspx development mode - mode allows leverage existing knowledge of asp.net , write standard code in similar way how described in article. in situation ne...

c# - Windows forms application tracing -

we have .net windows forms application running in production. there free tool can install check method of class called , sequence? tried clr profiler, seems show memory usage not method call tree. thanks. ants performance profiler: you use following ants performance profiler. ants performance profiler code profiler .net desktop, asp.net, , asp.net mvc applications. helps debug application giving complete picture of application's performance. ants performance profiler visual studio profiler: visual studio has it's own free profiler build in well. visual studio profiler tutorial: visual studio profiler tutorial jetbrains: i recommend following profiler created jetbrains . jetbrains profiler jetbrains created lot of helpful tool visual studio, best example is: resharper. should try profiler. all profilers provide methods within application, , more important: how many times called. should try reduce these calls if possible.

jsf - displaying values from database on the basis of dropdown menu selction -

hi creating jsf application . in fact made dropdown list , want display results according value selected dropdown. if can help.... thanks here drop down <h:form> <h:commandbutton action="sample?faces-redirect=true" value="submit"> <h:selectonemenu id="samplesearch" value="#{cbean.id}"> <f:selectitem id="id" itemlable="idtext" itemvalue="by text" /> <f:selectitem id="idnumeric" itemlable="idnumeric" itemvalue="number" /> <f:selectitem id="product" itemlable="product" itemvalue="main product" /> <f:selectitem id="lonumber" itemlable="lonumber" itemvalue="lonumber" /> <f:selectitem id="formula" itemlable="formula" itemvalue=...

wordpress - WYSWYG web editor for Sharepoint -

is there approach have simple wyswyg free web editor (preferably drag'n'drop widgets -based) embedded or integrated sharepoint 2010? i shocked because answer seems not exist... far i've found... plugins integrating sharepoint drupal, joomla or wordpress, want opposite, using interfaces create content stored in sharepoint, without having export htmls , adapting them sp arquitecture , metadata. if not, cannot find way export wordpress/drupal site sharepoint. web content rich editor: doing wrong html loader not edit thing? webparts: seem costly, , not sure there exists nice 1 concrete task could point me optimal solution non-tech users using feature? thank you by way, there public web part repository microsoft. searching in google not throw interesting info.. most public, open source projects microsoft can found @ http://www.codeplex.com/ . regarding requirement, if understand correctly, want have way store content in sharepoint display in drupal or ...

.net - How to understand which types will be available depending on supported platforms? -

Image
i'm converting library pcl. not understand how available types depend on selected platforms. with these settings: i have fewer availabel types such configuration: how possible? there service can see types , operations added|removed depending on selected options? update as far understood there naming confusion. term portable class library related these platforms: .net framework, silverlight, windows phone , xbox 360. @ least documentation says so. in next version added windows store applications. , here strange things. how looks icommand : ..for type.isinstanceoftype() : wait! wher windows store? why separate line? if pcl includes windows store how can't wsa support functionality? one moew oddity: if have .net 4.5, sl5, wp8 , wsa enabled type.isinstanceoftype() exists , accessible. if disable sl5 method vanishes never there. how on earth can be? this anwser may helpful. a few months ago, vagif abilov released project pclanalyzer o...

javascript - Varying the gaps between specific bars in a D3 bar chart -

i have bar chart want make gap more pronounced between 6th , bar in chart , 12th , 13th bar in chart. right i'm using .rangeroundbands results in padding , there doesn't seem way override specific rectangles (i tried appending padding , margins particular rectangle no success). here's jsfiddle of graph and code generating bands , bars themselves: var yscale = d3.scale.ordinal() .domain(d3.range(dataset.length)) .rangeroundbands([padding, h- padding], 0.05); svg.selectall("rect.bars") .data(dataset) .enter() .append("rect") .attr("class", "bars") .attr("x", 0 + padding) .attr("y", function(d, i){ return yscale(i); }) .attr("width", function(d) { return xscale(d.values[0]); ...

upload - Why would php://input truncate? -

i have line $input = fopen( 'php://input', 'r' ); in code uploads. when file done uploading, check against $_server['content_length'] see sent expected. content_length , size of upload file started not match randomly ( once every 20 minutes people uploading ). i logged , saved mismatches , found files unable opened, while downloaded , cut off. 1 opened in photoshop warned document damaged. is there server config should looking may have been changed? i tried replicating shutting browser tabs , things of nature still not replicate error. we uploading via ajax post. post body upload source. it sounds me load/networking issue. either there latency issue/timeout issue users trying upload , server not responding. usually it's not ajax blame, rather server (maybe not php) . think there drops in places of packets coming server. can limitation in datacenter (ex. bandwith cap.) or limitation on server itself. we optimize our server using...

authentication - Kohana Auth Custom Driver, model user? -

i have made custom driver 'auth_mydriver' extends auth i looked here how to: http://kohanaframework.org/3.2/guide/auth/driver/develop and did when using driver, grab/logins user " test_users " instead of " users " now, when use custom driver " mydriver " auth::instance()->get_user() returns string username . when use default " orm " auth driver , call auth::instance()->get_user() returns whole object user data grabbed users table, able call e.g auth::instance()->get_user()->email how can make custom driver work default orm auth driver, except should test_* tables instead (test_users, test_roles, test_roles_users) i spent hours on trying find out, , think model user, need custom driver in order ? hope thanks! update: my mydriver, has same method auth file driver public function get_user($default = null) { return $this->_session->get($this->_config['session_key'], $default); } ...

java - How to inject Spring Bean for factory method requiring MyClass.class parameter -

i'm trying inject java.util.prefs.preferences bean in master controller. controller looks like: @controller class mycontroller { @autowired private preferences preferences; } the application-context.xml file creates bean java.util.prefs.preferences. uses factory method have following entry creating bean: <bean id="preferences" class="java.util.prefs.preferences" factory-method="usernodeforpackage" /> preferences.usernodeforpackage(param) takes parameter class related preference. in case spring needs create bean performing call: preferences.usernodeforpackage(mycontroller.class); how can class passed in spring bean instantiated factory method? thanks environment information: java 7 spring 3.1 you can specify constructor-arg element <bean id="preferences" class="java.util.prefs.preferences" factory-method="usernodeforpackage"> <constructor-arg type="java.lang.cl...