Posts

Showing posts from July, 2010

jquery - Alternate row colors with exceptions -

jquery - Alternate row colors with exceptions - i have table rows hidden. show them, on demand. user must perform action display rows. each hidden rows has class="hideme" withing tr tag. i add together class alternating rows, alter color, visible. it's simple, i'm not sure how incorporate hidden rows exception. $('.mytable tr:odd:not(hideme)').addclass('altrow'); can done css or need throw in jquery magic? actually, tweaking "a little" code, nice solution: $('.mytable tr:not(.hideme):odd').addclass('altrow'); see working here: http://jsfiddle.net/hyhwj/ another solution : $('.mytable tr:not(.hideme)') .removeclass('altrow') .filter(':odd') .addclass('altrow'); see working here: http://jsfiddle.net/r4n5g/ jquery css

Request specific data in ASP.NET MVC -

Request specific data in ASP.NET MVC - i want show breadcrumbs on asp.net mvc 4 website. generation of breadcrumbs depends upon context, illustration on forumpage determined differently on blogpage. on 1 hand, there should 1 partialview "breadcrumbs", partialview not per se know context. , don't want 'pollute' viewmodels breadcrumb stuff. thought of 2 possible solutions: 1) create viewmodels derive basemodel contains breadcrumbdata , in views partialview "breadcrumbs" can called given viewmodel model. 2) in actions save breadcrumbdata somewhere (in webforms had httpcontext.items example) partialview "breadcrumbs" can read them. but not pleased both of these options. there more elegant ways accomplish this? the partial view breadcrumbs should given context (as model, list of breadcrumbs text , urls). if assume each view knows breadcrumbs, can pass breadcrumb info view partial view: if render breadcrumbs in layout page, v...

sql server 2008 - ms sql grouping results query -

sql server 2008 - ms sql grouping results query - i have transaction table have created records invoices in , out. have flag sales (=1) , purchases (=2). i want simple sql calculates sales , purchases month. problem is, if remove transaction type (mybooks_trans_class_id_fk) grouping doesnt work, if leave in results not want. sql: select datepart(year, mybooks_trans_transaction_datetime) 'sales_year', datepart(month, mybooks_trans_transaction_datetime) 'sales_month', case when cast( mybooks_trans_class_id_fk nvarchar(100))!='1' cast(sum(mybooks_trans_gross_amount) nvarchar(100)) else '0' end total_sales, case when cast( mybooks_trans_class_id_fk nvarchar(100))!='2' cast(sum(mybooks_trans_gross_amount) nvarchar(100)) else '0' end total_purchases view_mybooks_transactions_all_details grouping datepart(year,...

copy command syntax error in Windows XP -

copy command syntax error in Windows XP - basically trying create batch file re-create 1 file 1 location location in windows xp code below failed. may know why? copy c:/directory_a/the_file d:/directory_b when execute batch file see in output: the syntax of command incorrect. try using backslashes copy c:\directory_a\the_file d:\directory_b windows-xp command-prompt

php - Codeigniter update query not working with form -

php - Codeigniter update query not working with form - hey guys i'm having problem running update query through form in codeigniter. there no error returned, query not update in database. should noted there's form on same page running insert query works fine. view: <?php $modify = array( 'id' => 'modify-form', 'class' => '' ); echo form_open('main/modify_idea', $modify); $ta_modify = array( 'id' => $row->id, 'name' => 'ta_modify', 'label' => 'ta_modify', 'placeholder' => $row->idea, 'method' => 'post' ); echo form_textarea($ta_modify); echo form_h...

Android Settings UI -

Android Settings UI - i looking build similar settings ui of scheme android. want few checkboxpreferences, switchpreferences, edittextpreferences on launch of application , when user selects 1 preference open fragment not able figure out. i have referred settings guide insists on using preference header. while displaying headers there unlikely overhead facing of displaying texts in turn load fragments. for example, my preference header : <preference-headers xmlns:android="http://schemas.android.com/apk/res/android" > <!-- these settings headers used on tablets. --> <header android:fragment="${packagename}.${activityclass}$generalpreferencefragment" android:title="@string/pref_header_general" /> <header android:fragment="${packagename}.${activityclass}$notificationpreferencefragment" android:title="@string/pref_header_notifications" /> <header ...

wpf - Prism Delegate command not enabling button -

wpf - Prism Delegate command not enabling button - i trying enable , disable button in wpf (prism) user command based on info entered user. in constructor submitcommand = new delegatecommand<object>(onsubmit, cansubmit); public icommand submitcommand { get; private set; } private void onsubmit(object arg) { _logger.log(arg.tostring()); } private bool cansubmit(object arg) { homecoming title.length > 0; } private string _title=""; public string title { { homecoming _title; } set { if (_title != value) { _title = value; this.raisepropertychanged(); } } } i bound submitcommand in xaml below <button content="submit" width="100" command="{binding path=submitcommand}" commandparameter="{binding elementname=titletext, path=text}" /> the issue when title value changes, button not enabled. may missing something. help! it sounds you're needing raise...

visual studio 2010 - Setup Project Installer add registry entry only if debug -

visual studio 2010 - Setup Project Installer add registry entry only if debug - i'm creating installer application (setup project in visual studio 2010). wish add together registry entries, if it's in debug mode. can accomplish this? there property condition if add together registry entry, none of theese works: %debug=1 debug=1 please help, lot! there no property tell msi built debug or release build. know cannot have registry value added in 1 of builds vs editor. a solution create post-build event in vs inserts rows in registry table msi build on debug. to see rows insert in table build msi values in it, open orca , see adds in package. should add together entries in registry, component, , featurecomponent tables. however, scripts have entries in registry table created assigning new values existent component package. visual-studio-2010 debugging installer condition setup-project

html - Semantical Markup: address, em -

html - Semantical Markup: address, em - im writing markup , have uncertainty @ part: and here markup: <ul class="primarycontacts"> <li><address>phone: <em class="headerphone">1.800.corp</em></address></li> <li><address>email: <em class="headeremail">office@corpora.com</em></address></li> <li><address>follow us: <a href="#" class="headerrss"></a><a href="#" class="headertwitter"></a><a href="#" class="headerfacebook"></a></address></li> </ul> have used tags address , em in right way or maybe there more semantic ones? , maybe other mistakes.. help. [edit]: according answers i've written this: <ul class="primarycontacts"> <li>phone: <span class="headerph...

How can I generalize a Hashmap type in Java? -

How can I generalize a Hashmap type in Java? - i generalize result homecoming within function of application. homecoming hashmap result , parse ui, showing user. i want extend values application returns. quick example: public class model implements runnable { private hashmap<string, integer> result; public hashmap<string, integer> returntheanswertoeverything() { hashmap<string, integer> result = new hashmap<string, integer>(result.putall(answer(universe)); // returns (universe,42) homecoming result; } } with result returning hashmap along results. in seperate function or gui can output user. if want not homecoming integer, additional stuff, how best? if wanted homecoming universe third(fourth ...) answer? how maintain extendable? if want homecoming additional info besides integer , create wrapper class store data, , set map . public youradditionalinfoclass { // if ...

Why are so many different link relations used with Atom? -

Why are so many different link relations used with Atom? - my colleagues , working on building atom feed. paginating feed on many individual atom documents, , adding links each document allow consumers traverse entire feed. we're wondering link relations should take indicate links next , previous documents in feed. rest in practice uses "next-archive" , "previous-archive". atompub uses "next" , "previous". "prev" accepted alias "previous". <?xml version="1.0"> <feed xmlns="http://www.w3.org/2005/atom"> <id>urn:uuid:ff31a040-75bc-11e2-bcfd-0800200c9a66</id> <link rel="next" href="http://example.com/documents/4" /> <link rel="prev" href="http://example.com/documents/2" /> <entry>..</entry> <entry>..</entry> <entry>..</entry> <...

c# - Strange issue on VPC server for data rounding either .Net or SQL Server -

c# - Strange issue on VPC server for data rounding either .Net or SQL Server - let me explain i'm facing issue right now. i have application (vs 2010 - .net framework 3.5) loads info every 5 mins table called x in sql server 2008 database. there column called value in x of type decimal . assume i'm passing 55.890 value column in x table. when run application machine exact value storing database. same application runs vpc server value storing 56.000 database. i'm not sure why rounding value , saved database server. i've checked sql profiler using debug method vpc server when comes executenonquery method there can see value rounding. not happening local machine. please share thoughts or help on , appreciated. cheers c# .net sql-server-2008 ado.net

Determine Users on Android 4.2 Device -

Determine Users on Android 4.2 Device - is there way determine if there other users installed on device or if device beingness used single user tablet? along lines possible name, id, or google business relationship of current user? to reply sec question, code homecoming google accounts of current user: accountmanager manager = accountmanager.get(context); account[] accounts = manager.getaccountsbytype("com.google"); you need permission in manifest: <uses-permission android:name="android.permission.get_accounts" / android user android-4.2-jelly-bean multi-user

dynamic programming - Coin change algorithm and pseudocode: Need clarification -

dynamic programming - Coin change algorithm and pseudocode: Need clarification - i'm trying understand coin alter problem solution, having difficulty. at the algorithmist, there pseudocode solution dynamic programming solution, shown below: n = goal number s = [s1, s2, s3 ... sm] function sequence(n, m) //initialize base of operations cases = 0 n j = 0 m table[i][j] = table[i-s[j]][j] + table[i][j-1] this pretty standard o(n^2) algorithm avoids recalculating same reply multiple times using 2-d array. my issue two-fold: how define base of operations cases , incorporate them in table[][] initial values how extract out different sequences table regarding issue 1, there 3 base of operations cases algorithm: if n==0, homecoming 1 if n < 0, homecoming 0 if n >= 1 && m <= 0, homecoming 0 how incorporate them table[][] , not sure. finally, have no thought how extract out solution set array. we can implement...

c - run func() based on what time it is -

c - run func() based on what time it is - i wrote code monitors directory dir inotify() , when file gets moved in dir .txt output of file(its nfcapd file flows of network interface). happens every 5 minutes. after that, used snort's dpx starter kit, can extend snort writing own preprocessor. preprocessor,like others, function that's executed every time new packet available. problem want, when new file gets exported previous code(so every 5 minutes), read file within preprocessor's function. so, there way of getting time , executing if it's desired time? if (time 15:36){ func(output.txt);} i'm writing in c. thanks you can following: #include <time.h> ... time_t t = time(null); //obtain current time in seconds struct tm broken_time; localtime_r(&t, &broken_time); // split time fields if(broken_time.tm_hour == 15 && broken_time.tm_min == 36) { //perform check func(output.txt); } c timer

sql - login with different user level PHP -

sql - login with different user level PHP - please help. what's problem code. i'm trying create login different user level, when seek login admin or other user, did not direct request page. here's code <?php ...//the problem goes here, didn't direct request page if(empty($error)){//if array empty , means no error found $query_check = "select * users (email = '$email' , password= '$password') , activation null"; $result = mysqli_query($db_conn, $query_check); if(!$query_check){ echo "query failed"; } if(@mysqli_num_rows($result)==1){//if match $_session = mysqli_fetch_array($result,mysqli_assoc); //assign result of query session global variable $row = mysqli_fetch_array ($result, mysqli_assoc); if($row['role_type']=='admin'){ header("location:../views/admin/dashboard.php"); exit; } ...

php - How to filter my Doctrine queries with Symfony ACL -

php - How to filter my Doctrine queries with Symfony ACL - symfony acl allows me grant access entity, , check it: if (false === $securitycontext->isgranted('edit', $comment)) { throw new accessdeniedexception(); } however, if have thousands of entities in database , user has access 10 of them, don't want load entities in memory , hydrate them. how can simple "select * x" while filtering on entities user has access (at sql level)? well there is: it's not possible. in lastly year i've been working on alternative acl scheme allow filter straight in database queries. my company agreed open source it, here is: http://myclabs.github.io/acl/ php symfony2 doctrine2 doctrine acl

delphi - Get POST Data from TIdHTTPProxyServer -

delphi - Get POST Data from TIdHTTPProxyServer - i'm trying post info tidhttpproxyserver, using onhttpbeforecommand or onhttpdocument events useless. how can that? btw, i'm using indy 10, other solutions (with synapse, example) cool. thanks in advance. post info not available in onhttpbeforecommand event, has not been read socket yet. http headers available in event. post info available in onhttpdocument event, under next conditions: the post request uses non-zero content-length header (as tidhttpproxyserver not yet back upwards transfer-encoding header handle compressed/chunked http messages). the tidhttpproxyservercontext.transfermode property tmfulldocument when onhttpbeforecommand event exits. default, transfermode set same value tidhttpproxyserver.defaulttransfermode property, tmfulldocument default. the client sends post request straight tidhttpproxyserver , specifying total url target. if client instead sends connect r...

http - Node.JS: What happens to postdata when client request is interrupted? -

http - Node.JS: What happens to postdata when client request is interrupted? - in the node.js docs http (v0.8.20), under serverrequest , see events data , end . not see event error . normally, if there interruption while receiving data, observe looking @ error . work postdata? how can sure whether have received entire postdata, , not truncated due network failure? i have not confirmed actual running code, looking @ manual, http.serverrequest readable stream , has event: 'error' documented. node.js http post error-handling

tortoisehg - What is the plus sign after revision number in Mercurial -

tortoisehg - What is the plus sign after revision number in Mercurial - we using mercurial , tortoisehg @ work , see + sign after working directory revision number , google doesn't tell me it. there 1 can explain this? here snapshot of talking about: google tells me means have uncommitted local changes in repository. see java: how mercurial current changeset number utilize in program, http://stackoverflow.com/a/9301105/1848654, , http://stackingcode.com/blog/2011/01/21/assembly-versioning-with-hg. mercurial tortoisehg

out of memory - Depth First Search is running into java.lang.OutOfMemoryError -

out of memory - Depth First Search is running into java.lang.OutOfMemoryError - i'm running java.lang.outofmemoryerror when utilize depth first search on undirected graph determine if node1 reachable node2. code listed below. (some irrelevant details intended removed.) //definition of nodes , edges set<node> nodes = new hashset<node>(); map<node, set<node>> edges = new hashmap<node, set<node>>(); //method determine if node1 reachable node2 public boolean isreachable(int p1, methodnode m1, classnode c1, int p2, methodnode m2, classnode c2) { node node1 = new node (p1,m1,c1); node node2 = new node (p2,m2,c2); stack<node> stack = new stack<node>(); stack.push(node1); while(!stack.isempty()){ node current = null; current = stack.pop(); //test current node, if kid nodes contains node2, homecoming true ...

php - jQuery Mobile: Sending data from one page to the another -

php - jQuery Mobile: Sending data from one page to the another - i have problem, need send info (an id) list page. html code: </head> <body> <div data-role="page" id="index"> <div data-role="header"> <h1>players app</h1> </div><!--/header--> <div data-role="content"> <ul data-role="listview" id="ul_list" data-inset="true"> </ul> </div><!--/content--> <div data-role="footer"> <h4>players list</h4> </div><!--/footer--> </div><!--/page-index--> <div data-role="page" id="detail" data-add-back-btn="true"> <div data-role="header"> <h1>play...

performance - PostgreSQL Simple JOIN very slow -

performance - PostgreSQL Simple JOIN very slow - i have simple query, , 2 tables: drilldown create sequence drilldown_id_seq; create table drilldown ( transactionid bigint not null default nextval('drilldown_id_seq'), userid bigint not null default 0 references users(id), pathid bigint not null default 0, reqms bigint not null default 0, quems bigint not null default 0, clicktime timestamp default current_timestamp, primary key(transactionid) ); alter sequence drilldown_id_seq owned drilldown.transactionid; create index drilldown_idx1 on drilldown (clicktime); querystats create sequence querystats_id_seq; create table querystats ( id bigint not null default nextval('querystats_id_seq'), transactionid bigint not null default 0 references drilldown(transactionid), querynameid bigint not null default 0 references queryname(id), queryms bigint not null default 0, primary key(id) ); alter sequence querystat...

google apps script - Large data set exceeding maximum execution time -

google apps script - Large data set exceeding maximum execution time - i have script loading contents of spreadsheet scriptdb spreadsheet has around 15,000 rows, 9 columns , keeps giving me "exceeded maximum execution time" error. i'm using function given in google's documentation load data: function loaddatabasefromsheet() { var spreadsheet = spreadsheetapp.openbyid(spreadsheet_key); var sheet = spreadsheet.getactivesheet(); var columns = spreadsheet.getlastcolumn(); var info = sheet.getdatarange().getvalues(); var keys = data[0]; var db = scriptdb.getmydb(); (var row = 1; row < data.length; row++) { var rowdata = data[row]; var item = {}; (var column = 0; column < keys.length; column++) { item[keys[column]] = rowdata[column]; } db.save(item); } } is there way speed things or going have break chunks of few thousand? calling db.save(item) 15000 times causing slowness. instead, utilize bulk operati...

ssas - Creating role which denied the access of all the empty elements -

ssas - Creating role which denied the access of all the empty elements - i wanted have role wich denied access of empty elements of dimension. i have right mdx query i've tested in sql server: select non empty [people].[category].[category].allmembers on columns [mycube] i wanted have same result in allowed fellow member set on role have error: incorrect syntax. thanks :) there no such thing empty element of dimension. there elements of dimension without measure value different thing. need deny access measure when non-empty situation arises. the next illustration shows how select mymeasure values based on non-empty set of category fellow member - mymeasure select [measures].[mymeasure] on 0, nonempty( [people].[category].[category].members, [measures].[mymeasure])} ) on 1 [mycube] hope helps. ssas olap security-roles

html - JSF dataTable as CSS table with clickable rows? -

html - JSF dataTable as CSS table with clickable rows? - related questions have been asked there not yet solid/acceptable answer, thought re-phrase , clarify: is there way within jsf populate datatable or related query-result component without re-writing renderers w3c css table? must enable clickable rows , row (versus column) styling a:hover, etc. example of desired rendered jsf component html query: <div class="table"> <a href="#" class="row"> <span class="cell">column-1-value</span> <span class="cell">column-2-value</span> </a> ... </div> thanks input provided, finish reply (versus in comments) tested in java ee/jsf container: <div class="table"> <ui:repeat value="#{backingbean.list}" var="item"> <h:outputlink value="url"> <f:param name="id" value=...

sql - Insert data from linked server stored procedure into table -

sql - Insert data from linked server stored procedure into table - we have setup sql server 2008 "server1" linked sql server "server2". on "server2", there stored procedure can query fine "server1": exec [server2].[xx].[dbo].[sp] param however, start inserting info linked server sp, run problems. utilize next code: insert server1.dbo.table (column1, column2, ...) exec [server2].[xx].[dbo].[sp] param when started out, received "known" errors like: ole db provider "sqlncli" linked server "linkedserver" returned message "the partner transaction manager has disabled back upwards remote/network transactions.". msg 7391, level 16, state 2, line 2 operation not performed because ole db provider "sqlncli" linked server "linkedserver" unable begin distributed transaction. as stated in similar questions like: inserting local table linked stored procedure inserting re...

I can't delete malware iframe from my .php page -

I can't delete malware iframe from my .php page - i've found in footer.php page next line: <iframe style="height:1px" src="http://www&#46;brenz.pl/rc/" frameborder=0 width=1> </iframe> i can't delete line. if delete it's show 1 time again , again. why ? it's malware iframe found after searcing google. any help appreciate:) it appears file may modifying 1 when detects change. need find of malicious files/code , root them out in order maintain line appearing. also, may want beef security, update patches, etc etc. attacker may still have access website or server. if utilize web-hosting company site, may want inquire them help in removal. good luck! malware

android - Getting exception on first NDK app -

android - Getting exception on first NDK app - i'm starting larn ndk. i've downloaded recent ndk tools , eclipse plugin. i've followed basic tutorial , tried run. i'm getting work without eclipse plugin(calling manually ndk-build ) plugin excepsion: 02-17 17:49:01.477: e/androidruntime(9746): java.lang.unsatisfiedlinkerror: performoperation here code: package com.helloworld; import android.os.bundle; import android.app.activity; import android.view.menu; public class helloworld extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_hello_world); nativelibrary nativeobject = new nativelibrary(); nativeobject.result(this); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.hello_world, menu); homecoming true; ...

boost - C++ Adapter - For Methods With Same Name But Different Return Type -

boost - C++ Adapter - For Methods With Same Name But Different Return Type - i've been trying find adapter solution in c++ 2 external interfaces, similar differs in homecoming types in enumerations. enum { same_value1, same_value2 } enumtypea enum { same_value1, same_value2, different_value3 } enumtypeb class // not inherited { enumtypea method(); } class b // not inherited { enumtypeb method(); } do have thought solution can utilize wrapper phone call either interface or b? returntype? myadapter::method() { // phone call method or b how } regards, burak note added: i've solved problem using boost.variant as far know not possible write function has variable homecoming type. hence recommend following: enum returntypeenum { returntypea, returntypeb }; struct returntype { returntypeenum actualtype; union { enumtypea a; enumtypeb b; }actualvalue; } returntype myadapter::method()...

c# - SignalR disconnect not being called on internet disconnection/re-connection -

c# - SignalR disconnect not being called on internet disconnection/re-connection - i using signalr in app.i have app depends great grade on ondisconnected() beingness called correctly. , called correctly under next circumstances: public task ondisconnected() { seek { deleteuser(context.connectionid); homecoming null; } grab (exception ex) { homecoming null; } } the user refreshes page the user navigates new page the user closes browser however, not called if network connection drops. instance, if unplug network cable on client machine, or disable client's wireless network, or unplug router, ondisconnected() never called, after several min wait. it raise disconnected not immediately. there's configurable threshold (30 seconds default) signalr wait (after underlying tcp connection has gone away , isn't immediate either) before considers client disconnected. if connection drops , reconnects ...

c# - Enum-like class -

c# - Enum-like class - i looking best practice on how create enum-like class instead of numbers contains string values. this: public static class customertype { public static string type1 = "customer type 1"; public static string type2 = "customer type 2"; } i utilize class throughout application value cases need customertype. cannot utilize enum because legacy system, , values hardcoded everywhere, trying centralize them in 1 place. question is, in above example, should utilize declaring variable: static read-only keyword const keyword or static what best practice set these kinds of classes , values? you should not utilize plain static because fields inadvertently modified , cause mysterious breakage. therefore, 2 choices static readonly , const . const cause variable's value embedded in calling code @ compile-time, equivalent old hardcoded code (but advantage of symbolic constant). danger of const must recompile if const ...

Android layouting with Relative Layout -

Android layouting with Relative Layout - could please explain me why next snippet of code doesn't work expected? cannot utilize android:layout_alignparentbottom="true" param first text view because doing set view @ bottom of whole screen. <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" > <textview android:id="@+id/bottom_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:textcolor="@color/color_black" android:text="at bottom of layout"/> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@id/bottom_text...

jQuery Add Collapsible Panel -

jQuery Add Collapsible Panel - using jquery want dynamically add together new collapsible panels. accordion not enough, need have more 1 section open @ time. the sample here need apart i'm wanting button click dynamically add together new panel. using .append() add together in new tag doesn't work. don't mind if solution includes plugins or whatever (i don't want utilize framework such 'kendoui' though) as indicated in jquery documentation: an accordion doesn't allow more 1 content panel open @ same time, , takes lot of effort that. if looking widget allows more 1 content panel open, don't utilize this. can written few lines of jquery instead, this: jquery(document).ready(function(){ $('.accordion .head').click(function() { $(this).next().toggle(); homecoming false; }).next().hide(); }); or animated: jquery(document).ready(function(){ $('.accordion .head').click(function() { ...

Processing Jquery Post with PHP -

Processing Jquery Post with PHP - i've been @ hours, , i'm @ finish loss.... i've tried can problem i'm not familiar jquery, first time i've ever used it.... basically, i'm attempting pass form info php script, , homecoming variable contain source code of webpage. here jquery: $("button").click(function(){ hi = $("#domain").serialize(); var page; $.ajax({ type: "post", url: "webcrawler.php", data: hi, //datatype: "text", success: function(data){ page = data; document.write(page); } }); }); here html references: <div id="contact_form"> <form name="contact" action=""> <fieldset> <label for="domain" id="domain_label">name</label> <input type="text" name="domain" id="domain" size="30" value="" ...

cmis - Alfresco massive delete -

cmis - Alfresco massive delete - i'm trying massive delete documents on alfresco. i've tried operation cmis delete action each file. tested in test environment (alf 3.4.7 enterprise on windows server 2008r2 5m documents) , work valid in production environment (alf 3.4.7 enterprise on rhel 5.5 7m of documents) doesn't work , corrupt lucene indexes. are there other way delete lot of docs in alfresco? thanks you should utilize org.alfresco.repo.batch.batchprocessor, org.alfresco.repo.batch.batchprocessor.batchprocessworker & org.alfresco.repo.batch.batchprocessworkprovider split work several parallel transasction. if don't want archive nodes, can speed process adding cm:temporary aspect every node before delete it. alfresco cmis

mongodb - Return only array value in mongo projection -

mongodb - Return only array value in mongo projection - is there way homecoming value of property in mongodb projection? instance, have document has property value array. want homecoming object query array only, not property: [ .. ] . example: document: db.test.insert({ name: "andrew", attributes: [ { title: "happy"}, { title: "sad" } ] }); query: db.test.find({name: "andrew"},{attributes:1, "_id":0}); that returns: { "attributes" : [ { "title" : "happy" }, { "title" : "sad" } ] } i want homecoming on array: [ { title: "happy"}, { title: "sad" } ] is there way that? thanks json doesn't allow toplevel array normal query doesn't allow this. can aggregation framework: > db.test.remove(); > db.test.insert({ name: "andrew", attributes: [ { title: "happy"},...

isolation level - SQL Server IsolationLevel.ReadUncomitted dangers -

isolation level - SQL Server IsolationLevel.ReadUncomitted dangers - i'm doing next in readuncommitted transaction on mulitple thread, in old system: each thread unique set of info work on. there never duplicates across these threads. the threads gather info bunch of tables (only reads) unique info set. based on gathered info each thread create n number of new entities, emails, in memory later writing. then each email entity threads have check if email entity exists in table, avoid duplicates. involves comparing x number of columns. afterwards threads write email entities not exist, knowing clean inserts threads , application ones can write these type of email entities , threads work on unique info sets. then threads commit. now know not pretty design, it's big task refactor entire system. reason threading purely gain improve performance. my question is: are there dangers in using readuncommitted isolationlevel in case? i've been reading on ...

SQL Server - how to use derived table for calculated field? -

SQL Server - how to use derived table for calculated field? - i'm trying utilize calculated field value in clause in query, , after research know need create derived table. i'm not sure syntax however, since calculated field uses case statement like: case t.isreassigned when 1 datediff(minute, (select top 1 sxavwftaskhistory.createdwhenutc sxavwftaskhistory taskid = t.taskid , statusid = 7 order taskhistoryid desc), sysdatetimeoffset()) else case stat.statusid when 1 datediff(minute,tsk.createdwhenutc, sysdatetimeoffset()) -- time duration between when task created(use sxavwftask.createdwhenutc) , when 2 datediff(minute,tsk.createdwhenutc, sysdatetimeoffset()) -- time duration between when task created(use sxavwftask.createdwhenutc) , else datediff(minute,tsk.createdwhenutc, th.createdwhenutc) end end taskitema...

jquery - Set width no higher than 100% -

jquery - Set width no higher than 100% - how set width never goes higher 100% based on variable value? var progbarvalue = $(this).find('.days-due').text(); $(this).find('.bar').width(progbarvalue +"%"); i need width value clamp maximum of 100%. for example: if progbarvalue returns 250% width still 100%. i think have modify variable since width attribute can >100%. var progbarvalue = $(this).find('.days-due').text(); progbarvalue = progbarvalue > 100 ? 100 : progbarvalue; $(this).find('.bar').width(progbarvalue +"%"); jquery