Posts

Showing posts from May, 2011

javascript - JS get param from url hash -

console.log(_get("appid")); in fucn _get need check if param exist , return if exist. function _get(paramname) { var hash = window.location.hash; // #appid=1&device&people= //this needs not static if (/appid=+\w/.test(window.location.hash)) { //and somehow parse , return; } return false; } i expect see 1 in console , if console.log(_get("device")) or people null you need use string.match , pass in regexp object instead: function _get(paramname) { var pattern = paramname + "=+\w"; return (window.location.hash.match(new regexp(pattern, 'gi'))) != null; }

php - Requiring a fork with composer that other dependencies should use -

i have laravel project use own fork (that has merged couple of pull-requests). following composer.json works expected (it fetches master branch repo): { "repositories": [ { "type": "vcs", "url": "http://github.com/rmasters/framework" } ], "require": { "php": "5.4.*", "laravel/framework": "dev-master" }, ... "minimum-stability": "dev" } however when add package depends on illuminate components provided laravel (for example, zizaco/entrust requires same versions provided fork) end this: installing gexge/laravel-framework (4.0.x-dev 87556b2) reading .../composer/cache/files/gexge/framework/87556b.....c382.zip cache loading cache extracting archive reason: zizaco/entrust dev-master requires illuminate/support 4.0.x -> satisfiable laravel/framework [v4.0

Server Explorer in Visual Studio(2010) -

i'm working on visual studio(2010) , using server explorer database connectivity(sql server) . able connect sql client easily, problem i'm facing using "where" clause in sql query. when write simple sql query "select * employee" executing fine, when write "select * employee empno=1001 " gives following error: error in clause near 'employee'. unable parse query text. then when click continue error comes is: sql execution error: error source: .netsqlclientdataprovider error message: expreesion of non-boolean type provided condition expected , near 'no' can please hepl it..?? from error message must putting space between emp , no. if empno fieldname 2 words in table, surround [] eg; [emp no]

c++ - Reverse Fish-Eye Distortion -

i working fish-eye camera , need reverse distortion before further calculation, in question happening correcting fisheye distortion src = cv.loadimage(src) dst = cv.createimage(cv.getsize(src), src.depth, src.nchannels) mapx = cv.createimage(cv.getsize(src), cv.ipl_depth_32f, 1) mapy = cv.createimage(cv.getsize(src), cv.ipl_depth_32f, 1) cv.initundistortmap(intrinsics, dist_coeffs, mapx, mapy) cv.remap(src, dst, mapx, mapy, cv.cv_inter_linear + cv.cv_warp_fill_outliers, cv.scalarall(0)) the problem this way remap functions goes through points , creates new picture out of. time consuming every frame. way looking have point point translation on fish-eye picture normal picture coordinates. the approach taking calculations on input frame , translate result coordinates world coordinates don't want go through points of picture , create new 1 out of it. (time important us) in matrices mapx , mapy there point point translations lot of points without complete translation. tried

php - Can only see friends lists if logged in with user id of 1 -

i'm implementing friends list system on site, , i've gotten display friends names have accepted(therefore accepted has value of 1), , when visit dummy accounts can see friends, when logged in dummy account can see either, manually changed user_id in database "1" , logged out , in , discovered it's working user_id of 1, here code. it's not mysqli yet, that's next step. <h1>friends</h1> <?php $user_id = user_id_from_username($username); if($_session['user_id'] == $user_id){ $logged_user_id = $_session['user_id']; $result = mysql_query("select * `friends` `friend_id`='{$logged_user_id}' , `user_id`!='{$logged_user_id}' , `accepted`='1'"); while ($row = mysql_fetch_array($result)){ $friend_id = $row['user_id']; /*get friend details*/ $fetch_details = mysql_fetch_object(mysql_query("select * `users` `user_id`='{$friend_id}'")

uiimage - Objective C: Sharpen images created with CGContextdrawPDFPage -

i create uiimages pdf cgcontextdrawpdfpage. the quality wasn´t satisfying tried cgcontextsetinterpolationquality(context,kcgrenderingintentdefault); and worked out. quality of resulting images still not enough. image looks totally blurry on ipad. can tell me how can increase quality , sharpen image bit? thanks help. i better results using uigraphicsbeginimagecontextwithoptions instead of uigraphicsbeginimagecontext for beginning image context. the parameter scale set 0.0 did trick.

object - Sending a class member function as an argument of glutDisplayFunc -

i trying send member function of class vertices argument of glutdisplayfunc in main getting error : error 1 error c3867: 'vertices::draw': function call missing argument list; use '&vertices::draw' create pointer member 2 intellisense: pointer bound function may used call function c:\users\danish\documents\visual studio please me out.....the code below #include <glut.h> class vertices { private: float x1; float x2; float y1; float y2; public: vertices(float a, float b, float c, float d) { x1 = a; y1 = b; x2 = c; y2 = d; } void draw() { glclear(gl_color_buffer_bit); glcolor3f(1.0, 1.0, 1.0); glbegin(gl_polygon); glvertex3f(x1,y1,0.0); glvertex3f(x2,y1,0.0); glvertex3f(x2,y2,0.0); glvertex3f(x1,y2,0.0); glend(); glutswapbuffers(); } }; void timer(int

asp.net - How Get All duplicate record using linq -

in project i'm having critical problem: have collection of employee s in collection. of employee s have same lname : public class employee { public int id { get; set; } public string fname { get; set; } public string mname { get; set; } public string lname { get; set; } public datetime dob { get; set; } public char gender { get; set; } } public class myclass { public list<employee> getall() { list<employee> emplist = new list<employee>(); emplist.add(new employee() { id = 1, fname = "john", mname = "", lname = "shields", dob = datetime.parse("12/11/1971"), gender = 'm' }); emplist.add(new employee() { id = 2, fname = "mary", mname = "matthew", lname = "jacobs", dob = dat

Should a Git push be uploading files/directories? -

i coming off of old-fashioned ftp workflow , having trouble getting development → staging → production git process working. able connect both staging , production servers via ssh/git. i created empty repository on staging server , attempted push local dev repository. appeared work. however, file seemed upload big 2+gb file in .git folder. none of directories upload. way works or doing wrong? cannot figure out how take local project , push server way used doing in ftp. any appreciated. take @ codeschool's interactive lesson github. http://try.github.io/levels/1/challenges/1 it explains of stuff started

angularjs - angular ng-repeat expressions as variables -

i'm trying this: <ul> <li ng-repeat="{{myrepeatexpression}}">{{row.name}}</li> </ul> but because ng-repeat logic in compile state of directive treats {{myrepeatexpression}} normal string instead of variable. doesn't work, obviously. is there workaround that? you can use , expression ng-repeat , not interpolated value. in order create dynamic repeatable list can try either: using function returns list dynamically in ng-repeat - this potentially more expensive since angular needs call function first determine if collection has changed when doing $digest cycle $watch particular variable on scope trigger change of list - potentially more efficient if dynamic list depends on more 1 variable can more verbose , can lead potential bugs forgetting add new $watch when new variable required demo plunker js: app.controller('mainctrl', function($scope) { var values1 = [{name:'first'}, {name:'se

Language Reference, Font-family -

there 3 basic languages used on website. put lang="en" in html tag. in css file write following: body { ... font-family: 'open sans'; font-size: 10pt; ... } so, if text on website in english either russian uses web font called open sans . , works ok. now want make when write text in armenian use web font arian amu , doesn't work way: font-family: 'open sans', 'ariam amu'; in css, write :lang(hy) { font-family: 'arian amu'; font-size: 10.5pt; line-height: 18px; } and put lang="hy" in p tags when whole text in armenian. the question is, how can make if language russian or english, writes in open sans 10pt , when it's armenian, ariam amu 10.5pt , line-height of 18px. the pseudo-class :lang has more specificity element selector body . may cause issues when 2 rules conflict, in case. try specifying conflicting rules same specificity: :lang(en), :lang(ru) { font-family: '

c# - Converting from 'WordOpenXML' to In-Memory System.IO.Packaging.Package -

when using vsto 2012 manipulate ms word document, see document has 'wordopenxml' string property, xml representation of files constituting .docx package saved disk when saving word document .docx. i want convert string equivalent system.io.packaging.package object in memory . the so question here similar. indeed, op mentions 'in memory' in question. however, answers given involve saving package disk using system.io.packaging.zippackage.open method. not want save package disk , have open again using wordprocessingdocument.open() method. rather, want done in memory , not involve file system @ all. i see wordprocessingdocument.open() has overload takes stream. however, i'm not sure how prepare such stream wordopenxml string, although suspect post referenced above gives of answer. you can use method in memory stream wordopenxml string: /// <summary> /// returns system.io.packaging.package stream given word open xml. /// </summar

ip address - Run command prompt commands in c# -

is there way run command prompt commands within c# application? need name of computer way can access typing in cmd prompt. nslookup myipadress like if ip 134.123.12.12 type; nslookup 134.123.12.12 and value returns after name: after. how in c# console application? i've tried using string name1 = environment.machinename; console.writeline(name1); string name2 = system.net.dns.gethostname(); console.writeline(name2); string name3 = system.net.dns.gethostentry("localhost").hostname; console.writeline(name3); string name4 =dnslookup("134.123.12.12"); string name5 = system.net.dns.gethostentry(134.123.12.12).hostname; console.writeline(name5); but none of these produce correct name, give me server/host name of computer. ideas? i got code might work you. here give internet name: string name = system.net.dns.gethostentry("192.168.1.254").hostname; console.writeline(name); console.readline(); and here give ip address: system

importerror - how to understand dot notation in this Django blog app -

i learn book python web development django covers django 1.0 . on other hand, use django 1.5.1 , python 2.7.5 . stuck @ 'making blog's public side' session. i open blog/views.py file , type following: from django.template import loader, context django.http import httpresponse mysite.blog.models import blogpost def archive(request): posts = blogpost.objects.all() t = loader.get_template('archive.html') c = context({ 'posts': posts }) return httpresponse(t.render(c)) next step, edit mysite/urls.py looks this: url(r'^blog/', include('mysite.blog.urls')), and last step, make new file, mysite/blog/urls.py , containing these lines: from django.conf.urls.defaults import * mysite.blog.views import archive urlpatterns = patterns('', url(r'^$', archive), ) but, when try open http://127.0.0.1:8000/blog/ , arised exception value: no module named blog.urls . after doing research, found problem lit

python - How run bottle + tornado + ssl (https) + spdy -

i'm using python framework bottle webserver tornado. here's init.py : import bottle import os # init application bottle.run(host="127.0.0.1", app=app, port=int(os.environ.get("port", 5000)), server='tornado') how make connection via https? i read article http://dgtool.blogspot.com/2011/12/ssl-encryption-in-python-bottle.html it's cherrypy server. is posible use spdy tornado? how? (i found tornadospdy on github, there no explanations how use it) any appreciated your best bet use proxy front end server nginx, haproxy or apache. configuring tornado ssl extremely slow, slows tornado down crawl until becomes totally unresponsive minimal visits. have looked everywhere decent speed in ssl traffic using tornado directly, did not find any. besides not bad use front end server. but using apache f.ex. front end proxy, got close native non-ssl speeds. but configure tornado ssl, simple : def main(): handlers = [

c# - Trying to update a record, but the update code only updates one of the timestamp fields and nothing else -

i have database table need update records on. code add new record works fine, when go update existing record, not fields update new information in form. here's code: private void updateexistingdsn() { //update existing dsn try { using (pathfinderdatacontext pfdccontext = new pathfinderdatacontext()) { dsn olddsn = pfdccontext.dsns.single(dsn => dsn.dsnid == int.parse(request["dsn"])); olddsn.auth_authorizationid = int.parse(request["auth"]); olddsn.serviceprovided_serviceprovidedid = int.parse(request["sp"]); olddsn.evidencebpmu = short.parse(ddlevidencebpmu.selectedvalue); olddsn.locationofvisit = txtlocationofvisit.text; olddsn.childrenpresent = txtnamesofchildrenpresent.text; olddsn.parentpresent = txtnamesofparentspresent.text; olddsn.otherspresent = txtna

How do I send email via PHP from within an HTML file? -

my website html5. consequently, files .html . have contact.html file use send message from, using php. don't have experience php (so if recommend better alternative, non-.net way of sending email, please let me know). my initial thought include php code inside html file (whether or not possible or recommended, don't know). i've done once before, , believe remember having form tag somewhere in attributes specified .php file used send email. something <form someattribute="sendmail.php"> ... </form> . question : given think should (above), best approach (specifying php file inside form tag), or recommend better way send email raw .html file? you cannot html. if stick php solution, try <?php if(isset($_post['send'])) //check submit button pressed { //get variables post array. remember specified post method $to = $_post['to']; $subject = $_post['subject']; $me

c# - Passing two query's to a view, no GetEnumerator -

i have bookings class populated entity framework, want run different queries against table , return them both view. ive read using class combind them having trouble getting work... thanks help error foreach statement cannot operate on variables of type 'itapp.models.bookings' because 'itapp.models.bookings' not contain public definition 'getenumerator' class namespace itapp.models { public class bookings { public list<tblbooking> bookedin { get; set; } public list<tblbooking> bookedout { get; set; } } } usage (for testing im using same query both, use in/out queries after) var tblbookings = d in db.tblbookings.include(t => t.equipment).include(t => t.tbluser) (d.equipment.bookable == true ) && (d.equipment.deleted == false) && (d.equipment.decommissiondate == null || d.equipment.decommissiondate == dateblank1

Look for partial name of cookie using Javascript -

on website use cookie show or hide content. depending on how users log in determine content visible them. i.e. if log in facebook, site looks cookie called "fbsr_3324". problem second part of cookie name changes every user (fbsr_2889 fbsr_9902 etc). therefore want know if can , suggest how can check first part of cookie name (i.e. existance of cookies starting fbsr_ here current current javascript use: function checkcookie() { contentdiv=document.getelementbyid("cookiefb"); if (document.cookie.indexof("fbsr_")!=-1) { contentdiv.style.display="none"; } else { contentdiv.style.display="block"; } } the code you're using perform if logged in using facebook, if had cookie set containing value 'fbsr_haha, gotcha' perhaps job regex: /^|;\s*fbsr_[0-9]{4}\=[^;]+;/.test(document.cookie); should trick. expression explanation: ^|; : either start of string, or semi-colon \s*

r - How to generate facetted ggplot graph where each facet has ordered data? -

i want sort factors (condition, parameter , subjectid) meanweight , plot meanweight against subjectid such when faceted condition , parameter, meanweight appears in descending order. here solution, isn't giving me want: datasummary <- structure(list(subjectid = structure(c(1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 2l, 2l, 2l, 3l, 3l, 3l, 4l, 4l, 4l), .label = c("s001", "s002", "s003", "s004"), class = "factor"), condition = structure(c(1l, 1l, 1l, 2l, 2l, 2l, 3l, 3l, 3l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l, 1l), .label = c("1", "2", "3"), class = "factor"), parameter = structure(c(1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l), .label = c("(intercept)", "prevcorr1", "prevfail1"), class = "factor"), meanweight = c(-0.389685536725783, 0.200987679398502, -0.808114314421089, -0.10196105040707, 0.0274188815763494, 0.359

beautifulsoup - I use pyparsing receive error Spider not found -

i'm try code script here: how can translate xpath expression beautifulsoup? receive error. can me, why error: spider = self.crawler.spiders.create(spname, **opts.spargs) file "c:\python27\lib\site-packages\scrapy-0.16.5-py2.7.egg\scrapy\spidermanag er.py", line 43, in create raise keyerror("spider not found: %s" % spider_name) keyerror: 'spider not found: app' i installed pyparsing thi code: from pyparsing import makehtmltags, withattribute, skipto import urllib # html url url = "http://www.whitecase.com/attorneys/list.aspx?lastname=&firstname=" page = urllib.urlopen(url) html = page.read() page.close() # define opening , closing tag expressions <td> , <a> tags # (makehtmltags comprehends tag variations, including attributes, # upper/lower case, etc.) tdstart,tdend = makehtmltags("td") astart,aend = makehtmltags("a") # interested in tdstarts if have "class=altrow" attribut

onCreate invoke multiple times in fragment in android -

i have listview in activity.on clicking on list item invokes activity.in activity have implemented viewpager , fragments. when loads first time onresume() ,oncreate() , oncreateview() method called twice, if clicks on first list item. (i.e. loads first , second fragment view) when click on other list fragment except first calls onresume() ,oncreate() , oncreateview() methods 3 times (i.e. loads previous , after , click view ) it absoutely fine have google analytics code have track current page can put code load current page my question googleanalytics code tracs 3 or 2 pages @ first time user doesnot gone through pages how avoid ? my code below fragment public class mainlistactivity extends activity{ public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); log.v(tag, "oncreate()"); customfragmentpageradapter adapter = new customfragmentpageradapter(); viewpager.setadapter(adapter); } } //code fra

python - check if string in pandas dataframe column is in list -

if have frame this frame = pd.dataframe({'a' : ['the cat blue', 'the sky green', 'the dog black']}) and want check if of rows contain word have this. frame['b'] = frame.a.str.contains("dog") | frame.a.str.contains("cat") | frame.a.str.contains("fish") frame['b'] outputs: true false true if decide make list mylist =['dog', 'cat', 'fish'] how check rows contain word in list? the str.contains method accepts regular expression pattern: in [11]: pattern = '|'.join(mylist) in [12]: pattern out[12]: 'dog|cat|fish' in [13]: frame.a.str.contains(pattern) out[13]: 0 true 1 false 2 true name: a, dtype: bool

compiler construction - Compiling game with Android Studio lags a lot -

i have strange problem. when use phone, 'aide' app, compile game, runs smooth @ 60fps, then, when use android studio compile, runs @ max 40fps, , gets reaaaally laggy. i'm using exact same code, shouldn't problem. have had similar problem? or know solution? appreciated :) /guiceu presumably you're running in debug mode when you're using android studio, make execution far slower.

ios - Image still shown correctly(?) when retina version removed -

in app, have uitabbarcontroller . has 1 viewcontroller , has tabbar item set image. when run program on simulator iphone, image shown ok. decided test it, , removed @2x version of same image - , switched iphone (retina 4 inch) during simulating, in hardware->device menu, image still shown ok. why it, can explain? clean app , remove device, has happened me several times. anyway, what's problem on having both images @ same time? system choose proper one.

In an XPiNC app, how can I launch one XPage vs. another based on Role -

i have xpinc app consists of 2 different xpages. xpages set used based on roles. 1 role people set content , other consume it. one of requirements consumer role wants open nsf desktop , have automatically open consumer xpage. know can set launch property consumers, causes content providers open xpage not should happen. how can set application opens proper xpage based on role? another way have third page launch page. page have beforepageloads event looks @ user roles , context.redirecttopage("/otherpage.xsp") depending on role detected.

css - Rendering HTML emails depending which client opens it -

html emails fickle bunch. problem lies superscripting. my code required work in desktop clients: outlook 2000 outlook 2003 outlook 2007 outlook 2010 as in web-based email clients (firefox, chrome, explorer): gmail yahoo aol internet explorer 7 browser (lol) currently best cross-browser code i've come across is: <sup style="font-size:11px; line-height:0; vertical-align:3px;"> this works wonderful in except outlook 2007 , 2010 font-size shrunk become non-legible. other code such as: <sup style="position:relative; vertical-align:baseline; bottom:4px;"> this code works great in everything, except gmail strips out positioning causing superscript sit on baseline. after trying several dozens different combinations of styling above 2 ones provide consistent font size , line height. the question is there snippet of code can place in head tell email use code or class depending on client email opened in? know gmail pre

Android Java IllegalStateException: Could not execute method of the activity -

i'm trying code simple randomizer app. had randomizer button working, changed code (which thought irrelevant randomizer button) , started crashing , getting "illegalstateexception: not execute method of activity" error. can tell, error specific code is, because not find answers fit code. package com.example.randomgamechooser; import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.menu; import android.view.view; import android.widget.textview; public class mainscreen extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main_screen); } public void choosegame (view view) { gamelist dbutil = new gamelist(this); dbutil.open(); string string = dbutil.getrandomentry(); //textview textview = new textview(this); textview textview = (textview) findviewbyid(r.id.chosenbox); textview.settextsize(4

hyperlink - space between two spans in a link is unclickable -

i have following html code: <a href="#"> <span class="span1">test</span><span class="span2">test</span> </a> and css code: .span1{float: left; } .span2{float: right; } so link test test 40px space between 2 words "test" , "test". created space using css, not &nbsp; or typing space keyboard. the words "test" , "test" both click-able space between them not. how can make space between 2 spans click-able? have tried wrap both of span tags in span tag didn't help. thank you. because span s forced block display (by virtue of having given them float properties), need make sure a has block display , either overflow: hidden or clearfix such contain space (and intervening space) occupied contents: a { display: block; *zoom: 1; } a:after { clear: both; content: " "; display: table; } .span1 { float: left; } .span

cmd - Loop through certain files in batch -

i have directory contains .sql files like file.xxx.v3.0.sql file.xxx.v3.0.sql file.xxx.v3.0.sql file.xxx.v3.0.sql in .bat file how loop through files in directory start "file." , end in ".v3.0.sql"? so far i've got for /f %%b in ('dir /b /s "%apppath%\files\*.sql"') call :import %%b forego for /f route. there dragons (for unicode characters , spaces, – best not pick bad habits). you can use plain old for , can iterate on files fine: for %%b in (%apppath%\files\file.*.v3.0.sql) ( call :import %%b )

.net - ASP.NET: Disallow certain Active Directory users -

i have asp.net mvc application uses windows authentication. our staff able use application without having log in. however, have generic, departmental ids in active directory users. how can make application disallow these users, if staffperson logged in computer 1 of these generic ideas, application make them log in? thanks! i'd put restricted department users ad group, put in web.config under authorizations denying specific group privileges. see below example (departmentids ad group): <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" /> <authentication mode="windows" /> <authorization> <allow roles="domainname\authorizedusers" /> <deny users="domainnames\departmentids" /> </authorization> </system.web> </configuration> users can specify as <deny user

java - ManyToOne Unidirectional Disable Constraint -

i have following unidirectional manytoone relation: @entity @table(name = "child") public class child { @id private integer id; @manytoone(cascade = cascadetype.all, fetch = fetchtype.eager) private parent parent; } @entity @table(name = "parent") public class parent{ @id private integer id; } when trying delete parent entity database have constraint violation. ora-02292: integrity constraint violated - child record found what need parent entity deleted if has children, children entity should stay. how change relation? you can't jpa if using relationship. making manytoone indicates value in foreign key field exist in parent table. jpa not able distinguish between null fk value , there being fk value doesn't have associated row in parent table. if must done (and shouldn't imo), need map integer foreign key value in child basic mapping instead of manytoone. allows set independently of there being e

Adding Data to MySQL Table using PHP(Revised) -

the code below using add tables created in database. i'm still receiving error query, error: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'location, horseshoe) values('obed & isaacs','springfield illinois','buffalo chic' @ line 1. how fix error? seems thing stopping rest of page load. <?php $link=mysql_connect("*************","************","***********"); if (!$link) { echo "failed connect mysql: " . mysql_error(); } mysql_error(); mysql_select_db(horseshoevotes); $sql = "insert `submissions` (restaurant, restaurant location, horseshoe) values('$_post[restaurant]','$_post[location]','$_post[horseshoe]','$_post[email]')"; if (!mysql_query($sql)) { die('error: ' . mysql_error($link)); } echo "submitted"; mysql_query($sql); mysql_close($link); ?> you haven't done database - y

java - How to view all contents of all jars in a given directory? -

maybe i'm having brain dead day but, what easiest/best way contents of jars in given directory ? i'm running classpath/loader conflict want way list of entire contents of jars find problem. know there tools but, life of me, can't think of of them. any thoughts? edit: reference, here's i've been doing (this broken readability on 1 line shell script): outfile=/tmp/allclasses.txt ; touch $outfile; file in *.jar; echo " === $file " >> $outfile; jar -tf $file >> $outfile; done; this seems work pretty feels clunky. for reference, here's i've been doing: touch /tmp/allclasses.txt ; file in *.jar ; echo " === $file " >> /tmp/allclasses.txt ; jar -tf $file >> /tmp/allclasses.txt ; done; this seems work pretty feels clunky. open jar-file archive winrar or 7zip

sql server - Why is this T-SQL DDL not adding a column to my table -

we have type of ddl construct (but not always) fails. construct is: if not exists (select 'b' sys.columns inner join sys.tables b on a.object_id = b.object_id a.name = 'badgeid' , b.name = 'allianceincentbadges') begin alter table dbo.allianceincentbadges add badgeid int not null default 0; exec sp_executesql n'merge allianceincentbadges using incentivebadges on allianceincentbadges.badgename = incentivebadges.badgename when matched update set badgeid = incentivebadges.badgeid;' ; end; go if run 'alter' table first , 'exec', fine. however, if run using above construct, badgeid field not added , exec throws error missing column. use 'exec' parser doesn't throw error (the parser throw error if column doesn't exist @ parse time). any ideas why problem crops time time

css - How to Remove - Modify btn-inverse Top Border -

Image
can please let me know how can remove or change color of .btn-inverse located inside .well div please take @ following image: i tried update css of .btn-inverse settong no border-top gray line still sitting there! update: here demo .btn-inverse { border-style:none !important; } as can see set border style none , removes borders gray line still there! try this .well .btn-inverse { border-top:none!important; } .btn { box-shadow:none!important; } demo: http://jsfiddle.net/h6zk7/

android - Zooming in highchart makes line disappear -

i'm using highchart in android app display dynamic chart updated every 3 secs , displayed on 1 day. my chart composed of 2 fixed data series displaying limit monitored data should not exceed, , monitored data (power value) power value 00:05 moment chart loaded, first displayed. , then, every 3 seconds, value added serie. the problem when try zoom end point of power values. power data line (and one) disappear when zoom in. if zoom out, line reappears. if zoom on area end point of data power line not displayed, goes right. i tried remove 2 fixed serie (it adjust chart height length of power data line whatever), , same zoom problem appears. can't zoom end point of power data line can zoom anywhere else. tried use datagrouping, problem stay same here code: $(function() { $(document).ready(function() { highcharts.setoptions({ global: { useutc: true } }); var datapower = android.getdayhistory((new date()).gethour

flex - Can I make Flash Builder break on TypeError or ReferenceError? -

right flash builder telling me have these errors when i'm debugging, won't tell me line numbers , can't figure out how make break when errors occur. possible? example console output: typeerror: error #1009: cannot access property or method of null object reference. referenceerror: error #1056: cannot create property is_flying on entities.bird. thanks! ok, based on last comment have 2 suggestions: try adding uncaught exception handler app. in event handler, can print own stack trace see error coming from. private function uncaughterrorhandler(event:uncaughterrorevent):void { // note suggested doing this, might details // out of event object passed function var e:error = new error('hi'); trace(e.getstacktrace(); } alternatively, since 1 of errors mentions is_flying property, find places property set , wrap code in try/catch block. finally, weird scenario , coworkers experiencing. if can identify/reproduce problem, may want

ios - How to subscript with characters in Unicode? -

i able subscript numbers using: static const unichar ksubscriptzero = 0x2080; int numberofhydrogens = 2; nsstring *water = [nsstring stringwithformat:@"h%co", ksubscriptzero + numberofhydrogens]; the above code prints out nicely formatted > h2o (with of course 2 subscript), having issue doing same other unicode characters (that not numbers) example 209c which subscript t. instead of subscript t, square box... can please tell me right way can done? if square box instead of desired glyph font not have glyph character , therefore cannot display it. if don't find font containing u+209c (latin subscript small letter t) alternative use attributed strings , suggested in answer: https://stackoverflow.com/a/17957628/1187415 .

asp.net mvc - MVC "Access is Denied" using IIS -

having serious trouble getting beyond "access denied" message: error message 401.2: unauthorized: logon failed due server configuration. verify have permission view directory or page based on credentials supplied , authentication methods enabled on web server. contact web server's administrator additional assistance. how got here running under windows 7, professional. system using ad login system (name: system\login). created new mvc 3 application in vs2010 called xyz. made no changes code. set referenced files system.web.mvc , system.web.helpers copy local = true. what attempted published xyz file system location "c:/websites/xyz". added "abc.xyz.com" hosts file ipa 127.0.0.1. created new site in iis manager called "xyz" , set physical path path app published (c:/websites/xyz). bound xyz abc.xyz.com:80. ensured application pool site runs .net 4.0, integrated. application pool identity set applicationpooliden

c++ - Overflowing signed/unsigned assignments and its results -

i'm reading stroustrup's book "the c++ programming language 4th edition" , have 3 questions regarding overflowing assignments (particularily signed/unsigned chars, book exemplifies). firstly, according standard 5/4 paragraph: if during evaluation of expression, result not mathematically defined or not in range of representable values type, the behavior undefined . (except when destination variable unsigned - result defined in such case). definition pertain assignments? because in opinion there many contrary statements in book, in chapter 6. first 1 corresponds aforementioned paragraph, following comments doesn't: variables of 3 char types can freely assigned each other. however, assigning large value signed char still undefined. example: void g(char c, signed char sc, unsigned char uc) { c = 255; //implementation-defined if plain chars signed , have 8 bits c = sc; //ok c = uc; //implementation-defined if plain chars signe

Is there a way to have user input multiple char arrays at once c++ -

i have function takes array of 4 characters , returns value based on sequence of characters. what want have user input whole line of characters , create loop go on each "sub- group of characters" , return result of them. my initial thinking somehow use push_back keep adding arrays vector. i don't know how long entire array be, should product of 3. as example, right able : char input [4] ; cin >> input; int = name_index[name_number(input)]; cout << name[i].fullname; but user ti input multiple name abbreviations @ once i change sample this: char input [4] ; cin >> input; int = name_index[name_number(input)]; cout << name[i].fullname; to this: string input; cin >> input; const int = name_index[name_number(input)]; cout << name[i].fullname; then can start using vector track multiple inputs: vector<string> inputs; string line; while (cin >> line) { if (line == "done")

c# - Design Advice using Master Pages -

master page <div id="header" style="height: 150px; width: 750px;"> <asp:label id="label3" runat="server" text="loggedinuser:"></asp:label> <asp:label id="lblloggedinuser" runat="server" text=""></asp:label> </div> <div id="leftmenu" class="leftmenu"> <br /> <asp:dropdownlist id="ddlfamilymembers" runat="server" style="height: 25px; width: 125px" datatextfield="fullname" datavaluefield="membershipgen" onselectedindexchanged="ddlfamilymembers_selectedindexchanged" autopostback="true" > </asp:dropdownlist> <br /><br /> <asp:image id="imagemember" class="space" runat="server" height=&