Posts

Showing posts from August, 2010

Make clang-complete in vim to autocomplete after any input -

how make clang_complete automaticaly complete not after ., -> , ::, after first 3 characters of word exampe? this isn't supported clang_complete out of box, here example of how implemented (this rather a proof of concept rather working solution): autocmd cursormovedi *.h,*.c,*.hpp,*.cpp call fastinvoke() function! fastinvoke() let l:col = col('.') if l:col == 1 || len(expand('<cword>')) != 0 return endif let l:line = line('.') call cursor(l:line, l:col - 1) let l:wordlen = len(expand('<cword>')) call cursor(l:line, l:col) if l:wordlen == 3 call feedkeys("\<c-x>\<c-u>") endif endfunction it measures length of string returned expand('<cword>') , returns 0 @ end of word. bad thing try complete everything, might lot of failed complete messages , low performance.

java - Open Type (Ctrl+Shift+T) in Eclipse from every window -

if type ctrl + shift + t in eclipse , open type window opens. works if in java file (or in package explorer area). i want open same window when press ctrl + shift + t regardless of resource (e.g.: if open file .js, .class or .xml). how can achieve this? details : operating system: windows 7 ide: eclipse luna (4.4) i tried to: go window > preferences > general > keys > type "open type" / "ctrl+shift+t" let following line ctrl+shift+t / open type : command: open type binding: ctrl+shift+t when: in windows category: navigate but doesn't work. you should filter binding, not command: go window > preferences > general > keys type "ctrl+shift+t" press unbind command bindings except 1 described above after applying changes, "open (java) type" dialog should open when in javascript editor.

How to fit 4 columns in 3 column HTML table? -

i don't know how word question i'm working on table , has 3 columns everywhere want fit 4 cells in 1 row width remains same. how do it? mean: ------------- | 1 | 2 | 3 | ------------- | 1|2 |3|4| ------------- is after? outer columns 33% width fits width of screen. inner columns of table set 25% width fits within 33% columns. have given each column different color border can see how looks. .column1, .column2, .column3{width:33.3%; font-family: gotham, "helvetica neue", helvetica, arial, "sans-serif";padding:5px 0px;} .column1{border:1px solid #ff0000;} .column2{border:1px solid #fff000;} .column3{border:1px solid #000000;} <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="column1"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbo

web services - Can you use IIS 7.5 filtering for AlwaysAllowURLs with a wildcard or pattern? -

have of see how allowed urls in iis filtering/request settings wildcard? can match pattern? i need filter request, our rest web services follow name/action/parameter/id pattern , not have specific file extensions list "allowed". need list urls have lot. :( love use url pattern "/api/wsproject/*" , "allow urls this. is possible , how in iis 7.5 on win2k8 or higher? thank help.

javascript - How to display array data in AngularJS using ngGrid? -

i want display following array in nggrid $scope.pathinfo = ["28.86 gb left on dir1","28.86 gb left on dir2"] my controller looks this: $scope.restorepathgridoptions = { data: '$scope.pathinfo', columndefs: [ {field: 'entry', displayname: 'free space paths'} ] } and html: <div id="restorepathsgrid" class="gridstyle" ng-grid="restorepathgridoptions"> i assuming 'entry' data value of array @ indices 0 , 1. but grid not show @ all. any ideas why? data: '$scope.pathinfo' $scope not needed here. also, if want field entry in example, have use array of objects

jquery - li click event not working -

hi creating search box using li , input text. i want load page based on selected results of search box, whenever search result clicked. search result in form of li on binding below click event. somehow following click event not firing $("li").click(function(){ alert("hi"); alert($(this).text()); return false; }); see js fiddle more details: http://jsfiddle.net/amitsant/2zhk209v/3/ just listen mousedown instead of click . happens because click waits mouseup event, never triggered because blur comes first, hiding panel. $("li").mousedown(function(){ ... working fiddle: http://jsfiddle.net/3umj3fup/

html - what would be the regex for 0 through 10 accepting decimals in .1 increments? -

i dont know how use javascript reason why im using regex. using foundation's abide component. know how can validate 0 through 10 accepting decimals in .1 increments? so 1.2 3.8 accepted 11 5.88 not accepted <div class="small-6 columns"> <input type="number" class="small-3 small-offset-3 columns" required pattern="([0-9]|10)"> </div> use pattern ^((?:[0-9]|10)(?:\.[0-9])?)$ demo per m42's correct comment (+1), use modified pattern ^((?:[0-9](?:\.[0-9])?|10(?:\.0)?))$ demo

jena - Pellet reasoning over XML Literals -

i using pellet reasoner jena. inserted data tdb store. have schema ontology in file , jena rules well. layered generic rule reasoner , pellet. however, getting inconsistent ontology error due literal datatypes, yet inserted data has same datatype schema definition. data: <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:resource="http://www.cs.kaist.ac.kr/medication/resource#" xmlns:time="http://www.w3.org/2006/time#" xmlns:medication="http://www.cs.kaist.ac.kr/medication/ontology#" xmlns:xsd="http://www.w3.org/2001/xmlschema#" > ....... <rdf:description rdf:about="http://www.cs.kaist.ac.kr/medication/resource#timedesc300"> <rdf:type rdf:resource="http://www.w3.org/2006/time#timedescription"/> <time:hour rdf:datatype="http://www.w3.org/2001/xmlschema#integer">3</time:hour>

html - PHP DOMXPath gives empty string for /@ID -

simplified html <tr> <td class="orderoverviewanothercolumn">0177-4066356</td> <a name="ordertablesorted:ordertable:10:j_id504" id="ordertablesorted:ordertable:10:j_id504" href="#"> </tr> <tr> <td class="orderoverviewanothercolumn">0177-4066357</td> <a name="ordertablesorted:ordertable:11:j_id504" id="ordertablesorted:ordertable:11:j_id504" href="#"> </tr> <tr> <td class="orderoverviewanothercolumn">0177-4066358</td> <a name="ordertablesorted:ordertable:12:j_id504" id="ordertablesorted:ordertable:12:j_id504" href="#"> </tr> <tr> <td class="orderoverviewanothercolumn">0177-4066359</td> <a name="ordertablesorted:ordertable:13:j_id504" id="ordertablesorted:ordertable:13:j_id504" href="#"> </tr> using follow

How would i vectorize that 'for' loop in Matlab? -

i have toy example: l = [1, 2, 3, 4, 5]; = zeros(3, 1); p = 1:3 a(p) = sum(l(p:p+2)); end; this example calculates sum of each 3 elements in 'l', close each other , writes in 'a'. now, possible rewrite same code using vectorization , matrix operations, without 'for' loop? have tried similar to: p = 1:3; a(p) = sum(l(p:p+2)); the result [6, 6, 6], have calculated sum of first 3 elements , wrote in 'a' on each position. toy example, need similar on 3d 256x256x128 array 20x20x20 cube elements sum, using 'for' loops slow there. so, there fast way solve problem? edit : divakar have suggested me use actual case here. well, here important part of it, trying rewrite: edit2 : thank answer. understood idea, removed code above, rewriting now. you're describing basic convolution: a = conv(l,ones(1,3),'valid'); % should have 3 elements for 3d, use convn in similar fashion ones(20,20,20)

Setting variables and taking effect in one batch command line -

i found out if following: set variable=test & echo %variable% --outputs "%variable%" echo %variable% --outputs "test" the change won't take effect until new line runs. need have take effect need use long, one-lined command. you need delayed expansion or call echo : @echo off setlocal enabledelayedexpansion set var=val&echo !var! endlocal set var=val&call echo %%var%% if have compositions of commands put & or in brackets set command take effect after of them executed.so need or delayed expansion (which allow access variables ! instead of % ) or call to enable delayed expansion in command prompt need start cmd /v:on : >cmd /v:on >set variable=test & echo !variable!

css - Calculate text height properly independently of font used to make a text element with a right arrow -

Image
i'm trying create label has right arrow. looks this: the code i'm using following (less): @font-size: 14px; @padding-top: 4px; @arrow-bheight: @font-size; .label { position: relative; font-size: @font-size; font-weight: normal; font-style: italic; text-transform: uppercase; padding: @padding-top 8px; line-height: 1; color: #fff; background: #000; &:after { content: ""; width: 0; height: 0; border-top: @arrow-bheight solid transparent; border-bottom: @arrow-bheight solid transparent; border-left: @arrow-bheight solid #000; position: absolute; right: -@arrow-bheight; top:0; } } my problem depending on font use, the arrow doesn't fit text font . i've been trying set specific value line-height , e.g. line-height: @font-size , it's not working. here's codepen of problem . how can make right arrow have proper height regardless of font used? there's no need defin

javascript - How to stop jQuery code block execution after first click -

i using jquery. every time clicking div associated class="panda", executing following code block. want execute first time click on div. code- $(document).ready(function(){ $('.panda').click(function(){ $('.panda').sprite({fps: 10, no_of_frames: 4}); }) }) hope guys me. use one : $(document).ready(function(){ $('.panda').one('click', function(){ $('.panda').sprite({fps: 10, no_of_frames: 4}); }); }); from jquery documentation: one(): attach handler event elements. handler executed @ once per element per event type.

ruby - Elimination of extra characters in a word -

i'm doing project requires removal of letters in word. if letter occurs 3 or more times consecutively, condense 1 letter -happyyyyyy -> happy -awwwsum -> awsum -cooool -> col i'm using ruby 1.8.7 this. how go this? here's how it: result = subject.gsub( /(.) # match single character, capture in group 1 \1{2,} # match same character 2 or more times, many possible/x, '\1') # replace 1 captured character result: > subject = "happyyyy daaaaays!!!" => "happyyyy daaaaays!!!" > result = subject.gsub(/(.)\1{2,}/, '\1') => "happy days!"

xcode6 - Swift Generics Console Output -

after enable class inside playground losing console output written above class. wrong ? , weirdly showing error 'expected pattern' @ switch statement sometime , later error goes away class cart<t> { var customername: string var customeremail: string var items: [t] var itemcount: int { return items.count } var promocode: string? = nil init(customername: string, customeremail: string){ self.customername = customername self.customeremail = customeremail items = [t]() } func add (item: t) -> () { items.append(item) } func clear () -> () { items.removeall(keepcapacity: false) } func remove (position: int) -> () { items.removeatindex(position - 1) } func getpromocodedisplay () -> (string) { if let x = promocode { return "your promo code \(x)" } else { return "you not have promo code"

Huffman compress file (Got the tree but can't compress)- Java -

alright trying file compress using huffman tree. we got tree working fine unable figure out how write binary string file. so example our tree returns: '110', should mean byte: '00000110' right? and if returns: '11111111 11111110' should mean what? should write in in byte? so question how convert binary string bytes can write on file? thanks alot, ara so example our tree returns: '110', should mean byte: '00000110' right? wrong. should have byte buffer of bits write bits. write 3 bits 110 byte. (you need decide on convention bit ordering in byte.) still have 5 unused bits in byte, there sits. write 10 buffer. byte buffer has 11010, , 3 unused bits. still sits. try write 111011 byte buffer. first 3 bits go byte buffer, giving 11010111. have filled buffer, write out byte file. left 011. clear byte buffer of bits since wrote out, , put in remaining 011 last code. byte buffer has 3 bits in it, , 5 bits unuse

vb.net - Issue with "Get" message with gmail api v1 (Net) -

im trying info of gmail message in datagridview returns datagridview empty (even when erase "return nothing" line) when try in apis-explorer 200 ok response. doing wrong? the code im using google developers documentation: imports google.apis.auth.oauth2 imports google.apis.services imports google.apis.tasks.v1 imports google.apis.tasks.v1.data.tasks imports google.apis.tasks.v1.data imports system.collections.generic imports google.apis.util.store imports system.threading imports system imports google.apis.gmail.v1 imports google.apis.gmail.v1.data public class form1 dim secrets = new clientsecrets() dim scope = new list(of string) dim initializer = new baseclientservice.initializer private sub form1_load(sender object, e eventargs) handles mybase.load secrets.clientid = "client_id" secrets.clientsecret = "client_secret" end sub public shared function getmessage(service gmailservice, userid [string], messagei

python - Is there a way to select more than one option in django admin filters? -

i have 2 questions, please answer can: question 1: in django admin, if have list_filters = ["book"] , , options "red carpet" & "bingo dinosaur" , can select 1 book @ time; either "red carpet" or "bingo dinosaur" . there way make user can select both @ same time? question 2: in django admin there way combine list_filter fields? if have list_filer = [" bookname", "bookauthor"] , there way make book name , author combined in 1 filter , search @ same time? for first question: i think it's possible. i've made quick test on admin interface users, , if play url querystring, can combine filters : /admin/auth/user/?is_superuser=1&is_superuser=0 list both super , non-super users. you'll have override admin filters template generate proper urls needs, though. i don't understand second question. mean combined ? if select item in first filter , item in second one, have combin

php - Undefined Index Error when using variable in if statement that is sometimes not set -

i use if statement $_get['av'] not set. when not set throws error. there way around this? if ($admin == 1 , ($_get['av'] == "0" or !isset($_get['av']))) yes, place second statement first. if ($admin == 1 , (!isset($_get['av']) or $_get['av'] == "0")) that way, if $_get['av'] isn't set, code never end referencing it, if-statement stopped @ isset , block won't execute because of false return value. also check out demorgan's law , how applies if statements. might clarify formatting of more complicated statements.

html - Images Not Displaying In Table -

Image
i working on assignment , need place images in table, isn't problem me. today when added images table displays square border alt text written in it. pretty sure pointing right directory. my folder structure is: website css fonts html (page table in here) js images (images table in here) @font-face{ font-family:customfont; src: url('../fonts/balkeno.ttf'); } * { margin: 0; border: 0; padding: 0; font-size: 12px; font-family: arial, sans-serif; } body { width: 100%; height: 300%; background-color: #d8d8d8; } nav { font-family: customfont; font-size: 30px; width: 100%; height: 40px; position: fixed; z-index: 50; } .nav-background { width: 100%; height: 100%; background: #12a7cb; opacity: 0; position: absolute; } .nav-content { position: relative; top: 50%; transform: translatey(-50%); } header { width: 100%; height: 320px; } #slideshow { position:relative; height:3

ssh - Vagrant stuck in "Waiting for VM to Boot" -

i want preface question mentioning have indeed looked on if not vagrant "waiting vm boot" troubleshooting threads: things i've tried include: vagrant failed connect vm https://superuser.com/questions/342473/vagrant-ssh-fails-with-virtualbox https://github.com/mitchellh/vagrant/issues/410 http://vagrant.wikia.com/wiki/usage http://scotch.io/tutorials/get-vagrant-up-and-running-in-no-time and more. here's how setup vagrant: note: using vagrant 1.2.2 since not @ moment have time change configs newer versions. using virtualbox 4.2.26. my office has /official/ folder includes things such vagrantfile inside. inside vagrantfile these custom settings: config.vm.box = "my_box" config.ssh.private_key_path = "~/.ssh/github_rsa" config.ssh.forward_agent = true config.ssh.forward_x11 = true config.ssh.max_tries = 300 config.vm.provision :shell, :inline => "/etc/init.d/networking restart" i installed ou

javascript - How to show a specific table from an HTML file with several tables when the html is called? -

i have problem. have html file 5 tables in it. don't know how call specific table when need it. example, need second table 5 tables in html file when call html file. in advance.. when need show/hide table can use below code <script type="text/javascript"> <!-- function show(id) { if (document.getelementbyid(id).style.display == 'none') { document.getelementbyid(id).style.display = ''; } } //--> <!-- function hide(id) { document.getelementbyid(id).style.display = 'none'; } //--> </script> by default can assign id , have values below <table id="tbla" style="display: none" cols="1" cellpadding="2">

Cakephp 2.5.1 form input order of values -

$getcities = $this->requestaction('objekts/getcities'); this returns me list ids , names of cities in alphabetical order. when debug $getcities can see alphabetical order. this way how select data: $results = $this->find('list', array( 'conditions' => array($and, $andzone), 'fields' => 'reg_id, reg_name', 'group' => 'reg_id', 'order' => array('reg_name asc') )); again, debug data in alphabetical order. but! echo $this->form->input('city', array('label' => __('nach ort suchen'), 'empty' => __('bitte wählen'), 'options' => $getcities, 'id' => 'city', 'class' => 'styled-select')); this changing order it's id's , not keep alphabetical order on city names. is there can add $this->form->input set order names instea

c# - Xamarin.forms android listviewrenderer -

i want use onscroll-listener listview, far know isn't buildin in xamarin.forms.listview. using renderer logic solution till saw xamarin.forms.android doesn't have listviewrenderer yet.. ios does, what alternatives? how can implement scroll listener or first visible view in other way? thnx! , actually there listviewrenderer unfortunately internal. might consider subclassing listview , create own viewrenderer based renderer. might lot of work. ask in xamarin forums and/or create uservoice request...

ios - xcode 6.0 brings a lot of errors and some strange questions about cocoa pods -

i build project , runs find in xcode 5.0. few minutes ago ,i update xcode latest version. project can run fine in xcode 5.0 cannot run in xcode 6.0. it has error: thread 1:exc_bad_access(code=2, address=0x7fff56bf2fd8) in sdwebimagedownloaderoperatin.m in sdwebimage. - (void)setexecuting:(bool)executing { [self willchangevalueforkey:@"isexecuting"]; self.executing = executing; [self didchangevalueforkey:@"isexecuting"]; } another question cocoa pods. latest version of sdwebimage in github 3.6. why search in computer used pod search sdwebimage, tells me latest version 3.5.2? thank much.

Fourier series - Plot in Matlab -

here m-file fourier series plot: clear clc syms n a0=input('enter coefficient a0: '); an=input('enter coefficient an: '); bn=input('enter coefficient bn: '); a=input('enter lower boundary: '); b=input('enter upper boundary: '); t=linspace(a,b,10000); suma=0; n=1:10 %% n number, bigger n - better approximation suma=suma+(subs(an,'n',n).*cos(2.*n.*pi.*t./(b-a))+subs(bn,'n',n).*sin(2.*n.*pi.*t./(b-a))); end series=a0+suma; plot(t,series) grid problem is, slow! should change in code in order inrease speed? edit: in reference macduff's comment: this? clear clc a0=input('enter coefficient a0: '); an=input('enter coefficient an: ','s'); bn=input('enter coefficient bn: ','s'); a=input('enter lower boundary: '); b=input('enter upper boundary: '); t=linspace(a,b,10000); suma=0; n=1:10000 %% n number, bigger n - better approximation ebn = evalin('caller',bn); ean

asp.net mvc - Saving file to App_Data doesn't seem to work when app is uploaded to Azure -

i have small mvc 5 app, , point works fine in localhost, when publish azure, parts doesn't work. example, have in view: <div class="form-group"> <div style="position:relative;"> <label>image</label> <a class="btn" href="javascript:;"> choose file... <input type="file" name="image" accept="image/jpeg, image/png" style="position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0); opacity:0;background-color:transparent;color:transparent;" onchange='$("#upload-image-info").html($(this).val());' /> </a> <span class="label label-info" id="upload-image-info"></span> </div> </div> so, in server side have this: public actionresult servicerequest(requestviewmodel r

sonarqube - Analysis Bootstrapper for Visual Studio Projects Plugin broke Sonar 4.4 -

i have upgraded sonar latest version 4.4. worked yesterday. today, when try install analysis bootstrapper visual studio projects plugin , restart sonar service (on windows server 2012), fails repeatedly. i went extensions/plugins folder , manually removed analysis bootstrapper jar file, launch sonar console mode, still fails. does have similar problems? appreciated. here's error can read sonar.log file: 2014.09.22 16:08:25 error [o.s.s.p.platformservletcontextlistener] fail start server org.apache.ibatis.exceptions.persistenceexception: ### error querying database. cause: java.lang.illegalstateexception: es update not completed within: 30000ms ### cause: java.lang.illegalstateexception: es update not completed within: 30000ms @ org.apache.ibatis.exceptions.exceptionfactory.wrapexception(exceptionfactory.java:26) ~[mybatis-3.2.7.jar:3.2.7] @ org.apache.ibatis.session.defaults.defaultsqlsession.select(defaultsqlsession.java:130) ~[mybatis-3.2.7.jar:3.2.7] @

c# - Rest Call "Unable to Cast Type Base to Class Derived" -

on server side, have following structure - [datacontract] [knowntype(typeof(derived1))] [knowntype(typeof(derived2))] public class base { } [datacontract] public class derived1 : base { [datamember] public string prop1 {get;set;} [datamember] public string prop2 {get;set;} } [datacontract] public class derived2 : base { [datamember] public string prop3 {get;set;} [datamember] public string prop4 {get;set;} [datamember] public string prop5 {get;set;} } [datacontract] public class superclass { [datamember] public list<base> listbase; } [operationcontract(method="post")] public void somename(superclass superobj); on client side, make ajax call operation contract takes in superclass object parameter. var dataobj = { listbase : [{"prop1":"this is","prop2":"first derived class"}, {"prop3":"this is","prop4":&quo

c++ - Speed of bound lambda (via std::function) vs operator() of functor struct -

auto lam = [](int a, int b, int c) { return < b && b < c; }; struct functor { int a; int b; bool operator()(int n) const { return < n && n < b; } }; in version one, we std::vector<std::function<bool (int)>> lamvals; // parameters , each lamvals.emplace_back(std::bind(lam, a, std::placeholders::_1, b)); the alternative is std::vector<functor> lamvals; // parameters , each lamvals.emplace_back(functor{a, b}); in both cases have simple iteration return std::any_of(lamvals.cbegin(), lamvals.cend(), [n](const decltype(lamvals)::value_type & t){return t(n);}); i seeing speed difference of 3:1, bound lambda slower. functor fast storing integer pairs , hardcoding tests. obviously, hardcoding not useful production code, because there several functions in play, not between. however, can go either many functors or many lambdas. latter fewer lines of code , looks cleaner, don't think can afford speed dif

ios8 - ibeacons notification alerts not showing up -

i have created app uses beacon regions , location manager notify users if inside region , receive notifications dependent upon beacon region identifier. have put nslocationalwaysusagedescription in app's plist , have put if ([application respondstoselector:@selector(registerusernotificationsettings:)]) { types = uiusernotificationtypealert | uiusernotificationtypesound | uiusernotificationtypebadge ; uiusernotificationsettings *mysettings = [uiusernotificationsettings settingsfortypes:types categories:nil]; [[uiapplication sharedapplication]registerusernotificationsettings:mysettings]; } and self.locationmanager = [[cllocationmanager alloc] init]; [locationmanager requestalwaysauthorization]; locationmanager.delegate = self; in app delegate's didfinishlaunchingwithoptions: both notification , location services show in app ask users give permission receive notifications , use location services always. when user agrees both , go settings/

php - Target dynamic value with Jquery -

i have code working except cannot figure out how target value generated dynamically php. so when user clicks on hour fields insert hours on monday through sunday, both divs appear. tried targeting #hours class surrounds fields not work. $(function () { //hide hours on phone graphic , display when clicked $(".hours_bg").hide(); $(".hours").keyup(function() { $("#hours_bg").show(); }); also, here example targeting id works, again have no form id, values creating dynamically php. http://jsfiddle.net/1uu1uc7c/3/ update: here view php variables passed dynamically. http://laravel.io/bin/zz8pr

mysql stored procedure to deleted data from table -

i trying write stored procedure in mysql cleaner used deleted data tables (one stored procedure tables) create procedure `cleaner`( in table_name_in varchar(255), in field_name_in varchar(255), in day_in int ) begin declare foundcount int; select count(1) foundcount table_name_in str_to_date(field_name_in, "%y-%m-%d") < str_to_date(now() - interval day_in day, "%y-%m-%d"); if foundcount = 1 set sql_safe_updates = 0; delete table_name_in str_to_date(field_name_in, "%y-%m-%d") < str_to_date(now()- interval day_in day, "%y-%m-%d"); set sql_safe_updates = 1; select "true" isdeleted , "true" isvaluepresent ; else select "false" isdeleted , "false" isvaluepresent ; end if; end and call as call cleaner('employee','created_on',30) which means deleted record employee table 30 days older u

Iterating through columns in access/sql Solution? -

not sure if can done in vba skill learn if can entirely in sql statements. say have 2 tables, first below, column until 12 (i didn't think designed well) table 1 project id month1 dollars1 month2 dollars2 month3 dollars3 and second table 2 project id month dollars is there way can iterate through columns each row in table 1, , create entry each month , dollar field? i can see how can in excvel-vba, loop through columns , add new each instance of month , dollar or effect, access-vba bit more cryptic me, though sql quite intuitive me , if possible i'd love know! best, kurt try approach insert table2 select projectid, month1, dollars1 table1 union select projectid, month2, dollars2 table1 union select projectid, month3, dollars3 table1 union select projectid, month4, dollars4 table1 union select projectid, month5, dollars5 table1 union select projectid, month6, dollars6 table1 union select projectid, month7, dollars7 table1 union select projectid, m

c# - Filesystemwatcher causing "Error too many changes at once in directory C:\" -

like few others i'm getting error "error many changes @ once in directory c:\" filesystemwatcher when job. if c:\ clear there many changes. in special case set following parameters: path = c:\ filter = "test1.txt" notifyfilter = notifyfilters.lastwrite | notifyfilters.filename | notifyfilters.directoryname includesubdirectories = true i started watcher , let run without problems 4 hours after Í locked pc , came short while later , had error. now i'm wondering have caused error in case. overlooking important here? or taht includesubdirectories parameter lets check subdirectories of c:\ , ignoring filter of single file exists in c:\ ? you can increase buffer changes - helped me once. but every change @ c:\ subdirs can maybe cause lot of workload.. msdn filesystemwatcher.internalbuffersize property edit: the filter gets checked @ raising-method - internally every change gets recognized class. i took framework code can see main raisi

android - Navigation In Ionic Angular.js -

i new in ionic , want navigate home url new url in ionic blank application. can tell me how achieve this. here code: app.service('sharedproperties', function () { var username= '',password=''; return { setlistname: function(user,pass) { username= user; password= pass; }, getstatus: function() { if(username=='feat',password=='password') { return succes; } } }; }); app.controller("mynotectrl", function($scope,sharedproperties) { $scope.save=function(parameter1,parameter2) { sharedproperties.setlistname(parameter1,parameter2); alert("value passed services"); } $scope.getstat = function() { $scope.msg = sharedproperties.getstatus(); } }); app.js var app = angular.module('mynoteapp', ['ionic', 'mynoteapp.controllers', 'mynoteapp.services']); probably new in angular.js also. you can use $location service navigation. how use first add $location controller/factory/service param

objective c - SKLabelNode subclass has zero frame -

here have straightforward implementation of sklabelnode subclass. the interface: #import <spritekit/spritekit.h> @interface cslabelnode : sklabelnode - (instancetype)initwithfontnamed:(nsstring *)fontname fontsize:(cgfloat)fontsize fontcolor:(skcolor *)fontcolor; @end the implementation: #import "cslabelnode.h" @implementation cslabelnode - (instancetype)initwithfontnamed:(nsstring *)fontname fontsize:(cgfloat)fontsize fontcolor:(skcolor *)fontcolor { self = [super initwithfontnamed:fontname]; if (self) { self.fontsize = fontsize; self.fontcolor = fontcolor; } return self; } @end i calling regular sklabelnode , custom cslabelnode this: cslabelnode *custom = [[cslabelnode alloc] initwithfontnamed:@"crimsontext-bold" fontsize:30.0f fontcolor:[skcolor redcolor]; sklabelnode *regular = [[sklabelnode alloc] initwithfontnamed:@"crimsontext-bold"]; custom.text = @"some text"; regular.text = @&

hadoop - YARN: what should I configure for 3 nodes? -

here setup: node1 - resourcemanager node1,node2,node3 - nodemanager what should specify in yarn-site.xml in node1, node2 , node3? dont know port should use. have specify port? all basic settings can same in yarn-site.xml throughout cluster. yarn.resourcemanager.resource-tracker.address should point master (node1), port can want (8031 seems default). same goes yarn.resourcemanager.scheduler.address - default port seems 8030. yes, should define these values , set port.

ios - How to make UITextField move up when keyboard is present? -

how prevent uitextfield being hidden keyboard? i assume happening on uiviewcontroller. if so, can setup following 2 functions called when keyboard show/hide, , respond appropriately in blocks. setting uiviewcontroller: class xxxviewcontroller: uiviewcontroller, uitextfielddelegate... { var frameview: uiview! first, in viewdidload: override func viewdidload() { self.frameview = uiview(frame: cgrectmake(0, 0, self.view.bounds.width, self.view.bounds.height)) // keyboard stuff. let center: nsnotificationcenter = nsnotificationcenter.defaultcenter() center.addobserver(self, selector: #selector(atreportcontentviewcontroller.keyboardwillshow(_:)), name: uikeyboardwillshownotification, object: nil) center.addobserver(self, selector: #selector(atreportcontentviewcontroller.keyboardwillhide(_:)), name: uikeyboardwillhidenotification, object: nil) } then implement following 2 functions respond nsnotificationcenter functions defined in viewd

SQL Query to use in report builder 3.0: grouping results together -

i trying product sales report shows example itemid salesdate qty_sold item1 1/9/14 3 item1 1/9/14 2 item1 1/9/14 5 item2 2/9/14 2 item3 4/9/14 1 the problem have because sales of example 3 on monday made of 1-3 different sales orders, can show multiple lines , not group want. i want product report shows item id, date of purchase , total sold on day, not list of sales include item if makes sense? thanks in advance more details: select st.orderdate, sl.itemid, sl.qty salestable st inner join salesline sl on salestable.salesid = salesline.salesid currently, displays results follows. orderdate itemid qty 1/1/14 101 1 1/1/14 101 3 1/1/14 102 1 i group rows if possible show 1 line per date & itemid. doesn't work because separate lines in database have different order numbers etc. o

php - Drodown option to database -

my query not sending chosen state database, <?php if( !isset( $_session ) ){ session_start(); } $con=mysqli_connect("localhost", "root", "", "test"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } // escape variables security $firstname = mysqli_real_escape_string($con, $_post['firstname']); $lastname = mysqli_real_escape_string($con, $_post['lastname']); $number = mysqli_real_escape_string($con, $_post['number']); $email = mysqli_real_escape_string($con, $_post['email']); $addressone = mysqli_real_escape_string($con, $_post['addressone']); $addresstwo = mysqli_real_escape_string($con, $_post['addresstwo']); $city = mysqli_real_escape_string($con, $_post['city']); $state = mysqli_real_escape_string($con, $_post['state']);

android - See full input layout on bottom when opening virtual keyboard -

in overall linearlayout have input area (also wrapped in linear layout) @ bottom of layout. want user see full input area (not edittext element, wrapping linear layout). for have added android:windowsoftinputmode="adjustpan" to androidmanifest file. works great, not see whole linear layout @ bottom, it's half-way truncated. see edittext @ least half, blinking cursor visible. what can see whole bottom layout? keyboard moved/aligned item focused (your input edittext element). make sure height of edittext same wrapping linearlayout. if use linearlayout add padding can switch edittext have margin on top/bottom instead.

c# - Refining HTML Agility Pack Nodes -

i using html agility pack , fizzler (so can use css selectors) scrape results page. i start creating html document , creating list of nodes each node individual result. ienumerable<htmlnode> sections = document.documentnode.queryselectorall("selector"); i want drill down each of these nodes grab specific data want getting lost here. i tried: foreach (htmlnode n in sections) { var phone = n.queryselectorall("selector"); string myvar = phone.innerhtml; // doesn't work, innerhtml property not there. } can tell me how approach this? of examples have seen stop @ creating nodes list. ok stupidly simple. needed use queryselector instead of queryselectorall

makefile - How can I build include path through my dependencies? -

i have variable, deps , list of libs, e.g. libs/a libs/b . have makefile set build in correct order, want set variable include_path add libs' include directories. right looks like: include_path = $(foreach dep,$(deps),-i$(root)/$(dep)/include ) which works. but have library, libs/c depends on other two, , app depends on it. write deps = libs/c libs/a libs/b in makefile include_path correct there way write deps = libs/c suffices , include_path still -i../libs/c/include -i../libs/a/include -i../libs/b/include ?

ruby on rails - Guard installation error -

i install guard on mac os x guard-cucumber , have such errors in terminal: http://pastebin.com/nsbjaws2 can problem? ( installing guard on jekyll source gem) it looks, there error of permission, how fix it? permission error appeared without guard-cucumber , runned bundle exec guard init bundle exec guard , had same errors , after installed cucumber , error still exists ( i remove tmp dir , , guard cucumber works nice :)

excel - How to open a save file dialogue box and save the file by writing a string into it in libreoffice.Below code is in VBA -

i following error when run below vba code in libreoffice basic runtime error. '423' getsaveasfilename ' comment code starts here sub buildyaml() dim yaml string yaml = "hello world" dim vfile variant 'opening save box vfile = application.getsaveasfilename(initialfilename:=sheets("simple").cells(2, 2) & "_config.yaml", _ filefilter:="yaml config file (*.yaml), *.xlsb, files (*.*), *.*", _ title:="save config file as:") if vfile <> false call savefile(vfile, yaml) msgbox ("file saved") end if end sub saving file sub savefile(filename variant, content string) dim fso object set fso = createobject("scripting.filesystemobject") dim ofile object set ofile = fso.createtextfile(filename) ofile.writeline content ofile.close