Posts

Showing posts from May, 2010

How to export Excel spreadsheet to HTML table with INLINE CSS? -

i'd know how table in spreadsheet html format without microsoft specific code. our webpage hosted elsewhere means don't have access <head> part of our pages. can insert content <body> . want table retain same fonts, borders , formatting , css styling included directly in table code not elsewhere. edit: it appears work if put css classes in <body> of document. legal? thought supposed defined in <head> ??? <body> <style type="text/css"> table.mytable { border: 1px solid #ccc; font-family: verdana, verdana, geneva, sans-serif font-size: 12px; } edit: i have found copying in excel , pasting live view in dreamweaver creates cleaner html saving html in spreadsheet. still left bajillion css classes have edit out it's @ least it's step closer. if error message whilst pasting large table in dream weaver see this page . final edit: before export table html editor go through of cells in table format painter...

Select multiple custom objects on KineticJS and Javascript -

good evening everyone. create object on kineticjs has methods: function addcelestial(cb){ this.celestialbody = new kinetic.circle({ id: cb.id, x:cb.x, y:cb.y, fill:cb.color, radius:cb.radius, shadowcolor: cb.glow, shadowblur: cb.glowblur, shadowoffset: 0, shadowopacity: cb.glowopacity }); this.xpos = function(value){ if (typeof value === "undefined") { return this.celestialbody.getx(); } else { this.celestialbody.setx(value); } }; this.ypos = function(value){ if (typeof value === "undefined") { return this.celestialbody.gety(); } else { this.celestialbody.sety(value); } }; this.xvel = function(value){ if (typeof value === "undefined") { return this.xvel_v; } else { this.xvel_v = value; } }; this.yvel = function(value){ if (typeof value === "undefined") { return this.yvel_v; } else { this.yvel_v = v...

sql - Optimize query selecting based on several date ranges -

it seems there should way make more efficient. difficulty arbitrary date ranges , number of said ranges. in query attempting retrieve rows tasks table date (regardless of time) 2013-01-01, 2013-01-03, 2013-01-09 or 2013-02-01 tasks |id | int | |begin_date| datetime | select * tasks (tasks.begin_date >= '2013-01-01' , tasks.begin_date < '2013-01-01') or (tasks.begin_date >= '2013-01-03' , tasks.begin_date < '2013-01-04') or (tasks.begin_date >= '2013-01-09' , tasks.begin_date < '2013-01-10') or (tasks.begin_date >= '2013-02-01' , tasks.begin_date < '2013-02-02') is there "proper" way this? or more efficient way? i'm using sql server 2008. please try this select * tasks convert(varchar,begin_date,103) in ('01/01/2013','04/01/2013','10/01/2013','02/02/2013') or can try also. select * tasks (convert(varcha...

javascript - DOM manipulation during large SVG rendering -

ok, i'm trying finish project setting "loading..." message percentage indicator. easy enough. problem have little on 6,000 of raphael/svg lines of code inject line 2,000+ new nodes dom . real problem comes when i'm trying change % indicator on loading message, browser frozen till raphael finish creating nodes. what i've tried , know: 1) have simple function calculate % of loading increasing count var , spreading function on 6,000 code. way simulate actual loading process. nothing new. 2) know function works magic , through loading process i'm getting 0 100%-hero. 3) inside function, every time new value - i'm trying update % on screen - nothing happens there till full page load when instantly 100%. 4) way can indicator update setting alert() each time i'm trying update it. magic dust changes indicator when alert-popup gets on screen. 5) i've tried settimeout , many others, toggling visibility , changing position , creating chil...

Facebook October 2013 breaking changes affect Feed and send -

we using feed/post api , send dialog box our app in facebook , october 2013 breaking changes removing feed/post so, not able post declined facebook can not share post multiple user privacy moved out, more one-to-one communication. in send dialog description field removed cann't send pre-populated description in messages. i looking workaround hitting major functionality of app, share information between users. please help. if requirement has significance of description, think best option mention tagging . the post published user's wall friends tagged in post. it's open graph concept, if new can start here . else, you'll have use requests dialog - fb.ui or share dialog - user interaction. depends on requirement 1 suits best.

android - How to Open Activity with Notification -

i implementing 1 sdk when user click on notification activity open.i wondering how can pass different -different activity on intent.here sample code:- void firenotification(context _context, string appname, string appdescription) { intent resultintent = new intent(_context, resultactivity.class); try { pendingintent contentintent = pendingintent.getactivity(_context,0, resultintent,pendingintent.flag_update_current); mbuilder = new notificationcompat.builder(_context); } please suggest me how can pass different activity in intent. i assume wanted load activity instead of resultactivity, change resultactivity.class class name of other activity. if looking have ability determine activity load after user taps on notification, can create new activity determine activity load after launches, kinda activity "redirect" screen.

android - Send Json data from listview in one activity to another activity -

i trying send json object data 1 activity other activity. have listview populated json array, click on list item, not responding. no action being performed on item click. saw tutorials did not helped. need send list item's json data activity. appreciated. activity of listview populated json. try{ jarray = new jsonarray(result); listview listview=(listview)findviewbyid(r.id.listtour_cat); listview.setadapter(new listviewadapter(jsonuseactivity.this,jarray)); listview.setonitemclicklistener(new onitemclicklistener() { @override public void onitemclick(adapterview<?> arg0, view arg1, int arg2, long arg3) { // todo auto-generated method stub try{ if(!jarray.isnull(arg2)){ intent intent = new intent(getapplicationcontext(),tourdetailactivity.class); intent.putextra("id"...

html5 - Dropdownlist using viewbag data in mvc4 using c# -

hi want fill dropdown list in view page code is public class memberbasicdata { public int id { get; set; } public string mem_na { get; set; } public string mem_occ { get; set; } } //controller public actionresult register() { var users = new member().getallmembers(); viewbag.users = users; return view(); } //view @model ienumerable<....members.models.memberbasicdata> @html.dropdownlistfor(model => model.mem_na, (selectlist)viewbag.users, "--select users--") i want add mem_na dropdownlist, viewbag contains user details. problem in view page. error shows in model.mem_na. please me solve this. please, change code from @model ienumerable<....members.models.memberbasicdata> @html.dropdownlistfor(model => model.mem_na, (selectlist)viewbag.users, "--select users--") to @model ....members.models.memberbasicdata @html.dropdownlistfor(model => model.id,new selectlist(viewb...

javascript - display content on highcharts Xaxis and Yaxis title in form of subscript and superscript -

i using highcharts application display mathmatical calculation , electical terminology need display elctrical term on highcharts xaxis title , yaxis title on form of superscript , subscript have tried no of ways yet don't soln html sub , sup tags not working there please give me proper solution. consider using usehtml property : ... //some options title: { usehtml: true, text: "<sub>sub</sub>normal<sup>sup</sup>" } //other options ...

html - Navigation lists, inline and with spacing -

i have navigation bar , want on 1 line there 1 space between each item, want them spaced equally out, , flexible, when change window size adjust. html <div class="navigation"> <div class="navhead"> <h2>navigation</h2> </div> <div class="navlist"> <ul> <li><a href="home page.html">home</a></li> <li>chat</li> <li>blog</li> </ul> </div> </div> and css .navlist li{ text-decoration: none; color: #000000; list-style-type: none; display: inline; text-indent: 10%; } please keep in mind in year 7 , don't use complex words just apply width of li , if needed add padding value. change inline table-cell. , apply space between them apply border-spacing value followings: .navlist{ ...

c - How is this generic function is used -

i going through code write has been made register. made generic function write different register has go through same function: #define rgs(x) \ static inline void write_##x(u8 val) \ { \ } #define regw(x) rgs(x) write_wdc(val); now want know when call write_wdc made, how replaced these macros. this doesn't show macro being used, in order final line (the call) work, there has like: regw(wdc) somewhere in code, use macro. above replaced preprocessor with: rgs(wdc) which in turn replaced with static inline void write_wdc(u8 val) { } i assume body of function missing macro declaration too, expect x = val; in there make write happen. this uses ## preprocessor operator "glue" words together.

ios - Assertion failure in -[UINib initWithNibName:directory:bundle:] -

i error below message when touched uitextfield in view controller. msg: *** assertion failure in -[uinib initwithnibname:directory:bundle:], /sourcecache/uikit/uikit-2380.17/uinib.m:96 2013-08-26 15:58:43.547 xpointer[1023:907] *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'invalid parameter not satisfying: (name != nil) && ([name length] > 0)' this error show , crash everywhere(all view controller). i had same crash, funny, forgot pass nib name. bad code: myviewcontroller *vc = [[myviewcontroller alloc] initwithnibname:@"" bundle:nil]; [self.navigationcontroller pushviewcontroller:vc animated:yes]; [vc release] good code: myviewcontroller *vc = [[myviewcontroller alloc] initwithnibname:@"myviewcontroller" bundle:nil]; [self.navigationcontroller pushviewcontroller:vc animated:yes]; [vc release]

php call_user_func_array() warning -

i using following code in program. class { function __call($fname,$arguments) { $methods = array('get', 'set'); foreach ($methods $method) { if(strstr($fname,$method)) { $fname = str_replace($method, "", $fname); $function = $method."method"; if($method == "set") { call_user_func_array("setmethod", array($fname,$arguments[0])); } if($method == "get") { call_user_func_array("getmethod", $fname); } break; } } } function setmethod ($key,$value) { $this->$key = $value; } function getmethod($key) { return $this->$key; } } and getting warrning this "warning: call_user_func_array() expects parameter 1 valid callback, function 'setmethod' not found or invalid function name" and program stopped nothin...

neo4j - The cypher PROFILE keyword asks for a transaction even if there is already one -

i trying profile following query on neo4j server console (community edition, version 1.9.2): profile start ungrouped=node(1) create (grouped{__type__:'my.package.grouped'})<-[:has_next]-(ungrouped) match (ungrouped)-[:leaf]->(leaf) leaf.`custom-group` groupvalue, grouped, leaf create unique (grouped)-[:group]->({__type__:'my.package.group',groupkey:'group',groupvalue:groupvalue,grouporigin:id(ungrouped)})-[:leaf]->(leaf) return distinct grouped; when run above query, message ==> need transaction! ok, created 1 with begin transaction ==> transaction started afterwards run same query again. unfortunately same message again: ==> need transaction! but there transaction. when type rollback the transaction rolled back: ==> transaction rolled am doing wrong? profiling not work such kind of query design? or bug in neo4j?

using valgrind at specific point while running program -

i want use valrgind @ specific time while program running. example, when use -o3 take 0.5 hours reach desired point. when use -g -ggdb take 2.5 hours reach desired point. now if use valgrind -g -ggdb , program extremely slow , can not predict when reach desired point. what should do?

php - How to change the connection info for Laravel 4 when using the redis driver? -

i using redis driver caching data. database configuration of laravel has ability define redis connection information. 'redis' => array( 'cluster' => true, 'default' => array( 'host' => '127.0.0.1', 'port' => 6379, 'database' => 0, ), ), but if wanted have multiple connections defined , use specific connection use cache, how can on laravel 4. there no connection configuration on cache.php can specify redis connection name. has connection config used if cache driver database . edit i went through laravel code , when initializing redis driver, looks laravel not looking connection. understanding correct? http://laravel.com/api/source-class-illuminate.cache.cachemanager.html#63-73 protected function createredisdriver() { $redis = $this->app['redis']; return $this->repository(new redisstore($redis, $this->getprefix())); } ...

ios - UILocalNotification fires every time app opens -

i have uilocalnotification fires @ time everyday. made sure firedate not nil , notification fires @ time perfectly. 1 problem have whenever run app xcode, notification fires. don't understand why that. input appreciated! here code go by: -(void)ringthealarm{ [[uiapplication sharedapplication]cancelalllocalnotifications]; if (self.alarmset) { uilocalnotification *notify = [[uilocalnotification alloc]init]; notify.firedate = self.alarmtime; nslog(@"%@", notify.firedate); notify.alertbody = self.alarmmessage; notify.soundname = uilocalnotificationdefaultsoundname; notify.timezone = [nstimezone defaulttimezone]; [[uiapplication sharedapplication] schedulelocalnotification:notify]; } }

Adding Grid to D3.js Line Chart -

i have line chart here: jsfiddle.net/yfqq4/ my problem is, don't proper grid in background working legend (y , x-axis) this: http://lab.creativebrains.net/linechart.png can can post me code snippet how should implement or that? thanks! you can draw background grid this: //vertical lines svg.selectall(".vline").data(d3.range(26)).enter() .append("line") .attr("x1", function (d) { return d * 20; }) .attr("x2", function (d) { return d * 20; }) .attr("y1", function (d) { return 0; }) .attr("y2", function (d) { return 500; }) .style("stroke", "#eee"); // horizontal lines svg.selectall(".vline").data(d3.range(26)).enter() .append("line") .attr("y1", function (d) { return d * 20; }) .attr("y2", function (d) { return d * 20; }) .attr("x1", function (d) { return 0; }) ...

How to get JSON data from an IP address only using JavaScript -

i have little doubt still json. know how json data local file. want same data network ip address. here ip address i'm sitting on - 10.1.128.103 default gateway - 10.1.128.1 json data passer - 10.1.128.106 here data.json file inside {"jsonprojectidresult": [{"_capacity": 15,"_description": "meeting room","_dev_default_view": 3,"_deviceid": 1,"_devicename": "mobitech","_devicetypeid": 1,"_projectid": 1,"_roomid": 2,"_roomname": "room2","_room_admin_mail": null},{"_capacity": 2,"_description": "meeting rooms","_dev_default_view": 5,"_deviceid": 2,"_devicename": "mobiteches","_devicetypeid": 4,"_projectid": 2,"_roomid": 2,"_roomname": "room4","_room_admin_mail": null}]} here html codes simple javascri...

javascript - How can I insert java script file into webview after load a html -

i want handle click evnet on webview,and word click. researsh "bt android webview selection",it calls method of java script in java code. html declare js file in ,and js file large(>400k) i want open network html "www.google.com",when user click word on ths page,the java code know clicked word. how can insert special js file , call js's method of getting clicked text?

Several unique constrains on a single document in RavenDb -

let's have class: public class person { public string name{get;set;} public string email {get;set;} public string googleid {get;set;} public string facebookid {get;set;} } if want make email unique use unique constraint bundle. but want make both googleid , facebookid properties single unique constraint side side email constraint (while non of them id). possible? use uniqueconstraints bundle: public class person { public string name {get;set;} [uniqueconstraint] public string email {get;set;} public string googleid {get;set;} public string facebookid {get;set;} [uniqueconstraint] public string googleandfacebookids { get;set; } } just make sure update googleandfacebookids everytime update either googleid or facebookid . doing ended using simple interface on classes did sort of thing: public interface icombinedconstraints { string uniqueid { get; set; } void updateconstraints(); } so, public class person : ico...

javascript - Need a plugin available in jquery to show hide -

can please provide me pointers slide window plugin, if any, available in jquery. basically, need implement functionality of yahoo mail in can hide advertisement pane displayed on right side of window on click of button. any on appreciated thanks , regards, manav if had element id panel sit on right of screen, , wanted slide right until it's not visible anymore, , remove it, use jquery's animate() function achieve effect: $('#panel').animate({'margin-left': width-of-the-panel}, function() { $('#panel').remove(); }); $('#panel') obtains element id of panel animate() animates provided properties of element , calls function when it's done margin-left: width-of-the-panel (replacing width-of-the-panel actual width of panel, in pixels) animate css property margin-left until has value equal of panel's width, moving right enough disappears off screen $('#panel').remove() removes element dom

linux - Can msleep inside ioctl cause incorrect mutex operation? -

inside linux driver have ioctl dispatcher, , 1 branch uses msleep() function. static long p347_fpga_ioctl(struct file *filp, uint cmd, unsigned long arg) { long ret_code = 0; ... switch (cmd) { ... case p347_ioctl_client_start_rot: { if (arg != 0) { ret_code = rot_set_params(trp); //idx if (ret_code == 0) { ret_code = rot_run(trp->rot_idx); } else { printk("cannot setup rot channel error=%d\n",ret_code); } } } break; } ... }; ... return ret_code; } int rot_run(unsigned char rot_idx) contains msleep() call further, userspace program uses of ioctls inside mutex prevent simultaneous calls. ... pthread_mutex_lock(&fmutex); ret = ioctl(dev_desc, p347_ioctl_client_start_rot, &params); pthread_mutex_unlock(&fmutex); ... that way, can msleep() cause problems?

Grails - Request and Response - Get which URL Requested the constructor -

i new grails. please read scenario , provide me best solution. i have controller edit , controller gets request multiple pages. want , controller gets request page , processes request , want page gets redirected similar page requested task. i hope question clear enough. in advance. see redirect method of controller. there forward method can useful

powershell - Publishing results in NUnit tests -

i writing powershell script multithreading nunit tests. problem take test categories file category.txt , , have write categories have been done output file file 1.txt . need output xml report after tests have been performed. how can in nunit? $groups=get-content d:\test\category.txt | select-object -last 10 write-host $groups if ($groups -ne $null) {write-host "true"} else {write-host "false"} ###multithreading### $threadnumber =$groups.count $scriptblock = { function nunit { $connection = @{"server" = ""; "username" = ""; "password" = ""} write-verbose $connection $serv = $connection.get_item("server") $user = $connection.get_item("username") $pass = $connection.get_item("password") $securepassword = convertto-securestring -asplaintext $pass -force #create connection credentials object invoke-command...

php - JIRA API attachment names contain the whole paths of the posted files -

i have been working jira api , have seen inconsistent results requests. works , doesn't. last week able post attachments issues fine, old problem occurred: names of attachments contain whole path of posted file, hence attachments can't opened. use json representation post files: $array = array("file"=>"@filename"); json_encode($array); ... this gets file posted problem when it's posted file names in jira this: /var/www/user/text.text needless can't opened in jira. had problem before, disappeared, occurred again. don't it. way not using curl request though might recommended in documentation. i realize question old had similar problem. seems jira doesn't trim filename expected. able fix following. if you're using php >= 5.5.0: $url = "http://example.com/jira/rest/api/2/issue/123456/attachments"; $headers = array("x-atlassian-token: nocheck"); $attachmentpath = "/full/path/to/file...

database normalization - Full functional dependecies -

Image
alright can't seem wrap head around subject normalization. i have table now need find full functional dependencies. filmid, actor -> title, year, director publisher -> publishercity actor -> dob, country now can tell me if i'm on right track? if not appreciated. tables fields i hope helps: films id title year director_id publisher_id one publisher , director setup. actors id name dob country you missed name actor attrs films_actors film_id actor_id this join table of films actors. allowing link limitless actors films (many many relationship). publishers id name city self explanatory directors id name self explanatory any questions ask.

highstock - Impossible to have plotband through current date in Highcharts -

i'm using highstock/highcharts, , plotting stacked (and grouped) column, based on last 5 minutes. i want highlight last minute (and have been using plotband that). my problem plotband not cover whole time range, can see in http://jsfiddle.net/duuue/1/ what want plotband cover last minute (up until current timestamp), using stacked/grouped columns makes weird, because columns not drawn @ corresponding x-axis tick corresponds timestamp. code this: $(function () { highcharts.setoptions({ global: { useutc: false } }); var = new date().gettime(); var last10min = - (10 * 60 * 1000); var lastmin = - (60 * 1000); $('#container').highcharts({ chart: { type: 'column' }, xaxis: { type: 'datetime', mintickinterval: 60 * 1000, tickmarkplacement: 'on', plotbands: [{ // highlight last minute color: '#fcffc5', from: lastmin, to: }], ...

Why is JavaFX API not included in Java 8 J2SE? -

does have idea why javafx 8 still isn't everyday j2se api in upcoming java 8? the technology diagram showing java components excludes javafx j2se stack. i'd see javafx , swing apis side-by-side in jdk javadocs.. , wonder why oracle doesn't/can't give that? btw, on topic of javafx's different status (compared other standards included in j2se), can explain why authors of javafx felt absolutely necessary re-invent wheel creating awt/swing-incompatible concepts fx fonts, fx colors, , like? javafx planned become standart part of javase in time frame of javase 9 (as jsr). in mean time, oracle ships javafx part of javase implementation (but other vendors won't). why authors of javafx felt absolutely necessary re-invent wheel creating awt/swing-incompatible concepts fx fonts, fx colors, , like? javafx modern ui toolkit using software stack works closely graphic card, if available.

java - Frame rate drop in android 3.0 and higher devices why? -

drawing bitmap on canvas using " rectf " slower in nexus7 (dual or quad core..some 1-2 gb ram) version4.3 compared old device galaxy y version2.3.3 (256mb ram 800mhz) i totally confused ,what missing ,is related hardware acceleration,sdk ? can 1 please explain me old vs new sdk performance

c# - ASP.NET Random error: Server Error in '/' Application. Object reference not set to an instance of an object -

i building asp.net webpage allow register new account inside crm 2011. seems work, after around half hour code stops working, without touching it. page shows "server error in '/' application. object reference not set instance of object." republishing code solves it, happening under hood? limited time makes me think might related login issue, login performed when page loaded credentials stored in web.config file. in aspx page have void page_load ( object sender , eventargs e ) { loadvalues ( sender , e ); if (!ispostback) { session["pagerefresh"] = system.datetime.now.tostring(); } } protected void page_prerender(object sender, eventargs e) { viewstate["pagerefresh"] = session["pagerefresh"]; stateview = datetime.parse(session["pagerefresh"].tostring()); } i using ispostback in 2 places: if ((statvar.firstexec == true || (datetime.parse(session["pagerefresh"].tostr...

Appcelerator iOS Module -

i creating module card reader have used nsrunloop . nsrunloop not being called , stuck in middle of no mans land. following line of code not being executed while running on device. nsrunloop *therl = [nsrunloop currentrunloop]; nsdate *loopuntil = [nsdate datewithtimeintervalsincenow:0.1; while (dialogopen == true && [therl runmode:nsdefaultrunloopmode beforedate:loopuntil]){ nslog(@"while loop"); } can achieved via appcelerator can substitute above objective-c code appcelerator code. try put nslog numbers after each line , see gets stuck. do have errors or app crash? did check while condition evals true?

unix - Linux, where are the return codes stored of system daemons and other processes? -

how know, if process has completed execution without errors? how know, if c++ program has returned success os? if run via shell, use $?, if checking status of process, initiated other user, how check status? say started process in morning, , got terminated @ noon. have been workign on other activities till evening, , prior leaving, check processes has returned os. how acheve that, programatically. running through syslog help, looking alternatives. i run through os's process table , read information, sounds bit complicated requirement. have syslog, errors of processes recorded? any other ways retrieve errors reported terminated processes (of other users too)? when process terminates parent process must acknowledge using wait or waitpid function. these functions return exit status. after call wait or waitpid process table entry removed, , exit status no longer stored anywhere in operating system. should check if software use start process saves exit status s...

android - problems with listview using in viewpager? -

i want add single listview in 4 pages of viewpager different data each page. vector pages = new vector(); pages.add(listappstore1); pages.add(listappstore2); pages.add(listappstore3); pages.add(listappstore4); viewpager vp = (viewpager) findviewbyid(r.id.viewpager); custompageradapter adapter = new custompageradapter(appsactivity.this,pages); vp.setadapter(adapter); vp.setonpagechangelistener(new onpagechangelistener() { public void onpageselected(int arg0) { // todo auto-generated method stub } public void onpagescrolled(int arg0, float arg1, int position) { // todo auto-generated method stub } public void onpagescrollstatechanged(int position1) { // todo auto-generated method stub if (position1==0) { modifydata(); myappstore.setadapter(mstoreadapter); } else if (position1==1) { modi...

jquery - Fallback if .clientHeight is null and there is no element -

i have 2 canvas elements on website. javascript checks height , wide of surrounding div , set canvas height , width it. var height = parseint(document.getelementbyid("canvaselement").clientheight); var height2 = parseint(document.getelementbyid("canvaselement2").clientheight); the problem if 1 of 2 canvas elements doesnt exist on subpage, script stops working. the console gives me **uncaught typeerror: cannot read property 'clientheight' of null ** i tried like if (height = null) { console.log("height null"); } how can fallback if canvas element not present? ideas or suggestion? regards denym

Switching off labeling globally with lattice R -

is there way switch off labelling of plots globally before "print"? here in detail mean + reproducible example: data <- data.frame(x=rnorm(10,2,2),y=rnorm(10,3,3)) x1 <- xyplot(x~y, data, xlab="name", ylab="name", main="title") print(x1) is there way switch off labelling @ "print" level or better @ grid.arrange level? grid.arrange(x1,x2,x3,x4, ncol=2) now simplified version. have large number of plots , use grid.arrange() plot them in "1 window". labelling required not. mean removing labelling @ xyplot level etc.

python - Unable to find vcvarsall.bat even if there is in my computer -

i trying install hcluster library link easy_install have error "error: setup script exited error: unable find vcvarsall.bat" the problem if search in pc, file here "c:\program files (x86)\microsoft visual studio 11.0\vc" i google every site found, send don't have file @ all.

How to block any alert box using javascript? -

i dont know alert box displaying on page load.i want block alert box.how achieve this? not sure how browser compatible is, you'll have experiment on own. i've tested in latest release of chrome. capture = window.alert; window.alert = function(){}; // script loaded here window.alert = capture;

css - CSS3 Rounded Corners are not working in IE quirks mode -

i have website works in ie 10 browser mode , ie5 quirks document mode. round corners not working in scenario. rounded corners working when change document mode ie 9 standards. want ie 5 quirks document mode. my css is: .roundedcorner { behavior: url(/includes/border-radius.htc); -moz-border-radius: 30px; -webkit-border-radius: 30px; -khtml-border-radius: 30px; border-radius: 30px; border-top-left-radius:30px; border-top-right-radius:30px; border-bottom-left-radius:30px; border-bottom-right-radius:30px; } quirks mode not support css3, , css behaviors disabled in ie10 . can set header ie=edge , forget quirks mode. <meta http-equiv="x-ua-compatible" content="ie=edge"> look @ http://border-radius.com/ . -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px...

floating point - Java isNan how it works? -

i looking @ openjdk-1.7.0_25 source code , have seen method: /** * returns {@code true} if specified number * not-a-number (nan) value, {@code false} otherwise. * * @param v value tested. * @return {@code true} if argument nan; * {@code false} otherwise. */ static public boolean isnan(float v) { return (v != v); } i can't understand how works, when method can return true ? that method can return true operations, example: system.out.println(float.isnan(0.0f / 0.0f)); system.out.println(double.isnan(math.sqrt(-1))); basically, nan represents undefined value. value of 0.0 / 0.0 nan , , nan != nan . may seem logical because math.sqrt(-1) gives nan . see javadoc of double.nan : it equivalent value returned double.longbitstodouble(0x7ff8000000000000l) and double.longbitstodouble() : if argument value in range 0x7ff0000000000001l through 0x7fffffffffffffffl or in range 0xfff0000000000001l through 0xffffffffffffffffl , re...

php date give me the same date for 2 different timestamp -

here code : <?php $aaa = array( 1224972000, 1224973800, 1224975600, 1224977400, 1224979200, 1224981000, 1224982800, 1224984600, 1224986400, 1224988200, 1224990000, 1224991800, 1224993600, 1224995400, 1224997200, ); foreach ($aaa $ts) { $date = \date('m/d/y,h:i:s', $ts); echo "$date \n"; } , result : 10/26/2008,00:00:00 10/26/2008,00:30:00 10/26/2008,01:00:00 10/26/2008,01:30:00 **10/26/2008,02:00:00 10/26/2008,02:30:00 10/26/2008,02:00:00 10/26/2008,02:30:00** 10/26/2008,03:00:00 10/26/2008,03:30:00 10/26/2008,04:00:00 10/26/2008,04:30:00 10/26/2008,05:00:00 10/26/2008,05:30:00 10/26/2008,06:00:00 why ? i'd imagine in chosen timezone, date switches daylight savings time on day, there 2 2:00ams. see you're studying in liverpool -- on british machine? last sunday in october traditionally shif...

c# - Silverlight Prism View Switching Affected By URL? -

i have developed silverlight business application using prism requires user log in before can access main application. silverlight application hosted on iis 7.5 (port *:8086) , makes calls wcf services hosted on same instance of iis 7.5 (port *:8069) when access silverlight application via http://localhost:8086 works expected (i.e. after successful authentication, prism modules loaded , views switched appropriately) when access via either machine's name ( http://xps1521-pc:8086 ) or ip address ( http://192.168.10.104:8086 ), not work expected (i.e. after successful authentication, prism modules loaded but views not switched). cannot seem figure out why happening , appreciate help/guidance. thanks! after close inspection of exception submitted, think problem. most you're using sort of reflection code (or opening ui dialog) in viewmodel subscription handler can executed when silverlight runs in full trust mode. so when url of silverilght application changes...

proxy - Cant seem to get https and socks proxies to work using python requests -

so i'm looking @ traffic using wireshark , comparing output number of situations. i'm looking @ traffic between me , google.co.za. situation 1: accessing google.co.za using no proxy requests.get('www.google.co.za') this returns response status=200 , wireshark displays info traffic passing between pc , google's servers. great far. situation 2: accessing google.co.za using valid http proxy requests.get("http://google.co.za",proxies={'http':proxy}) this returns response status=200 , wireshark displays no data traffic passing between pc , google's servers. great , expected , stuff. situation 3: accessing google.co.za using valid socks proxy requests.get("http://google.co.za",proxies={'socks':proxy}) result per situation 1. hmmm situation 4: same deal https requests.get("http://google.co.za",proxies={'https':proxy}) same result situation 1. question so looks when try use https , so...

Using Java Request Sampler inside a ForEach controller in Jmeter -

Image
i trying use java request sampler inside foreach controller. this custom sampler public class clientsampler extends abstractjavasamplerclient { string name; @override public arguments getdefaultparameters() { arguments defaultparameters = new arguments(); defaultparameters.addargument("name", "tarek"); return defaultparameters; } @override public void setuptest(javasamplercontext context) { name = context.getparameter("name"); } @override public sampleresult runtest(javasamplercontext context) { system.out.println(name); } } in jmeter create user defined variables 5 variables: and foreach controller : then added java request child foreach controller: the test plan following: when start test output is: first first first first first expected: first second third fourth fifth even if set start , end indexes in foreach controller result...

shieldui - Zooming in to the number of selected points of Shield UI ASP.NET Chart -

how can zoom in number of points have selected on shield ui asp.net chart? enable necessary property: <settings enablepointselection="true"> </settings> but can’t figure out how invoke zoom in after selection made. shield ui asp.net chart adopts new , more convenient zooming/panning concept leaves out possibility of selecting multiple adjacent points , zooming in them. instead using scroll wheel user can zoom in , out easier. in addition holding down mouse left button user can move chart points of interest in middle of plot area. 1 example can found here: http://demos.shieldui.com/aspnet/spline-chart/zoom in respect above information points selection has nothing chart’s zooming.

opensearch - Open Search Server: Ignore content but follow links -

i have oss set searches on community site. basic set works fine need fine tune it. important part of making sure indexing saves right parts every page ignores parts common pages (ie footer), parts neccessary crawler finding parts of site via links. i'm aware of opensearchserver.ignore class : <div class="opensearchserver.ignore"> text should not indexed. </div> but since links important, tag come in handy: <div class='noindexbutfollow'> not indexed link {open search server} followed </div> (as discussed in this thread .) is possible?

Maven plugin: copy a file content into another file -

i looking appropriate plugin copy file content file. my resource.xml has content this: <class>my.path.resourcea</class> <class>my.path.resourceb</class> <class>my.path.resourcec</class> and must copied destination.xml @ place of ${content}: <aaa>some info</aaa> ${content} what proper maven plugin task, please? thank in advance. nic in general maven, must first thinkg want do. might seem weird @ first sight, maven opinionated build tool, not simple weird/workaround things ;-). here, need 2 things: load file "content" property (before resource filtering starts binding phase, obviously, see next point) just activate resource filtering , done unfortunately, there's no well-known/standard plugin (1) able load file inside property. a possible way, before rewriting through dedicated plugin or so, using antrun-maven-plugin ( through loadfile task? ) or gmaven plugin load file property (during initia...

events - Java: Exception in thread "AWT-EventQueue-0" -

good evening all, i making assignment java hall exhibition system , somehow working not always, used work , crash in other moments. that related codes (add hall) : try (dataoutputstream dataoutputstream = new dataoutputstream(new fileoutputstream("d:" + file.separator + "halls.txt", true))) { dataoutputstream.writebytes(hallno + " " + tb_hallfloor.gettext() + " " + halltype + " " + dimensions + " " + area + " " + seatingstyle + " " + tb_capacity.gettext() + " persons " + tb_rental.gettext() + "rm " + facilities + " available"); dataoutputstream.writebytes("\n"); dataoutputstream.close(); } catch (ioexception e) { system.err.println(e); } and damaged part (show available halls): string no, f, htype, d, a, style, c, rental, fa, s; try { string fname = "d:/halls.txt"; sc...

windows - Recursive directory processing in a BAT file with a twist -

ok, apologize ahead of time a) using old, crappy technology (bat files) , b) asking seems redundant question. i'm limited in technology i'm allowed use in particular case , after looking @ dozens of posts on subject can't find can adapt need. i have directory structure looks this: b c d etc... xyz more folders my bat file located outside files system. need inspect starting @ level "c" , need find "xyz" directory. folders between c , xyz can have variable names depending on environment in files created. need end string consists of directory names c through xyz (i.e. "c\d\e\f....\xyz") can put variable when bat file completed can reference variable , run command. i've looked @ posts using find , can't seem figure out how a) limit string starting directory (for example when combine dir "a\b\c...") , how stop when "xyz"... any appreciated. this should work i...

weblogic12c - I am using weblogic 12c when i am going to start server i am getting "unable to get file lock, will retry" is the weblogic -

i using weblogic 12c when going start server getting "unable file lock, retry" weblogic 10.3.5/10.3.6 admin server log while trying start weblogic or managed server adminserver.lok file using in jvm first stop java.exe task manager remove adminserver.lok or managedserver.lok file in oracle middleware home $mw_home/user_projects/domains/servers/”server name trying start”/tmp directory.

c++ - How to set application path? -

i wrote console qt application. i'd copy file directory, exe file. m_path = qcoreapplication::applicationdirpath() + "\\g.aux.xml"; qfile::copy(m_path,pathnew); this code excellent works, when debug application. when copy .exe file directory not work. please tell me, how fix it. upd: think found answer need use qdir::currentpath() get current working directory in qt application you're missing .dll files. copying .exe file not enough qt applications - must make sure necessary dynamic libraries in same directory .exe. in case, copying qtcore4.dll or qt5core.dll compiler's directory should do, you'll want read this page more details in future. also, in future, please describe problem more detail.

MySQL Cannot create view for subquery in from clause -

i'm trying make query display top 10 systems , 'other' 11th row. made union query. found query build returns 'other' record each system name not in top10, made select in select sum 'other's. leading me error code 1349. me rearrange query? create view queryview (select system, cast(sum(duration) unsigned) 'sum' tbl_events inner join (trans_gu, tbl_g, trans_gm) on (trans_gu.unit_id = tbl_events.unit_id , trans_gu.gib_sn = tbl_g.sn , tbl_g.equipcode = trans_gm.equipcode , tbl_g.gen_model = trans_gm.gen_model) trans_gm.productline = 'fleet' group system order sum desc limit 10) union (select 'other' system, cast(sum(a.`sum`) unsigned) 'sum' (select 'other' system, sum(duration) 'sum' tbl_events inner join (trans_gu, tbl_g, trans_gm) on (trans_gu.unit_id = tbl_events.unit_id , trans_gu.gib_sn = tbl_g.sn , tbl_g.equipcode = trans_gm.equipcode , tbl_g.gen_model = trans_gm.g...

delphi - SuperObject cannot handle null string -

some json serializers return null empty string datafield, e.g. { "searchtext": null, "moretext": "contains something", "bookdate": 1377468000000, "empid": 12345, "listtype": 1 } i'm using superobject create isuperobject: var fjsonrequest: isuperobject; fjsonrequest := so(request.content); // webservice request this returns object string containing text 'null' . obviously because superobject not care quotes ( "searchtext": a gives same results "searchtext": "a" ). before dive 980-line tokenizer routine, 1 have solution? i'm thinking along lines (either/or): leave null datafield out of json object return empty string if else fails still do fjsonrequest := so(stringreplace(request.content,': null,',':,',[rfreplaceall])); because need handle requests coming app 1 of our developers, that's not foolproof. (no, cannot suppre...

java - Fixed position for edittext in android layout -

could explain me, how can place textview , edittext , button in center of activity? must so: textview in center below. edittext , near button (these 2 elements in center togehter). i have want, when try fill edittext , have softkeybord , activity title jumps top , user can't see it. <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".addlist"> <linearlayout ...

python - Excluding web links with specific extensions in web scraper -

i need exclude printing links in web scraper end in .od .jpg .pdf or .mp3 here's if statement if link in linklist(): print link is there library in python that? know of"regex" i'm not greatest user of it. assuming link path, can following: import os if os.path.splitext(link)[1] not in ['.jpg', '.pdf', '.mp3']: print link the function splitext takes path , returns tuple containing path without extension, followed extension. example: >>> os.path.splitext('http://www.example.com/path/to/filename.ext') ('http://www.example.com/path/to/filename', '.ext') so if split link function, can check whether last element of tuple member of list/set/tuple containing blacklist of extensions.

asp.net - An error occurred loading a configuration file: Failed to map the path '/' -

i error occurred loading configuration file: failed map path '/'. when try run following line path of web.config configuration config =system.web.configuration.webconfigurationmanager.openwebconfiguration("~"); i running windows 7 , visual studio 2010 , .net framework 4.0 . know issue resolved running visual studio administrator , have run same code numerous times before doing run administrator today running administrator not resolving issue . have run same code on laptops of team mates , code works , when run code on laptop not work . i have tried , there way can give absolute path somehow make work temporarily , can windows issue because in bad condition lately . kindly wasting lot of time i having same problem , using same workaround of launching visual studio administrator. finally tried tests , got this: if create filemap web.config application loads config without administrator privileges. i have used example http://msdn.microsoft.com/en-u...