Posts

Showing posts from April, 2010

asp.net mvc 3 - MVC3 search usercontrol -

have partial view in website, shared among many pages, searching functionality, consisting of: date date file type file name now,the problem is, in pages dont want file type included, in other pages dont want ( from-to ) date criteria included what should do? should create partial view each functionality? or show/hide criteria within? _filters.cshtml @model entities.filteroperations <table width="85%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td class="formtit"> start date </td> </tr> <tr> <td>@html.textboxfor(m => m.startdate, new { @class = "date" }) </td> </tr> <tr> <td class="formtit"> end date </td> </tr> <tr> <td>@html.textboxfor(m => m.enddate, new { @class = "date" }) </td> </tr> <tr> <td class="formtit"> file type </td> ...

iphone - OpenGL ES 2.0 texture distortion on large geometry GL_REPEAT -

opengl es 2.0 has serious precision issues texture sampling - i've seen topics similar problem , haven't seen real solution "distorted opengl es 2.0 texture" problem yet. this not related texture's image format or opengl color buffers, seems it's precision error. don't know causes precision fail - doesn't seem it's size of geometry causes distortion, because scaling vertex position passed the vertex shader not solve issue. here examples of texture distortion: distorted texture (on opengl es 2.0): http://i47.tinypic.com/3322h6d.png what texture looks (also on opengl es 2.0): http://i49.tinypic.com/b4jc6c.png the texture issue limited small scale geometry on opengl es 2.0, otherwise texture sampling appears normal, grainy effect gradually worsens further vertex data origin of xyz(0,0,0) these texture issues not occur on desktop opengl (works fine under windows xp, windows 7, , mac os x) i've seen problem occur on android, iphone, or w...

Android layout_weight inconsistency -

Image
my app should this: how should look, though way had before wasn't scaling well. that's why doing this, giving me lots of problems. but seemingly identical setups, second row takes of room, making this: any explanation why doing this? beats me. here xml, solutions? <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayout02" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:weightsum="7.0" > <linearlayout android:id="@+id/linearlayout03" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1.0" > <imageview android:id="@+id/terranlogo1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight=...

php - Login script using PDO extension not working -

i unsure if doing started working pdo , not able code work. continue error "sorry not connect" , unable figure out wrong. included below code using: function dorun( $data ) { try { $db = new pdo('mysql:host=localhost;dbname=testdata', 'root', 'root'); $db->setattribute(pdo::attr_errmode, pdo::errmode_exception); $stmt = $db->prepare(' select username, pass testtable username = :name , pass = :pass '); $stmt->bindparam(':name', $username, pdo::param_str); $stmt->bindparam(':pass', $pass, pdo::param_str); $stmt->execute(); //$result = $stmt->fetchall(pdo::fetch_assoc); $result = $stmt->fetchcolumn(); if($result == false) { echo 'sorry not connect'; } else { $_session['username'] = $user; echo 'logged in as' . $user; } } catch (pdoexception $e) { echo "throw"; } $db = null; } this give 0 rows seems $username , $pass not defined: $stmt->bindparam(':name', $...

vba - How to change the name of the document in Excel? -

i have macro enabled template called tip-pbi.xltm. when create document based on template, excel automatically names tip-pbi1. however, want give custom name. i figured modifying .title property of workbook. end, on startup workbook_open event kicks off, , following executed: private sub workbook_open() dim strpbi string strpbi = inputbox$("enter pbi", "enter pbi") thisworkbook.title = "tip-pbi-" & strpbi end sub however, nothing. how can change title of document on startup? the way change workbook name save ( ref ) thisworkbook.saveas thisworkbook.path & "" & filename & ".xls" if want suggest name use getsaveasfilename or application.filedialog(msofiledialogsaveas).initialfilename = thisworkbook.path & "" & filename & ".xls"

objective c - Overlapping table cells animation -

Image
i made table custom cells. every cell i've created animation move current clicked cell up. problem in current animated cell has example index row 2 , goes parent cell index 1. i'd animated cell in front of parent. if scroll table down more 480px size of iphone screen , click again same cell index row 2 cell fine overlap parent cell. problem shown in picture below. you need cell , bring front in view hierarchy. however, getting cell not obvious: can't call tableview:cellforrowatindexpath: in controller because dequeue or create new cell. need instead call cellforrowatindexpath: on table view , bring front before start animation. uiview* thecell = [tableview cellforrowatindexpath:someindexpath]; [thecell.superview bringsubviewtofront:thecell]; you can safely cells want animate, because returns nil if not visible on screen.

eclipse - Debugging java file compiling (using gwt) -

i asked in precedent question more precise compilation error message. here's fact : know nothing gwt , java. following docs, tried compile java files web project had been precedently developed using gwt. so, test , understand how work, took java folder (that had been precedently compiled appropriate tool) src folder of web app project in ide eclipse when running compiler using command gwt compile, had message error : compiling module java.org.primagora validating newly compiled units ignored 5 units compilation errors in first pass. compile -strict or -loglevel set trace or debug see errors. finding entry point classes [error] unable find type 'org.client.primagoraentrypoint' [error] hint: check type name 'org.client.primagoraentrypoint' meant [error] hint: check classpath includes required source roots when @ error on file, example java.org.client.primagoraentrypoint, find error when declared "package org.client" @ beginning of file. there seem error ...

vbscript - OPENROWSET / Joining data in a text file with data in a SQL Server table -

Image
my goal join data in text file data in table. (this follow-on question 1 asked few hours ago, , pondlife kindly helped me with.) i getting following error: "the connection cannot used perform operation. either closed or invalid in context." is syntax correct? mistakes quotes? have made other mistakes? set connectionresult = createobject("adodb.connection") set recordsetresult = createobject("adodb.recordset") recordsetresult.open "select rscsv.*, rsse.[terms] dbo.terms rsse inner join openrowset (""microsoft.jet.oledb.4.0"", ""c:\users\public\testinvoicefile.csv"";extended properties=""text;hdr=yes;fmt=csvdelimited"") rscsv on rscsv.[po number] = rsse.[order number]", connectionresult until recordsetresult.eof wscript.echo "po#: " & recordsetresult.fields.item("po number") & "terms: " & recordsetresult.fields.item("terms") recordset...

c - How do I use Minizip (on Zlib)? -

i'm trying archive files cross-platform application, , looks minizip (built on zlib) portable archivers come. when try run following dummy code, however, system error [my executable] has stopped working. windows can check online solution problem. can me see how use library? — (there's no doc or tutorial anywhere can find) zip_fileinfo zfi; int main() { zipfile zf = zipopen("myarch.zip",append_status_addinzip); int ret = zipopennewfileinzip(zf, "myfile.txt", &zfi, null, 0, null, 0, "my comment interior file", z_deflated, z_no_compression ); zipclosefileinzip(zf); zipclose(zf, "my comment exterior file"); return 0; } specs: msys + mingw, windows 7, using zlibwapi.dll zlib125dll.zip/dll32 since found question via google , didn't contain complete, working code, providing here future visitors. int createzipfile (std::vector<wstring> paths) { zipfile zf = zipopen(std::string(destinationpath.begin(), destinationpath.end()...