Posts

Showing posts from April, 2010

c++ - Odd results using glTexImage2D -

c++ - Odd results using glTexImage2D - i've been trying figure out how glteximage2d works , seeing odd results pretty clear-cut code. code draws rough circle 256*256 length unsigned array , sends info out become texture. texture displayed turning out variations of reddish , orange no matter combinations select within image creation loop: unsigned* info = new unsigned[256*256]; (int y = 0; y < 256; ++y) (int x = 0; x < 256; ++x) if ((x - 100)*(x - 100) + (y - 156)*(y - 156) < 75*75) data[256*y + x] = ((156 << 24) | (256 << 16) | (156 << 8) | (200 << 0)); else data[256*y + x] = 0; // i'd expect transparent , above transparent , green, it's reddish somehow. glbindtexture(gl_texture_2d, texid); gltexparameteri(gl_texture_2d, gl_texture_min_filter, gl_linear); gltexparameteri(gl_texture_2d, gl_texture_mag_filter, gl_linear); glteximage2d(gl_texture_2d, 0, gl_rgba8, 256, 256, 0, gl_rgba...

java - Spring 3 wrongly binding request data on all model attributes -

java - Spring 3 wrongly binding request data on all model attributes - i have page submits data. submited fields include id parameter. <form:form modelattribute="command" action="info.html"> <form:input path="id"/> ... </form:form> my comand object pojo such id field: public class mycommand { private integer id; public integer getid() { homecoming id; } public void setid(integer id) { this.id = id; } .... } this annotated in controller this: @modelattribute("command") public mycommand initializecommand() { homecoming new mycommand(...); } while handler method looks this: public void handle(@modelattribute("command") mycommand cmd, ...) when submit form, spring binds parameters command object. binds parameters every object found in model (to model attributes) has id property. example, bean like: public class foobar { private integer ...

java - UTFDataFormatException and ClassNotFoundException when adding an image to Liferay portlet -

java - UTFDataFormatException and ClassNotFoundException when adding an image to Liferay portlet - i utilize liferay 5.2.3 on tomcat 5.5. added tag <img alt="g.png" src="<%= request.getcontextpath() %>/images/g.png"> to 1 of jsps dispatch portlet to, , received: class="lang-none prettyprint-override"> error [http-8080-processor22] (standardwrappervalve.java:253) servlet.service() servlet jsp threw exception java.io.utfdataformatexception: invalid byte 1 of 1-byte utf-8 sequence. @ org.apache.jasper.xmlparser.utf8reader.invalidbyte(utf8reader.java:621) @ org.apache.jasper.xmlparser.utf8reader.read(utf8reader.java:492) @ org.apache.jasper.xmlparser.xmlencodingdetector.load(xmlencodingdetector.java:1000) @ org.apache.jasper.xmlparser.xmlencodingdetector.skipstring(xmlencodingdetector.java:951) @ org.apache.jasper.xmlparser.xmlencodingdetector.scanxmldecl(xmlencodingdetector.java:1209) ...

android - Custom listview with two buttons in each row -

android - Custom listview with two buttons in each row - i have spent literally 2 days trying sort issue. if help massively appreciative. what i'm trying achieve: have listview, whereby player can add together new entries (players), through text field (for player name), , submit button. in each field of listview, display player name, , 2 imagebuttons. 1 male symbol, , 1 female symbol. male symbol toggled default, , user can set player beingness male or female toggling either male button or female button. finally, 1 time user moves onto next screen (a new activity), application save player names , attached sex form of storage , proceed next activity. what have achieved: i have simple array adapter, upon player adding new player name list, run notifydatasetchanged() on it. adapter set utilize custom row layout file. within layout file, looks this: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas....

c# - Trigger SelectedIndex changed whilst clicking on any control within a ListBoxItem area -

c# - Trigger SelectedIndex changed whilst clicking on any control within a ListBoxItem area - i've info template listboxitem contains of few buttons, , few custom controls grid or chart. each button bound appropriate command handler, selectedindex property of listview command bound viewmodel's propery well. the problem: in command handlers (which bound buttons) can't resolve selected item/index because not changing whilst clicking on button or other command within listbox item, when clicking on listboxitem area - selectedindex changing. question is how trigger selectedindex changed whilst clicking on command within listboxitem? add listbox.resources <listbox.resources> <style targettype="{x:type listboxitem}"> <style.triggers> <trigger property="iskeyboardfocuswithin" value="true"> <setter property="isselected" value="true" /> ...

authentication - Login System using PHP -

authentication - Login System using PHP - i'm new in php. newbie, started first project. made login scheme webapp. there's problem. when seek access index or main page, asks login, when i'm seek access other page, doesn't inquire me login. how can manage same restriction pages? login code here. <? $connection=mysql_connect("localhost","admin",""); if(!$connection) { die("database connection failed: " . mysql_error()); } //select database utilize $db=mysql_select_db('vss',$connection); if(!$db) { die("database selection failed: " . mysql_error()); } $username=$_post['username']; $password=$_post['password']; // $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); // $query="select *from user username='$username'and password='$password'...

javascript - Callbacks not working properly -

javascript - Callbacks not working properly - i'm @ loss. in code, #options should wind fading in, doesn't. css attributes set, though. $("#content > p").animate({ opacity: '0' }, function() { $(this).css("display", "none"); $("#options").css("opacity", "0").show(0, function() { $("#options").fadein(); }); }); the opacity still beingness set 0 . you can alter fadein() to... $("#options").animate({ opacity: 1}, 500); jsfiddle. javascript callback jquery-callback

Ajax Update All components with JSF -

Ajax Update All components with JSF - is there way update components or have manually select each id? have ajax html5 detection script , dont want have update every component via id. thanks just utilize id of mutual parent component. class="lang-xml prettyprint-override"> <h:panelgroup id="someparent"> <h:somecomponenttoupdate ... /> ... <h:somecomponenttoupdate ... /> ... <h:somecomponenttoupdate ... /> ... </h:panelgroup> ... <f:ajax render="someparent" /> or utilize @all refresh entire page. class="lang-xml prettyprint-override"> <f:ajax render="@all" /> ajax jsf

SharePoint list webpart connections option not visible -

SharePoint list webpart connections option not visible - i want connect 2 list webparts. problem when go "edit web part -> connections" alternative "connections" doesn't apperar. searching on google found this: http://office.microsoft.com/en-us/windows-sharepoint-services-help/connect-data-in-web-parts-ha010024105.aspx. there paragraph says: "the web part menu may not enabled or visible on web part page several reasons, including web part or zone not back upwards connections, using browser not compatible windows sharepoint services, or connections disabled on site" i think connections disable on site. can enable connections on sharepoint site? thanks help! ha ha. in net explorer 11, have view sharepoint sites in "compatibility mode"! imagine that! without compatibility mode, ie won't display connection menus - firefox , chrome will! apparently, this problem sharepoint 2013. sharepoint connection web-part...

php - Textarea not updating when passed a string with a newline from POST? -

php - Textarea not updating when passed a string with a newline from POST? - i'm running troubles code, narrowed downwards , simplified in 2 next segments: index.html <html> <body> <form name="form" method="post" action="upload.php" target="iframe"> <textarea id="text1" name="text1"></textarea> <input type="submit" /> </form> <textarea id="text2"></textarea> <iframe name="iframe" id="iframe" style="display:none;" ></iframe> </body> </html> upload.php: <?php $message= $_post['text1']; echo <<<_end <script language="javascript" type="text/javascript"> var pardoc = window.parent.document; pardoc.getelementbyid('text2').value = '$message'; </script> _end; ?> the overall goal of code above nowadays in text...

java - API design: one generic interface VS three specialized interfaces? -

java - API design: one generic interface VS three specialized interfaces? - i'm working on tool users can utilize own annotations describe info processing workflow (like validation, transformation etc). besides using ready-to-use annotations, users can user own: in order need declare annotation class itself, , implement annotation processor (<--it's main point of question actualy). the configured method info processing may one: void foo(@provide("dataid") @validate(validator.class) string str) { dosmth(str); } there're naturally 3 groups of annotations: those produce initial values; those transforms values (converters); those read values , perform work (validators, different consumers). so need create choise: either create 1 interface handling these types of annotations, can one: interface genericannotationprocessor { object processannotation(annotation annotation, object processedvalue); } or can add together 3 ...

PHP Newbie problem - Parse error: syntax error, unexpected '=', expecting T_VARIABLE or '$' -

PHP Newbie problem - Parse error: syntax error, unexpected '=', expecting T_VARIABLE or '$' - new php, doing tutorial utilize php on server side connect flex. have typed in code video tutorial below can't seem work me. plan set longitude , latitude info sql database, format xml , pull flex php code follows <?php mysql_connect("localhost", "root", ""); mysql_select_db("demo"); $result = mysql_query("select * maps"); echo "<?xml version=\"1.0\" ?><map>"; while($row = mysql_fetch_assoc($result)) { echo "<loc><lat>" . $row["lat"] . "</lat>"; echo "<lon>" . $row["lon"] . "</lon>"; echo "<name>" . $row["name"] . "</name></loc>"; } echo "</map>"; ?> and error receive is: parse error: syntax error, une...

gis - To transfer attributes from a polygon feature class (that contains line feature ) to the line feature class using python script -

gis - To transfer attributes from a polygon feature class (that contains line feature ) to the line feature class using python script - has tried trasfer attributes polygon feature class line feature class using python script. have done spatialjoin , identity, output feature class-. need polygon attributes , transfer them line feature class. please help... from statement, think have arcgis desktop.. identify mutual id between poly , line feature. then bring together based on mutual id. have line feature input , polygon bring together features. verify join, , export line feature.. create new line feature attributes polygon.. after practice these steps, can find python codes. gis arcgis

c# - Combining multi coloumn failover logic into a single property in Entity Framework 4.1 -

c# - Combining multi coloumn failover logic into a single property in Entity Framework 4.1 - i working on legacy enterprise database uses multiple columns retrieve part number sql utilize checks part number , if part number null checks kid part number best way of combining logic single ef model property (eg product.partnumber ) i invisible possible partnumber visible externally info api if using code-first approach way projection in custom linq-to-entities query: var products = context.products .select(p => new somenonmappedtype { id = p.id, // other fields partnumber = p.partnumber ?? p.child.partnumber // hope work }); if using edmx can utilize definingquery or queryview whole new entity readonly. more in another answer. c# asp.net-mvc-3 entity-framework-4.1

android - Images in ListView search results -

android - Images in ListView search results - i have listactivity launches task nail web service , display results in listview. each 1 of results has image id attached it. i wrote method image ids of rows displayed on screen (firstvisibleposition() lastvisibleposition()) , launch task query web service images display items. phone call method when list's scroll state becomes scroll_state_idle. makes user can scroll , task images visible rows not execute until scrolling stops, preventing looking images off-screen rows. my issue when results show in listview, can't find way phone call method image ids query for. apparently, calling method right after calling setadapter not work (i'm guessing because of listview's work happens asynchronously). using multiple adapter's (for reasons not pertinent post), need way of waiting list items show before phone call method ids. any ideas? after you've set adapter or called notifydatasetchanged() on ...

Adding element at the middle of scala.collection.immutable.Vector in Java -

Adding element at the middle of scala.collection.immutable.Vector in Java - i trying utilize scala's immutable.vector in java. can post simple java code this? this have tried till now. tried vector builder . tried vector.concat(seq<traversable <a>>) here sample of have tried: vector<long> part1= orignal.slice(0, indexofmid); vector<long> part2 = orignal.slice(indexofmid, orignal.size()); orignal= part2.appendfront(1l); vector <traversable<long>> vectoroftraversables = vector.empty(); vectoroftraversables.appendfront(orignal.totraversable()); vectoroftraversables.appendfront(part1.totraversable()); orignal= vector.concat(vectoroftraversables.toseq()); i getting next error exception in thread "main" java.lang.nosuchmethoderror: scala.collection.immutable.vector.concat(lscala/collection/seq;)lscala/collection/immutable/vector; is there improve totally different way this? or going wrong somewhere? this ...

debugging - How do I generate a SIGINT when using XCode to debug? -

debugging - How do I generate a SIGINT when using XCode to debug? - my console app traps sigint can exit gracefully. pressing ctrl+c within xcode while programme beingness debugged, though, has no effect. i can find process , utilize terminal window send sigint process, i'm hoping there's simpler solution can within xcode. the pause button of debugger console sends sigint app. if want create debugger pass signal app can following: press pause button of debugger , wait debug console gain focus type handle sigint pass , press enter press continue button now pressing 1 time again pause button of debugger console of xcode create sigint nail app. if don't want debugger stop sigint catched might want add together handle sigint nostop previous list. xcode debugging sigint

php - Real time loop issue -

php - Real time loop issue - i having problem archiving real time loop. while going next iteration, should check status first update ( status= 0 ) before going next iteration. status field might updated somewhere else... for example: <?php $sql = "select * info status = 0"; $query = $db->prepare($sql); $query->execute(); while ($row = $query->fetch(pdo::fetch_assoc)) { print_r($row); print("\n\n"); sleep(5); } ?> while php script running/looping, in mysql console, did: update info set status = 1 it still showing records have updated status. how can problem fixed? the result set computed once. if want see intermediate updates, need issue select statement. php mysql pdo

css - How to place a div on top of another div? -

css - How to place a div on top of another div? - i have layout looks this: http://img33.imageshack.us/img33/4637/unleddrawing.png it's table on cell @ top , 3 cells below. 3 cells 150px, auto, 200px. inside middle cell have div containing calendar. want able set div opacy on top of one, in order "blur" , create unusable process ajax request. i've tried styling opacy-div with position: absolute; margin-left:150px; margin-right:200px; width:100% but turned out width 100% 100% of entire screen, not cell. i've tried putting div underneath calendar div in code , styling with: position: relative; top: -100%; height: auto; but doesn't seem work @ since have no way of knowing how tall calendar be, can't determine height , how much should move up. any help much appreciated. //andreas you'd need set container div within blurrable cell, surrounding cell's contents. <tr> <td>...</td> <td> ...

html - adding button to top right of block level elements -

html - adding button to top right of block level elements - how add together button top right of block level elements? lets have : <div>some content here</div> and lets content long plenty create "block", how format have button @ top right of block, right next block is? (1) 1 way float button right @ top of container. <div><button>my button</button>some content here</div> div + button { float: right; } (2) way position button absolutely within div container , give div container position (so elements postioned absolutely within relative container). way button can anywhere in markup, providing within container. div { position: relative; } div button { position: absolute; top: 0; right: 0; } however, button on top of other content within container might have adjust padding etc. html css

asp.net mvc - How can I have multiple HtmlHelperExtensions in MVC3 -

asp.net mvc - How can I have multiple HtmlHelperExtensions in MVC3 - i created 1 file , added htmlhelperextensions class. public static class htmlhelperextensions { private const string nbsp = "&nbsp;"; private const string selattribute = " selected='selected'"; public static mvchtmlstring nbspifempty(this htmlhelper helper, string value) { var str = string.isnullorempty(value) ? nbsp : value; homecoming new mvchtmlstring(str); } etc... now add together more files more htmlhelperextensions. when error saying: duplicate definition: htmlhelperextensions is possible me have more 1 of these classes? just name class different. you're not allowed duplicate type names under 1 namespace. here's tutorial on creating custom html helpers: http://www.asp.net/mvc/tutorials/creating-custom-html-helpers-cs. asp.net-mvc

iphone - Derive a transform matrix given an image and the transformed image? -

iphone - Derive a transform matrix given an image and the transformed image? - i'm working on project involving finding paths using a* algorithm (thanks, patrick lester, great tutorial). series of png maps supplied, points of involvement specified coordinates received web service , problem show paths between points. bit of disaster @ first because various levels not located in same coordinate scheme , moving 1 level involved unintentional shift in x , y coordinates instead of changing z - making cost , heuristic of level alter strange, non-optimal paths beingness generated. to prepare have broken pathing calculation per-level solutions move new level intermediate, non-calculated step. instead chose create of level maps part of 1 coordinate scheme if @ lift on 1 level, lift nowadays on levels reaches @ same x , y coordinate. only problem coordinates of points of involvement used original maps. coordinates don't match meaningful on new maps. while confident path...

ssl - Validate X.509 certificate agains concrete CA Java -

ssl - Validate X.509 certificate agains concrete CA Java - lets have (client side code): trustmanager[] trustallcerts = new trustmanager[]{ new x509trustmanager() { @override public java.security.cert.x509certificate[] getacceptedissuers() { homecoming null; } @override public void checkclienttrusted( java.security.cert.x509certificate[] certs, string authtype) { } @override public void checkservertrusted( java.security.cert.x509certificate[] certs, string authtype) { } } }; sslcontext sslc = sslcontext.getinstance("tls"); sslc.init(null, trustallcerts, null); socketfactory sf = sslc.getsocketfactory(); sslsocket s = (sslsocket) sf.createsocket("127.0.0.1", 9124); this code finish functional, can not figure out, how validate server's certificate against 1 concrete ca certificate have available in pem file. all certificat...

python - Lancaster Or Porter -

python - Lancaster Or Porter - which of lancaster or porter best stemming ? porter stemmer old stemming? porter simple, if stemming huge amounts of data, it's not bad option. python nltk stemming porter-stemmer

asihttprequest - How to create .webarchive on iPhone? -

asihttprequest - How to create .webarchive on iPhone? - do know method create . webarchive file in iphone ? i using asiwebpagerequest download web page , want save in . webarcive format. you need check out great project - https://github.com/takebayashi/stwebarchiver iphone asihttprequest webarchive

e commerce - Script to create my own online store builder -

e commerce - Script to create my own online store builder - there online store building solutions shopify, volution, etc. i'm looking build own small-scale service that. are there customizable online store building scripts can install on own server or companies offer reselling opportunities? virtuemart simple e-commerce app clients have used successfully. it's based on joomla, still effective , easy tool deploy. i'll warn you, there's not ton of money made building e-commerce "services" resell. there's 1000000 , 1 people doing , takes lot of work right. not mention heartburn goes along payment processors , dealing fouled transactions, happens best of systems. people don't have ton of patience when comes credit card transactions , found myself doing tech back upwards @ worst possible times. these high maintenance apps if you're not doing yourself... e-commerce online-store

php - URL Rewrite, browser can't find my thumbnails -

php - URL Rewrite, browser can't find my thumbnails - i'm using php, mysql i've done research , found out relative links affected way url written (which kind of figure out anyway, out of instinct). images held in root folder of site images/category/image1.jpg old url: www.mysite.com/mypage.php?this=1&that=2 new url: www.mysite.com/keywords/this/that how can create relative path take consideration old url or there way redirect images requests images folder (done maybe in .htaccess also). or other solution. i'm keen on relative paths, no absolute path solutions please put link above rewriterule line existing files aren't affected rule: rewritecond %{request_filename} !-f there others can use: rewritecond %{request_filename} !-d # not directory rewritecond %{request_filename} !-l # not symlink more info @ http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html php url-rewriting

setting facebook app as home page -

setting facebook app as home page - i'm wondering how set app/iframe home page on facebook brand page similar how coca cola have achieved - http://www.facebook.com/cocacola i'm this not can accomplish through code , i've had through facebook developer documentation how using facebook interface. it's maze of unhelpfulness. what have there facebook application configured tab page. owner or admin of page can add together whatever tabs want, , create them default tab visitors not fans or admins of page. so here's how it: create facebook application, , create sure set version max width of 520px. in application settings configure tab page settings point @ narrow version of app. go application's profile page, , links on side select 'add page'., select page want add together app to. in page settings, set default tab app tab added. facebook

Jquery XML Parse URL Issue -

Jquery XML Parse URL Issue - i have been trying pull in names of albums picasa using jquery xml parser. when utilize "https://picasaweb.google.com" link function doesn't work. clues doing wrong? <script> $(document).ready(function() { $.ajax({ type: "get", url: "https://picasaweb.google.com/data/feed/api/user/userid?kind=album&access=visible", datatype: "xml", success: parsexml }); }); function parsexml(xml) { $(xml).find('entry').each(function() { $("#output").append($(this).find('title').text() + "<br />"); }); } </script> <div id="output"></div> you can cross domain requests (if server supports it) setting crossdomain:true (added in jquery 1.5) and/or by setting datatype:'jsonp' or else can create server side proxy can aj...

asp.net - Need help with Razor syntax in cart index view (Razor view engine) -

asp.net - Need help with Razor syntax in cart index view (Razor view engine) - at first utilize loved , felt much less cluttered webforms <%: %> etc. view engine, upon using farther can't help notice it's hypersensitive "{" parentheses placed , other scenarios. gives errors @ points older view engine not picky. for illustration below code produce error because form helper closing bracket } under </table> tag. if place higher above </tbody> works! don't need there because submit button input has nested within , don't want set button input table. @model carttest.models.cart @{ viewbag.title = "index"; } <h2>cart index</h2> <table width="80%" align="center"> <thead> <tr> <th align="center">quantity</th> <th align="left">item</th> <th align="right">price</th> <th ali...

ipad - objective-c accented characters inside a url request -

ipad - objective-c accented characters inside a url request - my app connects server asking info php script , shows these info on table. when select row datails shown total text. can read correctly on iphone , ipad display, can modify text , when send php script reads àìùòèé characters not correctly. the request sent in way nsmutableurlrequest *richiesta = [nsmutableurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.sito.it/iosphp/trame.php"] cachepolicy:nsurlrequestuseprotocolcachepolicy timeoutinterval:60.0]; [richiesta sethttpmethod:@"post"]; [richiesta sethttpbody:[[nsstring stringwithformat:@"trama=%@", self.trama.text] datausingencoding:nsutf8stringencoding]]; inside database (its collation utf8) see √ɬ® , other unusual things. how manage characters correctly? the default content-type of post application/x-www-form-urlencoded. means need percent encode value sending over. [[nsstring stringwithformat:@"...

What problems might I face keeping a directory under git and svn control? -

What problems might I face keeping a directory under git and svn control? - i've been running problems git-svn , , in searching solution stumbled across this page, in author decided utilize both git , svn, since both hold of of import info in .git , .svn directories. i suspect main problem type of workflow coordinating between svn , git, , making sure updates/commits happen in lockstep. thought of having workflow along these lines: git init svn checkout https://svn.myplace.com add together .svn .gitignore git add together . git commit -m 'initial commit' git checkout -b working hack, commit, hack, commit, hack, commit git checkout master svn update git add together . git commit -m 'svn update' git merge working master prepare possible conflicts svn commit wash, rinse repeat if stick workflow (and of course of study using other fancy git features), there issues might bite me, or seem pretty reasonable (based on fact repos here @ work sub...

Blender 2.5 Python video texture info -

Blender 2.5 Python video texture info - i load animated texture in blender 2.58 using python (see this question earlier): #setup world wtex = bpy.data.textures.new(name="worldtexture", type='image') # set world texture wrld = bpy.context.scene.world if wrld: slot = wrld.texture_slots.add() slot.texture = wtex slot.use_map_horizon = true img=bpy.data.images.load(filepath='\\vtex.avi') if img: slot.texture.image=img how can number of frames in video (img)? blender when loading texture gui, didn't find way create python. use img.frame_duration ; gives total number of frames in video. python video textures blender blender-2.50

Silverlight: Setting an Image source to MemoryStream -

Silverlight: Setting an Image source to MemoryStream - my application receives jpeg file memorystream webservice. need assign image image.source. how can done? in here described: void proxy_getimagecompleted(object sender, getimagecompletedeventargs e) { memorystream stream = new memorystream(e.result); bitmapimage b = new bitmapimage(); b.setsource(stream); imgimage.source = b; } silverlight

paypal - How to create a website where people have to pay to see the content of some pages? -

paypal - How to create a website where people have to pay to see the content of some pages? - i want create website users have total access each page if pay me fee. i don't know how read credit card, utilize paypal or similar, how ? and need pay taxes or because i'm getting money ? note: i'm not in us, i`m romania) ? i suggest using combination of paypal , dbms. work flow such: your client should fill out form, such desired username , password. your client clicks link directs them paypal, or fills out credit card info on site (using website payments pro). process transactions using paypal's api. here helpful developer links: api integration summary paypal api reference depending on integration, paypal homecoming success or failure if customer's payment verified. depending on integration, upon success, can extract client information, such name, address, etc. , save dbms, including customer's username , password. now, whenever ...

visual studio 2010 - Optimal Windows C tool stack -

visual studio 2010 - Optimal Windows C tool stack - i planning bigger c-only project. should run on both linux , windows. question is, optimal development stack (compiler, ide) on windows? problem is, utilize c99 (if possible). on linux it's quite easy because combination gcc+vim+git optimal. on windows? i concerning: visual studio 2010 (no c99 support), mingw , intel c++ compiler . how compare each other in terms of performance? for ide, i've happily used vc++, monodevelop, , code::blocks (the latter 2 cross-platform, plus). c isn't hard language create ide for, work , it'll come downwards personal preference. for compiler... c quick compile on of them, guess performance mean of generated code? in experience, intel c++ optimizes best if you're targeting intel cpus. mingw gcc optimizes best else. vc++ optimizes good, not quite much gcc or icc. of course of study in general sense -- i've had plenty experiences vc++ bests them both....

sql server 2008 - Rename Excel Sheet Name in SSIS Package -

sql server 2008 - Rename Excel Sheet Name in SSIS Package - sql 2008 / vs 2008 i exporting excel sheet sql database. bundle called c# application. as sheet name varies excel sheet excel sheet, bundle fails. have written query within bundle follows .. select colum1,column2 'sheet1$' this query exports info sql database. if able rename first sheet tab of excel sheet sheet1, not having problem on exporting sql db. the simplest solution utilize script task rename sheet. alternatively, write script component output info straight c# without altering workbook or using sql. sql-server-2008 ssis

website - downloading morningstar webpages for screenscraping -

website - downloading morningstar webpages for screenscraping - i'd able screenscrape morningstar webpages. morningstar provides info mutual fund routinely haven't been able find elsewhere, ie total homecoming compared against benchmark total homecoming compared against peers percentile ranking here's example: morningstar example as prelude screenscraping, need able download webpage desired content. unfortunately, when seek using java se6 or wget retrieve above illustration link, portion of html (the tables displaying total homecoming figures absent). same result, if utilize browser (chrome), save page html only. notice if utilize browser save finish page (html, js, css, , else) downloaded html contain interesting information. i have 2 questions: how can programmatically download entire html file? though i'm writing programme in java, don't mind invoking external tool. why aforementioned attempts not yielding html expecting? tha...

zend framework - Zend_Paginator stopped working -

zend framework - Zend_Paginator stopped working - i'm learning zend framework. had zend_paginator working array adapter, i'm having problem using zend_paginator::factory static method. problem pagination command links send me right url, results disappear when click next or page 2, 3, etc. i have 2 tables database: file table , origination_office table. file table has client's names, address, etc. , origination office stores office names (like tampa, sarasota, etc.). each file associated origination office. my controller: public function searchaction() { $searchform = new application_form_searchform(); if ($this->_request->getquery()) { if ($searchform->isvalid($this->_request->getparams())) { $officename = $this->_request->getparam('officename'); $page = $this->_request->getparam('page'); } $filetable = new application_model_dbtable_file(); $this->vi...

java - VisualVM Not showing ANY methods called for CPU Performance Profiling -

java - VisualVM Not showing ANY methods called for CPU Performance Profiling - i'm running java 1.6_21 sdk build app. been build in eclipse, , i'm using vistualvm eclipse plugin launch visualvm when app starts. when go profile tab , click cpu profiling, shows threads running, doesn't show method calls. quite litterally, none. i've googled whole bunch of things, nil seems fit. has seen problem? there solution?? environment: windows xp 32-bit "classic" eclipse sdk 3.7.0 visualvm sdk 1.6_21 it doesn't create sense me. can memory heap information, 0 member-calling information. any help extremely appreciated. have tried setting classes profiled. select settings checkbox in top right cornet of window & set packages needs profiled. java visualvm

cocoa touch - iOS Slide an UIView (Menu) from a side in another View -

cocoa touch - iOS Slide an UIView (Menu) from a side in another View - i want slide in menu side in view after buttonclick event. after buttonclick menu should slided out big view... i experimented catransition can't solve problem... catransition *animation = [catransition animation]; [animation setduration:1]; [animation settype:kcatransitionpush]; [animation setsubtype:kcatransitionfrombottom]; [animation settimingfunction:[camediatimingfunction functionwithname:kcamediatimingfunctioneaseineaseout]] ; [[menuview layer] addanimation:animation forkey:@"@asdf"]; [menuview setcenter:cgpointmake([menuview center].x, [menuview center].y + 450)]; it work bit, did not understand why.. :-/ if want implement 1 way can go create custom view , add together button click event button in view controller. also create boolean variable identify whether custom view visible or not. on click, if menu view not visible, this: -(void)viewdidload { ... ...

mysql - How to copy fields from one table to another -

mysql - How to copy fields from one table to another - i have searched , tried have failed , wondering if help unusual twist copying info 1 table another. i collecting info own weather station piece of software written else in c. have had @ open source code hard read uses lot of single character variables etc. writes info mysql database table in sequential format this:- create table readings ( `date` timestamp not null default current_timestamp on update current_timestamp, `name` text not null, `value` double not null, `id` int(11) not null auto_increment ) where each sensor reading stored on seperate row. name denotes sensor name such temperature sensor or raingauge, windspeed sensor etc, etc. sensors updated every min on minute. problem finding way of storing info makes extremely hard perform queries on have include lot of conditionals in query, such checking 'name' field "rgc1" raingauge counter etc. complicates things rainga...

c# - Multiple DbContexts in N-Tier Application -

c# - Multiple DbContexts in N-Tier Application - i'm creating first n-tier mvc application , i've run road block how manage multiple dbcontexts database first approach. i have next layers presentation service (wcf) business info access i don't want entity framework reference in service layer don't see how create interface or manage 2 contexts. have working single context warpped in idatabasefactory can't seem find approach manage two. below unitofwork created in service ctor every way @ i'm still tied sitemodelcontainer , when in fact have context. public class unitofwork : iunitofwork { private sitemodelcontainer _context; private readonly idatabasefactory _databasefactory; protected sitemodelcontainer sitecontext { { homecoming _context ?? (_context = _databasefactory.get()); } } public unitofwork(idatabasefactory factory) { _databasefactory = factory...

java - liferay on tomcat don't load a class -

java - liferay on tomcat don't load a class - i'm making portlet on liferay deployed on jboss. today changed library , starts happens problem. when deploy portlet have restart liferay otherwise have exception: 17:09:36,325 error [dispatcherportlet:554] not finish request java.lang.nullpointerexception @ org.apache.catalina.loader.webappclassloader.findresources(webappclassloader.java:1245) @ java.lang.classloader.getresources(classloader.java:1041) @ org.apache.commons.logging.logfactory$4.run(logfactory.java:1317) @ java.security.accesscontroller.doprivileged(native method) @ org.apache.commons.logging.logfactory.getresources(logfactory.java:1336) @ org.apache.commons.logging.logfactory.getconfigurationfile(logfactory.java:1398) @ org.apache.commons.logging.logfactory.getfactory(logfactory.java:417) @ org.apache.commons.logging.logfactory.getlog(logfactory.java:645) @ org.springframework.security.portlet.portletauthenticationdetail...

.net - MSMQ service does not recover when restarted with Recoverable message on queue -

.net - MSMQ service does not recover when restarted with Recoverable message on queue - i have private, non-transactional message queue running on win2008 r2. queue breaks when following: place recoverable message on queue so: message msg = new message { body = "hello", formatter = new xmlmessageformatter(), label = "notification", recoverable = true, appspecific = 123 }; mq.send(msg); do not retrieve message! restart message queue service the service not restart. next message logged in event viewer: the message queuing service cannot start because queue in inconsistent state. more information, see microsoft knowledge base of operations article 827493 @ support.microsoft.com. points note: a message added queue way can retrieved queue before restart. the way can queue running 1 time again follow these instructions: msmq inconsistent state after restart prevents message recovery. if leave message.recoverable = false service re...

Is there a way to paste together the elements of a vector in R without using a loop? -

Is there a way to paste together the elements of a vector in R without using a loop? - say there's vector x: x <- c("a", " ", "b") and want turn single string "a b". there way without loop? know loop this: y <- "" (i in 1:3){ paste(y, x[i], sep = "") } > y [1] "a b" but need on many, many iterations, , having loop on , replace original new each time become time consuming. want able this: x <- paste(x) as if paste() smartly split elements of vector itself, know can't. there function, or more creative way utilize paste(), can accomplish efficiently? you need utilize collapse argument: paste(x,collapse="") r paste memory-efficient

Collapse for Swing -

Collapse for Swing - i have jtextarea in panel set string many lines. wanna first lines (5 first lines, example) , create collapse lines. can help me? swing collapse

c++ - How to factorize code properly? -

c++ - How to factorize code properly? - i've basic programming question. imagine i've 2 functions definition practically same except vary in internal binary condition. rest of code in both functions practically same. in order have readable , easy-to-maintain code, wondering whether there's improve solution other using bool parameter selects operation mode of functions? there design-pattern that? in code below, i'm illustrating uncertainty 2 functions named doa() , dob() . dots ( .... ) correspond code same both functions. created new donew() function additional boolean parameter chose appropriate functionality. however, note although possible solution, it's still inefficient because of duplicated code within body of both if conditions. void doa( ..... ){ ..... ..... if(x!=y){ .... .... .... } ..... } void dob( ..... ){ ..... ..... if(x==y){ .....

osx - No TUI support for gdb on Mac? -

osx - No TUI support for gdb on Mac? - i'm trying utilize tui mode in gdb on mac , reason doesn't recognize "-tui" flag. i install latest version can't find mention of tui not working in older versions, swondering if perhaps i'm doing wrong. how can utilize tui on mac? gdb can built without tui, , may case. compile gdb yourself, , enable tui in configure. or, compile cgdb, tui. how install cgdb http://lists.apple.com/archives/xcode-users/2009/jul/msg00194.html letter says: but apple gdb built feature /tui/ disabled. osx gdb

opengl - How to call a function of type Ptr GLubyte -> IO() in Haskell -

opengl - How to call a function of type Ptr GLubyte -> IO() in Haskell - in opengl raw library next function: glpolygonstipple :: ptr glubyte -> io () the c counterpart function accepts pointer array, how can phone call function array/list in haskell program? you'll utilize mallocarray allocate memory , pokearray set list it: http://hackage.haskell.org/packages/archive/base/latest/doc/html/foreign-marshal-array.html#v:mallocarray something like: do arrayofglubytes <- (mallocarray 15) :: io (ptr glubyte) pokearray arrayofglubytes [1,2,3,4] glpolygonstipple arrayofglubytes free arrayofglubytes -- free foreign.marshall.alloc opengl haskell ffi

jquery - What's the best way to implement recurring events in FullCalendar via PHP/MySQL? -

jquery - What's the best way to implement recurring events in FullCalendar via PHP/MySQL? - i'm getting ready utilize jquery-based fullcalendar in online app using php/mysql , noticed when implementing recurring events, must place new item in event array each recurrence (using same id), this: events: [ { id: 999, title: 'repeating event', start: new date(y, m, d-1, 16, 0), allday: false }, { id: 999, title: 'repeating event', start: new date(y, m, d+6, 16, 0), allday: false }, { id: 999, title: 'repeating event', start: new date(y, m, d+13, 16, 0), allday: false } ] okay, that's not big deal. using mysql, i'll feed in event looped bunch of times, maybe 100 in future start date of event if doesn't have end date. i'm loading page bunch of javascript might not needed (if user opens calendar see 1 month). not ...

jquery - Specifying the styles for the selected tab in a navbar -

jquery - Specifying the styles for the selected tab in a navbar - i have next html code <!doctype html> <html lang="en"> <head> <meta name="viewport" content="width=device-width; initial-scale=1.0" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script> </head> <body> <div data-role="page" id="home"> <div data-role="header" data-theme="b"> <h1>test</h1> </div> <div data-role="content" data-theme="d"> <div data-role="navbar"...

objective c - Iphone : How to Display Document Directory images in Image View? -

objective c - Iphone : How to Display Document Directory images in Image View? - in app images stored in document directory folder, i wanted particular image display in image view, how image display in image view document directory ? sample code: - (nsstring *)applicationdocumentsdirectory { homecoming [nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) lastobject]; } -(void)loadimage{ nsstring *workspacepath=[[self applicationdocumentsdirectory] stringbyappendingpathcomponent:@"your image-name"]; uiimageview *myimage=[uiimageview alloc] initwithframe:cgrectmake(0,0,20,20)]; myimage.image=[uiimage imagewithdata:[nsdata datawithcontentsoffile:workspacepath]]; [self.view addsubview:myimage]; [myimage release]; } tnq iphone objective-c cocoa-touch ios4