Posts

Showing posts from January, 2011

python - RUnning shell script through sqlplus -

i logged in oracle in prod env , have requirement run shell scripts on remote hosts while in sqlplus. trying via python. there way it? i able run sql scripts or sql commands sqlplus following :- session = popen(['sqlplus','-s','abc/abc@'+str(hostname)+':1000/'+str(dbname)+''], stdin=pipe, stdout=pipe, stderr=pipe) session.stdin.write('spool '+str(op_file)+' \n' ' '+str(data)+ '\n'); session.stdin.write(' ; \n') session.stdin.write('exit \n') session.stdin.flush() stdout, stderr = session.communicate() but when want run shell script there way of doing through sqlplus itself, coz other way of logging in via ssh , sudoing in oracle not possible i think 1 of ways of doing using plsql:- http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm but not sure. sql*plus client application. can spawn processes on client machine

Rails generate scaffold is auto populating records -

i ran generate scaffold , 12 records on view filled 'mystring' data. how can stop generator auto populating records? id account name created @ 1 mystring 2 mystring 3 mystring 4 mystring ... 12 mystring delete fixtures, if @ these files more closely have "mystrings" in them. and/or delete in testhelper fixtures.

c# - Modify Sharepoint non publishing default page content programmaticaly -

i need modify content of default.aspx page of on 100 sharepoint 2010 sites make slight change in content of page. because of number of sites, programmatically, either in powershell, or through programming console application or along lines. i've found plenty of sites/blogs describe how default page in pages library, doesn't work me though sites have publishing feature activated, there're no files in pages library, , far can tell it's not wiki page. the issue i'm trying fix in listviewxml tag of lists on homepage isn't formed right. has 2 ?'s (query strings) in url, , want replace every instance of "?rootfolder=" "&rootfolder=" so far i've tried running c# console , i've been able locate default.aspx file, content isn't of content, structure. using (spsite sitecollection = new spsite("my_site_url")) { spwebcollection sites = sitecollection.allwebs; foreach (spweb site in sites) {

php - javascript - add form input based on selected dropdown -

Image
this first time working javascript , looking @ jquery , wasn't sure for. in past have submitted form , used & post variables create correct table project bit more complex , have dynamic form. what i'm trying add additional table rows for cpu, ram , hdd based on case , motherboard selected. data being returned json api. i'm not looking free coding, need pointed in right direction. screenshot: try jquery append add new data cpu, ram , hdd drop downs. http://api.jquery.com/append/

perl - Provision of switching Devel::Cover on/off -

while using devel::cover in test code tests codea, devel::cover have option of switching coverage off. there way switch coverage module on or off per user? test code tests codea. devel::cover commands embedded in test code whenever codea commands tested. does devel::cover include provision coverage collection can switched on or off? there way turn coverage on , off @ runtime, seems have forgotten document it. however, tested, can see how use there: https://github.com/pjcj/devel--cover/blob/master/t/internal/criteria.t this isn't same if devel::cover had never been loaded, rather stops devel::cover collecting coverage information criteria turned off.

c - Using function returning pointer as lvalue -

say want dynamically allocate array can hold data, i.e. using void** type, in c. then, rather re-writing pointer arithmetic logic each time, want simple function returns address of element. why cannot use function in assignment (i.e., can set, element's value)? here's example code: #include <stdio.h> #include <stdlib.h> void printintarray(void** array, size_t length) { printf("array @ %p\n", array); while (length--) { printf(" [%zu] @ %p -> %p", length, array + length, *(array + length)); if (*(array + length)) { printf(" -> %d", *(int*)*(array + length)); } printf("\n"); } } void* getelement(void** array, size_t index) { return *(array + index); } int main(int argc, char** argv) { const size_t n = 5; size_t i; /* n element array */ void** test = malloc(sizeof(void*) * n); = n; while (i--) { *(test + i) = null; } /* set element [1] */ int testdata = 123;

android - Single Activity with Multiple Fragments and Screen Orientation -

i'm dealing issue android & it's re-creation cycle on screen rotation: i have 1 single activity , lots of fragments (support-v4) within. example, login it's on single activity fragment, when logs-in app changes it's navigation behavior , uses multiple fragments, did this, because passing data between fragment fragment b it's way easier passing data between activity activity b. so issue it's presented when rotate device, on first approach, initial fragment loaded, happen, if user it's on page 15 , rotates it's device, return fragment 1 , give bad user-experience. set fragments retain instance , added on mainactivity on create: @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.main_layout); initbackstackmanager(); initcontrollers(); maydownloaddata(); settitle(); if(savedinstancestate == null){ a

javascript - Firefox Add-on SDK getting the tab ID -

i'm trying build firefox add-on using sdk (version 1.6), i'm running issue tabs extension opening. i obtain tab acontext (node) on. so, i've been 'getting' node's window, using tab utils in sdk, gettabforcontentwindow() . doesn't work, tab returned gettabforcontentwindow() null. there better, more robust method node's tab? also, noticed on the tab utils page , states it's 'unstable'. should avoid using tab utils sdk? below code main.js: const {cc, ci, cr, cu, cm, components} = require("chrome"); const { xpcomutils } = cu.import("resource://gre/modules/xpcomutils.jsm"); var winutils = require('sdk/window/utils'); var tabutils = require('sdk/tabs/utils'); let policy = { classdescription: "my content policy", classid: components.id("{2da54eca-fbdd-11e3-b3b1-695c1d5d46b0}"), contractid: "@www.com/policy;1", xpcom_categories: ["content-policy&

android - how to make actionbar and tabs transperant -

Image
to keep google's new i've tried make 2 top bars transparent , hasn't worked out ie. errors/ no change occurs here's activity make tabs (not sure if should set or not) @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mtitle = mdrawertitle = gettitle(); // load slide menu items navmenutitles = getresources().getstringarray(r.array.nav_drawer_items); // nav drawer icons resources navmenuicons = getresources() .obtaintypedarray(r.array.nav_drawer_icons); mdrawerlayout = (drawerlayout) findviewbyid(r.id.drawer_layout); mdrawerlist = (listview) findviewbyid(r.id.list_slidermenu); navdraweritems = new arraylist<navdraweritem>(); // adding nav drawer items array // home navdraweritems.add(new navdraweritem(navmenutitles[0], navmenuicons.getresourceid(0, -1))); navdraweritems.add(new navdraweritem(navm

c++ - Assertion failed (image.type() == CV_32F). GPU convolution. OpenCV -

i got error when tried use gpu convolution. opencv error: assertion failed (image.type() == cv_32f) in cv::gpu::convolve, file d:\opencv\sources\modules\gpu\src\imgproc.cpp, line 1413 i've converted image type cv_32 have issue. have similar issue when using gpu::filter2d. (i have no problem using sobel or gaussianblur in gpu.) however, when in main: int a=image.type(); value of 21. not cv_32f. please let me know how resolve issue! need help!! thank you!!! using namespace cv; using namespace std; int main() { // read kernel text file int kernel_size=15; ifstream fin; fin.open ("psf00.txt"); float kernel0[15][15]; (int i=0; i<kernel_size; i++) { (int j=0; j<kernel_size; j++) { fin >> kernel0[i][j]; } } // save 2d kernel array mat format mat kernel = mat(kernel_size, kernel_size, cv_32f, kernel0); // load image mat image = imread("blurry_00.jpg"); image.convertto(image, cv_32f); /

javascript - Refresh DIV before heavy computation -

this keeps bugging me , although there's lot of "refresh div jquery" questions out there, none addresses (haven't found it, is) simple matter : how refresh (visual aspect) div before doing heavy lifting calculations? idea simple, i'm creating big chart d3 takes couple of seconds generate , want able put animated gif in overlay before computation , remove after. : $("#test").empty(); $("#test").text("should seen while waiting"); (var i=1;i<2000000000;i++) { //draw heavy svg in #test takes time } $("#test").empty(); $("#test").text("ready"); $("#test").css("color", "red"); simple, haven't been able far : "should seen while waiting" never appears :( a simple fiddle here demonstrates behaviour : http://jsfiddle.net/stephmatte/q29gy/ i tried using settimeout , jquery's .delay() in 3 different browsers, no avail. thanx input. try thi

PHP Sockets - Store User login -

hey there i'm trying implement php socket service used simple shoutbox. shoutbox has simple login form , authentication system based of sessions. when user logins post requests gets made comparing values database , if valid create session under user. since these sessions stored on clients computer wondering how php socket able obtain these when it's running on server. php socket running on server , try obtain session server session stored on users pc on login. i have shoutbox running in php , html5 sockets issue login step i'm not entirely sure how do. info: cookies stored in browser, sessions stored on server. in case store session id in database , pass along socket call, can verify database. issues login on web (http) , using session within socket passing session id http socket reused on computer , fake successful login. login on http expires after time, not mean socket connection has ended ending socket connection not log out http secur

Open info window in finder by applescript -

i've problems find correct apple script command: want open info window given file or folder. it's window can open via cmd+i in finder. want able automate action script file. code looks this: set afile posix file "/users/xyz/documents/test.rtf" tell application "finder" open information window of afile but doesn't work. error message says file "information window of macintosh hd:users:xyz:documents:test.rtf" cannot opened. some commands picky posix file. can coerce else , work... set afile (posix file "/users/xyz/documents/test.rtf") alias tell application "finder" open information window of afile or set afile (posix file "/users/xyz/documents/test.rtf") text tell application "finder" open information window of file afile

php - Creating a beta version of site on subdomain -

i have website have been working on while. time have been editing live website files on web server development. realized stupid edit live site. "quick" solution copy example.com beta.example.com. edit beta subdomain , when have feature release, copy , replace existing code on example.com site. great. that great if work. i'm having troubles .htaccess files both domains , url rewriting. for example.com site, use .htaccess so: (there handful of pages on site) rewriteengine on rewritecond %{http_host} !^example.com$ [nc] rewriterule ^(.*)$ http://example.com/$1 [r=301] rewritecond %{request_uri} ^/recent rewriterule ^ recent.php [nc,l] rewritecond %{request_uri} ^/about rewriterule ^ about.php [nc,l] rewritecond %{request_uri} ^/category/(.*)/(.*) rewriterule ^ category.php?id=%1&name=%2 [nc,l] rewritecond %{request_uri} ^/category/(.*) rewriterule ^ category.php?id=%1 [nc,l] the problem beta.example.com site redirects regular example.com. removes beta su

Dynamically modify id within html tag using embedded ruby -

how can dynamically set id within html tag? specifically, i'm trying this: <td <% "id=unit_" + unit.id.to_s %> > *content goes here* </td> where unit.id integer variable. can used embedded ruby (i.e. <% %>) within html tag this? if not, how else can achieve i'm trying do? <td id="<%= unit.id.to_s %>">...</td>

java - Browser can't connect with spring4 websocket server -

in working spring mvc 4.0.5 project running under tomcat 7.0.50,following the tutorial . in eclipse console (catalina log) when start tomcat, appear rows mapped url path [/websocket.ws] onto handler of type [class org.springframework.web.socket.server.support.websockethttprequesthandler] i got error "firefox can't connect ws://localhost/books/websocket.ws" [http/1.1 404 not found 6ms] firefox web console. my configuration: web.xml <?xml version="1.0" encoding="utf-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <display-name>archetype created web application</display-name> <context-param> <param-name>contextconfiglocation</param-name&g

Reinstalling python on CentOS to be able to use yum -

i messed big time , removed python package on centos server. after realized yum dependant on python , no longer use yum. think need reinstall python fix problem. how can without using yum? tried: sudo wget http://mirror.centos.org/centos/6/os/x86_64/packages/python-2.6.6-51.el6.x86_64.rpm then sudo rpm -ivh python-2.6.6-51.el6.x86_64.rpm but i'm getting error: error: failed dependencies: python-libs(x86-64) = 2.6.6-51.el6 needed python-2.6.6-51.el6.x86_64 python < 2.6.6-52.el6 conflicts python-devel-2.6.6-52.el6.x86_64 please suggestion? i think might need download python-2.6.6-52.el6.x86_64.rpm instead.

sql - How to find least of two columns and order by the result? -

i find least of 2 columns. did following.. select sname, least(nvl(m1,9999999),nvl(m2,9999999)) "least mark" student; but now, order results least mark couldn't do.. select sname, least(nvl(m1,9999999),nvl(m2,9999999)) "least_mark" student order least_mark; since there no such column called least_mark existing in table. you can use subquery: select s.* (select sname, least(nvl(m1,9999999),nvl(m2,9999999)) least_mark student ) s order least_mark;

vb.net - How To Declare / Store "12:00:00 AM" in a DateTime Variable? (Through military time) -

i have code: dim twelve_amtoday datetime = new datetime(datetime.now.year, datetime.now.month, datetime.now.day, 24, 0, 0) but says "hour, minute, , second parameters describe un-representable datetime." of course 23, 59, 59 read 11:59:59 pm. i've tried 0, 0, 0 gives me date only. thanks help! you when use today dim twelve_amtoday datetime = today if want add days put code under it. twelve_amtoday = twelve_amtoday.addyears(0).addmonths(0).adddays(1)

Jaccard similarity calculation in recommenderlab package of R -

what role of parameter 'alpha' in recommenderlab r package's use of jaccard method in recommender model boolean user-preferences matrix? ie method="jaccard",param=list(...,alpha=0.5) i saw code ibcf , used dissimilarity function. function not defined in official cran pdf recommenderlab package. please help? it function defined in recommenderlab. try: library("recommenderlab") ? dissimilarity

Using Powershell to Change Assignee and Add Comment to Issue via JIRA REST API -

for seemingly simple i'm having no luck updating jira issues via rest api. has been able update jira issues using powershell? i've pretty exhausted options on stackoverflow , atlassian's website. no scripts curl, invoke-restmethod or invoke-webrequest have done returned errors. retrieving info issue not problem. changing it... holy cow. i'd immensely grateful if me find way solve this. thanks! function convertto-base64($string) { $bytes = [system.text.encoding]::utf8.getbytes($string); $encoded = [system.convert]::tobase64string($bytes); return $encoded; } function get-httpbasicheader([string]$username, [string]$password, $headers = @{}) { $b64 = convertto-base64 "$($username):$($password)" $headers["authorization"] = "basic $b64" $headers["x-atlassian-token"] = "nocheck" return $headers } function add_comment([string]$issuekey,[string]$comment) { $body = ('

html - Map tag not working -

i'm running small problem whilst creating image maps. have slideshow (created using wowslider) , image maps not work when loaded. think have call image maps js somewhere i'm not quite sure how to. any appreciated. html: <link rel="stylesheet" type="text/css" href="engine1/style.css" media="screen" /> <script type="text/javascript" src="engine1/jquery.js"></script> <div id="wowslider-container1"> <div class="ws_images"><ul> <li><img src="data1/images/bebek.jpg" alt="bebek" title="bebek" id="wows1_0" usemap="bebekmap1"/></li> <li><img src="data1/images/dis.jpg" alt="dis" title="dis" id="wows1_1"/></li> <li><img src="data1/images/dogum.jpg" alt="dogum" title="dogum" id="wows1

objective c - Passing json to request body using restkit in ios -

i using restkit in application post /get webservice. having nested json want post request body of api. have used following code pass json request body of service when run application returns null in request body. this nested json want pass request body { amount = { currency = inr; value = 1; }; merchantaccesskey = udnirnirfbnrirn; merchanttxnid = sssscdcdcdedff; notifyurl = ""; paymenttoken = { paymentmode = { cvv = 968; expiry = “11/20”; holder = axis; number = xxxxxxxxxxxx; scheme = asxsc; type = debit; }; type = paymentoptiontoken; }; requestsignature = abgd9456fef7b3f9023232734706; returnurl = "https://www.example.com/"; userdetails = { address = { city = ""; country = ""; state = ""; street1

Relational algebra for banking scenario -

i have situation nowhere. don't know how solve relational algebra questions. deposit (branch, acc-no, cust-name, balance) loan (branch, loan-no, cust-name, balance) branch (branch, assets, branch-county) customer (cust-name, cust-county, branch) produce relation shows branch, customer name, balance , account number customers have loan bigger £2500.00 , customers have deposit account balance smaller £100.00. customers should @ romford branch. this came far. correct? Ï€ branch, acc-no, cust-name, balance ( σ(loan.balance > 2000 ∧ branch='romford')(loan) ∪ σ(deposit.balance < 150 ∧ branch='romford')(customer ∩ deposit) ) correct ansers is: Ï€ branch, cust-name, balance, acc-no, (σ balance < 100^branch=”romford” (deposit)) ∪ Ï€ branch, cust-name, balance, loan-no, (σ balance > 2500 ^branch=”romford”(loan)) given statements. every table/relation has statement parameterized columns/attribute

Trouble importing foundation into swift... Xcode 6 beta -

i brand new xcode. thank reading this. i'm attempting used language, i'm messing code importing foundation , creating simple nsrect. however, i'm getting error when try create nsrect. here's code: import foundation import uikit let rect = nsrect(x: 50, y: 50, width: 100, height: 100) and receive error saying "use of unresolved identifier 'nsrect"." doing incorrectly? thank help! use cgrect instead of nsrect . nsrect cocoa , if project mac app use import cocoa . import foundation import uikit let rect = cgrect(x: 50, y: 50, width: 100, height: 100)

magento - How to add IndexController in admin -

<?php class main_contacts_adminhellocontroller extends mage_adminhtml_controller_action { public function indexaction() { $this->loadlayout(); //create text block name of "example-block" $block = $this->getlayout() ->createblock('core/text', 'example-block') ->settext('<h1>this text block</h1>'); $this->_addcontent($block); $this->_setactivemenu('main')->renderlayout(); } } if wrote code okay, when use setformaction instead of createblock causes error , want use method in admin section. indexcontroller.php public function indexaction() { $this->loadlayout(); $this->getlayout()->getblock('contactform') ->setformaction( mage::geturl('*/*/post') ); $this->_initlayoutmessages('customer/session'); $this->_initlayoutmessages('catalog/ses

c# - Transfer specific datatable contents to another array -

i'm trying transfer datatable contents array. going specific fields datatable, not know how save specific columns content array. what did: dr = superviewbll.getsomestuff(); string[] new_array; if (dr.rows.count > 0) { (int = 0; < dr.rows.count;i++ ) { new_array[i] = dr.rows[i]['stufflocationid']; // know wrong } } how can column stufflocationid array new_array? that line right, except need double quotes rather single , need cast/convert value type string put string array: new_array[i] = (string) dr.rows[i]["stufflocationid"]; or, if data nullable: new_array[i] = dr.rows[i]["stufflocationid"] string; the issue array doesn't exist because haven't created it. in order create array have know size. if haven't specified size, either implicitly or explicitly, haven't created array. this: string[] n

php - Symfony 2.5 prints cache header -

i using symfony 2.5. return view template page controller. however, when render page, displays raw cache first part in <body> tag. http/1.0 200 ok cache-control: no-cache date: thu, 26 jun 2014 06:07:05 gmt [] i googled , found this answer (which similar problem) , this answer (which vaguely same). so tried of following 1 one. nothing worked. return $this->render('mybookbundle:section:splash.html.php' , $this->data); and echo $this->renderview('mybookbundle:section:splash.html.php' , $this->data); return new response(); and $displaypage = $this->renderview('mybookbundle:section:splash.html.php' , $this->data); return new response( $displaypage ); and $displaypage = $this->render('mybookbundle:section:splash.html.php' , $this->data); return new response( $displaypage->getcontent() ); my webpage in simplest possible stage. <!doctype html> <html xmlns="http://www.w3.org/1999/

asp.net mvc - Testing issues with MVC Controller using IOC -

i testing controller code using ioc unity. issue initialisation of model passing constructor of controller. here code in test project [testmethod] public void testhomecontrollerindexmethod() { homecontroller controller = new homecontroller(new stubpeopleservice()); viewresult result = controller.index() viewresult; assert.areequal(0, result); } below code of stubpeopleservice have created pass controller constructor above public class stubpeopleservice : ipeople { public int age { get; set; } public string birthplace { get; set; } public datetime dateofbirth { get; set; } public int getage(datetime reference, datetime birthday) { int age = reference.year - bi

android - Issue in Facebook login -

Image
i trying email id facebook,using facebook sdk tried integrating stuff went terribly wrong , not getting email id facebook.:( i think followed procedure of getting app id , sort of stuff. error apiexception:key hash +axk1tuwwib/3ldt7xi3mzkaorm not match stored key hashes. this exception getting, after lot of googling not able find hash key stuff please me sort out. you need create keyhash debug , put in facebook settings page this line creates debug key hash: keytool -exportcert -alias androiddebugkey -keystore %homepath%\.android\debug.keystore | openssl sha1 -binary | openssl base64 when prompts password, password android and put keyhash in settings in facebook app you should every computer working on app on.

c# - How to ensure ConfigurationManager points to correct App.config -

recently created new class library project , added app.config file it. app.config file contains db connection string. current code configurationmanager.connectionstrings["dbconnectionname"] gives me "null" . but configurationmanager.connectionstrings[0] gives me result name "localsqlserver" . app.config not have entry this. i don't see other config files in project . why happening ? how ensure pointing correct app.config? app.config , other config files read entry point of program. thus, if application, app.config file stored in windows application project read. localsqlserver default sql server when no other connection string defined. reason why exists inside connectionstrings property.

Nginx + LUA, how to output file? -

having trouble file output in nginx + lua. chosen lua, because nginx logic pretty complicated, based on referrer or subdomains, etc. having request /img/am1/s/1.jpg need check if file exists in /somepath/am1/1.jpg. if exists, output it, otherwise proxy request backend. ok, found it content_by_lua ' local file = "/path..." local f = io.open(file, "rb") local content = f:read("*all") f:close() ngx.print(content) ';

java - Need a regex to extract a substring -

i struggling figure out decent way extract substring below string. inputs: invoice 1800000173 of 06/18/2014/150 usd discnt 07/02/2014 invoice 1200000000 of 02.04.2014/150 details the above 2 possible combinations. expected output: invoice 1800000173 of 06/18/2014 invoice 1200000000 of 02.04.2014 there similar question asked here - regex date string didn't me here. suggestions ? "invoice (\d+) of (\d\d[./]\d\d[./]\d{4})" two capturing groups, first of 1 or more digit invoice number, second date portion. escaping backslashes need done appropriately.

Gradle 1.12 - Why tasks are not executed -

i'm using gradle wrapper build java project. recently upgraded gradle wrapper version 1.0.3 milestone 1.12. my build.gradle looks this: apply plugin: 'java' <some extensions java plugin tasks> ... ... ... task package(type: zip) { group = "package" destinationdir = file("./install") basename = "serverpackage" version = project.version into('someproject/bin') { from('./bin') { include '**/*.*' } } into('someproject/config') { from('./config') { include '**/*.*' } } into('someproject/config') { from('./src/main/resources') { include '**/*.*' } } into('someproject/lib') { configurations.runtime } } when run command 'gradlew build' 1.12 version, reason (don't know why) task package not execut

android - Application crashes in loading C++ jni library dynamically linked with openss-1.0.1h -

i using c++ library. dynamically linked openss-1.0.1 h libraries(i.e libssl.so, libcrypto.so) , openssl libraries pre-built. problem when try load library using android application, application crashes. , in log cat can see reason - "could not find libssl.so.1.0.0 needed libabc.so" i haven't called system.loadlibrary() openssl libraries, called c++ library. this issue never works when use dynamic linking of openssl-1.0.0 or static linking of openssl-1.0.1h. i don't know how resolve issue. can 1 me regarding this? i did following load library - system.loadlibrary("ssl"); system.loadlibrary("crypto"); system.loadlibrary("abc"); it looks have 2 problems. first linking against openssl; , second finding library in apk. i using c++ library, dynamically linked openss-1.0.1 h libraries... here first problem. android's equivalent of init zygote . zygote loads platform's version of openssl. when zygote fo

How to model multiplicative effect of parameters/fit data at individual predictor level -

i having difficulty in fitting model on data. basically, have data evaluation of phenotypic property (i.e. hard) of 65 palm trees 5 judges. evaluation scheme, each judge provides score each sample. 3 judges sample data this: judge product hard aa 1 5 ab 1 6 ac 1 3 aa 1 7 ab 1 5 ac 1 4 aa 2 5 ab 2 8 ac 2 6 aa 2 7 ab 2 4 ac 2 4 yij=αi+βiθj+εij = judge, j = product here, αi judge main coefficients, i judge coefficients due difference in scoring pattern , θj product coefficients , εi assessor dependent. i trying fit model using lme function in r, difficulty fac

Get text property in a word table using Vb.net WinForms -

i have vb.net application in winfoms can properties of cell in word tables. problem gets property of cell , not property per character. for example, line below in single cell. the quick brown f o x how can property of those? you need range of each word (or character) , check font: dim cell word.cell = tb.cell(row, col); dim cellrng word.range = cell.range; you can loop each word way: for each rngword word.range in cellrng.words if rngword.bold '... end if next be sure add: imports microsoft.office.interop

mysql - Explain select output on a complex query that I didn't write -

Image
i'm working on codebase didn't write , we're getting bad performance on our sql queries, thought we're missing indices, having badly-written queries, etc. using mysql. can see way query name of genres instead of kind of genre id db mess. trying explain query figure out why query biggest offender in terms of run time. explain select count(v.id) cnt non_detail_video_views vv join video v on vv.video_id = v.id join video_sub_category c on v.video_sub_category_id = c.id date(from_unixtime(vv.created_date)) = '2014-06-25' , c.sub_category_name in ('rap','r&b','country','pop','metal','rock' ,'edm','christian','alternative','jazz','blues' ,'reggae','classical','folk','trance') group vv.video_id order vv.created_date desc; i asked guy d

c++ - Effective combination algorithm to pass the time limit -

i doing practice programming problem , got stuck pass time limit on problem. there effective algorithm pass time limit? i have sorted array, think this's still not helping much. here's pseudocode: sort boxa sort boxb in boxa: j in boxb: if i+j < value: break else if i+j > value: count+=1 print count set count = 0 the question asking output how many combination of boxa + boxb greater or equal value. input: 5 3 1200 #number of boxa | number of boxb | value 100 110 160 750 1030 #number of boxa 400 500 500 #number of boxb output: 5 explanation: there 5 ways combine boxa , boxb value >= value 1. 750 + 500 2. 750 + 500 3. 1030 + 400 4. 1030 + 500 5. 1030 + 500 boxa , boxb can have 500000 items in list. think kind of test case make time limit on algorithm. can show effective algorithm pass time limit problem? thank you. for each boxes a items in a, number

How (if possible) can I change the color option for the highlighted search results in eclipse (Moonrise theme)? -

Image
i've changed eclipse kepler (sr2) theme moonrise 0.8.9 now color of highlighted objects makes results barely visible. haven't found option modify either color of text, or color of background i've attached search view in preferences go to: general > appearance > colors , fonts > basic and change match highlight background color .

jquery - event not working when element reached top -

i want navigation animate top when scroll "ghost" or helper div window top. used this: $(window).scroll(function() { var y = $(".ghost").offset().top; var scrolly = $(window).scrolltop(); if (scrolly >= y) { $("nav").animate({margin-top: "-50px"}, 750); } else{ $("nav").animate({margin-top: "0px"}, 750); } }); but not bring desired result. when ghost div reaches top, there no effect on nav. fiddle here: http://jsfiddle.net/e8xj4/ in advance. change $("nav").animate({margin-top: "-50px"}, 750); to $("nav").animate({margintop: "-50px"}, 750); or $("nav").animate({"margin-top": "-50px"}, 750); from jquery's css documentation : jquery can equally interpret css , dom formatting of multiple-word properties. example, jquery understands , returns correct value both .c

d3.js - Show labels conditionally on multi series line chart -

in d3 example of multi series line chart , series labels shown on right of graph. i'm interested in doing changing conditionally show on parts of chart, or not @ all. so using example, if wanted labels show @ max value on each series , same colour each series (perhaps this ), how go achieving that? can figure it'll block city.append("text") .datum(function(d) { return {name: d.name, value: d.values[d.values.length - 1]}; }) .attr("transform", function(d) { return "translate(" + x(d.value.date) + "," + y(d.value.temperature) + ")"; }) .attr("x", 3) .attr("dy", ".35em") .text(function(d) { return d.name; }); but can't work out. i've tried using indexof or maxof features, can't either work in context. aware might cause overlap on graph, though can deal later. bonus points can show how add in conditional labels lines point max well. thanks :) without paying att

reporting services - How to develop client side SSRS report using Reports Builder 3.0 and embed in ReportViewer? -

sorry being newbie ssrs. my design goal: near term: develop - using ssrs - simple client side (no reporting server!) report - based on ms sql data tables, , embed .net wpf client (application) long term: additional reports, hire external ssrs experts, provide reports developed, , integrate them same wpf application. i managed 2 things: develop simple report connecting ms sql, using reports builder 3.0 - result, rdl file generated (the file contains db connections) embed reportviewer winforms control wpf application. unfortunately, wasn't able load report developed, application. i understood articles on new rdl not designed support client-side execution (without server), , rdlc should used instead. however, wasn't able figure out how conver report rdlc, using reports builder - not give me option save in different format. i appreciate hint experienced people on how accomplish goal. specifically, should use rdlc, , if positive - what's way report in