Posts

Showing posts from January, 2014

android - Mystery! One of my .xml layout resources is just not being detected! What's going on? -

update: solved, i'm idiot, thank everyone! okay little bit weird.. created layout file list items, can see there now, in res/layout folder. it's called itemlistbudget.xml. inside i've declare 2 id's, catitem , budgetamount can see here: http://pastebin.com/zv0wr9l0 (it'll take second at) so i'm trying bind data sqlite table list! here's method: // private static int[] = { r.id.catitem, r.id.budgetamount, }; private void showbudgetoutcome(cursor cursor) { //set data binding simplecursoradapter adapter = new simplecursoradapter( this, r.layout.itemlistbudget, cursor, from, to,); setlistadapter(adapter); } now i'm being told r.id.catitem cannot resolved . r.id.budgetamount cannot resolved , of course r.layout.itemlistbudget cannot resolved . why on earth be? i have error message saying setlistadapter(adapter) undefined , think that's caused problem above right? if in eclipse try clean

javascript - PHP & JS numeric and assoc arrays index trouble -

this problem trivial 99% of you. far tried avoid situation this, don't have choice. for php: $array = array(); $array[5] = 'element'; $array['s_5'] = 'alternative element'; $array[7] = 'element2'; $array['s_7 '] = 'alternative element2'; js var array = new array(); array[5] = 'element'; array['s_5'] = 'alternative element'; array[7] = 'element2'; array['s_7 '] = 'alternative element2'; and need secondth element of array. how it? of course create table containing array keys each element, or use foreach/while , action on specific element. can last array element in php using end(), there other, faster way specific element random array (implying don't know keys , length of array)? thanks helping me. you might want use 2 dimensional array instead: $matrix = array(); $matrix['elements'] = array(); $matrix['alt_elements'] = array(); $matrix['elemen

c# - Silverlight: Difficult with Data Binding -

apparently don't understand binding listbox controls data. here listbox binds property in code-behind: <listbox itemssource="favoritefilters" x:name="favoritefilterslist" visibility="{binding favoritefilters.isempty, converter={staticresource visibilityconverter}}"> <listbox.itemtemplate> <datatemplate> <my:favoritefilterlink /> </datatemplate> </listbox.itemtemplate> </listbox> when this, listbox appears single element populated fallback values, though items source empty. happens no matter set itemssource to, itemssource="totallyinvalidproperty" . however, if itemssource empty, listbox disappears. the code behind: public observablecollection<favoritefilter> favoritefilters { { return plumdata.favoritefilters;

c++ - C# - gui question -

does know if there libraries or components written in c# (or c++) allow create gui similiar 1 used in adobe products (photoshop, after effects, etc) ? thank you. if you're looking way build slick, themeable guis, take @ wpf .

flash - swfbridge and large files -

i have c project i'm using alchemy . project has post-build command-line tests i'd run using swfbridge. these tests run, they're extremely slow. problem read moderately large files (~3mb) memory. running these same tests same files via regular alchemy (e.g., not using swfbridge using supplyfile as) fast. i think bottleneck swfbridge. more specicially, in way swfbridge loads files. reads them in , transmits them in 1024 byte chunks across localhost connection main alchemy swf. (you can see happening in swfbridge.log.) my question is: there way make swfbridge more efficient? can make use different chunk size, example? here example of file-reading code. if give code ~3mb file run very slowly. #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> size_t filesize(const char filename[]) { struct stat stbuf; if (stat(filename, &stbuf) == -1) { fprintf(stdout, "file_size: can't find %s\n...\n", file

TextMate New File Keyboard Shortcut -

is there keyboard shortcut in textmate create new, blank file in project? basically, same thing clicking new file + icon @ bottom of project drawer. for textmate 2, alt + ⌘ cmd + n open new file. saving launch new file dialog. for textmate, shift + ⌘ cmd + n launch new file dialog, when you're in project. before doing either, may chose create new file using keyboard arrows , navigating through directory tree. use shortcut when in directory want file created.

php - Preparing GD dynamic image for upload -

how can prepare dynamic image created gd upload? i created php script create dynamic images based on userid (ex: www.mywebsite.com/image/124.png <== should show user 124 info) now need upload facebook script : $photo_details = array( 'message'=> $message ); $file = "$_get[id].png"; $photo_details['image'] = '@/home/username/public_html/image/' . $file; $upload_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details); when use upload script way error: fatal error: uncaught curlexception: 26: failed creating formpost data but if uploaded 124.png /image/ directory , and tried same code again using id 124 works fine. after long research came conclusion problem relay in dynamic part since works fine static images. how can solve problem? thank help. looks script tries read file directly filesystem instead of running image generating script. can solve setting $photo_details['

Rails 3.03 and Rails 2.38 -- can they work together? -

is there way install rails 2.3.10 app if have rails 3.0.3 installed on machine? for example i'd start server ruby script/server instead of rails server. thx two main ways: bundler : can create gemfile , use bundler silo gems each of installations. drawback 1 you'll have use "bundle exec command " whenever want run command version of rails you're using, such spec or cucumber rvm : using rvm can use not different versions of ruby, separate gemsets within version of ruby. use method of time, creating gemset called "rails3" , "rails2" (or use gemset application) relevant gem versions in it. can have many gemsets want , switch between them. stick .rvmrc file in root of application, , rvm switch version of ruby , gemset automatically.

.net - Store rarely changed data but frequently accessed, which is solution? -

my oracle database contains simple, rarely-changed data (it takes months or years change). it's accessed (hundred times/day). think continuously access in database expensive. edit: i'm thinking alternative way store data, not in database, example, store in app's cache, i'm confused data consistency. how can efficiently? edit: original question quite general. want explain clearer: i have table contains: minvalue maxvalue packageid 1 4 1 5 10 2 11 50 3 when client send request our service, send amount, our service has determine package request belong to. depends on amount, , may changed due business needs (as mentioned before, it's changed). i use query this: select packageid vmeet_temp amount between minvalue , maxvalue yes, work. since i'm inexperienced programmer, doubt if there's more efficient way archive this. so question is: our need, should s

design - wire framing tool that supports animation and states? -

are there wire framing tools support basic animation, simulate carousel? or navigation between slides etc? i think should try axure wireframing tool simple animation mentioned licensed version costly.. http://www.axure.com/

Would people like a Flash to C# Converter? -

i wondering if there demand flash c# converter. convert assets , code swf, , output .png/.mp3/.avi , .cs files, can compile them. you input swf, choose few options, it's thing. make target desktop/dx, desktop/opengl(for mac , linux), mobile/win7, mobile/monotouch. i have managed read through swf file format, , have gotten useful information it. so, point this: going take while write, , big task. should go ahead project, or find more useful. go it. if open source it, programming , end-user world possibly better place because of it. caveat: read copyright stuff carefully . java, many used believe more or less open, showed not infinitely when google created of own java runtime android.

keeping track of QA's progress -

right keep track of bugs found qa using our bug tracking system, have no way of tracking/sharing tests have been executed qa. any solution this? as mark mentioned, test (case) management system fit. list of open source tools, take @ this site . if consider commercial tool, feel free take @ our tool testrail . http://www.gurock.com/images/feature/testrail-screenshot-v2.png

ios - Decoding word-encoded Content-Disposition header file name in Objective-C -

i trying retrieve file name can't represented in ascii content-disposition header. this file name word-encoded. below encoded file name: =?utf-8?q?=c3=abst=c3=a9_=c3=a9_=c3=bam_n=c3=b4m=c3=a9?= =?utf-8?q?_a=c3=a7ent=c3=baad=c3=b5.xlsx?= how decoded file name (that "ësté é úm nômé açentúadõ.xlsx")? ps: looking objective-c implementation. you want search mime handling framework, searched online , came nothing, so.... i couldn't find example online, i'm showing algorithm here. it's not best example since i'm making big assumption. being string utf-8 q-encoded. q-encoding url-encoding (percent-encoding), foundation's nsstring has support decoding. (practical) difference when decoding (there bigger differences when encoding) % encodings = encodings instead. then there's lead-in , lead-out stuff. each encoded block has format =?charset-name?encoding-type? ... encoded string here ... ?= . should read charset name use enco

javascript - jQuery JSON get issue -

i trying fetch information json file nothing comes in data variable. can tell me doing wrong. json file downloaded there no problem me not getting server. function handle_geolocation_query(position) { var url = "http://ws.geonames.org/findnearbyweatherjson?lat=" + position.coords.latitude + "&lng=" + position.coords.longitude + "&callback=?"; $.getjson(url, function(info){ var clouds = info.weatherobservation.clouds; var weather = info.weatherobservation.weathercondition; var temp = info.weatherobservation.temperature; var humidity = info.weatherobservation.humidity; }); //console.log(clouds); document.getelementbyid('result').innerhtml = "c:" + clouds + ", w:" + weather + ", t:" + temp + ", h:" + humidity; } appreciate help. lot. you should try placing code modifies innerhtml within callback. remember js has function scope. can'

linux - Android OS kernel related queries -

i looking write case study on android's kernel. part of curriculum in advanced operating systems class. primary focus wanted actual implementation of how priority queues implemented in rtos relate theory have studied in class. came know finding information big task rather having great idea. :( want limit myself either 1. kernel (either process or memory) specific or 2. difference in android , linux os have observed though have information on both of them data given can seen in text book. wanted practical difference. i hope getting pointers in direction. the android linux kernel , mainline linux kernel close. there several key differences: android has major wakelock patches applied. these not mainline. google should reveal years of , forth on issue. android has binder security model, mainline not. android has new framebuffer support surfaceflinger. hardware support phones. mainline kernel not have direct support of arm processors , devices. consider android ke

Redirect/block WordPress URLs with the /?p=x structure. Eg. site.com/?p=2 -

i'm building site hashed permalinks can email test.com/aedoiu2348791lkd style url client. it's provide level of privacy without need log in or dick around passwords. unfortunately, wordpress redirects url ?p=x url structure: so mysite.com/?p=2 redirects to mysite.com/about obviously, hashed url pretty useless when can run through /?p=xx , see every post , page i've ever made. is there way stop wordpress redirecting type of link , either throwing 404 or redirecting homepage? i want page accessible "proper" mysite.com/asdfghj-page style of url. solution ...sort of added top of .htaccess <ifmodule mod_rewrite.c> rewriteengine on rewritecond %{query_string} /?p=(\d*) rewriterule ^$ *? [r=404,l] </ifmodule> i don't it... works. ideally redirect wordpress 404 page, however.

openxml sdk - How to retrieve Open XML Relationships? -

i'm using open xml sdk 2.0 open excel file. when open .rels file (from .xlsx/.zip) can see relationships defined. how can list of these relationships in code? spreadsheetdocument.parts , workbookpart.parts

ios - Problems Trying to Find User Location in MKMapView -

Image
i having problems trying user's current position display on mkmapview. here relevant code: header: // parkingmapviewcontroller.m #import <uikit/uikit.h> #import <mapkit/mapkit.h> @interface parkingmapviewcontroller : uiviewcontroller <mkmapviewdelegate, cllocationmanagerdelegate> { mkmapview *mapview; cllocationmanager *locationmanager; } @property (nonatomic, retain) iboutlet mkmapview *mapview; @property (nonatomic, retain) cllocationmanager *locationmanager; -(void)loadannotations; -(void)showcurrentlocationbuttontapped:(id)sender; @end implementation(partial): // parkingmapviewcontroller.m - (void)viewdidload { [super viewdidload]; self.navigationitem.rightbarbuttonitem = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:100 target:self action:@selector(showcurrentlocationbuttontapped:)]; [self loadannotations]; cllocationcoordinate2d centercoord = { ucd_latitude, ucd_longitude }; [mapview setcentercoordinate:

c# - How to make values transfer between multiple threads -

i have 2 threads: thread 1 fetching xml web service in loop. thread 2 parsing xml fetched thread 1 , showing in ui. please tell me best way pass xml data thread 1 thread 2 it’s retrieved thread 1? thread 1 fetching xml , thread 2 consuming it. to have created circular linked list , thread 1 puts xml there in linked list , thread 2 gets xml , remove list, , it’s working fine. please tell me if there other better approach using. looks need producer-consumer quequ

How to make CMD say something? -

i need create .cmd file, , when execute it, opens cmd , shows whatever typed in file. like (of course fake) scanning.....c:/windows scanning.....c:/ scanning.....ports etc,so says whatever want. also, there way have interval of when says something? like: scanning..... (5secs after) scanning.... is possible? if so, how? echo textgoeshere or echo "hey look, text" will output text. pause will wait user press key , prompt "press key continue". sleep 5 will pause 5 seconds. however, of windows vista, sleep seems no longer included in default set of commands. supposedly this: http://www.microsoft.com/downloads/en/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en contains sleep.exe file you'd need this.

Android: How to fit large fonts into a small button? -

task: fit large characters small button. problem: noticed when create button using non-alpha characters such -, +, =.. etc, there lot of "padding" below , above text, when increase font size. when use alpha characters, appears fine. ie. happens _ __ _ __ _ _ |                | |                | |      _ __      | |    | _ __ |    | |                | |                | | __ _ __ _ __ | when want this.. _ __ _ __ _ _ |      _ __      | |    | _ __ |    | | __ _ __ _ __ | rectangle in middle big giant dash. i have tried setting padding zero, doesn't work. ideas? padding in font not in drawing system in android ! can : 1- add typeface font dealing such typing purposess 2- or try create own font can use private character edit in xp more info take on : http://www.techtipsgeek.com/design-font-characters-own-choice-windows-xp/1621/ 3-better practices, try use images typing patters. but note when make working, use shipped typeface font application

move - Moving submodules with Git -

this question has answer here: how move existing git submodule within git repository? 10 answers is there way move submodules within superproject without removing them first , re-adding them ? it's similar how removing submodule (see how remove submodule? ): edit .gitmodules , change path of submodule appropriately, , put in index git add .gitmodules if needed, create parent directory of new location of submodule: mkdir -p new/parent move content old new directory: mv -vi old/parent/submodule new/parent/submodule remove old directory git rm --cached old/parent/submodule looks me afterwards: # on branch master # changes committed: # (use "git reset head <file>..." unstage) # # modified: .gitmodules # renamed: old/parent/submodule -> new/parent/submodule # finally commit changes.

spring.net - Spring .NET, WCF and Singletons -

it appears there's issue integrating spring .net wcf getting singleton semantics. looked around bit on net couldn't find conclusive. has used spring.net wcf service instance context mode has been set single, concurrency mode set multiple , object definition in spring configuration marked singleton? check spring documentation : http://www.springframework.net/doc-latest/reference/html/wcf.html "the object must declared 'prototype' object, i.e. not singleton, in order interact correctly wcf instancing." hth

linux - How to capture process output in C? -

is there analog of php's system in c? man system says, system return status of command, need output (like in php). of course, can use pipes this, there standard way? you can make use of popen , related function as: // command run. char *cmd = "date"; // open pipe stream. file *fp = popen(cmd,"r"); int ch; // error checking. if(!fp) { fprintf(stderr,"error popen %s\n",cmd); exit(1); } // read process , print. while((ch = fgetc(fp)) != eof) { putchar(ch); } // close stream. pclose(fp); ideone link

ios - ALAssetRepresentation URL 'persistence' lifetime? -

quick question: how long alassetrepresentation url (its 'url' property) guaranteed point same asset? the documentation describes 'persistent' mean persistent on single sync, persistent until new photos added, persistent until old photos deleted, or what? if build database associates photo elements in camera roll/photo library data in application using alassetrepresentation url's, these associations continue work forever, if photos moved or renamed? from observations, if delete photos/videos camera roll, 1000000007, assuming current last id 1000000008, next saved item not reuse identifier, rather 1000000009. however, if last image deleted (1000000008) reuse one. basically picks highest unused identifier number, if delete items using less current highest identifier, not "fill-in" old identifiers. this photos in camera roll. i'm not sure other alassetgroups.

c++ - How to read from file UTF simbols as if they were UTF code? -

so have file - html file there lots of simbols &'""""</\>9()!@#+=- need convert them form can copied output screen after passed std::string str ("here should utf simbols"); how such thing (using c++ boost) this code assumes compiling system uses superset of ascii, reasonable on today's systems. gives string literal std::string, including surrounding quotes. input data treated generic bytes rather required utf-8. std::string string_literal(int length, char const *data) { std::stringstream s; std::ostream shex (s.rdbuf()); shex << std::hex << std::uppercase; shex.fill('0'); s << '"'; (int n = 0; n != length; ++n) { unsigned char c = data[n]; if (c < 32 || 0x7f <= c) { // add special cases \n, \t, \r, etc. produce nicer output shex << "\\x" << std::setw(2) << int(c); } else { switch (c) { case '

php - how to enumerate items with preg_replace? -

i need add tags before , after images on document , numerate them @ once. html document code is: .... <img src="http://img.example.com/img/mage1.jpg" alt="sometile"> <br> <img src="http://img.example.com/img/image72.jpg" alt="sometile"> <br> <img src="http://img.example.com/img/imagstr.jpg" alt="sometile"> <br> <img src="http://img.example.com/img/image.jpg" alt="sometile"> <br> <img src="http://img.example.com/img/imgger.gif" alt="sometile"> <br> <img src="http://img.example.com/img/somepic.png" alt="sometile"> <br> i need in result code <div><a name="#pic1"></a><img src="http://img.example.com/img/mage1.jpg" alt="sometile"></div> <div><a name="#pic2"></a><img src="http://img.example

release management - thoughtworks go vs atlassian bamboo -

does have comments on 1 vs other. we're looking @ trying automate our release process dev test uat production, including running unit tests, having code reviews , enforcing permissions on allowed push builds uat production. disclaimer: product manager of bamboo @bernard : provide more details around process? are uat tests manual tests? what pushing production mean in case? do expect single build result @ end of deployment? bamboo 2.7 our first release allows divide build different stages , execute jobs within stages in parallel. can improve overall turnaround time of builds. working on artifact passing, allow pass build artifacts between different stages. again, reduce overall build time , important step towards continuous deployment process. unfortunately not have "out of box" way enforce permissions on parts of build. again, there ways work around plugins , setting build in way. it's hard provide suggestions without knowing process in more

ruby - what does this script do? -

i don't know ruby , need understand script does. know calls ebtables add rules configure networks virtual machines. i'm not sure how? this code: #!/usr/bin/env ruby require 'pp' require 'rexml/document' vm_name=argv[0] # uncomment act on listed bridges. #filtered_bridges = ['beth0'] def activate(rule) system "sudo ebtables -a #{rule}" end def get_bridges bridges = hash.new brctl_exit=`brctl show` cur_bridge = "" brctl_exit.split("\n")[1..-1].each |l| l = l.split if l.length > 1 cur_bridge = l[0] bridges[cur_bridge] = array.new bridges[cur_bridge] << l[3] else bridges[cur_bridge] << l[0] end end bridges end def get_interfaces bridges = get_bridges if defined? filtered_bridges filtered_bridges.collect {|k,v| bridges[k]}.flatten else bridges.values.flatten end

oracle - Error in opening a file residing on server through utl_file.open! -

i trying open file residing in data base server , used select * v$parameter name = 'utl_file_dir' find out directory path. when executing code getting error. error coming "ora-29283: invalid file operation" declare v_file_handler utl_file.file_type; p_dir varchar2(100):='/d04/data/edi/inbound'; v_no number:=1; v_file varchar2(30):='ut_file.txt'; begin if utl_file.is_open(v_file_handler) dbms_output.put_line('already opened'); else v_file_handler:= utl_file.fopen(p_dir,v_file,'r'); utl_file.putf(v_file_handler,'program %s\n',sysdate); dbms_output.put_line('not opened'); end if; exception when others dbms_output.put_line(sqlerrm); end; v_file_handler:= utl_file.fopen(p_dir,v_file,'r'); utl_file.putf(v_file_handler,'program %s\n',sysdate); you're opening file reading , attempting write it. that's bound thr

java - Log4j notifying on logging level changes -

is there anyway , or configuration in log4j tell him log line whenever "logging level" configurations occur ? i mean changed in package debug level info debug , want event being logged log4j. thanks i'm not sure if it's case, if reloading configuration file using configureandwatch should able see information need setting system property -dlog4j.debug=true . see http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/xml/domconfigurator.html

iPad Mapkit - Change title of "Current Location" -

in map view, i'm showing current user location. on click on pin showing "current location". want change "my current location". how can change it. want change current user location pin color in timer. thing every 1 second should change color between green, purple , red. possible it? i'm using map kit's show default location , manipulating annotation pin color below: - (mkannotationview *)mapview:(mkmapview *)map viewforannotation:(id <mkannotation>)annotation{ static nsstring *annotationviewid = @"annotationviewid"; solarannotationview* annotationview = (solarannotationview*)[map dequeuereusableannotationviewwithidentifier:annotationviewid]; if(annotationview == nil) { if([self cllocationcoordinate2dequals:mapview.userlocation.location.coordinate withsecondcoordinate:[annotation coordinate]]) //show current location green pin { annotationview = [[solarannotationview alloc] initwithannotation:annotation]; ann

ruby on rails - Dynamic loading of options in select menu for a form whilst using formtastic -

i have formtastic form. , problem simple. have 2 select menus. based on option selected in 1st select menu, 2nd select menu should populated. have in form code. <% semantic_form_for @issue, :html => { :multipart => true } |form| %> <% form.inputs %> <%= form.input :department, :remote => true, :input_html => { :onchange => remote_function(:url => { :action => :get_issue_types }, :method => :get, :with => "'dep_id='+this.options[this.selectedindex].value")} %> <%= form.input :issue_type %> <% form.buttons %> <%= form.commit_button "submit" %> <% end %> <% end %> so based on value selected department, issue type menu should correspondingly populated. remote action in controller: def get_issue_types @issue_types = (params[:dep_id].blank?) ? [] : department.find(params[:dep_id]).issue_types.uniq end and error get: activerecord::recordnotfound (coul

c++ - When do programmers use Empty Base Optimization (EBO) -

i reading empty base optimization(ebo). while reading, following questions popped in mind: what point of using empty class base class when it contributes nothing derived classes (neither functionality-wise, nor data-wise) ? in this article , read this: //s empty class struct t : s {       int x; }; [...] notice didn’t lose data or code accuracy: when create standalone object of type s, object’s size still 1 (or more) before; when s used base class of class memory footprint shrink zero. realize impact of saving, imagine vector contains 125,000 objects. the ebo alone saves half megabyte of memory! does mean if don't use "s" base class of "t", necessarily consume double of megabyte of memory? think, article compares 2 different scenarios don't think correct. i know real scenario when ebo can proven useful.(means, in same scenario, necessarily @ loss if don't use ebo!). please note if answe

java - How to reload resource bundle in web application? -

i have resource bundle java class read values database. when update db need reload bundle, don't know how. helps ? package model.helpers; public class messages_en extends listresourcebundle { protected object[][] getcontents() { // db // ... } } in view use bundle below: <f:loadbundle basename="model.helpers.messages" var="m" /> resourcebundle.clearcache(); or messages_en .clearcache(); calling method reload resources, refresh bundle reference

java - Socket stream hangs when using IOUtils.copy() -

i want send inputstream containing xml client server. said server manipulates xml stream using streaming api xml (stax) , sends client. i mange send xml server, client receives answer, doesn't exit because server never finishes reading inputstream form client. when server dumping input system.out instead of sending something, reading finishes... edit forgot mention ioutils.copy() running in 2 separate threads on client. here code reproduce this, i've replaced stax part ioutils.copy() on server. server serversocket serversocket = new serversocket(port); socket clientsocket = serversocket.accept(); inputstream in = clientsocket.getinputstream(); outputstream out = clientsocket.getoutputstream(); ioutils.copy(in, out); client socket socket = new socket(host, port); fileinputstream fin = new fileinputstream(file); outputstream out = socket.getoutputstream(); ioutils.copy(fin, out) inputstream in = socket.getinputstream(); ioutils.copy(in, system.out)

linux - CPU usage in top batch mode -

i have problem makes me mad. running top in batch mode following command, top -b -n 1 the problem can run top in batch mode 100 times cpu usage never changes past original value. memory usage changes expected cpu stays same. if simultaneously run top in different window cpu usage changing top not top in batch mode. basically cpu stats don't seem change in batch mode , in interactive mode. know why? try yourself, run above command few times , observe cpu usage staying same run top in interactive mode , observe cpu usage changing. on first iteration, showing average cpu usage since system startup. (note no longer case newer versions of top ).

database - Why is the business activity/engagement of OLAP so small in comparison to OLTP one? -

http://sql.wikis.com/wc.dll?sql~datawarehouse tells: "sid adelman of sid adelman & associates in recent presentation observed meta group estimates the cost of single data warehouse implementation project runs around $3 million, , single, initial implementation , near scope of providing integrated views entire enterprise" i afraid $3 million not tell majority of ppl. how relate cost of corresponding (by size , level of data processing of) oltp database implementation? higher/lower? how many times? note olap solutions being implemented after costs of dbms made oltp solutions... why costs elevated? update: let me reformulate question: why olap solutions rather rare in comparison oltp ones? does laboriousness , costs of olap seem prohibitive? nobody seems doubt in need , necessity spend money on oltp. though, logical point of view, not clear me why not vice versa? there lot of legacy data sources accumulated outside of dbms... update2: refo

html - How to put the height of a div that contains other with absolute position? -

how put height of div contains other absolute position? <html> <head> <style type="text/css"> .a{ } .b{ position:relative; } .c{ position:absolute; } </style> </head> <body> <div class="a"> <div class="b"> <div class="c"> esto es lo que contiene el div<br/> esto es lo que contiene el div<br/> esto es lo que contiene el div<br/> esto es lo que contiene el div<br/> </div> </div> </div> </body> </html> the height of div class "a" zero an absolutely positioned element not take space in layout, meaning <div class='a'> won't expand wrap it. the way possibly measure height of .c via javascript , set height of .a explicitly -- downside, of course, requiring javascript so. depending on trying position .c may want consider using float instead, can wrapped.

Handling variable number of fields in ASP.NET WebForms Page -

i wanted gather methods on how add variable number of fields form (with add new , remove buttons). know asp.net mvc has easy methods, i'm unable find easy methods webforms. here's i've used far: adding new usercontrol placeholder on postback (i've had fiddle viewstate make work correctly, huge pain) adding new row grid , having template field in grid (works decently kind of awkward) actually having several fields on form default , hiding/showing them dynamically (fairly easy have set number of fields.) any other methods? thanks! you can add them javascript , on postback value request.params["controlid_1"] you need convention on controlid naming.

java web playframework: how to ignore Evaluating Expression in a Template? -

in view (may application/index.html), had content like: ... <div>${don't need evaluate content} </div> ... i don't want play! evaluate it, display absolutely content on screen, how can ? update: thank loic , niels, have checked them, both solutions: #{verbatim}${don't need evaluate content}#{/verbatim} and <div>'${don't need evaluate content}' </div> didn't work! note that, use xml in response type. i managed working using following <div>&#36;{don't need evaluate content}</div>

php - mod_rewrite changing /subpage/ to /subpage -

okey, problem. want use mod_rewrite make nice looking urls site. i want them have looking url www.mypage/tennis or www.mypage/soccer instead of www.mypage/?page=tennis , www.mypage/?page=soccer and following rules can achive this: options +followsymlinks rewriteengine on rewritecond %{script_filename} !-d rewritecond %{script_filename} !-f rewriterule .* index.php [l] so if type in www.mypage/soccer php script reads url , it's magic translating $_get['page'] = soccer. works fine! problem is if type url www.mypage/soccer/ of sudden every linked css or image cannot found website, since looking in none existing folder /soccer/ off course. how make rewrite rule transforms /soccer/ /soccer or other /blabla/ /blabla hope question clear! if have pages can learn more regular expressions happy! try this: rewriterule ^([a-za-z0-9-]+)/?$ ?page=$1 [l]

java - Method for finding if Path2D intersects or contains another Path2D -

java path2d has methods determine if rectangle intersects shape or not, , if rectangle contained in shape or not. there easy way similar things path2d? use area instead of path2d . can determine if 2 areas intersect this: !a1.intersect(a2).isempty()

c++ - Template type is not "seen" by the compiler inside a lambda -

template<typename wcf, typename wdb> void computegenericdropcount(const function<void(wdb *, int)> &func) { wcf::foreach([&](wcf *wcf) { wdb *wdb = wdb::find(wcf->sourceid); // <--- error // error c2653: 'wdb' : not class or namespace name if(wdb) func(wdb, wcf->itemcount); }); } it's weird because seems "see" wcf without problems, use it: wcf->itemcount . is there workaround or reason why happening? don't know why doesn't work. here workaround. template<typename wcf, typename wdb> void computegenericdropcount(const function<void(wdb *, int)> &func) { auto my_find = wdb::find; // allows lambda "capture" correct function. wcf::foreach([&](wcf *wcf) { wdb *wdb = my_find(wcf->sourceid); if(wdb) func(wdb, wcf->itemcount); }); }

CSS space lines between spans -

i have structure: <div class="gbigpage"> <span class="gbigmonthshort">feb</span><br /> <span class="gbigdayshort">23</span><br /> <span class="gbigyearshort">2011</span> </div> the gaps between text lines big, need them shortened virtually touching. /* mouseover div day numbers */ .gbigpage{ height:45px; width:30px; font-family:arial; font-weight:bold; background-color:#ffee99; text-align:center; border-top:1px solid #c0c0c0; border-left:1px solid #c0c0c0; border-right:1px solid #c0c0c0; position:absolute; z-index:3; } .gbigpage:hover{ cursor:pointer; } /* in big day box, month @ top */ .gbigmonthshort{ text-transform:uppercase; font-size:11px; } .gbigyearshort{ font-size:11px; } .gbigdayshort{ font-size:16px; } i can't relative positioning spans, there bug in chrome flickers mouseover effect, pur

wordpress navigation help -

i have website consists of following areas, home about us project management small works testimonials contact us current projects my issue can display navigation bar fine, current projects not acutally page, more of category has collection of posts, how can add nav bar, when user clicks see current projects, shows titles of posts in current_projects category? great. just add , users pointed /category/current-projects <?php wp_list_categories('title_li=&depth=1'); ?> a more in-depth: <ul> <?php wp_list_pages('sort_column=menu_order&title_li='); ?> // output pages. <?php wp_list_categories('title_li=&depth=1'); ?> // output categories. </ul> you can exclude categories showing adding &exclude=5,6,7 (5,6,7 being categories id's want exclude. or &include=3,2,1 ) it generates html like: <ul> <li><a href="" title="">page one</a>&

scripting - Sending bulk email -

i have send emails approximately 1000 users such no 1 gets knows email address of or fact have sent bulk email. how can write thunderbird script or simple script perform action. try mailchimp's free plan (http://www.mailchimp.com/pricing)

c++ - Does perfect forwarding in C++0x make reference_wrapper deprecated? -

as usual, code first: #include <functional> using namespace std; using namespace std::tr1; void f(int& r) { r++; } template<class f, class p> void g1(f f, p t) { f(t); } template<class f, class p> void g2(f f, p&& t) { f(forward<p>(t)); } int main() { int = 0; g1(f, ref(i)); // old way, ugly way g2(f, i); // new way, elegant way } in c++ 98, don't have nice way pefect forward parameters through template functions. c++ gurus invented ref , cref achieve aim. now have had r-value reference , perfect forwarding, mean ref , cref , should deprecated? reference wrappers still useful. case when it's storing things. example, reference wrappers can make std::make_tuple , std::thread create objects refer argument instead of copying them: class abstract_job { public: virtual ~abstract_job() {} virtual void run() = 0; }; class thread { public: template<class fun, class... args> thread(fun&&a

messaging - Is there a way to call private functions of a form or class through Type.InvokeMember or messages in C#? -

what have bunch of forms in main application have both private , public functions. have plugin architecture in place accesses each form when created , loaded , holds reference updating it, adding controls, etc. what trying implement plug in architecture, plugins may need call form's private functions. here example of tried type.invokemember: public partial class form1 : form { form1() { initializecomponent(); } private void sayhello() { messagebox.show("hello world!"); } } in dll... public class pluginclass { form1 myreferencedform1; pluginclass() { //constructor code here... //also sets reference existing form1 instance } private callmember() { type t = typeof(form1); //i guess can call 'myreferencedform1.gettype();' here t.invokemember("sayhello", system.reflection.bindingflags.invokemethod | syst

javascript - var foo = foo || alert(foo); -

can explain does? var foo = foo || alert(foo); if foo defined , evaluates true, sets foo = foo , i.e. nothing. if foo defined evaluates false, popup whatever foo ( false , null , undefined , empty string, 0, nan), since alert returns nothing, foo set undefined . if foo not yet defined, exception thrown. ( edit: in example, foo defined because of var foo declaration.)

java - Force a full screen Activity to remeasure/redraw on resume? -

edited add more details: (originally asked 2 months ago...still haven't found solution) i have activity complicated view. not complicated in technical sense...there's lot going on. activities in particular app set fullscreen notitlebar, , they're set landscape orientation. noticed on in development when app hidden , resumes, there infrequent tendency layout slide down vertically if make room titlebar , statusbar. later on in development, app calls out various external intents. notice there more of tendency make same shift when resuming externally handled fired intent (such creating "chooser" intent or picking image). able reproduce inconsistently using exact same steps...sometimes happens doesn't. seems if there's race condition in between various phases of measuring , laying out. assume 1 of these steps system doing me checking fullscreen , notitlebar, , making necessary shift. happening late in cases. i put bunch of logging, , calls in

javascript - ["var"+1]=someValue - Can something like this be done? -

function givevalue(n){ ["r"+n]=5; } givevalue(10); you idea. the point have handful of variables similar name, varying in number @ end. using switch statement fine few variables few times, particular project driving me crazy. know can do: var r2="lol"; var somevar=eval("r"+2); //somevar=="lol" and wondering if can dynamic reference left of assignment. is possible? if really want that, should work: function givevalue(n){ window['r'+n] = 5; } givevalue(10); console.log(r10) but please, don't it! you should use arrays !

c# - 'The parameter is incorrect' while attempting to use PInvoke DirectDraw in WinCE5.0 -

i've been having issue while in regards getting directdraw function on ce5.0 system. found code involved getting working on windows moblie, , through messing about, i've got code compiling properly. it runs through creating instance handle windows form, when gets checking capabilities of system via: ddcaps halcaps = new ddcaps(), helcaps = new ddcaps(); halcaps.dwsize = (uint)marshal.sizeof(typeof(ddcaps)); helcaps.dwsize = halcaps.dwsize; result = ddraw.getcaps(out halcaps, out helcaps); i exception of 'the parameter incorrect'. exception on later functions if comment 1 out leads me believe there problem pinvoke somewhere, don't know search information on ce5.0 directdraw seems limited. importing functions [dllimport("ddraw.dll", callingconvention = callingconvention.winapi)] however error seems come interfaces lead [guid("9c59509a-39bd-11d1-8c4a-00c04fd930c5"), interfacetype(cominterfacetype.interfaceisiunknown)] the articl

distortion - Trouble with elastic layout -

if can help, i'd appreciate it! i built elastic website using ems, , reason, still gets distorted when user zooms in or out on browser. the link website referring www.newstylesignsusa.com. , here css template. css rest of pages has measurements in ems well. i'd appreciate can this. thank you! css: body{ margin:0 auto; padding:0em; background: url(images/bg_gradient_bar.jpg) repeat-x top left #99cccc; font-size:16px } .clear{ clear:both; } html{ font-size:100%; } /*=============== simple selectors ====================*/ p{ font-family:arial, helvetica, sans-serif; color:white; float:right; margin-top:-0.625em; margin-right:0.75em; padding:0em; font-size:1.125em; } img{ margin-top:-1.875em; } ul{ margin-top:0em; margin-right:0.6em; list-style-type:none; float:left; background: url(images/nav_bar.gif) repeat-x top left; font-size:1.135em; } ul li{ padding-top:0em; padding-b

c# - Sorting a file by the content of it's filename -

i have list of files sort based on date. caveat each file in list contains date part of it's file name, want sort files based on date. reason because date in file name string correlates content in file, i.e. actual date property of each file, date created, modified, accessed, etc, subject change whenever file moved or modified , cannot rely on purposes. i'm creating custom comparer use in list sorting method, wanted see if out there has other better or unique approaches this. in advance. update: in answer saeed's comment, file name follows format: {test name}_{yyyymmdd}_{hhmmss}.txt where yyyymmdd , hhmmss date , time, respectively. update 2: ok, got comparer written seems job fine, here if helps else; wouldn't take effort alter search other elements in file name, need change regular expression. suggestions, constructive criticism welcome. public class tdrdatetimecomparer : icomparer<fileinfo> { public int compare(fileinfo x, fileinfo y)

java - Webapp startup fails but Jetty LifeCycle claims "started" -

i'm using embedded jetty launch standard java webapp. launcher this: import org.eclipse.jetty.server.server; import org.eclipse.jetty.util.component.lifecycle.listener; import org.eclipse.jetty.webapp.webappcontext; ... listener listener = ...; server server = new server(8080); webappcontext webapp = new webappcontext(); ... webapp.addlifecyclelistener(listener); server.sethandler(webapp); server.start(); ... this works fine in can start app , browse , appears working. but i'm trying add error reporting launcher. i've temporarily set webapp throw exception in contextinitialized() method of servletcontextlistener . exception thrown, , log message of error org.eclipse.jetty.util.log failed startup of context webappcontext@... but lifecyclelistener not receieve failure event. in fact, receives started event, , webaddcontext passed listener returns false lifecycle#isfailed() , true lifecycle#isrunning() . browsing webapp results in 503 service unavaila

A book on WCF with asp.net MVC? -

i have build web application on asp.net mvc have data service reference wcf db. have no idea on how data persistence work on asp.net. there resource on arguments? i recommend pro asp.net mvc framework excellent book asp.net mvc in general. doesn't treat wcf once understand concept of abstracting data access layer repository inside asp.net mvc application doesn't matter data comes from. sql database, xml file, wcf service, ... the next part write wcf service. step done independently client application. once service exposed generate client proxy wsdl using add service reference... dialog in visual studio , ready call it. there's nothing specific in asp.net mvc consuming web service, same other type of application: console, windows, web, ...

sql - Load data from two (or more) files into one table -

i have 1 table: create table t ( id int not null primary key, x int not null, y int not null ); the data in 2 files: 1 file has (id, x) value pairs , file has (id, y) value pairs. there 20 million rows in each. of id values appear in x file appear in y file , visa versa. can suggest how load id , x , y values 2 files t ? if on unix machine may have access "join" can join 2 files , produce them on stdout. bulk load standard out directly mysql. reduce number of writes disk.

iphone - For a real time game, Should I use core animation or redraw images frequently? -

say have move image across screen according user input.... should i? use core animation periodically animate movement in small chunks. or redraw image @ different locations. if there no clear answer, advantages of using each method? coreanimation not made game programming, , doesn't have performance characteristics takes make real, playable game. may able make basic game coreanimation, it's @ point run these performance limitations, , @ point need rewrite codebase using real gaming engine. to clear, coreanimation amazing , ideally suited task created, application ui development. doesn't take in terms of sprite count , size before hit performance wall when using in game. because have tried it. my recommendation use 1 of easy, off-the-shelf gaming engines available on ios, cocos2d, write game. it's easy enough relative beginner, more suited game development both in terms of performance characteristics , api.

uitabbarcontroller - iPad: 5 feeds into split view -

so have iphone app consist of tabbarcontroller, 5 tableviews (one each rss feed) , webview show selected news post. i want create ipad app same. how have 5 different tableviews in master view (left view) of split view? i found description of split view in tabbar, many forums not recommend method. http://discussions.apple.com/thread.jspa?messageid=12525197 alternative: live 5 buttons in toolbar, in detail view. how should communicate button press event master view? or have not seen smart functionalities split view offers??? really hope can me.. used week of figuring out structure! cheers :) move 5 rss feeds tab bar left tableview, user can select rss feed, push rss feed left tableview. upon article selection load detail view. twitterific on ipad multiple accounts.